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

How to add Video to your NFTs

This page explains how you can add videos to your NFTs.

Add Videos to NFTs

In this guide, we will look into how you can add a video or multiple videos to your NFTs, Note that adding the videos will happen during the creation of the token-type (NFT tenplate).

πŸ“˜

Prerequisites

  1. You already have an NFT collection (contract) created using the NFT-API. Click here to view the getting started guide if you haven't.
  2. Contract ID (Can be found in the response body of the create contract endpoint)

Request Endpoint: reference

POST /api/minter/contracts/{contractId}/token-types

{contractId}: This is the contract ID which can be found in the response body of the create contract endpoint.

Example Request

We will use the create token-type endpoint and within the request body, we will specify the animationUrls array.

POST /api/minter/contracts/57584/token-types

Request Body

πŸ“˜

  • At the very end, in the animationUrls array, we have defined the object with type: video and its value(The URL of the video address).
  • You can add multiple objects within the animationUrls array with images, videos, and even audio.
  • Click here to read more about animationUrls.
{
  "name" : "NFT with a video",
  "description" : "This NFT has a video",
  "image": "https://static.scientificamerican.com/sciam/cache/file/C91AC5AA-1F28-41E7-8E40EC59E66937D8_source.jpg?w=590&h=800&2113BA5E-A58F-4A28-ABDD0BE5C759F5B6",
  "externalUrl" : "www.venly.io",
  "animationUrls" : [
      {
        "type": "video", 
       "value" : "https://player.vimeo.com/external/314181352.sd.mp4?s=d2cd7a37f6250cd543e6d13209730b4bcf242130&profile_id=164&oauth2_token_id=57447761"
      }
  ]
}

Response Body

πŸ“˜

The token-type was created successfully with a video included.

{
    "id": 234,
    "confirmed": false,
    "status": "SUCCEEDED",
    "name": "NFT with a video",
    "description": "This NFT has a video",
    "fungible": false,
    "burnable": false,
    "externalUrl": "www.venly.io",
    "image": "https://static.scientificamerican.com/sciam/cache/file/C91AC5AA-1F28-41E7-8E40EC59E66937D8_source.jpg?w=590&h=800&2113BA5E-A58F-4A28-ABDD0BE5C759F5B6",
    "imageThumbnail": "https://static.scientificamerican.com/sciam/cache/file/C91AC5AA-1F28-41E7-8E40EC59E66937D8_source.jpg?w=590&h=800&2113BA5E-A58F-4A28-ABDD0BE5C759F5B6",
    "imagePreview": "https://static.scientificamerican.com/sciam/cache/file/C91AC5AA-1F28-41E7-8E40EC59E66937D8_source.jpg?w=590&h=800&2113BA5E-A58F-4A28-ABDD0BE5C759F5B6",
    "currentSupply": 0,
    "pendingSupply": 0,
    "animationUrls": [
        {
            "type": "video",
            "value": "https://player.vimeo.com/external/314181352.sd.mp4?s=d2cd7a37f6250cd543e6d13209730b4bcf242130&profile_id=164&oauth2_token_id=57447761"
        }
    ],
    "attributes": [],
    "transactionHash": "0x4698d8ab71869c73b53ec585b91a363a84b5fd7229882719cafd7d3497a05c8f",
    "storage": {
        "type": "cloud",
        "location": "https://metadata-staging.arkane.network/metadata/contracts/57584/tokens/{id}"
    }
}

NFT Minted Preview

Here is how the minted NFT will look like with a video added:

NFT with a video

NFT with a video