Skip to content

AnthropicWireMessage

A single message in the Anthropic Messages API wire format. Anthropic always uses the array-of-blocks form for content, even when there is only one text block (§7.5).

---
title: AnthropicWireMessage
config:
  look: handDrawn
  theme: colorful
  class:
    hideEmptyMembersBox: true
---
classDiagram
    class AnthropicWireMessage {
        +string role
        +unknown[] content
    }
role: user
NameTypeDescription
rolestringThe message role (‘user’ or ‘assistant’)
contentunknown[]Array of typed content blocks (AnthropicTextBlock