Follow Discord
Sweep 22 Oct 2026 · 04:32Z Build v2.1.308 527 read Stable v2.1.308 Latest v2.1.308 Next v2.1.308 Feeds RSS JSON llms.txt llms-full.txt Unofficial
One capture · api

One read of Claude Developer Platformapi-20261012T063709Z

394 pages moved out of 760 read.

Pages moved 394 significant first
Pages read 760 in this capture
Captured 06:37 UTC
Corpus hash a680f764ff92 corpus-hash

What this read moved

1-25 of 394, page 1 of 16

This capture is too large to show at once. Changes 1-25 of 394 are below, significant first; the rest are on the following screens.

api/beta Changed · +328 / -328 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 481
481481 
482482 The version of the Claude API you want to use.
483483 
484 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
484 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
485485 
486486- `"anthropic-beta": optional array of AnthropicBeta`
487487 
from line 953
953953 
954954 The version of the Claude API you want to use.
955955 
956 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
956 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
957957 
958958- `"anthropic-beta": optional array of AnthropicBeta`
959959 
from line 1396
13961396 
13971397The Messages API can be used for either single queries or stateless multi-turn conversations.
13981398 
1399Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)
1399Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started?sdk_languages=http)
14001400 
14011401#### Headers
14021402 
from line 1404
14041404 
14051405 The version of the Claude API you want to use.
14061406 
1407 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1407 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
14081408 
14091409- `"anthropic-beta": optional array of AnthropicBeta`
14101410 
from line 1530
15301530 
15311531 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
15321532 
1533 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
1533 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#pre-warming-the-cache) without generating a response.
15341534 
1535 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
1535 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http) for details.
15361536 
15371537 minimum: 0
15381538 
from line 1544
15441544 
15451545 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
15461546 
1547 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
1547 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
15481548 
15491549 Example with a single `user` message:
15501550 
from line 1581
15811581 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
15821582 ```
15831583 
1584 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
1584 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
15851585 
1586 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
1586 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
15871587 
15881588 There is a limit of 100,000 messages in a single request.
15891589 
from line 1616
16161616 - `5m`: 5 minutes
16171617 - `1h`: 1 hour
16181618 
1619 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
1619 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
16201620 
16211621 - `"5m"`
16221622 
from line 5145
51455145 
51465146- `fallbacks: optional BetaFallbacksParam or null`
51475147 
5148 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
5148 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback?sdk_languages=http#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
51495149 
51505150 - `array of BetaFallbackParam`
51515151 
from line 5177
51775177 
51785178 - `format: optional BetaJSONOutputFormat or null`
51795179 
5180 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
5180 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
51815181 
51825182 - `type: "json_schema"`
51835183 
from line 5225
52255225 
52265226 Must be ≥1024 and less than `max_tokens`.
52275227 
5228 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
5228 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
52295229 
52305230 minimum: 1024
52315231 
from line 5243
52435243 
52445244 - `display: optional "summarized" or "omitted" or "updates" or null`
52455245 
5246 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
5246 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
52475247 
52485248 - `"summarized"`
52495249 
from line 5269
52695269 
52705270 - `display: optional "summarized" or "omitted" or "updates" or null`
52715271 
5272 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
5272 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
52735273 
52745274 - `"summarized"`
52755275 
from line 5323
53235323 
53245324 Determines whether to use priority capacity (if available) or standard capacity for this request.
53255325 
5326 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.
5326 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=http) for details.
53275327 
53285328 - `"auto"`
53295329 
from line 5349
53495349 
53505350 Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.
53515351 
5352 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language.
5352 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=http#streaming-with-sdks) for an example in each language.
53535353 
53545354- `system: optional string or array of BetaTextBlockParam`
53555355 
53565356 System prompt.
53575357 
5358 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
5358 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
53595359 
53605360 - `string`
53615361 
from line 5379
53795379 
53805380 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
53815381 
5382 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
5382 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
53835383 
53845384 - `BetaThinkingConfigEnabled object`
53855385 
from line 5445
54455445 
54465446 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
54475447 
5448 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
5448 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
54495449 
54505450 Each tool definition includes:
54515451 
from line 5501
55015501 
55025502 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
55035503 
5504 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
5504 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
55055505 
55065506 - `BetaTool object`
55075507 
from line 5588
55885588 
55895589 **Deprecated**
55905590 
5591 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
5591 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
55925592 
55935593 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
55945594 
from line 5869
58695869 
58705870 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.
58715871 
5872 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
5872 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
58735873 
58745874 - `thinking: string`
58755875 
from line 5887
58875887 
58885888 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.
58895889 
5890 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
5890 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http#redacted-thinking-blocks) for details.
58915891 
58925892 - `BetaToolUseBlock object`
58935893 
from line 6693
66936693 - `5m`: 5 minutes
66946694 - `1h`: 1 hour
66956695 
6696 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
6696 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
66976697 
66986698 - `"5m"`
66996699 
from line 7713
77137713 
77147714 Defer loading for this member. Must resolve to the same value on every enabled member of the toolset.
77157715 
7716 - `enabled: optional boolean or null`
7717 
7718 Whether this member is offered to the model. Default is per member, per the toolset's documentation. A member whose enabled resolves false is withheld from the served schema.
7719 
7720 - `BetaToolTextEditor20250124 object`
7721 
7722 - `type: "text_editor_20250124"`
7723 
7724 - `name: "str_replace_editor"`
7725 
7726 Name of the tool.
7727 
7728 This is how the tool will be called by
7716

api/beta/agents Changed · +4 / -4 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 131
131131 
132132- `model: BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams`
133133 
134 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control
134 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control
135135 
136136 - `BetaManagedAgentsModel = "claude-haiku-5-5" or "claude-sonnet-5-5" or "claude-opus-5-5" or 14 more or string`
137137 
from line 299
299299 
300300- `mcp_servers: optional array of BetaManagedAgentsURLMCPServerParams`
301301 
302 MCP servers this agent connects to. Maximum 20. Names must be unique within the array. Every server must be referenced by an `mcp_toolset` in `tools`; unreferenced servers are rejected. See the [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector).
302 MCP servers this agent connects to. Maximum 20. Names must be unique within the array. Every server must be referenced by an `mcp_toolset` in `tools`; unreferenced servers are rejected. See the [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector?sdk_languages=http).
303303 
304304 - `type: "url"`
305305 
from line 4127
41274127 
41284128- `mcp_servers: optional array of BetaManagedAgentsURLMCPServerParams or null`
41294129 
4130 MCP servers. Full replacement. Omit to preserve; send empty array or `null` to clear. Names must be unique. Maximum 20. Every server must be referenced by an `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are rejected. See the [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector).
4130 MCP servers. Full replacement. Omit to preserve; send empty array or `null` to clear. Names must be unique. Maximum 20. Every server must be referenced by an `mcp_toolset` in the agent's resulting `tools`; unreferenced servers are rejected. See the [MCP connector guide](https://platform.claude.com/docs/en/managed-agents/mcp-connector?sdk_languages=http).
41314131 
41324132 - `type: "url"`
41334133 
from line 4149
41494149 
41504150- `model: optional BetaManagedAgentsModel or BetaManagedAgentsModelConfigParams`
41514151 
4152 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.
4152 Model identifier. Accepts the [model string](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http#latest-models-comparison), e.g. `claude-opus-5`, or a `model_config` object for additional configuration control. Omit to preserve. Cannot be cleared.
41534153 
41544154 - `BetaManagedAgentsModel = "claude-haiku-5-5" or "claude-sonnet-5-5" or "claude-opus-5-5" or 14 more or string`
41554155 
from line 8192
81928192 
81938193 Tool calls are automatically approved without user confirmation.
81948194 
8195 - `BetaManagedAgentsAlwaysAskPolicy object`
8196 
8197 Tool calls require us
8195

api/beta/dreams Changed · +50 / -50 lines

from line 13
1313 
1414By default the dream writes its result to a new memory store and doesn't change the input memory store. The response has `status` set to `pending` and an empty `outputs` array. Poll the dream until `status` is `completed`, `failed`, or `canceled`.
1515 
16See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#create-a-dream) to learn more about creating dreams.
16See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#create-a-dream) to learn more about creating dreams.
1717 
1818### Headers
1919 
from line 165
165165 
166166 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
167167 
168 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
168 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
169169 
170170- `model: string or BetaDreamModelConfigParam`
171171 
from line 173
173173 
174174 In the object form, `speed` can only be `standard`.
175175 
176 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists the supported models.
176 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists the supported models.
177177 
178178 - `string`
179179 
from line 187
187187 
188188 The ID can be 1 to 256 characters long.
189189 
190 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists the supported models.
190 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists the supported models.
191191 
192192 minLength: 1, maxLength: 256
193193 
from line 205
205205 
206206 Guidance that steers how the dream reads the sessions and organizes the output memory store, from 1 to 4,096 characters.
207207 
208 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#steer-with-instructions) for what kinds of instructions work well.
208 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#steer-with-instructions) for what kinds of instructions work well.
209209 
210210 minLength: 1, maxLength: 4096
211211 
from line 245
245245 
246246 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
247247 
248 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
248 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
249249 
250250 - `type: "dream"`
251251 
from line 281
281281 
282282 A code for why the dream failed, such as `timeout` or `internal_error`.
283283 
284 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
284 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
285285 
286286 - `message: string`
287287 
from line 319
319319 
320320 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
321321 
322 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
322 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
323323 
324324 - `instructions: string or null`
325325 
from line 377
377377 
378378 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
379379 
380 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
380 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
381381 
382382 - `type: "memory_store"`
383383 
from line 393
393393 
394394 Stream that session's events to follow what the dream reads and writes.
395395 
396 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
396 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
397397 
398398 - `status: BetaDreamStatus`
399399 
from line 401
401401 
402402 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
403403 
404 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
404 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
405405 
406406 - `"pending"`
407407 
from line 530
530530 
531531Archived dreams are left out unless `include_archived` is `true`.
532532 
533See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#list-dreams) for how to page through dreams.
533See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#list-dreams) for how to page through dreams.
534534 
535535### Query parameters
536536 
from line 752
752752 
753753 A code for why the dream failed, such as `timeout` or `internal_error`.
754754 
755 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
755 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
756756 
757757 - `message: string`
758758 
from line 790
790790 
791791 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
792792 
793 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
793 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
794794 
795795 - `instructions: string or null`
796796 
from line 848
848848 
849849 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
850850 
851 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
851 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
852852 
853853 - `type: "memory_store"`
854854 
from line 864
864864 
865865 Stream that session's events to follow what the dream reads and writes.
866866 
867 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
867 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
868868 
869869 - `status: BetaDreamStatus`
870870 
from line 872
872872 
873873 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
874874 
875 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
875 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
876876 
877877 - `"pending"`
878878 
from line 1002
10021002 
10031003Archived dreams are returned too.
10041004 
1005See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#track-progress) for how to poll a dream and what each status means.
1005See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#track-progress) for how to poll a dream and what each status means.
10061006 
10071007### Path parameters
10081008 
from line 1136
11361136 
11371137 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
11381138 
1139 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
1139 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
11401140 
11411141 - `type: "dream"`
11421142 
from line 1172
11721172 
11731173 A code for why the dream failed, such as `timeout` or `internal_error`.
11741174 
1175 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
1175 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
11761176 
11771177 - `message: string`
11781178 
from line 1210
12101210 
12111211 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
12121212 
1213 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
1213 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
12141214 
12151215 - `instructions: string or null`
12161216 
from line 1268
12681268 
12691269 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
12701270 
1271 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
1271 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
12721272 
12731273 - `type: "memory_store"`
12741274 
from line 1284
12841284 
12851285 Stream that session's events to follow what the dream reads and writes.
12861286 
1287 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
1287 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
12881288 
12891289 - `status: BetaDreamStatus`
12901290 
from line 1292
12921292 
12931293 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
12941294 
1295 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
1295 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
12961296 
12971297 - `"pending"`
12981298 
from line 1411
14111411 
14121412The response shows `status` as `canceled`, unless the dream reached `completed` or `failed` first. `usage` can keep changing after the response. Canceling a `canceled` dream returns it unchanged. Canceling a `completed` or `failed` dream returns a 400 error.
14131413 
1414See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#cancel-a-dream) to learn more about canceling dreams.
1414See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#cancel-a-dream) to learn more about canceling dreams.
14151415 
14161416### Path parameters
14171417 
from line 1545
15451545 
15461546 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
15471547 
1548 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
1548 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
15491549 
15501550 - `type: "dream"`
15511551 
from line 1581
15811581 
15821582 A code for why the dream failed, such as `timeout` or `internal_error`.
15831583 
1584 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
1584 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
15851585 
15861586 - `message: string`
15871587 
from line 1619
16191619 
16201620 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
16211621 
1622 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
1622 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
16231623 
16241624 - `instructions: string or null`
16251625 
from line 1677
16771677 
16781678 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
16791679 
1680 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
1680 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
16811681 
16821682 - `type: "memory_store"`
16831683 
from line 1693
16931693 
16941694 Stream that session's events to follow what the dream reads and writes.
16951695 
1696 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
1696 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
16971697 
16981698 - `status: BetaDreamStatus`
16991699 
from line 1701
17011701 
17021702 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
17031703 
1704 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
1704 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
17051705 
17061706 - `"pending"`
17071707 
from line 1821
18211821 
18221822Archiving a `pending` or `running` dream returns a 400 error, so cancel it first. Archiving an archived dream returns it unchanged. An archived dream can still be fetched by ID. Archiving can't be undone.
18231823 
1824See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#archive-a-dream) to learn more about archiving dreams.
1824See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#archive-a-dream) to learn more about archiving dreams.
18251825 
18261826### Path parameters
18271827 
from line 1955
19551955 
19561956 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
19571957 
1958 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
1958 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
19591959 
19601960 - `type: "dream"`
19611961 
from line 1991
19911991 
19921992 A code for why the dream failed, such as `timeout` or `internal_error`.
19931993 
1994 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
1994 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
19951995 
19961996 - `message: string`
19971997 
from line 2029
20292029 
20302030 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
20312031 
2032 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
2032 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
20332033 
20342034 - `instructions: string or null`
20352035 
from line 2087
20872087 
20882088 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
20892089 
2090 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
2090 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
20912091 
20922092 - `type: "memory_store"`
20932093 
from line 2103
21032103 
21042104 Stream that session's events to follow what the dream reads and writes.
21052105 
2106 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
2106 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
21072107 
21082108 - `status: BetaDreamStatus`
21092109 
from line 2111
21112111 
21122112 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
21132113 
2114 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
2114 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
21152115 
21162116 - `"pending"`
21172117 
from line 2235
22352235 
22362236 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
22372237 
2238 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
2238 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
22392239 
22402240 - `type: "dream"`
22412241 
from line 2271
22712271 
22722272 A code for why the dream failed, such as `timeout` or `internal_error`.
22732273 
2274 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
2274 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
22752275 
22762276 - `message: string`
22772277 
from line 2309
23092309 
23102310 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
23112311 
2312 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
2312 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
23132313 
23142314 - `instructions: string or null`
23152315 
from line 2367
23672367 
23682368 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
23692369 
2370 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
2370 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
23712371 
23722372 - `type: "memory_store"`
23732373 
from line 2383
23832383 
23842384 Stream that session's events to follow what the dream reads and writes.
23852385 
2386 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
2386 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
23872387 
23882388 - `status: BetaDreamStatus`
23892389 
from line 2391
23912391 
23922392 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
23932393 
2394 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
2394 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
23952395 
23962396 - `"pending"`
23972397 
from line 2459
24592459 
24602460 A code for why the dream failed, such as `timeout` or `internal_error`.
24612461 
2462 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
2462 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
24632463 
24642464 - `message: string`
24652465 
from line 2499
24992499 
25002500 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
25012501 
2502 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
2502 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
25032503 
25042504### Beta Dream Memory Store Input
25052505 
from line 2567
25672567 
25682568 The ID can be 1 to 256 characters long.
25692569 
2570 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists the supported models.
2570 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists the supported models.
25712571 
25722572 minLength: 1, maxLength: 256
25732573 
from line 2609
26092609 
26102610 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
26112611 
2612 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
2612 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
26132613 
26142614### Beta Dream Status
26152615 
from line 2619
26192619 
26202620 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
26212621 
2622 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
2622 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
26232623 
26242624 - `"pending"`
26252625 
from line 2657
26572657 
26582658 The counts are zero while the dream is `pending` and update while it is `running`. They can keep changing after a cancel.
26592659 
2660 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#billing) for how dreams are billed. See the [prompt caching guide](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#tracking-cache-performance) for how the input token counts add up.
2660 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#billing) for how dreams are billed. See the [prompt caching guide](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#tracking-cache-performance) for how the input token counts add up.
26612661 
26622662 - `cache_creation_input_tokens: number`
26632663 

api/beta/dreams/archive Changed · +7 / -7 lines

from line 11
1111 
1212Archiving a `pending` or `running` dream returns a 400 error, so cancel it first. Archiving an archived dream returns it unchanged. An archived dream can still be fetched by ID. Archiving can't be undone.
1313 
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#archive-a-dream) to learn more about archiving dreams.
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#archive-a-dream) to learn more about archiving dreams.
1515 
1616## Path parameters
1717 
from line 145
145145 
146146 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
147147 
148 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
148 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
149149 
150150 - `type: "dream"`
151151 
from line 181
181181 
182182 A code for why the dream failed, such as `timeout` or `internal_error`.
183183 
184 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
184 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
185185 
186186 - `message: string`
187187 
from line 219
219219 
220220 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
221221 
222 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
222 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
223223 
224224 - `instructions: string or null`
225225 
from line 277
277277 
278278 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
279279 
280 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
280 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
281281 
282282 - `type: "memory_store"`
283283 
from line 293
293293 
294294 Stream that session's events to follow what the dream reads and writes.
295295 
296 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
296 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
297297 
298298 - `status: BetaDreamStatus`
299299 
from line 301
301301 
302302 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
303303 
304 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
304 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
305305 
306306 - `"pending"`
307307 

api/beta/dreams/cancel Changed · +7 / -7 lines

from line 11
1111 
1212The response shows `status` as `canceled`, unless the dream reached `completed` or `failed` first. `usage` can keep changing after the response. Canceling a `canceled` dream returns it unchanged. Canceling a `completed` or `failed` dream returns a 400 error.
1313 
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#cancel-a-dream) to learn more about canceling dreams.
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#cancel-a-dream) to learn more about canceling dreams.
1515 
1616## Path parameters
1717 
from line 145
145145 
146146 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
147147 
148 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
148 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
149149 
150150 - `type: "dream"`
151151 
from line 181
181181 
182182 A code for why the dream failed, such as `timeout` or `internal_error`.
183183 
184 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
184 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
185185 
186186 - `message: string`
187187 
from line 219
219219 
220220 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
221221 
222 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
222 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
223223 
224224 - `instructions: string or null`
225225 
from line 277
277277 
278278 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
279279 
280 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
280 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
281281 
282282 - `type: "memory_store"`
283283 
from line 293
293293 
294294 Stream that session's events to follow what the dream reads and writes.
295295 
296 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
296 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
297297 
298298 - `status: BetaDreamStatus`
299299 
from line 301
301301 
302302 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
303303 
304 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
304 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
305305 
306306 - `"pending"`
307307 

api/beta/dreams/create Changed · +11 / -11 lines

from line 11
1111 
1212By default the dream writes its result to a new memory store and doesn't change the input memory store. The response has `status` set to `pending` and an empty `outputs` array. Poll the dream until `status` is `completed`, `failed`, or `canceled`.
1313 
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#create-a-dream) to learn more about creating dreams.
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#create-a-dream) to learn more about creating dreams.
1515 
1616## Headers
1717 
from line 163
163163 
164164 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
165165 
166 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
166 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
167167 
168168- `model: string or BetaDreamModelConfigParam`
169169 
from line 171
171171 
172172 In the object form, `speed` can only be `standard`.
173173 
174 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists the supported models.
174 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists the supported models.
175175 
176176 - `string`
177177 
from line 185
185185 
186186 The ID can be 1 to 256 characters long.
187187 
188 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists the supported models.
188 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists the supported models.
189189 
190190 minLength: 1, maxLength: 256
191191 
from line 203
203203 
204204 Guidance that steers how the dream reads the sessions and organizes the output memory store, from 1 to 4,096 characters.
205205 
206 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#steer-with-instructions) for what kinds of instructions work well.
206 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#steer-with-instructions) for what kinds of instructions work well.
207207 
208208 minLength: 1, maxLength: 4096
209209 
from line 243
243243 
244244 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
245245 
246 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
246 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
247247 
248248 - `type: "dream"`
249249 
from line 279
279279 
280280 A code for why the dream failed, such as `timeout` or `internal_error`.
281281 
282 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
282 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
283283 
284284 - `message: string`
285285 
from line 317
317317 
318318 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
319319 
320 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
320 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
321321 
322322 - `instructions: string or null`
323323 
from line 375
375375 
376376 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
377377 
378 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
378 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
379379 
380380 - `type: "memory_store"`
381381 
from line 391
391391 
392392 Stream that session's events to follow what the dream reads and writes.
393393 
394 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
394 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
395395 
396396 - `status: BetaDreamStatus`
397397 
from line 399
399399 
400400 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
401401 
402 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
402 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
403403 
404404 - `"pending"`
405405 

api/beta/dreams/list Changed · +6 / -6 lines

from line 11
1111 
1212Archived dreams are left out unless `include_archived` is `true`.
1313 
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#list-dreams) for how to page through dreams.
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#list-dreams) for how to page through dreams.
1515 
1616## Query parameters
1717 
from line 233
233233 
234234 A code for why the dream failed, such as `timeout` or `internal_error`.
235235 
236 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
236 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
237237 
238238 - `message: string`
239239 
from line 271
271271 
272272 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
273273 
274 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
274 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
275275 
276276 - `instructions: string or null`
277277 
from line 329
329329 
330330 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
331331 
332 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
332 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
333333 
334334 - `type: "memory_store"`
335335 
from line 345
345345 
346346 Stream that session's events to follow what the dream reads and writes.
347347 
348 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
348 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
349349 
350350 - `status: BetaDreamStatus`
351351 
from line 353
353353 
354354 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
355355 
356 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
356 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
357357 
358358 - `"pending"`
359359 

api/beta/dreams/retrieve Changed · +7 / -7 lines

from line 11
1111 
1212Archived dreams are returned too.
1313 
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#track-progress) for how to poll a dream and what each status means.
14See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#track-progress) for how to poll a dream and what each status means.
1515 
1616## Path parameters
1717 
from line 145
145145 
146146 The Dreams API is in research preview: the request and response shapes are volatile and may change without the deprecation period that applies to generally-available endpoints.
147147 
148 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#how-it-works) for what a dream reads and produces.
148 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#how-it-works) for what a dream reads and produces.
149149 
150150 - `type: "dream"`
151151 
from line 181
181181 
182182 A code for why the dream failed, such as `timeout` or `internal_error`.
183183 
184 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#errors) lists common error codes and when they occur.
184 The [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#errors) lists common error codes and when they occur.
185185 
186186 - `message: string`
187187 
from line 219
219219 
220220 Give 1 to 100 IDs, with no duplicates. Each session must be in the same workspace as the dream. Responses list the IDs in sorted order.
221221 
222 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#limits) lists all the limits on a dream.
222 The [limits table in the Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#limits) lists all the limits on a dream.
223223 
224224 - `instructions: string or null`
225225 
from line 277
277277 
278278 The array is empty while the dream is `pending` and for a short time after it starts `running`. It can stay empty if the dream fails or is canceled before then. The memory store holds the complete result only once `status` is `completed`.
279279 
280 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#use-the-output) for how to review and use the result.
280 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#use-the-output) for how to review and use the result.
281281 
282282 - `type: "memory_store"`
283283 
from line 293
293293 
294294 Stream that session's events to follow what the dream reads and writes.
295295 
296 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#watch-the-pipeline-run) for how to watch a running dream.
296 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#watch-the-pipeline-run) for how to watch a running dream.
297297 
298298 - `status: BetaDreamStatus`
299299 
from line 301
301301 
302302 `completed`, `failed`, and `canceled` are final: once a dream has one of these statuses, its status doesn't change again.
303303 
304 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams#lifecycle) for what each status means.
304 See the [Dreams guide](https://platform.claude.com/docs/en/managed-agents/dreams?sdk_languages=http#lifecycle) for what each status means.
305305 
306306 - `"pending"`
307307 

api/beta/environments Changed · +14 / -14 lines

from line 17
1717 
1818 The version of the Claude API you want to use.
1919 
20 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
20 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2121 
2222- `"anthropic-beta": optional array of AnthropicBeta`
2323 
from line 492
492492 
493493 The version of the Claude API you want to use.
494494 
495 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
495 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
496496 
497497- `"anthropic-beta": optional array of AnthropicBeta`
498498 
from line 823
823823 
824824 The version of the Claude API you want to use.
825825 
826 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
826 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
827827 
828828- `"anthropic-beta": optional array of AnthropicBeta`
829829 
from line 1145
11451145 
11461146 The version of the Claude API you want to use.
11471147 
1148 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1148 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
11491149 
11501150- `"anthropic-beta": optional array of AnthropicBeta`
11511151 
from line 1589
15891589 
15901590 The version of the Claude API you want to use.
15911591 
1592 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1592 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
15931593 
15941594- `"anthropic-beta": optional array of AnthropicBeta`
15951595 
from line 1754
17541754 
17551755 The version of the Claude API you want to use.
17561756 
1757 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1757 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
17581758 
17591759- `"anthropic-beta": optional array of AnthropicBeta`
17601760 
from line 2546
25462546 
25472547 The version of the Claude API you want to use.
25482548 
2549 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
2549 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
25502550 
25512551- `"anthropic-beta": optional array of AnthropicBeta`
25522552 
from line 2808
28082808 
28092809 The version of the Claude API you want to use.
28102810 
2811 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
2811 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
28122812 
28132813- `"anthropic-beta": optional array of AnthropicBeta`
28142814 
from line 3056
30563056 
30573057 The version of the Claude API you want to use.
30583058 
3059 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3059 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
30603060 
30613061- `"anthropic-beta": optional array of AnthropicBeta`
30623062 
from line 3311
33113311 
33123312 The version of the Claude API you want to use.
33133313 
3314 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3314 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
33153315 
33163316- `"anthropic-beta": optional array of AnthropicBeta`
33173317 
from line 3499
34993499 
35003500 The version of the Claude API you want to use.
35013501 
3502 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3502 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
35033503 
35043504- `"anthropic-beta": optional array of AnthropicBeta`
35053505 
from line 3769
37693769 
37703770 The version of the Claude API you want to use.
37713771 
3772 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3772 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
37733773 
37743774- `"anthropic-beta": optional array of AnthropicBeta`
37753775 
from line 4022
40224022 
40234023 The version of the Claude API you want to use.
40244024 
4025 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4025 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
40264026 
40274027- `"anthropic-beta": optional array of AnthropicBeta`
40284028 
from line 4280
42804280 
42814281 The version of the Claude API you want to use.
42824282 
4283 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4283 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
42844284 
42854285- `"anthropic-beta": optional array of AnthropicBeta`
42864286 

api/beta/environments/work Changed · +8 / -8 lines

from line 25
2525 
2626 The version of the Claude API you want to use.
2727 
28 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
28 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2929 
3030- `"anthropic-beta": optional array of AnthropicBeta`
3131 
from line 287
287287 
288288 The version of the Claude API you want to use.
289289 
290 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
290 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
291291 
292292- `"anthropic-beta": optional array of AnthropicBeta`
293293 
from line 535
535535 
536536 The version of the Claude API you want to use.
537537 
538 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
538 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
539539 
540540- `"anthropic-beta": optional array of AnthropicBeta`
541541 
from line 790
790790 
791791 The version of the Claude API you want to use.
792792 
793 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
793 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
794794 
795795- `"anthropic-beta": optional array of AnthropicBeta`
796796 
from line 978
978978 
979979 The version of the Claude API you want to use.
980980 
981 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
981 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
982982 
983983- `"anthropic-beta": optional array of AnthropicBeta`
984984 
from line 1248
12481248 
12491249 The version of the Claude API you want to use.
12501250 
1251 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1251 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
12521252 
12531253- `"anthropic-beta": optional array of AnthropicBeta`
12541254 
from line 1501
15011501 
15021502 The version of the Claude API you want to use.
15031503 
1504 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1504 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
15051505 
15061506- `"anthropic-beta": optional array of AnthropicBeta`
15071507 
from line 1759
17591759 
17601760 The version of the Claude API you want to use.
17611761 
1762 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1762 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
17631763 
17641764- `"anthropic-beta": optional array of AnthropicBeta`
17651765 

api/beta/files Changed · +5 / -5 lines

from line 17
1717 
1818 The version of the Claude API you want to use.
1919 
20 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
20 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2121 
2222- `"anthropic-beta": optional array of AnthropicBeta`
2323 
from line 272
272272 
273273 The version of the Claude API you want to use.
274274 
275 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
275 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
276276 
277277- `"anthropic-beta": optional array of AnthropicBeta`
278278 
from line 506
506506 
507507 The version of the Claude API you want to use.
508508 
509 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
509 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
510510 
511511- `"anthropic-beta": optional array of AnthropicBeta`
512512 
from line 646
646646 
647647 The version of the Claude API you want to use.
648648 
649 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
649 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
650650 
651651- `"anthropic-beta": optional array of AnthropicBeta`
652652 
from line 869
869869 
870870 The version of the Claude API you want to use.
871871 
872 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
872 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
873873 
874874- `"anthropic-beta": optional array of AnthropicBeta`
875875 

api/beta/memory_stores Changed · +22 / -22 lines

from line 1456
14561456 
14571457 - `memory_version_id: string`
14581458 
1459 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1459 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
14601460 
14611461 - `path: string`
14621462 
from line 1464
14641464 
14651465 - `updated_at: string`
14661466 
1467 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1467 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
14681468 
14691469 format: date-time
14701470 
from line 1703
17031703 
17041704 - `memory_version_id: string`
17051705 
1706 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1706 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
17071707 
17081708 - `path: string`
17091709 
from line 1711
17111711 
17121712 - `updated_at: string`
17131713 
1714 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1714 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
17151715 
17161716 format: date-time
17171717 
from line 1721
17211721 
17221722 - `BetaManagedAgentsMemoryPrefix object`
17231723 
1724 A rolled-up directory marker returned by [List memories](/docs/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
1724 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
17251725 
17261726 - `type: "memory_prefix"`
17271727 
from line 1944
19441944 
19451945 - `memory_version_id: string`
19461946 
1947 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1947 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
19481948 
19491949 - `path: string`
19501950 
from line 1952
19521952 
19531953 - `updated_at: string`
19541954 
1955 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1955 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
19561956 
19571957 format: date-time
19581958 
from line 2188
21882188 
21892189 - `memory_version_id: string`
21902190 
2191 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
2191 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
21922192 
21932193 - `path: string`
21942194 
from line 2196
21962196 
21972197 - `updated_at: string`
21982198 
2199 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
2199 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
22002200 
22012201 format: date-time
22022202 
from line 2376
23762376 
23772377- `BetaManagedAgentsDeletedMemory object`
23782378 
2379 Tombstone returned by [Delete a memory](/docs/en/api/beta/memory_stores/memories/delete). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
2379 Tombstone returned by [Delete a memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
23802380 
23812381 - `type: "memory_deleted"`
23822382 
from line 2623
26232623 
26242624 - `memory_id: string`
26252625 
2626 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
2626 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
26272627 
26282628 - `memory_store_id: string`
26292629 
from line 2661
26612661 
26622662 - `created_by: optional BetaManagedAgentsActor`
26632663 
2664 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
2664 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
26652665 
26662666 - `BetaManagedAgentsSessionActor object`
26672667 
from line 2671
26712671 
26722672 - `session_id: string`
26732673 
2674 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
2674 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
26752675 
26762676 minLength: 1
26772677 
from line 2717
27172717 
27182718 - `redacted_at: optional string or null`
27192719 
2720 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
2720 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
27212721 
27222722 format: date-time
27232723 
from line 2935
29352935 
29362936 - `memory_id: string`
29372937 
2938 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
2938 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
29392939 
29402940 - `memory_store_id: string`
29412941 
from line 2973
29732973 
29742974 - `created_by: optional BetaManagedAgentsActor`
29752975 
2976 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
2976 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
29772977 
29782978 - `BetaManagedAgentsSessionActor object`
29792979 
from line 2983
29832983 
29842984 - `session_id: string`
29852985 
2986 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
2986 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
29872987 
29882988 minLength: 1
29892989 
from line 3029
30293029 
30303030 - `redacted_at: optional string or null`
30313031 
3032 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
3032 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
30333033 
30343034 format: date-time
30353035 
from line 3224
32243224 
32253225 - `memory_id: string`
32263226 
3227 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
3227 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
32283228 
32293229 - `memory_store_id: string`
32303230 
from line 3262
32623262 
32633263 - `created_by: optional BetaManagedAgentsActor`
32643264 
3265 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
3265 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
32663266 
32673267 - `BetaManagedAgentsSessionActor object`
32683268 
from line 3272
32723272 
32733273 - `session_id: string`
32743274 
3275 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
3275 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
32763276 
32773277 minLength: 1
32783278 
from line 3318
33183318 
33193319 - `redacted_at: optional string or null`
33203320 
3321 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
3321 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
33223322 
33233323 format: date-time
33243324 

api/beta/memory_stores/memories Changed · +20 / -20 lines

from line 193
193193 
194194 - `memory_version_id: string`
195195 
196 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
196 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
197197 
198198 - `path: string`
199199 
from line 201
201201 
202202 - `updated_at: string`
203203 
204 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
204 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
205205 
206206 format: date-time
207207 
from line 440
440440 
441441 - `memory_version_id: string`
442442 
443 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
443 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
444444 
445445 - `path: string`
446446 
from line 448
448448 
449449 - `updated_at: string`
450450 
451 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
451 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
452452 
453453 format: date-time
454454 
from line 458
458458 
459459 - `BetaManagedAgentsMemoryPrefix object`
460460 
461 A rolled-up directory marker returned by [List memories](/docs/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
461 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
462462 
463463 - `type: "memory_prefix"`
464464 
from line 681
681681 
682682 - `memory_version_id: string`
683683 
684 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
684 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
685685 
686686 - `path: string`
687687 
from line 689
689689 
690690 - `updated_at: string`
691691 
692 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
692 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
693693 
694694 format: date-time
695695 
from line 925
925925 
926926 - `memory_version_id: string`
927927 
928 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
928 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
929929 
930930 - `path: string`
931931 
from line 933
933933 
934934 - `updated_at: string`
935935 
936 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
936 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
937937 
938938 format: date-time
939939 
from line 1113
11131113 
11141114- `BetaManagedAgentsDeletedMemory object`
11151115 
1116 Tombstone returned by [Delete a memory](/docs/en/api/beta/memory_stores/memories/delete). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
1116 Tombstone returned by [Delete a memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
11171117 
11181118 - `type: "memory_deleted"`
11191119 
from line 1166
11661166 
11671167- `BetaManagedAgentsDeletedMemory object`
11681168 
1169 Tombstone returned by [Delete a memory](/docs/en/api/beta/memory_stores/memories/delete). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
1169 Tombstone returned by [Delete a memory](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/delete?sdk_languages=http). Deleting a memory does not erase its version history: its versions remain listable via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) while they are retained (each version is kept for at least the version retention period after it was written, unless the store itself is deleted).
11701170 
11711171 - `type: "memory_deleted"`
11721172 
from line 1274
12741274 
12751275 The error doesn't include the memory's current state. Retrieve the memory to see its current content and `content_sha256` before you retry.
12761276 
1277 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory#safe-content-edits-optimistic-concurrency) to learn more about safe content edits with content hash preconditions.
1277 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#safe-content-edits-optimistic-concurrency) to learn more about safe content edits with content hash preconditions.
12781278 
12791279 - `type: "memory_precondition_failed_error"`
12801280 
from line 1344
13441344 
13451345 - `memory_version_id: string`
13461346 
1347 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1347 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
13481348 
13491349 - `path: string`
13501350 
from line 1352
13521352 
13531353 - `updated_at: string`
13541354 
1355 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1355 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
13561356 
13571357 format: date-time
13581358 
from line 1364
13641364 
13651365- `BetaManagedAgentsMemoryListItem = BetaManagedAgentsMemory or BetaManagedAgentsMemoryPrefix`
13661366 
1367 One item in a [List memories](/docs/en/api/beta/memory_stores/memories/list) response: either a `memory` object or, when `depth` is set, a `memory_prefix` rollup marker.
1367 One item in a [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) response: either a `memory` object or, when `depth` is set, a `memory_prefix` rollup marker.
13681368 
13691369 - `BetaManagedAgentsMemory object`
13701370 
from line 1398
13981398 
13991399 - `memory_version_id: string`
14001400 
1401 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1401 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
14021402 
14031403 - `path: string`
14041404 
from line 1406
14061406 
14071407 - `updated_at: string`
14081408 
1409 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
1409 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
14101410 
14111411 format: date-time
14121412 
from line 1416
14161416 
14171417 - `BetaManagedAgentsMemoryPrefix object`
14181418 
1419 A rolled-up directory marker returned by [List memories](/docs/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
1419 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
14201420 
14211421 - `type: "memory_prefix"`
14221422 
from line 1456
14561456 
14571457 The error doesn't include the memory's current state. Retrieve the memory to see its current content and `content_sha256` before you retry.
14581458 
1459 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory#safe-content-edits-optimistic-concurrency) to learn more about safe content edits with content hash preconditions.
1459 See the [memory guide](https://platform.claude.com/docs/en/managed-agents/memory?sdk_languages=http#safe-content-edits-optimistic-concurrency) to learn more about safe content edits with content hash preconditions.
14601460 
14611461 - `type: "memory_precondition_failed_error"`
14621462 
from line 1468
14681468 
14691469- `BetaManagedAgentsMemoryPrefix object`
14701470 
1471 A rolled-up directory marker returned by [List memories](/docs/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
1471 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
14721472 
14731473 - `type: "memory_prefix"`
14741474 

api/beta/memory_stores/memories/list Changed · +3 / -3 lines

from line 203
203203 
204204 - `memory_version_id: string`
205205 
206 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
206 ID of the `memory_version` representing this memory's current content (a `memver_...` value). This is the authoritative head pointer; `memory_version` objects do not carry an `is_latest` flag, so compare against this field instead. Enumerate the history via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
207207 
208208 - `path: string`
209209 
from line 211
211211 
212212 - `updated_at: string`
213213 
214 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list).
214 When this memory was last modified, in RFC 3339 format. Use this as a cheap freshness signal; for who made the change, look up the head version's `created_by` via [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http).
215215 
216216 format: date-time
217217 
from line 221
221221 
222222 - `BetaManagedAgentsMemoryPrefix object`
223223 
224 A rolled-up directory marker returned by [List memories](/docs/en/api/beta/memory_stores/memories/list) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
224 A rolled-up directory marker returned by [List memories](https://platform.claude.com/docs/en/api/beta/memory_stores/memories/list?sdk_languages=http) when `depth` is set. Indicates that one or more memories exist deeper than the requested depth under this prefix. This is a list-time rollup, not a stored resource; it has no ID and no lifecycle. Each prefix counts toward the page `limit` and interleaves with `memory` items in path order.
225225 
226226 - `type: "memory_prefix"`
227227 

api/beta/memory_stores/memory_versions Changed · +18 / -18 lines

from line 223
223223 
224224 - `memory_id: string`
225225 
226 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
226 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
227227 
228228 - `memory_store_id: string`
229229 
from line 261
261261 
262262 - `created_by: optional BetaManagedAgentsActor`
263263 
264 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
264 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
265265 
266266 - `BetaManagedAgentsSessionActor object`
267267 
from line 271
271271 
272272 - `session_id: string`
273273 
274 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
274 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
275275 
276276 minLength: 1
277277 
from line 317
317317 
318318 - `redacted_at: optional string or null`
319319 
320 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
320 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
321321 
322322 format: date-time
323323 
from line 535
535535 
536536 - `memory_id: string`
537537 
538 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
538 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
539539 
540540 - `memory_store_id: string`
541541 
from line 573
573573 
574574 - `created_by: optional BetaManagedAgentsActor`
575575 
576 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
576 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
577577 
578578 - `BetaManagedAgentsSessionActor object`
579579 
from line 583
583583 
584584 - `session_id: string`
585585 
586 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
586 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
587587 
588588 minLength: 1
589589 
from line 629
629629 
630630 - `redacted_at: optional string or null`
631631 
632 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
632 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
633633 
634634 format: date-time
635635 
from line 824
824824 
825825 - `memory_id: string`
826826 
827 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
827 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
828828 
829829 - `memory_store_id: string`
830830 
from line 862
862862 
863863 - `created_by: optional BetaManagedAgentsActor`
864864 
865 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
865 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
866866 
867867 - `BetaManagedAgentsSessionActor object`
868868 
from line 872
872872 
873873 - `session_id: string`
874874 
875 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
875 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
876876 
877877 minLength: 1
878878 
from line 918
918918 
919919 - `redacted_at: optional string or null`
920920 
921 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
921 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
922922 
923923 format: date-time
924924 
from line 978
978978 
979979 - `session_id: string`
980980 
981 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
981 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
982982 
983983 minLength: 1
984984 
from line 1052
10521052 
10531053 - `memory_id: string`
10541054 
1055 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
1055 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
10561056 
10571057 - `memory_store_id: string`
10581058 
from line 1090
10901090 
10911091 - `created_by: optional BetaManagedAgentsActor`
10921092 
1093 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
1093 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
10941094 
10951095 - `BetaManagedAgentsSessionActor object`
10961096 
from line 1100
11001100 
11011101 - `session_id: string`
11021102 
1103 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
1103 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
11041104 
11051105 minLength: 1
11061106 
from line 1146
11461146 
11471147 - `redacted_at: optional string or null`
11481148 
1149 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
1149 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
11501150 
11511151 format: date-time
11521152 
from line 1196
11961196 
11971197 - `session_id: string`
11981198 
1199 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
1199 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
12001200 
12011201 minLength: 1
12021202 

api/beta/memory_stores/memory_versions/list Changed · +4 / -4 lines

from line 221
221221 
222222 - `memory_id: string`
223223 
224 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
224 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
225225 
226226 - `memory_store_id: string`
227227 
from line 259
259259 
260260 - `created_by: optional BetaManagedAgentsActor`
261261 
262 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
262 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
263263 
264264 - `BetaManagedAgentsSessionActor object`
265265 
from line 269
269269 
270270 - `session_id: string`
271271 
272 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
272 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
273273 
274274 minLength: 1
275275 
from line 315
315315 
316316 - `redacted_at: optional string or null`
317317 
318 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
318 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
319319 
320320 format: date-time
321321 

api/beta/memory_stores/memory_versions/redact Changed · +4 / -4 lines

from line 155
155155 
156156 - `memory_id: string`
157157 
158 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
158 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
159159 
160160 - `memory_store_id: string`
161161 
from line 193
193193 
194194 - `created_by: optional BetaManagedAgentsActor`
195195 
196 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
196 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
197197 
198198 - `BetaManagedAgentsSessionActor object`
199199 
from line 203
203203 
204204 - `session_id: string`
205205 
206 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
206 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
207207 
208208 minLength: 1
209209 
from line 249
249249 
250250 - `redacted_at: optional string or null`
251251 
252 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
252 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
253253 
254254 format: date-time
255255 

api/beta/memory_stores/memory_versions/retrieve Changed · +4 / -4 lines

from line 169
169169 
170170 - `memory_id: string`
171171 
172 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](/docs/en/api/beta/memory_stores/memory_versions/list) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
172 ID of the memory this version snapshots (a `mem_...` value). Remains valid after the memory is deleted; pass it as `memory_id` to [List memory versions](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/list?sdk_languages=http) to retrieve the memory's retained versions, including the `deleted` row while the lineage is retained.
173173 
174174 - `memory_store_id: string`
175175 
from line 207
207207 
208208 - `created_by: optional BetaManagedAgentsActor`
209209 
210 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](/docs/en/api/beta/sessions/retrieve).
210 Who performed this write: one of `session_actor`, `api_actor`, `user_actor`, or `service_account_actor`; `null` when no writer is recorded. Captured at write time and preserved through redaction. A `session_actor` is an agent writing through the store's mounted filesystem at `/mnt/memory/`. The API key that created that session is not recorded on agent writes, so attribution names who made the write, not who is ultimately responsible; look up session provenance via the [Sessions API](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http).
211211 
212212 - `BetaManagedAgentsSessionActor object`
213213 
from line 217
217217 
218218 - `session_id: string`
219219 
220 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](/docs/en/api/beta/sessions/retrieve) for further provenance.
220 ID of the session (a `sesn_...` value). Look up the session via [Retrieve a session](https://platform.claude.com/docs/en/api/beta/sessions/retrieve?sdk_languages=http) for further provenance.
221221 
222222 minLength: 1
223223 
from line 263
263263 
264264 - `redacted_at: optional string or null`
265265 
266 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](/docs/en/api/beta/memory_stores/memory_versions/redact).
266 When this version was redacted, in RFC 3339 format, or `null` if it has not been redacted. When set, `content`, `path`, `content_size_bytes`, and `content_sha256` are all `null`. See [Redact a memory version](https://platform.claude.com/docs/en/api/beta/memory_stores/memory_versions/redact?sdk_languages=http).
267267 
268268 format: date-time
269269 

api/beta/messages Changed · +185 / -185 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 13
1313 
1414The Messages API can be used for either single queries or stateless multi-turn conversations.
1515 
16Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)
16Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started?sdk_languages=http)
1717 
1818### Headers
1919 
from line 21
2121 
2222 The version of the Claude API you want to use.
2323 
24 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
24 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2525 
2626- `"anthropic-beta": optional array of AnthropicBeta`
2727 
from line 147
147147 
148148 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
149149 
150 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
150 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#pre-warming-the-cache) without generating a response.
151151 
152 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
152 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http) for details.
153153 
154154 minimum: 0
155155 
from line 161
161161 
162162 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
163163 
164 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
164 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
165165 
166166 Example with a single `user` message:
167167 
from line 198
198198 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
199199 ```
200200 
201 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
201 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
202202 
203 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
203 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
204204 
205205 There is a limit of 100,000 messages in a single request.
206206 
from line 233
233233 - `5m`: 5 minutes
234234 - `1h`: 1 hour
235235 
236 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
236 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
237237 
238238 - `"5m"`
239239 
from line 3762
37623762 
37633763- `fallbacks: optional BetaFallbacksParam or null`
37643764 
3765 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
3765 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback?sdk_languages=http#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
37663766 
37673767 - `array of BetaFallbackParam`
37683768 
from line 3794
37943794 
37953795 - `format: optional BetaJSONOutputFormat or null`
37963796 
3797 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
3797 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
37983798 
37993799 - `type: "json_schema"`
38003800 
from line 3842
38423842 
38433843 Must be ≥1024 and less than `max_tokens`.
38443844 
3845 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
3845 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
38463846 
38473847 minimum: 1024
38483848 
from line 3860
38603860 
38613861 - `display: optional "summarized" or "omitted" or "updates" or null`
38623862 
3863 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3863 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38643864 
38653865 - `"summarized"`
38663866 
from line 3886
38863886 
38873887 - `display: optional "summarized" or "omitted" or "updates" or null`
38883888 
3889 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3889 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38903890 
38913891 - `"summarized"`
38923892 
from line 3940
39403940 
39413941 Determines whether to use priority capacity (if available) or standard capacity for this request.
39423942 
3943 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.
3943 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=http) for details.
39443944 
39453945 - `"auto"`
39463946 
from line 3966
39663966 
39673967 Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.
39683968 
3969 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language.
3969 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=http#streaming-with-sdks) for an example in each language.
39703970 
39713971- `system: optional string or array of BetaTextBlockParam`
39723972 
39733973 System prompt.
39743974 
3975 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3975 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
39763976 
39773977 - `string`
39783978 
from line 3996
39963996 
39973997 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
39983998 
3999 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
3999 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
40004000 
40014001 - `BetaThinkingConfigEnabled object`
40024002 
from line 4062
40624062 
40634063 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
40644064 
4065 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
4065 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
40664066 
40674067 Each tool definition includes:
40684068 
from line 4118
41184118 
41194119 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
41204120 
4121 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
4121 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
41224122 
41234123 - `BetaTool object`
41244124 
from line 4205
42054205 
42064206 **Deprecated**
42074207 
4208 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
4208 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
42094209 
42104210 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
42114211 
from line 4486
44864486 
44874487 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.
44884488 
4489 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
4489 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
44904490 
44914491 - `thinking: string`
44924492 
from line 4504
45044504 
45054505 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.
45064506 
4507 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
4507 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http#redacted-thinking-blocks) for details.
45084508 
45094509 - `BetaToolUseBlock object`
45104510 
from line 5310
53105310 - `5m`: 5 minutes
53115311 - `1h`: 1 hour
53125312 
5313 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
5313 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
53145314 
53155315 - `"5m"`
53165316 
from line 7162
71627162 
71637163 - `"code_execution_20250825"`
71647164 
7165 - `"code_execution_20260120"`
7166 
7167 - `"code_execution_20260521"`
7168 
7169 - `cache_control: optional BetaCacheControlEphemeral or null`
7170 
7171 Create a cache control breakpoint at this content block.
7172 
7173 - `defer_loading: optional boolean`
7174 
7175 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
7176 
7177 - `strict
7165 - `"code_exe

api/beta/messages/batches Changed · +51 / -51 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 13
1313 
1414The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.
1515 
16Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
16Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
1717 
1818### Headers
1919 
from line 21
2121 
2222 The version of the Claude API you want to use.
2323 
24 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
24 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2525 
2626- `"anthropic-beta": optional array of AnthropicBeta`
2727 
from line 159
159159 
160160 Messages API creation parameters for the individual request.
161161 
162 See the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters.
162 See the [Messages API reference](https://platform.claude.com/docs/en/api/messages?sdk_languages=http) for full documentation on available parameters.
163163 
164164 - `max_tokens: number`
165165 
from line 167
167167 
168168 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
169169 
170 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
170 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#pre-warming-the-cache) without generating a response.
171171 
172 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
172 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http) for details.
173173 
174174 minimum: 0
175175 
from line 181
181181 
182182 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
183183 
184 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
184 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
185185 
186186 Example with a single `user` message:
187187 
from line 218
218218 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
219219 ```
220220 
221 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
221 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
222222 
223 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
223 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
224224 
225225 There is a limit of 100,000 messages in a single request.
226226 
from line 253
253253 - `5m`: 5 minutes
254254 - `1h`: 1 hour
255255 
256 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
256 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
257257 
258258 - `"5m"`
259259 
from line 3782
37823782 
37833783 - `fallbacks: optional BetaFallbacksParam or null`
37843784 
3785 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
3785 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback?sdk_languages=http#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
37863786 
37873787 - `array of BetaFallbackParam`
37883788 
from line 3814
38143814 
38153815 - `format: optional BetaJSONOutputFormat or null`
38163816 
3817 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
3817 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
38183818 
38193819 - `type: "json_schema"`
38203820 
from line 3862
38623862 
38633863 Must be ≥1024 and less than `max_tokens`.
38643864 
3865 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
3865 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
38663866 
38673867 minimum: 1024
38683868 
from line 3880
38803880 
38813881 - `display: optional "summarized" or "omitted" or "updates" or null`
38823882 
3883 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3883 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38843884 
38853885 - `"summarized"`
38863886 
from line 3906
39063906 
39073907 - `display: optional "summarized" or "omitted" or "updates" or null`
39083908 
3909 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3909 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
39103910 
39113911 - `"summarized"`
39123912 
from line 3960
39603960 
39613961 Determines whether to use priority capacity (if available) or standard capacity for this request.
39623962 
3963 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.
3963 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=http) for details.
39643964 
39653965 - `"auto"`
39663966 
from line 3986
39863986 
39873987 Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.
39883988 
3989 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language.
3989 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=http#streaming-with-sdks) for an example in each language.
39903990 
39913991 - `system: optional string or array of BetaTextBlockParam`
39923992 
39933993 System prompt.
39943994 
3995 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3995 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
39963996 
39973997 - `string`
39983998 
from line 4016
40164016 
40174017 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
40184018 
4019 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
4019 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
40204020 
40214021 - `BetaThinkingConfigEnabled object`
40224022 
from line 4082
40824082 
40834083 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
40844084 
4085 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
4085 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
40864086 
40874087 Each tool definition includes:
40884088 
from line 4138
41384138 
41394139 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
41404140 
4141 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
4141 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
41424142 
41434143 - `BetaTool object`
41444144 
from line 4225
42254225 
42264226 **Deprecated**
42274227 
4228 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
4228 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
42294229 
42304230 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
42314231 
from line 4431
44314431 
44324432This endpoint is idempotent and can be used to poll for Message Batch completion. To access the results of a Message Batch, make a request to the `results_url` field in the response.
44334433 
4434Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
4434Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
44354435 
44364436### Path parameters
44374437 
from line 4445
44454445 
44464446 The version of the Claude API you want to use.
44474447 
4448 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4448 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
44494449 
44504450- `"anthropic-beta": optional array of AnthropicBeta`
44514451 
from line 4707
47074707 
47084708List all Message Batches within a Workspace. Most recently created batches are returned first.
47094709 
4710Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
4710Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
47114711 
47124712### Query parameters
47134713 
from line 4733
47334733 
47344734 The version of the Claude API you want to use.
47354735 
4736 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4736 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
47374737 
47384738- `"anthropic-beta": optional array of AnthropicBeta`
47394739 
from line 5016
50165016 
50175017The number of canceled requests is specified in `request_counts`. To determine which requests were canceled, check the individual results within the batch. Note that cancellation may not result in any canceled requests if they were non-interruptible.
50185018 
5019Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
5019Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
50205020 
50215021### Path parameters
50225022 
from line 5030
50305030 
50315031 The version of the Claude API you want to use.
50325032 
5033 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5033 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
50345034 
50355035- `"anthropic-beta": optional array of AnthropicBeta`
50365036 
from line 5295
52955295 
52965296Message Batches can only be deleted once they've finished processing. If you'd like to delete an in-progress batch, you must first cancel it.
52975297 
5298Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
5298Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
52995299 
53005300### Path parameters
53015301 
from line 5309
53095309 
53105310 The version of the Claude API you want to use.
53115311 
5312 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5312 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
53135313 
53145314- `"anthropic-beta": optional array of AnthropicBeta`
53155315 
from line 5466
54665466 
54675467Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
54685468 
5469Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
5469Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
54705470 
54715471### Path parameters
54725472 
from line 5480
54805480 
54815481 The version of the Claude API you want to use.
54825482 
5483 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5483 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
54845484 
54855485- `"anthropic-beta": optional array of AnthropicBeta`
54865486 
from line 5857
58575857 
58585858 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.
58595859 
5860 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
5860 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
58615861 
58625862 - `thinking: string`
58635863 
from line 5875
58755875 
58765876 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.
58775877 
5878 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
5878 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http#redacted-thinking-blocks) for details.
58795879 
58805880 - `BetaToolUseBlock object`
58815881 
from line 6681
66816681 - `5m`: 5 minutes
66826682 - `1h`: 1 hour
66836683 
6684 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
6684 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
66856685 
66866686 - `"5m"`
66876687 
from line 7322
73227322 
73237323 - `"code_execution_20260120"`
73247324 
7325 - `"code_execution_20260521"`
7326 
7327 - `cache_control: optional BetaCacheControlEphemeral or null`
7328 
7329 Create a cache control breakpoint at this content block.
7330 
7331 - `defer_loading: optional boolean`
7332 
7333 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
7334 
7335 - `input_examples: optional array of map[unknown]`
7336 
7337 - `strict: optional boolean`
7338 
7339 When true, guarantees schema validation on tool names and inputs
7340 
7341 - `BetaToolComputerUse20
7325 - `"code_executio

api/beta/messages/batches/create Changed · +23 / -23 lines

from line 11
1111 
1212The Message Batches API can be used to process multiple Messages API requests at once. Once a Message Batch is created, it begins processing immediately. Batches can take up to 24 hours to complete.
1313 
14Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
14Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
1515 
1616## Headers
1717 
from line 19
1919 
2020 The version of the Claude API you want to use.
2121 
22 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
22 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2323 
2424- `"anthropic-beta": optional array of AnthropicBeta`
2525 
from line 157
157157 
158158 Messages API creation parameters for the individual request.
159159 
160 See the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters.
160 See the [Messages API reference](https://platform.claude.com/docs/en/api/messages?sdk_languages=http) for full documentation on available parameters.
161161 
162162 - `max_tokens: number`
163163 
from line 165
165165 
166166 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
167167 
168 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
168 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#pre-warming-the-cache) without generating a response.
169169 
170 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
170 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http) for details.
171171 
172172 minimum: 0
173173 
from line 179
179179 
180180 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
181181 
182 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
182 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
183183 
184184 Example with a single `user` message:
185185 
from line 216
216216 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
217217 ```
218218 
219 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
219 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
220220 
221 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
221 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
222222 
223223 There is a limit of 100,000 messages in a single request.
224224 
from line 251
251251 - `5m`: 5 minutes
252252 - `1h`: 1 hour
253253 
254 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
254 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
255255 
256256 - `"5m"`
257257 
from line 3780
37803780 
37813781 - `fallbacks: optional BetaFallbacksParam or null`
37823782 
3783 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
3783 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback?sdk_languages=http#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
37843784 
37853785 - `array of BetaFallbackParam`
37863786 
from line 3812
38123812 
38133813 - `format: optional BetaJSONOutputFormat or null`
38143814 
3815 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
3815 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
38163816 
38173817 - `type: "json_schema"`
38183818 
from line 3860
38603860 
38613861 Must be ≥1024 and less than `max_tokens`.
38623862 
3863 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
3863 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
38643864 
38653865 minimum: 1024
38663866 
from line 3878
38783878 
38793879 - `display: optional "summarized" or "omitted" or "updates" or null`
38803880 
3881 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3881 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38823882 
38833883 - `"summarized"`
38843884 
from line 3904
39043904 
39053905 - `display: optional "summarized" or "omitted" or "updates" or null`
39063906 
3907 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3907 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
39083908 
39093909 - `"summarized"`
39103910 
from line 3958
39583958 
39593959 Determines whether to use priority capacity (if available) or standard capacity for this request.
39603960 
3961 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.
3961 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=http) for details.
39623962 
39633963 - `"auto"`
39643964 
from line 3984
39843984 
39853985 Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.
39863986 
3987 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language.
3987 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=http#streaming-with-sdks) for an example in each language.
39883988 
39893989 - `system: optional string or array of BetaTextBlockParam`
39903990 
39913991 System prompt.
39923992 
3993 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3993 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
39943994 
39953995 - `string`
39963996 
from line 4014
40144014 
40154015 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
40164016 
4017 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
4017 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
40184018 
40194019 - `BetaThinkingConfigEnabled object`
40204020 
from line 4080
40804080 
40814081 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
40824082 
4083 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
4083 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
40844084 
40854085 Each tool definition includes:
40864086 
from line 4136
41364136 
41374137 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
41384138 
4139 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
4139 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
41404140 
41414141 - `BetaTool object`
41424142 
from line 4223
42234223 
42244224 **Deprecated**
42254225 
4226 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
4226 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
42274227 
42284228 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
42294229 

api/beta/messages/batches/results Changed · +7 / -7 lines

from line 11
1111 
1212Each line in the file is a JSON object containing the result of a single request in the Message Batch. Results are not guaranteed to be in the same order as requests. Use the `custom_id` field to match results to requests.
1313 
14Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)
14Learn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing?sdk_languages=http)
1515 
1616## Path parameters
1717 
from line 25
2525 
2626 The version of the Claude API you want to use.
2727 
28 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
28 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2929 
3030- `"anthropic-beta": optional array of AnthropicBeta`
3131 
from line 402
402402 
403403 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.
404404 
405 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
405 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
406406 
407407 - `thinking: string`
408408 
from line 420
420420 
421421 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.
422422 
423 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
423 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http#redacted-thinking-blocks) for details.
424424 
425425 - `BetaToolUseBlock object`
426426 
from line 1226
12261226 - `5m`: 5 minutes
12271227 - `1h`: 1 hour
12281228 
1229 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
1229 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
12301230 
12311231 - `"5m"`
12321232 
from line 3238
32383238 
32393239 - `"reasoning_extraction"`
32403240 
3241 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
3241 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=http).
32423242 
32433243 - `"general_harms"`
32443244 
from line 3419
34193419 
34203420 - `"reasoning_extraction"`
34213421 
3422 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking).
3422 The request asks the model to reproduce its internal reasoning in the response text. To get reasoning in a structured form instead, use [adaptive thinking](https://platform.claude.com/docs/en/build-with-claude/adaptive-thinking?sdk_languages=http).
34233423 
34243424 - `"general_harms"`
34253425 

api/beta/messages/count_tokens Changed · +16 / -16 lines

from line 11
1111 
1212The Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.
1313 
14Learn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting)
14Learn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting?sdk_languages=http)
1515 
1616## Headers
1717 
from line 19
1919 
2020 The version of the Claude API you want to use.
2121 
22 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
22 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2323 
2424- `"anthropic-beta": optional array of AnthropicBeta`
2525 
from line 147
147147 
148148 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
149149 
150 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
150 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
151151 
152152 Example with a single `user` message:
153153 
from line 184
184184 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
185185 ```
186186 
187 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
187 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
188188 
189 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
189 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
190190 
191191 There is a limit of 100,000 messages in a single request.
192192 
from line 219
219219 - `5m`: 5 minutes
220220 - `1h`: 1 hour
221221 
222 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
222 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
223223 
224224 - `"5m"`
225225 
from line 3689
36893689 
36903690 - `format: optional BetaJSONOutputFormat or null`
36913691 
3692 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
3692 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
36933693 
36943694 - `type: "json_schema"`
36953695 
from line 3729
37293729 
37303730 System prompt.
37313731 
3732 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3732 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
37333733 
37343734 - `string`
37353735 
from line 3753
37533753 
37543754 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
37553755 
3756 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
3756 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
37573757 
37583758 - `BetaThinkingConfigEnabled object`
37593759 
from line 3765
37653765 
37663766 Must be ≥1024 and less than `max_tokens`.
37673767 
3768 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
3768 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
37693769 
37703770 minimum: 1024
37713771 
from line 3783
37833783 
37843784 - `display: optional "summarized" or "omitted" or "updates" or null`
37853785 
3786 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3786 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
37873787 
37883788 - `"summarized"`
37893789 
from line 3809
38093809 
38103810 - `display: optional "summarized" or "omitted" or "updates" or null`
38113811 
3812 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3812 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38133813 
38143814 - `"summarized"`
38153815 
from line 3873
38733873 
38743874 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
38753875 
3876 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
3876 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
38773877 
38783878 Each tool definition includes:
38793879 
from line 3929
39293929 
39303930 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
39313931 
3932 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
3932 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
39333933 
39343934 - `BetaTool object`
39353935 
from line 4016
40164016 
40174017 **Deprecated**
40184018 
4019 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
4019 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
40204020 
40214021 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
40224022 

api/beta/messages/create Changed · +27 / -27 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 11
1111 
1212The Messages API can be used for either single queries or stateless multi-turn conversations.
1313 
14Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)
14Learn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started?sdk_languages=http)
1515 
1616## Headers
1717 
from line 19
1919 
2020 The version of the Claude API you want to use.
2121 
22 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
22 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2323 
2424- `"anthropic-beta": optional array of AnthropicBeta`
2525 
from line 145
145145 
146146 Note that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.
147147 
148 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.
148 Set to `0` to populate the [prompt cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http#pre-warming-the-cache) without generating a response.
149149 
150 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.
150 Different models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview?sdk_languages=http) for details.
151151 
152152 minimum: 0
153153 
from line 159
159159 
160160 Each input message must be an object with a `role` and `content`. You can specify a single `user`-role message, or you can include multiple `user` and `assistant` messages.
161161 
162 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors#prefill-not-supported).
162 If the final message uses the `assistant` role, the response content will continue immediately from the content in that message. This can be used to constrain part of the model's response. This is called prefill. On models that don't support prefill, creating a message that ends with a partial `assistant` response returns a 400 error. See [Prefill not supported](https://platform.claude.com/docs/en/api/errors?sdk_languages=http#prefill-not-supported).
163163 
164164 Example with a single `user` message:
165165 
from line 196
196196 {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]}
197197 ```
198198 
199 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).
199 See [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages?sdk_languages=http).
200200 
201 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
201 Note that if you want to include a [system prompt](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role), you can use the top-level `system` parameter — there is no `"system"` role for input messages in the Messages API.
202202 
203203 There is a limit of 100,000 messages in a single request.
204204 
from line 231
231231 - `5m`: 5 minutes
232232 - `1h`: 1 hour
233233 
234 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
234 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
235235 
236236 - `"5m"`
237237 
from line 3760
37603760 
37613761- `fallbacks: optional BetaFallbacksParam or null`
37623762 
3763 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
3763 Opt-in server-side retry on one or more substitute models when the requested model declines for policy reasons. Tried in order: if the first entry also declines, the second is tried, and so on. Some models don't support fallbacks; on those models, a list of fallback models returns a 400 error. See [Server-side fallback](https://platform.claude.com/docs/en/build-with-claude/refusals-and-fallback?sdk_languages=http#server-side-fallback). The string "default" requests the requested model's server-defined default fallback configuration. On a model that doesn't support fallbacks, the request runs on the requested model alone, so a declined request stays declined.
37643764 
37653765 - `array of BetaFallbackParam`
37663766 
from line 3792
37923792 
37933793 - `format: optional BetaJSONOutputFormat or null`
37943794 
3795 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
3795 A schema to specify Claude's output format in responses. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
37963796 
37973797 - `type: "json_schema"`
37983798 
from line 3840
38403840 
38413841 Must be ≥1024 and less than `max_tokens`.
38423842 
3843 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
3843 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
38443844 
38453845 minimum: 1024
38463846 
from line 3858
38583858 
38593859 - `display: optional "summarized" or "omitted" or "updates" or null`
38603860 
3861 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3861 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38623862 
38633863 - `"summarized"`
38643864 
from line 3884
38843884 
38853885 - `display: optional "summarized" or "omitted" or "updates" or null`
38863886 
3887 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking#controlling-thinking-display).
3887 Controls how thinking content appears in the response. When set to `summarized`, thinking is returned normally. When set to `omitted`, thinking content is redacted but a signature is returned for multi-turn continuity. The default depends on the model; see [Controlling thinking display](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#controlling-thinking-display).
38883888 
38893889 - `"summarized"`
38903890 
from line 3938
39383938 
39393939 Determines whether to use priority capacity (if available) or standard capacity for this request.
39403940 
3941 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.
3941 Anthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers?sdk_languages=http) for details.
39423942 
39433943 - `"auto"`
39443944 
from line 3964
39643964 
39653965 Whether to incrementally stream the response using server-sent events. When `true`, SDKs return a raw event stream.
39663966 
3967 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming#streaming-with-sdks) for an example in each language.
3967 In the TypeScript, Python and Ruby SDKs, the recommended way to stream is `messages.stream()`. It sets `stream` for you and accumulates the events into the final message. See [Streaming with SDKs](https://platform.claude.com/docs/en/build-with-claude/streaming?sdk_languages=http#streaming-with-sdks) for an example in each language.
39683968 
39693969- `system: optional string or array of BetaTextBlockParam`
39703970 
39713971 System prompt.
39723972 
3973 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role).
3973 A system prompt is a way of providing context and instructions to Claude, such as specifying a particular goal or role. See our [guide to system prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices?sdk_languages=http#give-claude-a-role).
39743974 
39753975 - `string`
39763976 
from line 3994
39943994 
39953995 With `{"type": "adaptive"}`, Claude decides when and how much to think. With `{"type": "enabled"}` (manual extended thinking), you set a `budget_tokens` of at least 1,024. Thinking tokens count toward your `max_tokens` limit.
39963996 
3997 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking#configuring-thinking) for each model's behavior.
3997 Which `type` values are accepted, and what happens when you omit `thinking`, depend on the model. See [thinking](https://platform.claude.com/docs/en/build-with-claude/thinking?sdk_languages=http#configuring-thinking) for each model's behavior.
39983998 
39993999 - `BetaThinkingConfigEnabled object`
40004000 
from line 4060
40604060 
40614061 If you include `tools` in your API request, the model may return `tool_use` content blocks that represent the model's use of those tools. You can then run those tools using the tool input generated by the model and then optionally return results back to the model using `tool_result` content blocks.
40624062 
4063 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool)).
4063 There are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://platform.claude.com/docs/en/agents-and-tools/tool-use/server-tools?sdk_languages=http), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://platform.claude.com/docs/en/agents-and-tools/tool-use/web-search-tool?sdk_languages=http)).
40644064 
40654065 Each tool definition includes:
40664066 
from line 4116
41164116 
41174117 Tools can be used for workflows that include running client-side tools and functions, or more generally whenever you want the model to produce a particular JSON structure of output.
41184118 
4119 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.
4119 See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview?sdk_languages=http) for more details.
41204120 
41214121 - `BetaTool object`
41224122 
from line 4203
42034203 
42044204 **Deprecated**
42054205 
4206 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)
4206 Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs?sdk_languages=http)
42074207 
42084208 A schema to specify Claude's output format in responses. This parameter will be removed in a future release.
42094209 
from line 4484
44844484 
44854485 This is an opaque field and should not be interpreted or parsed. When passing thinking blocks back to the API (required when using tools with extended thinking), pass them back exactly as received, with this field intact.
44864486 
4487 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.
4487 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http) for details.
44884488 
44894489 - `thinking: string`
44904490 
from line 4502
45024502 
45034503 Pass `redacted_thinking` blocks back to the API unchanged when continuing a multi-turn conversation.
45044504 
4505 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking#redacted-thinking-blocks) for details.
4505 See [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking?sdk_languages=http#redacted-thinking-blocks) for details.
45064506 
45074507 - `BetaToolUseBlock object`
45084508 
from line 5308
53085308 - `5m`: 5 minutes
53095309 - `1h`: 1 hour
53105310 
5311 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.
5311 Defaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching?sdk_languages=http) for details.
53125312 
53135313 - `"5m"`
53145314 
from line 7160
71607160 
71617161 - `"code_execution_20250825"`
71627162 
7163 - `"code_execution_20260120"`
7164 
7165 - `"code_execution_20260521"`
7166 
7167 - `cache_control: optional BetaCacheControlEphemeral or null`
7168 
7169 Create a cache control breakpoint at this content block.
7170 
7171 - `defer_loading: optional boolean`
7172 
7173 If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.
7174 
7175 - `strict:
7163 - `"code_exec

api/beta/organization Changed · +140 / -140 lines

This page is larger than the 256 KiB this site keeps, so one side of the diff below stops where the stored text does.

from line 17
1717 
1818 The version of the Claude API you want to use.
1919 
20 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
20 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
2121 
2222### Returns
2323 
from line 157
157157 
158158 The version of the Claude API you want to use.
159159 
160 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
160 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
161161 
162162#### Returns
163163 
from line 355
355355 
356356 The version of the Claude API you want to use.
357357 
358 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
358 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
359359 
360360#### Returns
361361 
from line 534
534534 
535535 The version of the Claude API you want to use.
536536 
537 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
537 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
538538 
539539#### Body parameters
540540 
from line 729
729729 
730730 The version of the Claude API you want to use.
731731 
732 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
732 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
733733 
734734#### Body parameters
735735 
from line 963
963963 
964964 The version of the Claude API you want to use.
965965 
966 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
966 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
967967 
968968#### Returns
969969 
from line 1120
11201120 
11211121 The version of the Claude API you want to use.
11221122 
1123 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1123 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
11241124 
11251125#### Returns
11261126 
from line 1278
12781278 
12791279 The version of the Claude API you want to use.
12801280 
1281 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1281 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
12821282 
12831283#### Body parameters
12841284 
from line 1502
15021502 
15031503 The version of the Claude API you want to use.
15041504 
1505 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1505 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
15061506 
15071507#### Returns
15081508 
from line 1557
15571557 
15581558 The version of the Claude API you want to use.
15591559 
1560 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1560 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
15611561 
15621562#### Returns
15631563 
from line 1602
16021602 
16031603**POST** `/v1/organizations/federation_issuers`
16041604 
1605**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
1605**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
16061606 
16071607Register an OIDC issuer that Anthropic will trust for workload identity
16081608federation in your organization.
from line 1622
16221622 
16231623 The version of the Claude API you want to use.
16241624 
1625 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
1625 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
16261626 
16271627- `"anthropic-beta": optional array of AnthropicBeta`
16281628 
from line 1990
19901990 
19911991**GET** `/v1/organizations/federation_issuers`
19921992 
1993**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
1993**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
19941994 
19951995List federation issuers in your organization.
19961996 
from line 2020
20202020 
20212021 The version of the Claude API you want to use.
20222022 
2023 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
2023 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
20242024 
20252025- `"anthropic-beta": optional array of AnthropicBeta`
20262026 
from line 2313
23132313 
23142314**GET** `/v1/organizations/federation_issuers/{federation_issuer_id}`
23152315 
2316**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
2316**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
23172317 
23182318Retrieve a federation issuer by its ID (`fdis_...`).
23192319 
from line 2329
23292329 
23302330 The version of the Claude API you want to use.
23312331 
2332 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
2332 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
23332333 
23342334- `"anthropic-beta": optional array of AnthropicBeta`
23352335 
from line 2618
26182618 
26192619**POST** `/v1/organizations/federation_issuers/{federation_issuer_id}`
26202620 
2621**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
2621**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
26222622 
26232623Partially update a federation issuer.
26242624 
from line 2641
26412641 
26422642 The version of the Claude API you want to use.
26432643 
2644 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
2644 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
26452645 
26462646- `"anthropic-beta": optional array of AnthropicBeta`
26472647 
from line 3010
30103010 
30113011**POST** `/v1/organizations/federation_issuers/{federation_issuer_id}/archive`
30123012 
3013**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
3013**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
30143014 
30153015Archive a federation issuer.
30163016 
from line 3031
30313031 
30323032 The version of the Claude API you want to use.
30333033 
3034 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3034 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
30353035 
30363036- `"anthropic-beta": optional array of AnthropicBeta`
30373037 
from line 3323
33233323 
33243324**POST** `/v1/organizations/federation_rules`
33253325 
3326**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
3326**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
33273327 
33283328Create a federation rule owned by your organization.
33293329 
from line 3347
33473347 
33483348 The version of the Claude API you want to use.
33493349 
3350 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3350 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
33513351 
33523352- `"anthropic-beta": optional array of AnthropicBeta`
33533353 
from line 3735
37353735 
37363736**GET** `/v1/organizations/federation_rules`
37373737 
3738**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
3738**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
37393739 
37403740List federation rules in your organization.
37413741 
from line 3770
37703770 
37713771 The version of the Claude API you want to use.
37723772 
3773 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
3773 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
37743774 
37753775- `"anthropic-beta": optional array of AnthropicBeta`
37763776 
from line 4063
40634063 
40644064**GET** `/v1/organizations/federation_rules/{federation_rule_id}`
40654065 
4066**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
4066**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
40674067 
40684068Retrieve a federation rule by its ID (`fdrl_...`).
40694069 
from line 4079
40794079 
40804080 The version of the Claude API you want to use.
40814081 
4082 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4082 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
40834083 
40844084- `"anthropic-beta": optional array of AnthropicBeta`
40854085 
from line 4374
43744374 
43754375**POST** `/v1/organizations/federation_rules/{federation_rule_id}`
43764376 
4377**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
4377**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
43784378 
43794379Partially update a federation rule.
43804380 
from line 4406
44064406 
44074407 The version of the Claude API you want to use.
44084408 
4409 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4409 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
44104410 
44114411- `"anthropic-beta": optional array of AnthropicBeta`
44124412 
from line 4781
47814781 
47824782**POST** `/v1/organizations/federation_rules/{federation_rule_id}/archive`
47834783 
4784**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
4784**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
47854785 
47864786Archive a federation rule.
47874787 
from line 4805
48054805 
48064806 The version of the Claude API you want to use.
48074807 
4808 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
4808 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
48094809 
48104810- `"anthropic-beta": optional array of AnthropicBeta`
48114811 
from line 5103
51035103 
51045104**POST** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces`
51055105 
5106**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
5106**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
51075107 
51085108Enable a federation rule for a workspace.
51095109 
from line 5128
51285128 
51295129 The version of the Claude API you want to use.
51305130 
5131 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5131 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
51325132 
51335133- `"anthropic-beta": optional array of AnthropicBeta`
51345134 
from line 5301
53015301 
53025302**GET** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces`
53035303 
5304**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
5304**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
53055305 
53065306List workspaces where this federation rule is enabled.
53075307 
from line 5335
53355335 
53365336 The version of the Claude API you want to use.
53375337 
5338 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5338 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
53395339 
53405340- `"anthropic-beta": optional array of AnthropicBeta`
53415341 
from line 5507
55075507 
55085508**DELETE** `/v1/organizations/federation_rules/{federation_rule_id}/workspaces/{workspace_id}`
55095509 
5510**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
5510**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
55115511 
55125512Disable a federation rule for a workspace.
55135513 
from line 5532
55325532 
55335533 The version of the Claude API you want to use.
55345534 
5535 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5535 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
55365536 
55375537- `"anthropic-beta": optional array of AnthropicBeta`
55385538 
from line 5689
56895689 
56905690 The version of the Claude API you want to use.
56915691 
5692 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5692 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
56935693 
56945694#### Body parameters
56955695 
from line 5880
58805880 
58815881 The version of the Claude API you want to use.
58825882 
5883 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
5883 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
58845884 
58855885#### Returns
58865886 
from line 6021
60216021 
60226022 The version of the Claude API you want to use.
60236023 
6024 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
6024 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
60256025 
60266026#### Returns
60276027 
from line 6143
61436143 
61446144 The version of the Claude API you want to use.
61456145 
6146 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
6146 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
61476147 
61486148#### Returns
61496149 
from line 6183
61836183 
61846184**POST** `/v1/organizations/service_accounts`
61856185 
6186**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
6186**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
61876187 
61886188Create a service account.
61896189 
from line 6201
62016201 
62026202 The version of the Claude API you want to use.
62036203 
6204 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
6204 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
62056205 
62066206- `"anthropic-beta": optional array of AnthropicBeta`
62076207 
from line 6428
64286428 
64296429**GET** `/v1/organizations/service_accounts`
64306430 
6431**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
6431**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
64326432 
64336433List service accounts in the caller's organization.
64346434 
from line 6460
64606460 
64616461 The version of the Claude API you want to use.
64626462 
6463 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
6463 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
64646464 
64656465- `"anthropic-beta": optional array of AnthropicBeta`
64666466 
from line 6665
66656665 
66666666**GET** `/v1/organizations/service_accounts/{service_account_id}`
66676667 
6668**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
6668**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
66696669 
66706670Retrieve a service account by its ID (`svac_...`).
66716671 
from line 6681
66816681 
66826682 The version of the Claude API you want to use.
66836683 
6684 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
6684 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
66856685 
66866686- `"anthropic-beta": optional array of AnthropicBeta`
66876687 
from line 6882
68826882 
68836883**POST** `/v1/organizations/service_accounts/{service_account_id}`
68846884 
6885**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
6885**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
68866886 
68876887Update a service account.
68886888 
from line 6903
69036903 
69046904 The version of the Claude API you want to use.
69056905 
6906 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
6906 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
69076907 
69086908- `"anthropic-beta": optional array of AnthropicBeta`
69096909 
from line 7122
71227122 
71237123**POST** `/v1/organizations/service_accounts/{service_account_id}/archive`
71247124 
7125**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
7125**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
71267126 
71277127Archive a service account.
71287128 
from line 7143
71437143 
71447144 The version of the Claude API you want to use.
71457145 
7146 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
7146 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
71477147 
71487148- `"anthropic-beta": optional array of AnthropicBeta`
71497149 
from line 7347
73477347 
73487348**POST** `/v1/organizations/service_accounts/{service_account_id}/workspaces`
73497349 
7350**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
7350**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
73517351 
73527352Add a service account to a workspace with the given `workspace_role`.
73537353 
from line 7370
73707370 
73717371 The version of the Claude API you want to use.
73727372 
7373 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
7373 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
73747374 
73757375- `"anthropic-beta": optional array of AnthropicBeta`
73767376 
from line 7564
75647564 
75657565**GET** `/v1/organizations/service_accounts/{service_account_id}/workspaces`
75667566 
7567**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
7567**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
75687568 
75697569List the workspaces a service account is a member of.
75707570 
from line 7606
76067606 
76077607 The version of the Claude API you want to use.
76087608 
7609 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
7609 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
76107610 
76117611- `"anthropic-beta": optional array of AnthropicBeta`
76127612 
from line 7786
77867786 
77877787**DELETE** `/v1/organizations/service_accounts/{service_account_id}/workspaces/{workspace_id}`
77887788 
7789**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
7789**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
77907790 
77917791Remove a service account from a workspace.
77927792 
from line 7814
78147814 
78157815 The version of the Claude API you want to use.
78167816 
7817 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
7817 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
78187818 
78197819- `"anthropic-beta": optional array of AnthropicBeta`
78207820 
from line 7999
79997999 
80008000 The version of the Claude API you want to use.
80018001 
8002 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8002 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
80038003 
80048004#### Returns
80058005 
from line 8111
81118111 
81128112 The version of the Claude API you want to use.
81138113 
8114 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8114 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
81158115 
81168116#### Returns
81178117 
from line 8204
82048204 
82058205 The version of the Claude API you want to use.
82068206 
8207 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8207 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
82088208 
82098209#### Body parameters
82108210 
from line 8319
83198319 
83208320 The version of the Claude API you want to use.
83218321 
8322 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8322 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
83238323 
83248324#### Returns
83258325 
from line 8397
83978397 
83988398 The version of the Claude API you want to use.
83998399 
8400 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8400 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
84018401 
84028402#### Returns
84038403 
from line 8558
85588558 
85598559 The version of the Claude API you want to use.
85608560 
8561 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8561 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
85628562 
85638563- `"anthropic-beta": optional array of AnthropicBeta`
85648564 
from line 8882
88828882 
88838883 The version of the Claude API you want to use.
88848884 
8885 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
8885 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
88868886 
88878887#### Returns
88888888 
from line 9028
90289028 
90299029 The version of the Claude API you want to use.
90309030 
9031 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9031 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
90329032 
90339033#### Body parameters
90349034 
from line 9239
92399239 
92409240 The version of the Claude API you want to use.
92419241 
9242 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9242 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
92439243 
92449244#### Returns
92459245 
from line 9436
94369436 
94379437 The version of the Claude API you want to use.
94389438 
9439 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9439 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
94409440 
94419441#### Returns
94429442 
from line 9680
96809680 
96819681 The version of the Claude API you want to use.
96829682 
9683 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9683 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
96849684 
96859685#### Returns
96869686 
from line 9772
97729772 
97739773 The version of the Claude API you want to use.
97749774 
9775 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9775 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
97769776 
97779777#### Body parameters
97789778 
from line 9872
98729872 
98739873 The version of the Claude API you want to use.
98749874 
9875 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9875 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
98769876 
98779877#### Returns
98789878 
from line 9949
99499949 
99509950 The version of the Claude API you want to use.
99519951 
9952 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
9952 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
99539953 
99549954#### Body parameters
99559955 
from line 10046
1004610046 
1004710047 The version of the Claude API you want to use.
1004810048 
10049 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
10049 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
1005010050 
1005110051#### Returns
1005210052 
from line 10091
1009110091 
1009210092**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
1009310093 
10094**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
10094**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
1009510095 
1009610096List the service accounts that are members of a workspace.
1009710097 
from line 10126
1012610126 
1012710127 The version of the Claude API you want to use.
1012810128 
10129 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
10129 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
1013010130 
1013110131- `"anthropic-beta": optional array of AnthropicBeta`
1013210132 
from line 10306
1030610306 
1030710307**POST** `/v1/organizations/workspaces/{workspace_id}/service_accounts`
1030810308 
10309**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
10309**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](https://platform.claude.com/docs/en/manage-claude/wif-admin-api?sdk_languages=http).
1031010310 
1031110311Add a service account to a workspace with the given `workspace_role`.
1031210312 
from line 10331
1033110331 
1033210332 The version of the Claude API you want to use.
1033310333 
10334 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
10334 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning?sdk_languages=http).
1033510335 
1033610336- `"anthropic-beta": optional array of AnthropicBeta`
1033710337 
from line 10499
1049910499 
1050010500```bash
1050110501curl https://api.anthropic.com/v1/organizations/workspaces/$WORKSPACE_ID/service_accounts \
10502 -H 'Content-Type: application/json' \
10503 -H 'anthropic-version: 2023-06-01' \
10504 -H "X-Api-Key: $ANTHROPIC_API_KEY" \
10505 -d '{
10506 "service_account_id": "service_account_id",
10507 "workspace_role": "workspace_admin"
10508 }'
10509```
10510 
10511##### Response (200)
10512 
10513```json
10514{
10515 "created_by_actor_id": "created_by_actor_id",
10516 "implicit": true,
10517 "service_account_id": "service_account_id",
10518 "type": "service_account_workspace_member",
10519 "workspace_id": "workspace_id",
10520 "workspace_role": "workspace_admin"
10521}
10522```
10523 
10524### Get Service Account Workspace Member
10525 
10526**GET** `/v1/organizations/workspaces/{workspace_id}/service_accounts/{service_account_id}`
10527 
10528**Requires an OAuth access token with the `org:admin` scope**, from `ant auth login --scope org:admin` or a workload identity federation rule; Admin API keys are not accepted. See [Manage WIF with the Admin API](/docs/en/manage-claude/wif-admin-api).
10529 
10530Retrieve a service account's membership in a workspace.
10531 
10532Returns the membership record, including the service account's
10533`workspace_role` in this workspace. Archived workspaces return 400. For
10534the default workspace, returns the implicit (`implicit: true`)
10535membership when no explicit membership exists; an explicitly added
10536membership is returned with its assigned role. An archived service
10537account returns 404.
10538 
10539#### Path parameters
10540 
10541- `workspace_id: string`
10542 
10543 ID of the workspace.
10544 
10545- `service_account_id: string`
10546 
10547 ID of the service account.
10548 
10549#### Headers
10550 
10551- `"anthropic-version": optional string`
10552 
10553 The version of the Claude API you want to use.
10554 
10555 Read more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).
10556 
10557- `"anthropic-beta": optional array of AnthropicBeta`
10558 
10559 Optional header to specify the beta version(s) you want to use.
10560 
10561 - `string`
10562 
10563 - `"message-batches-2024-09-24"`
10564 
10565 - `"prompt-caching-2024-07-31"`
10566 
10567 - `"computer-use-2024-10-22"`
10568 
10569 - `"computer-use-2025-01-24"`
10570 
10571 - `"pdfs-2024-09-25"`
10572 
10573 - `"token-counting-2024-11-01"`
10574 
10575 - `"token-efficient-tools-2025-02-19"`
10576 
10577 - `"output-128k-202
10502 -H 'Content-Type: a
Feedback