The two sides of this change are more than 400 edits apart, too far apart to line up, so this is the differ's own diff of it and the words inside a line are not marked.
from line 6
66
77## Compatibility
88- [ZDR](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention): eligible (excludes [Covered Models](https://platform.claude.com/docs/en/manage-claude/api-and-data-retention#model-specific-data-retention-requirements))
9- Supported models: `claude-fable-5`, `claude-mythos-5`, `claude-mythos-preview`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-sonnet-5`, `claude-sonnet-4-6`, `claude-opus-4-5-20251101`
9- Supported models: `claude-fable-5-1`, `claude-mythos-5-1`, `claude-fable-5`, `claude-mythos-5`, `claude-mythos-preview`, `claude-opus-5`, `claude-opus-4-8`, `claude-opus-4-7`, `claude-opus-4-6`, `claude-opus-4-5-20251101`, `claude-sonnet-5`, `claude-sonnet-4-6`
1010- Platforms: Claude API, Claude Platform on AWS, Amazon Bedrock, Google Cloud, Microsoft Foundry
1111
12The effort parameter lets you control how many tokens Claude spends when responding to requests. You can trade off between response thoroughness and token efficiency with a single model. The effort parameter is available on all supported models with no beta header required.
12The effort parameter lets you control how many tokens Claude spends when responding to requests. You can trade off between response thoroughness and token efficiency with a single model. The top-level effort parameter is available on all supported models with no beta header required. [Per-message effort](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) is in beta.
1313
1414<Tip>
1515 To learn how effort interacts with thinking and which control to reach for, see [Thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort). Where adaptive thinking is available, effort is the recommended way to control thinking depth.
1616</Tip>
1717
18## How effort works
19
20By default, Claude uses high effort, spending as many tokens as needed for excellent results. You can raise the effort level to `max` for the absolute highest capability, or lower it to be more conservative with token usage, optimizing for speed and cost while accepting some reduction in capability.
21
22<Tip>
23 Setting `effort` to `"high"` produces exactly the same behavior as omitting the `effort` parameter entirely.
24</Tip>
25
26The effort parameter affects **all tokens** in the response, including:
27
28* Text responses and explanations
29* Tool calls and function arguments
30* Thinking (when active)
31
32This approach has two major advantages:
33
341. It doesn't require thinking to be enabled.
352. It can affect all token spend including tool calls. For example, lower effort would mean Claude makes fewer tool calls. This gives a much greater degree of control over efficiency.
36
37### Effort levels
38
39| Level | Description | Typical use case |
40| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
41| `max` | Absolute maximum capability with no constraints on token spending. Available on Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Opus 4.8, Claude Mythos Preview, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5, and Claude Sonnet 4.6. | Tasks requiring the deepest possible reasoning and most thorough analysis |
42| `xhigh` | Extended capability for long-horizon work. Available on Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, and Claude Sonnet 5. | Long-running agentic and coding tasks (over 30 minutes) with token budgets in the millions |
43| `high` | High capability. Equivalent to not setting the parameter. | Complex reasoning, difficult coding problems, agentic tasks |
44| `medium` | Balanced approach with moderate token savings. | Agentic tasks that require a balance of speed, cost, and performance |
45| `low` | Most efficient. Significant token savings with some capability reduction. | Simpler tasks that need the best speed and lowest costs, such as subagents |
46
47`xhigh` is a newer level; some models that support `max` don't support `xhigh`.
48
49<Note>
50 Effort is a behavioral signal, not a strict token budget. At lower effort levels, Claude will still think on sufficiently difficult problems, but it will think less than it would at higher effort levels for the same problem.
51</Note>
52
53### Recommended effort levels for Claude Sonnet 5
54
55Claude Sonnet 5 defaults to `high` effort on the Claude API and Claude Code.
56
57* **High effort (default):** Suitable for complex reasoning, coding, and agentic tasks where quality matters more than speed or cost.
58* **Xhigh effort:** For the hardest coding and agentic tasks. See [Prompting Claude Sonnet 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5#calibrating-effort-and-thinking-depth).
59* **Medium effort:** Cost-saving step-down from the default. Comparable to Claude Sonnet 4.6 at high effort.
60* **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized.
61* **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending.
62
63### Recommended effort levels for Claude Sonnet 4.6
64
65Sonnet 4.6 defaults to `high` effort. Explicitly set effort when using Sonnet 4.6 to avoid unexpected latency:
66
67* **Medium effort** (recommended default): Best balance of speed, cost, and performance for most applications. Suitable for agentic coding, tool-heavy workflows, and code generation.
68* **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized.
69* **High effort:** For complex reasoning and tasks where quality matters more than speed or cost.
70* **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending.
71
72### Recommended effort levels for Claude Opus 4.7
73
74**Start with `xhigh` for coding and agentic use cases**, and use `high` as the minimum for most intelligence-sensitive workloads. Step down to `medium` for cost-sensitive workloads, or up to `max` only when your evals show measurable headroom at `xhigh`.
75
76The API default is `high`. To use `xhigh`, set `effort` explicitly; the value you pass overrides the default.
77
78| Effort | Guidance for Claude Opus 4.7 |
79| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
80| `low` | Efficient, but best for short, scoped tasks. Pair `low` with explicit checklists if your task has multiple sections. |
81| `medium` | The drop-in for the average workflow where you want good results while reducing costs. |
82| `high` | Advanced use cases that still need a balance of intelligence and token consumption. This is often the best balance of quality and token efficiency. |
83| `xhigh` | The recommended starting point for coding and agentic work, and for exploratory tasks such as repeated tool calling, detailed web search, and knowledge-base search. Expect meaningfully higher token usage than `high`. |
84| `max` | Reserve for genuinely frontier problems. On most workloads `max` adds significant cost for relatively small quality gains, and on some structured-output or less intelligence-sensitive tasks it can lead to overthinking. |
85
86Claude Opus 4.7 also respects effort levels more strictly than Claude Opus 4.6, especially at `low` and `medium`. At lower effort levels, the model scopes its work to what was asked rather than doing more than requested. If you observe shallow reasoning on complex problems with Claude Opus 4.7, raise effort rather than prompting around it. If you must keep effort low for latency, add targeted guidance like "This task involves multistep reasoning. Think carefully before responding."
87
88When running Claude Opus 4.7 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
89
90### Recommended effort levels for Claude Opus 4.8
91
92The guidance for Claude Opus 4.7 also applies to Claude Opus 4.8. **Start with `xhigh` for coding and agentic use cases**, use `high` for most other intelligence-sensitive workloads, and step down to `medium` or `low` only when you've measured that the lower level holds quality on your evals.
93
94The API default is `high`. Set `effort` explicitly to use a different level; the value you pass overrides the default.
95
96When running Claude Opus 4.8 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
97
98### Recommended effort levels for Claude Opus 5
99
100Claude Opus 5 supports all five effort levels. **Start with `high`, the default**, and adjust based on your evals: step up to `xhigh` for demanding coding and agentic work, or to `max` when a task justifies unconstrained token spending, and use `low` and `medium` liberally as your primary control for token cost and response time wherever your evals show quality holds. If you carried effort settings over from an earlier model, run a fresh effort sweep on your evals rather than reusing them.
101
102Effort controls thinking volume, not visible response length: on Claude Opus 5, changing effort does not reliably shorten responses, so [prompt for length](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5#response-length-and-verbosity) instead.
103
104The API default is `high`. Set `effort` explicitly to use a different level; the value you pass overrides the default.
105
106On Claude Opus 5, thinking cannot be disabled at `xhigh` or `max` effort: requests that set `thinking: {"type": "disabled"}` at those levels return a 400 error. See [Effort with thinking](https://platform.claude.com/docs/en/build-with-claude/effort#effort-with-thinking).
107
108When running Claude Opus 5 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
109
110### Recommended effort levels for Claude Fable 5
111
112Effort is the primary control for trading off intelligence, latency, and cost on Claude Fable 5. **Start with `high`, the default, for most tasks**, use `xhigh` for the most capability-sensitive workloads, and step down to `medium` or `low` for routine work. Lower effort settings on Claude Fable 5 still perform well and often exceed `xhigh` performance on prior models. At `high` and `xhigh`, set a large `max_tokens`: it is a hard limit on total output, thinking plus response text. See [Cost control](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#cost-control).
113
114Reduce effort if a task completes but takes longer than necessary, or if you want a faster, more interactive working style. The same recommendations apply to Claude Mythos 5. For fuller guidance, see [Prompting Claude Fable 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5).
115
116## Basic usage
18## Set the effort level
19
20Set `output_config.effort` on the request. The following example runs one request at `medium` effort and prints the response text.
11721
11822<CodeGroup>
11923 ```bash cURL
from line 198
294198 ```
295199</CodeGroup>
296200
297## When to adjust the effort parameter
298
299* Use **max effort** when you need the absolute highest capability with no constraints: the most thorough reasoning and deepest analysis. Available on Claude 4.6 and later models and Claude Mythos Preview.
300* Use **xhigh effort** for advanced coding and complex agentic work requiring extended exploration, such as repeated tool calling and detailed search. Available on Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, and Claude Sonnet 5.
301* Use **high effort** (the default) for complex reasoning, nuanced analysis, difficult coding problems, or any task where quality matters more than speed or cost.
302* Use **medium effort** as a balanced option when you want solid performance without the full token expenditure of high effort.
303* Use **low effort** when you're optimizing for speed (because Claude answers with fewer tokens) or cost. For example, simple classification tasks, quick lookups, or high-volume use cases where marginal quality improvements don't justify additional latency or spend.
201## How effort works
202
203By default, Claude uses high effort, spending as many tokens as needed for excellent results. You can raise the effort level to `max` for the absolute highest capability, or lower it to be more conservative with token usage, optimizing for speed and cost while accepting some reduction in capability.
204
205<Tip>
206 Setting `effort` to `"high"` produces exactly the same behavior as omitting the `effort` parameter entirely.
207</Tip>
208
209The effort parameter affects **all tokens** in the response, including:
210
211* Text responses and explanations
212* Tool calls and function arguments
213* Thinking (when active)
214
215Because effort applies to every output token, it works whether or not thinking is enabled. Lower effort also means fewer and terser tool calls.
216
217### Effort levels
218
219| Level | Description | Typical use case |
220| -------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------ |
221| `max` | Absolute maximum capability with no constraints on token spending. Available on Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Mythos Preview, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, Claude Opus 4.6, Claude Sonnet 5, and Claude Sonnet 4.6. | Tasks requiring the deepest possible reasoning and most thorough analysis |
222| `xhigh` | Extended capability for long-horizon work. Available on Claude Fable 5.1, Claude Mythos 5.1, Claude Fable 5, Claude Mythos 5, Claude Opus 5, Claude Opus 4.8, Claude Opus 4.7, and Claude Sonnet 5. | Long-running agentic and coding tasks (over 30 minutes) with token budgets in the millions |
223| `high` | High capability. Equivalent to not setting the parameter. | Complex reasoning, difficult coding problems, agentic tasks |
224| `medium` | Balanced approach with moderate token savings. | Agentic tasks that require a balance of speed, cost, and performance |
225| `low` | Most efficient. Significant token savings with some capability reduction. | Simpler tasks that need the best speed and lowest costs, such as subagents |
226
227Not every model that supports `max` supports `xhigh`.
228
229<Note>
230 Effort is a behavioral signal, not a strict token budget. At lower effort levels, Claude still thinks on sufficiently difficult problems, but thinks less than it would at higher effort levels for the same problem.
231</Note>
232
233The per-model recommendations that follow override this table where they differ.
234
235### Recommended effort levels for Claude Fable 5.1
236
237Claude Fable 5.1 supports all five effort levels. **Start with `high`, the default.** Step up to `xhigh` or `max` for the most capability-sensitive agentic and coding work, and step down to `medium` or `low` for routine or latency-sensitive work once your evals show quality holds. At `high` and above, set a large `max_tokens`. It's a hard limit on total output (thinking plus response text). The same recommendations apply to Claude Mythos 5.1. See [Prompting Claude Fable 5.1](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5-1#consider-all-effort-levels).
238
239Claude Fable 5.1 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache.
240
241### Recommended effort levels for Claude Fable 5
242
243Effort is the primary control for trading off intelligence, latency, and cost on Claude Fable 5. **Start with `high`, the default, for most tasks**, use `xhigh` for the most capability-sensitive workloads, and step down to `medium` or `low` for routine work. Lower effort settings on Claude Fable 5 still perform well and often exceed `xhigh` performance on prior models. At `high` and `xhigh`, set a large `max_tokens`. It's a hard limit on total output (thinking plus response text). See [Cost control](https://platform.claude.com/docs/en/build-with-claude/thinking-steering-and-cost#cost-control).
244
245Reduce effort if a task completes but takes longer than necessary, or if you want a faster, more interactive working style. The same recommendations apply to Claude Mythos 5. For fuller guidance, see [Prompting Claude Fable 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-fable-5).
246
247### Recommended effort levels for Claude Opus 5
248
249Claude Opus 5 supports all five effort levels. **Start with `high`, the default**, and adjust based on your evals: step up to `xhigh` for demanding coding and agentic work, or to `max` when a task justifies unconstrained token spending, and use `low` and `medium` liberally as your primary control for token cost and response time wherever your evals show quality holds. If you carried effort settings over from an earlier model, run a fresh effort sweep on your evals rather than reusing them.
250
251Effort controls thinking volume, not visible response length: on Claude Opus 5, changing effort does not reliably shorten responses, so [prompt for length](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-opus-5#response-length-and-verbosity) instead.
252
253The API default is `high`. Set `effort` explicitly to use a different level. The value you pass overrides the default.
254
255On Claude Opus 5, thinking cannot be disabled at `xhigh` or `max` effort: requests that set `thinking: {"type": "disabled"}` at those levels return a 400 error. See [Effort with thinking](https://platform.claude.com/docs/en/build-with-claude/effort#effort-with-thinking).
256
257When running Claude Opus 5 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
258
259Claude Opus 5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) with a per-message `output_config`, which preserves the prompt cache.
260
261### Recommended effort levels for Claude Opus 4.8
262
263The guidance for Claude Opus 4.7 also applies to Claude Opus 4.8. **Start with `xhigh` for coding and agentic use cases**, use `high` for most other intelligence-sensitive workloads, and step down to `medium` or `low` only when you've measured that the lower level holds quality on your evals.
264
265The API default is `high`. Set `effort` explicitly to use a different level. The value you pass overrides the default.
266
267When running Claude Opus 4.8 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
268
269### Recommended effort levels for Claude Opus 4.7
270
271**Start with `xhigh` for coding and agentic use cases**, and use `high` as the minimum for most intelligence-sensitive workloads. Step down to `medium` for cost-sensitive workloads, or up to `max` only when your evals show measurable headroom at `xhigh`.
272
273The API default is `high`. To use `xhigh`, set `effort` explicitly. The value you pass overrides the default.
274
275| Effort | Guidance for Claude Opus 4.7 |
276| -------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
277| `low` | Efficient, but best for short, scoped tasks. Pair `low` with explicit checklists if your task has multiple sections. |
278| `medium` | The drop-in for the average workflow where you want good results while reducing costs. |
279| `high` | Advanced use cases that still need a balance of intelligence and token consumption. This is often the best balance of quality and token efficiency. |
280| `xhigh` | The recommended starting point for coding and agentic work, and for exploratory tasks such as repeated tool calling, detailed web search, and knowledge-base search. Expect meaningfully higher token usage than `high`. |
281| `max` | Reserve for frontier problems. On most workloads `max` adds significant cost for relatively small quality gains, and on some structured-output or less intelligence-sensitive tasks it can lead to overthinking. |
282
283Claude Opus 4.7 also respects effort levels more strictly than Claude Opus 4.6, especially at `low` and `medium`. At lower effort levels, the model scopes its work to what was asked rather than doing more than requested. If you observe shallow reasoning on complex problems with Claude Opus 4.7, raise effort rather than prompting around it. If you must keep effort low for latency, add targeted guidance like "This task involves multistep reasoning. Think carefully before responding."
284
285When running Claude Opus 4.7 at `xhigh` or `max` effort, set a large `max_tokens` so the model has room to think and act across subagents and tool calls. Starting at 64k tokens and tuning from there is a reasonable default.
286
287### Recommended effort levels for Claude Sonnet 5
288
289Claude Sonnet 5 defaults to `high` effort on the Claude API and Claude Code.
290
291* **High effort (default):** Suitable for complex reasoning, coding, and agentic tasks where quality matters more than speed or cost.
292* **Xhigh effort:** For the hardest coding and agentic tasks. See [Prompting Claude Sonnet 5](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude-sonnet-5#calibrating-effort-and-thinking-depth).
293* **Medium effort:** Cost-saving step-down from the default. Comparable to Claude Sonnet 4.6 at high effort.
294* **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized.
295* **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending.
296
297### Recommended effort levels for Claude Sonnet 4.6
298
299Sonnet 4.6 defaults to `high` effort. Explicitly set effort when using Sonnet 4.6 to avoid unexpected latency:
300
301* **Medium effort** (recommended default): Best balance of speed, cost, and performance for most applications. Suitable for agentic coding, tool-heavy workflows, and code generation.
302* **Low effort:** For high-volume or latency-sensitive workloads. Suitable for chat and non-coding use cases where faster turnaround is prioritized.
303* **High effort:** For complex reasoning and tasks where quality matters more than speed or cost.
304* **Max effort:** For tasks requiring the absolute highest capability with no constraints on token spending.
304305
305306## Effort with tool use
306307
from line 323
322323
323324The `thinking` parameter controls whether Claude thinks in [thinking blocks](https://platform.claude.com/docs/en/build-with-claude/thinking) before answering; the `effort` parameter controls how much work Claude puts into the whole response, which in adaptive mode includes how often and how deeply it thinks. Don't pass `adaptive` as an `effort` value: `adaptive` is a thinking mode, not an effort level.
324325
325At higher effort levels, Claude thinks on most requests and at greater length; at lower levels, it can skip thinking entirely for simpler problems. See [Thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort) for full guidance on how the two controls work together.
326At higher effort levels, Claude thinks on most requests and at greater length. At lower levels, it can skip thinking entirely for simpler problems. See [Thinking and effort](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-effort) for full guidance on how the two controls work together.
326327
327328On Claude Opus 4.5, the only extended-thinking-only model that supports effort, it works alongside [`budget_tokens`](https://platform.claude.com/docs/en/build-with-claude/extended-thinking): set the effort level for your task, then set the thinking token budget based on how much reasoning depth the task needs.
328329
329For per-model thinking availability, see the [per-model configuration table](https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#supported-models). Effort works with or without thinking; see [How effort works](https://platform.claude.com/docs/en/build-with-claude/effort#how-effort-works).
330
331## Changing effort mid-conversation
332
333`output_config.effort` is a request-level setting: each request carries its own value, so to run a later part of a conversation at a different effort level, set the new value on the next request. The effort level applies to the whole request. Because effort shapes the rendered prompt, changing it between requests does not preserve cached prefixes from earlier turns; if you rely on [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) across a long session, pick an effort level at the start and keep it constant.
330For per-model thinking availability, see the [per-model configuration table](https://platform.claude.com/docs/en/build-with-claude/thinking-troubleshooting#supported-models). Effort works with or without thinking. See [How effort works](https://platform.claude.com/docs/en/build-with-claude/effort#how-effort-works).
331
332## Change effort mid-conversation
333
334You can run later turns of a conversation at a different effort level in two ways. On Claude Fable 5.1, Claude Mythos 5.1, and Claude Opus 5, use a per-message effort change, which keeps the prompt cache. On other models, set a new top-level value on the next request, which starts the cache over.
335
336### Per-message effort (beta)
337
338Per-message effort is in beta and requires the [beta header](https://platform.claude.com/docs/en/api/beta-headers) `mid-conversation-output-config-2026-07-01`. Models without per-message effort, including Claude Fable 5, return a 400 error: `output_config.effort requires a model that supports per-turn effort; this model does not`.
339
340Add a `role: "system"` message with empty `content` and the new level in `output_config.effort`. The new level takes effect from the next `user` turn and holds until a later message changes it. Everything before that message is unchanged, so the cached prefix still matches.
341
342The following example starts at `high`, then drops to `low` for a routine follow-up:
343
344<CodeGroup>
345 ```bash cURL
346 # Effort-only system message: the new level takes effect from the next user turn.
347 curl https://api.anthropic.com/v1/messages \
348 -H "x-api-key: $ANTHROPIC_API_KEY" \
349 -H "anthropic-version: 2023-06-01" \
350 -H "anthropic-beta: mid-conversation-output-config-2026-07-01" \
351 -H "content-type: application/json" \
352 -d '{
353 "model": "claude-fable-5-1",
354 "max_tokens": 4096,
355 "output_config": {"effort": "high"},
356 "messages": [
357 {"role": "user", "content": "Plan a migration from SQLite to PostgreSQL in three short steps."},
358 {"role": "assistant", "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
359 {"role": "system", "content": [], "output_config": {"effort": "low"}},
360 {"role": "user", "content": "Summarize the plan in one sentence."}
361 ]
362 }'
363 ```
364
365 ```bash CLI
366 ant beta:messages create --beta mid-conversation-output-config-2026-07-01 \
367 --transform 'content.#(type=="text").text' --raw-output <<'YAML'
368 model: claude-fable-5-1
369 max_tokens: 4096
370 output_config:
371 effort: high
372 messages:
373 - role: user
374 content: Plan a migration from SQLite to PostgreSQL in three short steps.
375 - role: assistant
376 content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
377 # Effort-only system message: the new level takes effect from the next user turn.
378 - role: system
379 content: []
380 output_config:
381 effort: low
382 - role: user
383 content: Summarize the plan in one sentence.
384 YAML
385 ```
386
387 ```python Python
388 client = anthropic.Anthropic()
389
390 response = client.beta.messages.create(
391 model="claude-fable-5-1",
392 max_tokens=4096,
393 output_config={"effort": "high"},
394 messages=[
395 {
396 "role": "user",
397 "content": "Plan a migration from SQLite to PostgreSQL in three short steps.",
398 },
399 {
400 "role": "assistant",
401 "content": "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.",
402 },
403 # Effort-only system message: the new level takes effect from the next user turn.
404 {"role": "system", "content": [], "output_config": {"effort": "low"}},
405 {"role": "user", "content": "Summarize the plan in one sentence."},
406 ],
407 betas=["mid-conversation-output-config-2026-07-01"],
408 )
409
410 for block in response.content:
411 if block.type == "text":
412 print(block.text)
413 ```
414
415 ```typescript TypeScript
416 const client = new Anthropic();
417
418 const response = await client.beta.messages.create({
419 model: "claude-fable-5-1",
420 max_tokens: 4096,
421 output_config: { effort: "high" },
422 messages: [
423 {
424 role: "user",
425 content: "Plan a migration from SQLite to PostgreSQL in three short steps."
426 },
427 {
428 role: "assistant",
429 content:
430 "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."
431 },
432 // Effort-only system message: the new level takes effect from the next user turn.
433 { role: "system", content: [], output_config: { effort: "low" } },
434 { role: "user", content: "Summarize the plan in one sentence." }
435 ],
436 betas: ["mid-conversation-output-config-2026-07-01"]
437 });
438
439 for (const block of response.content) {
440 if (block.type === "text") {
441 console.log(block.text);
442 }
443 }
444 ```
445
446 ```csharp C#
447 using Anthropic.Models.Beta;
448 using Anthropic.Models.Beta.Messages;
449
450 AnthropicClient client = new();
451
452 var response = await client.Beta.Messages.Create(new MessageCreateParams
453 {
454 Model = "claude-fable-5-1",
455 MaxTokens = 4096,
456 OutputConfig = new() { Effort = Effort.High },
457 Messages =
458 [
459 new() { Role = Role.User, Content = "Plan a migration from SQLite to PostgreSQL in three short steps." },
460 new() { Role = Role.Assistant, Content = "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts." },
461 // Effort-only system message: the new level takes effect from the next user turn.
462 new()
463 {
464 Role = Role.System,
465 Content = new([]),
466 OutputConfig = new() { Effort = BetaSystemMessageOutputConfigEffort.Low },
467 },
468 new() { Role = Role.User, Content = "Summarize the plan in one sentence." },
469 ],
470 Betas = [AnthropicBeta.MidConversationOutputConfig2026_07_01],
471 });
472
473 foreach (var block in response.Content)
474 {
475 if (block.TryPickText(out var textBlock))
476 {
477 Console.WriteLine(textBlock.Text);
478 }
479 }
480 ```
481
482 ```go Go
483 client := anthropic.NewClient()
484
485 response, err := client.Beta.Messages.New(context.Background(), anthropic.BetaMessageNewParams{
486 Model: "claude-fable-5-1",
487 MaxTokens: 4096,
488 OutputConfig: anthropic.BetaOutputConfigParam{
489 Effort: anthropic.BetaOutputConfigEffortHigh,
490 },
491 Messages: []anthropic.BetaMessageParam{
492 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Plan a migration from SQLite to PostgreSQL in three short steps.")),
493 {
494 Role: anthropic.BetaMessageParamRoleAssistant,
495 Content: []anthropic.BetaContentBlockParamUnion{anthropic.NewBetaTextBlock("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")},
496 },
497 // Effort-only system message: the new level takes effect from the next user turn.
498 anthropic.NewBetaSystemMessage(anthropic.BetaSystemMessageOutputConfigParam{
499 Effort: anthropic.BetaSystemMessageOutputConfigEffortLow,
500 }),
501 anthropic.NewBetaUserMessage(anthropic.NewBetaTextBlock("Summarize the plan in one sentence.")),
502 },
503 Betas: []anthropic.AnthropicBeta{anthropic.AnthropicBetaMidConversationOutputConfig2026_07_01},
504 })
505 if err != nil {
506 log.Fatal(err)
507 }
508
509 for _, block := range response.Content {
510 if textBlock, ok := block.AsAny().(anthropic.BetaTextBlock); ok {
511 fmt.Println(textBlock.Text)
512 }
513 }
514 ```
515
516 ```java Java
517 import com.anthropic.models.beta.AnthropicBeta;
518 import com.anthropic.models.beta.messages.BetaMessage;
519 import com.anthropic.models.beta.messages.BetaMessageParam;
520 import com.anthropic.models.beta.messages.BetaOutputConfig;
521 import com.anthropic.models.beta.messages.BetaSystemMessageOutputConfig;
522 import com.anthropic.models.beta.messages.MessageCreateParams;
523
524 void main() {
525 AnthropicClient client = AnthropicOkHttpClient.fromEnv();
526
527 MessageCreateParams params = MessageCreateParams.builder()
528 .model("claude-fable-5-1")
529 .maxTokens(4096L)
530 .addBeta(AnthropicBeta.MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01)
531 .outputConfig(BetaOutputConfig.builder()
532 .effort(BetaOutputConfig.Effort.HIGH)
533 .build())
534 .addUserMessage("Plan a migration from SQLite to PostgreSQL in three short steps.")
535 .addAssistantMessage("1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.")
536 // Effort-only system message: the new level takes effect from the next user turn.
537 .addMessage(BetaMessageParam.builder()
538 .role(BetaMessageParam.Role.SYSTEM)
539 .contentOfBetaContentBlockParams(List.of())
540 .outputConfig(BetaSystemMessageOutputConfig.builder()
541 .effort(BetaSystemMessageOutputConfig.Effort.LOW)
542 .build())
543 .build())
544 .addUserMessage("Summarize the plan in one sentence.")
545 .build();
546
547 BetaMessage response = client.beta().messages().create(params);
548 response.content().stream()
549 .flatMap(block -> block.text().stream())
550 .forEach(textBlock -> IO.println(textBlock.text()));
551 }
552 ```
553
554 ```php PHP
555 use Anthropic\Beta\AnthropicBeta;
556 use Anthropic\Beta\Messages\BetaMessageParam;
557 use Anthropic\Beta\Messages\BetaOutputConfig;
558 use Anthropic\Beta\Messages\BetaSystemMessageOutputConfig;
559 use Anthropic\Client;
560
561 $client = new Client();
562
563 $response = $client->beta->messages->create(
564 model: 'claude-fable-5-1',
565 maxTokens: 4096,
566 outputConfig: BetaOutputConfig::with(effort: 'high'),
567 messages: [
568 BetaMessageParam::with(role: 'user', content: 'Plan a migration from SQLite to PostgreSQL in three short steps.'),
569 BetaMessageParam::with(role: 'assistant', content: '1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts.'),
570 // Effort-only system message: the new level takes effect from the next user turn.
571 BetaMessageParam::with(
572 role: 'system',
573 content: [],
574 outputConfig: BetaSystemMessageOutputConfig::with(effort: 'low'),
575 ),
576 BetaMessageParam::with(role: 'user', content: 'Summarize the plan in one sentence.'),
577 ],
578 betas: [AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01],
579 );
580
581 foreach ($response->content as $block) {
582 if ($block->type === 'text') {
583 echo $block->text, PHP_EOL;
584 }
585 }
586 ```
587
588 ```ruby Ruby
589 client = Anthropic::Client.new
590
591 response = client.beta.messages.create(
592 model: "claude-fable-5-1",
593 max_tokens: 4096,
594 output_config: {effort: :high},
595 messages: [
596 {role: "user", content: "Plan a migration from SQLite to PostgreSQL in three short steps."},
597 {role: "assistant", content: "1. Export the SQLite data. 2. Create the PostgreSQL schema. 3. Import the data and verify row counts."},
598 # Effort-only system message: the new level takes effect from the next user turn.
599 {role: "system", content: [], output_config: {effort: :low}},
600 {role: "user", content: "Summarize the plan in one sentence."}
601 ],
602 betas: [Anthropic::AnthropicBeta::MID_CONVERSATION_OUTPUT_CONFIG_2026_07_01]
603 )
604
605 response.content.each do |block|
606 puts block.text if block.type == :text
607 end
608 ```
609</CodeGroup>
610
611An effort-only system message carries no text, so the [placement rules for mid-conversation system messages](https://platform.claude.com/docs/en/build-with-claude/mid-conversation-system-messages#limitations) don't apply. It can appear anywhere in `messages`, including as the first entry or between an `assistant` turn and the next `user` turn. Values are the level names (`low`, `medium`, `high`, `xhigh`, and `max`).
612
613On Claude Fable 5.1, prefer this form over changing the top-level value between requests. A top-level change restarts the cache and also steers the model less reliably: its earlier replies were written at the previous level, and it tends to stay consistent with them.
614
615### Top-level effort on the next request
616
617The top-level `output_config.effort` applies to the whole request. To run a later part of a conversation at a different level, set the new value on the next request. Because top-level effort shapes the rendered prompt, changing it between requests doesn't preserve cached prefixes from earlier turns. If you rely on [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) across a long session and your model doesn't support per-message effort, pick an effort level at the start and keep it constant.
334618
335619## Best practices
336620
from line 622
3386222. **Use low for speed-sensitive or simple tasks:** When latency matters or tasks are straightforward, low effort can significantly reduce response times and costs.
3396233. **Test your use case:** The impact of effort levels varies by task type. Evaluate performance on your specific use cases before deploying.
3406244. **Consider dynamic effort:** Adjust effort based on task complexity. Simple queries may warrant low effort while agentic coding and complex reasoning benefit from high effort. See the next item before varying it within one conversation.
3415. **Hold effort constant within cached conversations:** Changing the effort value between requests invalidates [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), so vary effort across workloads rather than within a conversation that relies on cache hits. See [Thinking and prompt caching](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-prompt-caching).
6255. **Hold top-level effort constant within cached conversations:** Changing the top-level effort value between requests invalidates [prompt caching](https://platform.claude.com/docs/en/build-with-claude/prompt-caching), so vary it across workloads rather than within a conversation that relies on cache hits. On models that support it, use a [per-message effort change](https://platform.claude.com/docs/en/build-with-claude/effort#change-effort-mid-conversation-beta) instead, which preserves the cache. See [Thinking and prompt caching](https://platform.claude.com/docs/en/build-with-claude/thinking#thinking-and-prompt-caching).
342626
343627## Next steps
344628
345629