NFTRainbow
NFTRainbow 控制台GithubWhat's an NFT?
  • NFTRainbow - NFT 彩虹桥 🌈🌉🦄
  • Tutorials
    • Mints
      • 铸造NFT快速指南
    • Interactive Flowchart
    • By Community
      • NFTRainbow 使用教程
    • Account Solutions
    • Guides
      • 控制台合约代付设置
      • 元数据管理
      • Rainbow 铸造工具简介
  • Docs
    • FAQs
    • Changelog
    • RoadMap
    • Conflux Sponsor
    • Terminology
    • Prices
  • Products
    • Conflux RPC Bridge
    • ERC-6551
    • Web3 Services
  • API Reference
    • Open-API
      • Login
      • Files
      • Metadata
      • Contract
      • Mints
      • Transfers
      • Transaction
      • NFT
      • Burns
    • Swagger-Doc
    • Postman Collection
    • SDKs
      • Go-SDK
    • Common Errors
  • ABOUT THE APIs
    • Authentication
    • Error codes
    • Quotas and rate limits
Powered by GitBook
On this page
  1. API Reference
  2. Open-API

Mints

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

PreviousContractNextTransfers

Last updated 1 year ago

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 firstly. If the network is Conflux_test , needs to be called beforing minting.

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

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

{
    "chain": "conflux_test",
    "token_id": "123",
    "mint_to_address": "cfxtest:aasr1hmezez1wepvh8ew8sk9p40khhhj1ymxwmpaf0",
    "contract_address": "cfxtest:aca7psszv5pvak2hesk3e33m5yabkn3d5j2gzsmm5n",
    "metadata_uri": "https://www.baidu.com/img/PCtm_d9c8750bed0b3c7d089fa7d55720d6cf.png",
    "amount": 123
}
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

        {
            "id": 8109,
            "created_at": "2022-08-24T04:56:09.841Z",
            "updated_at": "2022-08-24T04:56:52.986Z",
            "deleted_at": null,
            "app_id": 2,
            "chain_type": 1,
            "chain_id": 1,
            "contract": "cfxtest:acgraybn1g1upesed09g96vxev79sdhmxjmz7bxzyy",
            "contract_type": 0,
            "tx_id": 8121,
            "hash": "0x5e8eafa9cf8fc52f3fb0d0810a86b5ac97ef23c3ba057bfa8a9f889907e65209",
            "status": 1,
            "error": "",
            "mint_to": "cfxtest:aar9up0wsbgtw7f0g5tyc4hbwb2wa5wf7emmk94znd",
            "token_id": "123",
            "amount": 1,
            "token_uri": "https://dev.nftrainbow.cn/assets/metadata/0/nft/0b7ba21ca161facbf392e8b275f2d62bbf78eb5302f13564415de85879b7cd7b.json",
            "mint_type": 0
        }
curl --request POST \
  --url https://api.nftrainbow.cn/v1/mints/ \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json' \ 
  --data-raw '{
    "chain": "conflux_test",
    "token_id": "123",
    "mint_to_address": "cfxtest:aasr1hmezez1wepvh8ew8sk9p40khhhj1ymxwmpaf0",
    "contract_address": "cfxtest:acgat1yux2rk0xmk2s8ceferyprgm0u1hetj0w72yf",
    "metadata_uri": "http://dev.nftrainbow/assets/metadata/0/nft/2dfd6b3add9d5154cf4ccef7a040f4c5c3c965ec5845bd11ca297e8550ac63ee.json",
    "amount": 1
}'

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.

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

body

string

{
    "chain": "conflux_test",
    "contract_address": "cfxtest:aceng286bm0xnu8s4wdf1xzdchgn0zxxapb1jj597t",
    "mint_items": [
        {
            "mint_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
            "metadata_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/10",
            "token_id":"10",
            "amount": 1
        },
        {
            "mint_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
            "metadata_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/11",
            "token_id":"11",
            "amount": 1
        },
        {
            "mint_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
            "metadata_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/12",
            "token_id":"12",
            "amount": 1
        }
    ]
}

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

