Claude Fable 5.2

claude-fable-5-2
文本AnthropicClaude Fable 5.2claude-fable-5-2

Claude Fable 5.2(claude-fable-5-2)面向高难度推理和长周期智能体任务,能处理跨多个代码仓库、持续数天的工程工作。图文(含 PDF)输入,100 万上下文,12.8 万输出,思考不能关闭,提供 Anthropic 兼容消息接口。

鉴权

Base URL
https://api.dreamto.ai
Authorization
Authorization: Bearer YOUR_API_KEY
Content-Type
application/json
模型名 (model)
claude-fable-5-2

接入协议

为什么选这个协议

适合原本使用 Claude SDK 或 Anthropic Messages API 的用户直接迁移。

接口地址
POST/v1/messages
Authorization: Bearer YOUR_API_KEYContent-Type: application/jsonanthropic-version: 2023-06-01

请求 / 响应 JSON

请求
{
  "model": "claude-fable-5-2",
  "tools": [],
  "stream": false,
  "system": "请用简洁中文回答。",
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "text": "你好,世界",
          "type": "text"
        }
      ]
    }
  ],
  "thinking": {
    "type": "enabled",
    "budget_tokens": 1024
  },
  "max_tokens": 4096
}
响应
{
  "id": "msg_example",
  "role": "assistant",
  "type": "message",
  "model": "claude-fable-5-2",
  "usage": {
    "input_tokens": 8,
    "output_tokens": 16
  },
  "content": [
    {
      "text": "Hello from Mix API",
      "type": "text"
    }
  ],
  "stop_reason": "end_turn"
}

请求字段 / 响应字段

请求字段
字段类型必填默认可选值 / 范围说明示例
messagesarrayY--Anthropic/OpenAI 兼容消息数组。[{"role":"user","content":"你好,世界"}]
system_instructionstringN--Claude system 提示词。请用简洁中文回答。
max_tokensintegerN4096-Claude 必填或建议显式设置的最大输出长度。4096
temperaturenumberN--控制输出随机性;不设置默认值,避免用户未传时自动带到上游。0.7
top_pnumberN--核采样概率阈值。0.95
top_kintegerN--限制候选 token 数。40
thinkingobjectN--Claude 扩展思考配置。{"type":"enabled","budget_tokens":1024}
toolsarrayN--Claude tools 定义。[]
tool_choicestringN--auto、any 或指定工具。auto
streambooleanNfalse-是否使用流式响应。false
响应字段
字段类型必填默认可选值 / 范围说明示例
idstringN---msg_example
typestringN---message
rolestringN---assistant
modelstringN---claude-fable-5-2
contentarrayN---[{"text":"Hello from Mix API","type":"text"}]
content[]objectN---{"text":"Hello from Mix API","type":"text"}
content[].typestringN---text
content[].textstringN---Hello from Mix API
stop_reasonstringN---end_turn
usageobjectN---{"input_tokens":8,"output_tokens":16}
usage.input_tokensintegerN---8
usage.output_tokensintegerN---16

代码示例

cURLrequest.sh
curl -X POST "https://api.dreamto.ai/v1/messages" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -H "anthropic-version: 2023-06-01" \
  -d '{
  "model": "claude-fable-5-2",
  "max_tokens": 4096,
  "messages": [
    {
      "role": "user",
      "content": [
        {
          "type": "text",
          "text": "你好,世界"
        }
      ]
    }
  ],
  "system": "请用简洁中文回答。",
  "stream": false,
  "thinking": {
    "budget_tokens": 1024,
    "type": "enabled"
  },
  "tools": []
}'