Skip to content
1 min read · 261 words

Interface: RawMedia

Plain input object supplied to Media at construction time.

Remarks

Validated against rawMediaSchema before the Media instance is created.

Properties

PropertyTypeDescription
filenamestringFilename used by providers that key on it (e.g. OpenAI file.filename).
id?stringStable 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.
mimeTypestringThe 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.
readerMediaReaderRe-openable byte source. See @nhtio/adk!MediaReader.
source?stringOptional 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.