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

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

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
post
/v1/mints/easy/files
POST /v1/mints/easy/files HTTP/1.1
Host: api.nftrainbow.cn
Authorization: text
Content-Type: application/x-www-form-urlencoded
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

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

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

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

Last updated