Documentation Index
Fetch the complete documentation index at: https://docs.crazyrouter.com/llms.txt
Use this file to discover all available pages before exploring further.
Claude 聊天对象
Crazyrouter 支持 Anthropic 原生 Messages API。 本文页只写入2026-03-23 已在生产环境复核过的 Message 对象和流式事件类型。
Message 对象
当前生产最小请求使用:model: "claude-sonnet-4-6"POST /v1/messages
常看字段
| 字段 | 类型 | 说明 |
|---|---|---|
id | string | 消息唯一标识 |
type | string | 固定为 message |
role | string | 固定为 assistant |
content | array | 内容块列表 |
model | string | 实际使用的模型 |
stop_reason | string | 停止原因,如 end_turn、tool_use、max_tokens |
usage | object | Token 用量 |
content 常见块类型
文本块:流式事件类型
2026-03-23 的生产复核中,claude-sonnet-4-6 原生流式返回了以下 SSE 事件:
message_startcontent_block_startcontent_block_deltacontent_block_stopmessage_deltamessage_stop
事件示意
message_start
content_block_start
content_block_delta
content_block_stop
message_delta
message_stop
一个实用判断
- 如果
content里只有text,就是普通回答 - 如果
stop_reason = "tool_use",并且content里出现tool_use,就是工具调用 - 如果
content里出现thinking,说明当前模型和请求形态触发了扩展思考
thinking block 不是所有 Claude 模型默认都会返回。当前明确复核成功的是 claude-opus-4-7。