> For the complete documentation index, see [llms.txt](https://docs.legitimate.tech/technical-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.legitimate.tech/technical-docs/protocol/customizations/product-metadata-options.md).

# Product Metadata Options

{% hint style="info" %}
Legitimate maps each unique digital ID to a token on a decentralized blockchain network. For simplicity and consistency, our documentation will refer to each digital ID as a token.
{% endhint %}

Product metadata is derived from a URL that contains a `base_uri` as well as a file name that corresponds with the `tokenId` or locked state.

This metadata can then be generated [on-chain](https://github.com/LegitimateTech/lgt-phygital-nft-v3/blob/main/contracts/examples/LegitimatePhygitalNFTv3PsiMetadata.sol), or [off-chain](https://github.com/LegitimateTech/lgt-phygital-nft-v3/blob/main/contracts/examples/LegitimatePhygitalNFTv3Psi.sol#L11) via a separate service such as IPFS or AWS.

**When a token is locked, it can be configured to display a separate set of metadata for the NFT including image, animation, title, and description.**

### On-chain metadata

Legitimate implemented a simple on-chain metadata contract that is useful for tokens of a singular SKU or collection that all leverage similar metadata. This on-chain metadata contract does not provide for a separate set of metadata for the locked state.

This contract can be found [here](https://github.com/LegitimateTech/lgt-phygital-nft-v3/blob/main/contracts/examples/LegitimateNFTMetadata.sol).

### Off-chain metadata

Off-chain metadata can also be used. Examples can be found [here](https://github.com/LegitimateTech/lgt-phygital-nft-v3/blob/main/contracts/examples/LegitimatePhygitalNFTv3.sol).

The `base_uri` can be an IPFS folder or any HTTP/S folder containing files `1, 2, 3, ..., locked` files in JSON format without the `.json` extension. Do not include the trailing `/` in the URI. The file `locked` in the folder is used instead of the respective file that corresponds to the `tokenId` when the token is in the locked state.

On our standard smart contract, the `NFT_MANAGER_ROLE` is required to update the metadata URI.

Base URI examples:

```
https://ipfs.io/ipfs/<folder-hash>
https://www.example.com/token-metadata
```

Metadata filename examples:

```
1
2
3
locked
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.legitimate.tech/technical-docs/protocol/customizations/product-metadata-options.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
