For the complete documentation index, see llms.txt. This page is also available as Markdown.

Mints

The Mints APIs provide users the entries to mint the NFTs by calling the method in the ERC721 or ERC1155 contract.

Mint Actions

The Mints APIs provide three methods to help users mint NFTs, including the custom minting, minting with a file and minting with metadata.

Mint NFT

The Mint NFT provides users with the entry to call the ERC721 or ERC1155 contract to mint the NFT. Users need to deploy their own contract firstly. If the network is Conflux_test , set sponsor api needs to be called beforing minting.

Mint NFT

post
/v1/mints/

Mint a NFT by providing a metadata url

Authorizations
Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
amountintegerOptional
chainstring · enumRequiredPossible values:
contract_addressstringRequired
metadata_uristringOptional
mint_to_addressstringRequired
token_idstringOptional
Responses
200

OK

application/json
amountintegerOptional
app_idintegerOptional
block_reasoninteger · enumOptionalPossible values:
chain_idintegerOptional
chain_typeintegerOptional
contractstringOptional
contract_typeintegerOptional
created_atstringOptional
errorstringOptional
hashstringOptional
idintegerOptional
mint_tostringOptional
mint_typeintegerOptional
statusintegerOptional

0-pending, 1-success, 2-failed

token_idstringOptional
token_uristringOptional
tx_idintegerOptional
updated_atstringOptional
post/v1/mints/
POST /v1/mints/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 121

