Claude Fable 5、Anthropic により 2026年6月9日にリリース、は一般に公開された AI 能力における大きな飛躍を示します。一般利用に向けて安全化された初の「Mythos クラス」モデルとして、ソフトウェアエンジニアリング、複雑な推論、ビジョンタスク、科学研究、長期のエージェント型ワークフローにわたって最先端の性能を発揮しつつ、リスク軽減のためのターゲット化されたセーフガードを組み込んでいます。
開発者、CTO、AI プロダクトマネージャー、SaaS ビルダーにとって、Claude Fable 5 API は、コーディングで従来の Opus 4.8 を上回る能力(主要ベンチマークで 80% 以上)を解放しつつ、強固な安全ガードレールを維持します。本ガイドは、ゼロから本番運用に至るまでに必要なすべてを提供します。
クイックアンサー:
Claude Fable 5 API を使うには、Anthropic のアカウントに登録するか CometAPI のような統合プロバイダを利用し、API キーを取得して、Messages エンドポイントに 、 値、 配列を含む POST リクエストを送信します。Python と TypeScript の公式 SDK により、これが大幅に簡素化されます。コストとレイテンシを適切に管理すれば、自律エージェント、より賢い内部ツール、信頼性の高い RAG やコーディングアシスタントの開発をより迅速に進められます。
python
import anthropic
client = anthropic.Anthropic() # Reads ANTHROPIC_API_KEY
response = client.messages.create(
model="claude-fable-5",
max_tokens=2048,
system="You are a principal engineer. Be concise, use examples.",
messages=[{"role": "user", "content": "Design a retry strategy for flaky webhooks."}]
)
for block in response.content:
if block.type == "text":
print(block.text)
Advanced Usage: System Prompts, Streaming, and Tool Use
一貫した挙動のためのシステムプロンプト
response = client.messages.create(
model="claude-fable-5",
max_tokens=4096,
system="You are a principal software architect. Prioritize clean, production-ready code with error handling and tests.",
messages=[...]
)
ユーザー体験向上のためのストリーミング
長い出力に必須:
with client.messages.stream(...) as stream:
for text in stream.text_stream:
print(text, end="", flush=True)
tools = [
{
"name": "get_order_status",
"description": "Look up the status of a customer order by ID.",
"input_schema": {
"type": "object",
"properties": {"order_id": {"type": "string"}},
"required": ["order_id"],
},
}
]
#Pass tools to the request messages in the same way as you would pass parameters
messages = [{"role": "user", "content": "What's the status of order A1855?"}]
response = client.messages.create(
model="claude-fable-5",
max_tokens=1024,
tools=tools,
messages=messages,
)
if response.stop_reason == "tool_use":
tool_use = next(b for b in response.content if b.type == "tool_use")
# Run your real function with the model's chosen input
result = lookup_order(tool_use.input["order_id"]) # your code
messages.append({"role": "assistant", "content": response.content})
messages.append({
"role": "user",
"content": [{
"type": "tool_result",
"tool_use_id": tool_use.id,
"content": result,
}],
})
# Send the result back; the model now answers using it
followup = client.messages.create(
model="claude-fable-5",
max_tokens=1024,
tools=tools,
messages=messages,
)