Create NFT template

This endpoint allows you to create an NFT template which you can you to mint NFTs from. A more technical representation of the template is token type.

Endpoint: POST

Example

https://nft-api.venly.io/api/minter/contracts/{{contract_id}}/token-types

Body

{
    "name": "Chuck The Rooster",
    "description": "Chuck is a Male Tall Chicken Who is the Leader of The Chicken Siblings. He is Cool, Daring and Wacky. He can be Selfish and Stubborn When it Comes To Challenges, But he is An True Softie when it Comes To His Siblings. In Rebel to the Beak, It revealed that He is Allergic to Monstonuts and In The Good, The Bad and The Clucky, It also Revealed that He Used to Be one Of the Scouts from Slurp,s Little Cowboys Scout Camp along With Finley, Ainta and Hugo. He is the youngest of the three.",
    "image": "https://static.wikia.nocookie.net/parody/images/4/42/74915084_10162764640400387_6139958579186106368_o.jpg",
    "externalUrl": "https://en.wikipedia.org/wiki/Space_Chickens_in_Space",
    "backgroundColor": "#FFFFFF",
    "attributes": [
        {
            "type": "property",
            "name": "Talent",
            "value": "Leadership"
        }
    ]
}

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.

The creation of a token-type only creates a "template" for the NFT. It does not mint the actual NFT yet. To do this, you will need to call the mint function.

Minting the token immediately, while creating the token-type, is also possible. When you specify a destination in the request body of the POST /token-types, one or more tokens will immediately be minted:

{ 
   ...
   "destinations": [
      {
        "address": "string",
        "amount": 0
      }
    ]
    ...
}

Returns

{
    "id": 51,
    "confirmed": false,
    "name": "Chuck The Rooster",
    "description": "Chuck is a Male Tall Chicken Who is the Leader of The Chicken Siblings. He is Cool, Daring and Wacky. He can be Selfish and Stubborn When it Comes To Challenges, But he is An True Softie when it Comes To His Siblings. In Rebel to the Beak, It revealed that He is Allergic to Monstonuts and In The Good, The Bad and The Clucky, It also Revealed that He Used to Be one Of the Scouts from Slurp,s Little Cowboys Scout Camp along With Finley, Ainta and Hugo. He is the youngest of the three.",
    "fungible": false,
    "burnable": false,
    "externalUrl": "https://en.wikipedia.org/wiki/Space_Chickens_in_Space",
    "backgroundColor": "#FFFFFF",
    "image": "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",
    "imagePreview": "https://static.wikia.nocookie.net/parody/images/4/42/74915084_10162764640400387_6139958579186106368_o.jpg",
    "maxSupply": 25,
    "currentSupply": 0,
    "animationUrls": [
        {
            "type": "video",
            "value": "http://img.venly.io/chuck_trailer.mp4"
        },
        {
            "type": "audio",
            "value": "http://img.venly.io/chuck_soundtrack.mp3"
        }
    ],
    "attributes": [
        {
            "type": "property",
            "name": "Talent",
            "value": "Leadership"
        }
    ],
    "transactionHash": "0xec345e382121ff5372351257f1a48a0f550064f974bff01cf7557eb55700a79e"
}
pageCreateTokenTypeRequest

Last updated