{
  "amount": 1,
  "chain": "conflux",
  "contract_address": "text",
  "metadata_uri": "text",
  "mint_to_address": "text",
  "token_id": "text"
}
{
  "amount": 1,
  "app_id": 1,
  "block_reason": 1,
  "chain_id": 1,
  "chain_type": 1,
  "contract": "text",
  "contract_type": 1,
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "error": "text",
  "hash": "text",
  "id": 1,
  "mint_to": "text",
  "mint_type": 1,
  "status": 1,
  "token_id": "text",
  "token_uri": "text",
  "tx_id": 1,
  "updated_at": "text"
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Type
Required
Default

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

body

string

random

chain

The chain type. The types include conflux and conflux_test

body

string

mint_to_address

The owner of the NFT

body

string

contract_address

The address of the contract

body

string

metadata_uri

The uri of the metadata. It can be created thorugh create metadata uri.

body

string

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

body

integer

1

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the contract

string

error

The error during executing tx

string

hash

The hash of the transaction

string

mint_to

The owner of the nft

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the token

string

token_uri

The uri of the token

string

tx_id

The id of the transaction

integer

mint_type

The type of the mint. 1-easyMint, 2-customMint, 3-customBatchMint

integer

The token_id is the number like "123", whose type is string

Batch Mint NFTs

The Batch Mint NFTs API provides users with the entry to call the ERC721 or ERC1155 contract to mint several NFTs once.

Batch Mint NFTs

post
/v1/mints/customizable/batch

Mint several NFTs once

Authorizations
Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
chainstring · enumRequiredPossible values:
contract_addressstringRequired
Responses
200

OK

application/json
amountintegerOptional
app_idintegerOptional
block_reasoninteger · enumOptionalPossible values:
chain_idintegerOptional
chain_typeintegerOptional
contractstringOptional
contract_typeintegerOptional
created_atstringOptional
errorstringOptional
hashstringOptional
idintegerOptional
mint_tostringOptional
mint_typeintegerOptional
statusintegerOptional

0-pending, 1-success, 2-failed

token_idstringOptional
token_uristringOptional
tx_idintegerOptional
updated_atstringOptional
post/v1/mints/customizable/batch
POST /v1/mints/customizable/batch HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 138

{
  "chain": "conflux",
  "contract_address": "text",
  "mint_items": [
    {
      "amount": 1,
      "metadata_uri": "text",
      "mint_to_address": "text",
      "token_id": "text"
    }
  ]
}
[
  {
    "amount": 1,
    "app_id": 1,
    "block_reason": 1,
    "chain_id": 1,
    "chain_type": 1,
    "contract": "text",
    "contract_type": 1,
    "created_at": "text",
    "deleted_at": {
      "time": "text",
      "valid": true
    },
    "error": "text",
    "hash": "text",
    "id": 1,
    "mint_to": "text",
    "mint_type": 1,
    "status": 1,
    "token_id": "text",
    "token_uri": "text",
    "tx_id": 1,
    "updated_at": "text"
  }
]
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Type
Required
Default

chain

The chain type. The types include conflux and conflux_test

body

string

contract_address

The address of the contract

body

string

mint_items

The mint tasks

body

The array of the MintItemDto

The MintItemDto construct is presented in the following.

Name
Meaning
Param Type
Type
Required
Default

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

body

string

The radom value between 1 and 10

mint_to_address

The owner of the NFT

body

string

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

body

integer

1

metadata_uri

The uri of the metadata. This uri can be generated through create metadata

body

string

The base_uri in the deploy contract

The response is the array of MintTask construct.

The MintTask construct is showed in the following.

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

app_id

The id of the app

integer

chain_type

The type of the chain. 1-CFX, 2-ETH.

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

contract

The address of the contract

string

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

mint_to

The address of the owner

string

token_uri

The uri of the token

string

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

string

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

integer

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

hash

The hash of the transaction

string

tx_id

The id of the transaction

integer

error

The error during executing the transaction

string

mint_type

The type of minting. 1-easyMinting 2-customMinting 3-BatchcustomMinting

integer

Mint NFT with file

The Mint NFT with file API provides users with the entry to call the ERC721 or ERC1155 contract to mint the NFT with uploading files. The uploaded files can be images, video and so on.

Mint NFT with file

post
/v1/mints/easy/files

Mint a NFT by uploading a file which can be a video, image and so on

Authorizations
Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
chainstringRequired
descriptionstringRequired
mint_to_addressstringRequired
namestringRequired
filestringRequired

file

Responses
200

OK

application/json
amountintegerOptional
app_idintegerOptional
block_reasoninteger · enumOptionalPossible values:
chain_idintegerOptional
chain_typeintegerOptional
contractstringOptional
contract_typeintegerOptional
created_atstringOptional
errorstringOptional
hashstringOptional
idintegerOptional
mint_tostringOptional
mint_typeintegerOptional
statusintegerOptional

0-pending, 1-success, 2-failed

token_idstringOptional
token_uristringOptional
tx_idintegerOptional
updated_atstringOptional
post/v1/mints/easy/files
POST /v1/mints/easy/files HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: multipart/form-data
Accept: */*
Content-Length: 90

{
  "chain": "text",
  "description": "text",
  "mint_to_address": "text",
  "name": "text",
  "file": "text"
}
{
  "amount": 1,
  "app_id": 1,
  "block_reason": 1,
  "chain_id": 1,
  "chain_type": 1,
  "contract": "text",
  "contract_type": 1,
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "error": "text",
  "hash": "text",
  "id": 1,
  "mint_to": "text",
  "mint_type": 1,
  "status": 1,
  "token_id": "text",
  "token_uri": "text",
  "tx_id": 1,
  "updated_at": "text"
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Type
Required

name

The name of the NFT

body

string

chain

The chain type. The types include conflux and conflux_test

body

string

mint_to_address

The owner of the NFT

body

string

description

The description of the NFT

body

string

file

The uploaded file

formData

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the contract.

string

error

The error during executing tx

string

hash

The hash of the transaction

string

mint_to

The owner of the nft

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

string

token_uri

The uri of the token

string

tx_id

The id of the transaction

integer

mint_type

The type of the mint. 1-easyMint, 2-customMint, 3-customBatchMint

integer

Mint NFT with metadata

The Mint NFT with metadata provides users with the entry to call the ERC721 or ERC1155 contract to mint the NFT with creating metadata by providing a file url.

Mint NFT with metadata

post
/v1/mints/easy/urls

Mint a NFT by providing a file url to create the metadata

Authorizations
Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
animation_urlstringOptional
chainstringRequired
descriptionstringOptional
file_urlstringRequired
mint_to_addressstringRequired
namestringRequired
Responses
200

OK

application/json
amountintegerOptional
app_idintegerOptional
block_reasoninteger · enumOptionalPossible values:
chain_idintegerOptional
chain_typeintegerOptional
contractstringOptional
contract_typeintegerOptional
created_atstringOptional
errorstringOptional
hashstringOptional
idintegerOptional
mint_tostringOptional
mint_typeintegerOptional
statusintegerOptional

0-pending, 1-success, 2-failed

token_idstringOptional
token_uristringOptional
tx_idintegerOptional
updated_atstringOptional
post/v1/mints/easy/urls
POST /v1/mints/easy/urls HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/json
Accept: */*
Content-Length: 215

{
  "animation_url": "text",
  "attributes": [
    {
      "attribute_name": "text",
      "display_type": "text",
      "trait_type": "text",
      "value": "text"
    }
  ],
  "chain": "text",
  "description": "text",
  "file_url": "text",
  "mint_to_address": "text",
  "name": "text"
}
{
  "amount": 1,
  "app_id": 1,
  "block_reason": 1,
  "chain_id": 1,
  "chain_type": 1,
  "contract": "text",
  "contract_type": 1,
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "error": "text",
  "hash": "text",
  "id": 1,
  "mint_to": "text",
  "mint_type": 1,
  "status": 1,
  "token_id": "text",
  "token_uri": "text",
  "tx_id": 1,
  "updated_at": "text"
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Type
Required

name

The name of the nft

body

string

chain

The chain type. The types include conflux and conflux_test

body

string

mint_to_address

The owner of the NFT

body

string

description

The description of the NFT

body

string

file_url

The url of the file, which can be generated through upload file or upload file to oss

body

string

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract

integer

contract

The address of the contract

string

error

The error during executing tx

string

hash

The hash of the transaction

string

mint_to

The owner of the nft

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

string

token_uri

The uri of the token

string

tx_id

The id of the transaction

integer

mint_type

The type of the mint. 1-easyMint, 2-customMint, 3-customBatchMint

integer

Obtain Informations

Obtain NFT list

The Obtain NFT list API provides users with the entry to query the NFTs information created on a spcific app.

Obtain NFT list

get
/v1/mints/

Get the NFT list containing the NFTs minted in the specified app Get the NFT list containing the NFTs minted in the specified app

Authorizations
Query parameters
pageintegerOptional

page

limitintegerOptional

limit

contractstringOptional

contract

mint_tostringOptional

mint_to

statusintegerOptional

status

chainstringOptional

chain

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Responses
200

OK

application/json
countintegerOptional
get/v1/mints/
GET /v1/mints/ HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "count": 1,
  "items": [
    {
      "amount": 1,
      "app_id": 1,
      "block_reason": 1,
      "chain_id": 1,
      "chain_type": 1,
      "contract": "text",
      "contract_type": 1,
      "created_at": "text",
      "deleted_at": {
        "time": "text",
        "valid": true
      },
      "error": "text",
      "hash": "text",
      "id": 1,
      "mint_to": "text",
      "mint_type": 1,
      "status": 1,
      "token_id": "text",
      "token_uri": "text",
      "tx_id": 1,
      "updated_at": "text"
    }
  ]
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Data Type
Required
Default

page

Page Query

query

integer

1

limit

Page Query

query

integer

10

contract

contract address

query

string

mint_to

owner of NFTs

query

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

query

integer

-1

chain

The chain type including conflux and conflux_test

query

string

Name
Meaning
Type

count

The number of the minted NFTs

integer

items

The nfts information

[]MintTask

The MintTask Struct is listed as follow:

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the contract

string

error

The error during executing tx

string

hash

The hash of the transaction

string

mint_to

The owner of the nft

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

string

token_uri

The uri of the token

string

tx_id

The id of the transaction

integer

mint_type

The type of the mint. 1-easyMint, 2-customMint, 3-customBatchMint

integer

Query detailed NFT

The Query detailed NFT API provides users with the entry to query the detailed NFT information created on a specific app according to the NFT's id.

Mint NFT detail

get
/v1/mints/{id}

Get NFT detail info

Authorizations
Path parameters
idintegerRequired

id

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Responses
200

OK

application/json
amountintegerOptional
app_idintegerOptional
block_reasoninteger · enumOptionalPossible values:
chain_idintegerOptional
chain_typeintegerOptional
contractstringOptional
contract_typeintegerOptional
created_atstringOptional
errorstringOptional
hashstringOptional
idintegerOptional
mint_tostringOptional
mint_typeintegerOptional
statusintegerOptional

0-pending, 1-success, 2-failed

token_idstringOptional
token_uristringOptional
tx_idintegerOptional
updated_atstringOptional
get/v1/mints/{id}
GET /v1/mints/{id} HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Accept: */*
{
  "amount": 1,
  "app_id": 1,
  "block_reason": 1,
  "chain_id": 1,
  "chain_type": 1,
  "contract": "text",
  "contract_type": 1,
  "created_at": "text",
  "deleted_at": {
    "time": "text",
    "valid": true
  },
  "error": "text",
  "hash": "text",
  "id": 1,
  "mint_to": "text",
  "mint_type": 1,
  "status": 1,
  "token_id": "text",
  "token_uri": "text",
  "tx_id": 1,
  "updated_at": "text"
}
Name
Meaning
Param Type
Data Type

Authorization

Bearer Token

Header

string

Name
Meaning
Param Type
Data Type
Required

id

NFT id

path

integer

Name
Meaning
Type

created_at

The time of creating the item in the database

string

updated_at

The time of updating the item in the database

string

deleted_at

The time of deleting the item in the database

string

id

The id of the item in the database

integer

amount

The amount of the minted NFTs. For ERC721 contract, this field must be 1. For ERC1155 contract, this field can be greater than 0.

integer

app_id

The id of the app

integer

chain_id

The id of the chain. 1029-mainnet, 1-testnet

integer

chain_type

The type of the chain. 1-CFX, 2-ETH

integer

contract_type

The type of the contract. 1-ERC721, 2-ERC1155

integer

contract

The address of the contract

string

error

The error during executing tx

string

hash

The hash of the transaction

string

mint_to

The owner of the nft

string

status

The status of the transaction. 0-pending, 1-success, 2-failed

integer

token_id

The id of the NFT, which will be generated randomly if the field in the request is null.

string

token_uri

The uri of the token

string

tx_id

The id of the transaction

integer

mint_type

The type of the mint. 1-easyMint, 2-customMint, 3-customBatchMint

integer

Last updated