Open History to see the last commit
1---
2id: MediaInputMetadata
3title: MediaInputMetadata
4---
5
6# Interface: MediaInputMetadata
7
8Defined in: [packages/ai/src/types.ts:1728](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1728)
9
10Metadata convention for image / video / audio inputs to media generation.
11Carried on `ImagePart.metadata` / `VideoPart.metadata` / `AudioPart.metadata`
12when used as conditioning inputs to `generateImage()` or `generateVideo()`.
13
14## Properties
15
16### role?
17
18```ts
19optional role: MediaInputRole;
20```
21
22Defined in: [packages/ai/src/types.ts:1730](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1730)
23
24Optional role hint disambiguating the part's intent for the adapter
25
26***
27
28### tag?
29
30```ts
31optional tag: string;
32```
33
34Defined in: [packages/ai/src/types.ts:1739](https://github.com/TanStack/ai/blob/main/packages/ai/src/types.ts#L1739)
35
36Optional user-defined label for this input (e.g. `'woman-in-red-dress'`).
37**Informational only** — adapters never read it and the SDK never
38rewrites prompt text based on it. Use it to correlate parts with the
39references you write in your prompt using the provider's own syntax
40(fal's `@Image1`, OpenAI's "image 1", etc.), or for your own
41bookkeeping/logging.