Image
class Image(val mediaType: String, val base64: String = "", val providerMetadata: ProviderMetadata = ProviderMetadata.None, val url: String? = null) : ContentPart(source)
Image content — distinct from generic File so multimodal models (vision providers, image-generation tools) get a typed variant. Per historical parity gap #39, mirrors v6's ImagePart. mediaType is the MIME type (e.g. image/png); base64 is the raw image bytes encoded.
On-device targets (Gemma 4 E2B text-only for now) never emit this — added for forward parity with v6 multimodal providers the port might back later (vision-capable LiteRT-LM bundles, cloud Anthropic / OpenAI).
Constructors
Link copied to clipboard
constructor(mediaType: String, base64: String = "", providerMetadata: ProviderMetadata = ProviderMetadata.None, url: String? = null)