Why Use the Minting API?
The Minting API is a REST API. See the endpoint examples below for request/response formats.
Prerequisites
Deploy Contract
ERC-721 or ERC-1155 contract
Enable Minting API
Grant minter role to Immutable
API Keys
Secret API Key for authentication
Rate Limits
Rate limits count distinct
token_ids, not total tokens. Minting 1000 copies of the same ERC-1155 token_id counts as 1 request.Minting ERC-721
With Token ID (mintBatch)
Use when you need specifictoken_ids (e.g., migrating existing assets):
Without Token ID (mintBatchByQuantity)
More gas-efficient. System generates sequentialtoken_ids:
reference_id to look up the assigned token_id after minting completes.
Minting ERC-1155
Key Differences from ERC-721
Tracking Mint Status
Status Values
Webhooks (Recommended)
Configure webhooks in Hub to receive real-time updates:Metadata
Include with Mint Request (Recommended)
Include metadata in the mint request for immediate indexing:Host at baseURI (Required)
Even when including metadata in the API call, you must also host the metadata file at{baseURI}/{token_id}. Some ecosystem partners fetch directly from the source.
Metadata Format
See the metadata format specification
Refreshing Metadata
When in-game assets evolve through player actions (leveling up, crafting, performance enhancements), you need to refresh the metadata so marketplaces and other ecosystem partners reflect the updated attributes.When to Refresh Metadata
Refresh by Token ID
Push updated metadata for specific tokens:Refresh Rate Limits
Rate limit response headers:
Verify Metadata Updated
Metadata refreshes are asynchronous. Check themetadata_synced_at field via the Indexer to confirm updates:
Error Handling
Request Errors (No Blockchain Event)
Transaction Errors (Check via Status API)
Idempotent Requests
Safe to retry failed network requests—duplicatereference_id returns 409 Conflict:
Best Practices
Batch Efficiently
Use Reference IDs Wisely
Handle Rate Limits
Next Steps
Build a Game
Backend minting in games
ERC-721
NFT contracts
ERC-1155
Multi-token contracts
Indexer
Query minted assets
Webhooks
Real-time mint notifications