The Contract API provides a comprehensive suite of tools and features for developers to streamline the creation, management, and distribution of NFTs.
The Alpha Engine Contract API offers you a set of endpoints that allows you to manage your own collection of standardized blockchain NFTs. You can create collections (contracts) and create cool NFTs with pictures and animations on different blockchains. Plus, you can send these NFTs straight to your users' wallets.
You also have the ability to mint dynamic NFTs. Gone are the days of static, unchanging digital assets; now, creators can infuse their NFTs with dynamic elements that evolve, respond to external triggers, and provide an entirely new level of engagement for collectors and end-users.
Features | Description |
---|---|
Minting Service | It offers the functionality to instantly mint and transfer NFTs directly to your users' wallets. This streamlines the NFT distribution process. |
Token Standard | For Smart Contract (Collection) creation we support ERC-721 standard. |
Customized NFTs | You can specify metadata and attributes for each NFT, enabling you to provide additional information and customization for your NFTs. |
Integration with other Marketplaces | The NFTs minted through this API can be seamlessly integrated with various NFT marketplaces, decentralized applications (dApps), and other blockchain-based services, thanks to adherence to established token standards (ERC-721). |
To get started, you need an API key, which serves as your access token to Alpha Engine's APIs.
In this guide we will explain how to creating your first NFT. We will walk you through several endpoints to help you get started. We will cover the following topics:
You need an API key, which serves as your access token to Alpha Engine's APIs.
Let's start by defining your first contract. This contract will represent a collection for the NFTs. We will create a contract on the Polygon (MATIC) testnet chain.
1POST {{BASE_URL}}/contracts
Parameter | Description | Type | Required |
---|---|---|---|
name | The name of your NFT collection / contract | String | YES |
symbol | Unique short-key assigned to a contract on blockchain | String | YES |
chain | This is the blockchain on which you want to create the contract on | String | YES |
Example:
1{ 2 "name": "Alpha Launch", 3 "symbol" : "ATL", 4 "chain" : "polygonMumbai" 5}
After creating your first contract, save the id we will use it later in the guide.
Note: Smart contract deployment notifications will be sent through a webhook which includes the contract address.
Now, you will need to upload the token image to alpha-vault that will be used to store the asset images just like an IPFS storage.
1POST {{BASE_URL}}/files
Parameter | Description | Type | Required |
---|---|---|---|
file | image / png that will serve as an asset. | File | YES |
Response:
1{ 2 "success": true, 3 "responseStatus": "OK", 4 "message": "Request processed successfully.", 5 "data": { 6 "key": "nft-origin/1702547453128-01HHKVRX68Y737T08F0EW69XXD.png", 7 "mimetype": "image/png", 8 "src": "https://alphatrend-marketplace-development.s3.us-east-2.amazonaws.com/nft-origin/1702547453128-01HHKVRX68Y737T08F0EW69XXD.png", 9 "size": 953470, 10 "organization": "your_organization_id", 11 "_id": "657acffd3c98dbaed41d5816", 12 "createdAt": "2023-10-10T09:50:53.286Z", 13 "updatedAt": "2023-10-10T09:50:53.286Z", 14 "__v": 0 15 } 16}
Now let's create the token for the image you just uploaded.
To create new token, use the following endpoint. Enter the id (image_id) of your asset image and execute the request. This will create a new token in draft mode.
Note: Tokens get listed on the blockchain upon minting not before so you can safely able to delete as well.
1POST {{BASE_URL}}/tokens
Parameter | Description | Type | Required |
---|---|---|---|
name | The name of the token-type | String | YES |
description | The description of the token-type | String | YES |
image | The file id for the token image asset uploaded | String | YES |
contract | Contract ID for which this token is created | String | YES |
attributes | array with json pair of ( trait_type, value ) | Array | NO |
creator_name | Name of the token creator | String | NO |
creator_image_url | Creator Image File ID | String | NO |
1{ 2 "name": "Legend #12", 3 "description": "legend token description", 4 "image": "{{file}}", 5 "attributes": [ 6 { 7 "trait_type": "Popularity", 8 "value": "85%" 9 } 10 ], 11 "contract": "{{contract}}" 12}
The last step is the actual minting of the tokens. These create a token on the blockchain, using the template (token-type) defined in the previous step.
When minting a token, you can immediately provide a destination. The freshly created tokens will be immediately sent to the requested destination.
( 🎉 ) state-of-art tech our batch-mint endpoint
1{{BASE_URL}}/tokens/batch-mint
Parameter | Description | Type | Required |
---|---|---|---|
contract | Contract ID for which this token is created | String | YES |
wallet_address | destination wallet address for minting | String | YES |
tokens | Set of Token IDS | Array | YES |
1{ 2 "contract": "{{contract}}", 3 "wallet_address": "{{destination_wallet_Address}}", 4 "tokens": [ 5 "{{token_id_1}}", 6 "{{token_id_2}}" 7 ] 8}
Happy Coding !!