post https://api.nftport.xyz/v0/mints/easy/files
With Easy mint, you can turn anything into an NFT in less than 5 minutes using one simple API call. If you are new to minting, see Easy minting quickstart.
After minting, the NFT will appear in the mint_to_address
wallet. If you minted to your own wallet, you can also see the minted NFT on OpenSea in your profile after a few minutes.
You can mint up to 100 NFTs for free per chain. Maximum supported file size is 50MB. For higher limits, see pricing.
Useful for:
- For turning anything into an NFT effortlessly. For all the benefits, see Your New Minting Superpowers.
Related:
- If you wish to customize the minting process e.g. use your own contract, see Customizable minting.
- If you wish to list all your previously minted NFTs, see List all your minted NFTs.
Example Requests in cURL, Python & JS
curl --request POST \
--url 'https://api.nftport.xyz/v0/mints/easy/files?chain=polygon&name=NFT_Name&description=NFT_Description&mint_to_address=0x...' \
--header 'Authorization: API Key Here' \
--header 'Content-Type: multipart/form-data' \
--form 'file=@/path/to/file_to_upload.png;type=image/png'
import requests
file = open("image.png", "rb")
query_params = {
"chain": "polygon",
"name": "NFT_Name",
"description": "NFT_Description",
"mint_to_address": Wallet_Address
}
response = requests.post(
"https://api.nftport.xyz/v0/mints/easy/files",
headers={"Authorization": "API-Key-Here"},
params=query_params,
files={"file": file}
)
const fs = require('fs');
const fetch = require('node-fetch');
const FormData = require('form-data');
const form = new FormData();
const fileStream = fs.createReadStream('/path/to/file_to_upload.png');
form.append('file', fileStream);
const options = {
method: 'POST',
body: form,
headers: {
"Authorization": "API-Key-Here",
},
};
fetch("https://api.nftport.xyz/v0/mints/easy/files?" + new URLSearchParams({
chain: 'polygon',
name: "NFT_Name",
description: "NFT_Description",
mint_to_address: "Wallet_Address",
}), options)
.then(function(response) { return response.json() })
.then(function(responseJson) {
// Handle the response
console.log(responseJson);
})