Image

@SerialName(value = "image")
data class Image(val source: ImageSource, val cacheControl: AnthropicCacheControl? = null) : AnthropicContent(source)

Represents an image content type within the AnthropicContent hierarchy. This class is used to encapsulate image data, which can be sourced in different ways, such as via URLs or base64-encoded strings.

Constructors

Link copied to clipboard
constructor(source: ImageSource, cacheControl: AnthropicCacheControl? = null)

Properties

Link copied to clipboard

Optional cache control directive for explicit breakpoint prompt caching. When set on the last content block in the list, all content blocks are eligible for caching.

Link copied to clipboard

The source of the image data.