Skip to content

AnthropicImageBlock

An image content block using base64-encoded data. Anthropic requires images as base64 with an explicit media type.

---
title: AnthropicImageBlock
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class AnthropicImageBlock {
        +string type
        +AnthropicImageSource source
    }
    class AnthropicImageSource {
        +string type
        +string media_type
        +string data
    }
    AnthropicImageBlock *-- AnthropicImageSource
NameTypeDescription
typestringThe content block type
sourceAnthropicImageSourceThe image source (base64-encoded)

The following types are composed within AnthropicImageBlock: