Interface: ImageBlock
@providerprotocol/ai / @providerprotocol/ai / ImageBlock
Interface: ImageBlock
Section titled “Interface: ImageBlock”Defined in: src/types/content.ts:234
Image content block.
Contains an image with its source data and metadata.
Example
Section titled “Example”const imageBlock: ImageBlock = { type: 'image', source: { type: 'url', url: 'https://example.com/photo.jpg' }, mimeType: 'image/jpeg', width: 1920, height: 1080};Properties
Section titled “Properties”height?
Section titled “height?”
optionalheight:number
Defined in: src/types/content.ts:248
Image height in pixels
mimeType
Section titled “mimeType”mimeType:
string
Defined in: src/types/content.ts:242
MIME type of the image (e.g., ‘image/png’, ‘image/jpeg’)
source
Section titled “source”source:
ImageSource
Defined in: src/types/content.ts:239
The image data source
type:
"image"
Defined in: src/types/content.ts:236
Discriminator for image blocks
width?
Section titled “width?”
optionalwidth:number
Defined in: src/types/content.ts:245
Image width in pixels