Follow Discord
Sweep 22 Oct 2026 · 21:04Z Build v2.1.309 528 read Stable v2.1.308 Latest v2.1.309 Next v2.1.309 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

425 pages for budget.

Titles and paths first, then pages whose text carries it. Each row opens that page as this site last read it.

Delete a Credential Claude Developer Platform · in the page api/beta/vaults/credentials/delete …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… List Credentials Claude Developer Platform · in the page api/beta/vaults/credentials/list …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Validate an MCP OAuth Credential Claude Developer Platform · in the page api/beta/vaults/credentials/mcp_oauth_validate …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Retrieve a Credential Claude Developer Platform · in the page api/beta/vaults/credentials/retrieve …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Update a Credential Claude Developer Platform · in the page api/beta/vaults/credentials/update …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Delete a Vault Claude Developer Platform · in the page api/beta/vaults/delete …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… List Vaults Claude Developer Platform · in the page api/beta/vaults/list …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Retrieve a Vault Claude Developer Platform · in the page api/beta/vaults/retrieve …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Update a Vault Claude Developer Platform · in the page api/beta/vaults/update …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Webhooks Claude Developer Platform · in the page api/beta/webhooks …id: string` - `workspace_id: string` - `BetaWebhookSessionBudgetReachedEventData object` - `type: "session.budget_reached"` - `id: string` ID of the session that tri… Completions Claude Developer Platform · in the page api/completions …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… Create a Text Completion Claude Developer Platform · in the page api/completions/create …nnels-2026-06-22"` - `"structured-outputs-2025-11-13"` - `"task-budgets-2026-03-13"` - `"thinking-display-updates-2026-08-18"` - `"ce-user-management-2026-07-13"` - `"mid-conversation-o… errors Claude Developer Platform · in the page api/errors …not supported on this model ``` Use `thinking: {"type": "enabled", "budget_tokens": N}` on these models; see [Extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinki… Messages Claude Developer Platform · in the page api/messages …nk. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. Which `type` values are accepted, and w… Batches Claude Developer Platform · in the page api/messages/batches …nk. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. Which `type` values are accepted, a… Create a Message Batch Claude Developer Platform · in the page api/messages/batches/create …nk. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. Which `type` values are accepted, a… Count tokens in a Message Claude Developer Platform · in the page api/messages/count_tokens …nk. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. Which `type` values are accepted, and w… Create a Message Claude Developer Platform · in the page api/messages/create …nk. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit. Which `type` values are accepted, and w… Models Claude Developer Platform · in the page api/models …ts thinking with type 'enabled' (extended thinking with a caller-set `budget_tokens`). - `created_at: string` RFC 3339 datetime string representing the time at which the model was released. Ma… List Models Claude Developer Platform · in the page api/models/list …ts thinking with type 'enabled' (extended thinking with a caller-set `budget_tokens`). - `created_at: string` RFC 3339 datetime string representing the time at which the model was released. Ma… Get a Model Claude Developer Platform · in the page api/models/retrieve …ts thinking with type 'enabled' (extended thinking with a caller-set `budget_tokens`). - `created_at: string` RFC 3339 datetime string representing the time at which the model was released. Ma… spans Claude Developer Platform · in the page api/opentelemetry/spans …| | `anthropic.thinking.budget_tokens` | `int` | The [`budget_tokens`](https://platform.claude.com/docs/en/api/messages#thinking_config_enabl… sent_count = len(messages sent in the compaction request) Claude Developer Platform · in the page build-with-claude/compaction …end puts response ``` </CodeGroup> #### Enforcing a total token budget When a model works on long tasks with many tool-use iterations, total token consumption can grow significantly. You can co… compaction-background Claude Developer Platform · in the page build-with-claude/compaction-background …ThreadPoolExecutor(max_workers=1) # Set this near your real input budget. It is low here so a short conversation compacts. COMPACT_AT_TOKENS = 2500 SYSTEM = "You help design a recipe app's dat… compaction-keep-recent-turns Claude Developer Platform · in the page build-with-claude/compaction-keep-recent-turns …client = anthropic.Anthropic() # Set this near your real input budget. It is low here so a short conversation compacts. COMPACT_AT_TOKENS = 2500 SYSTEM = "You help design a recipe app's dat… compaction-on-demand Claude Developer Platform · in the page build-with-claude/compaction-on-demand …so that a short conversation compacts. Set yours near your real input budget. <CodeGroup exclude="shell"> ```python Python from anthropic.types.beta import BetaMessageParam client = anthropic.… compaction-threshold Claude Developer Platform · in the page build-with-claude/compaction-threshold …end puts response ``` </CodeGroup> #### Enforcing a total token budget When a model works on long tasks with many tool-use iterations, total token consumption can grow significantly. You can co… context-windows Claude Developer Platform · in the page build-with-claude/context-windows …ss:** these models track their remaining context window (their "token budget") throughout a conversation. This lets the model manage long-running tasks against the space that remains rather than guess… effort Claude Developer Platform · in the page build-with-claude/effort …| Long-running agentic and coding tasks (over 30 minutes) with token budgets in the millions | | `high` | Spends as many tokens as the task needs for excellent results. The default on every model t… extended-thinking Claude Developer Platform · in the page build-with-claude/extended-thinking …thinking description: Configure manual extended thinking with a fixed budget_tokens budget on Claude models that support it, and migrate to adaptive thinking. --- <Note> To learn how zero data rete… mid-conversation-effort-example Claude Developer Platform · in the page build-with-claude/mid-conversation-effort-example …ss restarts and is safe under concurrent writers across machines. * **Budget enforcement:** track total subagents launched across the whole session, not just for each Workflow call, and refuse to exce… mid-conversation-system-messages Claude Developer Platform · in the page build-with-claude/mid-conversation-system-messages …auto-approve setting, available tools changed, or the remaining token budget dropped below a threshold. * **User input that should not interrupt an agentic loop.** A user types a follow-up while Claud… preserved-thinking Claude Developer Platform · in the page build-with-claude/preserved-thinking …el `system` prompt on each request to carry the current time, a token budget, a mode flag, or newly discovered project context. That invalidates every thinking block in the conversation. Instead, free… Request 2 caches its request content (not the response) Claude Developer Platform · in the page build-with-claude/prompt-caching …el-specific | ✘ | The thinking configuration (mode, and `budget_tokens` in extended mode) is rendered into the prompt, so changing it always invalidates message blocks; tool and system ca… claude-prompting-best-practices Claude Developer Platform · in the page build-with-claude/prompt-engineering/claude-prompting-best-practices …you need a hard ceiling on thinking costs, extended thinking with a `budget_tokens` cap is still functional on Opus 4.6 and Sonnet 4.6 but is deprecated. On Claude 4.7 and later models, setting `budg… prompting-claude-fable-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5 …thinking only, summarized-only thinking output, no extended thinking budgets), see [Thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking). For the `refusal` s… prompting-claude-haiku-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-haiku-5-5 …effort level to run, or your Claude Haiku 4.5 requests set a thinking budget: [Use effort to control thinking](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/prompting-claude… prompting-claude-opus-4-8 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-4-8 …ude Opus 4.8 at `max` or `xhigh` effort, set a large max output token budget so the model has room to think and act across its subagents and tool calls. Start at 64k tokens and tune from there. </Note… prompting-claude-opus-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5 …DE_MAX_CONCURRENT_SUBAGENTS` environment variables and the SDK's `max_budget_usd` (typescript: `maxBudgetUsd`) option. Older versions of Claude Code don't have them, so update Claude Code and any pinn… prompting-claude-opus-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5-5 …you can estimate how long the task should take, give the model a time budget: have your harness add a short line at the end of each message it sends back to the model giving the elapsed time against t… prompting-claude-sonnet-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5 …it directly. Manual extended thinking (`thinking: {type: "enabled", budget_tokens: N}`) is not supported on Claude Sonnet 5 and returns a 400 error. It was deprecated on Claude Sonnet 4.6 and is now… prompting-claude-sonnet-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5 …gineering/prompting-claude-sonnet-5-5#mid-turn-user-messages-and-task-budgets) * Code changes are reported as done without a test or build run: [Verification on coding tasks](https://platform.claude.c… refusals-and-fallback Claude Developer Platform · in the page build-with-claude/refusals-and-fallback …lly earns another refusal. Point the retry at the fallback model. * **Budget retries for each request, not for each turn or session.** A single turn can produce several refusals, for example an agent… skills-guide Claude Developer Platform · in the page build-with-claude/skills-guide …"user", "content": "Create an Excel file with a simple budget spreadsheet", } ], tools=[{"type": "code_execution_20250825", "name": "code_execution"}], ) # S… thinking Claude Developer Platform · in the page build-with-claude/thinking …| No `thinking` field | `"adaptive"` | `"enabled"` with `budget_tokens` | `"between_tools"` | `"disabled"` | | --------------------… thinking-steering-and-cost Claude Developer Platform · in the page build-with-claude/thinking-steering-and-cost …o start with a thinking block. (Models using a legacy manual thinking budget enforce that the final assistant turn of a thinking-enabled request starts with one; see [Turn structure in manual mode](ht… thinking-tool-workflows Claude Developer Platform · in the page build-with-claude/thinking-tool-workflows …pport only extended thinking, substitute `thinking: {type: "enabled", budget_tokens: N}`. The round-trip rules are identical. ## Walk through a two-turn tool-use round trip The example defines a `ge… thinking-troubleshooting Claude Developer Platform · in the page build-with-claude/thinking-troubleshooting …ing), a legacy manual mode configured as `thinking: {type: "enabled", budget_tokens: N}`. Extended thinking (`thinking.type: "enabled"` with `budget_tokens`) is deprecated on the Claude 4.6 models (r… vision-coordinates Claude Developer Platform · in the page build-with-claude/vision-coordinates …width / 28⌉ × ⌈height / 28⌉` does not exceed the model's visual token budget (1,568 tokens on the standard tier, 4,784 on the high-resolution tier). See [Resolution and token cost](https://platform.c… working-with-messages Claude Developer Platform · in the page build-with-claude/working-with-messages …ema-validated JSON output from Claude. </Card> <Card title="Task budgets" icon="gauge" href="https://platform.claude.com/docs/en/build-with-claude/task-budgets"> Set an advisory token budget…
Feedback