Claude Fable 5.2 API

anthropic/claude-fable-5.2
1,000,000 tokens · 1280 input / 6400 output credits / 1M tokens

Claude Fable 5.2 Text Generation turns long-context code and documents into structured code and multi-step analyses at 1,280/6,400 credits per 1M tokens. With the Claude Fable 5.2 API, 5m and 1h prompt-cache tiers sharply cut repeated-context costs.

Claude Fable 5.2

Anthropic · chat-completions

Chat with Claude Fable 5.2

Each model has its own conversation. Switching never sends another model's history, and switching back resumes where you left off. Requests are billed from actual token usage.

Ctrl / ⌘ + Enter to send0 / 32,000

Continue with

What is the Claude Fable 5.2 API?

Claude Fable 5.2 upgrades Anthropic's Fable 5 lineup for agentic coding, long-document analysis, and iterative developer workflows across a 1,000,000-token context window. The Claude Fable 5.2 API pairs lower base token pricing with prompt-cache reads plus 5-minute and 1-hour cache-write tiers over /v1/messages or /v1/chat/completions.

Why choose the Claude Fable 5.2 API?

The Claude Fable 5.2 API combines lower base rates with 5-minute and 1-hour prompt caching across a 1M-token context window.

  • Lower token pricing than Fable 5 / 5.1Lowers base rates to 1,280 credits ($6.40) input and 6,400 credits ($32) output per 1M tokens.

  • Full 5m & 1h prompt-caching tiersCache repeated repo context with 32 credits/1M reads and 5-minute or 1-hour cache-write tiers.

  • Dual-protocol Messages & Chat CompletionsWorks seamlessly with Anthropic SDKs (/v1/messages) and OpenAI-style clients (/v1/chat/completions).

What parameters does the Claude Fable 5.2 API accept?

This API accepts Messages or Chat Completions requests with anthropic/claude-fable-5.2, messages, max_tokens, cache_control, and stream.

ParameterRequirementDescription
modelRequired

Set to anthropic/claude-fable-5.2 for both /v1/messages and /v1/chat/completions.

messagesRequired

Ordered array of role and content conversation turns.

max_tokensRequired for Claude Messages

Positive integer setting maximum output tokens.

systemOptional

System instructions as string or structured text blocks.

cache_controlOptional

Prompt-cache breakpoints supporting 5-minute and 1-hour TTL tiers on /v1/messages.

streamOptional

false for JSON response or true for SSE streaming.

Defaultfalsetrue

How do you use the Claude Fable 5.2 API?

Pick /v1/messages or /v1/chat/completions, pass anthropic/claude-fable-5.2, add cache breakpoints for long context, and stream responses.

  1. Select protocolUse /v1/messages for Anthropic features including cache_control, or /v1/chat/completions for OpenAI SDKs.

  2. Mark cache breakpointsAttach cache_control to long system prompts, tool schemas, or repository excerpts.

  3. Send anthropic/claude-fable-5.2Provide ordered messages and max_tokens, with optional stream: true.

  4. Verify cache hit savingsInspect cache_read_input_tokens and cache_creation_input_tokens in usage metadata.

How much does the Claude Fable 5.2 API cost?

The Claude Fable 5.2 API costs 1,280 credits ($6.40) input, 6,400 credits ($32) output, and 32 credits ($0.16) cache read per 1M tokens. 200 credits = $1.

UsageRateDetails
Input$6.40 · 1280 credits / 1M tokensStandard uncached input tokens.
Cache read$0.16 · 32 credits / 1M tokensInput tokens served from prompt cache.
Cache write (5m)$8.00 · 1600 credits / 1M tokensWriting prompt-cache entries with 5-minute TTL.
Cache write (1h)$12.80 · 2560 credits / 1M tokensWriting prompt-cache entries with 1-hour extended TTL.
Output$32.00 · 6400 credits / 1M tokensGenerated output tokens.

What is the Claude Fable 5.2 API best for?

This API fits long-running coding agents, multi-turn document review with prompt caching, and high-throughput developer workflows.

  • Long-running coding agentsRun iterative coding agents while caching shared repository prompts at 32 credits per 1M read tokens.

  • High-frequency document Q&AUse 1-hour cache TTL to answer repeated queries against large regulatory or financial packs.

  • Structured multi-step reasoningCombine high capability with lower per-token rates than earlier Fable 5 releases.

Pro Tips

  • Place stable system prompts and repo files before cache breakpoints to maximize 5m and 1h cache hits.
  • Use 1-hour cache writes for interactive sessions that pause more than 5 minutes between user turns.

Usage Notes

  • Supports both /v1/messages and /v1/chat/completions under model ID anthropic/claude-fable-5.2.
  • Available on both /v1/messages and /v1/chat/completions as anthropic/claude-fable-5.2.

Related Models

Claude Fable 5.2 API FAQ

What is the Claude Fable 5.2 API?

Claude Fable 5.2 Text Generation is Anthropic's upgraded 1M-context language model for agentic coding and long-document analysis. The Claude Fable 5.2 API pairs lower 1,280/6,400 credit base rates with prompt-cache read and 5-minute/1-hour write tiers over /v1/messages or /v1/chat/completions. Dedicated prompt caching keeps multi-turn agent loops fast and economical on large codebases. You can call it programmatically or try it from the playground above.

How much does the Claude Fable 5.2 API cost per million tokens?

Input is 1,280 credits ($6.40), output 6,400 credits ($32), cache read 32 credits ($0.16), and 5m/1h cache writes 1,600/2,560 credits per 1M tokens.

Does the Claude Fable 5.2 API support 1-hour prompt caching?

Yes. Both 5-minute cache writes (1600 credits/1M) and 1-hour cache writes (2560 credits/1M) are supported, with cache reads at 32 credits/1M.

Which protocols work with the Claude Fable 5.2 API?

Anthropic /v1/messages and OpenAI-compatible /v1/chat/completions using model ID anthropic/claude-fable-5.2.

How does Claude Fable 5.2 compare with Claude Fable 5 and 5.1?

Claude Fable 5.2 offers lower base pricing (1280/6400 vs 2142.8/10714 on Fable 5 and 1600/8000 on Fable 5.1) plus explicit 5m and 1h cache-write billing tiers.

What context and output limits does Claude Fable 5.2 have?

Up to 1,000,000 context tokens and up to 128,000 output tokens.

Does Claude Fable 5.2 support SSE streaming?

Yes. Pass stream: true on either /v1/messages or /v1/chat/completions.