These docs are for v2.0. Click to read the latest docs for v3.0.

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/v2/token-types/creations

Request Body:

ParameterDescriptionTypeRequired
secretTypeThe blockchain of the contractString
contractAddressThe contract address under which you want to create the token-typeString
creationsAn array of objects that can define one or multiple token-type detailsArray of objects
creations.nameThe name of the token-typeString
creations.descriptionThe description of the token-typeString
creations.imageThe image URL for the token-type that will be displayedString
{
  "secretType": "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
        }
      }
    ]
  }
}

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.