{"openapi":"3.1.0","info":{"title":"Mastra Gateway v2","version":"2.0.0","description":"Public Gateway v2 API. Use a Gateway v2 key in Authorization: Bearer or x-api-key, or Bearer plus the key in X-Memory-Gateway-Authorization. A nonempty dedicated header takes precedence over provider OAuth. Conflicting gateway keys and nonempty malformed dedicated headers are refused. An empty dedicated header is treated as absent. Without a nonempty dedicated header, Authorization and x-api-key must match. Model capabilities and availability vary by region and policy. Request schemas describe validation inputs; custom refinements remain enforced by the gateway. Response fields follow the endpoint protocol and selected provider."},"servers":[{"url":"/"}],"security":[{"bearerAuth":[]},{"apiKeyAuth":[]},{"gatewayHeaderAuth":[]}],"paths":{"/openapi.json":{"get":{"operationId":"getOpenApi","summary":"Get the Gateway v2 OpenAPI document","security":[],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayOpenApiDocument"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"500":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}}}},"/health":{"get":{"operationId":"getHealth","summary":"Check process health","security":[],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayHealth"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}}}},"/ready":{"get":{"operationId":"getReadiness","summary":"Check dependency readiness","security":[],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayReadiness"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"503":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayReadiness"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}}}},"/v1/models":{"get":{"operationId":"listModels","summary":"List available models","security":[{},{"bearerAuth":[]},{"apiKeyAuth":[]},{"gatewayHeaderAuth":[]}],"description":"Anonymous callers see the public priced catalog. A key filters the catalog by its region and policy. A regional instance serves only its own region.","parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","enum":["us","eu"],"description":"Used only for anonymous model reads; an authenticated key determines its own region."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayModelList"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/models/{id}":{"get":{"operationId":"getModel","summary":"Get an available model","security":[{},{"bearerAuth":[]},{"apiKeyAuth":[]},{"gatewayHeaderAuth":[]}],"description":"Anonymous callers see the public priced catalog. A key filters the catalog by its region and policy. A regional instance serves only its own region.","parameters":[{"name":"region","in":"query","required":false,"schema":{"type":"string","enum":["us","eu"],"description":"Used only for anonymous model reads; an authenticated key determines its own region."}},{"name":"id","in":"path","required":true,"schema":{"type":"string","description":"Model ID. Raw and percent-encoded slashes are supported. OpenAPI clients should percent-encode slashes, for example test%2Fmodel."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayModel"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/chat/completions":{"post":{"operationId":"createChatCompletion","summary":"Create a chat completion","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422. Native OpenAI routes that bridge Chat through Responses require an output token limit of at least 16. Other routes may support smaller limits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createChatCompletionRequest"}}}},"responses":{"200":{"description":"JSON response, or server-sent events when stream is true. The x-event-data-schema extension describes JSON event data; Chat also sends the [DONE] sentinel. Managed cost is finalized in the final usage event, while text deltas stream immediately. Native protocols preserve absent cost fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayChatCompletion"}},"text/event-stream":{"schema":{"type":"string"},"x-event-data-schema":{"$ref":"#/components/schemas/GatewayChatEvent"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}]}},"/v1/messages":{"post":{"operationId":"createMessage","summary":"Create an Anthropic-compatible message","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422. Messages accepts up to 128 MiB. Above the normal limit, the gateway verifies the key before buffering more data and allows one large upload per instance.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createMessageRequest"}}}},"responses":{"200":{"description":"JSON response, or server-sent events when stream is true. The x-event-data-schema extension describes JSON event data; Chat also sends the [DONE] sentinel. Managed cost is finalized in the final usage event, while text deltas stream immediately. Native protocols preserve absent cost fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayMessage"}},"text/event-stream":{"schema":{"type":"string"},"x-event-data-schema":{"$ref":"#/components/schemas/GatewayMessageEvent"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}},{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}}]}},"/v1/embeddings":{"post":{"operationId":"createEmbeddings","summary":"Create embeddings","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422. Embedding responses are bounded at 64 MiB. Provider-returned vector dimensions and base64 contents are passed through without content validation.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createEmbeddingsRequest"}}}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayEmbeddings"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/responses":{"post":{"operationId":"createResponse","summary":"Create an OpenAI-compatible response","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422. Native OpenAI requires max_output_tokens of at least 16 when supplied. Other providers may support smaller limits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createResponseRequest"}}}},"responses":{"200":{"description":"JSON response, or server-sent events when stream is true. The x-event-data-schema extension describes JSON event data; Chat also sends the [DONE] sentinel. Managed cost is finalized in the final usage event, while text deltas stream immediately. Native protocols preserve absent cost fields.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponse"}},"text/event-stream":{"schema":{"type":"string"},"x-event-data-schema":{"$ref":"#/components/schemas/GatewayResponseEvent"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}},{"name":"x-thread-id","in":"header","required":false,"schema":{"type":"string","maxLength":256,"pattern":"^[^\\u0000-\\u001f]*$","description":"Optional metadata retained for Responses requests."}},{"name":"x-resource-id","in":"header","required":false,"schema":{"type":"string","maxLength":256,"pattern":"^[^\\u0000-\\u001f]*$","description":"Optional metadata retained for Responses requests."}}]}},"/v1/decisions":{"post":{"operationId":"createDecision","summary":"Create a decision","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createDecisionRequest"}}}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayDecisionResponse"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/rerank":{"post":{"operationId":"createRerank","summary":"Rank documents by relevance to a query","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422. top_n must not exceed the number of documents.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createRerankRequest"}}}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayRerank"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/images/generations":{"post":{"operationId":"generateImage","summary":"Generate one base64 image","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/generateImageRequest"}}}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayImageResponse"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/images/edits":{"post":{"operationId":"editImage","summary":"Edit an image using a URL or data URL","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/editImageRequest"}}}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayImageResponse"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/audio/speech":{"post":{"operationId":"createSpeech","summary":"Generate speech audio","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422. input must contain 1 to 4096 Unicode code points. Voice and format availability depend on the model. MP3 is the default; PCM requires a qualified route.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createSpeechRequest"}}}},"responses":{"200":{"description":"Generated audio bytes.","content":{"audio/mpeg":{"schema":{"type":"string","format":"binary"}},"audio/pcm":{"schema":{"type":"string","format":"binary"}},"application/octet-stream":{"schema":{"type":"string","format":"binary"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}]}},"/v1/audio/transcriptions":{"post":{"operationId":"createTranscription","summary":"Transcribe a recorded audio file","parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}],"description":"Upload one nonempty MP3, MP4, M4A, WAV, WebM, OGG, or FLAC file of at most 8388608 bytes. The MIME type must match the filename extension. The multipart body is limited to 8454144 bytes. Duplicate and unknown fields are rejected. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved.","requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","additionalProperties":false,"required":["model","file"],"properties":{"model":{"type":"string","minLength":1,"maxLength":200},"response_format":{"type":"string","const":"json"},"file":{"type":"string","format":"binary","description":"Audio file, at most 8388608 bytes."}}}}}},"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayTranscription"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/messages/count_tokens":{"post":{"operationId":"countMessageTokens","summary":"Count Anthropic message tokens","description":"Requires a Gateway v2 key linked to an Anthropic BYOK connection. These native operations use that provider account and do not spend managed gateway credit. Upstream response fields and status codes are passed through. JSON bodies are limited to 128 MiB.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/countMessageTokensRequest"}}}},"parameters":[{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayMessageTokenCount"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/files":{"get":{"operationId":"listAnthropicFiles","summary":"List files in the Anthropic account","description":"Requires a Gateway v2 key linked to an Anthropic BYOK connection. These native operations use that provider account and do not spend managed gateway credit. Upstream response fields and status codes are passed through.","parameters":[{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":1000}},{"name":"before_id","in":"query","required":false,"schema":{"type":"string"}},{"name":"after_id","in":"query","required":false,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayFileList"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"post":{"operationId":"uploadAnthropicFile","summary":"Upload a file to the Anthropic account","description":"Requires a Gateway v2 key linked to an Anthropic BYOK connection. These native operations use that provider account and do not spend managed gateway credit. Upstream response fields and status codes are passed through. Multipart request bodies are limited to 524353536 bytes. File fields are validated by Anthropic.","parameters":[{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}}],"externalDocs":{"url":"https://platform.claude.com/docs/en/api/files/upload"},"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"type":"object","required":["file"],"properties":{"file":{"type":"string","format":"binary"}},"additionalProperties":true}}}},"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayFile"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/files/{id}":{"get":{"operationId":"getAnthropicFile","summary":"Get file metadata from Anthropic","description":"Requires a Gateway v2 key linked to an Anthropic BYOK connection. These native operations use that provider account and do not spend managed gateway credit. Upstream response fields and status codes are passed through.","parameters":[{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^file_[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayFile"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteAnthropicFile","summary":"Delete a file from Anthropic","description":"Requires a Gateway v2 key linked to an Anthropic BYOK connection. These native operations use that provider account and do not spend managed gateway credit. Upstream response fields and status codes are passed through.","parameters":[{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^file_[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayFileDeleted"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/files/{id}/content":{"get":{"operationId":"downloadAnthropicFile","summary":"Download file bytes from Anthropic","description":"Requires a Gateway v2 key linked to an Anthropic BYOK connection. These native operations use that provider account and do not spend managed gateway credit. Upstream response fields and status codes are passed through.","parameters":[{"name":"anthropic-version","in":"header","required":false,"schema":{"type":"string","pattern":"^\\d{4}-\\d{2}-\\d{2}$","description":"Defaults to the gateway's supported Anthropic version when omitted."}},{"name":"anthropic-beta","in":"header","required":false,"schema":{"type":"string","maxLength":512,"pattern":"^[a-zA-Z0-9._,-]+(?:\\s+[a-zA-Z0-9._,-]+)*$"}},{"name":"id","in":"path","required":true,"schema":{"type":"string","pattern":"^file_[A-Za-z0-9_-]+$"}}],"responses":{"200":{"description":"File bytes. The provider content type is preserved.","content":{"application/octet-stream":{"schema":{"type":"string","format":"binary"}},"*/*":{"schema":{"type":"string","format":"binary"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/responses/{id}":{"get":{"operationId":"getResponse","summary":"Retrieve a stored response","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"description":"Retrieve the provider-stored response. Managed usage.cost is omitted because the identity record does not retain the historical customer charge. BYOK retains provider-reported cost.","responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayStoredResponse"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}},"delete":{"operationId":"deleteResponse","summary":"Delete a stored response","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponseDeleted"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/responses/{id}/input_items":{"get":{"operationId":"listResponseInputItems","summary":"List stored response input items","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20,"description":"OpenAI-compatible page size; the owning provider applies its pagination rules."}},{"name":"order","in":"query","required":false,"schema":{"type":"string","enum":["asc","desc"],"default":"desc"}},{"name":"after","in":"query","required":false,"schema":{"type":"string"}},{"name":"include","in":"query","required":false,"schema":{"type":"array","items":{"type":"string"},"description":"Additional provider-defined response fields to include."},"style":"form","explode":true}],"description":"The query string is forwarded unchanged to the original provider. Pagination parameters and response fields follow that provider's Responses API.","responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayResponseInputItems"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/videos":{"post":{"operationId":"createVideo","summary":"Create a video generation job","description":"JSON bodies are limited to 16 MiB unless an endpoint specifies otherwise. Model IDs are trimmed of leading and trailing whitespace before routing. The trimmed ID must contain 1 to 200 characters and no control characters; invalid IDs return 422. Case and other interior characters are preserved. Model capabilities, policy, pricing, and additional validation refinements are checked at runtime. Idempotency-Key is not supported and returns 422.","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/createVideoRequest"}}}},"responses":{"202":{"description":"Video generation job accepted. Poll GET /v1/videos/{id} for completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayVideo"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}},"parameters":[{"name":"x-gateway-v2-binding-id","in":"header","required":false,"schema":{"type":"string","maxLength":128,"pattern":"^[a-zA-Z0-9_-]+$","description":"Select a provider binding, subject to ownership and policy."}},{"name":"x-gateway-strict-capabilities","in":"header","required":false,"schema":{"type":"string","enum":["true","false"],"description":"Whether capability checks must be strict for this request."}}]},"get":{"operationId":"listVideos","summary":"List video generation jobs","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","minimum":1,"maximum":100,"default":20}},{"name":"after","in":"query","required":false,"schema":{"type":"string","description":"Last job ID from the preceding page."}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayVideoList"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/videos/{id}":{"get":{"operationId":"getVideo","summary":"Get a video generation job","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Successful response. Managed usage.cost, when present, is the customer charge in USD; BYOK retains the provider-reported cost. Unknown customer charges omit cost.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayVideo"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}},"/v1/videos/{id}/content":{"get":{"operationId":"getVideoContent","summary":"Download a completed video","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Video bytes. The provider video content type is preserved.","content":{"video/mp4":{"schema":{"type":"string","format":"binary"}},"video/*":{"schema":{"type":"string","format":"binary"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}},"400":{"$ref":"#/components/responses/Error"},"401":{"$ref":"#/components/responses/Error"},"402":{"$ref":"#/components/responses/Error"},"403":{"$ref":"#/components/responses/Error"},"404":{"$ref":"#/components/responses/Error"},"408":{"$ref":"#/components/responses/Error"},"409":{"$ref":"#/components/responses/Error"},"410":{"$ref":"#/components/responses/Error"},"413":{"$ref":"#/components/responses/Error"},"415":{"$ref":"#/components/responses/Error"},"422":{"$ref":"#/components/responses/Error"},"429":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"},"Retry-After":{"description":"Seconds until retry when supplied by the limiter.","schema":{"type":"string"}},"x-gateway-rate-limit-scope":{"description":"Limit scope, when supplied.","schema":{"type":"string"}},"x-gateway-rate-limit-dimension":{"description":"Limit dimension, when supplied.","schema":{"type":"string"}}}},"431":{"$ref":"#/components/responses/Error"},"500":{"$ref":"#/components/responses/Error"},"502":{"$ref":"#/components/responses/Error"},"503":{"$ref":"#/components/responses/Error"},"504":{"$ref":"#/components/responses/Error"},"default":{"$ref":"#/components/responses/Error"}}}}},"components":{"schemas":{"GatewayError":{"type":"object","properties":{"type":{"type":"string","const":"error"},"error":{"anyOf":[{"type":"string"},{"type":"object","properties":{"type":{"type":"string"},"code":{"type":"string"},"message":{"type":"string","description":"Readable refusal text. Gateway credit, budget, BYOK and rate refusals include a dashboard help URL."},"provider":{"type":"string"},"unsupported_features":{"type":"array","items":{"type":"string"}}},"additionalProperties":false}]}},"required":["error"],"additionalProperties":false},"GatewayOpenApiDocument":{"type":"object","properties":{"openapi":{"type":"string","const":"3.1.0"},"info":{"type":"object","properties":{"title":{"type":"string"},"version":{"type":"string"}},"required":["title","version"],"additionalProperties":{}},"paths":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"components":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["openapi","info","paths"],"additionalProperties":{}},"GatewayHealth":{"type":"object","properties":{"status":{"type":"string","const":"ok"},"service":{"type":"string"}},"required":["status"],"additionalProperties":{}},"GatewayReadiness":{"type":"object","properties":{"status":{"type":"string","enum":["ready","unavailable"]},"region":{"type":"string","enum":["us","eu"]}},"required":["status"],"additionalProperties":{}},"GatewayModelList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"string"}},"api_categories":{"type":"array","items":{"type":"string"}},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"speech":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"string"}},"voices":{"type":"array","items":{"type":"string"}}},"required":["formats","voices"],"additionalProperties":{}},"pricing":{"type":"object","properties":{"status":{"type":"string","const":"known"},"currency":{"type":"string"},"indicative":{"type":"boolean"},"basis":{"type":"string"},"free":{"type":"boolean"},"unit":{"type":"string"},"meter_units":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"generation_fee":{"type":"string"}},"required":["status","currency","indicative","basis","free"],"additionalProperties":{}},"price_schedules":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"unit":{"type":"string"},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"customer_rate_conditions":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"context_tiers":{"type":"array","items":{"type":"object","properties":{"above_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":{}}},"rate_options":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["endpoint","unit"],"additionalProperties":{}}},"id":{"type":"string"},"object":{"type":"string","const":"model"},"owned_by":{"type":"string"},"regions":{"type":"array","items":{"type":"string","enum":["us","eu"]}},"regional":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"string"}},"api_categories":{"type":"array","items":{"type":"string"}},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"speech":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"string"}},"voices":{"type":"array","items":{"type":"string"}}},"required":["formats","voices"],"additionalProperties":{}},"pricing":{"type":"object","properties":{"status":{"type":"string","const":"known"},"currency":{"type":"string"},"indicative":{"type":"boolean"},"basis":{"type":"string"},"free":{"type":"boolean"},"unit":{"type":"string"},"meter_units":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"generation_fee":{"type":"string"}},"required":["status","currency","indicative","basis","free"],"additionalProperties":{}},"price_schedules":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"unit":{"type":"string"},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"customer_rate_conditions":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"context_tiers":{"type":"array","items":{"type":"object","properties":{"above_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":{}}},"rate_options":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["endpoint","unit"],"additionalProperties":{}}}},"required":["endpoints","api_categories"],"additionalProperties":{}}},"price_revision":{"type":"string"}},"required":["endpoints","api_categories","id","object","owned_by"],"additionalProperties":{}}}},"required":["object","data"],"additionalProperties":{}},"GatewayModel":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"string"}},"api_categories":{"type":"array","items":{"type":"string"}},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"speech":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"string"}},"voices":{"type":"array","items":{"type":"string"}}},"required":["formats","voices"],"additionalProperties":{}},"pricing":{"type":"object","properties":{"status":{"type":"string","const":"known"},"currency":{"type":"string"},"indicative":{"type":"boolean"},"basis":{"type":"string"},"free":{"type":"boolean"},"unit":{"type":"string"},"meter_units":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"generation_fee":{"type":"string"}},"required":["status","currency","indicative","basis","free"],"additionalProperties":{}},"price_schedules":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"unit":{"type":"string"},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"customer_rate_conditions":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"context_tiers":{"type":"array","items":{"type":"object","properties":{"above_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":{}}},"rate_options":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["endpoint","unit"],"additionalProperties":{}}},"id":{"type":"string"},"object":{"type":"string","const":"model"},"owned_by":{"type":"string"},"regions":{"type":"array","items":{"type":"string","enum":["us","eu"]}},"regional":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"object","properties":{"endpoints":{"type":"array","items":{"type":"string"}},"api_categories":{"type":"array","items":{"type":"string"}},"features":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"array","items":{"type":"string"}}},"speech":{"type":"object","properties":{"formats":{"type":"array","items":{"type":"string"}},"voices":{"type":"array","items":{"type":"string"}}},"required":["formats","voices"],"additionalProperties":{}},"pricing":{"type":"object","properties":{"status":{"type":"string","const":"known"},"currency":{"type":"string"},"indicative":{"type":"boolean"},"basis":{"type":"string"},"free":{"type":"boolean"},"unit":{"type":"string"},"meter_units":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"generation_fee":{"type":"string"}},"required":["status","currency","indicative","basis","free"],"additionalProperties":{}},"price_schedules":{"type":"array","items":{"type":"object","properties":{"endpoint":{"type":"string"},"unit":{"type":"string"},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},"customer_rate_conditions":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"context_tiers":{"type":"array","items":{"type":"object","properties":{"above_input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"customer_meters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}}},"additionalProperties":{}}},"rate_options":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["endpoint","unit"],"additionalProperties":{}}}},"required":["endpoints","api_categories"],"additionalProperties":{}}},"price_revision":{"type":"string"}},"required":["endpoints","api_categories","id","object","owned_by"],"additionalProperties":{}},"GatewayChatCompletion":{"type":"object","properties":{"id":{"type":"string"},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"model":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"choices":{"minItems":1,"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":["string","null"]},"refusal":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":{}}},"required":["id","type","function"],"additionalProperties":{}},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"custom"},"custom":{"type":"object","properties":{"name":{"type":"string"},"input":{"type":"string"}},"required":["name","input"],"additionalProperties":{}}},"required":["id","type","custom"],"additionalProperties":{}}]}},"function_call":{"anyOf":[{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":{}},{"type":"null"}]},"reasoning":{"type":["string","null"]},"reasoning_content":{"type":["string","null"]},"audio":{"type":"object","properties":{"id":{"type":"string"},"data":{"type":"string"},"transcript":{"type":"string"},"expires_at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id"],"additionalProperties":{}}},"required":["role"],"additionalProperties":{}},"finish_reason":{"type":["string","null"]},"logprobs":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]}},"required":["index","message"],"additionalProperties":{}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]}},"additionalProperties":{}}},"required":["model","object","choices"],"additionalProperties":{}},"GatewayMessage":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"message"},"role":{"type":"string","const":"assistant"},"model":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"text":{"type":"string"}},"required":["type"],"additionalProperties":{}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]}},"additionalProperties":{}},"stop_reason":{"type":["string","null"]},"stop_sequence":{"type":["string","null"]}},"required":["type","role","model","content","usage"],"additionalProperties":{}},"GatewayEmbeddings":{"type":"object","properties":{"object":{"type":"string","const":"list"},"model":{"type":"string"},"data":{"type":"array","items":{"type":"object","properties":{"object":{"type":"string","const":"embedding"},"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"embedding":{"anyOf":[{"minItems":1,"type":"array","items":{"type":"number"}},{"type":"string","minLength":1}]}},"required":["object","index","embedding"],"additionalProperties":{}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]}},"additionalProperties":{}}},"required":["object","model","data"],"additionalProperties":{}},"GatewayResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"response"},"model":{"type":"string"},"status":{"type":"string","enum":["completed","incomplete","in_progress","queued","failed","cancelled"]},"output":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string"},"id":{"type":"string"}},"required":["type"],"additionalProperties":{}}},"created_at":{"type":"integer","minimum":0,"maximum":9007199254740991},"previous_response_id":{"type":["string","null"]},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]}},"additionalProperties":{}},{"type":"null"}]}},"required":["id","object","model","status","output"],"additionalProperties":{}},"GatewayDecisionResponse":{"type":"object","properties":{"model":{"type":"string"},"id":{"type":"string"},"answers":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"predicate"},"name":{"type":["string","null"]},"probability":{"type":"number","minimum":0,"maximum":1}},"required":["type","name","probability"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"choice"},"name":{"type":["string","null"]},"choice":{"type":["string","boolean"]}},"required":["type","name","choice"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"score"},"name":{"type":["string","null"]},"score":{"type":"number","minimum":0}},"required":["type","name","score"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"refusal"},"name":{"type":["string","null"]}},"required":["type","name"],"additionalProperties":{}}]}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]}},"additionalProperties":{}}},"required":["model","answers"],"additionalProperties":{}},"GatewayRerank":{"type":"object","properties":{"object":{"type":"string","const":"list"},"model":{"type":"string"},"results":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":0,"maximum":9007199254740991},"relevance_score":{"type":"number"},"document":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":{}}},"required":["index","relevance_score","document"],"additionalProperties":{}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]},"search_units":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["search_units"],"additionalProperties":{}}},"required":["object","model","results","usage"],"additionalProperties":{}},"GatewayImageResponse":{"type":"object","properties":{"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"data":{"minItems":1,"maxItems":1,"type":"array","items":{"type":"object","properties":{"b64_json":{"type":"string","minLength":1},"media_type":{"type":"string"}},"required":["b64_json"],"additionalProperties":{}}}},"required":["created","data"],"additionalProperties":{}},"GatewayTranscription":{"type":"object","properties":{"text":{"type":"string"}},"required":["text"],"additionalProperties":{}},"GatewayMessageTokenCount":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["input_tokens"],"additionalProperties":{}},"GatewayFileList":{"type":"object","properties":{"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"file"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string"},"downloadable":{"type":"boolean"}},"required":["id","type","filename","mime_type","size_bytes","created_at"],"additionalProperties":{}}},"has_more":{"type":"boolean"},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]}},"required":["data","has_more"],"additionalProperties":{}},"GatewayFile":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"file"},"filename":{"type":"string"},"mime_type":{"type":"string"},"size_bytes":{"type":"integer","minimum":0,"maximum":9007199254740991},"created_at":{"type":"string"},"downloadable":{"type":"boolean"}},"required":["id","type","filename","mime_type","size_bytes","created_at"],"additionalProperties":{}},"GatewayFileDeleted":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"file_deleted"}},"required":["id","type"],"additionalProperties":{}},"GatewayStoredResponse":{"type":"object","properties":{"id":{"type":"string"},"store":{"type":"boolean","const":true},"previous_response_id":{"type":["string","null"]}},"required":["id","store","previous_response_id"],"additionalProperties":{},"description":"Provider-held response JSON with gateway-owned identity and storage fields. Other fields follow the owning provider."},"GatewayResponseDeleted":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"response.deleted"},"deleted":{"type":"boolean","const":true}},"required":["id","object","deleted"],"additionalProperties":{}},"GatewayResponseInputItems":{"description":"Provider JSON forwarded unchanged. Item shapes and pagination fields follow the owning provider."},"GatewayVideo":{"type":"object","properties":{"id":{"type":"string","pattern":"^video_gw_[0-9a-f]{32}$"},"object":{"type":"string","const":"video"},"model":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","expired"]},"created_at":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":"string"},"expires_at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","object","model","status","created_at"],"additionalProperties":{}},"GatewayVideoList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","pattern":"^video_gw_[0-9a-f]{32}$"},"object":{"type":"string","const":"video"},"model":{"type":"string"},"status":{"type":"string","enum":["pending","in_progress","completed","failed","expired"]},"created_at":{"type":"integer","minimum":0,"maximum":9007199254740991},"error":{"type":"string"},"expires_at":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","object","model","status","created_at"],"additionalProperties":{}}},"first_id":{"type":["string","null"]},"last_id":{"type":["string","null"]},"has_more":{"type":"boolean"}},"required":["object","data","first_id","last_id","has_more"],"additionalProperties":{}},"GatewayChatEvent":{"anyOf":[{"type":"object","properties":{"id":{"type":"string"},"created":{"type":"integer","minimum":0,"maximum":9007199254740991},"model":{"type":"string"},"object":{"type":"string","const":"chat.completion.chunk"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"finish_reason":{"type":["string","null"]}},"required":["index","delta"],"additionalProperties":{}}},"usage":{"anyOf":[{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"input_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991},"cost":{"description":"USD customer charge for managed inference; provider-reported cost for BYOK. Omitted when the customer charge cannot be established. Native protocols preserve absent cost fields.","type":["number","string","null"]}},"additionalProperties":{}},{"type":"null"}]}},"required":["model","object","choices"],"additionalProperties":{}},{"type":"object","properties":{"error":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["error"],"additionalProperties":{}}]},"GatewayResponseEvent":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{},"description":"JSON event data. The type tag identifies the event-specific fields."},"GatewayMessageEvent":{"type":"object","properties":{"type":{"type":"string"}},"required":["type"],"additionalProperties":{},"description":"Anthropic-compatible JSON event data, including message, content-block, usage, ping, and error events."},"createChatCompletionRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"messages":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"role":{"type":"string","const":"system"},"content":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false}}]},"name":{"type":"string","minLength":1,"maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","const":"developer"},"content":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false}}]},"name":{"type":"string","minLength":1,"maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","const":"user"},"content":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"object","properties":{"url":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["url"],"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_audio"},"input_audio":{"type":"object","properties":{"data":{"type":"string","minLength":1},"format":{"type":"string","enum":["wav","mp3"]}},"required":["data","format"],"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","input_audio"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file":{"anyOf":[{"type":"object","properties":{"file_data":{"type":"string","minLength":1},"filename":{"type":"string"}},"required":["file_data"],"additionalProperties":false},{"type":"object","properties":{"file_id":{"type":"string","minLength":1},"filename":{"type":"string"}},"required":["file_id"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","file"],"additionalProperties":false}]}}]},"name":{"type":"string","minLength":1,"maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"phase":{"anyOf":[{"type":"string","enum":["commentary","final_answer"]},{"type":"null"}]},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false},"content":{"anyOf":[{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refusal"},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false}]}}]},{"type":"null"}]},"name":{"anyOf":[{"type":"string","minLength":1,"maxLength":200},{"type":"null"}]},"tool_calls":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","const":"function"},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":false},"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","type","function"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"type":"string","const":"custom"},"custom":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"string"}},"required":["name","input"],"additionalProperties":false},"index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["id","type","custom"],"additionalProperties":false}]}},{"type":"null"}]},"function_call":{"anyOf":[{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":false},{"type":"null"}]},"audio":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"data":{"type":"string"},"expires_at":{"type":"integer","minimum":0,"maximum":9007199254740991},"transcript":{"type":"string"}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"refusal":{"type":["string","null"]},"reasoning":{},"reasoning_content":{"type":["string","null"]},"reasoning_details":{"anyOf":[{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},{"type":"null"}]},"annotations":{},"provider_metadata":{},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["role"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","const":"tool"},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false},"tool_call_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"extra_content":{"type":"object","properties":{"google":{"type":"object","properties":{"thought_signature":{"type":"string","minLength":1},"thought":{"type":"boolean"},"parts":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"additionalProperties":false}},"required":["google"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"object","properties":{"url":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["url"],"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file":{"anyOf":[{"type":"object","properties":{"file_data":{"type":"string","minLength":1},"filename":{"type":"string"}},"required":["file_data"],"additionalProperties":false},{"type":"object","properties":{"file_id":{"type":"string","minLength":1},"filename":{"type":"string"}},"required":["file_id"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","file"],"additionalProperties":false}]}}]},"name":{"type":"string","minLength":1,"maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["role","tool_call_id","content"],"additionalProperties":false},{"type":"object","properties":{"role":{"type":"string","const":"function"},"name":{"type":"string","minLength":1,"maxLength":200},"content":{"type":["string","null"]}},"required":["role","name","content"],"additionalProperties":false}]}},"tools":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"]},"parameters":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"strict":{"type":["boolean","null"]}},"required":["name"],"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"eager_input_streaming":{"type":"boolean"}},"required":["type","function"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"custom":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"grammar"},"grammar":{"type":"object","properties":{"definition":{"type":"string"},"syntax":{"type":"string","enum":["lark","regex"]}},"required":["definition","syntax"],"additionalProperties":false}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"openrouter:web_search"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"max_results":{"type":"integer","minimum":1,"maximum":25},"search_prompt":{"type":"string"},"engine":{"type":"string","enum":["auto","native","exa","firecrawl","parallel","perplexity"]},"search_context_size":{"type":"string","enum":["low","medium","high"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"mastra:web_search"}},"required":["type"],"additionalProperties":false}]}},{"type":"null"}]},"functions":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["name"],"additionalProperties":false}},"function_call":{"anyOf":[{"type":"string","enum":["none","auto"]},{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}]},"tool_choice":{"anyOf":[{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"custom":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","const":"allowed_tools"},"allowed_tools":{"type":"object","properties":{"mode":{"type":"string","enum":["auto","required"]},"tools":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"custom":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false}]}}},"required":["mode","tools"],"additionalProperties":false}},"required":["type","allowed_tools"],"additionalProperties":false}]},{"type":"null"}]},"parallel_tool_calls":{"type":["boolean","null"]},"modalities":{"anyOf":[{"minItems":1,"maxItems":2,"type":"array","items":{"type":"string","enum":["text","audio"]}},{"type":"null"}]},"audio":{"anyOf":[{"type":"object","properties":{"format":{"type":"string","enum":["wav","mp3","flac","opus","pcm16"]},"voice":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"id":{"type":"string","minLength":1}},"required":["id"],"additionalProperties":false}]}},"required":["format"],"additionalProperties":false},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"min_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"top_a":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"repetition_penalty":{"anyOf":[{"type":"number","exclusiveMinimum":0},{"type":"null"}]},"frequency_penalty":{"anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"presence_penalty":{"anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"logit_bias":{"anyOf":[{"type":"object","propertyNames":{"type":"string","pattern":"^\\d+$"},"additionalProperties":{"type":"number","minimum":-100,"maximum":100}},{"type":"null"}]},"logprobs":{"type":["boolean","null"]},"top_logprobs":{"anyOf":[{"type":"integer","minimum":0,"maximum":20},{"type":"null"}]},"reasoning_effort":{"anyOf":[{"type":"string","enum":["none","minimal","low","medium","high","xhigh"]},{"type":"null"}]},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default","flex","scale","priority","fast"]},{"type":"null"}]},"prediction":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}]}},"required":["type","content"],"additionalProperties":false},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"store":{"type":["boolean","null"]},"stop":{"anyOf":[{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"type":"string"}}]},{"type":"null"}]},"n":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"seed":{"anyOf":[{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},{"type":"null"}]},"user":{"type":"string","minLength":1},"session_id":{"type":"string","minLength":1,"maxLength":256},"safety_identifier":{"type":"string","minLength":1},"prompt_cache_key":{"type":"string","minLength":1},"prompt_cache_retention":{"anyOf":[{"type":"string","enum":["in_memory","in-memory","24h"]},{"type":"null"}]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string","enum":["30m","12h"]}},"additionalProperties":false},"cached_content":{"type":"string","minLength":1},"google":{"type":"object","properties":{"cached_content":{"type":"string","minLength":1},"thinking_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"thinking_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"extra_body":{"type":"object","properties":{"cached_content":{"type":"string","minLength":1},"google":{"type":"object","properties":{"cached_content":{"type":"string","minLength":1},"thinking_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"thinking_config":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"additionalProperties":false},"requesty":{"type":"object","properties":{"auto_cache":{"type":"boolean"}},"required":["auto_cache"],"additionalProperties":false},"verbosity":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}]},"response_format":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"json_schema":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":["string","null"]},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":["boolean","null"]}},"required":["schema"],"additionalProperties":false}},"required":["type","json_schema"],"additionalProperties":false}]},{"type":"null"}]},"web_search_options":{"type":"object","properties":{"search_context_size":{"type":"string","enum":["low","medium","high"]},"user_location":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"approximate"},"approximate":{"type":"object","properties":{"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"region":{"type":"string"},"timezone":{"type":"string"}},"additionalProperties":false}},"required":["type","approximate"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"stream_options":{"anyOf":[{"type":"object","properties":{"include_usage":{"type":"boolean"},"include_obfuscation":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"stream":{"type":["boolean","null"]},"max_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"max_completion_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"reasoning":{"type":"object","properties":{"enabled":{"type":"boolean"},"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh"]},"max_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"exclude":{"type":"boolean"}},"additionalProperties":false},"include_reasoning":{"type":"boolean"},"top_k":{"type":"integer","minimum":0,"maximum":9007199254740991},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"providerOptions":{"type":"object","properties":{"gateway":{"type":"object","properties":{"caching":{"type":"string","const":"auto"}},"additionalProperties":false}},"additionalProperties":false},"provider":{"type":"object","properties":{"data_collection":{"type":"string","enum":["allow","deny"]},"zdr":{"type":"boolean"}}},"usage":{"type":"object","properties":{"include":{"type":"boolean"}},"additionalProperties":false},"models":{"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"plugins":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"debug":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["model","messages"]},"createMessageRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}}]},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}},"required":["type","content"],"additionalProperties":false}]},"title":{"type":["string","null"]},"context":{"type":["string","null"]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result"},"source":{"type":"string"},"title":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source","title","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking"},"thinking":{"type":"string"},"signature":{"type":"string","minLength":1}},"required":["type","thinking","signature"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redacted_thinking"},"data":{"type":"string","minLength":1}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_use"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"toolset_name":{"type":["string","null"]},"caller":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"direct"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["code_execution_20250825","code_execution_20260120"]},"tool_id":{"type":"string","minLength":1}},"required":["type","tool_id"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}},"required":["type","content"],"additionalProperties":false}]},"title":{"type":["string","null"]},"context":{"type":["string","null"]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result"},"source":{"type":"string"},"title":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source","title","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_reference"},"tool_name":{"type":"string","minLength":1,"maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_name"],"additionalProperties":false}]}}]},"is_error":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_use_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"server_tool_use"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","id","name","input"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"web_search_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"web_fetch_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"code_execution_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"bash_code_execution_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"text_editor_code_execution_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"tool_search_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"mcp_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}}]},"is_error":{"type":"boolean"},"cache_control":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]}},"required":["type","tool_use_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"mcp_tool_use"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"server_name":{"type":"string","minLength":1},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","id","name","server_name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":["string","null"]},"encrypted_content":{"type":["string","null"]},"signature":{"type":["string","null"]},"cache_control":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"tool_changes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tool_addition","tool_removal"]},"tool":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cache_control":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]}},"required":["type","tool"],"additionalProperties":false}},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false}},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"custom"},"strict":{"type":"boolean"},"input_examples":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"allowed_callers":{"type":"array","items":{"type":"string","minLength":1}},"defer_loading":{"type":"boolean"},"eager_input_streaming":{"type":["boolean","null"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["name","input_schema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"max_uses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"allowed_domains":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"blocked_domains":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["type","name"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"required":["type","name"],"additionalProperties":{}}]}},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto","any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool"},"name":{"type":"string","minLength":1,"maxLength":200},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false}]},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"top_k":{"type":"integer","minimum":0,"maximum":9007199254740991},"service_tier":{"type":"string","enum":["auto","standard_only"]},"inference_geo":{"anyOf":[{"type":"string","enum":["global","us"]},{"type":"null"}]},"speed":{"anyOf":[{"type":"string","enum":["standard","fast"]},{"type":"null"}]},"container":{"anyOf":[{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"skills":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["anthropic","custom"]},"skill_id":{"type":"string","minLength":1},"version":{"type":"string"}},"required":["type","skill_id"],"additionalProperties":false}},{"type":"null"}]}},"additionalProperties":false}]},{"type":"null"}]},"context_management":{"anyOf":[{"type":"object","properties":{"edits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"clear_tool_uses_20250919"},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_tokens"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_uses"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false}]},"keep":{"type":"object","properties":{"type":{"type":"string","const":"tool_uses"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},"clear_at_least":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_tokens"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},{"type":"null"}]},"clear_tool_inputs":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]},"exclude_tools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"clear_thinking_20251015"},"keep":{"anyOf":[{"type":"string","const":"all"},{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking_turns"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compact_20260112"},"instructions":{"type":["string","null"]},"pause_after_compaction":{"type":"boolean"},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_tokens"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}}},"additionalProperties":false},{"type":"null"}]},"diagnostics":{"anyOf":[{"type":"object","properties":{"previous_message_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"mcp_servers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"url"},"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"authorization_token":{"type":["string","null"]},"tool_configuration":{"anyOf":[{"type":"object","properties":{"enabled":{"type":["boolean","null"]},"allowed_tools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["type","name","url"],"additionalProperties":false}},"output_format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false},{"type":"null"}]},"stop_sequences":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]},"metadata":{"anyOf":[{"type":"object","properties":{"user_id":{"type":["string","null"]}},"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"thinking":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"enabled"},"budget_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"display":{"anyOf":[{"type":"string","enum":["summarized","omitted"]},{"type":"null"}]},"block_binding":{"anyOf":[{"type":"object","properties":{"prefix_mismatch_behavior":{"anyOf":[{"type":"string","enum":["error","drop_block"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["type","budget_tokens"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"adaptive"},"display":{"anyOf":[{"type":"string","enum":["summarized","omitted"]},{"type":"null"}]},"block_binding":{"anyOf":[{"type":"object","properties":{"prefix_mismatch_behavior":{"anyOf":[{"type":"string","enum":["error","drop_block"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"disabled"}},"required":["type"],"additionalProperties":false}]},"output_config":{"type":"object","properties":{"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"stream":{"default":false,"type":"boolean"},"max_tokens":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["model","messages","max_tokens"],"additionalProperties":false},"createEmbeddingsRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"input":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}},{"minItems":1,"type":"array","items":{"minItems":1,"type":"array","items":{"type":"integer","minimum":0,"maximum":9007199254740991}}}]},"dimensions":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"encoding_format":{"anyOf":[{"type":"string","enum":["float","base64"]},{"type":"null"}]},"input_type":{"type":"string","minLength":1},"user":{"type":"string","minLength":1}},"required":["model","input"],"additionalProperties":false},"createResponseRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"input":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_data":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_url":{"type":"string","format":"uri"},"filename":{"type":"string","minLength":1}},"required":["type","file_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"annotations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":{}}},"logprobs":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["type","text"],"additionalProperties":false}]}}]},"type":{"type":"string","const":"message"},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"phase":{"anyOf":[{"type":"string","enum":["commentary","final_answer"]},{"type":"null"}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"message"},"id":{"type":"string","minLength":1},"role":{"type":"string","const":"assistant"},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"phase":{"anyOf":[{"type":"string","enum":["commentary","final_answer"]},{"type":"null"}]},"content":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"annotations":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","minLength":1}},"required":["type"],"additionalProperties":{}}},"logprobs":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"refusal"},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false}]}}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"function_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string"},"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"namespace":{"type":"string","minLength":1},"created_by":{"type":"string","minLength":1}},"required":["type","call_id","name","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"function_call_output"},"call_id":{"type":"string","minLength":1},"output":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_data":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_url":{"type":"string","format":"uri"},"filename":{"type":"string","minLength":1}},"required":["type","file_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false}]}}]},"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["in_progress","completed","incomplete"]},{"type":"null"}]}},"required":["type","call_id","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom_tool_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"string"},"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"namespace":{"type":"string","minLength":1},"created_by":{"type":"string","minLength":1}},"required":["type","call_id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom_tool_call_output"},"call_id":{"type":"string","minLength":1},"output":{"anyOf":[{"type":"string"},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_data":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_url":{"type":"string","format":"uri"},"filename":{"type":"string","minLength":1}},"required":["type","file_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false}]}}]},"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"status":{"anyOf":[{"type":"string","enum":["in_progress","completed","incomplete"]},{"type":"null"}]}},"required":["type","call_id","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reasoning"},"id":{"type":"string","minLength":1},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"summary_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"reasoning_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}},"encrypted_content":{"type":["string","null"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"format":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]}},"required":["type","id","summary"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"encrypted_content":{"type":"string","minLength":1},"id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"created_by":{"type":"string","minLength":1}},"required":["type","encrypted_content"],"additionalProperties":false},{"type":"object","properties":{"id":{"type":"string","minLength":1},"type":{"anyOf":[{"type":"string","const":"item_reference"},{"type":"null"}]}},"required":["id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_call"},"id":{"type":"string","minLength":1},"status":{"type":"string","enum":["in_progress","searching","completed","failed"]},"action":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"search"},"query":{"type":"string"},"queries":{"type":"array","items":{"type":"string"}},"sources":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","minLength":1}},"required":["type","url"],"additionalProperties":{}}}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"open_page"},"url":{"type":["string","null"]}},"required":["type"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"find_in_page"},"pattern":{"type":"string"},"url":{"type":"string","minLength":1}},"required":["type","pattern","url"],"additionalProperties":{}}]}},"required":["type","id","status","action"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"file_search_call"},"id":{"type":"string","minLength":1},"queries":{"type":"array","items":{"type":"string"}},"status":{"type":"string","enum":["in_progress","searching","completed","incomplete","failed"]},"results":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"attributes":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":["string","number","boolean"]}},{"type":"null"}]},"file_id":{"type":"string","minLength":1},"filename":{"type":"string"},"score":{"type":"number"},"text":{"type":"string"}},"additionalProperties":{}}},{"type":"null"}]}},"required":["type","id","queries","status"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"code_interpreter_call"},"id":{"type":"string","minLength":1},"code":{"type":["string","null"]},"container_id":{"type":"string","minLength":1},"outputs":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"logs"},"logs":{"type":"string"}},"required":["type","logs"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"url":{"type":"string","minLength":1}},"required":["type","url"],"additionalProperties":false}]}},{"type":"null"}]},"status":{"type":"string","enum":["in_progress","completed","incomplete","interpreting","failed"]}},"required":["type","id","code","container_id","outputs","status"],"additionalProperties":false}]}}]},"previous_response_id":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"prompt":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","minLength":1},"version":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"variables":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"anyOf":[{"type":"string"},{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"image_url":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"detail":{"type":"string","enum":["auto","low","high","original"]}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_data":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_url":{"type":"string","format":"uri"},"filename":{"type":"string","minLength":1}},"required":["type","file_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"prompt_cache_breakpoint":{"type":"object","properties":{"mode":{"type":"string","const":"explicit"},"ttl":{"type":"string","enum":["30m","12h"]}},"required":["mode"],"additionalProperties":false},"file_id":{"type":"string","minLength":1},"filename":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false}]}]}},{"type":"null"}]}},"required":["id"],"additionalProperties":false},{"type":"null"}]},"instructions":{"type":["string","null"]},"metadata":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"type":"string"}},{"type":"null"}]},"user":{"type":"string","minLength":1},"session_id":{"type":"string","minLength":1,"maxLength":256},"safety_identifier":{"type":"string","minLength":1},"prompt_cache_key":{"type":"string","minLength":1},"prompt_cache_retention":{"anyOf":[{"type":"string","enum":["in_memory","in-memory","24h"]},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"prompt_cache_options":{"type":"object","properties":{"mode":{"type":"string","enum":["implicit","explicit"]},"ttl":{"type":"string","enum":["30m","12h"]}},"additionalProperties":false},"caching":{"type":"string","const":"auto"},"cache_ttl":{"type":"string","enum":["5m","1h"]},"cache_anchor_items":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"providerOptions":{"type":"object","properties":{"gateway":{"type":"object","properties":{"caching":{"type":"string","const":"auto"}},"additionalProperties":false}},"additionalProperties":false},"tools":{"anyOf":[{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"parameters":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"grammar"},"definition":{"type":"string"},"syntax":{"type":"string","enum":["lark","regex"]}},"required":["type","definition","syntax"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search_preview","web_search_preview_2025_03_11"]},"search_context_size":{"type":"string","enum":["low","medium","high"]},"user_location":{"type":"object","properties":{"type":{"type":"string","const":"approximate"},"city":{"type":"string"},"country":{"type":"string","minLength":2,"maxLength":2},"region":{"type":"string"},"timezone":{"type":"string"}},"required":["type"],"additionalProperties":false}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file_search"},"vector_store_ids":{"minItems":1,"type":"array","items":{"type":"string","minLength":1}},"filters":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"null"}]},"max_num_results":{"type":"integer","minimum":1,"maximum":50},"ranking_options":{"type":"object","properties":{"hybrid_search":{"type":"object","properties":{"embedding_weight":{"type":"number"},"text_weight":{"type":"number"}},"required":["embedding_weight","text_weight"],"additionalProperties":false},"ranker":{"type":"string","enum":["auto","default-2024-11-15"]},"score_threshold":{"type":"number","minimum":0,"maximum":1}},"additionalProperties":false}},"required":["type","vector_store_ids"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"code_interpreter"},"container":{"anyOf":[{"type":"string","minLength":1},{"type":"object","properties":{"type":{"type":"string","const":"auto"},"file_ids":{"type":"array","items":{"type":"string","minLength":1}},"memory_limit":{"anyOf":[{"type":"string","enum":["1g","4g","16g","64g"]},{"type":"null"}]},"network_policy":{"type":"object","properties":{"type":{"type":"string","const":"disabled"}},"required":["type"],"additionalProperties":false}},"required":["type"],"additionalProperties":false}]}},"required":["type","container"],"additionalProperties":false}]}},{"type":"null"}]},"tool_choice":{"anyOf":[{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_preview"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file_search"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"code_interpreter"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"allowed_tools"},"mode":{"type":"string","enum":["auto","required"]},"tools":{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom"},"name":{"type":"string","minLength":1,"maxLength":200}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","mode","tools"],"additionalProperties":false}]},{"type":"null"}]},"stream":{"type":["boolean","null"]},"stream_options":{"anyOf":[{"type":"object","properties":{"include_obfuscation":{"type":"boolean"}},"additionalProperties":false},{"type":"null"}]},"max_output_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"include":{"anyOf":[{"maxItems":32,"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"truncation":{"anyOf":[{"type":"string","enum":["auto","disabled"]},{"type":"null"}]},"service_tier":{"anyOf":[{"type":"string","enum":["auto","default","flex","scale","priority"]},{"type":"null"}]},"store":{"type":["boolean","null"]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"frequency_penalty":{"anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"presence_penalty":{"anyOf":[{"type":"number","minimum":-2,"maximum":2},{"type":"null"}]},"top_logprobs":{"anyOf":[{"type":"integer","minimum":0,"maximum":20},{"type":"null"}]},"parallel_tool_calls":{"type":["boolean","null"]},"text":{"anyOf":[{"type":"object","properties":{"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"name":{"type":"string","minLength":1,"maxLength":200},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"strict":{"type":"boolean"}},"required":["type","name","schema"],"additionalProperties":false}]},"verbosity":{"type":"string","enum":["low","medium","high"]}},"additionalProperties":false},{"type":"null"}]},"reasoning":{"anyOf":[{"type":"object","properties":{"effort":{"type":"string","enum":["none","minimal","low","medium","high","xhigh"]},"summary":{"type":"string","enum":["auto","concise","detailed"]}},"additionalProperties":false},{"type":"null"}]}},"required":["model"],"additionalProperties":false},"createDecisionRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"prompt_cache_key":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}]},"prompt_cache_options":{"anyOf":[{"type":"object","properties":{"mode":{"anyOf":[{"type":"string","enum":["implicit","explicit"]},{"type":"null"}]},"ttl":{"type":"string","const":"30m"}},"additionalProperties":false},{"type":"null"}]},"safety_identifier":{"anyOf":[{"type":"string","maxLength":128},{"type":"null"}]},"input":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["user","developer","system"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","enum":["low","high","auto","original"]},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_json"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}},{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}}}]}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","const":"assistant"},"phase":{"anyOf":[{"type":"string","enum":["commentary","final_answer"]},{"type":"null"}]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","enum":["low","high","auto","original"]},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_json"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}},{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}}}]}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}]},{"type":"object","properties":{"type":{"type":"string","const":"refusal"},"refusal":{"type":"string"}},"required":["type","refusal"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"function_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"arguments":{"type":"string"},"namespace":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"id":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["in_progress","completed","incomplete"]},{"type":"null"}]}},"required":["type","call_id","name","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"custom_tool_call"},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"string"},"namespace":{"anyOf":[{"type":"string","minLength":1},{"type":"null"}]},"id":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["in_progress","completed","incomplete"]},{"type":"null"}]}},"required":["type","call_id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["function_call_output","custom_tool_call_output"]},"call_id":{"type":"string","minLength":1},"output":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","enum":["low","high","auto","original"]},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","image_url"],"additionalProperties":false}]}}]},"id":{"type":["string","null"]},"status":{"anyOf":[{"type":"string","enum":["in_progress","completed","incomplete"]},{"type":"null"}]}},"required":["type","call_id","output"],"additionalProperties":false}]}}]},"questions":{"minItems":1,"maxItems":400,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"predicate"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","enum":["low","high","auto","original"]},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_json"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}},{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}}}]}},"required":["type","data"],"additionalProperties":false}]}}]}},"required":["type","instructions"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"choice"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","enum":["low","high","auto","original"]},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_json"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}},{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}}}]}},"required":["type","data"],"additionalProperties":false}]}}]},"choices":{"minItems":2,"maxItems":255,"type":"array","items":{"type":"object","properties":{"value":{"type":["string","boolean"]},"description":{"type":"string"}},"required":["value"],"additionalProperties":false}}},"required":["type","instructions","choices"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"score"},"name":{"type":"string"},"instructions":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string","minLength":1},"detail":{"anyOf":[{"type":"string","enum":["low","high","auto","original"]},{"type":"null"}]},"prompt_cache_breakpoint":{"anyOf":[{"type":"object","properties":{"mode":{"type":"string","const":"explicit"}},"required":["mode"],"additionalProperties":false},{"type":"null"}]}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_json"},"data":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}},{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}}}]}},"required":["type","data"],"additionalProperties":false}]}}]},"levels":{"minItems":2,"maxItems":10,"type":"array","items":{"type":"object","properties":{"label":{"type":"string","minLength":1},"description":{"type":"string"}},"required":["label"],"additionalProperties":false}}},"required":["type","instructions","levels"],"additionalProperties":false}]}}},"required":["model","input","questions"],"additionalProperties":false,"$defs":{"__schema0":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema0"}}]},"__schema1":{"anyOf":[{"type":"string"},{"type":"number"},{"type":"boolean"},{"type":"null"},{"type":"array","items":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{"$ref":"#/components/schemas/createDecisionRequest/$defs/__schema1"}}]}}},"createRerankRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"query":{"type":"string","minLength":1},"documents":{"minItems":1,"maxItems":1000,"type":"array","items":{"type":"string","minLength":1}},"top_n":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["model","query","documents"],"additionalProperties":false},"generateImageRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":32000},"n":{"type":"number","const":1},"response_format":{"type":"string","const":"b64_json"}},"required":["model","prompt"],"additionalProperties":false},"editImageRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":32000},"n":{"type":"number","const":1},"response_format":{"type":"string","const":"b64_json"},"image":{"type":"string","minLength":1}},"required":["model","prompt","image"],"additionalProperties":false},"createSpeechRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"string"},"voice":{"type":"string","minLength":1,"maxLength":128},"response_format":{"type":"string","enum":["mp3","pcm"]}},"required":["model","input","voice"],"additionalProperties":false},"countMessageTokensRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant","system"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}},"required":["type","content"],"additionalProperties":false}]},"title":{"type":["string","null"]},"context":{"type":["string","null"]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result"},"source":{"type":"string"},"title":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source","title","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking"},"thinking":{"type":"string"},"signature":{"type":"string","minLength":1}},"required":["type","thinking","signature"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"redacted_thinking"},"data":{"type":"string","minLength":1}},"required":["type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_use"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1,"maxLength":200},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"toolset_name":{"type":["string","null"]},"caller":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"direct"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["code_execution_20250825","code_execution_20260120"]},"tool_id":{"type":"string","minLength":1}},"required":["type","tool_id"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","const":"application/pdf"},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"text"},"media_type":{"type":"string","const":"text/plain"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content"},"content":{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"file"},"file_id":{"type":"string","minLength":1}},"required":["type","file_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string","minLength":1},"data":{"type":"string","minLength":1}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string","format":"uri"}},"required":["type","url"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false}]}}},"required":["type","content"],"additionalProperties":false}]},"title":{"type":["string","null"]},"context":{"type":["string","null"]},"citations":{"anyOf":[{"type":"object","properties":{"enabled":{"type":"boolean"}},"required":["enabled"],"additionalProperties":false},{"type":"null"}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result"},"source":{"type":"string"},"title":{"type":"string"},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}},"citations":{"type":"object","properties":{"enabled":{"type":"boolean"}},"additionalProperties":false},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","source","title","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_reference"},"tool_name":{"type":"string","minLength":1,"maxLength":200},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_name"],"additionalProperties":false}]}}]},"is_error":{"type":"boolean"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","tool_use_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"server_tool_use"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","id","name","input"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"web_search_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"array","items":{}},{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}]}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"web_fetch_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"code_execution_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"bash_code_execution_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"text_editor_code_execution_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"tool_search_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},{"type":"array","items":{}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id","content"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string","const":"mcp_tool_result"},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}}]},"is_error":{"type":"boolean"},"cache_control":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]}},"required":["type","tool_use_id"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"mcp_tool_use"},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"server_name":{"type":"string","minLength":1},"input":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["type","id","name","server_name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compaction"},"content":{"type":["string","null"]},"encrypted_content":{"type":["string","null"]},"signature":{"type":["string","null"]},"cache_control":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]},"tool_changes":{"anyOf":[{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["tool_addition","tool_removal"]},"tool":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cache_control":{"anyOf":[{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},{"type":"null"}]}},"required":["type","tool"],"additionalProperties":false}},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false}},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"citations":{"anyOf":[{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"char_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_char_index":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_char_index","end_char_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"page_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"end_page_number":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_page_number","end_page_number"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"content_block_location"},"cited_text":{"type":"string"},"document_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"document_title":{"type":["string","null"]},"file_id":{"type":["string","null"]},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","document_index","document_title","start_block_index","end_block_index"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"web_search_result_location"},"cited_text":{"type":"string"},"encrypted_index":{"type":"string","minLength":1},"title":{"type":["string","null"]},"url":{"type":"string","format":"uri"}},"required":["type","cited_text","encrypted_index","title","url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"search_result_location"},"cited_text":{"type":"string"},"search_result_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"source":{"type":"string"},"start_block_index":{"type":"integer","minimum":0,"maximum":9007199254740991},"end_block_index":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991}},"required":["type","cited_text","search_result_index","source","start_block_index","end_block_index"],"additionalProperties":false}]}},{"type":"null"}]}},"required":["type","text"],"additionalProperties":false}}]},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"custom"},"strict":{"type":"boolean"},"input_examples":{"type":"array","items":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"allowed_callers":{"type":"array","items":{"type":"string","minLength":1}},"defer_loading":{"type":"boolean"},"eager_input_streaming":{"type":["boolean","null"]},"name":{"type":"string","minLength":1,"maxLength":200},"description":{"type":"string"},"input_schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]}},"required":["name","input_schema"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"max_uses":{"anyOf":[{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},{"type":"null"}]},"allowed_domains":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]},"blocked_domains":{"anyOf":[{"type":"array","items":{"type":"string","minLength":1}},{"type":"null"}]}},"required":["type","name"],"additionalProperties":{}},{"type":"object","properties":{"type":{"type":"string"},"name":{"type":"string"}},"required":["type","name"],"additionalProperties":{}}]}},"tool_choice":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto","any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool"},"name":{"type":"string","minLength":1,"maxLength":200},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"none"}},"required":["type"],"additionalProperties":false}]},"thinking":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"enabled"},"budget_tokens":{"type":"integer","exclusiveMinimum":0,"maximum":9007199254740991},"display":{"anyOf":[{"type":"string","enum":["summarized","omitted"]},{"type":"null"}]},"block_binding":{"anyOf":[{"type":"object","properties":{"prefix_mismatch_behavior":{"anyOf":[{"type":"string","enum":["error","drop_block"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["type","budget_tokens"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"adaptive"},"display":{"anyOf":[{"type":"string","enum":["summarized","omitted"]},{"type":"null"}]},"block_binding":{"anyOf":[{"type":"object","properties":{"prefix_mismatch_behavior":{"anyOf":[{"type":"string","enum":["error","drop_block"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"disabled"}},"required":["type"],"additionalProperties":false}]},"cache_control":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"ephemeral"},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false},{"type":"null"}]},"output_config":{"type":"object","properties":{"effort":{"anyOf":[{"type":"string","enum":["low","medium","high","xhigh","max"]},{"type":"null"}]},"format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false},{"type":"null"}]}},"additionalProperties":false},"speed":{"anyOf":[{"type":"string","enum":["standard","fast"]},{"type":"null"}]},"context_management":{"anyOf":[{"type":"object","properties":{"edits":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","const":"clear_tool_uses_20250919"},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_tokens"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_uses"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false}]},"keep":{"type":"object","properties":{"type":{"type":"string","const":"tool_uses"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},"clear_at_least":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_tokens"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},{"type":"null"}]},"clear_tool_inputs":{"anyOf":[{"anyOf":[{"type":"boolean"},{"type":"array","items":{"type":"string"}}]},{"type":"null"}]},"exclude_tools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"clear_thinking_20251015"},"keep":{"anyOf":[{"type":"string","const":"all"},{"type":"object","properties":{"type":{"type":"string","const":"all"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking_turns"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false}]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"compact_20260112"},"instructions":{"type":["string","null"]},"pause_after_compaction":{"type":"boolean"},"trigger":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_tokens"},"value":{"type":"integer","minimum":0,"maximum":9007199254740991}},"required":["type","value"],"additionalProperties":false},{"type":"null"}]}},"required":["type"],"additionalProperties":false}]}}},"additionalProperties":false},{"type":"null"}]},"mcp_servers":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"url"},"name":{"type":"string","minLength":1},"url":{"type":"string","format":"uri"},"authorization_token":{"type":["string","null"]},"tool_configuration":{"anyOf":[{"type":"object","properties":{"enabled":{"type":["boolean","null"]},"allowed_tools":{"anyOf":[{"type":"array","items":{"type":"string"}},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]}},"required":["type","name","url"],"additionalProperties":false}},"output_format":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"json_schema"},"schema":{"type":"object","propertyNames":{"type":"string"},"additionalProperties":{}}},"required":["type","schema"],"additionalProperties":false},{"type":"null"}]},"user_profile_id":{"type":"string"},"workspace_id":{"type":"string"}},"required":["model","messages"],"additionalProperties":false},"createVideoRequest":{"type":"object","properties":{"model":{"type":"string","minLength":1,"maxLength":200},"prompt":{"type":"string","minLength":1,"maxLength":32000},"duration":{"type":"integer","minimum":1,"maximum":120},"resolution":{"type":"string","enum":["360p","480p","720p","768p","1080p","1K","2K","4K"]},"aspect_ratio":{"type":"string","enum":["16:9","9:16","1:1","4:3","3:4","3:2","2:3","21:9","9:21"]},"generate_audio":{"type":"boolean"},"seed":{"type":"integer","minimum":0,"maximum":2147483647}},"required":["model","prompt","duration"],"additionalProperties":false}},"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","bearerFormat":"Gateway v2 API key"},"apiKeyAuth":{"type":"apiKey","in":"header","name":"x-api-key"},"gatewayHeaderAuth":{"type":"apiKey","in":"header","name":"X-Memory-Gateway-Authorization","description":"Bearer followed by the Gateway v2 key. Generated clients must supply the complete value, including the Bearer prefix. A nonempty value takes precedence over provider OAuth; conflicting gateway keys are refused. An empty value is ignored."}},"headers":{"RequestId":{"description":"Gateway-generated request correlation ID. Responses handled by v2 include this header; shared-listener v1 health and pre-initialization failures may omit it.","required":false,"schema":{"type":"string","format":"uuid"}}},"responses":{"Error":{"description":"Gateway refusal or sanitized upstream error, following the endpoint protocol. Gateway credit, budget, BYOK and rate refusal messages include a configurable dashboard help URL. Inference preserves the upstream HTTP status and allowed rate-limit metadata, never its raw body or free-form message. HTTP parser errors return generic JSON with a request ID (431 for header overflow, 408 for request receive timeout, 400 for malformed HTTP), before endpoint selection. If a response has already started, the connection closes without another HTTP response.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/GatewayError"}}},"headers":{"x-request-id":{"$ref":"#/components/headers/RequestId"}}}}}}