Dynamic Minting API

The MintGarden Dynamic Minting API provides a novel way to mint NFTs directly on-chain through a streamlined API interface.
After aquiring some mint credits, you can dynamically mint your NFTs with a single API call,
while our Secure the Mint technology ensures the NFTs are linked to your creator DID for provenance.
Usage
To mint an NFT dynamically, send a POST request to: https://api.mintgarden.io/mint/dynamic
Set your API key as a bearer token in the Authorization header:
Authorization: Bearer YOUR_API_KEY
Request body example:
{
  "profile_id": "did:chia:1atzquy77mu7ly7kpkqdc9k95658rzu4wyxvves0d45m7c6awt2as6p9q0j",
  "metadata": {
    "data_hash": "8e66307cc9eb7cd8d00d0ffdf2cc4bdde0b415921f850b44c070b43291522a2a",
    "data_uris": [
      "https://ipfs.mintgarden.io/ipfs/bafybeidcvjjsqfzae37mzpn7njxnlgdtspya2wkrrkaijoyngux5cjth3m/gm-yak.webp"
    ],
    "metadata_hash": "b9d6f7898cf79169ab31cd2bf5d4f773c27380da3c2b6c70cdecf5737028b7b3",
    "metadata_uris": [
      "https://ipfs.mintgarden.io/ipfs/bafybeidcvjjsqfzae37mzpn7njxnlgdtspya2wkrrkaijoyngux5cjth3m/metadata.json"
    ]

    // optional license fields
    "license_hash": "04ba14ed35d221c4e0d64a3685d92e6bf4b57d77df3215ec609be010e6baa148",
    "license_uris": ["URL_TO_YOUR_LICENSE"]
    
    // optional edition fields (for NFTs with identical data/metadata)
    "edition_number": 1,
    "edition_total": 1,
  },
  "royalty_address": "xch1ysveu6vh0evhuwq30708syfep7nfaed29l0ejee9nw3wjfjalq8s4fjjvy",
  "royalty_percentage": 5,

  // delivery options

  // if you want to send the NFT to a specific address
  "target_address": "xch1ysveu6vh0evhuwq30708syfep7nfaed29l0ejee9nw3wjfjalq8s4fjjvy",

  // OR if you want to create a mint offer for 1 XCH
  "target_address": "xch1ysveu6vh0evhuwq30708syfep7nfaed29l0ejee9nw3wjfjalq8s4fjjvy",
  "requested_mojos": 1000,

  // OR if you want to create a mint offer for 1 SBX
  "target_address": "xch1ysveu6vh0evhuwq30708syfep7nfaed29l0ejee9nw3wjfjalq8s4fjjvy",
  "requested_mojos": 1000,
  "requested_asset_id": "a628c1c2c6fcb74d53746157e438e108eab5c0bb3e5c80ff9b1910b3e4832913"
}
The API will respond in one of two ways:
  • If you only specify a target_address, the NFT will be minted directly to that address and the response will include the NFT coin ID
  • If you also request a payment, the API will return an offer file that can be shared with users to complete the minting process.