Minting NFTs

Guide Overview

Learn how to mint NFTs into your collections using the EZMint API. This guide covers the entire minting process, from preparing metadata to handling batch minting.

Prerequisites

Step 1: Prepare NFT Metadata

For each NFT you want to mint, prepare the following information:

Required Information

  • • NFT name
  • • Description
  • • Image file (PNG, JPG, GIF) - max 10MB

Optional Information

  • • External URL
  • • Animation URL (for 3D models, videos, etc.)
  • • Attributes/traits

Step 2: Mint a Single NFT

Use the NFTs API to mint a single NFT:

Example Request

curl -X POST https://api.ezmint.xyz/api/devnet/collections/YOUR_COLLECTION_ID/mint \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Awesome NFT #1",
    "description": "A unique piece of digital art",
    "image": "data:image/png;base64,..." // or "https://..."
    "attributes": [
      {
        "trait_type": "Background",
        "value": "Blue"
      }
    ],
    "recipientAddress": "OPTIONAL_RECIPIENT_WALLET_ADDRESS"
  }'

Important Network Considerations

  • Always use the same network endpoint as the collection's network
  • Use devnet for testing and development
  • Switch to mainnet only when ready for production
  • NFTs cannot be transferred between networks

Step 3: Batch Minting

To mint multiple NFTs at once, use the batch minting endpoint:

Example Request

curl -X POST https://api.ezmint.xyz/api/nfts/batch \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "collection_id": "YOUR_COLLECTION_ID",
    "nfts": [
      {
        "name": "Awesome NFT #1",
        "description": "First NFT in the series",
        "image": "data:image/png;base64,..."
      },
      {
        "name": "Awesome NFT #2",
        "description": "Second NFT in the series",
        "image": "data:image/png;base64,..."
      }
    ]
  }'

Important Notes

  • • Maximum 50 NFTs per batch request
  • • All NFTs in a batch must belong to the same collection
  • • Batch minting is atomic - all NFTs succeed or none do

Step 4: Verify Minting

After minting, verify your NFTs:

Example Request

curl https://api.ezmint.xyz/api/nfts/YOUR_NFT_ID \
  -H "Authorization: Bearer YOUR_API_KEY"

Best Practices

  • Use meaningful names and descriptions for your NFTs
  • Optimize images before uploading to reduce size
  • Include relevant attributes to make your NFTs more discoverable
  • Use batch minting for large collections to save time and costs

Next Steps