Create Token-type (NFT template)
This page explains how to create an NFT template (token-type).
This endpoint allows you to create an NFT template which you can use to mint NFTs from. A more technical representation of the template is the token type.
This means you just have to define the NFT template once with parameters like its name
, image
, and description
. Using this token-type you can mint multiple NFTs.
Request Endpoint: reference
POST /api/v3/erc1155/token-types/creations
Request Body:
Parameter | Description | Type | Required |
---|---|---|---|
chain | The blockchain of the contract | String | ✅ |
contractAddress | The contract address under which you want to create the token-type | String | ✅ |
creations | An array of objects that can define one or multiple token-type details | Array of objects | ✅ |
creations.name | The name of the token-type | String | ✅ |
creations.description | The description of the token-type | String | ❌ |
creations.image | The image URL for the token-type that will be displayed | String | ❌ |
{
"chain": "MATIC",
"contractAddress": "0xf5b11b4f458cc12a7989a146c5db2e7d500e2241",
"creations": [
{
"name": "My first NFT Token-type",
"description": "Venly",
"image": "https://static.wikia.nocookie.net/parody/images/4/42/74915084_10162764640400387_6139958579186106368_o.jpg"
}
]
}
Response Body:
- Save the
result.creations.id
from the response body. This is the token-type Creation ID and it's used to track the status of the token-type creation request.- The
status
attribute indicates the token-type creation status.
{
"success": true,
"result": {
"creations": [
{
"id": "45cf858a-cb0d-4e31-b6e1-b3bf4c65d014",
"status": "PENDING",
"tokenTypeId": 5,
"metadata": {
"name": "My first NFT Token-type",
"description": "Venly",
"image": "https://static.wikia.nocookie.net/parody/images/4/42/74915084_10162764640400387_6139958579186106368_o.jpg",
"imagePreview": "https://static.wikia.nocookie.net/parody/images/4/42/74915084_10162764640400387_6139958579186106368_o.jpg",
"imageThumbnail": "https://static.wikia.nocookie.net/parody/images/4/42/74915084_10162764640400387_6139958579186106368_o.jpg",
"animationUrls": [],
"attributes": [
{
"type": "system",
"name": "tokenTypeId",
"value": "5",
"traitType": "Token Type ID",
"trait_type": "Token Type ID"
}
],
"contract": {
"address": "0xf5b11b4f458cc12a7989a146c5db2e7d500e2241",
"name": "Test",
"symbol": "TE",
"image": "string",
"imageUrl": "string",
"image_url": "string",
"description": "Testing",
"externalLink": "www.venly.io",
"external_link": "www.venly.io",
"externalUrl": "www.venly.io",
"external_url": "www.venly.io",
"media": [],
"type": "ERC_1155"
},
"fungible": false
}
}
]
}
}
Updated 3 months ago
What’s Next
Venly offers more complex NFT configurations, such as setting a max supply, adding mint numbers, and IPFS storage.
For a full overview please check out NFT Configuration.