This API endpoint allows you to retrieve metadata for a specific NFT based on the contractId and nftTokenId. It also supports optional parameters for token ID formatting.
Endpoint Details
Description
Data
API Name
HTTP Method
GET
URL
/v1/nft/metadata
Headers
Key
Value
Content-Type
application/json
x-api-key
API_KEY
Query Parameters
Parameter
Type
Description
contractId
string
Contract ID to get metadata for
nftTokenId
string
the smart contract that the NFT belongs to (See the note above)
tokenIdFormat
string, optional
NFT token id format. Possible values decimal or hex. Defaults to decimal if it is not specified.
As a prerequisite, you must have one or more NFT contracts that can be managed by your account (see getAccountContracts.
The response will contain the metadata of the specified NFT.
{"result": {"traits": [ {"displayType":"number","traitType":"Member Since","value":2023 }, {"displayType":"string","traitType":"Member Tier","value":"Pearl" } ],"name":"SMOOTH Pass","description":"This pass is your key to unlock rewards and more through Smooth's cutting-edge loyalty platform","imageUrl":"https://assets.nft.zelus.io/Smooth-Collectibles-dev/1/image1.png","imageMimeType":"image/png","externalUrl":"https://zelus.io" }}
Error Messages
Incorrect or missing contractId
{ "code": 400, "message": "Contract not found" }
Missing nftTokenId or invalid format based on tokenIdFormat