A content blob. A Blob contains data of a specific media type. It is used to represent images, audio, and video.

interface Blob {
    data?: string;
    displayName?: string;
    mimeType?: string;
}

Properties

data?: string

Required. The raw bytes of the data.

Encoded as base64 string.

displayName?: string

Optional. The display name of the blob. Used to provide a label or filename to distinguish blobs. This field is only returned in PromptMessage for prompt management. It is used in the Gemini calls only when server-side tools (code_execution, google_search, and url_context) are enabled. This field is not supported in Gemini API.

mimeType?: string

Required. The IANA standard MIME type of the source data.