Interface: RawMedia
Plain input object supplied to Media at construction time.
Remarks
Validated against rawMediaSchema before the Media instance is created.
Properties
| Property | Type | Description |
|---|---|---|
filename | string | Filename used by providers that key on it (e.g. OpenAI file.filename). |
id? | string | Stable unique identifier for this media instance. Required for strict symmetry with Message.id and ToolCall.id. When omitted, a fresh UUIDv6 is assigned at construction time. |
kind | "audio" | "image" | "video" | "document" | The media kind. See MediaKind. |
mimeType | string | The MIME type of the underlying bytes. |
modalityHazard | "inert" | "extractable-instructions" | "opaque-perceptual" | Modality hazard declared at construction time. Required — there is NO default. See MediaModalityHazard. |
reader | MediaReader | Re-openable byte source. See @nhtio/adk!MediaReader. |
source? | string | Optional provenance pointer (URL, tool name, etc.) for audit / events. |
stash? | Record<string, MediaStashEntry> | Free-form per-instance metadata register. Middleware pipelines append to this — typically with a text description, transcript, caption, or alt-text — so downstream code that cannot consume the media natively has a model-readable fallback. No keys are reserved by the framework. Defaults to {}. |
trustTier | "first-party" | "third-party-public" | "third-party-private" | Trust tier declared at construction time. Required — there is NO default. See MediaTrustTier. |