Skip to main content
Mint NFTs at scale without managing nonces, batching, gas, or indexing—everything is handled through a single API call.

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
The Minting API requires Immutable preset contracts. Custom contracts are not supported.
Security: Keep your Secret API Key server-side only. See API Keys Security for best practices.

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.
Rate limit headers in response:

Minting ERC-721

With Token ID (mintBatch)

Use when you need specific token_ids (e.g., migrating existing assets):

Without Token ID (mintBatchByQuantity)

More gas-efficient. System generates sequential token_ids:
Use the reference_id to look up the assigned token_id after minting completes.
mintBatchByQuantity may return incomplete balanceOf() results for collections with 80,000+ tokens. Contact Immutable if you need both features.

Minting ERC-1155

Key Differences from ERC-721

Passing metadata when minting to an existing token_id returns 409 Conflict. Check if the token exists before including metadata.

Tracking Mint Status

Status Values

Configure webhooks in Hub to receive real-time updates:

Metadata

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.
Immutable does not listen for URI update events. You must explicitly trigger a metadata refresh for changes to propagate across the ecosystem.

When to Refresh Metadata

Refresh by Token ID

Push updated metadata for specific tokens:
Submit the entire asset metadata when refreshing—not just changed attributes. Omitted fields will be removed.

Refresh Rate Limits

Rate limit response headers:
Use metadata_id for bulk updates. Refreshing by metadata_id updates all NFTs that share that metadata stack, which is significantly faster than refreshing individual tokens.

Verify Metadata Updated

Metadata refreshes are asynchronous. Check the metadata_synced_at field via the Indexer to confirm updates:
Updated metadata is typically reflected on marketplaces within ~8 seconds.

Error Handling

Request Errors (No Blockchain Event)

Transaction Errors (Check via Status API)

Idempotent Requests

Safe to retry failed network requests—duplicate reference_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