[
    {
        "id": 8372,
        "created_at": "2022-09-28T07:54:53.602Z",
        "updated_at": "2022-09-28T07:54:53.602Z",
        "deleted_at": null,
        "app_id": 2,
        "chain_type": 1,
        "chain_id": 1,
        "contract": "cfxtest:acbf8taf6zzy99kncvu7d81vyavaz2ay5254ca3j7c",
        "contract_type": 1,
        "tx_id": 8474,
        "hash": "",
        "status": 0,
        "error": "",
        "mint_to": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
        "token_id": "1",
        "amount": 1,
        "token_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/10",
        "mint_type": 3
    },
    {
        "id": 8373,
        "created_at": "2022-09-28T07:54:53.602Z",
        "updated_at": "2022-09-28T07:54:53.602Z",
        "deleted_at": null,
        "app_id": 2,
        "chain_type": 1,
        "chain_id": 1,
        "contract": "cfxtest:acbf8taf6zzy99kncvu7d81vyavaz2ay5254ca3j7c",
        "contract_type": 1,
        "tx_id": 8474,
        "hash": "",
        "status": 0,
        "error": "",
        "mint_to": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
        "token_id": "22",
        "amount": 1,
        "token_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/11",
        "mint_type": 3
    },
    {
        "id": 8374,
        "created_at": "2022-09-28T07:54:53.602Z",
        "updated_at": "2022-09-28T07:54:53.602Z",
        "deleted_at": null,
        "app_id": 2,
        "chain_type": 1,
        "chain_id": 1,
        "contract": "cfxtest:acbf8taf6zzy99kncvu7d81vyavaz2ay5254ca3j7c",
        "contract_type": 1,
        "tx_id": 8474,
        "hash": "",
        "status": 0,
        "error": "",
        "mint_to": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
        "token_id": "23",
        "amount": 1,
        "token_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/12",
        "mint_type": 3
    }
]
curl --request POST \
  --url https://api.nftrainbow.cn/v1/mints/customizable/batch \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json' \ 
  --data-raw '{
    "chain": "conflux_test",
    "contract_address": "cfxtest:aceng286bm0xnu8s4wdf1xzdchgn0zxxapb1jj597t",
    "mint_items": [
        {
            "mint_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
            "metadata_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/10",
            "token_id":"10",
            "amount": 1
        },
        {
            "mint_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
            "metadata_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/11",
            "token_id":"11",
            "amount": 1
        },
        {
            "mint_to_address": "cfxtest:aam1eawbm9pzp0dnwv96tts5shnbdfv9nuwu7zgzz8",
            "metadata_uri": "https://live---metadata-5covpqijaa-uc.a.run.app/metadata/12",
            "token_id":"12",
            "amount": 1
        }
    ]
}'

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.

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

        {
            "id": 8109,
            "created_at": "2022-08-24T04:56:09.841Z",
            "updated_at": "2022-08-24T04:56:52.986Z",
            "deleted_at": null,
            "app_id": 2,
            "chain_type": 1,
            "chain_id": 1,
            "contract": "cfxtest:acgraybn1g1upesed09g96vxev79sdhmxjmz7bxzyy",
            "contract_type": 0,
            "tx_id": 8121,
            "hash": "0x5e8eafa9cf8fc52f3fb0d0810a86b5ac97ef23c3ba057bfa8a9f889907e65209",
            "status": 1,
            "error": "",
            "mint_to": "cfxtest:aar9up0wsbgtw7f0g5tyc4hbwb2wa5wf7emmk94znd",
            "token_id": "123",
            "amount": 1,
            "token_uri": "https://dev.nftrainbow.cn/assets/metadata/0/nft/0b7ba21ca161facbf392e8b275f2d62bbf78eb5302f13564415de85879b7cd7b.json",
            "mint_type": 0
        }
curl --request POST \
  --url https://api.nftrainbow.cn/v1/mints/easy/files \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: multipart/form-data' \
  --header 'content-type: multipart/form-data; boundary=---011000010111000001101001' \
  --form file= \
  --form chain= 'conflux_test' \
  --form description= 'throll description' \ 
  --form mint_to_address= 'cfxtest:aatk708nbb7573bkwumsu00h0r1rtkcdz2chwhttzk' \
  --form name= 'throll'

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.

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

body

string

{
    "chain": "conflux_test",
    "name": "123",
    "description": "123",
    "mint_to_address": "cfxtest:aasr1hmezez1wepvh8ew8sk9p40khhhj1ymxwmpaf0",
    "file_url": "http://dev.nftrainbow/assets/file/1/nft/67c96aee8ee1293594a4b4ded15c60ea7853e49c0a2eb41a4805a01a70bc3111.jpeg"
}
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

        {
            "id": 8109,
            "created_at": "2022-08-24T04:56:09.841Z",
            "updated_at": "2022-08-24T04:56:52.986Z",
            "deleted_at": null,
            "app_id": 2,
            "chain_type": 1,
            "chain_id": 1,
            "contract": "cfxtest:acgraybn1g1upesed09g96vxev79sdhmxjmz7bxzyy",
            "contract_type": 0,
            "tx_id": 8121,
            "hash": "0x5e8eafa9cf8fc52f3fb0d0810a86b5ac97ef23c3ba057bfa8a9f889907e65209",
            "status": 1,
            "error": "",
            "mint_to": "cfxtest:aar9up0wsbgtw7f0g5tyc4hbwb2wa5wf7emmk94znd",
            "token_id": "123",
            "amount": 1,
            "token_uri": "https://dev.nftrainbow.cn/assets/metadata/0/nft/0b7ba21ca161facbf392e8b275f2d62bbf78eb5302f13564415de85879b7cd7b.json",
            "mint_type": 0
        }
