> ## Documentation Index
> Fetch the complete documentation index at: https://docs.crossmint.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Mint Tokens

> Create and distribute tokens at scale

<Tabs>
  <Tab title="Unique Assets (ERC-721)">
    To mint and airdrop unique digital assets, you can follow the guide on the [Quickstart](/minting/quickstarts/nfts). For more detail, please check the [API reference](/api-reference/minting/nfts/mint-nft). You can watch a quick video tutorial for this [here](https://youtu.be/yYJRW35zqUQ?si=b6PQTbZ7zqYVGwXw).
  </Tab>

  <Tab title="Editions (ERC-1155)">
    SFTs (semifungible tokens) follow the ERC-1155 standard. Each token is a replica of a predefined template. Each collection (smart contract) can contain multiple templates, which can contain many tokens.

    To get started, it's recommended to read the [Introduction](/minting/introduction) for general information on how the minting product works.

    <Warning>This API only supports EVM chains self-serve. Contact us if you need support for another chain.</Warning>

    ## 1. Create an SFT collection to hold your templates

    ```bash cURL theme={null}
      curl --request POST \
        --url https://staging.crossmint.com/api/2022-06-09/collections \
        --header 'accept: application/json' \
        --header 'content-type: application/json' \
        --header 'x-api-key: YOUR_API_KEY' \
        --data '
    {
        "chain": "polygon-amoy",
        "fungibility": "semi-fungible",
        "metadata": {
          "name": "My New Collection",
          "imageUrl": "https://www.crossmint.com/assets/crossmint/logo.png",
          "description": "A new collection with its own dedicated smart contract"
        }
    }'
    ```

    <Accordion title="See example response">
      ```json JSON theme={null}
        {
          "id": "5263650e-6d43-4ed3-9e31-0cf593d076a4",
          "metadata": {
            "name": "Test Collection",
            "description": "Test",
            "imageUrl": "https://cdn.io/metadata.json",
            "symbol": "XMINT"
          },
          "fungibility": "semi-fungible",
          "onChain": {
            "chain": "polygon-amoy",
            "type": "erc-1155"
          },
          "actionId": "5263650e-6d43-4ed3-9e31-0cf593d076a4"
        }
      ```
    </Accordion>

    ## 2. Create a template within that collection

    ```bash cURL theme={null}
    curl --request POST \
      --url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}/templates \
      --header 'accept: application/json' \
      --header 'content-type: application/json' \
      --header 'x-api-key: YOUR_API_KEY' \
      --data '
      {
        "onChain": {
          "tokenId": "2"
        },
        "supply": {
          "limit": 10
        },
        "metadata": {
          "name": "My template",
          "image": "https://www.crossmint.com/assets/crossmint/logo.png",
          "description": "A new token template for my ERC1155 collection"
        }
      }'
    ```

    <Accordion title="See example response">
      ```json JSON theme={null}
      {
        "templateId": "58b0c1aa-e457-48dd-bb55-5a27e6a92f74",
        "metadata": {
          "name": "My template",
          "image": "ipfs://bafkreigbqsmxzkbjgbwtj6exfdt5z3t3swgoysf7hr6vjzddqnmykj6x2u",
          "description": "A new token template for my ERC1155 collection"
        },
        "onChain": {
          "tokenId": "1"
        },
        "supply": {
          "limit": "10",
          "minted": "0"
        }
      }
      ```
    </Accordion>

    ## 3. Mint an SFT from a template

    Mint SFTs from the template and send them to wallets or email addresses.

    ```bash cURL theme={null}
      curl --request POST \
        --url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}/sfts \
        --header 'accept: application/json' \
        --header 'content-type: application/json' \
        --header 'x-api-key: YOUR_API_KEY' \
        --data '
        {
          "templateId": "58b0c1aa-e457-48dd-bb55-5a27e6a92f74",
          "recipient": "email:user@example.com:polygon-amoy",
          "amount": 1
        }'
    ```

    <Accordion title="See example response">
      ```json JSON theme={null}
      {
        "actionId": "a91c15e3-60f2-4a45-bf1a-cee508981667",
        "action": "nfts.create",
        "status": "pending",
        "data":
        {
          "chain": "polygon-amoy",
          "collection":
          {
            "id": "84e3d617-9c1b-4e7a-9686-522a9ea7c520",
            "contractAddress": "0x9b8ab8949bd7E73E61945b88F7fe12151f98ad3C"
          },
          "recipient":
          {
            "walletAddress": "0xcFDc00Cf926A5053f9Cdf004e6DF17e6dEB2E146",
            "email": "testy@crossmint.com"
          },
          "token":
          {
            "id": "a91c15e3-60f2-4a45-bf1a-cee508981667"
          }
        },
        "startedAt": "2024-01-02T22:05:01.000Z",
        "resource": "https://staging.crossmint.com/api/2022-06-09/actions/a91c15e3-60f2-4a45-bf1a-cee508981667"
      }
      ```
    </Accordion>

    **All set!**

    To confirm delivery, use the [transaction status API](/minting/nfts/integrate/webhooks-and-status-apis) or set up a [webhook](/minting/nfts/integrate/webhooks-and-status-apis).
  </Tab>

  <Tab title="Compressed NFTs">
    ## What are Compressed NFTs?

    Compressed NFTs are a new standard on the Solana blockchain, for minting NFTs with the lowest cost amongst L1 and L2 blockchains, and the highest throughput (thousands of NFTs per second). Read more details about how it works [here](https://www.metaplex.com/posts/expanding-digital-assets-with-compression-for-nfts).

    Using this standard to mint NFTs is extremely complicated if you manage everything on your own. On top of the intrinsic complexity usually required to mint a regular NFT, compressed NFTs require deploying and managing Merkle trees, batching, and dealing with nascent infrastructure. Crossmint also supports updating the NFT metadata after minting. Please refer to this [doc page](/minting/nfts/integrate/update-nfts).

    Here's where Crossmint can help: we've done all the hard work so that minting compressed NFTs is no harder than minting regular ones: all it takes is a single API call, and you can even use one of Crossmint's no-code tools to do so.

    ## Current Protocol Limitations

    * There's a 10-30 second delay between when an NFT is minted and it shows in wallets.

    ## How to use the Minting API with Compressed NFTs

    The Minting API for Compressed NFTs is exactly the same as for regular NFTs, but it only works on the Solana blockchain.

    POST `https://staging.crossmint.com/api/2022-06-09/collections/<collection-id>/nfts`

    <Note>You can mint both compressed and non-compressed NFTs on the same collection.</Note>

    ```bash cURL theme={null}
    curl --request POST \
      --url https://staging.crossmint.com/api/2022-06-09/collections/default-solana/nfts \
      --header 'Content-Type: application/json' \
      --header 'X-API-KEY: <x-api-key>' \
      --data '{
        "recipient": "email:john.doe@example.com:solana",
        "metadata": {
          "name": "Crossmint Example NFT",
          "image": "https://www.crossmint.com/assets/crossmint/logo.png",
          "description": "My NFT created via the mint API!"
        },
        "compressed": true,
        "reuploadLinkedFiles": false
      }'
    ```

    The above will return an NFT ID. Use it in the next call to retrieve the mint status.

    ```bash cURL theme={null}
    curl --request GET \
      --url https://staging.crossmint.com/api/2022-06-09/collections/{collectionId}/nfts/{nftId} \
      --header 'X-API-KEY: X_API_KEY'
    ```

    Be sure to replace:

    * `X_API_KEY`, `{collectionId}` and `{nftId}`
    * Recipient: change `VALID_WALLET_ADDRESS` with the wallet you want to send the NFT to
    * Metadata: add the name, image, and description.

    <Card title="To explore compressed NFTs on the blockchain, you must use Orb, powered by Helius" icon="magnifying-glass" iconType="duotone" href="https://xray.helius.xyz/">
      Other explorers, like Solscan, still have not added support.
    </Card>
  </Tab>

  <Tab title="Non-transferrable NFTs">
    There are two ways to set the transferrability of NFTs:

    1. Defining it at the smart contract level
    2. If you are using custodial wallets, enabling or disabling transfers from the frontend

    If you want to configure it at the smart contract level, see the following endpoints:

    | Endpoint                                                                     | Chain         | Description                       |
    | ---------------------------------------------------------------------------- | ------------- | --------------------------------- |
    | [Set Transferability](/api-reference/minting/collection/set-transferability) | EVM and Aptos | Set transferability to on or off  |
    | [Get Transferability](/api-reference/minting/collection/get-transferability) | EVM and Aptos | Get transferability configuration |

    <Note>For Solana or other non-EVM chain support, [contact us](https://www.crossmint.com/contact/sales)</Note>
  </Tab>
</Tabs>

***

<Note>
  The API also has an idempotent version which prevents you from calling the same API action multiple times and
  mitigates the risk of unwanted NFT duplicates.
</Note>

## Advanced Guides

<CardGroup cols={4}>
  <Card title="Dynamic NFTs" icon="pencil" iconType="duotone" color="BD9C38" href="/minting/nfts/integrate/update-nfts" />

  <Card title="List for Sale" icon="money-bill" iconType="duotone" href="/minting/nfts/integrate/list-for-sale" />

  <Card title="Webhooks & Status APIs" icon="atom" iconType="duotone" color="#8421B9" href="/minting/nfts/integrate/webhooks-and-status-apis" />

  <Card title="Bring your own Contract" icon="file-import" iconType="duotone" color="#69430C" href="/minting/nfts/integrate/bring-your-own-contract" />
</CardGroup>
