Metadata Guide
Learn more about setting asset metadata to your NFTs and Digital Assets

Setting Your Asset Metadata

You can set your metadata through the “Assets” section in your project on Enjin’s minting panel by clicking the Edit button on the asset you wish to customize.
There are multiple ways to set asset metadata, and those are outlined here:

Basic Editor

If you want to set your metadata the fast and cheap way, you can do so using the Basic Editor
Basic Editor Panel
Your asset URI will then be customized to point towards Enjin’s servers, where the metadata is stored.
Once a successful request has been made, you will need to accept and sign the transaction in the REQUESTS section of your wallet.
You can also upload .GIF and .MP4 files to your assets.
Requirements when using hosted metadata:
  • 5Mb max for GIFs/regular images.
  • 15Mb max for MP4 videos.

Advanced Editor

If you want full control over your metadata, you can choose the URI using the Advanced Editor.
Your asset URI will then be customized to point towards the address you have specified and you will be able to customize the JSON file at your leisure.
Please note the following requirements when it comes to hosting your own metadata:
  1. 1.
    The link (to both metadata and image) must be publicly accessible to robots.
  2. 2.
    The URI must be set appropriately to the requested file.
  3. 3.
    The image must be that of a valid image file (the image must display online).
  4. 4.
    The JSON must conform with the JSON RFC standards. If it does not conform in any way, then your metadata won't be loaded by Enjin.
  5. 5.
    If in doubt, we recommend checking your metadata here, to make sure it's valid.

Using Enjin's API

If you want to set your metadata programmatically, you can do so using the following query:
1
mutation {
2
SetUri(
3
assetId: "78c00000000004b1"
4
uri:"your uri url here"
5
wallet: "your wallet address"
6
) {
7
transactionId
8
id
9
state
10
value
11
asset {
12
name
13
id
14
}
15
user {
16
name
17
}
18
}
19
}
Copied!
The ERC-1155 token standard includes optional formatting to allow for ID substitution by clients. If the string {id} exists in any JSON value, it MUST be replaced with the actual token ID, by all client software that follows this standard.
  • The string format of the substituted hexadecimal ID MUST be lowercase alphanumeric: [0-9a-f] with no 0x prefix.
  • The string format of the substituted hexadecimal ID MUST be leading zero-padded to 64 hex characters length if necessary.
In this situation, the following address: https://token-cdn-domain/{id}.json
Would be replaced with: https://token-cdn-domain/780000000000001e000000000000000000000000000000000000000000000000.json
Last modified 2mo ago