> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mynth.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Use Metadata

> Attach your own identifiers and workflow context to image generation tasks.

Use `metadata` to carry your own application context through the task lifecycle.

## Attach metadata

```ts theme={"theme":"kanagawa-dragon"}
const result = await mynth.image.generate({
  prompt: "Packaging concept for a botanical tea brand",
  model: "google/gemini-3.1-flash-image",
  metadata: {
    requestId: "req_123",
    userId: "usr_123",
    campaign: "spring-launch",
  },
});

// Metadata is preserved on the result object
console.log(result.getMetadata());
```

Mynth returns that metadata in:

* the full task object
* webhook payloads

This is useful for mapping Mynth tasks back to your own jobs, users, orders, or records.

## Metadata limits

Metadata can contain nested objects and arrays. The maximum payload size is 2 KB.
