> **Reading as an AI agent?** This is the Markdown version of https://docs.meshy.ai/api/v2/metadata, part of the Meshy API v2 docs.
>
> - v2 docs index: https://docs.meshy.ai/api/v2/llms.txt
> - All v2 pages in one file: https://docs.meshy.ai/api/v2/llms-full.txt
> - OpenAPI spec for v2: https://docs.meshy.ai/api/v2/openapi.yaml

---

# Metadata

Tag each task with your own key-value pairs, such as the user or team it ran for, and read them back on its usage record.

Only API keys of Studio and Enterprise teams can tag tasks. On other plans, Meshy ignores the header and never returns `400` for it.

---

## Tag a task
To tag a task, send the `X-Meshy-Metadata` header with the request that creates it:

```http
X-Meshy-Metadata: user=alex@example.com,team=fab
```

The header value follows the [W3C Baggage](https://www.w3.org/TR/baggage/) format, with at most 64 pairs and 8,192 bytes. A header that's malformed or over these limits returns `400` with the code `metadata_invalid`, and Meshy doesn't create the task.

Creative Lab endpoints ignore the header and never return `400` for it.

---

## Read the tags
Each record of the [Usage API](https://docs.meshy.ai/api/v2/usage.md#the-usage-record-object) has the task's tags in its `metadata` field, for example `{"user": "alex@example.com", "team": "fab"}`. It's `{}` for a task without tags.
