Claude Fable 5.2 API
anthropic/claude-fable-5.2Claude 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
Quick start
Send a POST request to /v1/messages with anthropic/claude-fable-5.2. Choose JSON or SSE with stream, and receive generated content and usage.
- Endpoint
- POST /v1/messages
- Model ID
- anthropic/claude-fable-5.2
- Protocol
- Claude Messages
Request fields
| Field | Requirement | Description |
|---|---|---|
| model | Required | anthropic/claude-fable-5.2 |
| messages | Required | A non-empty ordered conversation array; each message has role and content. |
| max_tokens | Required | A positive integer setting the maximum output tokens for this response. |
| system | Optional | System instructions as a string or text blocks. |
| temperature | Optional | Sampling temperature; the playground allows 0–2. |
| top_p | Optional | Nucleus sampling probability; the playground allows 0–1 and defaults to 1. |
| cache_control | Optional | Places a prompt-cache marker on cacheable content. |
| stream | Optional | Returns an SSE event stream when true. |
Response and usage
Successful responses include generated content and usage. Billing settles from actual input, output, and cache tokens.
Streaming
Set stream: true to read SSE. Finalize usage accounting from the terminal usage event.
curl --request POST \
--url "https://api.vidgo.ai/v1/messages" \
--header "x-api-key: $VIDGO_API_KEY" \
--header 'anthropic-version: 2023-06-01' \
--header 'Content-Type: application/json' \
--data '{
"model": "anthropic/claude-fable-5.2",
"messages": [
{
"role": "user",
"content": "Explain why deterministic retries matter in distributed systems."
}
],
"max_tokens": 1024,
"temperature": 1,
"top_p": 1,
"stream": false
}'Keep API keys on the server. Never expose them in browser code or public repositories.
Continue with
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.





































