Use NFT Express to Mint NFTs on Algorand
NFT Express uses the same simple API endpoint that you would use to mint NFTs for your own smart contracts with Tatum.
However, with NFT Express you no longer need to enter the following:
- Private key
- Smart contract address
- Token ID
This guide explains how to use NFT Express to mint NFTs specifically on Algorand. To learn how to use NFT Express on other blockchains:
When used on the mainnet, NFT Express works only with paid Tatum plans. Tatum covers the minting fee for you and then deducts the corresponding number of credits from your monthly credit allowance.
To use NFT Express, you need an API key with a paid Tatum plan. Visit the Tatum Dashboard to sign up for one.
You must enter the API key in the environment variables in your IDE or into the header of the direct API request.
Minting NFTs on Algorand is a two-step process:
- 1.You mint an NFT.
- 2.You transfer the NFT upon the recipient's approval.
This is because Algorand charges users for storing NFTs on their addresses and an Algorand blockchain address by default does not receive NFTs unless the owner of the address explicitly agrees to receiving an NFT.
Enter the API key in the environment variables in your IDE or into the header of the direct API request.
Request
JavaScript
cURL
const resp = await fetch(
`https://api.tatum.io/v3/nft/mint`,
{
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-api-key': 'YOUR_API_KEY_HERE'
},
body: JSON.stringify({
chain: 'ALGO',
url: 'https://my_token_data.com',
name: 'My Crazy NFT',
attr: {
assetUnit: 'USDT',
clawback: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
manager: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
reserve: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
freeze: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4'
}
})
}
);
curl -i -X POST \
https://api.tatum.io/v3/nft/mint \
-H 'Content-Type: application/json' \
-H 'x-api-key: YOUR_API_KEY_HERE' \
-d '{
"chain": "ALGO",
"url": "https://my_token_data.com",
"name": "My Crazy NFT",
"attr": {
"assetUnit": "USDT",
"clawback": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
"manager": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
"reserve": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
"freeze": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4"
}
}'
Request parameters:
- chain ALGO for Algorand in this specific case.
- name The name of the minted NFT.
- attr Attributes
- assetUnit The name of the minted NFT unit.
- clawback The address of the clawback account.
- manager The address of the manager account.
- reserve The address of the reserve account.
- freeze The address of the freeze account.
What happens on the background?
- The private key and contract address will be by default set to Tatum’s pre-deployed smart contract and our private key on the blockchain that you specified.
- The gas fees will be deducted as credits from your monthly credit allowance from the paid Tatum plan you have selected.
You can mint as many NFTs as you want without devising the logic and setting up your own NFT solution.
An NFT that you mint on Algorand is automatically transferred to your blockchain address. After the NFT is minted, you have to transfer it to the recipient's address. The recipient has to agree in advance to receive your NFT (by default, Algorand charges users for storing NFTs on their addresses which, by default, does not receive NFTs unless agreed).
Step 1
The recipient agrees to receive the NFT. Recipient enables accepting assets on an Algorand address using the
mintNftExpressAlgorand
schema:Request
JavaScript
cURL
1
const resp = await fetch(
2
`https://api.tatum.io/v3/algorand/asset/receive`,
3
{
4
method: 'POST',
5
headers: {
6
'Content-Type': 'application/json',
7
'x-api-key': 'YOUR_API_KEY_HERE'
8
},
9
body: JSON.stringify({
10
assetId: '116363571',
11
fromPrivateKey: '72TCV5BRQPBMSAFPYO3CPWVDBYWNGAYNMTW5QHENOMQF7I6QLNMJWCJZ7A3V5YKD7QD6ZZPEHG2PV2ZVVEDDO6BCRGXWIL3DIUMSUCI'
12
})
13
}
14
);
15
16
const data = await resp.json();
17
console.log(data);
1
curl -i -X POST \
2
https://api.tatum.io/v3/algorand/asset/receive \
3
-H 'Content-Type: application/json' \
4
-H 'x-api-key: YOUR_API_KEY_HERE' \
5
-d '{
6
"assetId": "116363571",
7
"fromPrivateKey": "72TCV5BRQPBMSAFPYO3CPWVDBYWNGAYNMTW5QHENOMQF7I6QLNMJWCJZ7A3V5YKD7QD6ZZPEHG2PV2ZVVEDDO6BCRGXWIL3DIUMSUCI"
8
}'
Step 2
JavaScript
cURL
1
const resp = await fetch(
2
`https://api.tatum.io/v3/nft/transaction`,
3
{
4
method: 'POST',
5
headers: {
6
'Content-Type': 'application/json',
7
'x-api-key': 'YOUR_API_KEY_HERE'
8
},
9
body: JSON.stringify({
10
chain: 'ALGO',
11
to: 'TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4',
12
contractAddress: '100000'
13
})
14
}
15
);
16
17
const data = await resp.json();
18
console.log(data);
1
curl -i -X POST \
2
https://api.tatum.io/v3/nft/transaction \
3
-H 'Content-Type: application/json' \
4
-H 'x-api-key: YOUR_API_KEY_HERE' \
5
-d '{
6
"chain": "ALGO",
7
"to": "TMETT6BXL3QUH7AH5TS6IONU7LVTLKIGG54CFCNPMQXWGRIZFIESZBYWP4",
8
"contractAddress": "100000"
9
}'
On the mainnet, Tatum covers your transaction fees for the NFT transfer and pays for them from its own blockchain address. Then, the fee amount paid by Tatum is converted to the number of credits, and these credits are deducted from the monthly credit allowance of your paid pricing plan. On the testnet, no credits are deducted from the monthly credit allowance.