> For the complete documentation index, see [llms.txt](https://mtnpay.gitbook.io/api-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mtnpay.gitbook.io/api-docs/reference/api-reference/mint.md).

# Mint

### Powered by  ![](/files/wHdYzeoZZXkZiiiPUYEI)&#x20;

The ***NFT Mint*** endpoint enables a developer to provide a “headless mint” via a physical or digital QR code or through a wallet redirect link. The Transaction Request will build a transaction that mints an NFT from the provided CandyMachine public key.

CandyMachine is a tool developed by Metaplex that facilitates the creation, payment, and mint of NFTs.

The 3 methods available to mint NFTs using this endpoint are *candy machine, metadata, and upload*.

## Returns a transaction to mint an NFT

<mark style="color:green;">`POST`</mark> `https://api.mtnapi.com/mint`

#### Query Parameters

| Name                                             | Type   | Description                                                                                                                                                                               |
| ------------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| candyMachineId<mark style="color:red;">\*</mark> | String | The Candy Machine ID (public key of candy machine account) for the NFT that the user wants to mint.                                                                                       |
| cluster                                          | String | <p>Specify Solana devnet or mainnet cluster. </p><p></p><p>The default value is set to MAINNET.</p>                                                                                       |
| devMode                                          | String | <p>Set to TRUE to enable dev mode, otherwise set to FALSE. Dev mode will enable error codes to be sent back for transaction failures.</p><p></p><p>The default value is set to FALSE.</p> |
| name                                             | String | Name of the NFT.                                                                                                                                                                          |
| description                                      | String | The description of the NFT.                                                                                                                                                               |
| symbol                                           | String | The symbol of the NFT (e.g. mtnfren).                                                                                                                                                     |
| uri                                              | String | The location of an uploaded metadata file.                                                                                                                                                |
| fee                                              | int    | The royalty amount (e.g. 500 = 5%)                                                                                                                                                        |
| image                                            | String | The URL of an image location.                                                                                                                                                             |
| attributes                                       | String | The individual attributes of the collection in the format shown in the example (e.g. hats,rock,hats,cowboy,shirt,red,shirt).                                                              |

#### Request Body

| Name                                      | Type   | Description                                                        |
| ----------------------------------------- | ------ | ------------------------------------------------------------------ |
| account<mark style="color:red;">\*</mark> | string | The public key of the wallet that wants to mint the specified NFT. |

{% tabs %}
{% tab title="200 Transaction was built successfully." %}

```javascript
{
    transaction: "<transaction>"
}
```

{% endtab %}
{% endtabs %}

## The GET request will return mint information

<mark style="color:blue;">`GET`</mark> `https://api.mtnapi.com/mint`

#### Query Parameters

| Name                                             | Type   | Description                                                                                                                                                                               |
| ------------------------------------------------ | ------ | ----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| candyMachineId<mark style="color:red;">\*</mark> | String | The Candy Machine ID (public key of candy machine account) for the NFT that the user wants to mint.                                                                                       |
| cluster                                          | String | <p>Specify Solana devnet or mainnet cluster. </p><p></p><p>The default value is set to MAINNET.</p>                                                                                       |
| devMode                                          | String | <p>Set to TRUE to enable dev mode, otherwise set to FALSE. Dev mode will enable error codes to be sent back for transaction failures.</p><p></p><p>The default value is set to FALSE.</p> |

#### Request Body

| Name                                      | Type   | Description                                                        |
| ----------------------------------------- | ------ | ------------------------------------------------------------------ |
| account<mark style="color:red;">\*</mark> | string | The public key of the wallet that wants to mint the specified NFT. |

{% tabs %}
{% tab title="200 Information was returned successfully." %}

```javascript
{
    label: "<Name of NFT>",
    icon: "<NFT logo>"
}
```

{% endtab %}
{% endtabs %}
