Create a Direct Inscription Order

Ordinalsbot supports simplified inscriptions that avoid the need to do additional commit transaction, thus reducing the cost of inscription.

Use this endpoint to create a direct inscription order that will be processed once the deposit address is funded.

  • There's currently a limit of 10000 files per order.

  • If you choose to send file contents as base64 or text encoded dataURL instead of url, there's a limit of 50MB per API call.

  • Currently only internally hosted URLs are supported so if you're dynamically generating files, send them as dataURL which will automatically be uploaded to OrdinalsBot buckets.

  • The /inscribe endpoint has a rate limit of maximum of 2 requests every 10 seconds.

  • There is a slight delay between the time the order is created and the charge address appears. You will need to poll the order after it is created to see the charge address. See /order

POST a new inscription order

Create Order

POST https://api.ordinalsbot.com/inscribe

Remember to include headers with your POST request:

headers: { 'Accept': 'application/json', 'Content-Type': 'application/json' }

Request Body

NameTypeDescription

files*

Array

An array of objects that includes:

Mandatory

name:string; => name of the file including extension.

size:number; => size of the file in bytes

url:string; => file URL hosted on OrdinalsBot buckets

Optional

metadataUrl:string; => metadata json file URL hosted on OrdinalsBot buckets

metadataSize:number; => size of the metadata file in bytes

metaprotocol:string; => Metaprotocol field to be included in the inscription data

Note: you can send any dataURL text/json/image/video data in a parameter called dataURL instead of url for files

receiveAddress*

String

A single Bitcoin address to receive the inscriptions for the whole order

fee

Number

Miner fee that will be paid while inscribing the ordinals in sats/byte.

(default=2 sats/byte)

lowPostage

Boolean

Inscribe file with minimum postage (padding) 546 sats instead of the standard 10,000 sats.

(default=false)

allowedSatributes

Array

Array of satributes that this inscription will be allowed to be inscribed on. List of supported satributes are available at Supported Satributes

referral

String

Referral code to earn up to %15 of the order base fee.

additionalFee

Number

Amount of satoshis to charge extra for this order that will be added to "referral" account.

Needs to be used together with "referral" parameter.

webhookUrl

String

webhook url to receive a POST payload for order updates.

Refer to Webhooks for format of the webhook payload

{
    status: 'ok',
    id: 'c411ca33-53dd-4d4f-b959-6c6dffcc88e5',
    ..., // input parameters
    charge: {
        // The payment address will appear with a short delay
        // Do a GET /order?id={id} to get the charge address
        amount: 1218725
    },
    chainFee: 718725 // in satoshis
    serviceFee: 100000, // in satoshis
    orderType: 'direct',
    createdAt: 1675785959855, // timestamp in ms,
}

Supported file extensions may change. If you include any unsupported files order creation will fail.

Currently Supported files: 'apng', 'flac', 'gif', 'html', 'jpg','jpeg', 'mp3', 'pdf', 'png', 'svg', 'txt', 'wav', 'webm', 'webp', 'mp4', 'stl', 'glb', 'avif', 'yaml' , 'yml', 'asc', 'json', 'js', 'css', 'gz'

// Here's a sample payload you can POST to create an order with metadata
{
    "files": [
        {
            "size": 10,
            "type": "plain/text",
            "name": "my-text-inscription-file.txt",
            "dataURL": "data:plain/text;base64,dGVzdCBvcmRlcg==",
            "metadataDataURL": "data:application/json;base64,ewogICAgImluc2NyaWJlZF9ieSI6ICJPcmRpbmFsc0JvdCIKfQ==",
            "metadataSize": 37
        }
    ],
    "lowPostage": true,
    "receiveAddress": "",
    "fee": "11"
}

Last updated