Metadata API

Download OpenAPI specification:Download

Introduction

The Metadata API helps BApp (Blockchain Application) developers to manage assets and metadata for their tokens.

Asset and metadata are used when you mint Klaytn's KIP-17 Tokens (NFTs), KIP-37 Tokens (MTs).

An asset refers to an image or a video file of an NFT or MT. When you mint an NFT or MT, you first have to upload the asset and include the returned asset URI in the metadata when minting the token. Metadata originally refers to "data of data". In the context of NFTs or MTs, it refers to the properties (name, description, image URL etc.) of the tokens. It is stored in JSON format.

Metadata API enables you to do the following actions:

  • upload assets
  • upload metadata
  • provide an externally accessible URI for the assets and metadata

Error Code

This section contains the errors that might occur when using Metadata API. KAS uses HTTP status codes. Error code tables can be found here.

Authentication

basic

KAS uses Basic HTTP Auth. All requests must have a correct Authorization header. You can create the Credential for Basic Auth by using username as AccessKey ID and password as SecretAccessKey obtained on KAS Console.

NOTE

KAS Credential enables full access to KAS and the Klaytn accounts created using the Wallet API. It enables asset transfers of the Klaytn account's assets (like KLAY) as well as Transaction Executions. To keep your KAS/Klaytn accounts secure, do not share your KAS API Secret Access Key with others.

cURL

  curl --location --request GET 'https://kip7-api.klaytnapi.com/v1/contract' \
  -u ${your_accessKeyId}:${your_secretAccessKey} \
  --header 'x-chain-id: 1001' \
  --header 'Content-Type: application/json'
Security Scheme Type HTTP
HTTP Authorization Scheme basic