> 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 %}


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://mtnpay.gitbook.io/api-docs/reference/api-reference/mint.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
