Skip to content

ImageContent

Defined in: packages/ai.matey.types/src/ir.ts:68

Image content block.

Supports both URLs and base64-encoded images.

// Image from URL
const imageUrl: ImageContent = {
type: 'image',
source: {
type: 'url',
url: 'https://example.com/image.jpg'
}
};
// Base64 image
const imageBase64: ImageContent = {
type: 'image',
source: {
type: 'base64',
mediaType: 'image/jpeg',
data: 'iVBORw0KGgo...'
}
};

readonly source: { type: "url"; url: string; } | { data: string; mediaType: string; type: "base64"; }

Defined in: packages/ai.matey.types/src/ir.ts:70


readonly type: "image"

Defined in: packages/ai.matey.types/src/ir.ts:69