NFT metadata, Optimism
op_nft_metadataNFT metadata on Optimism: the token URI of one ERC-721 token id (tokenURI) and the JSON it points to (name, description, image, attributes), read from data: URIs, https or ipfs:// (through ipfs.io). Strings over 1,000 characters, such as on-chain SVG images, are shortened. Use to show or check what an NFT is; for its owner use op_nft_owner. A token that does not exist is 422, uncharged; unreachable metadata is reported in metadataError. Example: contract=0xC36442b4a4522E871399CD717aBDD847Ab11FE88, tokenId=1. Price $0.01/call via x402 USDC or a card key (/credits), first 25 free; failed calls free. Reads or computes only and changes nothing; each call is charged, so repeats are not free.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| tokenId | Yes | Token id, a whole number | |
| contract | Yes | 0x ERC-721 collection contract address |