Claude Fable 5.2
Anthropic's Fable-family model for hard reasoning and long-running agentic work: always reasons (deeply by default), tool calling, image input, JSON-schema output, prompt caching, 1,000,000-token context.
characteristics
Co potrafi
Opis
Capabilities
- Text and image input, text output. Pass an image as a data URI (base64) or as a link: the platform downloads linked images, so the address must be publicly reachable without authorization.
- Tool calling (function calling). tool_choice is auto (default: the model decides whether to call a tool) or none (no tool calls). The model can call several tools in one answer; parallel_tool_calls: false limits it to one call per answer.
- Reasoning is always on: the model thinks before answering and decides how much by the difficulty of the task and the chosen depth.
- Strict JSON-schema output: response_format {"type": "json_schema", "json_schema": {"name": ..., "schema": {...}}}.
- Stop sequences (stop): the answer ends before the first match.
- Streaming (stream): text, reasoning and tool calls arrive as they are generated; token usage comes in the last chunk.
Reasoning depth
reasoning_effort sets how thoroughly the model thinks:
- low — faster and cheaper: simple questions are answered right away, without reasoning;
- medium — for tasks of moderate difficulty;
- high — the default: the model thinks before almost every answer;
- xhigh — for hard multi-step tasks;
- max — the deepest reasoning, the slowest and most expensive answers.
Reasoning cannot be turned off: none and minimal run as low. Other values are rejected with error 400. For fast and cheap answers set low or medium explicitly: by default the model thinks deeply. A line in the prompt such as “answer right away, without deliberating” does not turn reasoning off: only reasoning_effort sets the depth.
The reasoning text arrives as a short summary in reasoning_content (in a stream, in reasoning_content chunks). You pay for all reasoning tokens, not only for the summary: see usage.completion_tokens_details.reasoning_tokens.
Multi-step tool use
The agent loop is the usual one: the model returns a call (finish_reason: tool_calls), you run the tool and send the result as a message with role tool and the same tool_call_id, and the model continues. Send the results of several calls from one answer one after another, each in its own message. Before a call the model often writes a short note about what it is going to do: this text comes in content together with the call.
The platform keeps the reasoning that led to a call and gives it back to the model on the next step. You do not need to store or resend it: the call ids are enough.
The model accepts its earlier reasoning only while the start of the conversation stays the same. If you change the system prompt, the tool list or earlier messages between steps, the reasoning of earlier steps does not reach the model: the step still runs, but the model has to reason again and the answer costs more. To keep the reasoning, only append to the history.
Forced calls (tool_choice: required or a specific function) are not supported and return error 400. To make the model use a tool, ask for it in the message and keep tool_choice: auto.
JSON-schema output
Every object in the schema must set "additionalProperties": false, otherwise the request fails with error 400. json_object mode (JSON without a schema) is not supported: pass your own schema via json_schema.
{
"model": "anthropic/claude-fable-5.2-08130",
"reasoning_effort": "medium",
"messages": [{"role": "user", "content": "Name three rainbow colors"}],
"response_format": {
"type": "json_schema",
"json_schema": {
"name": "colors",
"schema": {
"type": "object",
"properties": {"colors": {"type": "array", "items": {"type": "string"}}},
"required": ["colors"],
"additionalProperties": false
}
}
}
}Limits
- Context window 1,000,000 tokens, output up to 128,000 tokens (max_tokens from 1 to 128,000). Reasoning counts toward max_tokens: with a small value the answer may stop during reasoning (finish_reason: length).
- If max_tokens is not set, the platform uses the largest value possible for your request.
- A non-streaming request that runs longer than 5 minutes fails. The model thinks for a long time, so use stream: true for hard tasks and long answers.
Not supported
temperature, top_p, frequency_penalty, presence_penalty and seed cannot be set for this model: if you pass them, the platform does not send them and the request runs without them.
Pricing
Reasoning tokens are billed as output tokens. The model is cheaper than Claude Fable 5.1 but still one of the most expensive in the catalog, and by default it thinks deeply: for simple tasks choose low or medium, or a lighter model.
Prompt caching
The platform caches the start of a request on its own: the system prompt, tool definitions and earlier messages. The next request with the same start reads it from the cache at the cache read price, which is many times lower than the input price. Prices are in the pricing block on this page.
- The cache lives for 5 minutes or 1 hour, and each read extends it by the same time. The default is 5 minutes.
- A 5-minute write costs 1.25 times the normal input price, a 1-hour write costs 2 times. Reads cost the same.
- 5 minutes pays off when requests come more often than every 5 minutes: agents, fast conversations. 1 hour pays off with pauses of up to an hour between requests: a person reading the answer and thinking, a series of questions about one document with breaks.
- Only an identical start is read from the cache: a change in the system prompt, the tools or early messages means a new write.
- Very short requests are not cached: the request runs as usual, without a write.
- It does not pay off for one-off requests with different texts: you pay for the write and there is nothing to read, so turn caching off for such a key.
- You do not need your own cache_control marks in messages: the platform does not accept them and sets its own.
The usage block of the response shows how much was read and written. In Chat Completions: prompt_tokens_details.cached_tokens (read from the cache) and prompt_tokens_details.cache_write_tokens (written to the cache); prompt_tokens is the whole input including both. In Responses: the same fields in input_tokens_details. In Messages (Anthropic format): cache_read_input_tokens and cache_creation_input_tokens, the write split by lifetime in cache_creation (ephemeral_5m_input_tokens and ephemeral_1h_input_tokens), while input_tokens is the input without the cache, so the whole input is the sum of the three fields.
How to choose the lifetime or turn caching off:
- Dashboard → «API keys» → the cache icon of a key: each model has «5 minutes» and «1 hour» switches, only one can be on. Both off means the key's requests to that model go without caching. A key without settings uses 5 minutes.
- Dashboard → «Team» → «Prompt caching»: the same switches for requests paid by the team, set by the owner and admins. They replace the members' key settings; a member can only turn caching off with a key or a header.
- The X-NB-Prompt-Cache header for a single request: 5m (or on) for 5 minutes, 1h for 1 hour, off for no caching. Any other value returns 400.
- Priority: the header, then the key, 5 minutes by default. NeuralBridge IDE uses the settings of the project key.
curl https://api.neuralbridge.ru/v1/chat/completions \
-H "Authorization: Bearer $NB_API_KEY" \
-H "Content-Type: application/json" \
-H "X-NB-Prompt-Cache: 1h" \
-d '{"model": "anthropic/claude-fable-5.2-08130", "messages": [{"role": "user", "content": "Hello"}]}'Best for
Tasks that lighter models cannot handle: hard reasoning, agent sessions that run for hours, multistep research, analysis carried through to a finished document, spreadsheet or deck, coding with tools, whole codebases and large documents in context.
Parametry
Endpointy
Przykłady kodu
/v1 w base_url. Dla Anthropic SDK — bez /v1.