SDK Components
API Key Usage
To use the API key:
Execute the specified commands.
Paste the generated API key in the “Your ChainGPT API key” placeholder.
Core Libraries
We provide TypeScript/ JavaScript libraries with support for Node.js. Install it by running:
Once installed, you can use the library and your secret key to run the following:
Advanced Features
ChainGPT NFT Generator SDK provides following features
1. Generate simple NFT
Request Params:
User’s wallet Address (String)
User’s Prompt (String)
Model name (String)
ChainGPT
RealMimic
Animatrix
PixelMaster
ThreeDImageForge
DrawDreamer
DrawDreamerV2’
AnimeVerse
RealVision
FantasyVerse
VisionaryForge
Note: You must have to select any of the model above.
2. Generate an NFT and queue the generation instead of waiting for it to complete
3. Check the creation progress of your NFT Generation
It's useful with the function: generateNftWithQueue(). It allows users to see the progress of their NFT generation. If users generate a huge amount of NFTs, they can always see how many NFTs are generated and remaining.
4. Retrieving the required data to mint the generated NFT
After generating the NFT, users can now mint the NFT on the chain using the code below. This chunk of code will provide the required data for minting the generated NFT
5. Retrieving the NFT Mint Factory Contract ABI to call the Mint function
Error Handling
When the library is unable to connect to the API, or if the API returns a non-success status code (i.e., 4xx or 5xx response), an error will be thrown:
Language/ Framework Compatibility.
Our SDK supports Javascript language and will run on Node applications.
Security Considerations
To ensure security, the SDK is made accessible using an authentication key. Users having credits in the web-app and a valid API key shall be able to access the SDK
Release Version
Release history is maintained. However, this is the first release; in the future, more features will be added, and the latest version will be released for users.
Code Documentation
Please check out this link for SDK code documentation
https://www.npmjs.com/package/@chaingpt/nft
Support/ Help
If you need further assistance, explore the available support channels provided on our website https://www.chaingpt.org/ or check our Discord.
Last updated