Creating NFTs
Last updated
Last updated
To create NFT content in a no-code manner, use the Niftory Admin Portal -- the same place you got your API keys from. Follow this guide for reference.
To create NFT content using the API, follow the steps below:
If not already done so, create an NFTSet using the createNFTSet
API.
Example args:
There are two ways to upload content for your NFT. In both cases, Niftory provides you with pre-signed URLs to upload NFT content to.
Once you upload content to the pre-signed URL, by default Niftory automatically schedules upload to IPFS asynchronously.
This API creates an NFTContent object in the database, and sets the URL's to pre-signed URLs that you can upload a file and a corresponding poster to.
This gives a bit more control on what to upload. For e.g, if you just want to upload a file, but no corresponding poster, then this API is a good way to do that.
You can also use this to just upload files without scheduling an IPFS upload. That can be achieved as follows:
You can upload the files asynchronously. That is, you can continue on to create an NFTModel before actually uploading the file.
Finally, use the id of the NFTSet you created, as well as the id of the NFTContent to create an NFTModel:
And voila, you have your NFTModel!