Claude Fable 5 经济版


Claude Fable 5 是 Anthropic 正式发布的 Mythos 级模型,专为自主知识工作、高级推理和长周期编程而设计。它支持文本、图像和文件输入,并生成文本输出。该模型拥有 100 万 tokens 的上下文窗口、最多 128,000 个输出 tokens,并内置始终启用的自适应思考、工具使用和结构化输出能力。它与 Claude Mythos 5 属于同一底层模型家族,但公开发布时采用了更强的安全防护措施。该模型适用于复杂软件工程、多步骤智能体工作流、企业研究、文档分析,以及需要持续推理和高可靠性的专业任务。

claude-fable-5

1 认证

该 API 使用 API Key 进行认证。

获取你的 API Key

https://icreat.ai/hub/keys 获取你的 API key。

2 调用 API

该模型提供与 Anthropic 的 /messages API 兼容的 HTTP API。你可以使用任何兼容此 API 的 SDK 来调用该 llm。

2.1 curl

curl --fail-with-body --connect-timeout 10 --max-time 60 \
  -X POST https://api.icreat.ai/llm/anthropic/v1/messages \
  -H "Authorization: Bearer ${ICREAT_API_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "claude-fable-5",
  "messages": [
    {"role": "system", "content": "You are a helpful assistant."},
    {"role": "user", "content": "Which is healthier, coffee or tea?"}
  ],
  "stream": false
}'

2.2 python

import anthropic

client = anthropic.Anthropic(
  base_url="https://api.icreat.ai/llm/anthropic", 
  api_key="ICREAT_API_KEY"
)

message = client.messages.create(
    model="claude-fable-5",
    system="You are a helpful assistant.",
    messages=[
        {
            "role": "user",
            "content": [
                {
                    "type": "text",
                    "text": "Hi, how are you?"
                }
            ]
        }
    ]
)

for block in message.content:
    if block.type == "thinking":
        print(f"Thinking:\n{block.thinking}\n")
    elif block.type == "text":
        print(f"Text:\n{block.text}\n")

2.3 node.js

const client = new Anthropic({
  baseURL: "https://api.icreat.ai/llm/anthropic"
  apiKey: "ICREAT_API_KEY"
});

const message = await client.messages.create({
  max_tokens: 1024,
  messages: [{ role: "user", content: "Hello, Claude" }],
  model: "claude-fable-5"
});

for (const block of message.content) {
  if (block.type === "text") {
    console.log(block.text);
  }
}

3 API 协议

3.1 流式输出

stream 参数设置为 true 以请求流式输出。

{
  "model": "claude-fable-5",
  "messages": [
    {
      "role": "user",
      "content": "Please explain what recursion is and give a Python example."
    }
  ],
  "stream": true
}