curl --request POST \
  --url https://api.nftrainbow.cn/v1/mints/easy/urls \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json' \
  --data-raw '{
    "chain": "conflux_test",
    "name": "123",
    "description": "123",
    "mint_to_address": "cfxtest:aasr1hmezez1wepvh8ew8sk9p40khhhj1ymxwmpaf0",
    "file_url": "http://dev.nftrainbow/assets/file/1/nft/67c96aee8ee1293594a4b4ded15c60ea7853e49c0a2eb41a4805a01a70bc3111.jpeg"
}'

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.

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

 {
        "count": 1,
        "items": [
            {
            "id": 8109,
            "created_at": "2022-08-24T04:56:09.841Z",
            "updated_at": "2022-08-24T04:56:52.986Z",
            "deleted_at": null,
            "app_id": 2,
            "chain_type": 1,
            "chain_id": 1,
            "contract": "cfxtest:acgraybn1g1upesed09g96vxev79sdhmxjmz7bxzyy",
            "contract_type": 0,
            "tx_id": 8121,
            "status": 1,
            "error": "",
            "mint_to": "cfxtest:aar9up0wsbgtw7f0g5tyc4hbwb2wa5wf7emmk94znd",
            "token_id": "",
            "amount": 1,
            "token_uri": "https://dev.nftrainbow.cn/assets/metadata/0/nft/0b7ba21ca161facbf392e8b275f2d62bbf78eb5302f13564415de85879b7cd7b.json",
            "mint_type": 0
            }
]
 
    }
curl --request GET \
  --url https://api.nftrainbow.cn/v1/mints/ \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json'

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.

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

{
    "id": 22,
    "created_at": "2022-08-16T15:14:04.737+08:00",
    "updated_at": "2022-08-16T15:14:40.78+08:00",
    "deleted_at": null,
    "app_id": 4,
    "chain_type": 1,
    "chain_id": 1,
    "contract": "cfxtest:acgraybn1g1upesed09g96vxev79sdhmxjmz7bxzyy",
    "contract_type": 0,
    "tx_id": 14,
    "hash": "0xb060076e19fc4c69fb5399faa2f8c63c0bb3179f54f069b164b84b7c312fef62",
    "status": 1,
    "error": "",
    "mint_to": "cfxtest:aajb342mw5kzad6pjjkdz0wxx0tr54nfwpbu6yaj49",
    "token_id": "14448",
    "amount": 1,
    "token_uri": "http://localhost:8080/assets/metadata/0/nft/2a4dc76844247c2ae927a1a67877e76b4f02f627a5b84667549fbad3d6f57250.json",
    "mint_type": 0
}
curl --request GET \
  --url https://api.nftrainbow.cn/v1/mints/{id} \
  --header 'Authorization: Bearer {JWT}' \
  --header 'Content-Type: application/json'

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

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

The base_uri in the

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

create metadata uri
upload file
upload file to oss
create metadata
deploy contract
deploy their own contract
set sponsor api

Obtain NFT list

get

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

Query parameters
pageintegerOptional

page

limitintegerOptional

limit

contractstringOptional

contract

mint_tostringOptional

mint_to

statusintegerOptional

status

chainstringOptional

chain

pageintegerOptional

page

limitintegerOptional

limit

contractstringOptional

contract

mint_tostringOptional

mint_to

statusintegerOptional

status

chainstringOptional

chain

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

AuthorizationstringRequired

Bearer Open_JWT

Responses
200
OK
application/json
500
Internal Server error
application/json
get
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"
    }
  ]
}

Mint NFT detail

get

Get NFT detail info

Path parameters
idintegerRequired

id

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
get
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"
}
  • Mint Actions
  • Mint NFT
  • POSTMint NFT
  • Batch Mint NFTs
  • POSTBatch Mint NFTs
  • Mint NFT with file
  • POSTMint NFT with file
  • Mint NFT with metadata
  • POSTMint NFT with metadata
  • Obtain Informations
  • Obtain NFT list
  • GETObtain NFT list
  • Query detailed NFT
  • GETMint NFT detail

Mint NFT

post

Mint a NFT by providing a metadata url

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
400
Invalid request
application/json
500
Internal Server error
application/json
post
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"
}

Batch Mint NFTs

post

Mint several NFTs once

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
chainstring · enumRequiredPossible values:
contract_addressstringRequired
Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
post
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"
  }
]

Mint NFT with file

post

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

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
chainstringRequired
descriptionstringRequired
mint_to_addressstringRequired
namestringRequired
filestringRequired

file

Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
post
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"
}

Mint NFT with metadata

post

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

Header parameters
AuthorizationstringRequired

Bearer Open_JWT

Body
animation_urlstringOptional
chainstringRequired
descriptionstringOptional
file_urlstringRequired
mint_to_addressstringRequired
namestringRequired
Responses
200
OK
application/json
400
Invalid request
application/json
500
Internal Server error
application/json
post
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"
}