The content of the block. This can be a string. In the case of 'image_url', 'video_url', 'audio_url', or 'file_url', it should be a URL to the resource, OR it can be a base64 encoded string. representing the content of the item. For base64 images, use the data URL format: data:image/png;base64, For 'tool_result', this is the result payload the model should see — stringify non-text results.
OptionalfileOptional original filename if the content was uploaded from a file.
OptionalfileOptional file size in bytes.
OptionalheightOptional height in pixels (for images and videos).
OptionalisFor 'tool_result' blocks: whether the result represents a FAILED tool execution. Providers
that model this natively (Anthropic's is_error) get it mapped through; others receive the
error text as an ordinary result.
OptionalmimeOptional MIME type for media content (e.g., 'image/png', 'image/jpeg', 'audio/mp3'). When content is a data URL, this can be extracted from the URL. When content is raw base64, this field is required.
OptionaltoolFor 'tool_result' blocks: the ChatToolCall.id this block answers. Required on 'tool_result'; providers use it to pair a result with the call that requested it.
OptionaltoolFor 'tool_result' blocks: the name of the tool that was called. Optional — carried for providers (and logs) that key results by name rather than id.
The type of content block. Can be 'text', 'image_url', 'video_url', 'audio_url', 'file_url', or 'tool_result'.
OptionalwidthOptional width in pixels (for images and videos).
Defines the shape of a content block in a chat message. This can be used to represent different types of content in a message.