get-token-metadata

Compare original and translation side by side

🇺🇸

Original

English
🇨🇳

Translation

Chinese

Getting Art Blocks Token Metadata

获取Art Blocks代币元数据

Tool:
get_token_metadata

工具:
get_token_metadata

Retrieves a single token's full metadata in one call — traits, media URLs, owner, hash, listing info, and project context. Prefer this over
graphql_query
when you need rich token details for a known token ID.
通过一次调用即可检索单个代币的完整元数据——包括特征、媒体URL、所有者、哈希值、挂牌信息以及项目背景。当你需要已知代币ID的丰富代币详情时,优先使用此工具而非
graphql_query

Token ID Format

代币ID格式

<contract_address>-<token_number>
Example:
0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270-78000000
<contract_address>-<token_number>
示例:
0xa7d8d9ef8d8ce8992df33d8b8cf4aebabd5bd270-78000000

Parameters

参数

ParamRequiredNotes
tokenId
yesFull token ID
<contract_address>-<token_number>
chainId
Default
1
(Ethereum).
1
,
42161
(Arbitrum),
8453
(Base)
参数是否必填说明
tokenId
完整代币ID,格式为
<contract_address>-<token_number>
chainId
可选默认值为
1
(以太坊)。支持
1
42161
(Arbitrum)、
8453
(Base)

Response Shape

响应结构

The response has three top-level keys:
token
,
media
, and
project
.
token:
  id, tokenId, chainId, contractAddress, projectId
  hash              — 32-byte hex, the source of all randomness
  invocation        — mint number within the project (0-indexed)
  features          — on-chain traits object
  featuresStatus    — "not_defined" | "defined_empty" | "defined"
  mintedAt, mintTransactionHash
  ownerAddress
  listing           — null if not listed, otherwise:
    listing.price      — listing price
    listing.currency   — currency symbol (ETH, WETH, etc.)
    listing.platform   — marketplace name
    listing.url        — listing URL
  artBlocksUrl      — direct link to the token page on artblocks.io

media:
  imageUrl          — primary rendered image
  previewUrl        — preview asset URL
  liveViewUrl       — live interactive generator URL
  hasVideo          — true if a video render exists

project:
  id, name, artistName, slug
  artBlocksUrl      — direct link to the project page on artblocks.io
  description, website, license
  scriptTypeAndVersion
  maxInvocations, invocations, remaining
  active, paused, complete
  aspectRatio, curationStatus, verticalName, verticalDisplay
  renderComplete
响应包含三个顶级键:
token
media
project
token:
  id, tokenId, chainId, contractAddress, projectId
  hash              — 32字节十六进制值,是所有随机性的来源
  invocation        — 项目内的铸造编号(从0开始索引)
  features          — 链上特征对象
  featuresStatus    — "not_defined" | "defined_empty" | "defined"
  mintedAt, mintTransactionHash
  ownerAddress
  listing           — 若未挂牌则为null,否则包含:
    listing.price      — 挂牌价格
    listing.currency   — 货币符号(ETH、WETH等)
    listing.platform   — 交易平台名称
    listing.url        — 挂牌URL
  artBlocksUrl      — artblocks.io上该代币页面的直接链接

media:
  imageUrl          — 主渲染图像
  previewUrl        — 预览资产URL
  liveViewUrl       — 实时交互式生成器URL
  hasVideo          — 若存在视频渲染则为true

project:
  id, name, artistName, slug
  artBlocksUrl      — artblocks.io上该项目页面的直接链接
  description, website, license
  scriptTypeAndVersion
  maxInvocations, invocations, remaining
  active, paused, complete
  aspectRatio, curationStatus, verticalName, verticalDisplay
  renderComplete

When to Use vs GraphQL

何时使用此工具 vs GraphQL

Use
get_token_metadata
when...
Use
graphql_query
when...
You have a specific token ID and want everything about itYou need to query multiple tokens at once
You need media URLs (
liveViewUrl
,
imageUrl
)
You need fields not in this response
You want features + project context in one callYou're building complex filters or aggregations
适合使用
get_token_metadata
的场景
适合使用
graphql_query
的场景
你拥有特定代币ID,且想要获取它的所有相关信息你需要一次性查询多个代币
你需要媒体URL(
liveViewUrl
imageUrl
你需要此响应中未包含的字段
你希望一次性获取特征和项目背景你正在构建复杂的筛选或聚合功能

Notes

注意事项

  • liveViewUrl
    is the canonical way to share or preview a generative token — always include it when presenting a token to a user
  • features
    is the on-chain traits object — same data shown on Art Blocks website
  • featuresStatus
    distinguishes between "artist hasn't defined features" (
    not_defined
    ), "features are defined but empty for this token" (
    defined_empty
    ), and "features exist" (
    defined
    )
  • hash
    uniquely identifies the token's visual output — same hash always produces the same artwork
  • listing
    is
    null
    when the token has no active secondary-market listing; when present it contains
    price
    ,
    currency
    ,
    platform
    , and
    url
  • Both
    token.artBlocksUrl
    and
    project.artBlocksUrl
    link to artblocks.io — use these when presenting tokens to users
  • liveViewUrl
    是分享或预览生成式代币的标准方式——向用户展示代币时务必包含此链接
  • features
    是链上特征对象——与Art Blocks网站上展示的数据一致
  • featuresStatus
    用于区分三种状态:“艺术家未定义特征”(
    not_defined
    )、“已定义特征但该代币无特征内容”(
    defined_empty
    )、“存在特征”(
    defined
  • hash
    唯一标识代币的视觉输出——相同的哈希值始终会生成相同的作品
  • 当代币没有活跃的二级市场挂牌时,
    listing
    null
    ;若存在挂牌,则包含
    price
    currency
    platform
    url
    字段
  • token.artBlocksUrl
    project.artBlocksUrl
    均指向artblocks.io——向用户展示代币时可使用这些链接