Follow Discord
Sweep 25 Sep 2026 · 19:33Z Build v2.1.283 504 read Stable v2.1.274 Latest v2.1.283 Next v2.1.283 Feeds RSS JSON llms.txt llms-full.txt Unofficial
HomeDocsSearch
Search the documentation

762 pages for error.

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

Retrieve Message Batch results Claude Developer Platform · in the page api/messages/batches/results …uest. Contains a Message output if processing was successful, an error response if processing failed, or the reason why processing was not attempted, such as cancellation or expiration. - `M… Retrieve a Message Batch Claude Developer Platform · in the page api/messages/batches/retrieve …sing ends when every request in a Message Batch has either succeeded, errored, canceled, or expired. format: date-time - `expires_at: string` RFC 3339 datetime string representing the tim… Count tokens in a Message Claude Developer Platform · in the page api/messages/count_tokens …ing the field. - `oversized_image: optional "downsize" or "error"` What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scale… Create a Message Claude Developer Platform · in the page api/messages/create …ing the field. - `oversized_image: optional "downsize" or "error"` What the server does when this image exceeds the model's maximum image size. `"downsize"` (the default) scale… overview Claude Developer Platform · in the page api/overview …plify API integration by handling authentication, request formatting, error handling, and more. **Benefits:** * Automatic header management (authentication, `anthropic-version`, `content-type`) * Ty… rate-limits Claude Developer Platform · in the page api/rate-limits …Short bursts of requests can exceed the limit and trigger rate limit errors. * The following limits are the standard limits for each tier. If you need higher limits, see [Requesting higher limits](ht… service-tiers Claude Developer Platform · in the page api/service-tiers …her requests. This prioritization helps minimize ["server overloaded" errors](https://platform.claude.com/docs/en/api/errors#http-errors), even during peak times. For more information, see [Existing… versioning Claude Developer Platform · in the page api/versioning …Add additional values to the output * Change conditions for specific error types * Add new variants to enum-like output values (for example, streaming event types) Generally, if you are using the AP… Message Batches API Claude Developer Platform · in the page build-with-claude/batch-processing …ported in batch requests. Including any of these returns a validation error: | Parameter | Why… citations Claude Developer Platform · in the page build-with-claude/citations …(or the deprecated `output_format` parameter), the API returns a 400 error. This is because citations require interleaving citation blocks with text output, which is incompatible with the strict J… claude-in-microsoft-foundry Claude Developer Platform · in the page build-with-claude/claude-in-microsoft-foundry …tures against a deployment hosted on Azure return a `400 Bad Request` error by design. Claude Code detects deployments hosted on Azure and automatically adapts its feature set. ## API responses API… claude-on-amazon-bedrock-legacy Claude Developer Platform · in the page build-with-claude/claude-on-amazon-bedrock-legacy …odels, a request that passes the base model ID fails with an HTTP 400 error like the following: ```text wrap Invocation of model ID anthropic.claude-sonnet-4-5-20250929-v1:0 with on-demand throughput… claude-platform-on-aws Claude Developer Platform · in the page build-with-claude/claude-platform-on-aws …iam enable-outbound-web-identity-federation ``` If the response is `[ERROR] (FeatureEnabled) ... already enabled`, the setting is already on for your account and you can move on. Verify and retrieve… sent_count = len(messages sent in the compaction request) Claude Developer Platform · in the page build-with-claude/compaction …content: $(cat content.json) - role: user content: Now add error handling context_management: edits: - type: compact_20260112 YAML ``` ```python Python client = anthrop… compaction-background Claude Developer Platform · in the page build-with-claude/compaction-background …demand#continue-from-the-summary) and [Handle a missing summary or an error](https://platform.claude.com/docs/en/build-with-claude/compaction-on-demand#when-no-summary-comes-back) apply unchanged. ##… compaction-on-demand Claude Developer Platform · in the page build-with-claude/compaction-on-demand …sages. If any remain in front of the block, the request returns a 400 error (`compaction_block_misplaced`). * Send exactly one `compaction` block per request, on every later request. <Warning> Two… compaction-thinking-blocks Claude Developer Platform · in the page build-with-claude/compaction-thinking-blocks …that sends the kept thinking where the API enforces the check: a 400 error by default, or dropped thinking blocks if the request sets `thinking.block_binding.prefix_mismatch_behavior` to `"drop_block… compaction-threshold Claude Developer Platform · in the page build-with-claude/compaction-threshold …content: $(cat content.json) - role: user content: Now add error handling context_management: edits: - type: compact_20260112 YAML ``` ```python Python client = anthrop… context-editing Claude Developer Platform · in the page build-with-claude/context-editing …"content": "Search for the latest developments in quantum error correction and summarize the key breakthroughs." } ], "tools": [ {… context-windows Claude Developer Platform · in the page build-with-claude/context-windows …lock authenticity. If you modify a thinking block, the API returns an error. <Note> Most current Claude models support [interleaved thinking](https://platform.claude.com/docs/en/build-with-claude/t… effort Claude Developer Platform · in the page build-with-claude/effort …ext). Requests that set `thinking: {"type": "disabled"}` return a 400 error at every effort level. Claude Opus 5.5 also supports [changing effort mid-conversation](https://platform.claude.com/docs/en/… This will automatically use the environment variable VOYAGE_API_KEY. Claude Developer Platform · in the page build-with-claude/embeddings …ors by dividing each row by its Euclidean norm. Raises a ValueError if any row has a norm of zero to prevent division by zero. """ row_norms = np.linalg.norm(v, axis=1, keepdim… extended-thinking Claude Developer Platform · in the page build-with-claude/extended-thinking …ls do not support it and reject requests that use it, returning a 400 error. On Claude 4.5 and earlier models that support thinking, extended thinking is the only available thinking mode. Claude Mytho… fallback-credit Claude Developer Platform · in the page build-with-claude/fallback-credit …response = send("claude-opus-4-8", attempt) except BadRequestError as error: if "redemption temporarily unavailable" in error.message: raise # Transient: retry with t… fast-mode Claude Developer Platform · in the page build-with-claude/fast-mode …pus 4.7. Requests to `claude-opus-4-7` with `speed: "fast"` return an error; unlike Claude Opus 4.6 (see the following note), requests do not fall back to standard speed. The model itself remains avai… files Claude Developer Platform · in the page build-with-claude/files …```go Go func downloadFile(client anthropic.Client, fileID string) error { resp, err := client.Files.Download(context.TODO(), fileID, anthropic.FileDownloadParams{}) if err != nil { retur… handling-stop-reasons Claude Developer Platform · in the page build-with-claude/handling-stop-reasons …ason` field is part of every successful Messages API response. Unlike errors, which indicate failures in processing your request, `stop_reason` tells you why Claude completed its response generation.… mid-conversation-effort-example Claude Developer Platform · in the page build-with-claude/mid-conversation-effort-example …"context" "crypto/sha256" "encoding/hex" "encoding/json" "errors" "fmt" "log" "os" "os/exec" "path/filepath" "strings" "sync" "time" "github.com/anthropics/anth… mid-conversation-system-messages Claude Developer Platform · in the page build-with-claude/mid-conversation-system-messages …e`). Referencing a name that is not declared in `tools` returns a 400 error (on the Claude API, with `error.details.error_code` set to `tool_reference_unresolved`). A `tool_addition` block can instead… preserved-thinking Claude Developer Platform · in the page build-with-claude/preserved-thinking …del can't read a block, the API drops it from that request without an error. See [Switching models mid-conversation](https://platform.claude.com/docs/en/build-with-claude/preserved-thinking#switching-… Request 2 caches its request content (not the response) Claude Developer Platform · in the page build-with-claude/prompt-caching …explicit `cache_control` with a different TTL, the API returns a 400 error. * If 4 explicit block-level breakpoints already exist, the API returns a 400 error (no slots left for automatic caching). *… claude-prompting-best-practices Claude Developer Platform · in the page build-with-claude/prompt-engineering/claude-prompting-best-practices …quests with prefilled assistant messages to these models return a 400 error. Model intelligence and instruction following have advanced such that most use cases of prefill no longer require it. Earlie… prompting-claude-fable-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5 …id premature abstraction and half-finished implementations. Don't add error handling, fallbacks, or validation for scenarios that cannot happen. Trust internal code and framework guarantees. Only vali… Delivering work Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5-1 …"content": f"File not found: {path}", "is_error": True, } ) # Send the tool results as the user turn, then a fresh copy of the… prompting-claude-opus-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5 …that matter: ```text wrap Only correct an earlier statement when the error would change the user's code, conclusions, or decisions. State corrections plainly and briefly, then continue the task. For… prompting-claude-opus-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5-5 …al model and one-page summary for a transaction or finding and fixing errors in a valuation workbook, and it catches details that are easy to miss in large inputs, such as a date in a long planning th… prompting-claude-sonnet-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5 …et_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 removed. Use adaptive thinking with the effort parameter instead. <Note>… refusals-and-fallback Claude Developer Platform · in the page build-with-claude/refusals-and-fallback …e a request. When that happens, you receive a normal response, not an error, with `stop_reason: "refusal"`. Its `stop_details.category` names the policy area (see [What a refusal looks like](https://p… search-results Claude Developer Platform · in the page build-with-claude/search-results …type="text", text="If you encounter timeout errors, first check the configuration settings. Common causes include network latency and incorrect timeout values.",… skills-guide Claude Developer Platform · in the page build-with-claude/skills-guide …alidate the cached prefix if it changes the Skill's description. ### Error handling Handle Skill-related errors gracefully: <CodeGroup> ```bash cURL # This error-handling flow doesn't translate… streaming Claude Developer Platform · in the page build-with-claude/streaming …nts Event streams may also include any number of `ping` events. ### Error events The API may occasionally send [errors](https://platform.claude.com/docs/en/api/errors) in the event stream. For exam… structured-outputs Claude Developer Platform · in the page build-with-claude/structured-outputs …ed-outputs-2025-11-13` beta header. Without it, the API returns a 400 error. The Python SDK (v1.0 and later) does not accept `output_format={...}` on `client.beta.messages.create()` or `count_tokens()… task-budgets Claude Developer Platform · in the page build-with-claude/task-budgets …th-claude/task-budgets#feature-support)). Smaller values return a 400 error. ## Interaction with other parameters * **`max_tokens`:** Orthogonal to task budgets. `max_tokens` is a hard per-request c… thinking Claude Developer Platform · in the page build-with-claude/thinking …`thinking: {type: "disabled"}` with those effort levels return a 400 error. This restriction is enforced on each request. With thinking disabled, Claude Opus 5 can occasionally emit tool calls as pla… thinking-tool-workflows Claude Developer Platform · in the page build-with-claude/thinking-tool-workflows …g-with-tool-use): `tool_choice` options that force tool use return an error with manual extended thinking (`thinking: {type: "enabled"}`); adaptive thinking supports forced tool use. * [Keep one think… thinking-troubleshooting Claude Developer Platform · in the page build-with-claude/thinking-troubleshooting …Diagnose and fix the most common thinking failures: configuration 400 errors, empty or missing thinking blocks, max_tokens stops, and cache misses." --- <Note> To learn how zero data retention (ZDR… token-counting Claude Developer Platform · in the page build-with-claude/token-counting …al number of input tokens. This endpoint returns an `invalid_request_error` for a few inputs that the Messages API accepts: [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-us… vision Claude Developer Platform · in the page build-with-claude/vision …es exceeding the stricter limit are rejected with an `invalid_request_error` whose message references "many-image requests" and states the current limit in pixels. To stay under the limit on all platf… vision-coordinates Claude Developer Platform · in the page build-with-claude/vision-coordinates …still be rejected when you send it. </Note> ## Turn resizing into an error with `transformations` Pre-resizing only protects your coordinates while your pipeline keeps producing the right sizes. A n… working-with-messages Claude Developer Platform · in the page build-with-claude/working-with-messages …ude Mythos Preview. Setting them to a non-default value returns a 400 error. Omit them from request payloads and use prompting to guide the model's behavior instead. See the [migration guide](https://…
Feedback