Skip to main content

Claude Chat Object

Crazyrouter supports the Anthropic native Messages API. This page only documents Message-object and streaming-event behavior that was revalidated in production on 2026-03-23.

Message object

The current minimal production request uses:
  • model: "claude-sonnet-4-6"
  • POST /v1/messages
Typical production response skeleton:
{
  "id": "msg_xxx",
  "type": "message",
  "role": "assistant",
  "content": [
    {
      "type": "text",
      "text": "..."
    }
  ],
  "model": "claude-sonnet-4-6",
  "stop_reason": "end_turn",
  "stop_sequence": null,
  "usage": {
    "input_tokens": 15,
    "output_tokens": 20
  }
}

Common fields

FieldTypeMeaning
idstringUnique message identifier
typestringAlways message
rolestringAlways assistant
contentarrayContent block list
modelstringActual model used
stop_reasonstringStop reason such as end_turn, tool_use, or max_tokens
usageobjectToken usage

Common content block types

Text block:
{
  "type": "text",
  "text": "..."
}
Tool-use block:
{
  "type": "tool_use",
  "id": "toolu_xxx",
  "name": "get_time",
  "input": {
    "timezone": "Asia/Shanghai"
  }
}
Thinking block:
{
  "type": "thinking",
  "thinking": "..."
}

Streaming event types

In the 2026-03-23 production recheck, native streaming for claude-sonnet-4-6 returned these SSE events:
  • message_start
  • content_block_start
  • content_block_delta
  • content_block_stop
  • message_delta
  • message_stop

Event examples

message_start
event: message_start
data: {"type":"message_start","message":{...}}
content_block_start
event: content_block_start
data: {"type":"content_block_start","index":0,"content_block":{"type":"text","text":""}}
content_block_delta
event: content_block_delta
data: {"type":"content_block_delta","index":0,"delta":{"type":"text_delta","text":"Hello"}}
content_block_stop
event: content_block_stop
data: {"type":"content_block_stop","index":0}
message_delta
event: message_delta
data: {"type":"message_delta","delta":{"stop_reason":"end_turn","stop_sequence":null},"usage":{"output_tokens":20}}
message_stop
event: message_stop
data: {"type":"message_stop"}

Practical interpretation

  • If content only contains text, it is a normal answer
  • If stop_reason = "tool_use" and content contains tool_use, the model is making a tool call
  • If content contains thinking, the current model and request shape triggered extended thinking
A thinking block is not returned by every Claude model by default. The currently revalidated explicit thinking path is claude-opus-4-6-thinking.
Related pages: