# Mint

Use this endpoint to mint an existing rune as defined in <https://docs.ordinals.com/runes.html#minting>

{% hint style="info" %}

* Runes are available on **testnet only** until block height 840000.
* We allow the execution of `n` mints per order, dictated by the field `numberOfMints`
* `n` mints will create `n` transactions
* Minting transaction ids will appear in the order in the field `mintingTxs`
* For every mint transaction the counter `executedMints` will be incremented
  {% endhint %}

### `POST` a new rune mint order

## Mint Rune

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

#### Request Body

<table><thead><tr><th width="174">Name</th><th width="106">Type</th><th>Description</th></tr></thead><tbody><tr><td>rune<mark style="color:red;">*</mark></td><td>String</td><td>Rune name</td></tr><tr><td>receiveAddress<mark style="color:red;">*</mark></td><td>String</td><td>A single Bitcoin address to receive the rune balance for the whole order</td></tr><tr><td>fee<mark style="color:red;">*</mark></td><td>Number</td><td>Miner fee that will be paid while inscribing the ordinals in sats/byte.</td></tr><tr><td>numberOfMints</td><td>Number</td><td>Number of times provided rune should be minted to receive address.<br>(default=1)</td></tr><tr><td>referral</td><td>String</td><td>Referral code to earn up to %15 of the order service fee.</td></tr><tr><td>additionalFee</td><td>Number</td><td><p>Amount of satoshis to charge extra for this order that will be added to "referral" account.</p><p>Needs to be used together with "referral" parameter.</p></td></tr><tr><td>postage</td><td>Number</td><td><p>Set custom postage for the order's asset: minimum 330 sats, maximum 10,000 sats.</p><p></p><p>(default=546)</p></td></tr></tbody></table>

{% tabs %}
{% tab title="200: OK " %}

```json
{
    "charge": {
        "id": "0128d9cd-5821-4f2e-b042-9124f8027b0f",
        "description": "e3124086-4f86-4b73-be2b-f5bcceea7d0b",
        "desc_hash": false,
        "created_at": 1713286060,
        "status": "unpaid",
        "amount": 24200,
        "success_url": null,
        "hosted_checkout_url": "https://checkout.dev.opennode.com/0128d9cd-5821-4f2e-b042-9124f8027b0f",
        "order_id": null,
        "currency": "BTC",
        "source_fiat_value": 24200,
        "fiat_value": 15.03,
        "auto_settle": false,
        "notif_email": null,
        "address": "2NG1xF8STPUhwtaTJyKUdGMai8GXs5mK8sy",
        "metadata": {},
        "chain_invoice": {
            "address": "2NG1xF8STPUhwtaTJyKUdGMai8GXs5mK8sy"
        },
        "uri": "bitcoin:2NG1xF8STPUhwtaTJyKUdGMai8GXs5mK8sy?amount=0.000242&label=e3124086-4f86-4b73-be2b-f5bcceea7d0b&lightning=lntb242u1pnpa2avpp5jh0f855vgg2zakshfce6zua8q7jfj3dkejwak93d52073c7vjevqdp6v5enzv35xqurvtf5vcurvtf5vgmnxttzv5exyttxx43xxcm9v4snwepsvgcqzzsxqy8ayqsp5ug9pp67ed0tq3064vu8fjhghmwwvq7w3zwyjk5mnmqukgjxjayws9qyyssq8kgsw4d6drsy346kag3jsxlzmzlkqr0fnpp0gy6f27kj9nmss4wx40r9qrmafc64kexe8tat6lj94y39cezay8drg9qtw4qyx57mg9qq4nfknr",
        "ttl": 4320,
        "lightning_invoice": {
            "expires_at": 1713545260,
            "payreq": "lntb242u1pnpa2avpp5jh0f855vgg2zakshfce6zua8q7jfj3dkejwak93d52073c7vjevqdp6v5enzv35xqurvtf5vcurvtf5vgmnxttzv5exyttxx43xxcm9v4snwepsvgcqzzsxqy8ayqsp5ug9pp67ed0tq3064vu8fjhghmwwvq7w3zwyjk5mnmqukgjxjayws9qyyssq8kgsw4d6drsy346kag3jsxlzmzlkqr0fnpp0gy6f27kj9nmss4wx40r9qrmafc64kexe8tat6lj94y39cezay8drg9qtw4qyx57mg9qq4nfknr"
        }
    },
    "paylink": {
        "id": "66xxx16", // visit https://app.hel.io/pay/66xxx16 to pay
    },
    "rune": "BITCOIN•HAS•A•CAT",
    "receiveAddress": "tb1qwejhagpav9rkrwpk55ul6pes6f89glpkpds487",
    "fee": 10,
    "chainFee": 2000,
    "serviceFee": 22200,
    "baseFee": 12000,
    "rareSatsFee": 0,
    "postage": 546,
    "additionalFee": null,
    "numberOfMints": 1,
    "id": "e3124086-4f86-4b73-be2b-f5bcceea7d0b",
    "orderType": "rune-mint",
    "state": "waiting-payment",
    "createdAt": {
        ".sv": "timestamp"
    },
    "executedMints": 0,
    "mintingTxs": []
}
```

{% endtab %}

{% tab title="500: Internal Server Error " %}

```json
{
    status: 'error',
    error: 'error reason'
}
```

{% endtab %}

{% tab title="400: Bad Request " %}

{% endtab %}
{% endtabs %}

```json
// Here's a sample payload you can POST to create a rune mint order
{
    "rune": "MEGA•MEME•COIN",
    "fee": 8,
    "receiveAddress": "tb1pqwh3dxhg3k4szt9zm5kt8p0m97nl7k7zlmplehmr6alc4ut8xd5qams63p",
    "numberOfMints": 2,
}
```


---

# Agent Instructions: 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:

```
GET https://docs.ordinalsbot.com/runes/mint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
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.
