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

1,120 pages for message.

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

effort Claude Developer Platform · in the page build-with-claude/effort …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. <Ti… extended-thinking Claude Developer Platform · in the page build-with-claude/extended-thinking …model. </Warning> <Note> If a request fails with a 400 error whose message starts with `"thinking.type.enabled" is not supported`, your model uses adaptive thinking instead. See [Troubleshooting th… fallback-credit Claude Developer Platform · in the page build-with-claude/fallback-credit …| The refused request body, unchanged, plus one appended assistant message whose `content` echoes the refused response's `content`. The retry model continues the response from where the refused mod… fast-mode Claude Developer Platform · in the page build-with-claude/fast-mode …ader. <CodeGroup> ```bash cURL curl https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "content-type: application/jso… files Claude Developer Platform · in the page build-with-claude/files …de/files description: Upload files once, reference them by file_id in Messages requests, and download outputs created by skills or the code execution tool. featureMetadata: status: ga zdr: not-eli… handling-stop-reasons Claude Developer Platform · in the page build-with-claude/handling-stop-reasons …tool use, paused turns, and refusals in your application. --- Every Messages API response includes a `stop_reason` field that tells you why Claude stopped generating. Check this field to decide whet… mid-conversation-effort-example Claude Developer Platform · in the page build-with-claude/mid-conversation-effort-example …multiagent fan-out, switched on and off with mid-conversation system messages. --- An orchestration mode is a session-level switch: when it is on, the model puts maximum thoroughness behind every su… multilingual-support Claude Developer Platform · in the page build-with-claude/multilingual-support …tion. <CodeGroup> ```bash cURL curl https://api.anthropic.com/v1/messages \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-0… overview Claude Developer Platform · in the page build-with-claude/overview …as though the conversation had been on the new model from the start. Message Batches results do not include fallback credit tokens. | Not ZDR eligible\*… pdf-support Claude Developer Platform · in the page build-with-claude/pdf-support …## Send your first PDF request Start with a simple example using the Messages API. You can provide PDFs to Claude in three ways: 1. As a URL reference to a PDF hosted online 2. As a base64-encoded P… preserved-thinking Claude Developer Platform · in the page build-with-claude/preserved-thinking …ing block has changed.** The top-level `system` prompt, `tools`, and `messages` before the block are its prefix. If the prefix differs from what you sent when the block was produced, that block and ev… Request 2 caches its request content (not the response) Claude Developer Platform · in the page build-with-claude/prompt-caching …nversations grow. Best for multi-turn conversations where the growing message history should be cached automatically. * **[Explicit cache breakpoints](https://platform.claude.com/docs/en/build-with-cl… claude-prompting-best-practices Claude Developer Platform · in the page build-with-claude/prompt-engineering/claude-prompting-best-practices …tasks, user-facing progress updates, tool use in chat, mid-turn user messages, verification on coding tasks, tool-call handling, complex visual inputs, and safeguard refusals. | | Claude Sonnet 5… prompting-claude-fable-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5 …s already made, or narrate options you will not pursue in user-facing messages. If you are weighing a choice, give a recommendation, not an exhaustive survey. This does not apply to thinking blocks. `… Delivering work Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-fable-5-1 …hains. Users see the agent go quiet for minutes at a time, or a final message that covers only the last step rather than the whole task. First, check that your client receives progress updates at all… prompting-claude-haiku-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-haiku-5-5 …th your own tools, early stopping, coding verification, mid-turn user messages, system prompt adherence in chatbots, reasoning in user-facing text, and refusals." --- This guide covers the prompting… prompting-claude-opus-4-8 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-4-8 …laude Opus 4.7 (1M context window default and mid-conversation system messages), see [Migrating to Claude Opus 5.5 from Claude Opus 4.7](https://platform.claude.com/docs/en/models/opus-5-5/migration-g… prompting-claude-opus-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5 …gentic work: it tends to announce what it is about to do, and its per-message output in agentic sessions is often longer than prior models'. It benefits from explicit guidance on how to communicate wi… prompting-claude-opus-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-opus-5-5 …n, complex visual inputs, multiapp workflows, and pasted text in user messages." --- This guide covers the prompting patterns specific to Claude Opus 5.5. For the model's capabilities and API changes… prompting-claude-sonnet-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5 …g agentic traces. If you've added scaffolding to force interim status messages ("After every 3 tool calls, summarize progress"), try removing it. If you find that the length or contents of Claude Sonn… prompting-claude-sonnet-5-5 Claude Developer Platform · in the page build-with-claude/prompt-engineering/prompting-claude-sonnet-5-5 …up-front thinking, JSON output, progress updates, tool use, mid-turn messages, coding verification, tool calls, visual inputs, and refusals." --- This guide covers the prompting patterns specific to… refusals-and-fallback Claude Developer Platform · in the page build-with-claude/refusals-and-fallback …```bash cURL curl --fail-with-body -sS https://api.anthropic.com/v1/messages \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: server-side-f… search-results Claude Developer Platform · in the page build-with-claude/search-results …. No beta header is required: search results are part of the standard Messages API. ## How it works Search results can be provided in two ways: 1. **From tool calls:** Your custom tools return sear… skills-guide Claude Developer Platform · in the page build-with-claude/skills-guide …the-real-world-with-agent-skills). </Note> Skills integrate with the Messages API through the [code execution tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/code-execution-tool).… streaming Claude Developer Platform · in the page build-with-claude/streaming --- title: Streaming messages url: https://platform.claude.com/docs/en/build-with-claude/streaming description: Stream Messages API responses incrementally with server-sent events, including text, too… structured-outputs Claude Developer Platform · in the page build-with-claude/structured-outputs …<Tab title="cURL"> ```bash curl https://api.anthropic.com/v1/messages \ -H "content-type: application/json" \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 202… task-budgets Claude Developer Platform · in the page build-with-claude/task-budgets …ader: <CodeGroup> ```bash cURL curl https://api.anthropic.com/v1/messages \ -N \ -H "x-api-key: $ANTHROPIC_API_KEY" \ -H "anthropic-version: 2023-06-01" \ -H "anthropic-beta: task… thinking Claude Developer Platform · in the page build-with-claude/thinking …nking#thinking-with-tool-use). For the full response format, see the [Messages API reference](https://platform.claude.com/docs/en/api/messages/create). ## Configuring thinking On most models, thinki… thinking-steering-and-cost Claude Developer Platform · in the page build-with-claude/thinking-steering-and-cost …ply Claude thinks with effort levels, system prompt guidance, and per-message steering, and understand thinking's cost and pricing. --- <Note> To learn how zero data retention (ZDR) applies to this… thinking-tool-workflows Claude Developer Platform · in the page build-with-claude/thinking-tool-workflows …when you return a tool result, the thinking blocks from the assistant message must come back with it. * [Echo the assistant message exactly as received](https://platform.claude.com/docs/en/build-with-… thinking-troubleshooting Claude Developer Platform · in the page build-with-claude/thinking-troubleshooting …r it each start from a symptom you observe, so you can match an error message or unexpected response directly to its cause and fix. To learn how thinking works, see the [Thinking](https://platform.cla… token-counting Claude Developer Platform · in the page build-with-claude/token-counting …n/build-with-claude/token-counting description: Count the tokens in a message before you send it to Claude. Use token counts to manage rate limits and costs, make model routing decisions, and fit prom… vision Claude Developer Platform · in the page build-with-claude/vision …layground) in the Claude Console. Add images directly to any **User** message block. * API request. See the following examples. On the API, provide images to Claude as `image` content blocks using on… vision-coordinates Claude Developer Platform · in the page build-with-claude/vision-coordinates …essing it, so a successful count doesn't mean the image is within the Messages API's [request limits](https://platform.claude.com/docs/en/build-with-claude/vision#request-limits). An image can count s… API usage primer for Claude Claude Developer Platform · in the page claude_api_primer …Claude API. It gives explanation and examples of model IDs/the basic messages API, tool use, streaming, thinking, and nothing else. --- # API usage primer for Claude > This guide is designed to giv… apply Claude Developer Platform · in the page cli-sdks-libraries/cli/apply …ents/`: the frontmatter is the request body and the prose becomes the message that starts each session. * A [skill](https://platform.claude.com/docs/en/managed-agents/skills) is a directory with a `SK… On a remote host without a browser: Claude Developer Platform · in the page cli-sdks-libraries/cli/authentication …#global-flags). The value must be a `wrkspc_...` ID. ```bash CLI ant messages create \ --workspace-id wrkspc_01... \ --model claude-opus-5-5 \ --max-tokens 1024 \ --message '{role: user, cont… quickstart Claude Developer Platform · in the page cli-sdks-libraries/cli/quickstart …, see the [API reference](https://platform.claude.com/docs/en/api/cli/messages/create). This page gets you to a working command. For everything else the CLI does, see [Using the CLI](https://platform.… scripting Claude Developer Platform · in the page cli-sdks-libraries/cli/scripting …" /* ... */ } ``` </Step> <Step title="Send a user message"> Copy the session `id` from the previous output into `--session-id`: ```bash ant beta:sessions:events send \… sessions-connect Claude Developer Platform · in the page cli-sdks-libraries/cli/sessions-connect …o a Claude Managed Agents session to follow its transcript live, send messages, allow or deny tool calls, or open the session viewer in your browser. --- `ant beta:sessions connect` attaches your ter… using Claude Developer Platform · in the page cli-sdks-libraries/cli/using …to opt into a different schema version). ```bash ant models list ant messages create --model claude-opus-5-5 --max-tokens 1024 ... ant beta:agents retrieve --agent-id agent_01... ant beta:sessions:ev… apple-foundation-models Claude Developer Platform · in the page cli-sdks-libraries/libraries/apple-foundation-models …> <Info> Claude for Foundation Models is **not** a general-purpose Messages API client. Its public surface is the Foundation Models provider conformance plus the configuration types that reach it (… openai-sdk Claude Developer Platform · in the page cli-sdks-libraries/libraries/openai-sdk …ons.create( model="claude-opus-5-5", # Claude model name messages=[ {"role": "system", "content": "You are a helpful assistant."}, {"role": "user", "content": "Who are… overview Claude Developer Platform · in the page cli-sdks-libraries/overview …ell scripting and interactive use. * **Client SDKs:** General-purpose Messages API clients for Python, TypeScript, C#, Go, Java, PHP, and Ruby. Each SDK provides idiomatic interfaces, type safety, and… csharp Claude Developer Platform · in the page cli-sdks-libraries/sdks/csharp …sage ```csharp using System; using Anthropic; using Anthropic.Models.Messages; AnthropicClient client = new(); MessageCreateParams parameters = new() { MaxTokens = 1024, Messages = [new Use… go Claude Developer Platform · in the page cli-sdks-libraries/sdks/go …ropic-api-key"), // defaults to os.LookupEnv("ANTHROPIC_API_KEY") ) message, err := client.Messages.New(context.TODO(), anthropic.MessageNewParams{ MaxTokens: 1024, Messages: []anthropic.Message… java Claude Developer Platform · in the page cli-sdks-libraries/sdks/java …opic.client.okhttp.AnthropicOkHttpClient; import com.anthropic.models.messages.Message; import com.anthropic.models.messages.MessageCreateParams; import com.anthropic.models.messages.Model; // Config… php Claude Developer Platform · in the page cli-sdks-libraries/sdks/php …default value must be set by name. ```php $client = new Client(); $message = $client->messages->create( maxTokens: 1024, messages: [['role' => 'user', 'content' => 'Hello, Claude']], mo… For Amazon Bedrock support Claude Developer Platform · in the page cli-sdks-libraries/sdks/python …nd can be omitted api_key=os.environ.get("ANTHROPIC_API_KEY"), ) message = client.messages.create( max_tokens=1024, messages=[ { "role": "user", "content":… Automatically handles tool execution loop Claude Developer Platform · in the page cli-sdks-libraries/sdks/ruby …ENV["ANTHROPIC_API_KEY"] # This is the default and can be omitted ) message = anthropic.messages.create( max_tokens: 1024, messages: [{role: "user", content: "Hello, Claude"}], model: Anthropi…
Feedback