diff --git a/bindings/typescript/src/generated/anthropic/CacheControlEphemeral.ts b/bindings/typescript/src/generated/anthropic/CacheControlEphemeral.ts index 0fd1bab4..aac93d56 100644 --- a/bindings/typescript/src/generated/anthropic/CacheControlEphemeral.ts +++ b/bindings/typescript/src/generated/anthropic/CacheControlEphemeral.ts @@ -11,6 +11,7 @@ export type CacheControlEphemeral = { * - `1h`: 1 hour * * Defaults to `5m`. See [prompt caching - * pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) for details. + * pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for + * details. */ ttl: Ttl | null, type: CacheControlEphemeralType, }; diff --git a/bindings/typescript/src/generated/anthropic/Ttl.ts b/bindings/typescript/src/generated/anthropic/Ttl.ts index 38757b2f..d168f882 100644 --- a/bindings/typescript/src/generated/anthropic/Ttl.ts +++ b/bindings/typescript/src/generated/anthropic/Ttl.ts @@ -8,6 +8,7 @@ * - `1h`: 1 hour * * Defaults to `5m`. See [prompt caching - * pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) for details. + * pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for + * details. */ export type Ttl = "1h" | "5m"; diff --git a/crates/generate-types/src/main.rs b/crates/generate-types/src/main.rs index cc28089d..33b3534f 100644 --- a/crates/generate-types/src/main.rs +++ b/crates/generate-types/src/main.rs @@ -998,8 +998,8 @@ pub struct ToolSearchTool { ); with_struct.replace( - " #[serde(rename = \"web_search_20260209\")]\n WebSearch20260209(WebSearchTool20260209),\n\n #[serde(untagged)]", - " #[serde(rename = \"web_search_20260209\")]\n WebSearch20260209(WebSearchTool20260209),\n\n #[serde(rename = \"tool_search_tool_bm25\")]\n ToolSearchToolBm25(ToolSearchTool),\n\n #[serde(rename = \"tool_search_tool_bm25_20251119\")]\n ToolSearchToolBm2520251119(ToolSearchTool),\n\n #[serde(rename = \"tool_search_tool_regex\")]\n ToolSearchToolRegex(ToolSearchTool),\n\n #[serde(rename = \"tool_search_tool_regex_20251119\")]\n ToolSearchToolRegex20251119(ToolSearchTool),\n\n #[serde(untagged)]", + " #[serde(untagged)]\n Custom(CustomTool),", + " #[serde(rename = \"tool_search_tool_bm25\")]\n ToolSearchToolBm25(ToolSearchTool),\n\n #[serde(rename = \"tool_search_tool_bm25_20251119\")]\n ToolSearchToolBm2520251119(ToolSearchTool),\n\n #[serde(rename = \"tool_search_tool_regex\")]\n ToolSearchToolRegex(ToolSearchTool),\n\n #[serde(rename = \"tool_search_tool_regex_20251119\")]\n ToolSearchToolRegex20251119(ToolSearchTool),\n\n #[serde(untagged)]\n Custom(CustomTool),", ) } diff --git a/crates/lingua/src/providers/anthropic/convert.rs b/crates/lingua/src/providers/anthropic/convert.rs index db51c8f3..c9c836a0 100644 --- a/crates/lingua/src/providers/anthropic/convert.rs +++ b/crates/lingua/src/providers/anthropic/convert.rs @@ -3541,4 +3541,90 @@ mod tests { assert!(matches!(err, ConvertError::InvalidToolSchema { .. })); assert!(err.to_string().contains("root type is required")); } + + #[test] + fn test_web_search_20260318_roundtrips_through_universal() { + let tool_json = json!({ + "type": "web_search_20260318", + "name": "web_search", + "allowed_domains": ["example.com"], + "max_uses": 5 + }); + + let tool: Tool = serde_json::from_value(tool_json.clone()).expect("should parse"); + let universal = UniversalTool::from(&tool); + assert!(universal.is_builtin()); + + let round_tripped = Tool::try_from(&universal).expect("should convert back"); + let round_tripped_json = serde_json::to_value(&round_tripped).expect("should serialize"); + assert_eq!( + round_tripped_json.get("type").and_then(|v| v.as_str()), + Some("web_search_20260318") + ); + assert_eq!( + round_tripped_json.get("name").and_then(|v| v.as_str()), + Some("web_search") + ); + assert_eq!( + round_tripped_json + .get("allowed_domains") + .and_then(|v| v.as_array()) + .map(|a| a.len()), + Some(1) + ); + } + + #[test] + fn test_web_fetch_20260318_roundtrips_through_universal() { + let tool_json = json!({ + "type": "web_fetch_20260318", + "name": "web_fetch", + "blocked_domains": ["evil.com"], + "max_content_tokens": 4096, + "use_cache": false + }); + + let tool: Tool = serde_json::from_value(tool_json.clone()).expect("should parse"); + let universal = UniversalTool::from(&tool); + assert!(universal.is_builtin()); + + let round_tripped = Tool::try_from(&universal).expect("should convert back"); + let round_tripped_json = serde_json::to_value(&round_tripped).expect("should serialize"); + assert_eq!( + round_tripped_json.get("type").and_then(|v| v.as_str()), + Some("web_fetch_20260318") + ); + assert_eq!( + round_tripped_json.get("name").and_then(|v| v.as_str()), + Some("web_fetch") + ); + assert_eq!( + round_tripped_json + .get("max_content_tokens") + .and_then(|v| v.as_i64()), + Some(4096) + ); + } + + #[test] + fn test_tool_search_variants_still_deserialize() { + for tool_type in [ + "tool_search_tool_bm25", + "tool_search_tool_bm25_20251119", + "tool_search_tool_regex", + "tool_search_tool_regex_20251119", + ] { + let tool_json = json!({ + "type": tool_type, + "name": "tool_search" + }); + let tool: Tool = serde_json::from_value(tool_json) + .unwrap_or_else(|e| panic!("{tool_type} should deserialize as Tool variant: {e}")); + let universal = UniversalTool::from(&tool); + assert!( + universal.is_builtin(), + "{tool_type} should map to builtin universal tool" + ); + } + } } diff --git a/crates/lingua/src/providers/anthropic/generated.rs b/crates/lingua/src/providers/anthropic/generated.rs index 266c618f..e05b5635 100644 --- a/crates/lingua/src/providers/anthropic/generated.rs +++ b/crates/lingua/src/providers/anthropic/generated.rs @@ -50,11 +50,11 @@ pub struct CreateMessageParams { /// specifies the absolute maximum number of tokens to generate. /// /// Set to `0` to populate the [prompt - /// cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) + /// cache](https://platform.claude.com/docs/en/build-with-claude/prompt-caching#pre-warming-the-cache) /// without generating a response. /// /// Different models have different maximum values for this parameter. See - /// [models](https://docs.claude.com/en/docs/models-overview) for details. + /// [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details. pub max_tokens: i64, /// Input messages. /// @@ -110,11 +110,13 @@ pub struct CreateMessageParams { /// {"role": "user", "content": [{"type": "text", "text": "Hello, Claude"}]} /// ``` /// - /// See [input examples](https://docs.claude.com/en/api/messages-examples). + /// See [input + /// examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages). /// /// Note that if you want to include a [system - /// prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level - /// `system` parameter — there is no `"system"` role for input messages in the Messages API. + /// 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. /// /// There is a limit of 100,000 messages in a single request. pub messages: Vec, @@ -129,7 +131,7 @@ pub struct CreateMessageParams { /// request. /// /// Anthropic offers different levels of service for your API requests. See - /// [service-tiers](https://docs.claude.com/en/api/service-tiers) for details. + /// [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details. #[serde(skip_serializing_if = "Option::is_none")] pub service_tier: Option, /// Custom text sequences that will cause the model to stop generating. @@ -145,14 +147,15 @@ pub struct CreateMessageParams { pub stop_sequences: Option>, /// Whether to incrementally stream the response using server-sent events. /// - /// See [streaming](https://docs.claude.com/en/api/messages-streaming) for details. + /// See [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for + /// details. #[serde(skip_serializing_if = "Option::is_none")] pub stream: Option, /// System prompt. /// /// 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://docs.claude.com/en/docs/system-prompts). + /// prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role). #[serde(skip_serializing_if = "Option::is_none")] pub system: Option, /// Amount of randomness injected into the response. @@ -176,9 +179,9 @@ pub struct CreateMessageParams { /// /// There are two types of tools: **client tools** and **server tools**. The behavior /// described below applies to client tools. For [server - /// tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools), - /// see their individual documentation as each has its own behavior (e.g., the [web search - /// tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)). + /// 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)). /// /// Each tool definition includes: /// @@ -239,7 +242,8 @@ pub struct CreateMessageParams { /// more generally whenever you want the model to produce a particular JSON structure of /// output. /// - /// See our [guide](https://docs.claude.com/en/docs/tool-use) for more details. + /// See our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) + /// for more details. #[serde(skip_serializing_if = "Option::is_none")] pub tools: Option>, /// Only sample from the top K options for each subsequent token. @@ -271,7 +275,8 @@ pub struct CacheControlEphemeral { /// - `1h`: 1 hour /// /// Defaults to `5m`. See [prompt caching - /// pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) for details. + /// pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for + /// details. #[serde(skip_serializing_if = "Option::is_none")] pub ttl: Option, #[serde(rename = "type")] @@ -292,7 +297,8 @@ pub enum CacheControlEphemeralType { /// - `1h`: 1 hour /// /// Defaults to `5m`. See [prompt caching -/// pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) for details. +/// pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for +/// details. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[ts(export_to = "anthropic/")] pub enum Ttl { @@ -1024,7 +1030,7 @@ pub enum JsonOutputFormatType { /// request. /// /// Anthropic offers different levels of service for your API requests. See -/// [service-tiers](https://docs.claude.com/en/api/service-tiers) for details. +/// [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[serde(rename_all = "snake_case")] #[ts(export_to = "anthropic/")] @@ -1038,7 +1044,7 @@ pub enum ServiceTierEnum { /// /// 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://docs.claude.com/en/docs/system-prompts). +/// prompts](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/claude-prompting-best-practices#give-claude-a-role). #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[serde(untagged)] #[ts(export_to = "anthropic/")] @@ -1054,7 +1060,7 @@ pub enum System { /// towards your `max_tokens` limit. /// /// See [extended -/// thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for +/// thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for /// details. #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[ts(export_to = "anthropic/")] @@ -1066,7 +1072,7 @@ pub struct Thinking { /// Must be ≥1024 and less than `max_tokens`. /// /// See [extended - /// thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for + /// thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for /// details. #[serde(skip_serializing_if = "Option::is_none")] pub budget_tokens: Option, @@ -1501,6 +1507,49 @@ pub struct WebFetchTool20260309 { pub use_cache: Option, } +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] +#[ts(export_to = "anthropic/")] +pub struct WebFetchTool20260318 { + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_callers: Option>, + /// List of domains to allow fetching from + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_domains: Option>, + /// List of domains to block fetching from + #[serde(skip_serializing_if = "Option::is_none")] + pub blocked_domains: Option>, + /// Create a cache control breakpoint at this content block. + #[serde(skip_serializing_if = "Option::is_none")] + #[ts(type = "unknown")] + pub cache_control: Option, + /// Citations configuration for fetched documents. Citations are disabled by default. + #[serde(skip_serializing_if = "Option::is_none")] + #[ts(type = "unknown")] + pub citations: Option, + /// If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + #[serde(skip_serializing_if = "Option::is_none")] + pub defer_loading: Option, + /// Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs. + #[serde(skip_serializing_if = "Option::is_none")] + pub max_content_tokens: Option, + /// Maximum number of times the tool can be used in the API request. + #[serde(skip_serializing_if = "Option::is_none")] + pub max_uses: Option, + /// Name of the tool. + /// + /// This is how the tool will be called by the model and in `tool_use` blocks. + pub name: String, + /// How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + #[serde(skip_serializing_if = "Option::is_none")] + pub response_inclusion: Option, + /// When true, guarantees schema validation on tool names and inputs + #[serde(skip_serializing_if = "Option::is_none")] + pub strict: Option, + /// Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources. + #[serde(skip_serializing_if = "Option::is_none")] + pub use_cache: Option, +} + #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[ts(export_to = "anthropic/")] pub struct WebSearchTool20250305 { @@ -1569,6 +1618,43 @@ pub struct WebSearchTool20260209 { pub user_location: Option, } +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] +#[ts(export_to = "anthropic/")] +pub struct WebSearchTool20260318 { + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_callers: Option>, + /// If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`. + #[serde(skip_serializing_if = "Option::is_none")] + pub allowed_domains: Option>, + /// If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`. + #[serde(skip_serializing_if = "Option::is_none")] + pub blocked_domains: Option>, + /// Create a cache control breakpoint at this content block. + #[serde(skip_serializing_if = "Option::is_none")] + #[ts(type = "unknown")] + pub cache_control: Option, + /// If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search. + #[serde(skip_serializing_if = "Option::is_none")] + pub defer_loading: Option, + /// Maximum number of times the tool can be used in the API request. + #[serde(skip_serializing_if = "Option::is_none")] + pub max_uses: Option, + /// Name of the tool. + /// + /// This is how the tool will be called by the model and in `tool_use` blocks. + pub name: String, + /// How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn. + #[serde(skip_serializing_if = "Option::is_none")] + pub response_inclusion: Option, + /// When true, guarantees schema validation on tool names and inputs + #[serde(skip_serializing_if = "Option::is_none")] + pub strict: Option, + /// Parameters for the user's location. Used to provide more relevant search results. + #[serde(skip_serializing_if = "Option::is_none")] + #[ts(type = "unknown")] + pub user_location: Option, +} + #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[ts(export_to = "anthropic/")] pub struct ToolSearchTool { @@ -1618,12 +1704,18 @@ pub enum Tool { #[serde(rename = "web_fetch_20260309")] WebFetch20260309(WebFetchTool20260309), + #[serde(rename = "web_fetch_20260318")] + WebFetch20260318(WebFetchTool20260318), + #[serde(rename = "web_search_20250305")] WebSearch20250305(WebSearchTool20250305), #[serde(rename = "web_search_20260209")] WebSearch20260209(WebSearchTool20260209), + #[serde(rename = "web_search_20260318")] + WebSearch20260318(WebSearchTool20260318), + #[serde(rename = "tool_search_tool_bm25")] ToolSearchToolBm25(ToolSearchTool), @@ -1686,6 +1778,19 @@ pub enum InputSchemaType { Object, } +/// How this tool's result blocks appear in the API response when the result was consumed by +/// a completed code_execution call in the same turn. 'full' returns the complete content +/// (default). 'excluded' drops the nested server_tool_use and result block pair entirely. +/// Results from direct calls, or from code_execution calls that paused before completing, +/// are always returned in full so they can be sent back on the next turn. +#[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] +#[serde(rename_all = "snake_case")] +#[ts(export_to = "anthropic/")] +pub enum ResponseInclusion { + Excluded, + Full, +} + #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] #[serde(rename_all = "snake_case")] #[ts(export_to = "anthropic/")] @@ -1723,10 +1828,14 @@ pub enum ToolType { WebFetch20260209, #[serde(rename = "web_fetch_20260309")] WebFetch20260309, + #[serde(rename = "web_fetch_20260318")] + WebFetch20260318, #[serde(rename = "web_search_20250305")] WebSearch20250305, #[serde(rename = "web_search_20260209")] WebSearch20260209, + #[serde(rename = "web_search_20260318")] + WebSearch20260318, } #[derive(Debug, Clone, PartialEq, Serialize, Deserialize, TS)] diff --git a/provider-type-update-notes.md b/provider-type-update-notes.md new file mode 100644 index 00000000..d0a91cc2 --- /dev/null +++ b/provider-type-update-notes.md @@ -0,0 +1,37 @@ +# Anthropic provider type update notes + +## Changes applied + +### Generator fix: tool search variant injection pattern + +The `add_anthropic_tool_search_tool_variants` function in `crates/generate-types/src/main.rs` +used a fragile string anchor (`WebSearch20260209` immediately before `#[serde(untagged)]`) to +inject tool search tool variants into the `Tool` enum. The new `WebSearch20260318` variant +broke this pattern, silently dropping all four `ToolSearchTool*` variants from the `Tool` enum. + +Fixed by anchoring on `#[serde(untagged)]\n Custom(CustomTool),` instead, which is stable +across future tool variant additions. + +### Tests added + +- `test_web_search_20260318_roundtrips_through_universal` - verifies new `WebSearchTool20260318` serializes to a builtin universal tool and round-trips back with fields preserved. +- `test_web_fetch_20260318_roundtrips_through_universal` - same for `WebFetchTool20260318` including `max_content_tokens`. +- `test_tool_search_variants_still_deserialize` - confirms all four tool search type strings (`tool_search_tool_bm25`, `tool_search_tool_bm25_20251119`, `tool_search_tool_regex`, `tool_search_tool_regex_20251119`) still deserialize into `Tool` variants. + +## No hand-written converter changes needed + +The new `Tool` variants (`WebFetch20260318`, `WebSearch20260318`) are handled by the existing +catch-all arm in `From<&Tool> for UniversalTool` (convert.rs) which serializes any non-Custom +variant to JSON and extracts the `type` field to create a builtin universal tool. The reverse +path (`TryFrom<&UniversalTool> for Tool`) deserializes Anthropic builtins from their stored +config via `serde_json::from_value::()`. Both paths work without changes. + +## Observations for human review + +### `ResponseInclusion` enum is generated but unused by tool structs + +The new `ResponseInclusion` enum (`Excluded`, `Full`) was generated, but the `response_inclusion` +field on `WebFetchTool20260318` and `WebSearchTool20260318` is typed as `Option` rather +than `Option`. This is a generation quality issue — the enum exists but isn't +wired into the structs. Not blocking (string deserialization works), but the generator could be +improved to use the typed enum instead. diff --git a/specs/anthropic/.stats.yml b/specs/anthropic/.stats.yml index e7f771c7..c45ebbf3 100644 --- a/specs/anthropic/.stats.yml +++ b/specs/anthropic/.stats.yml @@ -1,4 +1,4 @@ configured_endpoints: 116 -openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-a548d120cebb4d68d46c828028d51d04b4d4abb868a7bad21dad960cb72cbd18.yml -openapi_spec_hash: 2b3214760a4e23a9704779ac99bce417 -config_hash: ce2cd5d2f03228adacf04ebcceb14465 +openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/anthropic/anthropic-dffbd6e37f0be6d218800cdb283e5ad958c715021986d788e10c89c0a80a9f44.yml +openapi_spec_hash: 753042938edfcbf43eb60c63c3369a30 +config_hash: 2fc184efddefac872a2f58876711b4f5 diff --git a/specs/anthropic/openapi.yml b/specs/anthropic/openapi.yml index 63627f9d..49690b4c 100644 --- a/specs/anthropic/openapi.yml +++ b/specs/anthropic/openapi.yml @@ -5,7 +5,7 @@ "/v1/messages": { "post": { "summary": "Create a Message", - "description": "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations.\n\nLearn more about the Messages API in our [user guide](https://docs.claude.com/en/docs/initial-setup)", + "description": "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations.\n\nLearn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)", "operationId": "messages_post", "parameters": [ { @@ -14,10 +14,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-user-profile-id", @@ -38,7 +38,7 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Message" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, @@ -53,7 +53,7 @@ "/v1/complete": { "post": { "summary": "Create a Text Completion", - "description": "[Legacy] Create a Text Completion.\n\nThe Text Completions API is a legacy API. We recommend using the [Messages API](https://docs.claude.com/en/api/messages) going forward.\n\nFuture models and features will not be compatible with Text Completions. See our [migration guide](https://docs.claude.com/en/api/migrating-from-text-completions-to-messages) for guidance in migrating from Text Completions to Messages.", + "description": "[Legacy] Create a Text Completion.\n\nThe Text Completions API is a legacy API. We recommend using the [Messages API](https://platform.claude.com/docs/en/api/messages) going forward.\n\nFuture models and features will not be compatible with Text Completions. See our [migration guide](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) for guidance in migrating from Text Completions to Messages.", "operationId": "complete_post", "parameters": [ { @@ -62,10 +62,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-beta", @@ -95,7 +95,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, @@ -155,10 +155,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-beta", @@ -199,7 +199,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } @@ -224,10 +224,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-beta", @@ -266,7 +266,7 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelInfo" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } @@ -275,7 +275,7 @@ "/v1/messages/batches": { "post": { "summary": "Create a Message Batch", - "description": "Send a batch of Message creation requests.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Send a batch of Message creation requests.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "message_batches_post", "parameters": [ { @@ -284,10 +284,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-user-profile-id", @@ -308,7 +308,7 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageBatch" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, @@ -321,7 +321,7 @@ }, "get": { "summary": "List Message Batches", - "description": "List all Message Batches within a Workspace. Most recently created batches are returned first.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "List all Message Batches within a Workspace. Most recently created batches are returned first.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "message_batches_list", "parameters": [ { @@ -366,10 +366,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -391,7 +391,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } @@ -400,7 +400,7 @@ "/v1/messages/batches/{message_batch_id}": { "get": { "summary": "Retrieve a Message Batch", - "description": "This 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "This 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "message_batches_retrieve", "parameters": [ { @@ -420,10 +420,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -443,14 +443,14 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageBatch" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } }, "delete": { "summary": "Delete a Message Batch", - "description": "Delete a Message Batch.\n\nMessage 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Delete a Message Batch.\n\nMessage 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "message_batches_delete", "parameters": [ { @@ -470,10 +470,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -495,7 +495,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } @@ -504,7 +504,7 @@ "/v1/messages/batches/{message_batch_id}/cancel": { "post": { "summary": "Cancel a Message Batch", - "description": "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "message_batches_cancel", "parameters": [ { @@ -524,10 +524,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "responses": { @@ -536,7 +536,7 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageBatch" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } @@ -545,7 +545,7 @@ "/v1/messages/batches/{message_batch_id}/results": { "get": { "summary": "Retrieve Message Batch results", - "description": "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "message_batches_results", "parameters": [ { @@ -565,10 +565,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -592,7 +592,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } } @@ -601,7 +601,7 @@ "/v1/messages/count_tokens": { "post": { "summary": "Count tokens in a Message", - "description": "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.\n\nLearn more about token counting in our [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)", + "description": "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.\n\nLearn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting)", "operationId": "messages_count_tokens_post", "parameters": [ { @@ -610,10 +610,22 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." + }, + { + "name": "anthropic-user-profile-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.", + "title": "Anthropic-User-Profile-Id", + "x-stainless-param": "user_profile_id" + }, + "description": "The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header." } ], "responses": { @@ -624,7 +636,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ErrorResponse" } } } } }, @@ -639,7 +651,7 @@ "/v1/messages?beta=true": { "post": { "summary": "Create a Message", - "description": "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations.\n\nLearn more about the Messages API in our [user guide](https://docs.claude.com/en/docs/initial-setup)", + "description": "Send a structured list of input messages with text and/or image content, and the model will generate the next message in the conversation.\n\nThe Messages API can be used for either single queries or stateless multi-turn conversations.\n\nLearn more about the Messages API in our [user guide](https://platform.claude.com/docs/en/get-started)", "operationId": "beta_messages_post", "parameters": [ { @@ -667,10 +679,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-user-profile-id", @@ -691,7 +703,7 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaMessage" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -753,10 +765,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-beta", @@ -797,7 +809,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -824,10 +836,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-beta", @@ -866,7 +878,7 @@ "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaModelInfo" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -877,7 +889,7 @@ "/v1/messages/batches?beta=true": { "post": { "summary": "Create a Message Batch", - "description": "Send a batch of Message creation requests.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Send a batch of Message creation requests.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "beta_message_batches_post", "parameters": [ { @@ -905,10 +917,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "anthropic-user-profile-id", @@ -931,7 +943,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -946,7 +958,7 @@ }, "get": { "summary": "List Message Batches", - "description": "List all Message Batches within a Workspace. Most recently created batches are returned first.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "List all Message Batches within a Workspace. Most recently created batches are returned first.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "beta_message_batches_list", "parameters": [ { @@ -1010,10 +1022,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1037,7 +1049,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1048,7 +1060,7 @@ "/v1/messages/batches/{message_batch_id}?beta=true": { "get": { "summary": "Retrieve a Message Batch", - "description": "This 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "This 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "beta_message_batches_retrieve", "parameters": [ { @@ -1087,10 +1099,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1112,7 +1124,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1121,7 +1133,7 @@ }, "delete": { "summary": "Delete a Message Batch", - "description": "Delete a Message Batch.\n\nMessage 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Delete a Message Batch.\n\nMessage 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "beta_message_batches_delete", "parameters": [ { @@ -1160,10 +1172,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1187,7 +1199,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1198,7 +1210,7 @@ "/v1/messages/batches/{message_batch_id}/cancel?beta=true": { "post": { "summary": "Cancel a Message Batch", - "description": "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Batches may be canceled any time before processing ends. Once cancellation is initiated, the batch enters a `canceling` state, at which time the system may complete any in-progress, non-interruptible requests before finalizing cancellation.\n\nThe 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "beta_message_batches_cancel", "parameters": [ { @@ -1237,10 +1249,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "responses": { @@ -1251,7 +1263,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1262,7 +1274,7 @@ "/v1/messages/batches/{message_batch_id}/results?beta=true": { "get": { "summary": "Retrieve Message Batch results", - "description": "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach 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.\n\nLearn more about the Message Batches API in our [user guide](https://docs.claude.com/en/docs/build-with-claude/batch-processing)", + "description": "Streams the results of a Message Batch as a `.jsonl` file.\n\nEach 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.\n\nLearn more about the Message Batches API in our [user guide](https://platform.claude.com/docs/en/build-with-claude/batch-processing)", "operationId": "beta_message_batches_results", "parameters": [ { @@ -1301,10 +1313,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1328,7 +1340,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1339,7 +1351,7 @@ "/v1/messages/count_tokens?beta=true": { "post": { "summary": "Count tokens in a Message", - "description": "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.\n\nLearn more about token counting in our [user guide](https://docs.claude.com/en/docs/build-with-claude/token-counting)", + "description": "Count the number of tokens in a Message.\n\nThe Token Count API can be used to count the number of tokens in a Message, including tools, images, and documents, without creating it.\n\nLearn more about token counting in our [user guide](https://platform.claude.com/docs/en/build-with-claude/token-counting)", "operationId": "beta_messages_count_tokens_post", "parameters": [ { @@ -1367,10 +1379,22 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." + }, + { + "name": "anthropic-user-profile-id", + "in": "header", + "required": false, + "schema": { + "type": "string", + "description": "The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header.", + "title": "Anthropic-User-Profile-Id", + "x-stainless-param": "user_profile_id" + }, + "description": "The user profile ID to attribute this request to. Use when acting on behalf of a party other than your organization. Requires the `user-profiles` beta header." } ], "responses": { @@ -1383,7 +1407,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1427,10 +1451,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "responses": { @@ -1441,7 +1465,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1538,10 +1562,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1563,7 +1587,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1608,10 +1632,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1633,7 +1657,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1676,10 +1700,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1701,7 +1725,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1746,10 +1770,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1769,7 +1793,7 @@ "content": { "application/octet-stream": { "schema": { "type": "string" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/octet-stream": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1807,10 +1831,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "requestBody": { @@ -1828,7 +1852,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1899,10 +1923,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1924,7 +1948,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -1973,10 +1997,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -1998,7 +2022,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2045,10 +2069,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2070,7 +2094,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2119,10 +2143,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "requestBody": { @@ -2144,7 +2168,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2214,10 +2238,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2241,7 +2265,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2301,10 +2325,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2326,7 +2350,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2384,10 +2408,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2411,7 +2435,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2472,10 +2496,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2495,7 +2519,7 @@ "content": { "application/zip": { "schema": { "type": "string" } } } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/zip": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2534,10 +2558,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "requestBody": { @@ -2556,7 +2580,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2631,10 +2655,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2651,7 +2675,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2697,10 +2721,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2717,7 +2741,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2761,10 +2785,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "requestBody": { @@ -2783,7 +2807,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2827,10 +2851,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2849,7 +2873,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2895,10 +2919,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "responses": { @@ -2909,7 +2933,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -2955,10 +2979,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -2983,7 +3007,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3051,10 +3075,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "Anthropic-Worker-ID", @@ -3087,7 +3111,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3139,10 +3163,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "authorization", @@ -3159,7 +3183,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3243,10 +3267,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "authorization", @@ -3265,7 +3289,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3317,10 +3341,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "authorization", @@ -3343,7 +3367,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3395,10 +3419,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "x-api-key", @@ -3415,7 +3439,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3465,10 +3489,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." } ], "requestBody": { @@ -3487,7 +3511,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3559,10 +3583,10 @@ "required": false, "schema": { "type": "string", - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning).", + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning).", "title": "Anthropic-Version" }, - "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://docs.claude.com/en/api/versioning)." + "description": "The version of the Claude API you want to use.\n\nRead more about versioning and our version history [here](https://platform.claude.com/docs/en/api/versioning)." }, { "name": "authorization", @@ -3581,7 +3605,7 @@ } }, "4XX": { - "description": "Error response.\n\nSee our [errors documentation](https://docs.claude.com/en/api/errors) for more details.", + "description": "Error response.\n\nSee our [errors documentation](https://platform.claude.com/docs/en/api/errors) for more details.", "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } @@ -3589,15 +3613,48 @@ } } }, - "/v1/sessions?beta=true": { + "/v1/memory_stores/{memory_store_id}/memories?beta=true": { "post": { - "operationId": "BetaCreateSession", - "summary": "Create Session", + "operationId": "BetaCreateMemory", + "summary": "Create a memory", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter memory_store_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, + "description": "Query parameter for view" + } + ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateSessionParams" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryParams" } } } }, @@ -3605,123 +3662,134 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemory" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - } - }, - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } } } } - ] + } }, "get": { - "operationId": "BetaListSessions", - "summary": "List Sessions", + "operationId": "BetaListMemories", + "summary": "List memories", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -3742,100 +3810,60 @@ } }, { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum number of results to return." - }, - { - "name": "page", - "in": "query", - "required": false, + "name": "memory_store_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Opaque pagination cursor from a previous response." - }, - { - "name": "include_archived", - "in": "query", - "required": false, - "schema": { "type": "boolean" }, - "description": "When true, includes archived sessions. Default: false (exclude archived)." - }, - { - "name": "created_at[gte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return sessions created at or after this time (inclusive)." - }, - { - "name": "created_at[gt]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return sessions created after this time (exclusive)." + "description": "Path parameter memory_store_id" }, { - "name": "created_at[lte]", + "name": "path_prefix", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return sessions created at or before this time (inclusive)." + "schema": { "type": "string" }, + "description": "Optional path prefix filter (raw string-prefix match; include a trailing slash for directory-scoped lists). This value appears in request URLs. Do not include secrets or personally identifiable information." }, { - "name": "created_at[lt]", + "name": "depth", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return sessions created before this time (exclusive)." + "schema": { "type": "integer", "format": "int32" }, + "description": "Query parameter for depth" }, { - "name": "agent_id", + "name": "order_by", "in": "query", "required": false, "schema": { "type": "string" }, - "description": "Filter sessions created with this agent ID." - }, - { - "name": "agent_version", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Filter by agent version. Only applies when agent_id is also set." + "description": "Query parameter for order_by" }, { "name": "order", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListOrder" }, - "description": "Sort direction for results, ordered by created_at. Defaults to desc (newest first)." + "description": "Query parameter for order" }, { - "name": "memory_store_id", + "name": "limit", "in": "query", "required": false, - "schema": { "type": "string" }, - "description": "Filter sessions whose resources contain a memory_store with this memory store ID." + "schema": { "type": "integer", "format": "int32" }, + "description": "Query parameter for limit" }, { - "name": "deployment_id", + "name": "page", "in": "query", "required": false, "schema": { "type": "string" }, - "description": "Filter sessions created by this deployment ID." + "description": "Query parameter for page" }, { - "name": "statuses[]", + "name": "view", "in": "query", "required": false, - "style": "form", - "explode": true, - "schema": { - "type": "array", - "items": { "$ref": "#/components/schemas/BetaManagedAgentsSessionStatus" } - }, - "description": "Filter by session status. Repeat the parameter to match any of multiple statuses." + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, + "description": "Query parameter for view" } ], "responses": { @@ -3843,107 +3871,137 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessions" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListMemoriesResult" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } } }, - "/v1/sessions/{session_id}?beta=true": { + "/v1/memory_stores/{memory_store_id}/memories/{memory_id}?beta=true": { "get": { - "operationId": "BetaGetSession", - "summary": "Get Session", + "operationId": "BetaGetMemory", + "summary": "Retrieve a memory", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -3964,116 +4022,159 @@ } }, { - "name": "session_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter memory_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, + "description": "Query parameter for view" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemory" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } }, "post": { - "operationId": "BetaUpdateSession", - "summary": "Update Session", + "operationId": "BetaUpdateMemory", + "summary": "Update a memory", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -4093,19 +4194,32 @@ } }, { - "name": "session_id", + "name": "memory_store_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", "in": "path", "required": true, "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter memory_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, + "description": "Query parameter for view" } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionParams" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryParams" } } } }, @@ -4113,104 +4227,134 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemory" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } }, "delete": { - "operationId": "BetaDeleteSession", - "summary": "Delete Session", + "operationId": "BetaDeleteMemory", + "summary": "Delete a memory", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -4231,12 +4375,25 @@ } }, { - "name": "session_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter memory_id" + }, + { + "name": "expected_content_sha256", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Query parameter for expected_content_sha256" } ], "responses": { @@ -4244,107 +4401,137 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedSession" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedMemory" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } + } + }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } } }, - "/v1/sessions/{session_id}/events?beta=true": { + "/v1/memory_stores/{memory_store_id}/memory_versions?beta=true": { "get": { - "operationId": "BetaListEvents", - "summary": "List Events", + "operationId": "BetaListMemoryVersions", + "summary": "List memory versions", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -4365,70 +4552,74 @@ } }, { - "name": "session_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter memory_store_id" }, { - "name": "limit", + "name": "memory_id", "in": "query", "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Query parameter for limit" + "schema": { "type": "string" }, + "description": "Query parameter for memory_id" }, { - "name": "page", + "name": "session_id", "in": "query", "required": false, "schema": { "type": "string" }, - "description": "Opaque pagination cursor from a previous response's next_page." + "description": "Query parameter for session_id" }, { - "name": "order", + "name": "api_key_id", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListOrder" }, - "description": "Sort direction for results, ordered by created_at. Defaults to asc (chronological)." + "schema": { "type": "string" }, + "description": "Query parameter for api_key_id" }, { - "name": "types[]", + "name": "operation", "in": "query", "required": false, - "style": "form", - "explode": true, - "schema": { "type": "array", "items": { "type": "string" } }, - "description": "Filter by event type. Values match the `type` field on returned events (for example, `user.message` or `agent.tool_use`). Omit to return all event types." + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersionOperation" }, + "description": "Query parameter for operation" }, { "name": "created_at[gte]", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return events created at or after this time (inclusive)." + "description": "Return versions created at or after this time (inclusive)." }, { - "name": "created_at[gt]", + "name": "created_at[lte]", "in": "query", "required": false, "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return events created after this time (exclusive)." + "description": "Return versions created at or before this time (inclusive)." }, { - "name": "created_at[lte]", + "name": "limit", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return events created at or before this time (inclusive)." + "schema": { "type": "integer", "format": "int32" }, + "description": "Query parameter for limit" }, { - "name": "created_at[lt]", + "name": "page", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return events created before this time (exclusive)." + "schema": { "type": "string" }, + "description": "Query parameter for page" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, + "description": "Query parameter for view" } ], "responses": { @@ -4436,106 +4627,139 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionEvents" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListMemoryVersionsResult" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } - }, - "post": { - "operationId": "BetaSendEvents", - "summary": "Send Events", + } + }, + "/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}?beta=true": { + "get": { + "operationId": "BetaGetMemoryVersion", + "summary": "Retrieve a memory version", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -4554,130 +4778,164 @@ } }, { - "name": "session_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_version_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter memory_version_id" + }, + { + "name": "view", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, + "description": "Query parameter for view" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSendSessionEventsParams" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSendSessionEvents" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } } }, - "/v1/sessions/{session_id}/events/stream?beta=true": { - "get": { - "operationId": "BetaStreamSessionEvents", - "summary": "Stream Events", + "/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact?beta=true": { + "post": { + "operationId": "BetaRedactMemoryVersion", + "summary": "Redact a memory version", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -4696,12 +4954,18 @@ } }, { - "name": "session_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter memory_store_id" + }, + { + "name": "memory_version_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter memory_version_id" } ], "responses": { @@ -4709,139 +4973,152 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsStreamSessionEvents" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", + "description": "Custom error status", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + } } } } } }, - "/v1/sessions/{session_id}/archive?beta=true": { + "/v1/memory_stores?beta=true": { "post": { - "operationId": "BetaArchiveSession", - "summary": "Archive Session", - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } + "operationId": "BetaCreateMemoryStore", + "summary": "Create a memory store", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryStoreRequest" } } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" } - ], + }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryStoreResponse" } + } } }, "400": { @@ -4934,13 +5211,30 @@ "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } - } - } - }, - "/v1/sessions/{session_id}/threads?beta=true": { + }, + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + } + ] + }, "get": { - "operationId": "BetaListSessionThreads", - "summary": "List Session Threads", + "operationId": "BetaListMemoryStores", + "summary": "List memory stores", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -4960,27 +5254,40 @@ } } }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum results per page. Defaults to 1000." + "description": "Maximum number of stores to return per page. Must be between 1 and 100. Defaults to 20 when omitted." }, { "name": "page", "in": "query", "required": false, "schema": { "type": "string" }, - "description": "Opaque pagination cursor from a previous response's next_page. Forward-only." + "description": "Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a previous response to fetch the next page; omit for the first page." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { "type": "boolean" }, + "description": "When `true`, archived stores are included in the results. Defaults to `false` (archived stores are excluded)." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return only stores whose `created_at` is at or after this time (inclusive). Sent on the wire as `created_at[gte]`." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return only stores whose `created_at` is at or before this time (inclusive). Sent on the wire as `created_at[lte]`." } ], "responses": { @@ -4988,7 +5295,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionThreads" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListMemoryStoresResponse" } } } }, @@ -5085,10 +5392,10 @@ } } }, - "/v1/sessions/{session_id}/threads/{thread_id}?beta=true": { + "/v1/memory_stores/{memory_store_id}?beta=true": { "get": { - "operationId": "BetaGetSessionThread", - "summary": "Get Session Thread", + "operationId": "BetaGetMemoryStore", + "summary": "Retrieve a memory store", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -5109,20 +5416,11 @@ } }, { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "thread_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter thread_id", - "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + "description": "Path parameter memory_store_id" } ], "responses": { @@ -5130,7 +5428,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsGetMemoryStoreResponse" } } } }, @@ -5225,14 +5523,11 @@ } } } - } - }, - "/v1/sessions/{session_id}/threads/{thread_id}/events?beta=true": { - "get": { - "operationId": "BetaListSessionThreadEvents", - "summary": "List Session Thread Events", + }, + "post": { + "operationId": "BetaUpdateMemoryStore", + "summary": "Update a memory store", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -5251,42 +5546,27 @@ } }, { - "name": "session_id", + "name": "memory_store_id", "in": "path", "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "thread_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter thread_id", - "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Query parameter for limit" - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for page" + "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, + "description": "Path parameter memory_store_id" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryStoreRequestBody" } + } + } + }, "responses": { "200": { "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionThreadEvents" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryStoreResponse" } } } }, @@ -5381,12 +5661,10 @@ } } } - } - }, - "/v1/sessions/{session_id}/threads/{thread_id}/stream?beta=true": { - "get": { - "operationId": "BetaStreamSessionThreadEvents", - "summary": "Stream Session Thread Events", + }, + "delete": { + "operationId": "BetaDeleteMemoryStore", + "summary": "Delete a memory store", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -5407,20 +5685,11 @@ } }, { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "thread_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter thread_id", - "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + "description": "Path parameter memory_store_id" } ], "responses": { @@ -5428,7 +5697,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsStreamSessionThreadEvents" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeleteMemoryStoreResponse" } } } }, @@ -5525,10 +5794,10 @@ } } }, - "/v1/sessions/{session_id}/threads/{thread_id}/archive?beta=true": { + "/v1/memory_stores/{memory_store_id}/archive?beta=true": { "post": { - "operationId": "BetaArchiveSessionThread", - "summary": "Archive Session Thread", + "operationId": "BetaArchiveMemoryStore", + "summary": "Archive a memory store", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -5548,20 +5817,11 @@ } }, { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "thread_id", + "name": "memory_store_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter thread_id", - "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + "description": "Path parameter memory_store_id" } ], "responses": { @@ -5569,7 +5829,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsArchiveMemoryStoreResponse" } } } }, @@ -5666,10 +5926,137 @@ } } }, - "/v1/sessions/{session_id}/resources?beta=true": { + "/v1/user_profiles?beta=true": { + "post": { + "operationId": "BetaCreateUserProfile", + "summary": "Create User Profile", + "requestBody": { + "required": true, + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaCreateUserProfileRequest" } } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaUserProfile" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + }, + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + } + ] + }, "get": { - "operationId": "BetaListResources", - "summary": "List Session Resources", + "operationId": "BetaListUserProfiles", + "summary": "List User Profiles", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -5689,27 +6076,26 @@ } } }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum number of resources to return per page (max 1000). If omitted, returns all resources." + "description": "Query parameter for limit" }, { "name": "page", "in": "query", "required": false, "schema": { "type": "string" }, - "description": "Opaque cursor from a previous response's next_page field." + "description": "Query parameter for page" + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaUserProfileListOrder" }, + "description": "Query parameter for order" } ], "responses": { @@ -5717,7 +6103,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionResources" } + "schema": { "$ref": "#/components/schemas/BetaListUserProfilesResponse" } } } }, @@ -5812,11 +6198,14 @@ } } } - }, - "post": { - "operationId": "BetaAddResource", - "summary": "Add Session Resource", + } + }, + "/v1/user_profiles/{user_profile_id}?beta=true": { + "get": { + "operationId": "BetaGetUserProfile", + "summary": "Get User Profile", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -5835,29 +6224,19 @@ } }, { - "name": "session_id", + "name": "user_profile_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + "description": "Path parameter user_profile_id", + "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAddSessionResourceParams" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAddSessionResource" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaUserProfile" } } } }, "400": { @@ -5951,14 +6330,11 @@ } } } - } - }, - "/v1/sessions/{session_id}/resources/{resource_id}?beta=true": { - "get": { - "operationId": "BetaGetResource", - "summary": "Get Session Resource", + }, + "post": { + "operationId": "BetaUpdateUserProfile", + "summary": "Update User Profile", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -5977,169 +6353,27 @@ } }, { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "resource_id", + "name": "user_profile_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter resource_id", - "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + "description": "Path parameter user_profile_id", + "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" } ], - "responses": { - "200": { - "description": "Successful response (OK)", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsGetSessionResource" } - } - } - }, - "400": { - "description": "Invalid argument - The client specified an invalid argument", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "401": { - "description": "Unauthenticated - The request does not have valid authentication credentials", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "403": { - "description": "Permission denied - The caller does not have permission to execute the specified operation", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "404": { - "description": "Not found - Some requested entity was not found", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "408": { - "description": "Deadline exceeded - The deadline expired before the operation could complete", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "412": { - "description": "Failed precondition - Operation was rejected because the system is not in required state", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "413": { - "description": "Out of range - Operation was attempted past the valid range", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "429": { - "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "431": { - "description": "Request header fields too large - Request metadata was too large", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "499": { - "description": "Cancelled - The operation was cancelled by the client", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "500": { - "description": "Internal - Internal server error", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "501": { - "description": "Unimplemented - The operation is not implemented or supported", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "503": { - "description": "Unavailable - The service is currently unavailable", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "504": { - "description": "Deadline exceeded - Upstream service did not respond in time", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - } - } - }, - "delete": { - "operationId": "BetaDeleteResource", - "summary": "Delete Session Resource", - "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaUpdateUserProfileRequestBody" } } - }, - { - "name": "session_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "resource_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter resource_id", - "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" } - ], + }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeleteSessionResource" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaUserProfile" } } } }, "400": { @@ -6233,10 +6467,12 @@ } } } - }, + } + }, + "/v1/user_profiles/{user_profile_id}/enrollment_url?beta=true": { "post": { - "operationId": "BetaUpdateResource", - "summary": "Update Session Resource", + "operationId": "BetaCreateEnrollmentUrl", + "summary": "Create Enrollment URL", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -6256,37 +6492,19 @@ } }, { - "name": "session_id", + "name": "user_profile_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter session_id", - "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" - }, - { - "name": "resource_id", - "in": "path", - "required": true, - "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter resource_id", - "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" + "description": "Path parameter user_profile_id", + "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionResourceParams" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionResource" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaEnrollmentUrl" } } } }, "400": { @@ -6382,24 +6600,21 @@ } } }, - "/v1/agents?beta=true": { + "/v1/tunnels?beta=true": { "post": { - "operationId": "BetaCreateAgent", - "summary": "Create Agent", + "operationId": "BetaCreateTunnel", + "summary": "Create Tunnel", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nCreates a tunnel. Creation allocates a fresh hostname and provisions the tunnel; it is not idempotent. The new tunnel rejects MCP traffic until at least one CA certificate is added.", "requestBody": { "required": true, "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateAgentParams" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaCreateTunnelRequest" } } } }, "responses": { "200": { "description": "Successful response (OK)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } - } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnel" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", @@ -6513,8 +6728,9 @@ ] }, "get": { - "operationId": "BetaListAgents", - "summary": "List Agents", + "operationId": "BetaListTunnels", + "summary": "List Tunnels", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nLists tunnels. Results are ordered by creation time, newest first; archived tunnels are excluded unless include_archived is set.", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -6539,45 +6755,28 @@ "in": "query", "required": false, "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum results per page. Default 20, maximum 100." + "description": "Maximum number of tunnels to return per page. Defaults to 20, maximum 1000." }, { "name": "page", "in": "query", "required": false, - "schema": { - "type": "string", - "x-stainless-pagination-property": { "purpose": "next_cursor_param" } - }, - "description": "Opaque pagination cursor from a previous response." - }, - { - "name": "created_at[gte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return agents created at or after this time (inclusive)." - }, - { - "name": "created_at[lte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return agents created at or before this time (inclusive)." + "schema": { "type": "string" }, + "description": "Opaque pagination cursor from a previous `list_tunnels` response." }, { "name": "include_archived", "in": "query", "required": false, "schema": { "type": "boolean" }, - "description": "Include archived agents in results. Defaults to false." + "description": "Whether to include archived tunnels in the results. Defaults to false." } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListAgents" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaListTunnelsResponse" } } } }, "400": { @@ -6673,10 +6872,11 @@ } } }, - "/v1/agents/{agent_id}?beta=true": { + "/v1/tunnels/{tunnel_id}?beta=true": { "get": { - "operationId": "BetaGetAgent", - "summary": "Get Agent", + "operationId": "BetaGetTunnel", + "summary": "Get Tunnel", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nFetches a tunnel by ID.", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -6697,27 +6897,17 @@ } }, { - "name": "agent_id", + "name": "tunnel_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter agent_id", - "example": "agent_011CZkYpogX7uDKUyvBTophP" - }, - { - "name": "version", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Agent version. Omit for the most recent version. Must be at least 1 if specified." + "description": "Path parameter tunnel_id" } ], "responses": { "200": { "description": "Successful response (OK)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } - } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnel" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", @@ -6810,10 +7000,13 @@ } } } - }, + } + }, + "/v1/tunnels/{tunnel_id}/archive?beta=true": { "post": { - "operationId": "BetaUpdateAgent", - "summary": "Update Agent", + "operationId": "BetaArchiveTunnel", + "summary": "Archive Tunnel", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nArchives a tunnel. Archival is irreversible: every non-archived certificate on the tunnel is archived in the same operation, the hostname is retired and never re-allocated, and the tunnel token is invalidated. Retrying against an already-archived tunnel returns the existing record unchanged.", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -6833,28 +7026,17 @@ } }, { - "name": "agent_id", + "name": "tunnel_id", "in": "path", "required": true, - "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter agent_id", - "example": "agent_011CZkYpogX7uDKUyvBTophP" + "schema": { "type": "string" }, + "description": "Path parameter tunnel_id" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateAgentParams" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } - } + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnel" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", @@ -6949,10 +7131,11 @@ } } }, - "/v1/agents/{agent_id}/archive?beta=true": { + "/v1/tunnels/{tunnel_id}/reveal_token?beta=true": { "post": { - "operationId": "BetaArchiveAgent", - "summary": "Archive Agent", + "operationId": "BetaRevealTunnelToken", + "summary": "Reveal Tunnel Token", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nReveals a tunnel's connector token. The value is fetched live on each call; Anthropic does not store it. Repeated calls return the same value until the token is rotated. Exposed as POST so the token does not appear in intermediary access logs.", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -6972,19 +7155,18 @@ } }, { - "name": "agent_id", + "name": "tunnel_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter agent_id", - "example": "agent_011CZkYpogX7uDKUyvBTophP" + "description": "Path parameter tunnel_id" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnelToken" } } } }, "400": { @@ -7080,12 +7262,12 @@ } } }, - "/v1/agents/{agent_id}/versions?beta=true": { - "get": { - "operationId": "BetaListAgentVersions", - "summary": "List Agent Versions", + "/v1/tunnels/{tunnel_id}/rotate_token?beta=true": { + "post": { + "operationId": "BetaRotateTunnelToken", + "summary": "Rotate Tunnel Token", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nRotates a tunnel's connector token. Rotation invalidates the current token for new connections and returns a fresh value; established connections are not severed. A connector restarted after rotation must use the new value.", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -7104,142 +7286,18 @@ } }, { - "name": "agent_id", + "name": "tunnel_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter agent_id", - "example": "agent_011CZkYpogX7uDKUyvBTophP" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum results per page. Default 20, maximum 100." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "string", - "x-stainless-pagination-property": { "purpose": "next_cursor_param" } - }, - "description": "Opaque pagination cursor." + "description": "Path parameter tunnel_id" } ], - "responses": { - "200": { - "description": "Successful response (OK)", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListAgentVersions" } - } - } - }, - "400": { - "description": "Invalid argument - The client specified an invalid argument", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "401": { - "description": "Unauthenticated - The request does not have valid authentication credentials", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "403": { - "description": "Permission denied - The caller does not have permission to execute the specified operation", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "404": { - "description": "Not found - Some requested entity was not found", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "408": { - "description": "Deadline exceeded - The deadline expired before the operation could complete", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "412": { - "description": "Failed precondition - Operation was rejected because the system is not in required state", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "413": { - "description": "Out of range - Operation was attempted past the valid range", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "429": { - "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "431": { - "description": "Request header fields too large - Request metadata was too large", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "499": { - "description": "Cancelled - The operation was cancelled by the client", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "500": { - "description": "Internal - Internal server error", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "501": { - "description": "Unimplemented - The operation is not implemented or supported", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "503": { - "description": "Unavailable - The service is currently unavailable", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "504": { - "description": "Deadline exceeded - Upstream service did not respond in time", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - } - } - } - }, - "/v1/deployments?beta=true": { - "post": { - "operationId": "BetaCreateDeployment", - "summary": "Create Deployment", "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateDeploymentParams" } + "schema": { "$ref": "#/components/schemas/BetaRotateTunnelTokenRequestBody" } } } }, @@ -7247,7 +7305,7 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnelToken" } } } }, "400": { @@ -7340,32 +7398,15 @@ "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } - }, - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } - } - } - ] - }, - "get": { - "operationId": "BetaListDeployments", - "summary": "List Deployments", + } + } + }, + "/v1/tunnels/{tunnel_id}/certificates?beta=true": { + "post": { + "operationId": "BetaCreateTunnelCertificate", + "summary": "Create Tunnel Certificate", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nRegisters a public CA certificate on a tunnel. Anthropic verifies the gateway's server certificate against this CA when it terminates the inner TLS session. A tunnel holds at most two non-archived certificates.", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -7384,65 +7425,26 @@ } }, { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum results per page. Default 20, maximum 100." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "string", - "x-stainless-pagination-property": { "purpose": "next_cursor_param" } - }, - "description": "Opaque pagination cursor." - }, - { - "name": "agent_id", - "in": "query", - "required": false, + "name": "tunnel_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Filter by agent ID." - }, - { - "name": "status", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentStatus" }, - "description": "Filter by status: active or paused. Omit for both. To include archived deployments, use include_archived instead; the two cannot be combined." - }, - { - "name": "created_at[gte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return deployments created at or after this time (inclusive)." - }, - { - "name": "created_at[lte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return deployments created at or before this time (inclusive)." - }, - { - "name": "include_archived", - "in": "query", - "required": false, - "schema": { "type": "boolean" }, - "description": "When true, includes archived deployments. Default: false (exclude archived)." + "description": "Path parameter tunnel_id" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaCreateTunnelCertificateRequestBody" } + } + } + }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListDeploymentsData" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnelCertificate" } } } }, "400": { @@ -7536,12 +7538,11 @@ } } } - } - }, - "/v1/deployments/{deployment_id}?beta=true": { + }, "get": { - "operationId": "BetaGetDeployment", - "summary": "Get Deployment", + "operationId": "BetaListTunnelCertificates", + "summary": "List Tunnel Certificates", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nLists the certificates registered on a tunnel. Archived certificates are excluded unless include_archived is set.", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -7562,18 +7563,41 @@ } }, { - "name": "deployment_id", + "name": "tunnel_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter deployment_id" + "description": "Path parameter tunnel_id" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum number of certificates to return per page. Defaults to 20, maximum 1000." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Opaque pagination cursor from a previous `list_tunnel_certificates` response." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { "type": "boolean" }, + "description": "Whether to include archived certificates in the results. Defaults to false." } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaListTunnelCertificatesResponse" } + } } }, "400": { @@ -7667,11 +7691,15 @@ } } } - }, - "post": { - "operationId": "BetaUpdateDeployment", - "summary": "Update Deployment", + } + }, + "/v1/tunnels/{tunnel_id}/certificates/{certificate_id}?beta=true": { + "get": { + "operationId": "BetaGetTunnelCertificate", + "summary": "Get Tunnel Certificate", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nFetches a tunnel certificate by ID.", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -7690,26 +7718,25 @@ } }, { - "name": "deployment_id", + "name": "tunnel_id", "in": "path", "required": true, - "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter deployment_id" + "schema": { "type": "string" }, + "description": "Path parameter tunnel_id" + }, + { + "name": "certificate_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter certificate_id" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateDeploymentParams" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnelCertificate" } } } }, "400": { @@ -7805,10 +7832,11 @@ } } }, - "/v1/deployments/{deployment_id}/archive?beta=true": { + "/v1/tunnels/{tunnel_id}/certificates/{certificate_id}/archive?beta=true": { "post": { - "operationId": "BetaArchiveDeployment", - "summary": "Archive Deployment", + "operationId": "BetaArchiveTunnelCertificate", + "summary": "Archive Tunnel Certificate", + "description": "The Tunnels API is in research preview. It requires the `anthropic-beta: mcp-tunnels-2026-06-22` header and may change without a deprecation period. It supersedes the Admin API endpoints at `/v1/organizations/tunnels`, which remain available during a migration window.\n\nArchives a tunnel certificate, removing it from the set Anthropic trusts for the tunnel. The certificate record is retained. Archiving the last non-archived certificate is permitted; the tunnel rejects MCP traffic until a new certificate is added.", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -7828,18 +7856,25 @@ } }, { - "name": "deployment_id", + "name": "tunnel_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter deployment_id" + "description": "Path parameter tunnel_id" + }, + { + "name": "certificate_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter certificate_id" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaTunnelCertificate" } } } }, "400": { @@ -7935,10 +7970,116 @@ } } }, - "/v1/deployments/{deployment_id}/pause?beta=true": { + "/v1/sessions?beta=true": { "post": { - "operationId": "BetaPauseDeployment", - "summary": "Pause Deployment", + "operationId": "BetaCreateSession", + "summary": "Create Session", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateSessionParams" } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + }, "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -7956,20 +8097,135 @@ "items": { "$ref": "#/components/schemas/AnthropicBeta" } } } + } + ] + }, + "get": { + "operationId": "BetaListSessions", + "summary": "List Sessions", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum number of results to return." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Opaque pagination cursor from a previous response." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { "type": "boolean" }, + "description": "When true, includes archived sessions. Default: false (exclude archived)." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return sessions created at or after this time (inclusive)." + }, + { + "name": "created_at[gt]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return sessions created after this time (exclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return sessions created at or before this time (inclusive)." + }, + { + "name": "created_at[lt]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return sessions created before this time (exclusive)." + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Filter sessions created with this agent ID." + }, + { + "name": "agent_version", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Filter by agent version. Only applies when agent_id is also set." + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListOrder" }, + "description": "Sort direction for results, ordered by created_at. Defaults to desc (newest first)." + }, + { + "name": "memory_store_id", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Filter sessions whose resources contain a memory_store with this memory store ID." }, { "name": "deployment_id", - "in": "path", - "required": true, + "in": "query", + "required": false, "schema": { "type": "string" }, - "description": "Path parameter deployment_id" + "description": "Filter sessions created by this deployment ID." + }, + { + "name": "statuses[]", + "in": "query", + "required": false, + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/BetaManagedAgentsSessionStatus" } + }, + "description": "Filter by session status. Repeat the parameter to match any of multiple statuses." } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessions" } + } } }, "400": { @@ -8065,11 +8321,12 @@ } } }, - "/v1/deployments/{deployment_id}/unpause?beta=true": { - "post": { - "operationId": "BetaUnpauseDeployment", - "summary": "Unpause Deployment", + "/v1/sessions/{session_id}?beta=true": { + "get": { + "operationId": "BetaGetSession", + "summary": "Get Session", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -8088,18 +8345,19 @@ } }, { - "name": "deployment_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter deployment_id" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } } }, "400": { @@ -8193,12 +8451,10 @@ } } } - } - }, - "/v1/deployments/{deployment_id}/run?beta=true": { + }, "post": { - "operationId": "BetaRunDeploymentNow", - "summary": "Run Deployment Now", + "operationId": "BetaUpdateSession", + "summary": "Update Session", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -8218,20 +8474,27 @@ } }, { - "name": "deployment_id", + "name": "session_id", "in": "path", "required": true, - "schema": { "type": "string" }, - "description": "Path parameter deployment_id" + "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionParams" } + } + } + }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentRun" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } } }, "400": { @@ -8325,12 +8588,10 @@ } } } - } - }, - "/v1/deployment_runs?beta=true": { - "get": { - "operationId": "BetaListDeploymentRuns", - "summary": "List Deployment Runs", + }, + "delete": { + "operationId": "BetaDeleteSession", + "summary": "Delete Session", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -8351,70 +8612,12 @@ } }, { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum results per page. Default 20, maximum 1000." - }, - { - "name": "page", - "in": "query", - "required": false, - "schema": { - "type": "string", - "x-stainless-pagination-property": { "purpose": "next_cursor_param" } - }, - "description": "Opaque pagination cursor. Pass next_page from the previous response. Invalid or expired cursors return 400." - }, - { - "name": "deployment_id", - "in": "query", - "required": false, + "name": "session_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Filter to a specific deployment. Omit to list across all deployments in the workspace. Filtering by a non-existent deployment_id returns 200 with empty data." - }, - { - "name": "trigger_type", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsTriggerType" }, - "description": "Filter runs by what triggered them. Omit to return all runs." - }, - { - "name": "has_error", - "in": "query", - "required": false, - "schema": { "type": "boolean" }, - "description": "Filter: true for runs with non-null error, false for runs with non-null session_id. Omit for all." - }, - { - "name": "created_at[gte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return runs created at or after this time (inclusive)." - }, - { - "name": "created_at[lte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return runs created at or before this time (inclusive)." - }, - { - "name": "created_at[gt]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return runs created strictly after this time (exclusive)." - }, - { - "name": "created_at[lt]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return runs created strictly before this time (exclusive)." + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" } ], "responses": { @@ -8422,7 +8625,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListDeploymentRunsData" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedSession" } } } }, @@ -8519,10 +8722,10 @@ } } }, - "/v1/deployment_runs/{deployment_run_id}?beta=true": { + "/v1/sessions/{session_id}/events?beta=true": { "get": { - "operationId": "BetaGetDeploymentRun", - "summary": "Get Deployment Run", + "operationId": "BetaListEvents", + "summary": "List Events", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -8543,11 +8746,70 @@ } }, { - "name": "deployment_run_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter deployment_run_id" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Opaque pagination cursor from a previous response's next_page." + }, + { + "name": "order", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListOrder" }, + "description": "Sort direction for results, ordered by created_at. Defaults to asc (chronological)." + }, + { + "name": "types[]", + "in": "query", + "required": false, + "style": "form", + "explode": true, + "schema": { "type": "array", "items": { "type": "string" } }, + "description": "Filter by event type. Values match the `type` field on returned events (for example, `user.message` or `agent.tool_use`). Omit to return all event types." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return events created at or after this time (inclusive)." + }, + { + "name": "created_at[gt]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return events created after this time (exclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return events created at or before this time (inclusive)." + }, + { + "name": "created_at[lt]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return events created before this time (exclusive)." } ], "responses": { @@ -8555,7 +8817,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentRun" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionEvents" } } } }, @@ -8650,17 +8912,42 @@ } } } - } - }, - "/v1/vaults?beta=true": { + }, "post": { - "operationId": "BetaCreateVault", - "summary": "Create Vault", + "operationId": "BetaSendEvents", + "summary": "Send Events", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "session_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + } + ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateVaultRequest" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSendSessionEventsParams" } } } }, @@ -8668,7 +8955,9 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSendSessionEvents" } + } } }, "400": { @@ -8761,30 +9050,13 @@ "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } - }, - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } - } - } - ] - }, + } + } + }, + "/v1/sessions/{session_id}/events/stream?beta=true": { "get": { - "operationId": "BetaListVaults", - "summary": "List Vaults", + "operationId": "BetaStreamSessionEvents", + "summary": "Stream Events", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -8805,25 +9077,24 @@ } }, { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum number of vaults to return per page. Defaults to 20, maximum 100." - }, - { - "name": "page", - "in": "query", - "required": false, + "name": "session_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Opaque pagination token from a previous `list_vaults` response." + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" }, { - "name": "include_archived", + "name": "event_deltas[]", "in": "query", "required": false, - "schema": { "type": "boolean" }, - "description": "Whether to include archived vaults in the results." + "style": "form", + "explode": true, + "schema": { + "type": "array", + "items": { "$ref": "#/components/schemas/BetaManagedAgentsEventDeltaType" } + }, + "description": "When set, this connection also receives streaming deltas (`event_start`, `event_delta`) while an event is being produced, before the event itself arrives. Deltas are best-effort; when the final event is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no final event — its terminal `span.model_request_end` closes the preview. Accepts one or more event types to preview and may be repeated: `agent.message` streams `content_delta` fragments; `agent.thinking` is start-only — a signal that the agent has begun extended thinking, concluded by the `agent.thinking` event itself. Only previews of the requested event types are sent." } ], "responses": { @@ -8831,7 +9102,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListVaultsResponse" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsStreamSessionEvents" } } } }, @@ -8928,12 +9199,11 @@ } } }, - "/v1/vaults/{vault_id}?beta=true": { - "get": { - "operationId": "BetaGetVault", - "summary": "Get Vault", + "/v1/sessions/{session_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveSession", + "summary": "Archive Session", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -8952,19 +9222,19 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSession" } } } }, "400": { @@ -9058,11 +9328,14 @@ } } } - }, - "post": { - "operationId": "BetaUpdateVault", - "summary": "Update Vault", + } + }, + "/v1/sessions/{session_id}/threads?beta=true": { + "get": { + "operationId": "BetaListSessionThreads", + "summary": "List Session Threads", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -9081,27 +9354,35 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, - "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "schema": { "type": "string" }, + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum results per page. Defaults to 1000." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Opaque pagination cursor from a previous response's next_page. Forward-only." } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateVaultRequestBody" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionThreads" } + } } }, "400": { @@ -9195,10 +9476,12 @@ } } } - }, - "delete": { - "operationId": "BetaDeleteVault", - "summary": "Delete Vault", + } + }, + "/v1/sessions/{session_id}/threads/{thread_id}?beta=true": { + "get": { + "operationId": "BetaGetSessionThread", + "summary": "Get Session Thread", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -9219,12 +9502,20 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" } ], "responses": { @@ -9232,7 +9523,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedVault" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" } } } }, @@ -9329,11 +9620,12 @@ } } }, - "/v1/vaults/{vault_id}/archive?beta=true": { - "post": { - "operationId": "BetaArchiveVault", - "summary": "Archive Vault", + "/v1/sessions/{session_id}/threads/{thread_id}/events?beta=true": { + "get": { + "operationId": "BetaListSessionThreadEvents", + "summary": "List Session Thread Events", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -9352,19 +9644,43 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Query parameter for limit" + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Query parameter for page" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionThreadEvents" } + } } }, "400": { @@ -9460,11 +9776,12 @@ } } }, - "/v1/vaults/{vault_id}/credentials?beta=true": { - "post": { - "operationId": "BetaCreateCredential", - "summary": "Create Credential", + "/v1/sessions/{session_id}/threads/{thread_id}/stream?beta=true": { + "get": { + "operationId": "BetaStreamSessionThreadEvents", + "summary": "Stream Session Thread Events", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -9483,27 +9800,29 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" + }, + { + "name": "thread_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateCredentialRequestBody" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsStreamSessionThreadEvents" } + } } }, "400": { @@ -9597,12 +9916,13 @@ } } } - }, - "get": { - "operationId": "BetaListCredentials", - "summary": "List Credentials", + } + }, + "/v1/sessions/{session_id}/threads/{thread_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveSessionThread", + "summary": "Archive Session Thread", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -9621,33 +9941,20 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" - }, - { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum number of credentials to return per page. Defaults to 20, maximum 100." + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" }, { - "name": "page", - "in": "query", - "required": false, + "name": "thread_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Opaque pagination token from a previous `list_credentials` response." - }, - { - "name": "include_archived", - "in": "query", - "required": false, - "schema": { "type": "boolean" }, - "description": "Whether to include archived credentials in the results." + "description": "Path parameter thread_id", + "example": "sthr_011CZkZVWa6oIjw0rgXZpnBt" } ], "responses": { @@ -9655,7 +9962,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListCredentialsResponse" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsSessionThread" } } } }, @@ -9752,10 +10059,10 @@ } } }, - "/v1/vaults/{vault_id}/credentials/{credential_id}?beta=true": { + "/v1/sessions/{session_id}/resources?beta=true": { "get": { - "operationId": "BetaGetCredential", - "summary": "Get Credential", + "operationId": "BetaListResources", + "summary": "List Session Resources", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -9776,27 +10083,35 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" }, { - "name": "credential_id", - "in": "path", - "required": true, + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum number of resources to return per page (max 1000). If omitted, returns all resources." + }, + { + "name": "page", + "in": "query", + "required": false, "schema": { "type": "string" }, - "description": "Path parameter credential_id", - "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + "description": "Opaque cursor from a previous response's next_page field." } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListSessionResources" } + } } }, "400": { @@ -9892,8 +10207,8 @@ } }, "post": { - "operationId": "BetaUpdateCredential", - "summary": "Update Credential", + "operationId": "BetaAddResource", + "summary": "Add Session Resource", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -9913,27 +10228,19 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" - }, - { - "name": "credential_id", - "in": "path", - "required": true, - "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter credential_id", - "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateCredentialRequestBody" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAddSessionResourceParams" } } } }, @@ -9941,7 +10248,9 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAddSessionResource" } + } } }, "400": { @@ -10035,10 +10344,12 @@ } } } - }, - "delete": { - "operationId": "BetaDeleteCredential", - "summary": "Delete Credential", + } + }, + "/v1/sessions/{session_id}/resources/{resource_id}?beta=true": { + "get": { + "operationId": "BetaGetResource", + "summary": "Get Session Resource", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -10059,20 +10370,20 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" }, { - "name": "credential_id", + "name": "resource_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter credential_id", - "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + "description": "Path parameter resource_id", + "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" } ], "responses": { @@ -10080,7 +10391,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedCredential" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsGetSessionResource" } } } }, @@ -10175,13 +10486,12 @@ } } } - } - }, - "/v1/vaults/{vault_id}/credentials/{credential_id}/archive?beta=true": { - "post": { - "operationId": "BetaArchiveCredential", - "summary": "Archive Credential", + }, + "delete": { + "operationId": "BetaDeleteResource", + "summary": "Delete Session Resource", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -10200,27 +10510,29 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" }, { - "name": "credential_id", + "name": "resource_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter credential_id", - "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + "description": "Path parameter resource_id", + "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeleteSessionResource" } + } } }, "400": { @@ -10314,12 +10626,10 @@ } } } - } - }, - "/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate?beta=true": { + }, "post": { - "operationId": "BetaValidateCredential", - "summary": "Validate Credential", + "operationId": "BetaUpdateResource", + "summary": "Update Session Resource", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -10339,28 +10649,36 @@ } }, { - "name": "vault_id", + "name": "session_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter vault_id", - "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + "description": "Path parameter session_id", + "example": "sesn_011CZkZAtmR3yMPDzynEDxu7" }, { - "name": "credential_id", + "name": "resource_id", "in": "path", "required": true, - "schema": { "type": "string" }, - "description": "Path parameter credential_id", - "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" + "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, + "description": "Path parameter resource_id", + "example": "sesrsc_011CZkZBJq5dWxk9fVLNcPht" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionResourceParams" } + } + } + }, "responses": { "200": { "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredentialValidation" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateSessionResource" } } } }, @@ -10457,48 +10775,15 @@ } } }, - "/v1/memory_stores/{memory_store_id}/memories?beta=true": { + "/v1/agents?beta=true": { "post": { - "operationId": "BetaCreateMemory", - "summary": "Create a memory", - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } - } - }, - { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "view", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, - "description": "Query parameter for view" - } - ], + "operationId": "BetaCreateAgent", + "summary": "Create Agent", "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryParams" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateAgentParams" } } } }, @@ -10506,134 +10791,123 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemory" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + }, + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } } } } - } + ] }, "get": { - "operationId": "BetaListMemories", - "summary": "List memories", + "operationId": "BetaListAgents", + "summary": "List Agents", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -10654,198 +10928,148 @@ } }, { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "path_prefix", - "in": "query", - "required": false, - "schema": { "type": "string" }, - "description": "Optional path prefix filter (raw string-prefix match; include a trailing slash for directory-scoped lists). This value appears in request URLs. Do not include secrets or personally identifiable information." - }, - { - "name": "depth", + "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32" }, - "description": "Query parameter for depth" - }, - { - "name": "order_by", - "in": "query", - "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for order_by" + "description": "Maximum results per page. Default 20, maximum 100." }, { - "name": "order", + "name": "page", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListOrder" }, - "description": "Query parameter for order" + "schema": { + "type": "string", + "x-stainless-pagination-property": { "purpose": "next_cursor_param" } + }, + "description": "Opaque pagination cursor from a previous response." }, { - "name": "limit", + "name": "created_at[gte]", "in": "query", "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Query parameter for limit" + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return agents created at or after this time (inclusive)." }, { - "name": "page", + "name": "created_at[lte]", "in": "query", "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for page" + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return agents created at or before this time (inclusive)." }, { - "name": "view", + "name": "include_archived", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, - "description": "Query parameter for view" + "schema": { "type": "boolean" }, + "description": "Include archived agents in results. Defaults to false." } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListMemoriesResult" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListAgents" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } } } }, - "/v1/memory_stores/{memory_store_id}/memories/{memory_id}?beta=true": { + "/v1/agents/{agent_id}?beta=true": { "get": { - "operationId": "BetaGetMemory", - "summary": "Retrieve a memory", + "operationId": "BetaGetAgent", + "summary": "Get Agent", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -10866,159 +11090,123 @@ } }, { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "memory_id", + "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_id" + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" }, { - "name": "view", + "name": "version", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, - "description": "Query parameter for view" + "schema": { "type": "integer", "format": "int32" }, + "description": "Agent version. Omit for the most recent version. Must be at least 1 if specified." } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemory" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } } }, "post": { - "operationId": "BetaUpdateMemory", - "summary": "Update a memory", + "operationId": "BetaUpdateAgent", + "summary": "Update Agent", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -11038,32 +11226,19 @@ } }, { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "memory_id", + "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter memory_id" - }, - { - "name": "view", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, - "description": "Query parameter for view" + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" } ], "requestBody": { "required": true, "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryParams" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateAgentParams" } } } }, @@ -11071,136 +11246,107 @@ "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemory" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } } - }, - "delete": { - "operationId": "BetaDeleteMemory", - "summary": "Delete a memory", - "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + } + }, + "/v1/agents/{agent_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveAgent", + "summary": "Archive Agent", + "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -11219,25 +11365,161 @@ } }, { - "name": "memory_store_id", + "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsAgent" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/agents/{agent_id}/versions?beta=true": { + "get": { + "operationId": "BetaListAgentVersions", + "summary": "List Agent Versions", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { - "name": "memory_id", + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "agent_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_id" + "description": "Path parameter agent_id", + "example": "agent_011CZkYpogX7uDKUyvBTophP" }, { - "name": "expected_content_sha256", + "name": "limit", "in": "query", "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for expected_content_sha256" + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum results per page. Default 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string", + "x-stainless-pagination-property": { "purpose": "next_cursor_param" } + }, + "description": "Opaque pagination cursor." } ], "responses": { @@ -11245,137 +11527,1663 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedMemory" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListAgentVersions" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployments?beta=true": { + "post": { + "operationId": "BetaCreateDeployment", + "summary": "Create Deployment", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateDeploymentParams" } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + }, + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + } + ] + }, + "get": { + "operationId": "BetaListDeployments", + "summary": "List Deployments", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum results per page. Default 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string", + "x-stainless-pagination-property": { "purpose": "next_cursor_param" } + }, + "description": "Opaque pagination cursor." + }, + { + "name": "agent_id", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Filter by agent ID." + }, + { + "name": "status", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentStatus" }, + "description": "Filter by status: active or paused. Omit for both. To include archived deployments, use include_archived instead; the two cannot be combined." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return deployments created at or after this time (inclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return deployments created at or before this time (inclusive)." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { "type": "boolean" }, + "description": "When true, includes archived deployments. Default: false (exclude archived)." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListDeploymentsData" } } } }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployments/{deployment_id}?beta=true": { + "get": { + "operationId": "BetaGetDeployment", + "summary": "Get Deployment", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter deployment_id", + "example": "depl_011CZkZcDH3vPqd7xnEfwTai" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + }, + "post": { + "operationId": "BetaUpdateDeployment", + "summary": "Update Deployment", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_id", + "in": "path", + "required": true, + "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, + "description": "Path parameter deployment_id", + "example": "depl_011CZkZcDH3vPqd7xnEfwTai" + } + ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateDeploymentParams" } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployments/{deployment_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveDeployment", + "summary": "Archive Deployment", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter deployment_id", + "example": "depl_011CZkZcDH3vPqd7xnEfwTai" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployments/{deployment_id}/pause?beta=true": { + "post": { + "operationId": "BetaPauseDeployment", + "summary": "Pause Deployment", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter deployment_id", + "example": "depl_011CZkZcDH3vPqd7xnEfwTai" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployments/{deployment_id}/unpause?beta=true": { + "post": { + "operationId": "BetaUnpauseDeployment", + "summary": "Unpause Deployment", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter deployment_id", + "example": "depl_011CZkZcDH3vPqd7xnEfwTai" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployments/{deployment_id}/run?beta=true": { + "post": { + "operationId": "BetaRunDeploymentNow", + "summary": "Run Deployment Now", + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter deployment_id", + "example": "depl_011CZkZcDH3vPqd7xnEfwTai" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentRun" } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployment_runs?beta=true": { + "get": { + "operationId": "BetaListDeploymentRuns", + "summary": "List Deployment Runs", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum results per page. Default 20, maximum 1000." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { + "type": "string", + "x-stainless-pagination-property": { "purpose": "next_cursor_param" } + }, + "description": "Opaque pagination cursor. Pass next_page from the previous response. Invalid or expired cursors return 400." + }, + { + "name": "deployment_id", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Filter to a specific deployment. Omit to list across all deployments in the workspace. Filtering by a non-existent deployment_id returns 200 with empty data." + }, + { + "name": "trigger_type", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsTriggerType" }, + "description": "Filter runs by what triggered them. Omit to return all runs." + }, + { + "name": "has_error", + "in": "query", + "required": false, + "schema": { "type": "boolean" }, + "description": "Filter: true for runs with non-null error, false for runs with non-null session_id. Omit for all." + }, + { + "name": "created_at[gte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return runs created at or after this time (inclusive)." + }, + { + "name": "created_at[lte]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return runs created at or before this time (inclusive)." + }, + { + "name": "created_at[gt]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return runs created strictly after this time (exclusive)." + }, + { + "name": "created_at[lt]", + "in": "query", + "required": false, + "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, + "description": "Return runs created strictly before this time (exclusive)." + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListDeploymentRunsData" } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/deployment_runs/{deployment_run_id}?beta=true": { + "get": { + "operationId": "BetaGetDeploymentRun", + "summary": "Get Deployment Run", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } + } + }, + { + "name": "deployment_run_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter deployment_run_id" + } + ], + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentRun" } + } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "413": { + "description": "Out of range - Operation was attempted past the valid range", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "429": { + "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "431": { + "description": "Request header fields too large - Request metadata was too large", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "499": { + "description": "Cancelled - The operation was cancelled by the client", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "500": { + "description": "Internal - Internal server error", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "501": { + "description": "Unimplemented - The operation is not implemented or supported", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "503": { + "description": "Unavailable - The service is currently unavailable", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "504": { + "description": "Deadline exceeded - Upstream service did not respond in time", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + } + } + }, + "/v1/vaults?beta=true": { + "post": { + "operationId": "BetaCreateVault", + "summary": "Create Vault", + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateVaultRequest" } + } + } + }, + "responses": { + "200": { + "description": "Successful response (OK)", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } + } + }, + "400": { + "description": "Invalid argument - The client specified an invalid argument", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "401": { + "description": "Unauthenticated - The request does not have valid authentication credentials", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "403": { + "description": "Permission denied - The caller does not have permission to execute the specified operation", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "404": { + "description": "Not found - Some requested entity was not found", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "408": { + "description": "Deadline exceeded - The deadline expired before the operation could complete", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "409": { + "description": "Aborted - The operation was aborted due to concurrency issue", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, + "412": { + "description": "Failed precondition - Operation was rejected because the system is not in required state", + "content": { + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } + } + } + }, + "parameters": [ + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } } } } - } - } - }, - "/v1/memory_stores/{memory_store_id}/memory_versions?beta=true": { + ] + }, "get": { - "operationId": "BetaListMemoryVersions", - "summary": "List memory versions", + "operationId": "BetaListVaults", + "summary": "List Vaults", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -11395,75 +13203,26 @@ } } }, - { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "memory_id", - "in": "query", - "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for memory_id" - }, - { - "name": "session_id", - "in": "query", - "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for session_id" - }, - { - "name": "api_key_id", - "in": "query", - "required": false, - "schema": { "type": "string" }, - "description": "Query parameter for api_key_id" - }, - { - "name": "operation", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersionOperation" }, - "description": "Query parameter for operation" - }, - { - "name": "created_at[gte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return versions created at or after this time (inclusive)." - }, - { - "name": "created_at[lte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return versions created at or before this time (inclusive)." - }, { "name": "limit", "in": "query", "required": false, "schema": { "type": "integer", "format": "int32" }, - "description": "Query parameter for limit" + "description": "Maximum number of vaults to return per page. Defaults to 20, maximum 100." }, { "name": "page", "in": "query", "required": false, "schema": { "type": "string" }, - "description": "Query parameter for page" + "description": "Opaque pagination token from a previous `list_vaults` response." }, { - "name": "view", + "name": "include_archived", "in": "query", "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, - "description": "Query parameter for view" + "schema": { "type": "boolean" }, + "description": "Whether to include archived vaults in the results." } ], "responses": { @@ -11471,137 +13230,107 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListMemoryVersionsResult" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListVaultsResponse" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } } } }, - "/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}?beta=true": { + "/v1/vaults/{vault_id}?beta=true": { "get": { - "operationId": "BetaGetMemoryVersion", - "summary": "Retrieve a memory version", + "operationId": "BetaGetVault", + "summary": "Get Vault", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -11622,163 +13351,116 @@ } }, { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "memory_version_id", + "name": "vault_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_version_id" - }, - { - "name": "view", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryView" }, - "description": "Query parameter for view" + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } } - } - }, - "/v1/memory_stores/{memory_store_id}/memory_versions/{memory_version_id}/redact?beta=true": { + }, "post": { - "operationId": "BetaRedactMemoryVersion", - "summary": "Redact a memory version", + "operationId": "BetaUpdateVault", + "summary": "Update Vault", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -11798,170 +13480,158 @@ } }, { - "name": "memory_store_id", - "in": "path", - "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - }, - { - "name": "memory_version_id", + "name": "vault_id", "in": "path", "required": true, - "schema": { "type": "string" }, - "description": "Path parameter memory_version_id" + "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateVaultRequestBody" } + } + } + }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsMemoryVersion" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } } }, "400": { "description": "Invalid argument - The client specified an invalid argument", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "401": { "description": "Unauthenticated - The request does not have valid authentication credentials", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "403": { "description": "Permission denied - The caller does not have permission to execute the specified operation", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "404": { "description": "Not found - Some requested entity was not found", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "408": { "description": "Deadline exceeded - The deadline expired before the operation could complete", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "409": { - "description": "Custom error status", + "description": "Aborted - The operation was aborted due to concurrency issue", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "412": { "description": "Failed precondition - Operation was rejected because the system is not in required state", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "413": { "description": "Out of range - Operation was attempted past the valid range", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "429": { "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "431": { "description": "Request header fields too large - Request metadata was too large", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "499": { "description": "Cancelled - The operation was cancelled by the client", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "500": { "description": "Internal - Internal server error", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "501": { "description": "Unimplemented - The operation is not implemented or supported", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "503": { "description": "Unavailable - The service is currently unavailable", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } }, "504": { "description": "Deadline exceeded - Upstream service did not respond in time", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsErrorResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } } - } - }, - "/v1/memory_stores?beta=true": { - "post": { - "operationId": "BetaCreateMemoryStore", - "summary": "Create a memory store", - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryStoreRequest" } + }, + "delete": { + "operationId": "BetaDeleteVault", + "summary": "Delete Vault", + "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, + { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, + { + "name": "anthropic-beta", + "in": "header", + "required": false, + "schema": { + "type": "string", + "items": { "type": "string" }, + "x-stainless-override-schema": { + "x-stainless-param": "betas", + "x-stainless-extend-default": true, + "type": "array", + "description": "Optional header to specify the beta version(s) you want to use.", + "items": { "$ref": "#/components/schemas/AnthropicBeta" } + } } + }, + { + "name": "vault_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" } - }, + ], "responses": { "200": { "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateMemoryStoreResponse" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedVault" } } } }, @@ -12055,32 +13725,14 @@ "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } - }, - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } - } - } - ] - }, - "get": { - "operationId": "BetaListMemoryStores", - "summary": "List memory stores", + } + } + }, + "/v1/vaults/{vault_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveVault", + "summary": "Archive Vault", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -12099,48 +13751,19 @@ } }, { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Maximum number of stores to return per page. Must be between 1 and 100. Defaults to 20 when omitted." - }, - { - "name": "page", - "in": "query", - "required": false, + "name": "vault_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Opaque pagination cursor (a `page_...` value). Pass the `next_page` value from a previous response to fetch the next page; omit for the first page." - }, - { - "name": "include_archived", - "in": "query", - "required": false, - "schema": { "type": "boolean" }, - "description": "When `true`, archived stores are included in the results. Defaults to `false` (archived stores are excluded)." - }, - { - "name": "created_at[gte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return only stores whose `created_at` is at or after this time (inclusive). Sent on the wire as `created_at[gte]`." - }, - { - "name": "created_at[lte]", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaTimestamp" }, - "description": "Return only stores whose `created_at` is at or before this time (inclusive). Sent on the wire as `created_at[lte]`." + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListMemoryStoresResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsVault" } } } }, "400": { @@ -12236,12 +13859,11 @@ } } }, - "/v1/memory_stores/{memory_store_id}?beta=true": { - "get": { - "operationId": "BetaGetMemoryStore", - "summary": "Retrieve a memory store", + "/v1/vaults/{vault_id}/credentials?beta=true": { + "post": { + "operationId": "BetaCreateCredential", + "summary": "Create Credential", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -12260,20 +13882,27 @@ } }, { - "name": "memory_store_id", + "name": "vault_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" } ], + "requestBody": { + "required": true, + "content": { + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCreateCredentialRequestBody" } + } + } + }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsGetMemoryStoreResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } } }, "400": { @@ -12368,10 +13997,11 @@ } } }, - "post": { - "operationId": "BetaUpdateMemoryStore", - "summary": "Update a memory store", + "get": { + "operationId": "BetaListCredentials", + "summary": "List Credentials", "parameters": [ + { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -12390,27 +14020,41 @@ } }, { - "name": "memory_store_id", + "name": "vault_id", "in": "path", "required": true, - "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, - "description": "Path parameter memory_store_id" + "schema": { "type": "string" }, + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "limit", + "in": "query", + "required": false, + "schema": { "type": "integer", "format": "int32" }, + "description": "Maximum number of credentials to return per page. Defaults to 20, maximum 100." + }, + { + "name": "page", + "in": "query", + "required": false, + "schema": { "type": "string" }, + "description": "Opaque pagination token from a previous `list_credentials` response." + }, + { + "name": "include_archived", + "in": "query", + "required": false, + "schema": { "type": "boolean" }, + "description": "Whether to include archived credentials in the results." } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryStoreRequestBody" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateMemoryStoreResponse" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsListCredentialsResponse" } } } }, @@ -12505,10 +14149,12 @@ } } } - }, - "delete": { - "operationId": "BetaDeleteMemoryStore", - "summary": "Delete a memory store", + } + }, + "/v1/vaults/{vault_id}/credentials/{credential_id}?beta=true": { + "get": { + "operationId": "BetaGetCredential", + "summary": "Get Credential", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -12529,20 +14175,27 @@ } }, { - "name": "memory_store_id", + "name": "vault_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeleteMemoryStoreResponse" } - } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } } }, "400": { @@ -12636,12 +14289,10 @@ } } } - } - }, - "/v1/memory_stores/{memory_store_id}/archive?beta=true": { + }, "post": { - "operationId": "BetaArchiveMemoryStore", - "summary": "Archive a memory store", + "operationId": "BetaUpdateCredential", + "summary": "Update Credential", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -12661,130 +14312,35 @@ } }, { - "name": "memory_store_id", + "name": "vault_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter memory_store_id" - } - ], - "responses": { - "200": { - "description": "Successful response (OK)", - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaManagedAgentsArchiveMemoryStoreResponse" } - } - } - }, - "400": { - "description": "Invalid argument - The client specified an invalid argument", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "401": { - "description": "Unauthenticated - The request does not have valid authentication credentials", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "403": { - "description": "Permission denied - The caller does not have permission to execute the specified operation", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "404": { - "description": "Not found - Some requested entity was not found", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "408": { - "description": "Deadline exceeded - The deadline expired before the operation could complete", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "412": { - "description": "Failed precondition - Operation was rejected because the system is not in required state", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "413": { - "description": "Out of range - Operation was attempted past the valid range", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "429": { - "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "431": { - "description": "Request header fields too large - Request metadata was too large", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "499": { - "description": "Cancelled - The operation was cancelled by the client", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "500": { - "description": "Internal - Internal server error", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "501": { - "description": "Unimplemented - The operation is not implemented or supported", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "503": { - "description": "Unavailable - The service is currently unavailable", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" }, - "504": { - "description": "Deadline exceeded - Upstream service did not respond in time", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { "type": "string", "x-stainless-cli-data-alias": "id" }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" } - } - } - }, - "/v1/user_profiles?beta=true": { - "post": { - "operationId": "BetaCreateUserProfile", - "summary": "Create User Profile", + ], "requestBody": { "required": true, "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaCreateUserProfileRequest" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsUpdateCredentialRequestBody" } + } } }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaUserProfile" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } } }, "400": { @@ -12877,30 +14433,11 @@ "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } } } - }, - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } - } - } - ] + } }, - "get": { - "operationId": "BetaListUserProfiles", - "summary": "List User Profiles", + "delete": { + "operationId": "BetaDeleteCredential", + "summary": "Delete Credential", "parameters": [ { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, @@ -12921,25 +14458,20 @@ } }, { - "name": "limit", - "in": "query", - "required": false, - "schema": { "type": "integer", "format": "int32" }, - "description": "Query parameter for limit" - }, - { - "name": "page", - "in": "query", - "required": false, + "name": "vault_id", + "in": "path", + "required": true, "schema": { "type": "string" }, - "description": "Query parameter for page" + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" }, { - "name": "order", - "in": "query", - "required": false, - "schema": { "$ref": "#/components/schemas/BetaUserProfileListOrder" }, - "description": "Query parameter for order" + "name": "credential_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" } ], "responses": { @@ -12947,7 +14479,7 @@ "description": "Successful response (OK)", "content": { "application/json": { - "schema": { "$ref": "#/components/schemas/BetaListUserProfilesResponse" } + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsDeletedCredential" } } } }, @@ -13044,12 +14576,11 @@ } } }, - "/v1/user_profiles/{user_profile_id}?beta=true": { - "get": { - "operationId": "BetaGetUserProfile", - "summary": "Get User Profile", + "/v1/vaults/{vault_id}/credentials/{credential_id}/archive?beta=true": { + "post": { + "operationId": "BetaArchiveCredential", + "summary": "Archive Credential", "parameters": [ - { "name": "x-api-key", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { "name": "anthropic-beta", @@ -13068,156 +14599,27 @@ } }, { - "name": "user_profile_id", + "name": "vault_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter user_profile_id", - "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" - } - ], - "responses": { - "200": { - "description": "Successful response (OK)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaUserProfile" } } - } - }, - "400": { - "description": "Invalid argument - The client specified an invalid argument", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "401": { - "description": "Unauthenticated - The request does not have valid authentication credentials", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "403": { - "description": "Permission denied - The caller does not have permission to execute the specified operation", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "404": { - "description": "Not found - Some requested entity was not found", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "408": { - "description": "Deadline exceeded - The deadline expired before the operation could complete", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "409": { - "description": "Aborted - The operation was aborted due to concurrency issue", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "412": { - "description": "Failed precondition - Operation was rejected because the system is not in required state", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "413": { - "description": "Out of range - Operation was attempted past the valid range", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "429": { - "description": "Resource exhausted - Some resource has been exhausted (rate limiting)", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "431": { - "description": "Request header fields too large - Request metadata was too large", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "499": { - "description": "Cancelled - The operation was cancelled by the client", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "500": { - "description": "Internal - Internal server error", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "501": { - "description": "Unimplemented - The operation is not implemented or supported", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "503": { - "description": "Unavailable - The service is currently unavailable", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - }, - "504": { - "description": "Deadline exceeded - Upstream service did not respond in time", - "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaErrorResponse" } } - } - } - } - }, - "post": { - "operationId": "BetaUpdateUserProfile", - "summary": "Update User Profile", - "parameters": [ - { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, - { - "name": "anthropic-beta", - "in": "header", - "required": false, - "schema": { - "type": "string", - "items": { "type": "string" }, - "x-stainless-override-schema": { - "x-stainless-param": "betas", - "x-stainless-extend-default": true, - "type": "array", - "description": "Optional header to specify the beta version(s) you want to use.", - "items": { "$ref": "#/components/schemas/AnthropicBeta" } - } - } + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" }, { - "name": "user_profile_id", + "name": "credential_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter user_profile_id", - "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" } ], - "requestBody": { - "required": true, - "content": { - "application/json": { - "schema": { "$ref": "#/components/schemas/BetaUpdateUserProfileRequestBody" } - } - } - }, "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaUserProfile" } } + "application/json": { "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredential" } } } }, "400": { @@ -13313,10 +14715,10 @@ } } }, - "/v1/user_profiles/{user_profile_id}/enrollment_url?beta=true": { + "/v1/vaults/{vault_id}/credentials/{credential_id}/mcp_oauth_validate?beta=true": { "post": { - "operationId": "BetaCreateEnrollmentUrl", - "summary": "Create Enrollment URL", + "operationId": "BetaValidateCredential", + "summary": "Validate Credential", "parameters": [ { "name": "anthropic-version", "in": "header", "required": false, "schema": { "type": "string" } }, { @@ -13336,19 +14738,29 @@ } }, { - "name": "user_profile_id", + "name": "vault_id", "in": "path", "required": true, "schema": { "type": "string" }, - "description": "Path parameter user_profile_id", - "example": "uprof_011CZkZCu8hGbp5mYRQgUmz9" + "description": "Path parameter vault_id", + "example": "vlt_011CZkZDLs7fYzm1hXNPeRjv" + }, + { + "name": "credential_id", + "in": "path", + "required": true, + "schema": { "type": "string" }, + "description": "Path parameter credential_id", + "example": "vcrd_011CZkZEMt8gZan2iYOQfSkw" } ], "responses": { "200": { "description": "Successful response (OK)", "content": { - "application/json": { "schema": { "$ref": "#/components/schemas/BetaEnrollmentUrl" } } + "application/json": { + "schema": { "$ref": "#/components/schemas/BetaManagedAgentsCredentialValidation" } + } } }, "400": { @@ -13925,7 +15337,7 @@ "additionalProperties": false, "properties": { "ttl": { - "description": "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`. See [prompt caching pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) for details.", + "description": "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.", "enum": ["5m", "1h"], "title": "Ttl", "type": "string", @@ -15079,7 +16491,7 @@ "type": "array" }, "messages": { - "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).\n\nNote 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.\n\nThere is a limit of 100,000 messages in a single request.", "items": { "$ref": "#/components/schemas/BetaInputMessage" }, "title": "Messages", "type": "array" @@ -15103,7 +16515,7 @@ { "type": "string" }, { "items": { "$ref": "#/components/schemas/BetaRequestTextBlock" }, "type": "array" } ], - "description": "System prompt.\n\nA 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://docs.claude.com/en/docs/system-prompts).", + "description": "System prompt.\n\nA 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).", "examples": [ [{ "text": "Today's date is 2024-06-01.", "type": "text" }], "Today's date is 2023-01-01." @@ -15113,7 +16525,7 @@ "thinking": { "$ref": "#/components/schemas/BetaThinkingConfigParam" }, "tool_choice": { "$ref": "#/components/schemas/BetaToolChoice" }, "tools": { - "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere 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)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.", "examples": [ { "description": "Get the current weather in a given location", @@ -15156,6 +16568,8 @@ { "$ref": "#/components/schemas/BetaWebSearchTool_20260209" }, { "$ref": "#/components/schemas/BetaWebFetchTool_20260209" }, { "$ref": "#/components/schemas/BetaWebFetchTool_20260309" }, + { "$ref": "#/components/schemas/BetaWebSearchTool_20260318" }, + { "$ref": "#/components/schemas/BetaWebFetchTool_20260318" }, { "$ref": "#/components/schemas/BetaAdvisorTool_20260301" }, { "$ref": "#/components/schemas/BetaToolSearchToolBM25_20251119" }, { "$ref": "#/components/schemas/BetaToolSearchToolRegex_20251119" }, @@ -15214,7 +16628,7 @@ "properties": { "model": { "$ref": "#/components/schemas/Model" }, "messages": { - "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).\n\nNote 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.\n\nThere is a limit of 100,000 messages in a single request.", "items": { "$ref": "#/components/schemas/BetaInputMessage" }, "title": "Messages", "type": "array" @@ -15274,7 +16688,7 @@ "title": "Inference Geo" }, "max_tokens": { - "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet to `0` to populate the [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.", + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet 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.\n\nDifferent models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.", "examples": [1024], "minimum": 0, "title": "Max Tokens", @@ -15301,7 +16715,7 @@ "description": "Deprecated: Use `output_config.format` instead. See [structured outputs](https://platform.claude.com/docs/en/build-with-claude/structured-outputs)\n\nA schema to specify Claude's output format in responses. This parameter will be removed in a future release." }, "service_tier": { - "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.", + "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.", "enum": ["auto", "standard_only"], "title": "Service Tier", "type": "string" @@ -15317,7 +16731,7 @@ "type": "array" }, "stream": { - "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/messages-streaming) for details.", + "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.", "title": "Stream", "type": "boolean", "example": false @@ -15327,7 +16741,7 @@ { "type": "string", "x-stainless-skip": ["go"] }, { "items": { "$ref": "#/components/schemas/BetaRequestTextBlock" }, "type": "array" } ], - "description": "System prompt.\n\nA 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://docs.claude.com/en/docs/system-prompts).", + "description": "System prompt.\n\nA 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).", "examples": [ [{ "text": "Today's date is 2024-06-01.", "type": "text" }], "Today's date is 2023-01-01." @@ -15347,7 +16761,7 @@ "thinking": { "$ref": "#/components/schemas/BetaThinkingConfigParam" }, "tool_choice": { "$ref": "#/components/schemas/BetaToolChoice" }, "tools": { - "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere 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)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.", "examples": [ { "description": "Get the current weather in a given location", @@ -15390,6 +16804,8 @@ { "$ref": "#/components/schemas/BetaWebSearchTool_20260209" }, { "$ref": "#/components/schemas/BetaWebFetchTool_20260209" }, { "$ref": "#/components/schemas/BetaWebFetchTool_20260309" }, + { "$ref": "#/components/schemas/BetaWebSearchTool_20260318" }, + { "$ref": "#/components/schemas/BetaWebFetchTool_20260318" }, { "$ref": "#/components/schemas/BetaAdvisorTool_20260301" }, { "$ref": "#/components/schemas/BetaToolSearchToolBM25_20251119" }, { "$ref": "#/components/schemas/BetaToolSearchToolRegex_20251119" }, @@ -15527,6 +16943,32 @@ "required": ["created_at", "description", "directory", "id", "name", "skill_id", "type", "version"], "title": "CreateSkillVersionResponse" }, + "BetaCreateTunnelCertificateRequestBody": { + "type": "object", + "additionalProperties": false, + "required": ["ca_certificate_pem"], + "properties": { + "ca_certificate_pem": { + "description": "PEM-encoded X.509 CA certificate. Must contain exactly one certificate and no private-key material. Maximum 8KB.", + "type": "string", + "maxLength": 8192 + } + } + }, + "BetaCreateTunnelRequest": { + "description": "Request parameters for creating a tunnel.", + "type": "object", + "additionalProperties": false, + "properties": { + "display_name": { + "description": "Optional human-readable name for the tunnel (1-255 characters).", + "type": "string", + "minLength": 1, + "maxLength": 255, + "nullable": true + } + } + }, "BetaCreateUserProfileRequest": { "type": "object", "additionalProperties": false, @@ -16634,6 +18076,42 @@ "required": ["data", "has_more", "next_page"], "title": "ListSkillsResponse" }, + "BetaListTunnelCertificatesResponse": { + "description": "The tunnel's certificates.", + "type": "object", + "additionalProperties": false, + "required": ["data", "next_page"], + "properties": { + "data": { + "description": "List of certificates, ordered by created_at descending.", + "type": "array", + "items": { "$ref": "#/components/schemas/BetaTunnelCertificate" } + }, + "next_page": { + "description": "Pagination cursor for the next page, or null if no more results.", + "type": "string", + "nullable": true + } + } + }, + "BetaListTunnelsResponse": { + "description": "A paginated list of tunnels.", + "type": "object", + "additionalProperties": false, + "required": ["data", "next_page"], + "properties": { + "data": { + "description": "List of tunnels, ordered by created_at descending.", + "type": "array", + "items": { "$ref": "#/components/schemas/BetaTunnel" } + }, + "next_page": { + "description": "Pagination cursor for the next page, or null if no more results.", + "type": "string", + "nullable": true + } + } + }, "BetaListUserProfilesResponse": { "type": "object", "additionalProperties": false, @@ -17375,6 +18853,46 @@ } ] }, + "BetaManagedAgentsAgentWithOverridesParams": { + "description": "Reference to an `agent` plus optional configuration overrides. Each provided field replaces the agent's value for the caller's use; the agent resource is unchanged.", + "type": "object", + "additionalProperties": false, + "required": ["type", "id"], + "properties": { + "type": { "type": "string", "enum": ["agent_with_overrides"] }, + "id": { "description": "The `agent` ID.", "type": "string", "minLength": 1, "maxLength": 128 }, + "version": { + "description": "The specific `agent` version to use. Omit to use the latest version.", + "type": "integer", + "format": "int32" + }, + "model": { + "description": "Replacement model. Accepts the model string, e.g. `claude-opus-4-6`, or a `model_config` object. Omit to use the agent's model.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsModelParams" }] + }, + "system": { + "description": "Replacement system prompt. Up to 100,000 characters. Set to null to clear the agent's system prompt; omit to preserve it.", + "type": "string", + "maxLength": 100000, + "nullable": true + }, + "tools": { + "description": "Replacement tool list. Full replacement: the provided array becomes the tool configuration. Send an empty array to clear; omit to preserve the agent's tools.", + "type": "array", + "items": { "$ref": "#/components/schemas/BetaManagedAgentsAgentToolParams" } + }, + "mcp_servers": { + "description": "Replacement MCP server list. Full replacement: the provided array becomes the MCP servers. Send an empty array to clear; omit to preserve the agent's servers.", + "type": "array", + "items": { "$ref": "#/components/schemas/BetaManagedAgentsMCPServerParams" } + }, + "skills": { + "description": "Replacement skill list. Full replacement: the provided array becomes the skills. Send an empty array to clear; omit to preserve the agent's skills.", + "type": "array", + "items": { "$ref": "#/components/schemas/BetaManagedAgentsSkillParams" } + } + } + }, "BetaManagedAgentsAlwaysAllowPolicy": { "description": "Tool calls are automatically approved without user confirmation.", "type": "object", @@ -17771,6 +19289,24 @@ }, "oneOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsMemoryStore" }] }, + "BetaManagedAgentsCreateSessionAgentUnionParams": { + "oneOf": [ + { "type": "string" }, + { + "oneOf": [ + { "$ref": "#/components/schemas/BetaManagedAgentsAgentParams" }, + { "$ref": "#/components/schemas/BetaManagedAgentsAgentWithOverridesParams" } + ], + "discriminator": { + "propertyName": "type", + "mapping": { + "agent": "#/components/schemas/BetaManagedAgentsAgentParams", + "agent_with_overrides": "#/components/schemas/BetaManagedAgentsAgentWithOverridesParams" + } + } + } + ] + }, "BetaManagedAgentsCreateSessionParams": { "description": "Request parameters for creating a `session`.", "type": "object", @@ -17779,7 +19315,7 @@ "properties": { "agent": { "description": "Agent identifier. Accepts the `agent` ID string, which pins the latest version for the session, or an `agent` object with both id and version specified.", - "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsAgentUnionParams" }], + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsCreateSessionAgentUnionParams" }], "examples": ["agent_011CZkYpogX7uDKUyvBTophP"] }, "environment_id": { @@ -18101,28 +19637,39 @@ "additionalProperties": false, "required": ["type", "expression", "timezone"], "properties": { - "type": { "type": "string", "enum": ["cron"] }, + "type": { "type": "string", "enum": ["cron"], "examples": ["cron"] }, "expression": { "description": "5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., \"0 9 * * 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).", "type": "string", "minLength": 1, - "maxLength": 256 + "maxLength": 256, + "examples": ["0 9 * * 1-5"] }, "timezone": { "description": "IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\").", "type": "string", - "minLength": 1 + "minLength": 1, + "examples": ["America/Los_Angeles"] }, "last_run_at": { "description": "Time the most recent scheduled run actually started. Null until one completes; preserved after the deployment is archived. Manual runs do not update this.", "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], - "nullable": true + "nullable": true, + "examples": ["2026-03-16T16:00:09Z"] }, "upcoming_runs_at": { "description": "Up to 5 timestamps of upcoming cron occurrences. Non-empty for active and paused deployments (reflects what the schedule would do if unpaused); empty once the deployment is archived (`archived_at` set). Each fire is offset by a small per-schedule jitter, so a run will actually start at or shortly after its listed time.", "type": "array", - "items": { "$ref": "#/components/schemas/BetaTimestamp" } + "items": { "$ref": "#/components/schemas/BetaTimestamp" }, + "examples": [["2026-03-17T16:00:00Z", "2026-03-18T16:00:00Z"]] } + }, + "example": { + "type": "cron", + "expression": "0 9 * * 1-5", + "timezone": "America/Los_Angeles", + "last_run_at": "2026-03-16T16:00:09Z", + "upcoming_runs_at": ["2026-03-17T16:00:00Z", "2026-03-18T16:00:00Z"] } }, "BetaManagedAgentsCronScheduleParams": { @@ -18131,19 +19678,22 @@ "additionalProperties": false, "required": ["type", "expression", "timezone"], "properties": { - "type": { "type": "string", "enum": ["cron"] }, + "type": { "type": "string", "enum": ["cron"], "examples": ["cron"] }, "expression": { "description": "5-field POSIX cron expression: minute hour day-of-month month day-of-week (e.g., \"0 9 * * 1-5\" for weekdays at 9am). Day-of-week is 0-7 where 0 and 7 both mean Sunday. Extended cron syntax - seconds or year fields, and the special characters L, W, #, and ? - is not supported, nor are predefined shortcuts (@daily).", "type": "string", "minLength": 1, - "maxLength": 256 + "maxLength": 256, + "examples": ["0 9 * * 1-5"] }, "timezone": { "description": "Required. IANA timezone identifier (e.g., \"America/Los_Angeles\", \"UTC\"). Validated against the IANA timezone database.", "type": "string", - "minLength": 1 + "minLength": 1, + "examples": ["America/Los_Angeles"] } - } + }, + "example": { "type": "cron", "expression": "0 9 * * 1-5", "timezone": "America/Los_Angeles" } }, "BetaManagedAgentsCustomSkill": { "description": "A resolved user-created custom skill.", @@ -18352,69 +19902,134 @@ "archived_at" ], "properties": { - "type": { "type": "string", "enum": ["deployment"] }, - "id": { "description": "Unique identifier for this deployment.", "type": "string" }, - "name": { "description": "Human-readable name.", "type": "string" }, + "type": { "type": "string", "enum": ["deployment"], "examples": ["deployment"] }, + "id": { + "description": "Unique identifier for this deployment.", + "type": "string", + "examples": ["depl_011CZkZcDH3vPqd7xnEfwTai"] + }, + "name": { + "description": "Human-readable name.", + "type": "string", + "examples": ["Daily order report"] + }, "description": { "description": "Description of what the deployment does.", "type": "string", - "nullable": true + "nullable": true, + "examples": ["Compiles yesterday's orders into a report every weekday morning."] }, "agent": { "description": "Reference to the agent this deployment runs, resolved to a concrete version.", - "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsAgentReference" }] + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsAgentReference" }], + "examples": [{ "type": "agent", "id": "agent_011CZkYpogX7uDKUyvBTophP", "version": 1 }] }, "environment_id": { "description": "ID of the `environment` where sessions run.", - "type": "string" + "type": "string", + "examples": ["env_011CZkZ9X2dpNyB7HsEFoRfW"] }, "vault_ids": { "description": "Vault IDs supplying stored credentials for sessions created from this deployment.", "type": "array", - "items": { "type": "string" } + "items": { "type": "string" }, + "examples": [["vlt_011CZkZDLs7fYzm1hXNPeRjv"]] }, "initial_events": { "description": "Events sent to each session immediately after creation.", "type": "array", - "items": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentInitialEvent" } + "items": { "$ref": "#/components/schemas/BetaManagedAgentsDeploymentInitialEvent" }, + "examples": [ + [ + { + "type": "user.message", + "content": [{ "type": "text", "text": "Compile yesterday's orders into report.md." }] + } + ] + ] }, "resources": { "description": "Resources attached to sessions created from this deployment. Echoes the input minus write-only credentials.", "type": "array", - "items": { "$ref": "#/components/schemas/BetaManagedAgentsSessionResourceConfig" } + "items": { "$ref": "#/components/schemas/BetaManagedAgentsSessionResourceConfig" }, + "examples": [[]] }, "metadata": { "description": "Arbitrary key-value metadata. Maximum 16 pairs.", "type": "object", - "additionalProperties": { "type": "string" } + "additionalProperties": { "type": "string" }, + "examples": [{}] }, "schedule": { "description": "Recurring cron schedule. Presence enables scheduled execution; null means manual-only. Includes computed timestamps (next fire times, last run) on the cron variant.", "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsSchedule" }], - "nullable": true + "nullable": true, + "examples": [ + { + "type": "cron", + "expression": "0 9 * * 1-5", + "timezone": "America/Los_Angeles", + "last_run_at": "2026-03-16T16:00:09Z", + "upcoming_runs_at": ["2026-03-17T16:00:00Z", "2026-03-18T16:00:00Z"] + } + ] }, "status": { "description": "Computed status of the deployment: `active` or `paused`. Archived deployments report `active` with `archived_at` set.", - "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsDeploymentStatus" }] + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsDeploymentStatus" }], + "examples": ["active"] }, "paused_reason": { "description": "Why the deployment is paused. Non-null exactly when status is paused; null otherwise.", "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsDeploymentPausedReason" }], - "nullable": true + "nullable": true, + "examples": [null] }, "created_at": { "description": "Time the deployment was created.", - "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }] + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], + "examples": ["2026-03-15T10:00:00Z"] }, "updated_at": { "description": "Time the deployment was last updated.", - "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }] + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], + "examples": ["2026-03-15T10:00:00Z"] }, "archived_at": { "description": "Time the deployment was archived. Null if not archived.", "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], - "nullable": true + "nullable": true, + "examples": [null] } + }, + "example": { + "type": "deployment", + "id": "depl_011CZkZcDH3vPqd7xnEfwTai", + "name": "Daily order report", + "description": "Compiles yesterday's orders into a report every weekday morning.", + "agent": { "type": "agent", "id": "agent_011CZkYpogX7uDKUyvBTophP", "version": 1 }, + "environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "vault_ids": ["vlt_011CZkZDLs7fYzm1hXNPeRjv"], + "initial_events": [ + { + "type": "user.message", + "content": [{ "type": "text", "text": "Compile yesterday's orders into report.md." }] + } + ], + "resources": [], + "metadata": {}, + "schedule": { + "type": "cron", + "expression": "0 9 * * 1-5", + "timezone": "America/Los_Angeles", + "last_run_at": "2026-03-16T16:00:09Z", + "upcoming_runs_at": ["2026-03-17T16:00:00Z", "2026-03-18T16:00:00Z"] + }, + "status": "active", + "paused_reason": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null } }, "BetaManagedAgentsDeploymentInitialEvent": { @@ -18686,13 +20301,17 @@ "description": "Environment variable credential details. The secret value is never returned.", "type": "object", "additionalProperties": false, - "required": ["type", "secret_name", "networking"], + "required": ["type", "secret_name", "networking", "injection_location"], "properties": { "type": { "type": "string", "enum": ["environment_variable"] }, "secret_name": { "description": "Name of the environment variable.", "type": "string" }, "networking": { "description": "Outbound hosts the secret value is substituted on.", "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsCredentialNetworkingResponse" }] + }, + "injection_location": { + "description": "Where in the outbound request the secret value is substituted.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsInjectionLocationResponse" }] } } }, @@ -18718,6 +20337,10 @@ "networking": { "description": "Outbound hosts the secret value is substituted on.", "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsCredentialNetworkingParams" }] + }, + "injection_location": { + "description": "Where in the outbound request the secret value may be substituted.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsInjectionLocationParams" }] } } }, @@ -18739,6 +20362,10 @@ "description": "Updated networking scope. Full replacement.", "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsCredentialNetworkingParams" }], "nullable": true + }, + "injection_location": { + "description": "Updated injection location.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsInjectionLocationUpdateParams" }] } } }, @@ -18767,6 +20394,53 @@ "error": { "$ref": "#/components/schemas/BetaManagedAgentsError" } } }, + "BetaManagedAgentsEventDeltaEvent": { + "description": "An incremental update to an event that is still being streamed. Deltas are best-effort and may stop early; when the buffered event with id == event_id is produced it carries the complete content. A model request that ends early (an error or interrupt) produces no buffered event — its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.", + "type": "object", + "additionalProperties": false, + "required": ["type", "event_id", "delta"], + "properties": { + "type": { "type": "string", "enum": ["event_delta"] }, + "event_id": { + "description": "The id of the event being previewed. Matches event.id on the corresponding event_start and the buffered event that reconciles the preview.", + "type": "string" + }, + "delta": { + "description": "One fragment of the previewed event. The delta type is named for the previewed event's field it streams into: agent.message events stream content_delta fragments, each a partial element of the content array.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsEventDeltaEvent_Delta" }] + } + } + }, + "BetaManagedAgentsEventDeltaEvent_ContentDelta": { + "type": "object", + "additionalProperties": false, + "required": ["type", "content"], + "properties": { + "type": { "type": "string", "enum": ["content_delta"] }, + "index": { + "description": "Which entry in the previewed event's content array this fragment lands in. Insert content as that entry when the index is new; append to the existing entry otherwise.", + "type": "integer", + "format": "uint32" + }, + "content": { + "description": "A partial element of the content array at index, typed like the element itself — the same shape the buffered agent.message carries in content.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsTextBlock" }] + } + } + }, + "BetaManagedAgentsEventDeltaEvent_Delta": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { "content_delta": "#/components/schemas/BetaManagedAgentsEventDeltaEvent_ContentDelta" } + }, + "oneOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsEventDeltaEvent_ContentDelta" }] + }, + "BetaManagedAgentsEventDeltaType": { + "type": "string", + "description": "EventDeltaType enum", + "enum": ["agent.message", "agent.thinking"] + }, "BetaManagedAgentsEventParams": { "description": "Union type for event parameters that can be sent to a session.", "type": "object", @@ -18792,6 +20466,57 @@ { "$ref": "#/components/schemas/BetaManagedAgentsSystemMessageEventParams" } ] }, + "BetaManagedAgentsEventStartEvent": { + "description": "Opens a preview of a buffered event. Carries the previewed event's type and id only. Followed by zero or more event_delta events with the same event id, normally concluded by the buffered event carrying that id. If the producing model request ends without that event (an error or interrupt mid-stream), its terminal span.model_request_end closes the preview. Only sent on stream connections that opt in via event_deltas; never appears in event history.", + "type": "object", + "additionalProperties": false, + "required": ["type", "event"], + "properties": { + "type": { "type": "string", "enum": ["event_start"] }, + "event": { + "description": "The previewed event's type and id. The event type determines which delta types the preview's event_delta events carry: agent.message events stream content_delta fragments; agent.thinking previews are start-only — no deltas follow, and the buffered agent.thinking with the same id concludes them.", + "allOf": [{ "$ref": "#/components/schemas/BetaManagedAgentsEventStartEvent_Event" }] + } + } + }, + "BetaManagedAgentsEventStartEvent_AgentMessagePreview": { + "type": "object", + "additionalProperties": false, + "required": ["type", "id"], + "properties": { + "type": { "type": "string", "enum": ["agent.message"] }, + "id": { + "description": "The id the buffered agent.message will carry if it is emitted. Matches the event_id on this preview's event_delta events.", + "type": "string" + } + } + }, + "BetaManagedAgentsEventStartEvent_AgentThinkingPreview": { + "type": "object", + "additionalProperties": false, + "required": ["type", "id"], + "properties": { + "type": { "type": "string", "enum": ["agent.thinking"] }, + "id": { + "description": "The id the buffered agent.thinking will carry if it is emitted. Start-only — no event_delta events follow.", + "type": "string" + } + } + }, + "BetaManagedAgentsEventStartEvent_Event": { + "type": "object", + "discriminator": { + "propertyName": "type", + "mapping": { + "agent.message": "#/components/schemas/BetaManagedAgentsEventStartEvent_AgentMessagePreview", + "agent.thinking": "#/components/schemas/BetaManagedAgentsEventStartEvent_AgentThinkingPreview" + } + }, + "oneOf": [ + { "$ref": "#/components/schemas/BetaManagedAgentsEventStartEvent_AgentMessagePreview" }, + { "$ref": "#/components/schemas/BetaManagedAgentsEventStartEvent_AgentThinkingPreview" } + ] + }, "BetaManagedAgentsFileDocumentSource": { "description": "Document referenced by file ID.", "type": "object", @@ -19068,6 +20793,52 @@ { "$ref": "#/components/schemas/BetaManagedAgentsFileImageSource" } ] }, + "BetaManagedAgentsInjectionLocationParams": { + "description": "Where in the outbound request the secret value may be substituted.", + "type": "object", + "additionalProperties": false, + "properties": { + "header": { + "description": "Substitute when the placeholder appears in a request header value.", + "type": "boolean" + }, + "body": { + "description": "Substitute when the placeholder appears in the request body.", + "type": "boolean" + } + } + }, + "BetaManagedAgentsInjectionLocationResponse": { + "description": "Where in the outbound request the secret value is substituted.", + "type": "object", + "additionalProperties": false, + "required": ["header", "body"], + "properties": { + "header": { + "description": "Whether the placeholder is substituted in request header values.", + "type": "boolean" + }, + "body": { + "description": "Whether the placeholder is substituted in the request body.", + "type": "boolean" + } + } + }, + "BetaManagedAgentsInjectionLocationUpdateParams": { + "description": "Updated injection location.", + "type": "object", + "additionalProperties": false, + "properties": { + "header": { + "description": "Substitute when the placeholder appears in a request header value.", + "type": "boolean" + }, + "body": { + "description": "Substitute when the placeholder appears in the request body.", + "type": "boolean" + } + } + }, "BetaManagedAgentsInputEvent": { "description": "Union type for events that can be sent to a session.", "type": "object", @@ -19246,14 +21017,82 @@ "description": "List of deployments.", "x-stainless-pagination-property": { "purpose": "items" }, "type": "array", - "items": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" } + "items": { "$ref": "#/components/schemas/BetaManagedAgentsDeployment" }, + "examples": [ + [ + { + "type": "deployment", + "id": "depl_011CZkZcDH3vPqd7xnEfwTai", + "name": "Daily order report", + "description": "Compiles yesterday's orders into a report every weekday morning.", + "agent": { "type": "agent", "id": "agent_011CZkYpogX7uDKUyvBTophP", "version": 1 }, + "environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "vault_ids": ["vlt_011CZkZDLs7fYzm1hXNPeRjv"], + "initial_events": [ + { + "type": "user.message", + "content": [{ "type": "text", "text": "Compile yesterday's orders into report.md." }] + } + ], + "resources": [], + "metadata": {}, + "schedule": { + "type": "cron", + "expression": "0 9 * * 1-5", + "timezone": "America/Los_Angeles", + "last_run_at": "2026-03-16T16:00:09Z", + "upcoming_runs_at": ["2026-03-17T16:00:00Z", "2026-03-18T16:00:00Z"] + }, + "status": "active", + "paused_reason": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null + } + ] + ] }, "next_page": { "description": "Opaque cursor for the next page. Null when no more results.", "x-stainless-pagination-property": { "purpose": "next_cursor_field" }, "type": "string", - "nullable": true + "nullable": true, + "examples": ["page_MjAyNS0wNS0xNFQwMDowMDowMFo="] } + }, + "example": { + "data": [ + { + "type": "deployment", + "id": "depl_011CZkZcDH3vPqd7xnEfwTai", + "name": "Daily order report", + "description": "Compiles yesterday's orders into a report every weekday morning.", + "agent": { "type": "agent", "id": "agent_011CZkYpogX7uDKUyvBTophP", "version": 1 }, + "environment_id": "env_011CZkZ9X2dpNyB7HsEFoRfW", + "vault_ids": ["vlt_011CZkZDLs7fYzm1hXNPeRjv"], + "initial_events": [ + { + "type": "user.message", + "content": [{ "type": "text", "text": "Compile yesterday's orders into report.md." }] + } + ], + "resources": [], + "metadata": {}, + "schedule": { + "type": "cron", + "expression": "0 9 * * 1-5", + "timezone": "America/Los_Angeles", + "last_run_at": "2026-03-16T16:00:09Z", + "upcoming_runs_at": ["2026-03-17T16:00:00Z", "2026-03-18T16:00:00Z"] + }, + "status": "active", + "paused_reason": null, + "created_at": "2026-03-15T10:00:00Z", + "updated_at": "2026-03-15T10:00:00Z", + "archived_at": null + } + ], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" } }, "BetaManagedAgentsListMemoriesResult": { @@ -19565,9 +21404,19 @@ "type": "string", "nullable": true, "examples": ["page_MjAyNS0wNS0xNFQwMDowMDowMFo="] + }, + "prev_page": { + "description": "Opaque cursor for the previous page. Null when on the first page. Pass as the `page` parameter to navigate backward.", + "type": "string", + "nullable": true, + "examples": ["page_MjAyNS0wNS0xM1QwMDowMDowMFo="] } }, - "example": { "data": [], "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=" } + "example": { + "data": [], + "next_page": "page_MjAyNS0wNS0xNFQwMDowMDowMFo=", + "prev_page": "page_MjAyNS0wNS0xM1QwMDowMDowMFo=" + } }, "BetaManagedAgentsListVaultsResponse": { "description": "Response containing a paginated list of vaults.", @@ -22508,6 +24357,8 @@ "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEvent", "session.thread_status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent", "session.updated": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent", + "event_start": "#/components/schemas/BetaManagedAgentsEventStartEvent", + "event_delta": "#/components/schemas/BetaManagedAgentsEventDeltaEvent", "system.message": "#/components/schemas/BetaManagedAgentsSystemMessageEvent" } }, @@ -22545,6 +24396,8 @@ { "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" }, { "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent" }, { "$ref": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" }, + { "$ref": "#/components/schemas/BetaManagedAgentsEventStartEvent" }, + { "$ref": "#/components/schemas/BetaManagedAgentsEventDeltaEvent" }, { "$ref": "#/components/schemas/BetaManagedAgentsSystemMessageEvent" } ] }, @@ -22587,6 +24440,8 @@ "user.tool_result": "#/components/schemas/BetaManagedAgentsUserToolResultEvent", "session.thread_status_rescheduled": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent", "session.updated": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent", + "event_start": "#/components/schemas/BetaManagedAgentsEventStartEvent", + "event_delta": "#/components/schemas/BetaManagedAgentsEventDeltaEvent", "system.message": "#/components/schemas/BetaManagedAgentsSystemMessageEvent" } }, @@ -22624,6 +24479,8 @@ { "$ref": "#/components/schemas/BetaManagedAgentsUserToolResultEvent" }, { "$ref": "#/components/schemas/BetaManagedAgentsSessionThreadStatusRescheduledEvent" }, { "$ref": "#/components/schemas/BetaManagedAgentsSessionUpdatedEvent" }, + { "$ref": "#/components/schemas/BetaManagedAgentsEventStartEvent" }, + { "$ref": "#/components/schemas/BetaManagedAgentsEventDeltaEvent" }, { "$ref": "#/components/schemas/BetaManagedAgentsSystemMessageEvent" } ] }, @@ -23959,7 +25816,7 @@ }, "params": { "$ref": "#/components/schemas/BetaCreateMessageParams", - "description": "Messages API creation parameters for the individual request.\n\nSee the [Messages API reference](https://docs.claude.com/en/api/messages) for full documentation on available parameters." + "description": "Messages API creation parameters for the individual request.\n\nSee the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters." } }, "required": ["custom_id", "params"], @@ -27140,6 +28997,18 @@ "title": "ResponseWebSearchToolResultError", "type": "object" }, + "BetaRotateTunnelTokenRequestBody": { + "type": "object", + "additionalProperties": false, + "properties": { + "reason": { + "description": "Optional free-text reason for the rotation, recorded for audit.", + "type": "string", + "maxLength": 1024, + "nullable": true + } + } + }, "BetaSelfHostedConfig": { "properties": { "type": { @@ -27203,6 +29072,11 @@ "title": "Metadata", "description": "User-provided metadata key-value pairs associated with this work item" }, + "secret": { + "anyOf": [{ "type": "string" }, { "type": "null" }], + "title": "Secret", + "description": "Credential payload used by the environment worker to execute this work item. May be populated when polling for work; null on all other retrieval paths." + }, "started_at": { "anyOf": [{ "type": "string" }, { "type": "null" }], "title": "Started At", @@ -27241,6 +29115,7 @@ "id", "latest_heartbeat_at", "metadata", + "secret", "started_at", "state", "stop_requested_at", @@ -27847,7 +29722,7 @@ "additionalProperties": false, "properties": { "budget_tokens": { - "description": "Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "description": "Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.", "minimum": 1024, "title": "Budget Tokens", "type": "integer" @@ -28206,6 +30081,89 @@ "title": "ToolUsesTrigger", "type": "object" }, + "BetaTunnel": { + "description": "An MCP tunnel.", + "type": "object", + "additionalProperties": false, + "required": ["type", "id", "domain", "display_name", "created_at", "archived_at"], + "properties": { + "type": { "type": "string", "enum": ["tunnel"] }, + "id": { + "description": "Unique identifier for the tunnel, prefixed with `tnl_`.", + "type": "string" + }, + "domain": { + "description": "Anthropic-assigned hostname for the tunnel. MCP server URLs whose host is a subdomain of this value are routed through the tunnel. Globally unique and never reused, even after the tunnel is archived.", + "type": "string" + }, + "display_name": { + "description": "Human-readable name for the tunnel (1-255 characters). Null if unset.", + "type": "string", + "nullable": true + }, + "created_at": { + "description": "RFC 3339 datetime string indicating when the tunnel was created.", + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }] + }, + "archived_at": { + "description": "RFC 3339 datetime string indicating when the tunnel was archived. Null if it is not archived.", + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], + "nullable": true + } + } + }, + "BetaTunnelCertificate": { + "description": "A CA certificate attached to a tunnel.", + "type": "object", + "additionalProperties": false, + "required": ["type", "id", "tunnel_id", "fingerprint", "expires_at", "created_at", "archived_at"], + "properties": { + "type": { "type": "string", "enum": ["tunnel_certificate"] }, + "id": { + "description": "Unique identifier for the certificate, prefixed with `tcrt_`.", + "type": "string" + }, + "tunnel_id": { + "description": "ID of the tunnel the certificate is registered against.", + "type": "string" + }, + "fingerprint": { + "description": "Lowercase hex SHA-256 fingerprint of the certificate's DER encoding.", + "type": "string" + }, + "expires_at": { + "description": "RFC 3339 datetime string indicating when the certificate expires, or `null` if it does not expire.", + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], + "nullable": true + }, + "created_at": { + "description": "RFC 3339 datetime string indicating when the certificate was registered.", + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }] + }, + "archived_at": { + "description": "RFC 3339 datetime string indicating when the certificate was archived. Null if it is still in the trusted set.", + "allOf": [{ "$ref": "#/components/schemas/BetaTimestamp" }], + "nullable": true + } + } + }, + "BetaTunnelToken": { + "description": "A tunnel's connector token.", + "type": "object", + "additionalProperties": false, + "required": ["type", "id", "tunnel_token"], + "properties": { + "type": { "type": "string", "enum": ["tunnel_token"] }, + "id": { + "description": "Stable identifier for the current token value. Changes when the token is rotated.", + "type": "string" + }, + "tunnel_token": { + "description": "The connector token used to run the tunnel. Treat as a credential.", + "type": "string" + } + } + }, "BetaURLImageSource": { "additionalProperties": false, "properties": { @@ -28703,6 +30661,85 @@ "title": "WebFetchTool_20260309", "type": "object" }, + "BetaWebFetchTool_20260318": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { "$ref": "#/components/schemas/BetaAllowedCaller" }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" }, + "propertyName": "type" + }, + "oneOf": [{ "$ref": "#/components/schemas/BetaCacheControlEphemeral" }] + }, + { "type": "null" } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [{ "$ref": "#/components/schemas/BetaRequestCitationsConfig" }, { "type": "null" }], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [{ "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" }], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [{ "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" }], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "response_inclusion": { + "description": "How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.", + "enum": ["full", "excluded"], + "title": "Response Inclusion", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { "const": "web_fetch_20260318", "title": "Type", "type": "string" }, + "use_cache": { + "description": "Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.", + "title": "Use Cache", + "type": "boolean" + } + }, + "required": ["name", "type"], + "title": "WebFetchTool_20260318", + "type": "object" + }, "BetaWebSearchToolResultErrorCode": { "enum": [ "invalid_tool_input", @@ -28841,6 +30878,262 @@ "title": "WebSearchTool_20260209", "type": "object" }, + "BetaWebSearchTool_20260318": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { "$ref": "#/components/schemas/BetaAllowedCaller" }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { "ephemeral": "#/components/schemas/BetaCacheControlEphemeral" }, + "propertyName": "type" + }, + "oneOf": [{ "$ref": "#/components/schemas/BetaCacheControlEphemeral" }] + }, + { "type": "null" } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [{ "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" }], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_search", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "response_inclusion": { + "description": "How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.", + "enum": ["full", "excluded"], + "title": "Response Inclusion", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { "const": "web_search_20260318", "title": "Type", "type": "string" }, + "user_location": { + "anyOf": [{ "$ref": "#/components/schemas/BetaUserLocation" }, { "type": "null" }], + "description": "Parameters for the user's location. Used to provide more relevant search results." + } + }, + "required": ["name", "type"], + "title": "WebSearchTool_20260318", + "type": "object" + }, + "BetaWebhookAgentArchivedEventData": { + "type": "object", + "title": "BetaWebhookAgentArchivedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "agent.archived" }, + "id": { "type": "string", "description": "ID of the agent that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookAgentCreatedEventData": { + "type": "object", + "title": "BetaWebhookAgentCreatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "agent.created" }, + "id": { "type": "string", "description": "ID of the agent that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookAgentDeletedEventData": { + "type": "object", + "title": "BetaWebhookAgentDeletedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "agent.deleted" }, + "id": { "type": "string", "description": "ID of the agent that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookAgentUpdatedEventData": { + "type": "object", + "title": "BetaWebhookAgentUpdatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "agent.updated" }, + "id": { "type": "string", "description": "ID of the agent that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentArchivedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentArchivedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment.archived" }, + "id": { "type": "string", "description": "ID of the deployment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentCreatedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentCreatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment.created" }, + "id": { "type": "string", "description": "ID of the deployment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentDeletedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentDeletedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment.deleted" }, + "id": { "type": "string", "description": "ID of the deployment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentPausedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentPausedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment.paused" }, + "id": { "type": "string", "description": "ID of the deployment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentRunFailedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentRunFailedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment_run.failed" }, + "id": { "type": "string", "description": "ID of the deployment run that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentRunStartedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentRunStartedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment_run.started" }, + "id": { "type": "string", "description": "ID of the deployment run that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentRunSucceededEventData": { + "type": "object", + "title": "BetaWebhookDeploymentRunSucceededEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment_run.succeeded" }, + "id": { "type": "string", "description": "ID of the deployment run that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentUnpausedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentUnpausedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment.unpaused" }, + "id": { "type": "string", "description": "ID of the deployment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookDeploymentUpdatedEventData": { + "type": "object", + "title": "BetaWebhookDeploymentUpdatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "deployment.updated" }, + "id": { "type": "string", "description": "ID of the deployment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookEnvironmentArchivedEventData": { + "type": "object", + "title": "BetaWebhookEnvironmentArchivedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "environment.archived" }, + "id": { "type": "string", "description": "ID of the environment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookEnvironmentCreatedEventData": { + "type": "object", + "title": "BetaWebhookEnvironmentCreatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "environment.created" }, + "id": { "type": "string", "description": "ID of the environment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookEnvironmentDeletedEventData": { + "type": "object", + "title": "BetaWebhookEnvironmentDeletedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "environment.deleted" }, + "id": { "type": "string", "description": "ID of the environment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookEnvironmentUpdatedEventData": { + "type": "object", + "title": "BetaWebhookEnvironmentUpdatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "environment.updated" }, + "id": { "type": "string", "description": "ID of the environment that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, "BetaWebhookEvent": { "type": "object", "title": "BetaWebhookEvent", @@ -28912,7 +31205,27 @@ { "$ref": "#/components/schemas/BetaWebhookVaultCredentialArchivedEventData" }, { "$ref": "#/components/schemas/BetaWebhookVaultCredentialDeletedEventData" }, { "$ref": "#/components/schemas/BetaWebhookVaultCredentialRefreshFailedEventData" }, - { "$ref": "#/components/schemas/BetaWebhookSessionUpdatedEventData" } + { "$ref": "#/components/schemas/BetaWebhookSessionUpdatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookAgentCreatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookAgentArchivedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookAgentDeletedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentPausedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentRunFailedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentCreatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentUpdatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentUnpausedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookAgentUpdatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentArchivedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentRunStartedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentDeletedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookDeploymentRunSucceededEventData" }, + { "$ref": "#/components/schemas/BetaWebhookEnvironmentCreatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookEnvironmentUpdatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookEnvironmentArchivedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookEnvironmentDeletedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookMemoryStoreCreatedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookMemoryStoreArchivedEventData" }, + { "$ref": "#/components/schemas/BetaWebhookMemoryStoreDeletedEventData" } ], "discriminator": { "propertyName": "type", @@ -28939,8 +31252,61 @@ "vault_credential.archived": "#/components/schemas/BetaWebhookVaultCredentialArchivedEventData", "vault_credential.deleted": "#/components/schemas/BetaWebhookVaultCredentialDeletedEventData", "vault_credential.refresh_failed": "#/components/schemas/BetaWebhookVaultCredentialRefreshFailedEventData", - "session.updated": "#/components/schemas/BetaWebhookSessionUpdatedEventData" - } + "session.updated": "#/components/schemas/BetaWebhookSessionUpdatedEventData", + "agent.created": "#/components/schemas/BetaWebhookAgentCreatedEventData", + "agent.archived": "#/components/schemas/BetaWebhookAgentArchivedEventData", + "agent.deleted": "#/components/schemas/BetaWebhookAgentDeletedEventData", + "deployment.paused": "#/components/schemas/BetaWebhookDeploymentPausedEventData", + "deployment_run.failed": "#/components/schemas/BetaWebhookDeploymentRunFailedEventData", + "deployment.created": "#/components/schemas/BetaWebhookDeploymentCreatedEventData", + "deployment.updated": "#/components/schemas/BetaWebhookDeploymentUpdatedEventData", + "deployment.unpaused": "#/components/schemas/BetaWebhookDeploymentUnpausedEventData", + "agent.updated": "#/components/schemas/BetaWebhookAgentUpdatedEventData", + "deployment.archived": "#/components/schemas/BetaWebhookDeploymentArchivedEventData", + "deployment_run.started": "#/components/schemas/BetaWebhookDeploymentRunStartedEventData", + "deployment.deleted": "#/components/schemas/BetaWebhookDeploymentDeletedEventData", + "deployment_run.succeeded": "#/components/schemas/BetaWebhookDeploymentRunSucceededEventData", + "environment.created": "#/components/schemas/BetaWebhookEnvironmentCreatedEventData", + "environment.updated": "#/components/schemas/BetaWebhookEnvironmentUpdatedEventData", + "environment.archived": "#/components/schemas/BetaWebhookEnvironmentArchivedEventData", + "environment.deleted": "#/components/schemas/BetaWebhookEnvironmentDeletedEventData", + "memory_store.created": "#/components/schemas/BetaWebhookMemoryStoreCreatedEventData", + "memory_store.archived": "#/components/schemas/BetaWebhookMemoryStoreArchivedEventData", + "memory_store.deleted": "#/components/schemas/BetaWebhookMemoryStoreDeletedEventData" + } + } + }, + "BetaWebhookMemoryStoreArchivedEventData": { + "type": "object", + "title": "BetaWebhookMemoryStoreArchivedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "memory_store.archived" }, + "id": { "type": "string", "description": "ID of the memory store that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookMemoryStoreCreatedEventData": { + "type": "object", + "title": "BetaWebhookMemoryStoreCreatedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "memory_store.created" }, + "id": { "type": "string", "description": "ID of the memory store that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } + } + }, + "BetaWebhookMemoryStoreDeletedEventData": { + "type": "object", + "title": "BetaWebhookMemoryStoreDeletedEventData", + "required": ["type", "id", "organization_id", "workspace_id"], + "properties": { + "type": { "type": "string", "const": "memory_store.deleted" }, + "id": { "type": "string", "description": "ID of the memory store that triggered the event." }, + "organization_id": { "type": "string" }, + "workspace_id": { "type": "string" } } }, "BetaWebhookSessionArchivedEventData": { @@ -29298,7 +31664,7 @@ "additionalProperties": false, "properties": { "ttl": { - "description": "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`. See [prompt caching pricing](https://docs.claude.com/en/docs/build-with-claude/prompt-caching) for details.", + "description": "The time-to-live for the cache control breakpoint.\n\nThis may be one the following values:\n- `5m`: 5 minutes\n- `1h`: 1 hour\n\nDefaults to `5m`. See [prompt caching pricing](https://platform.claude.com/docs/en/build-with-claude/prompt-caching) for details.", "enum": ["5m", "1h"], "title": "Ttl", "type": "string", @@ -29581,7 +31947,7 @@ "properties": { "model": { "$ref": "#/components/schemas/Model" }, "prompt": { - "description": "The prompt that you want Claude to complete.\n\nFor proper response generation you will need to format your prompt using alternating `\\n\\nHuman:` and `\\n\\nAssistant:` conversational turns. For example:\n\n```\n\"\\n\\nHuman: {userQuestion}\\n\\nAssistant:\"\n```\n\nSee [prompt validation](https://docs.claude.com/en/api/prompt-validation) and our guide to [prompt design](https://docs.claude.com/en/docs/intro-to-prompting) for more details.", + "description": "The prompt that you want Claude to complete.\n\nFor proper response generation you will need to format your prompt using alternating `\\n\\nHuman:` and `\\n\\nAssistant:` conversational turns. For example:\n\n```\n\"\\n\\nHuman: {userQuestion}\\n\\nAssistant:\"\n```\n\nSee [prompt validation](https://platform.claude.com/docs/en/build-with-claude/working-with-messages) and our guide to [prompt design](https://platform.claude.com/docs/en/build-with-claude/prompt-engineering/overview) for more details.", "examples": ["\n\nHuman: Hello, world!\n\nAssistant:"], "minLength": 1, "title": "Prompt", @@ -29634,7 +32000,7 @@ "description": "An object describing metadata about the request." }, "stream": { - "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/streaming) for details.", + "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.", "title": "Stream", "type": "boolean" } @@ -29880,7 +32246,7 @@ "title": "Cache Control" }, "messages": { - "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).\n\nNote 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.\n\nThere is a limit of 100,000 messages in a single request.", "items": { "$ref": "#/components/schemas/InputMessage" }, "title": "Messages", "type": "array" @@ -29895,7 +32261,7 @@ { "type": "string" }, { "items": { "$ref": "#/components/schemas/RequestTextBlock" }, "type": "array" } ], - "description": "System prompt.\n\nA 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://docs.claude.com/en/docs/system-prompts).", + "description": "System prompt.\n\nA 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).", "examples": [ [{ "text": "Today's date is 2024-06-01.", "type": "text" }], "Today's date is 2023-01-01." @@ -29905,7 +32271,7 @@ "thinking": { "$ref": "#/components/schemas/ThinkingConfigParam" }, "tool_choice": { "$ref": "#/components/schemas/ToolChoice" }, "tools": { - "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere 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)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.", "examples": [ { "description": "Get the current weather in a given location", @@ -29943,6 +32309,8 @@ { "$ref": "#/components/schemas/WebSearchTool_20260209" }, { "$ref": "#/components/schemas/WebFetchTool_20260209" }, { "$ref": "#/components/schemas/WebFetchTool_20260309" }, + { "$ref": "#/components/schemas/WebSearchTool_20260318" }, + { "$ref": "#/components/schemas/WebFetchTool_20260318" }, { "$ref": "#/components/schemas/ToolSearchToolBM25_20251119" }, { "$ref": "#/components/schemas/ToolSearchToolRegex_20251119" } ] @@ -29995,7 +32363,7 @@ "properties": { "model": { "$ref": "#/components/schemas/Model" }, "messages": { - "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).\n\nNote 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.\n\nThere is a limit of 100,000 messages in a single request.", "items": { "$ref": "#/components/schemas/InputMessage" }, "title": "Messages", "type": "array" @@ -30025,7 +32393,7 @@ "title": "Inference Geo" }, "max_tokens": { - "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet to `0` to populate the [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.", + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet 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.\n\nDifferent models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.", "examples": [1024], "minimum": 0, "title": "Max Tokens", @@ -30040,7 +32408,7 @@ "description": "Configuration options for the model's output, such as the output format." }, "service_tier": { - "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.", + "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.", "enum": ["auto", "standard_only"], "title": "Service Tier", "type": "string" @@ -30052,7 +32420,7 @@ "type": "array" }, "stream": { - "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://docs.claude.com/en/api/messages-streaming) for details.", + "description": "Whether to incrementally stream the response using server-sent events.\n\nSee [streaming](https://platform.claude.com/docs/en/build-with-claude/streaming) for details.", "title": "Stream", "type": "boolean", "example": false @@ -30062,7 +32430,7 @@ { "type": "string", "x-stainless-skip": ["go"] }, { "items": { "$ref": "#/components/schemas/RequestTextBlock" }, "type": "array" } ], - "description": "System prompt.\n\nA 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://docs.claude.com/en/docs/system-prompts).", + "description": "System prompt.\n\nA 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).", "examples": [ [{ "text": "Today's date is 2024-06-01.", "type": "text" }], "Today's date is 2023-01-01." @@ -30082,7 +32450,7 @@ "thinking": { "$ref": "#/components/schemas/ThinkingConfigParam" }, "tool_choice": { "$ref": "#/components/schemas/ToolChoice" }, "tools": { - "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere 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)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.", "examples": [ { "description": "Get the current weather in a given location", @@ -30120,6 +32488,8 @@ { "$ref": "#/components/schemas/WebSearchTool_20260209" }, { "$ref": "#/components/schemas/WebFetchTool_20260209" }, { "$ref": "#/components/schemas/WebFetchTool_20260309" }, + { "$ref": "#/components/schemas/WebSearchTool_20260318" }, + { "$ref": "#/components/schemas/WebFetchTool_20260318" }, { "$ref": "#/components/schemas/ToolSearchToolBM25_20251119" }, { "$ref": "#/components/schemas/ToolSearchToolRegex_20251119" } ] @@ -30666,7 +33036,7 @@ }, "params": { "$ref": "#/components/schemas/CreateMessageParams", - "description": "Messages API creation parameters for the individual request.\n\nSee the [Messages API reference](https://docs.claude.com/en/api/messages) for full documentation on available parameters." + "description": "Messages API creation parameters for the individual request.\n\nSee the [Messages API reference](https://platform.claude.com/docs/en/api/messages) for full documentation on available parameters." } }, "required": ["custom_id", "params"], @@ -33327,7 +35697,7 @@ "additionalProperties": false, "properties": { "budget_tokens": { - "description": "Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "description": "Determines how many tokens Claude can use for its internal reasoning process. Larger budgets can enable more thorough analysis for complex problems, improving response quality.\n\nMust be ≥1024 and less than `max_tokens`.\n\nSee [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.", "minimum": 1024, "title": "Budget Tokens", "type": "integer" @@ -33968,6 +36338,85 @@ "title": "WebFetchTool_20260309", "type": "object" }, + "WebFetchTool_20260318": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { "$ref": "#/components/schemas/AllowedCaller" }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "List of domains to allow fetching from", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "List of domains to block fetching from", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { "ephemeral": "#/components/schemas/CacheControlEphemeral" }, + "propertyName": "type" + }, + "oneOf": [{ "$ref": "#/components/schemas/CacheControlEphemeral" }] + }, + { "type": "null" } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "citations": { + "anyOf": [{ "$ref": "#/components/schemas/RequestCitationsConfig" }, { "type": "null" }], + "description": "Citations configuration for fetched documents. Citations are disabled by default." + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_content_tokens": { + "anyOf": [{ "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" }], + "description": "Maximum number of tokens used by including web page text content in the context. The limit is approximate and does not apply to binary content such as PDFs.", + "title": "Max Content Tokens" + }, + "max_uses": { + "anyOf": [{ "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" }], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_fetch", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "response_inclusion": { + "description": "How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.", + "enum": ["full", "excluded"], + "title": "Response Inclusion", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { "const": "web_fetch_20260318", "title": "Type", "type": "string" }, + "use_cache": { + "description": "Whether to use cached content. Set to false to bypass the cache and fetch fresh content. Only set to false when the user explicitly requests fresh content or when fetching rapidly-changing sources.", + "title": "Use Cache", + "type": "boolean" + } + }, + "required": ["name", "type"], + "title": "WebFetchTool_20260318", + "type": "object" + }, "WebSearchToolResultErrorCode": { "enum": [ "invalid_tool_input", @@ -34106,6 +36555,75 @@ "title": "WebSearchTool_20260209", "type": "object" }, + "WebSearchTool_20260318": { + "additionalProperties": false, + "properties": { + "allowed_callers": { + "items": { "$ref": "#/components/schemas/AllowedCaller" }, + "title": "Allowed Callers", + "type": "array" + }, + "allowed_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "If provided, only these domains will be included in results. Cannot be used alongside `blocked_domains`.", + "title": "Allowed Domains" + }, + "blocked_domains": { + "anyOf": [{ "items": { "type": "string" }, "type": "array" }, { "type": "null" }], + "description": "If provided, these domains will never appear in results. Cannot be used alongside `allowed_domains`.", + "title": "Blocked Domains" + }, + "cache_control": { + "anyOf": [ + { + "discriminator": { + "mapping": { "ephemeral": "#/components/schemas/CacheControlEphemeral" }, + "propertyName": "type" + }, + "oneOf": [{ "$ref": "#/components/schemas/CacheControlEphemeral" }] + }, + { "type": "null" } + ], + "description": "Create a cache control breakpoint at this content block.", + "title": "Cache Control" + }, + "defer_loading": { + "description": "If true, tool will not be included in initial system prompt. Only loaded when returned via tool_reference from tool search.", + "title": "Defer Loading", + "type": "boolean" + }, + "max_uses": { + "anyOf": [{ "exclusiveMinimum": 0, "type": "integer" }, { "type": "null" }], + "description": "Maximum number of times the tool can be used in the API request.", + "title": "Max Uses" + }, + "name": { + "const": "web_search", + "description": "Name of the tool.\n\nThis is how the tool will be called by the model and in `tool_use` blocks.", + "title": "Name", + "type": "string" + }, + "response_inclusion": { + "description": "How this tool's result blocks appear in the API response when the result was consumed by a completed code_execution call in the same turn. 'full' returns the complete content (default). 'excluded' drops the nested server_tool_use and result block pair entirely. Results from direct calls, or from code_execution calls that paused before completing, are always returned in full so they can be sent back on the next turn.", + "enum": ["full", "excluded"], + "title": "Response Inclusion", + "type": "string" + }, + "strict": { + "description": "When true, guarantees schema validation on tool names and inputs", + "title": "Strict", + "type": "boolean" + }, + "type": { "const": "web_search_20260318", "title": "Type", "type": "string" }, + "user_location": { + "anyOf": [{ "$ref": "#/components/schemas/UserLocation" }, { "type": "null" }], + "description": "Parameters for the user's location. Used to provide more relevant search results." + } + }, + "required": ["name", "type"], + "title": "WebSearchTool_20260318", + "type": "object" + }, "BetaManagedAgentsConflictError": { "type": "object", "additionalProperties": false, @@ -34158,7 +36676,7 @@ "properties": { "model": { "$ref": "#/components/schemas/Model" }, "messages": { - "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://docs.claude.com/en/api/messages-examples).\n\nNote that if you want to include a [system prompt](https://docs.claude.com/en/docs/system-prompts), you can use the top-level `system` parameter — there is no `\"system\"` role for input messages in the Messages API.\n\nThere is a limit of 100,000 messages in a single request.", + "description": "Input messages.\n\nOur models are trained to operate on alternating `user` and `assistant` conversational turns. When creating a new `Message`, you specify the prior conversational turns with the `messages` parameter, and the model then generates the next `Message` in the conversation. Consecutive `user` or `assistant` turns in your request will be combined into a single turn.\n\nEach 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.\n\nIf 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.\n\nExample with a single `user` message:\n\n```json\n[{\"role\": \"user\", \"content\": \"Hello, Claude\"}]\n```\n\nExample with multiple conversational turns:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"Hello there.\"},\n {\"role\": \"assistant\", \"content\": \"Hi, I'm Claude. How can I help you?\"},\n {\"role\": \"user\", \"content\": \"Can you explain LLMs in plain English?\"},\n]\n```\n\nExample with a partially-filled response from Claude:\n\n```json\n[\n {\"role\": \"user\", \"content\": \"What's the Greek name for Sun? (A) Sol (B) Helios (C) Sun\"},\n {\"role\": \"assistant\", \"content\": \"The best answer is (\"},\n]\n```\n\nEach input message `content` may be either a single `string` or an array of content blocks, where each block has a specific `type`. Using a `string` for `content` is shorthand for an array of one content block of type `\"text\"`. The following input messages are equivalent:\n\n```json\n{\"role\": \"user\", \"content\": \"Hello, Claude\"}\n```\n\n```json\n{\"role\": \"user\", \"content\": [{\"type\": \"text\", \"text\": \"Hello, Claude\"}]}\n```\n\nSee [input examples](https://platform.claude.com/docs/en/build-with-claude/working-with-messages).\n\nNote 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.\n\nThere is a limit of 100,000 messages in a single request.", "items": { "$ref": "#/components/schemas/InputMessage" }, "title": "Messages", "type": "array" @@ -34188,7 +36706,7 @@ "title": "Inference Geo" }, "max_tokens": { - "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet to `0` to populate the [prompt cache](https://docs.claude.com/en/docs/build-with-claude/prompt-caching#pre-warming-the-cache) without generating a response.\n\nDifferent models have different maximum values for this parameter. See [models](https://docs.claude.com/en/docs/models-overview) for details.", + "description": "The maximum number of tokens to generate before stopping.\n\nNote that our models may stop _before_ reaching this maximum. This parameter only specifies the absolute maximum number of tokens to generate.\n\nSet 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.\n\nDifferent models have different maximum values for this parameter. See [models](https://platform.claude.com/docs/en/about-claude/models/overview) for details.", "examples": [1024], "minimum": 0, "title": "Max Tokens", @@ -34203,7 +36721,7 @@ "description": "Configuration options for the model's output, such as the output format." }, "service_tier": { - "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://docs.claude.com/en/api/service-tiers) for details.", + "description": "Determines whether to use priority capacity (if available) or standard capacity for this request.\n\nAnthropic offers different levels of service for your API requests. See [service-tiers](https://platform.claude.com/docs/en/api/service-tiers) for details.", "enum": ["auto", "standard_only"], "title": "Service Tier", "type": "string" @@ -34219,7 +36737,7 @@ { "type": "string" }, { "items": { "$ref": "#/components/schemas/RequestTextBlock" }, "type": "array" } ], - "description": "System prompt.\n\nA 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://docs.claude.com/en/docs/system-prompts).", + "description": "System prompt.\n\nA 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).", "examples": [ [{ "text": "Today's date is 2024-06-01.", "type": "text" }], "Today's date is 2023-01-01." @@ -34239,7 +36757,7 @@ "thinking": { "$ref": "#/components/schemas/ThinkingConfigParam" }, "tool_choice": { "$ref": "#/components/schemas/ToolChoice" }, "tools": { - "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere are two types of tools: **client tools** and **server tools**. The behavior described below applies to client tools. For [server tools](https://docs.claude.com/en/docs/agents-and-tools/tool-use/overview#server-tools), see their individual documentation as each has its own behavior (e.g., the [web search tool](https://docs.claude.com/en/docs/agents-and-tools/tool-use/web-search-tool)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://docs.claude.com/en/docs/tool-use) for more details.", + "description": "Definitions of tools that the model may use.\n\nIf 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.\n\nThere 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)).\n\nEach tool definition includes:\n\n* `name`: Name of the tool.\n* `description`: Optional, but strongly-recommended description of the tool.\n* `input_schema`: [JSON schema](https://json-schema.org/draft/2020-12) for the tool `input` shape that the model will produce in `tool_use` output content blocks.\n\nFor example, if you defined `tools` as:\n\n```json\n[\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the current stock price for a given ticker symbol.\",\n \"input_schema\": {\n \"type\": \"object\",\n \"properties\": {\n \"ticker\": {\n \"type\": \"string\",\n \"description\": \"The stock ticker symbol, e.g. AAPL for Apple Inc.\"\n }\n },\n \"required\": [\"ticker\"]\n }\n }\n]\n```\n\nAnd then asked the model \"What's the S&P 500 at today?\", the model might produce `tool_use` content blocks in the response like this:\n\n```json\n[\n {\n \"type\": \"tool_use\",\n \"id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"name\": \"get_stock_price\",\n \"input\": { \"ticker\": \"^GSPC\" }\n }\n]\n```\n\nYou might then run your `get_stock_price` tool with `{\"ticker\": \"^GSPC\"}` as an input, and return the following back to the model in a subsequent `user` message:\n\n```json\n[\n {\n \"type\": \"tool_result\",\n \"tool_use_id\": \"toolu_01D7FLrfh4GYq7yT1ULFeyMV\",\n \"content\": \"259.75 USD\"\n }\n]\n```\n\nTools 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.\n\nSee our [guide](https://platform.claude.com/docs/en/agents-and-tools/tool-use/overview) for more details.", "examples": [ { "description": "Get the current weather in a given location", @@ -34277,6 +36795,8 @@ { "$ref": "#/components/schemas/WebSearchTool_20260209" }, { "$ref": "#/components/schemas/WebFetchTool_20260209" }, { "$ref": "#/components/schemas/WebFetchTool_20260309" }, + { "$ref": "#/components/schemas/WebSearchTool_20260318" }, + { "$ref": "#/components/schemas/WebFetchTool_20260318" }, { "$ref": "#/components/schemas/ToolSearchToolBM25_20251119" }, { "$ref": "#/components/schemas/ToolSearchToolRegex_20251119" } ] @@ -34348,7 +36868,7 @@ ] }, "ThinkingConfigParam": { - "description": "Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "description": "Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.", "discriminator": { "mapping": { "adaptive": "#/components/schemas/ThinkingConfigAdaptive", @@ -34366,7 +36886,7 @@ "title": "Thinking" }, "BetaThinkingConfigParam": { - "description": "Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://docs.claude.com/en/docs/build-with-claude/extended-thinking) for details.", + "description": "Configuration for enabling Claude's extended thinking.\n\nWhen enabled, responses include `thinking` content blocks showing Claude's thinking process before the final answer. Requires a minimum budget of 1,024 tokens and counts towards your `max_tokens` limit.\n\nSee [extended thinking](https://platform.claude.com/docs/en/build-with-claude/extended-thinking) for details.", "discriminator": { "mapping": { "adaptive": "#/components/schemas/BetaThinkingConfigAdaptive", @@ -34661,6 +37181,11 @@ "description": "The model that will complete your prompt.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.", "anyOf": [ { "type": "string" }, + { + "const": "claude-sonnet-5", + "description": "High-performance model for coding and agents", + "x-stainless-nominal": false + }, { "const": "claude-fable-5", "description": "Next generation of intelligence for the hardest knowledge work and coding problems", @@ -34749,6 +37274,11 @@ "description": "The model that will power your agent.\n\nSee [models](https://docs.anthropic.com/en/docs/models-overview) for additional details and options.", "anyOf": [ { "type": "string" }, + { + "const": "claude-sonnet-5", + "description": "High-performance model for coding and agents", + "x-stainless-nominal": false + }, { "const": "claude-fable-5", "description": "Next generation of intelligence for the hardest knowledge work and coding problems", @@ -35352,6 +37882,226 @@ }, "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } } + }, + "agent.created": { + "post": { + "operationId": "BetaAgentCreatedWebhook", + "summary": "agent.created webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "agent.archived": { + "post": { + "operationId": "BetaAgentArchivedWebhook", + "summary": "agent.archived webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "agent.deleted": { + "post": { + "operationId": "BetaAgentDeletedWebhook", + "summary": "agent.deleted webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment.paused": { + "post": { + "operationId": "BetaDeploymentPausedWebhook", + "summary": "deployment.paused webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment_run.failed": { + "post": { + "operationId": "BetaDeploymentRunFailedWebhook", + "summary": "deployment_run.failed webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment.created": { + "post": { + "operationId": "BetaDeploymentCreatedWebhook", + "summary": "deployment.created webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment.updated": { + "post": { + "operationId": "BetaDeploymentUpdatedWebhook", + "summary": "deployment.updated webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment.unpaused": { + "post": { + "operationId": "BetaDeploymentUnpausedWebhook", + "summary": "deployment.unpaused webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "agent.updated": { + "post": { + "operationId": "BetaAgentUpdatedWebhook", + "summary": "agent.updated webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment.archived": { + "post": { + "operationId": "BetaDeploymentArchivedWebhook", + "summary": "deployment.archived webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment_run.started": { + "post": { + "operationId": "BetaDeploymentRunStartedWebhook", + "summary": "deployment_run.started webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment.deleted": { + "post": { + "operationId": "BetaDeploymentDeletedWebhook", + "summary": "deployment.deleted webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "deployment_run.succeeded": { + "post": { + "operationId": "BetaDeploymentRunSucceededWebhook", + "summary": "deployment_run.succeeded webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "environment.created": { + "post": { + "operationId": "BetaEnvironmentCreatedWebhook", + "summary": "environment.created webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "environment.updated": { + "post": { + "operationId": "BetaEnvironmentUpdatedWebhook", + "summary": "environment.updated webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "environment.archived": { + "post": { + "operationId": "BetaEnvironmentArchivedWebhook", + "summary": "environment.archived webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "environment.deleted": { + "post": { + "operationId": "BetaEnvironmentDeletedWebhook", + "summary": "environment.deleted webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "memory_store.created": { + "post": { + "operationId": "BetaMemoryStoreCreatedWebhook", + "summary": "memory_store.created webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "memory_store.archived": { + "post": { + "operationId": "BetaMemoryStoreArchivedWebhook", + "summary": "memory_store.archived webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } + }, + "memory_store.deleted": { + "post": { + "operationId": "BetaMemoryStoreDeletedWebhook", + "summary": "memory_store.deleted webhook", + "requestBody": { + "required": true, + "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BetaWebhookEvent" } } } + }, + "responses": { "200": { "description": "Return any 2xx status to acknowledge receipt." } } + } } } }