Blob

@Serializable
data class Blob(val data: ByteArray? = null, val displayName: String? = null, val mimeType: String? = null)

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

Constructors

Link copied to clipboard
constructor(data: ByteArray? = null, displayName: String? = null, mimeType: String? = null)

Properties

Link copied to clipboard
val data: ByteArray? = null

Required. The raw bytes of the data.

Link copied to clipboard
val displayName: String? = null

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.

Link copied to clipboard
val mimeType: String? = null

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