How to Get a Claude Fable 5 API Key — Anthropic's Most Powerful Public Model (2026)
Claude Fable 5 is Anthropic's first Mythos-class model available to the public — released June 9, 2026. It leads every major benchmark including SWE-bench Verified (95.0%) and GPQA Diamond (92.8%). This guide covers registration, key creation, your first API call with adaptive thinking, error fixes, and a full pricing comparison.
1) What is Claude Fable 5?
On June 9, 2026, Anthropic released Claude Fable 5 alongside Claude Mythos 5. Both models share the same underlying architecture (internally codenamed "Capybara"), but Mythos 5 is restricted to government and security institutions, while Fable 5 is Anthropic's most capable model available to the general public.
Fable 5 belongs to the new Mythos-class tier — a step above the Opus tier that previously represented Anthropic's flagship. The name itself reflects this: Fable (from Latin fabula, meaning 'a told story') is the publicly-accessible, safety-guardrailed version of the Mythos foundation. Fable 5 retains the full reasoning and capability of the Mythos base, with safety classifiers layered on top for commercial deployment.
Fable 5 is designed specifically for long-running, autonomous, multi-step tasks — the kind that previously required frequent human check-ins. It features native adaptive thinking (always-on, not a toggle), a 1 million token context window, and multimodal vision support. On Cursor's internal CursorBench for real-world software engineering, Fable 5 scores higher than every other available model.
2) Benchmark performance — where Fable 5 stands
Fable 5 achieves state-of-the-art results across software engineering, scientific reasoning, and agentic tasks. On SWE-bench Verified — the gold standard for real-world code bug resolution — Fable 5 scores 95.0%, compared to 69.2% for Claude Opus 4.8 and 58.6% for GPT-5.5.
On FrontierCode Diamond, a benchmark for high-difficulty programming problems, Fable 5 scores 29.3% — more than twice Opus 4.8's 13.4% and five times GPT-5.5's 5.7%. On GPQA Diamond (advanced scientific reasoning), Fable 5 reaches 92.8%. A real-world demonstration: Fable 5 completed a 50-million-line Ruby migration in a single day — a task previously requiring a large engineering team over weeks.
These benchmarks confirm that Fable 5 is not an incremental upgrade from Opus 4.8 — it represents a qualitative leap, particularly in tasks that require multi-step planning, sustained context, and code execution over long sessions.
- SWE-bench Verified: 95.0% (Opus 4.8: 69.2% | GPT-5.5: 58.6%)
- SWE-bench Pro: 80.3% (Opus 4.8: 69.2% | GPT-5.5: ~59%)
- FrontierCode Diamond: 29.3% (Opus 4.8: 13.4% | GPT-5.5: 5.7%)
- GPQA Diamond (science): 92.8% — leading all public models
- Hebbia Finance Benchmark: #1 across all tested models
- Remote agentic automation accuracy: 16.1%
3) Create an Anthropic account
Visit console.anthropic.com and sign up with your email address. Google single sign-on is also supported. Once registered, you will be prompted to complete phone number verification — this is required to activate API access and prevents abuse.
After verification, you need to add a credit card or purchase credits before generating API keys. Anthropic does not offer a permanent free tier for the API, but new accounts occasionally receive a small starter credit. Check the console dashboard for any active promotions after signing up.
Note for users outside the US: Anthropic's API is available globally. The June 2026 US export control incident that briefly suspended access for some countries was resolved on July 1, 2026, and international access has been fully restored.
4) Create your API Key
After logging in to console.anthropic.com, navigate to API Keys in the left sidebar. Click "Create Key", give it a descriptive name (for example, your project or application name), and confirm.
The full API key is displayed only once, immediately after creation. Copy it now and store it in a secrets vault, environment variable manager, or password manager. You will not be able to retrieve it again from the console.
- Navigate to console.anthropic.com/settings/keys
- Click "Create Key" → enter a descriptive name → confirm
- Copy the key immediately — it starts with sk-ant- and is shown only once
- Store it as ANTHROPIC_API_KEY in your environment variables
5) Your first Claude Fable 5 API call
Claude Fable 5 uses Anthropic's native API format, not the OpenAI-compatible format. You need the official Anthropic SDK (anthropic-sdk-python or @anthropic-ai/sdk for Node.js). The model ID is claude-fable-5.
Fable 5 supports an optional thinking parameter for deeper analytical work. When thinking is enabled, the model allocates additional compute to problem-solving before generating a final response — ideal for complex coding, multi-step reasoning, or research tasks. Anthropic recommends using the 'high' thinking preset for best results.
import anthropic
import os
client = anthropic.Anthropic(
api_key=os.environ["ANTHROPIC_API_KEY"]
)
# Basic call (no thinking)
response = client.messages.create(
model="claude-fable-5",
max_tokens=1024,
messages=[
{"role": "user", "content": "Explain the Mythos-class safety architecture in Claude Fable 5."}
]
)
print(response.content[0].text)Python — basic call using the official Anthropic SDK
import anthropic
import os
client = anthropic.Anthropic(
api_key=os.environ["ANTHROPIC_API_KEY"]
)
# Call with adaptive thinking enabled (recommended for complex tasks)
response = client.messages.create(
model="claude-fable-5",
max_tokens=16000,
thinking={
"type": "enabled",
"budget_tokens": 10000 # tokens reserved for internal reasoning
},
messages=[
{"role": "user", "content": "Refactor this Python class to be thread-safe and add comprehensive error handling."}
]
)
# Extract thinking and final response separately
for block in response.content:
if block.type == "thinking":
print("[Thinking]:", block.thinking)
elif block.type == "text":
print("[Response]:", block.text)Python — enabling adaptive thinking for complex reasoning tasks
import Anthropic from "@anthropic-ai/sdk";
const client = new Anthropic({
apiKey: process.env.ANTHROPIC_API_KEY,
});
const response = await client.messages.create({
model: "claude-fable-5",
max_tokens: 1024,
messages: [
{ role: "user", content: "What makes Fable 5 better at long-running agentic tasks?" }
]
});
console.log(response.content[0].text);JavaScript / Node.js — using the official Anthropic SDK
curl https://api.anthropic.com/v1/messages \
-H "Content-Type: application/json" \
-H "x-api-key: $ANTHROPIC_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-d '{
"model": "claude-fable-5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Hello, Fable 5!"}
]
}'cURL — quick test to verify your key works
6) Understanding adaptive thinking
Unlike earlier Claude models where extended thinking was an optional feature, Fable 5's adaptive thinking is always active internally — the model continuously allocates reasoning compute based on task complexity. When you enable the thinking parameter in the API, you gain visibility into this process and can control how much compute budget is reserved for it.
The thinking parameter accepts a budget_tokens value that sets the maximum number of tokens for internal reasoning. Higher values produce better results on complex problems but cost more. Anthropic recommends budget_tokens between 5,000 and 15,000 for most complex tasks. The thinking blocks appear in the response alongside the final text block, giving you full transparency into how the model reached its answer.
Practical recommendation: for routine API calls like text generation or simple Q&A, skip the thinking parameter to keep costs low. Enable thinking with a budget of 8,000–12,000 tokens for multi-file refactors, algorithmic design, or multi-step reasoning tasks.
7) Common errors and how to fix them
Most API errors fall into three categories: authentication failures (401), rate limit exceeded (429), and overloaded servers (529). Fable 5 also has a unique behavior: when a request triggers one of its built-in safety classifiers, Cursor and the API will automatically fall back to Claude Opus 4.8 rather than returning an error. This means your task continues uninterrupted.
The most important thing to verify on a 401 is the header format. Anthropic's API uses x-api-key as the header name — not Authorization: Bearer like OpenAI's API. If you are migrating code from OpenAI, this is the most common mistake.
- 401 Unauthorized → check header is x-api-key: <your-key> (NOT Authorization: Bearer)
- 401 Unauthorized → verify ANTHROPIC_API_KEY has no leading/trailing whitespace
- 403 Forbidden → your account may not have Fable 5 access; check console.anthropic.com/settings
- 429 Too Many Requests → implement exponential backoff; check your rate limits in the console
- 529 Overloaded → retry with backoff; Fable 5 is high-demand, transient overload is normal
- Safety auto-fallback → if response seems weaker than expected, check if it was served by Opus 4.8 (response header: x-served-by-model)
8) Pricing — Fable 5 vs. the competition
Fable 5 is priced at $10 per million input tokens and $50 per million output tokens. Cache writes cost $12.50/M and cache reads cost $1/M — making prompt caching especially valuable for long-context applications. This is exactly twice the price of Claude Opus 4.8 ($5/$15 per M), and roughly in line with GPT-5.5's premium tier.
Against the benchmark gains, the cost increase is justified for the right workloads. At Fable 5's SWE-bench accuracy (95.0% vs. Opus 4.8's 69.2%), agentic coding tasks that previously required multiple re-attempts can often be resolved in a single pass — reducing total token spend per completed task even at higher per-token rates.
For cost-sensitive workloads that don't require frontier capability, Claude Sonnet 5 ($3/$15 per M) remains an excellent choice. The recommended strategy is to use Fable 5 for complex multi-step agents and high-stakes code generation, and Sonnet 5 for high-volume, lighter tasks.
- Claude Fable 5: $10 input / $50 output (cache write $12.5 / cache read $1) — per million tokens
- Claude Opus 4.8: $5 input / $15 output — per million tokens
- Claude Sonnet 5: $3 input / $15 output — per million tokens
- GPT-5.5 (OpenAI): ~$10 input / $40 output — per million tokens
- Grok 4.5 (xAI): $2 input / $6 output — per million tokens
- Fable 5 thinking: additional tokens consumed by budget_tokens billed at standard input rate
9) Fable 5 vs. Mythos 5 — what's the difference?
Fable 5 and Mythos 5 share the same model weights — they are the same neural network. The difference is entirely in the safety layer. Fable 5 has Anthropic's standard multi-layer safety classifiers applied on top, which intercept requests in high-risk categories (certain cybersecurity, biomedical, and weapons-related topics) and either decline or fall back to Opus 4.8.
Mythos 5 has no public safety guardrails and is available only through Anthropic's "Project Glasswing" program to vetted government cyber-defense contractors, critical infrastructure operators, and compliant biomedical research institutions. It is not available for purchase through the standard API.
For the vast majority of developers, Fable 5 is functionally identical to Mythos 5 — the safety classifiers only affect edge cases that legitimate commercial applications would not hit. If you encounter an unexpected fallback to Opus 4.8, it almost certainly means the specific prompt pattern triggered a classifier, not that the model itself lacks capability.
FAQ
Is Claude Fable 5 the same as Claude Mythos 5?
They share the same underlying model weights ('Capybara' architecture). The difference is the safety layer: Fable 5 has standard commercial safety classifiers and is publicly available; Mythos 5 has no public guardrails and is restricted to vetted government and security institutions only.
Does Fable 5 use the OpenAI SDK format?
No. Fable 5 uses Anthropic's native Messages API. The key differences: use x-api-key header (not Authorization: Bearer), use the @anthropic-ai/sdk or anthropic Python package, and the response format uses content blocks instead of choices[0].message. If you need OpenAI-compatible access, some third-party providers offer an adapter.
Can I use adaptive thinking on every request?
Yes, but it is not necessary for every request. For simple Q&A or text generation, skip the thinking parameter — it adds cost without much benefit. For complex coding, multi-step reasoning, or long-form analysis, enable thinking with a budget_tokens of 8,000–12,000 for best results.
Is Fable 5 available on Amazon Bedrock and Google Vertex AI?
Yes. Claude Fable 5 is available through Anthropic's direct API, Amazon Bedrock (model ID: anthropic.claude-fable-5-v1), and Google Cloud Vertex AI. Enterprise teams using existing AWS or GCP billing can access Fable 5 through their preferred cloud platform.
What happened with the June 2026 access restriction?
On June 12, 2026 — three days after launch — the US Department of Commerce issued an emergency export control order. Anthropic was given a 90-minute compliance window and suspended international access to both Fable 5 and Mythos 5. After 18 days of negotiations, Commerce Secretary Howard Lutnick signed the order reversal on June 30, and Anthropic restored full global access on July 1, 2026.
Related Providers
Sources
- Anthropic官方发布博文:Claude Fable 5(2026年6月9日)Anthropic · Checked 2026-07-21
- Anthropic API控制台Anthropic Console · Checked 2026-07-21
- Cursor:Claude Fable 5 模型文档与定价Cursor Docs · Checked 2026-07-21
- SWE-bench Verified 95.0%、SWE-bench Pro 80.3%、GPQA Diamond 92.8%(多源交叉核验)Anthropic Docs · Checked 2026-07-21
- 2026年6月出口管制事件及7月1日恢复全球访问(SegmentFault)SegmentFault · Checked 2026-07-21