{"openapi":"3.0.0","paths":{"/v1/chat/completions":{"post":{"operationId":"V1InferenceController_chatCompletions","summary":"OpenAI-compatible chat completions over pooled provider capacity or an admitted private endpoint","description":"`messages[].content` takes a string or an array of up to 50 text parts (`{\"type\":\"text\",\"text\":\"…\"}`). A non-text part — `image_url` and the rest — is refused with 422 naming the part type. A text part or a tool definition may carry `cache_control: {\"type\":\"ephemeral\",\"ttl\":\"5m\"|\"1h\"}` to mark a cache breakpoint: it reaches Anthropic-served models as a native block. A marker on a part with no text is refused with 422 naming the part, and how many breakpoints one request may carry is capped by the provider — above that cap the provider refuses the request and its own explanation comes back in the error. On every other provider the parts are joined into a single string and the marker is removed before the call — the request is served normally, with no error and no warning. Those vendors may still cache implicitly; a hit reported in the usage shape the exchange reads for that vendor is billed at the cache-read price, and a hit reported in any other shape is billed as fresh input.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequestDto"}}}},"responses":{"200":{"description":"`stream: false` answers with a single chat completion. `stream: true` answers with an SSE stream closed by a `data: [DONE]` frame, whose `data:` frames carry chunks — the final chunk carrying `usage` and the settled `x_credits_*` fields — except when the stream breaks after its first output (`stream_interrupted`) or the request fails after the answer was delivered in full (`internal_error`), either of which sends one error envelope in place of the final chunk and still closes with `[DONE]`. In both, `usage` is what the request was billed for: the vendor's counts, with a side the vendor did not report measured.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponseDto"}},"text/event-stream":{"schema":{"oneOf":[{"$ref":"#/components/schemas/ChatCompletionChunkDto"},{"$ref":"#/components/schemas/ErrorEnvelope"}]}}}},"401":{"description":"`invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"402":{"description":"`insufficient_balance` — The account's $COMPUTE balance is below the requested amount.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"insufficient_balance":{"summary":"insufficient_balance","value":{"error":{"message":"The account's $COMPUTE balance is below the requested amount.","type":"insufficient_quota","code":"insufficient_balance"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests. | `forbidden` — The caller is authenticated but is not allowed to perform this action. | `model_restricted` — The requested model is not in this key's allowed-models list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}},"forbidden":{"summary":"forbidden","value":{"error":{"message":"The caller is authenticated but is not allowed to perform this action.","type":"forbidden","code":"forbidden"}}},"model_restricted":{"summary":"model_restricted","value":{"error":{"message":"The requested model is not in this key's allowed-models list.","type":"forbidden","code":"model_restricted"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"413":{"description":"`payload_too_large` — The request body is larger than the exchange accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"payload_too_large":{"summary":"payload_too_large","value":{"error":{"message":"The request body is larger than the exchange accepts.","type":"invalid_request_error","code":"payload_too_large"}}}}}}},"422":{"description":"`validation_failed` — The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`. | `offer_unavailable` — A model a supplier offers to the key's pool cannot serve this request. | `upstream_rejected` — The upstream the request was routed to refused it as invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_failed":{"summary":"validation_failed","value":{"error":{"message":"The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`.","type":"invalid_request_error","code":"validation_failed"}}},"offer_unavailable":{"summary":"offer_unavailable","value":{"error":{"message":"A model a supplier offers to the key's pool cannot serve this request.","type":"invalid_request_error","code":"offer_unavailable"}}},"upstream_rejected":{"summary":"upstream_rejected","value":{"error":{"message":"The upstream the request was routed to refused it as invalid.","type":"invalid_request_error","code":"upstream_rejected"}}}}}}},"429":{"description":"`spending_limit_reached` — A spending cap has been reached. | `rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"spending_limit_reached":{"summary":"spending_limit_reached","value":{"error":{"message":"A spending cap has been reached.","type":"rate_limit_error","code":"spending_limit_reached"}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}},"502":{"description":"`all_routes_exhausted` — No upstream capacity could serve the routed models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"all_routes_exhausted":{"summary":"all_routes_exhausted","value":{"error":{"message":"No upstream capacity could serve the routed models.","type":"server_error","code":"all_routes_exhausted"}}}}}}},"503":{"description":"`service_unavailable` — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"service_unavailable":{"summary":"service_unavailable","value":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}},"504":{"description":"`deadline_exceeded` — The request ran out of time before any upstream produced output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"deadline_exceeded":{"summary":"deadline_exceeded","value":{"error":{"message":"The request ran out of time before any upstream produced output.","type":"server_error","code":"deadline_exceeded"}}}}}}}},"tags":["Inference"]}},"/v1/usage":{"get":{"operationId":"V1InferenceController_usage","summary":"Account balance and cumulative spend, plus the calling key's caps and what is left","description":"The balance, the cumulative spend and the prompt-cache counters belong to the account behind the key. `dailyLimit` / `monthlyLimit` and `dailyUsed` / `monthlyUsed` are the key's own; `dailyRemaining` and `monthlyRemaining` are the tighter of the key's and the account's, and `weeklyRemaining` is the account's, because a weekly cap exists only there. Cache tokens come back as `cachedInputTokens` (reads), `cacheWrite5mTokens` and `cacheWrite1hTokens` (writes, split by the lifetime each was written at, because the two are priced separately). Each stays `null` until at least one settled request on the account recorded a non-zero count of that kind, so an account that has never used caching carries `null` for all three. The counters are incremented from the same breakdown the receipt stores, so they are exactly the token counts the charges were computed from. A hit a vendor reports in a shape the exchange does not read is billed as fresh input and is absent from these counts; the write counters move only for vendors whose cache write the exchange prices as a write, and only Anthropic reports the two lifetimes apart. Per request, `/v1/chat/completions` reports reads as `usage.prompt_tokens_details.cached_tokens` and collapses both write lifetimes into `usage.prompt_tokens_details.cache_creation_tokens`; only `/v1/messages` splits them, as `usage.cache_creation.ephemeral_5m_input_tokens` and `ephemeral_1h_input_tokens`.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageResponseDto"}}}},"401":{"description":"`unauthorized` — Authentication is required to access this endpoint. | `invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"unauthorized":{"summary":"unauthorized","value":{"error":{"message":"Authentication is required to access this endpoint.","type":"invalid_request_error","code":"unauthorized"}}},"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}}},"tags":["Usage"]}},"/v1/messages":{"post":{"operationId":"V1MessagesController_messages","summary":"Anthropic-compatible messages over pooled provider capacity or an admitted private endpoint","description":"`messages[].content` takes a string or up to 200 blocks of type `text`, `tool_use` or `tool_result`; `system` takes a string or up to 20 `text` blocks; a `tool_result` holds up to 50 `text` blocks. Any other block type is refused with 422 naming it. A `text` block — in `messages[]`, in `system`, or inside a `tool_result` — and a `tools[]` entry may carry `cache_control: {\"type\":\"ephemeral\",\"ttl\":\"5m\"|\"1h\"}`. A marker on a block with no text is refused with 422 naming the block, as is one on the `tool_result` block itself rather than on a text block inside it; how many breakpoints one request may carry is capped by the provider, and above that cap the provider refuses the request and its own explanation comes back in the error. The breakpoint reaches Anthropic-served models in that native form; naming a model on another provider removes it before the call and the request is served normally. That vendor may still cache implicitly; a hit reported in the usage shape the exchange reads for that vendor is billed at the cache-read price, and a hit reported in any other shape is billed as fresh input. Usage returns in the native fields `cache_read_input_tokens` and `cache_creation`.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessagesRequestDto"}}}},"responses":{"200":{"description":"`stream: false` answers with a single message. `stream: true` answers with an SSE stream of named events — `message_start`, `content_block_start`, `content_block_delta`, `content_block_stop`, `message_delta`, `message_stop`, and `error` when the stream breaks after its first output or the request fails after the answer was delivered in full — whose `data:` frame carries the event named by the frame's `event:` line.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessageResponseDto"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/AnthropicMessageStreamEventDto"}}}},"401":{"description":"`invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"402":{"description":"`insufficient_balance` — The account's $COMPUTE balance is below the requested amount.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"insufficient_balance":{"summary":"insufficient_balance","value":{"error":{"message":"The account's $COMPUTE balance is below the requested amount.","type":"insufficient_quota","code":"insufficient_balance"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests. | `forbidden` — The caller is authenticated but is not allowed to perform this action. | `model_restricted` — The requested model is not in this key's allowed-models list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}},"forbidden":{"summary":"forbidden","value":{"error":{"message":"The caller is authenticated but is not allowed to perform this action.","type":"forbidden","code":"forbidden"}}},"model_restricted":{"summary":"model_restricted","value":{"error":{"message":"The requested model is not in this key's allowed-models list.","type":"forbidden","code":"model_restricted"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"413":{"description":"`payload_too_large` — The request body is larger than the exchange accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"payload_too_large":{"summary":"payload_too_large","value":{"error":{"message":"The request body is larger than the exchange accepts.","type":"invalid_request_error","code":"payload_too_large"}}}}}}},"422":{"description":"`validation_failed` — The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`. | `offer_unavailable` — A model a supplier offers to the key's pool cannot serve this request. | `upstream_rejected` — The upstream the request was routed to refused it as invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_failed":{"summary":"validation_failed","value":{"error":{"message":"The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`.","type":"invalid_request_error","code":"validation_failed"}}},"offer_unavailable":{"summary":"offer_unavailable","value":{"error":{"message":"A model a supplier offers to the key's pool cannot serve this request.","type":"invalid_request_error","code":"offer_unavailable"}}},"upstream_rejected":{"summary":"upstream_rejected","value":{"error":{"message":"The upstream the request was routed to refused it as invalid.","type":"invalid_request_error","code":"upstream_rejected"}}}}}}},"429":{"description":"`spending_limit_reached` — A spending cap has been reached. | `rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"spending_limit_reached":{"summary":"spending_limit_reached","value":{"error":{"message":"A spending cap has been reached.","type":"rate_limit_error","code":"spending_limit_reached"}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}},"502":{"description":"`all_routes_exhausted` — No upstream capacity could serve the routed models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"all_routes_exhausted":{"summary":"all_routes_exhausted","value":{"error":{"message":"No upstream capacity could serve the routed models.","type":"server_error","code":"all_routes_exhausted"}}}}}}},"503":{"description":"`service_unavailable` — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"service_unavailable":{"summary":"service_unavailable","value":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}},"504":{"description":"`deadline_exceeded` — The request ran out of time before any upstream produced output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"deadline_exceeded":{"summary":"deadline_exceeded","value":{"error":{"message":"The request ran out of time before any upstream produced output.","type":"server_error","code":"deadline_exceeded"}}}}}}}},"tags":["Inference"]}},"/v1/responses":{"post":{"operationId":"V1ResponsesController_responses","summary":"OpenAI-compatible Responses API over pooled provider capacity or an admitted private endpoint","description":"Accepts a closed grammar — every field, input item, content part and tool type outside it is refused with 422 naming it. `model` must name a model; `auto` is refused. A supplier's model whose declaration lists the `responses` operation is served natively by its endpoint's own Responses API; every other model is served over chat completions, which carries messages, function/custom calls and their outputs — each tool inside a `namespace` tool as one chat tool named `<namespace>__<name>`, its calls answered with `name` and `namespace` — and refuses a replayed `reasoning` item (`history_unavailable`). Custom tools preserve raw input and text/Lark/regex formats; the serving operation must advertise each required format in `customToolFormats`, otherwise `validation_failed`. Client-executed `tool_search` with a parameters schema works through ordinary function calling on these models; replayed search outputs and `additional_tools` activate only the loaded tools. Native Responses forwards `tool_search`, `tool_search_call`, `tool_search_output`, `additional_tools` and `defer_loading` when the upstream supports them. The exchange keeps no response state: `previous_response_id` and `store: true` answer `history_unsupported`, and every turn sends the whole conversation in `input`. A reasoning item's `encrypted_content` is marked with the model that produced it, and replaying it to another model answers `history_unavailable`. Hosted tools are not run — `web_search` and the rest answer `operation_unsupported`; in Codex set `web_search = \"disabled\"`. Compaction is an ordinary request. The WebSocket transport is not offered.","parameters":[],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesRequestDto"}}}},"responses":{"200":{"description":"`stream: false` answers with one response object. `stream: true` answers with an SSE stream of `event:`-named Responses events — on a model served natively every event its endpoint emits, of any type, beside the ones the schema lists, which are those the exchange writes itself — that ends with `response.completed` or `response.incomplete` carrying `usage`, or, when the stream breaks after its first output, with `response.failed` whose `error.code` is `stream_interrupted` and no `response.completed`. A stream that has written nothing for 15 seconds writes `response.in_progress` with the response so far, until its terminal event. `usage`, on the body and on the terminal event alike, is what the request was billed for — the counts the upstream reported, with a side a catalogue model's vendor left out measured — and null when nothing was billed: an answer of no tokens, or a supplier's answer without valid usage. A streamed request whose input exceeds the model's context — refused before anything is held, or reported by the upstream before its first output — answers 200 with `response.created` and `response.failed` whose `error.code` is `context_length_exceeded`, the code that tells a Responses client its context is full, so it can trim or compact its history; unstreamed, it keeps its 422. `model` is always the exchange's model id.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesResponseDto"}},"text/event-stream":{"schema":{"$ref":"#/components/schemas/ResponsesStreamEventDto"}}}},"401":{"description":"`invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"402":{"description":"`insufficient_balance` — The account's $COMPUTE balance is below the requested amount.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"insufficient_balance":{"summary":"insufficient_balance","value":{"error":{"message":"The account's $COMPUTE balance is below the requested amount.","type":"insufficient_quota","code":"insufficient_balance"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests. | `forbidden` — The caller is authenticated but is not allowed to perform this action. | `model_restricted` — The requested model is not in this key's allowed-models list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}},"forbidden":{"summary":"forbidden","value":{"error":{"message":"The caller is authenticated but is not allowed to perform this action.","type":"forbidden","code":"forbidden"}}},"model_restricted":{"summary":"model_restricted","value":{"error":{"message":"The requested model is not in this key's allowed-models list.","type":"forbidden","code":"model_restricted"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"413":{"description":"`payload_too_large` — The request body is larger than the exchange accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"payload_too_large":{"summary":"payload_too_large","value":{"error":{"message":"The request body is larger than the exchange accepts.","type":"invalid_request_error","code":"payload_too_large"}}}}}}},"422":{"description":"`validation_failed` — The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`. | `operation_unsupported` — The request uses a feature the exchange does not offer on this endpoint. | `history_unsupported` — The request relies on response state the exchange does not keep. | `history_unavailable` — The conversation replays state only another backend can continue. | `offer_unavailable` — A model a supplier offers to the key's pool cannot serve this request. | `upstream_rejected` — The upstream the request was routed to refused it as invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_failed":{"summary":"validation_failed","value":{"error":{"message":"The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`.","type":"invalid_request_error","code":"validation_failed"}}},"operation_unsupported":{"summary":"operation_unsupported","value":{"error":{"message":"The request uses a feature the exchange does not offer on this endpoint.","type":"invalid_request_error","code":"operation_unsupported"}}},"history_unsupported":{"summary":"history_unsupported","value":{"error":{"message":"The request relies on response state the exchange does not keep.","type":"invalid_request_error","code":"history_unsupported"}}},"history_unavailable":{"summary":"history_unavailable","value":{"error":{"message":"The conversation replays state only another backend can continue.","type":"invalid_request_error","code":"history_unavailable"}}},"offer_unavailable":{"summary":"offer_unavailable","value":{"error":{"message":"A model a supplier offers to the key's pool cannot serve this request.","type":"invalid_request_error","code":"offer_unavailable"}}},"upstream_rejected":{"summary":"upstream_rejected","value":{"error":{"message":"The upstream the request was routed to refused it as invalid.","type":"invalid_request_error","code":"upstream_rejected"}}}}}}},"429":{"description":"`spending_limit_reached` — A spending cap has been reached. | `rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"spending_limit_reached":{"summary":"spending_limit_reached","value":{"error":{"message":"A spending cap has been reached.","type":"rate_limit_error","code":"spending_limit_reached"}}},"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}},"502":{"description":"`all_routes_exhausted` — No upstream capacity could serve the routed models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"all_routes_exhausted":{"summary":"all_routes_exhausted","value":{"error":{"message":"No upstream capacity could serve the routed models.","type":"server_error","code":"all_routes_exhausted"}}}}}}},"503":{"description":"`service_unavailable` — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"service_unavailable":{"summary":"service_unavailable","value":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}},"504":{"description":"`deadline_exceeded` — The request ran out of time before any upstream produced output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"deadline_exceeded":{"summary":"deadline_exceeded","value":{"error":{"message":"The request ran out of time before any upstream produced output.","type":"server_error","code":"deadline_exceeded"}}}}}}}},"tags":["Inference"]},"get":{"operationId":"V1ResponsesController_webSocket","summary":"WebSocket transport for Responses — not offered","description":"The Responses WebSocket transport is not implemented, so it is not advertised. A WebSocket handshake answers 426 Upgrade Required, on which Codex falls back to HTTP for the session at once; any other GET answers 422. Both carry `operation_unsupported` with `error.param` `transport`. Use `POST /v1/responses` with `stream: true`.","parameters":[],"responses":{"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"422":{"description":"`operation_unsupported` — The request uses a feature the exchange does not offer on this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"operation_unsupported":{"summary":"operation_unsupported","value":{"error":{"message":"The request uses a feature the exchange does not offer on this endpoint.","type":"invalid_request_error","code":"operation_unsupported"}}}}}}},"426":{"description":"`operation_unsupported` — a WebSocket handshake; the transport is not offered.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"}}}},"429":{"description":"`rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}}},"tags":["Inference"]}},"/v1/responses/{id}":{"get":{"operationId":"V1ResponsesController_retrieve","summary":"Retrieve a stored response — not offered","description":"The exchange stores no responses; this answers 422 `history_unsupported`.","parameters":[{"name":"id","required":true,"in":"path","description":"A response id.","schema":{}}],"responses":{"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"422":{"description":"`history_unsupported` — The request relies on response state the exchange does not keep.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"history_unsupported":{"summary":"history_unsupported","value":{"error":{"message":"The request relies on response state the exchange does not keep.","type":"invalid_request_error","code":"history_unsupported"}}}}}}},"429":{"description":"`rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}}},"tags":["Inference"]},"delete":{"operationId":"V1ResponsesController_remove","summary":"Delete a stored response — not offered","description":"The exchange stores no responses; this answers 422 `history_unsupported`.","parameters":[{"name":"id","required":true,"in":"path","description":"A response id.","schema":{}}],"responses":{"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"422":{"description":"`history_unsupported` — The request relies on response state the exchange does not keep.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"history_unsupported":{"summary":"history_unsupported","value":{"error":{"message":"The request relies on response state the exchange does not keep.","type":"invalid_request_error","code":"history_unsupported"}}}}}}},"429":{"description":"`rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}}},"tags":["Inference"]}},"/v1/inference/estimate":{"get":{"operationId":"InferenceEstimateController_estimate","summary":"Quote a request before sending it","description":"Prices a hypothetical request without spending $COMPUTE. `resolvedModel` names the model the quote belongs to — a catalogue id, or with a key a supplier's `handle/alias` — `creditsWei` the charge and `reservedWei` the hold that charge is taken from. `tierFromInputTokens` names the context tier the quote was priced at for that input, and is null on a flat-priced model; settlement re-selects the tier from the tokens the provider reports, so it decides the bill. For `auto` the quote runs the same per-request choice the send path runs, over the same candidates, and prices the model it picks: describe the request you mean to send with `promptTokens`, `reasoningRequested`, `toolsPresent` and `routing_bias`, and the quote answers for that shape. `X-Model-Chooser` on the response names what decided — `engine` for a per-request pick, `list` for the operator's order, `degraded` when the chooser failed and the order served instead. Two things the quote cannot see still move the send: a conversation already pinned to a model is served that model, and a share of `auto` traffic is held on the operator's order as a control arm. The hold covers the costliest candidate and the excess is released at settlement, so a different model answering never costs more than was held. Name a model to quote exactly what will run. The quote is advisory: it prices the token counts passed in and tokenizes nothing itself, so count a prompt with the `o200k_base` vocabulary and add 4 tokens per message plus 3 for the reply to make `promptTokens` match what a real request reserves. The key is optional (`Authorization: Bearer` or `x-api-key`). Sent with a `ct_live_*` key, the quote answers as that key's send would: a model outside its `allowedModels` is `403 model_restricted` and `auto` walks only the models they grant; a key whose account no longer owns or belongs to its pool is `403 forbidden`; and a `handle/alias` model a supplier offers to the key's pool is quoted at the supplier's price, at most the model's declared output limit, with the charge, its context tier and the hold all priced at `promptTokens` scaled by the model's declared input reserve ratio, or refused with `422 offer_unavailable` where the send would be. The send scales only a prompt's content by that ratio and adds the chat framing unscaled, so a supplier's model is quoted slightly above its real hold — by up to (reserve ratio − 1) × the framing tokens — and near the start of a context tier the quote can price one tier up, or refuse a request the send admits. Without a key such an id is an unknown model. An unknown or revoked key answers 401 and a frozen one 403.","parameters":[{"name":"routing_bias","required":false,"in":"query","schema":{"type":"string","enum":["cheaper","balanced","better"]},"description":"Leans the `auto` choice toward the cheaper or the stronger end of the operator's list, the same dial the send path takes. Sending it beside a named model is refused with `422`, because there is no choice to lean."},{"name":"toolsPresent","required":false,"in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Whether the request being quoted carries tools. A catalogue model takes them where its provider does, a supplier's model only where its declaration of the chat completions operation lists tools: for `auto` this narrows the candidates before the choice runs, and a named model that does not take them is refused — either way a `422` exactly as the send answers the same request."},{"name":"reasoningRequested","required":false,"in":"query","schema":{"type":"string","enum":["true","false"],"default":"false"},"description":"Whether the request being quoted asks for reasoning. A catalogue model reasons only where its reasoning output is priced, a supplier's model only where its declaration of the chat completions operation lists reasoning: for `auto` this narrows the candidates before the choice runs, and a named model that cannot reason is refused — either way a `422` exactly as the send answers the same request."},{"name":"completionTokens","required":false,"in":"query","schema":{"type":"integer","minimum":1,"default":500},"description":"Output-side tokens to quote."},{"name":"promptTokens","required":false,"in":"query","schema":{"type":"integer","minimum":1,"default":1000},"description":"Input-side tokens to quote. Selects the context tier on a tiered model, and is one of the signals the `auto` choice reads. A supplier's model is quoted at this count scaled by its declared input reserve ratio."},{"name":"model","required":false,"in":"query","schema":{"type":"string","default":"auto"},"description":"Catalogue id to quote, as `vendor/model` or the bare model name, matched case-insensitively, or with a key a `handle/alias` its pool is offered. Omitted or empty reads as `auto`, quoted at the catalogue model the exchange would choose for the described request."}],"responses":{"200":{"headers":{"X-Model-Chooser":{"description":"What picked the quoted model: `engine`, `list` or `degraded`. Absent when the caller named a model.","schema":{"type":"string","enum":["engine","list","degraded"]}}},"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EstimateResponseDto"}}}},"401":{"description":"`invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests. | `forbidden` — The caller is authenticated but is not allowed to perform this action. | `model_restricted` — The requested model is not in this key's allowed-models list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}},"forbidden":{"summary":"forbidden","value":{"error":{"message":"The caller is authenticated but is not allowed to perform this action.","type":"forbidden","code":"forbidden"}}},"model_restricted":{"summary":"model_restricted","value":{"error":{"message":"The requested model is not in this key's allowed-models list.","type":"forbidden","code":"model_restricted"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"422":{"description":"`validation_failed` — The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`. | `offer_unavailable` — A model a supplier offers to the key's pool cannot serve this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"validation_failed":{"summary":"validation_failed","value":{"error":{"message":"The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`.","type":"invalid_request_error","code":"validation_failed"}}},"offer_unavailable":{"summary":"offer_unavailable","value":{"error":{"message":"A model a supplier offers to the key's pool cannot serve this request.","type":"invalid_request_error","code":"offer_unavailable"}}}}}}},"429":{"description":"`rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}},"503":{"description":"`service_unavailable` — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"service_unavailable":{"summary":"service_unavailable","value":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}}},"tags":["Estimate"]}},"/v1/models/availability":{"get":{"operationId":"ModelAvailabilityController_availabilityMap","summary":"Which models the caller may name can be routed right now","description":"Per-model `routable` flag over the supply the caller can reach, plus `auto` — the model the routing directive resolves to from the operator's preference list, or null when nothing the caller may use has capacity. Sending no API key answers for the public supply; a `ct_live_*` key (`Authorization: Bearer` or `x-api-key`) bound to a pool answers for that pool only while the key's account is the pool's owner or a member — `scope` reads `pool` — and the pool is never taken from the request. The models of the offers that pool accepted are listed under their `handle/alias` ids, routable only while every operation a model declares can serve, with `availability` saying why not. A key whose account no longer owns or belongs to its pool reads `scope: detached`: the catalogue is listed with nothing routable and `auto` null. A key bound to no pool reads `scope: public` and answers for the public supply. A key restricted to a subset of models reports every model outside that subset as not routable. Answers are recomputed at most once every 10 seconds, and a pool membership change takes up to 20 seconds to show up. The map is true as of `computedAt` and advisory afterwards: capacity can still be gone by the time a request is sent, and that request answers with its own error.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelAvailabilityResponseDto"}}}},"401":{"description":"`invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"429":{"description":"`rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}},"503":{"description":"`service_unavailable` — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"service_unavailable":{"summary":"service_unavailable","value":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}}},"tags":["Models"]}},"/v1/models":{"get":{"operationId":"ModelListController_listModels","summary":"OpenAI-compatible list of the models the exchange serves","description":"A model that declares the context window its vendor serves carries maxInputTokens — a request estimated above it is refused with 422 before any upstream call. Absent means the model declares no window of its own and only the request-body ceiling bounds it. The key is optional. Sent with a `ct_live_*` key (`Authorization: Bearer` or `x-api-key`), the list also carries the models of the offers the key's pool accepted while the key's account is the pool's owner or a member — each `handle/alias`, with its operations, limits, availability and what a request is charged — both narrowed to the key's allowed models, `scope` says which universe was listed (`pool`, `public` or `detached`), and the answer is private to the key. An unknown or revoked key answers 401 and a frozen one 403 rather than the public list. Catalogue prices are at `/v1/oracle/pricing`.","parameters":[],"responses":{"200":{"description":"","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelsListResponseDto"}}}},"401":{"description":"`invalid_api_key` — The Bearer API key is missing, malformed, or not recognized. | `api_key_revoked` — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"invalid_api_key":{"summary":"invalid_api_key","value":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}},"api_key_revoked":{"summary":"api_key_revoked","value":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}}}},"403":{"description":"`api_key_frozen` — The API key is currently frozen and cannot be used for requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"api_key_frozen":{"summary":"api_key_frozen","value":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}}}}}},"405":{"description":"`method_not_allowed` — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"method_not_allowed":{"summary":"method_not_allowed","value":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}}}},"429":{"description":"`rate_limited` — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"rate_limited":{"summary":"rate_limited","value":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}}}},"500":{"description":"`internal_error` — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"internal_error":{"summary":"internal_error","value":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}}}},"503":{"description":"`service_unavailable` — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"examples":{"service_unavailable":{"summary":"service_unavailable","value":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}}},"tags":["Models"]}}},"info":{"title":"Compute Finance Inference API","description":"OpenAI- and Anthropic-compatible inference over pooled provider capacity or an admitted private endpoint. Point an official SDK at Compute Finance by swapping its base URL and passing a `ct_live_*` API key. Requests are billed against the buyer's `$COMPUTE` balance held in BuyerEscrow — a catalogue model at the metered rate published by the Oracle, a supplier's model at the price version its pool accepted.\n\nA request body may be up to 4194304 bytes — the room the largest context the exchange serves, 1048576 input tokens, needs on the wire; a larger body is refused with 413 `payload_too_large` before it is parsed. Each model may additionally declare the context window its vendor serves: an estimated input above it returns 422 `validation_failed` naming the model and its limit, before any provider call and before credits are reserved. `GET /v1/models` and `GET /v1/oracle/catalog` publish that window as `maxInputTokens`, absent on a model that declares none.\n\nCredits are reserved from an estimate of the input and settled against the token counts the provider reports. An account with nothing left to spend is refused with 402 `insufficient_balance` before its request is estimated, ahead of the per-model length check. The estimate counts the message text, the tool schema and response format, and the per-message chat framing, through the `o200k_base` BPE vocabulary at a pinned tokenizer version — OpenAI's published vocabulary, and the nearest available approximation for vendors that publish no tokenizer — so it is advisory, and only the provider's reported tokens are billed. `GET /v1/inference/estimate` tokenizes nothing: it prices the token counts passed to it, so count a prompt with the same vocabulary and add 4 tokens per message plus 3 for the reply to quote what a request will reserve — a supplier's model slightly above it, because the quote scales the framing by the model's input reserve ratio along with the content.","version":"1.0","contact":{"name":"Compute Finance","url":"https://compute.finance","email":"info@compute.finance"},"license":{"name":"MIT","url":"https://opensource.org/license/mit"}},"tags":[{"name":"Inference","description":"Chat completions (OpenAI wire), messages (Anthropic wire) and responses (OpenAI Responses wire, for coding clients such as Codex; a named model only, no stored state, no WebSocket transport), streaming or single-shot, billed against `$COMPUTE`. `model: \"auto\"` — the default when `model` is omitted — serves a model from the operator's ordered preference list, among the entries with serving capacity; send `conversation_id` to group the turns of one conversation, so the exchange keeps serving them from the same capacity. `routing_bias` — `cheaper`, `balanced` (the default) or `better` — leans that choice toward cheaper or stronger models on the list. It is a bias and not a service level: it promises neither a price nor a quality, it takes effect only where the exchange makes the choice, and sending it beside a named `model` or a `models[]` list returns 422 `validation_failed`. Changing it releases the model a `conversation_id` was being served from, so the next turn is chosen afresh. Every answer names the model that ran in `X-Model-Used`, the model the exchange set out to serve in `X-Model-Requested`, and `X-Fallback-Used` exactly when the two differ; an `auto` answer also carries `X-Model-Chooser` — `engine`, `pin`, `list` or `degraded` — naming what picked the model, and a bias reaches the choice on `engine` and `pin` only. Reasoning is switched on with `reasoning_effort` or the OpenRouter `reasoning` object (`effort` / `max_tokens` / `enabled` / `exclude`), or natively with `thinking` on `/v1/messages`; any `reasoning` object without `enabled: false` switches reasoning on, and contradictory values across the two OpenAI-wire controls return 422 `validation_failed` naming both. The effort level becomes an extended-thinking budget of 20% / 50% / 80% of `max_tokens`, floored at 1024 tokens and required to stay below `max_tokens`; an explicit budget takes 1024–200000 tokens and is mutually exclusive with an effort. Reasoning is available on a catalogue model only where its reasoning output is priced in the catalog — `GET /v1/oracle/models` and `GET /v1/oracle/catalog` report a `reasoning.reasoningOutput` price block for exactly those and `null` for the rest — and on a supplier's model only where its declaration lists reasoning for the operation called. Reasoning output returns as `message.reasoning` / `delta.reasoning` and its tokens are billed as output tokens."},{"name":"Models","description":"Routable model catalog in OpenAI wire format, carrying `maxInputTokens` for every model that declares the context window its vendor serves. The key is optional on `GET /v1/models`: without one the list is the public catalogue; with a key it also lists the private models of the key's pool, and the answer is private to the key."},{"name":"Usage","description":"The account behind the authenticated `ct_live_*` key: balance, cumulative spend and cumulative prompt-cache tokens, alongside that key's own limits."},{"name":"Estimate","description":"Pre-flight cost preview for a `(model, promptTokens, completionTokens)` tuple. Advisory — the bill follows the token counts the upstream reports. The key is optional — with one the quote answers as that key's send would, a supplier's model of its pool included; rate-limited."},{"name":"Errors","description":"All API error responses share a unified envelope:\n\n```json\n{\n  \"error\": {\n    \"message\": \"...\",\n    \"type\": \"...\",\n    \"code\": \"<canonical code>\"\n  }\n}\n```\n\nOptional fields: `param` (field name), `details` (code-specific payload), `issues[]` (per-field issues, present only on a `validation_failed` raised by schema validation, whose `type` is `validation_error` rather than `invalid_request_error`).\n\n## Catalog\n\n| Code | Status | Type | Meaning | When |\n|---|---|---|---|---|\n| `unauthorized` | 401 | `invalid_request_error` | Authentication is required to access this endpoint. | The session cookie is missing or invalid, the Bearer token is absent, or the timestamp on a signed request is outside the 5-minute freshness window. |\n| `forbidden` | 403 | `forbidden` | The caller is authenticated but is not allowed to perform this action. | The caller lacks the required role, a request was signed by an address different from the authenticated wallet, or an inference API key stopped reaching supply while its request was in flight: the key's account left its pool between authentication and routing, or the admission a supplier's model runs before each attempt found the key revoked or frozen or its account outside the pool. A key revoked or frozen before the request arrives answers `api_key_revoked` or `api_key_frozen` instead. |\n| `org_role_required` | 403 | `forbidden` | The caller's role in the active organization is below the one this action requires. | The caller attempted an action their role in the active organization does not reach — managing keys, limits or pools and connecting apps that act on the account need ADMIN or OWNER; inviting a MEMBER, resending or revoking a MEMBER's invitation and removing a MEMBER need ADMIN or OWNER, while doing the same for an ADMIN needs OWNER, so an ADMIN hands out only the MEMBER role; deleting the organization needs OWNER; `details.minimumRole` names the role required and `details.actualRole` the one held. |\n| `invalid_signature` | 401 | `invalid_request_error` | The provided signature could not be verified. | The EIP-191 signature is malformed, truncated, or does not recover to a valid signer. |\n| `signature_reused` | 409 | `invalid_request_error` | This signed request has already been submitted. | The nonce for this signed request was consumed by an earlier submission. |\n| `invalid_api_key` | 401 | `invalid_request_error` | The Bearer API key is missing, malformed, or not recognized. | The token is empty, does not use the `ct_live_` format, or matches no key the exchange issued. A key that exists but is revoked or frozen answers with its own code instead. |\n| `api_key_frozen` | 403 | `forbidden` | The API key is currently frozen and cannot be used for requests. | The key was frozen from the API keys page or by support. Reactivate it from the API keys page, or contact support if it was frozen by an administrator. |\n| `api_key_revoked` | 401 | `invalid_request_error` | The API key has been revoked and can no longer be used. | The key was revoked from the API keys page. Revocation is permanent — issue a new key to continue. |\n| `invalid_app_grant` | 401 | `invalid_request_error` | The Bearer app grant token is missing, malformed, or not recognized. | The token is empty, does not use the `cfa_live_` format, or matches no grant the exchange issued. A grant that exists but is revoked or frozen answers with its own code instead. |\n| `app_grant_frozen` | 403 | `forbidden` | The app grant is currently frozen and cannot be used for requests. | The grant was frozen from the connected apps section of Settings. Lift the freeze there; meanwhile the account's own session and every other grant keep working. |\n| `app_grant_revoked` | 401 | `invalid_request_error` | The app grant has been revoked and can no longer be used. | The grant was revoked from the connected apps section of Settings. Revocation is permanent — the app has to be granted access again, which issues a new token. |\n| `model_restricted` | 403 | `forbidden` | The requested model is not in this key's allowed-models list. | The key was restricted to a specific set of models; the request referenced a model outside that set. |\n| `bad_request` | 400 | `invalid_request_error` | The request is invalid in a way that does not match a more specific error code. | A generic 400 for request-shape issues that no other code describes more precisely. |\n| `validation_failed` | 422 | `invalid_request_error` | The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`. | One or more fields — of the body, the query string, or the path — are missing, of the wrong type, or outside their allowed range. |\n| `upstream_rejected` | 422 | `invalid_request_error` | The upstream the request was routed to refused it as invalid. | The request passed the exchange's own checks and reached an upstream — a vendor or a supplier's endpoint — which rejected it as invalid: a limit or parameter only that upstream enforces. `error.message` carries the upstream's own reason after the vendor slug or supplier handle that names it, cut to 200 characters, and `details.upstreamStatus` is the HTTP status the upstream answered with, or `null` when it reported the refusal without one — inside an answer it had begun with `200`, such as a Responses `response.failed`. Sending the same request again fails the same way; change the request. An upstream failure that is not a refusal of the request is retried on other capacity and never answers with this code. |\n| `method_not_allowed` | 405 | `invalid_request_error` | The endpoint exists but does not accept this HTTP method. | A request used a method the route does not support; the `Allow` response header lists the accepted methods. |\n| `payload_too_large` | 413 | `invalid_request_error` | The request body is larger than the exchange accepts. | The body exceeded the fixed body ceiling, which covers the largest context the exchange serves; it is refused before it is parsed, so no field-level detail is available. |\n| `not_found` | 404 | `not_found` | The requested resource does not exist. | The identifier did not match any resource, or the URL does not match any endpoint. |\n| `already_exists` | 409 | `conflict` | A resource with the same unique identity already exists. | A duplicate was detected during pre-check, or a concurrent write violated a unique constraint. |\n| `conflict` | 409 | `conflict` | The request conflicts with the current state of the resource; read it again before retrying. | The request names an identity that already exists — such as an email already linked to another account — or asks for an action the resource's current status does not allow — such as rejecting an offer that is no longer pending, or validating an endpoint while a validation of it is still running (`details.validationStartedAt`); `error.message` names which. A serializable transaction aborted by a concurrent write answers it too, and so does a supplier handle registration naming a standing terms version other than the current one — `error.param` is `termsVersion` and `details.currentTermsVersion` names the version to review and accept. |\n| `invitation_expired` | 409 | `conflict` | The organization invitation is past its expiry and can no longer be accepted. | The invitation link was opened after its expiry; a member who may hand out the invited role — ADMIN or OWNER for a MEMBER invitation, OWNER for an ADMIN one — has to send it again, which issues a new link and invalidates the old one. |\n| `invitation_revoked` | 409 | `conflict` | The organization invitation was withdrawn before it was accepted. | A member who may hand out the invited role — ADMIN or OWNER for a MEMBER invitation, OWNER for an ADMIN one — revoked the invitation; the link stays readable but can never be accepted. |\n| `invitation_already_accepted` | 409 | `conflict` | The organization invitation has already been accepted. | The invitation was accepted earlier, or two accepts raced and this one lost — an invitation admits exactly one member. |\n| `supplier_handle_taken` | 409 | `conflict` | The supplier handle is already registered or reserved. | Another supplier registered the handle first, or it equals a vendor slug (such as `openai` or `x-ai`) or a word the exchange reserves (such as `auto`), any of which would make a `handle/alias` model id ambiguous; `error.param` is `handle`. A handle is permanent once registered, so choose another. |\n| `supplier_handle_required` | 409 | `conflict` | The caller has no supplier handle yet. | Connecting an inference endpoint needs a supplier handle, which names every model the endpoint serves as `handle/alias`; register one with `POST /v1/supplier/handle` first. |\n| `offer_changed` | 409 | `conflict` | The supplier's offer changed after the terms were read, or the terms name a price version that is not open. | Terms sent with `PUT /v1/pools/{id}/offers/{offerId}/terms` named a price version other than the model's open one — one the supplier has replaced since the offer was read, or a mistyped id — or a declaration the supplier has retired since the offer was read; nothing was written. `error.param` is `models`, and `details.stale` lists each such model as `endpointModelId` with `openPriceVersionId`, the price version open for it (`null` once retired) — read the offer again and accept what it declares. |\n| `offer_pool_public` | 422 | `invalid_request_error` | The pool is public, and endpoints are shared only with private pools. | A supplier shared an endpoint with a public pool; a public pool routes to the exchange's public supply, so it takes no supplier offers. `error.param` is `poolId`. |\n| `offer_unavailable` | 422 | `invalid_request_error` | A model a supplier offers to the key's pool cannot serve this request. | The request named a supplier's `handle/alias` model that cannot serve it, and no entry of the chain was sent upstream: `details.model` names it, `details.reason` says why — `awaiting_acceptance` (the pool owner has not accepted its current declaration), `price_above_ceiling` (the supplier's price at this request's input size is above the ceilings the pool owner accepted), `endpoint_disabled`, `endpoint_removed`, `model_retired`, `offer_closed` (the offer of its endpoint to the pool was revoked or rejected by the pool owner or withdrawn by the supplier), `validation_failed` (its endpoint has not passed validation for the requested operation) or `cooldown` (its endpoint failed the requested operation repeatedly and becomes available again on its own shortly) — and `details.actor` who has to act first for it to serve again, `pool_owner` or `supplier`: a closed offer also needs the pool owner to accept the supplier's new share, a retired model the owner to accept its new declaration, and a cooling-down endpoint is the supplier's to fix, while a removed endpoint never serves again and its `actor` is `null`. Inside `models[]` such an entry is skipped, also when it becomes unavailable while the request is being routed, and a request whose other entries were sent upstream and failed answers `all_routes_exhausted` instead. Nothing was charged. |\n| `operation_unsupported` | 422 | `invalid_request_error` | The request uses a feature the exchange does not offer on this endpoint. | `POST /v1/responses` named a hosted tool — `web_search` (in Codex, set `web_search = \"disabled\"`), `file_search`, `code_interpreter`, `mcp` and the rest — or an input item or content part the exchange does not carry, such as `input_image`, `input_file` or a compaction item; or a model served over chat completions was sent server-executed `tool_search` or its history (use `execution: \"client\"` with a `parameters` schema and perform discovery in the client), a `tool_choice` naming a tool inside a `namespace`, or a tool whose chat name — `<namespace>__<name>` inside a namespace — does not match `^[a-zA-Z0-9_-]{1,64}$` or names another tool. `GET /v1/responses` answers it too, because the WebSocket transport is not offered: `426` on a WebSocket handshake, on which Codex falls back to HTTP, and `422` otherwise. `error.param` names what was refused — the field, with the item's index, or `transport`. Nothing was charged. |\n| `history_unsupported` | 422 | `invalid_request_error` | The request relies on response state the exchange does not keep. | `POST /v1/responses` carried `previous_response_id`, `store: true` or an `item_reference` input item, or a stored response was retrieved or deleted. The exchange stores no responses: send the whole conversation — messages, function calls and their outputs — in `input` on every turn, with `store` left out or `false`. `error.param` names the field. Nothing was charged. |\n| `history_unavailable` | 422 | `invalid_request_error` | The conversation replays state only another backend can continue. | `input` replayed a `reasoning` item the requested model cannot continue: the model is served over chat completions, which carries no reasoning state, or the item's encrypted reasoning was produced by another model's backend. Continue on the model that produced it, or start the conversation anew; the exchange never drops history to make a request fit. `error.param` names the item. Nothing was charged. |\n| `insufficient_balance` | 402 | `insufficient_quota` | The account's $COMPUTE balance is below the requested amount. | Triggered when withdrawing more than the balance, or when an inference request would exceed the balance after billing. |\n| `spending_limit_reached` | 429 | `rate_limit_error` | A spending cap has been reached. | This request's reserved amount, added to what was already spent and to what requests still in flight hold, would exceed a daily or monthly cap on the key, or a daily, weekly or monthly cap on the account; `details.scope` names which carried it. |\n| `all_routes_exhausted` | 502 | `server_error` | No upstream capacity could serve the routed models. | Every route the exchange tried for the requested models failed before any output — the capacity serving them was unavailable, rate-limited, cooling down or answered with an error. Nothing was charged; retry shortly. |\n| `deadline_exceeded` | 504 | `server_error` | The request ran out of time before any upstream produced output. | Every request carries one time budget: an unstreamed request's lets each upstream attempt it may make run to its own timeout, up to the longest the exchange holds a request open, and a streamed request's is that longest hold. The budget ran out while the exchange was still routing — attempts were slow to answer, or cut at their timeouts — so no output reached the caller and nothing was charged. Retrying may succeed. |\n| `rate_limited` | 429 | `rate_limit_error` | A rate or concurrency limit this request falls under was reached. | The request hit a request-rate cap on this API route, or the pool's RPM/TPM cap — then `details.scope` is `pool` — or the concurrency, request-rate or token-rate limit of the supplier endpoint serving the named model — then `details.scope` is `endpoint`, `details.model` names the model, and inside `models[]` the next entry is tried instead. A route's request-rate cap names whose allowance was spent: `details.scope` is `caller` when the signed-in wallet or app grant spent its own, `address` when its network address spent the allowance every caller behind it shares, which is the only allowance an anonymous caller has. An endpoint validation is refused with it too: `details.scope` is `endpoint` when that endpoint was validated less than a minute after a validation of it that sent requests finished, `wallet` when the wallet already ran as many validations that sent requests as it may this minute or this hour. A route's request-rate cap and an endpoint validation both say how long to wait in `details.retryAfterSeconds` and the `Retry-After` header — for a request-rate cap, the longest wait among the windows that refused the request. |\n| `stream_interrupted` | 500 | `server_error` | The SSE stream aborted before completion. | The upstream's stream dropped or ended without finishing after it had started delivering output, or the request ran out of its time budget while the answer was streaming. The exchange retries only before the first output, so this request is not retried. On a catalogue model an answer its vendor broke is not charged, and one the time budget cut is charged for the prompt and the output streamed before the cut; a supplier's model is charged by the usage its endpoint reported before the stream ended when that usage is valid, and not at all otherwise. This error is delivered inside the SSE body, not as an HTTP status. |\n| `endpoint_unreachable` | 502 | `server_error` | An inference endpoint could not be reached, or its response broke the exchange's transport rules. | No response answers with this code. The exchange refused or could not complete a call to a supplier's endpoint: a request routed to it tries the next route and answers `all_routes_exhausted` when none serves, and an endpoint validation reports the reason as the failed check's `reason.code`, one of: `blocked_destination` (the URL is not a destination the exchange may call), `blocked_address` (the host resolves to a private or reserved network address), `dns_failure` (the host name did not resolve), `connect_failed` (the endpoint did not accept a connection), `tls` (the TLS handshake failed or the certificate is not valid for the host name), `timeout` (no response in time, or the response stalled partway — such as a stream that stops after partial output), `redirect` (the endpoint redirected — redirects are not followed), `protocol_error` (the response was not valid HTTP), `unrequested_stream` (the endpoint answered with an event stream to a request that did not ask for one), `connection_lost` (the connection closed mid-response) or `response_too_large` (the response exceeded the size the exchange accepts). |\n| `contract_error` | 500 | `server_error` | An on-chain call reverted or could not be confirmed. | The transaction failed to broadcast, timed out waiting for a receipt, or the receipt reported failure. Where the layer that refused is known, `details.chainFailure.reason` names it: `contributor_frozen` (the escrow refuses this contributor until an operator lifts the freeze), `contract_rejected` (the contract refused for another reason), `relayer_unfunded` (the exchange could not pay for the transaction, so retrying will not help), `signer_unavailable` (the exchange's signing service refused or could not be reached, so retrying will not help), `chain_unavailable` (no verdict was reached, so retrying is meaningful) or `confirmation_pending` (the transaction was broadcast and its outcome is still unknown, so resubmitting risks a second charge and the exchange finishes it on its own). A withdrawal names its own outcome instead: `withdraw_not_sent` (nothing was charged, so retrying is safe), `withdraw_restoring` (the debit is being reversed), `withdraw_pending` (broadcast, outcome still unknown, so resubmitting risks paying out twice) or `withdraw_reverted` (the chain refused it, nothing left the escrow, and the balance returns within a few minutes). |\n| `internal_error` | 500 | `server_error` | An unexpected server-side failure occurred. | A fallback for exceptions that no other error code describes; the failure is logged for investigation. |\n| `service_unavailable` | 503 | `server_error` | A dependency, a setting or the capacity this request needs is unavailable. | A dependency needed for this request is unreachable — security-critical paths intentionally reject rather than degrade — or no capacity serving the requested models was available to try, so nothing was sent upstream and nothing was charged; retry shortly, or name another model. An operator setting that cannot be read, such as the route list `auto` walks, answers it until an operator fixes it, so name a model rather than retry. |"}],"servers":[{"url":"https://api.compute.finance","description":"Production"}],"components":{"securitySchemes":{"ApiKeyBearer":{"scheme":"bearer","bearerFormat":"ct_live_*","type":"http","description":"Send `Authorization: Bearer ct_live_...`. Issue keys at https://compute.finance/dashboard/api-keys. Frozen keys → 403 `api_key_frozen`; revoked → 401 `api_key_revoked`; unknown → 401 `invalid_api_key`."},"ApiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"Anthropic-SDK compatibility: `x-api-key: ct_live_...`. Accepted on `POST /v1/messages`, `GET /v1/models`, `GET /v1/models/availability` and `GET /v1/inference/estimate` so the official `@anthropic-ai/sdk` works with only a base-URL swap. Every other endpoint reads the key from `Authorization: Bearer` only."}},"schemas":{"ChatCompletionResponseDto":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"model":{"type":"string","description":"Canonical `vendor/model` id of the model that served the request."},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"message":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string","nullable":true},"refusal":{"type":"string","nullable":true},"reasoning":{"description":"Reasoning output, present only on a reasoning request.","type":"string"},"tool_calls":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string"},"input":{"type":"string"}},"required":["name","input"],"additionalProperties":false}},"required":["id","type","custom"]}]}}},"required":["role","content"],"additionalProperties":{}},"finish_reason":{"type":"string","nullable":true}},"required":["index","message","finish_reason"]}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_creation_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":{}},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":{}}},"additionalProperties":{},"description":"Token counts as the serving vendor reported them; a vendor may add fields beyond the ones named here."}},"required":["id","object","created","model","choices"]},"ChatCompletionChunkDto":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["chat.completion.chunk"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"]},"content":{"type":"string"},"reasoning":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"id":{"type":"string"},"type":{"type":"string","enum":["function","custom"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}}},"custom":{"type":"object","properties":{"name":{"type":"string"},"input":{"type":"string"}}}},"required":["index"]}}}},"logprobs":{},"finish_reason":{"type":"string","nullable":true}},"required":["index","delta","finish_reason"]}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completion_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_creation_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":{}},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"additionalProperties":{}}},"required":["prompt_tokens","completion_tokens","total_tokens"],"additionalProperties":{},"description":"Carried by the final chunk only.","nullable":true},"x_credits_remaining":{"description":"Account balance in wei after settlement; final chunk only.","type":"string"},"x_credits_used":{"description":"Settled charge in wei; final chunk only.","type":"string"},"x_ratelimit_requests_remaining":{"description":"Requests the remaining balance affords at this request's charge, or at its hold when nothing was charged; final chunk only.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["id","object","created","model","choices"]},"ChatCompletionRequestDto":{"type":"object","properties":{"model":{"type":"string","minLength":1},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","user","assistant","tool","developer"]},"content":{"anyOf":[{"type":"string"},{"minItems":0,"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["type","text"],"additionalProperties":false},"description":"Up to 50 text parts."}],"nullable":true},"name":{"type":"string"},"tool_call_id":{"type":"string"},"tool_calls":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"]}},"required":["id","type","function"]},{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string"},"input":{"type":"string"}},"required":["name","input"],"additionalProperties":false}},"required":["id","type","custom"]}]}}},"required":["role"]}},"stream":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":2},"max_tokens":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0},"max_completion_tokens":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0},"top_p":{"type":"number","minimum":0,"maximum":1},"stop":{"anyOf":[{"type":"string"},{"maxItems":4,"type":"array","items":{"type":"string"}}]},"frequency_penalty":{"type":"number","minimum":-2,"maximum":2},"presence_penalty":{"type":"number","minimum":-2,"maximum":2},"seed":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"logit_bias":{"type":"object","additionalProperties":{"type":"number"}},"user":{"type":"string"},"logprobs":{"type":"boolean"},"top_logprobs":{"type":"integer","minimum":0,"maximum":20},"reasoning_effort":{"type":"string","enum":["low","medium","high"]},"reasoning":{"type":"object","properties":{"effort":{"type":"string","enum":["low","medium","high"]},"max_tokens":{"type":"integer","exclusiveMinimum":true,"maximum":200000,"minimum":0},"enabled":{"type":"boolean"},"exclude":{"type":"boolean"}},"additionalProperties":false},"response_format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string","maxLength":64},"description":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":"boolean","nullable":true}},"required":["name"]}},"required":["type","json_schema"]}]},"tools":{"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}},"strict":{"type":"boolean","nullable":true}},"required":["name"]},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["type","function"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string","minLength":1},"description":{"type":"string"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"grammar":{"type":"object","properties":{"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["syntax","definition"],"additionalProperties":false}},"required":["type","grammar"],"additionalProperties":false}]}},"required":["name"],"additionalProperties":false},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["type","custom"]}]}},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"]}},"required":["type","function"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"custom":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","custom"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean"},"n":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"minimum":0},"functions":{},"function_call":{},"models":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"conversation_id":{"type":"string"},"routing_bias":{"type":"string","enum":["cheaper","balanced","better"]}},"required":["messages"]},"UsageResponseDto":{"type":"object","properties":{"keyPrefix":{"type":"string"},"label":{"type":"string"},"status":{"type":"string"},"accountBalance":{"type":"string"},"accountUsed":{"type":"string"},"requestCount":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"dailyLimit":{"type":"string","nullable":true},"monthlyLimit":{"type":"string","nullable":true},"dailyUsed":{"type":"string"},"monthlyUsed":{"type":"string"},"dailyRemaining":{"type":"string","nullable":true},"weeklyRemaining":{"type":"string","nullable":true},"monthlyRemaining":{"type":"string","nullable":true},"cachedInputTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"nullable":true},"cacheWrite5mTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"nullable":true},"cacheWrite1hTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"nullable":true}},"required":["keyPrefix","label","status","accountBalance","accountUsed","requestCount","dailyLimit","monthlyLimit","dailyUsed","monthlyUsed","dailyRemaining","weeklyRemaining","monthlyRemaining","cachedInputTokens","cacheWrite5mTokens","cacheWrite1hTokens"]},"AnthropicMessageResponseDto":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{}},"required":["type","id","name","input"]}]}},"model":{"type":"string","description":"Canonical `vendor/model` id of the model that served the request."},"stop_reason":{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use"]},"stop_sequence":{"type":"string","nullable":true},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_creation":{"description":"Cache writes split by the lifetime each was written at.","type":"object","properties":{"ephemeral_5m_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ephemeral_1h_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}}}}},"required":["id","type","role","content","model","stop_reason","stop_sequence","usage"]},"AnthropicMessageStreamEventDto":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message_start"]},"message":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","enum":["message"]},"role":{"type":"string","enum":["assistant"]},"content":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{}},"required":["type","id","name","input"]}]}},"model":{"type":"string","description":"Canonical `vendor/model` id of the model that served the request."},"stop_reason":{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use",null],"nullable":true},"stop_sequence":{"type":"string","nullable":true},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_read_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_creation_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"cache_creation":{"description":"Cache writes split by the lifetime each was written at.","type":"object","properties":{"ephemeral_5m_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"ephemeral_1h_input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}}}},"required":["input_tokens","output_tokens"]}},"required":["id","type","role","content","model","stop_reason","stop_sequence","usage"]}},"required":["type","message"]},{"type":"object","properties":{"type":{"type":"string","enum":["content_block_start"]},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_block":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["thinking"]},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string"},"name":{"type":"string"},"input":{}},"required":["type","id","name","input"]}]}},"required":["type","index","content_block"]},{"type":"object","properties":{"type":{"type":"string","enum":["content_block_delta"]},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text_delta"]},"text":{"type":"string"}},"required":["type","text"]},{"type":"object","properties":{"type":{"type":"string","enum":["thinking_delta"]},"thinking":{"type":"string"}},"required":["type","thinking"]},{"type":"object","properties":{"type":{"type":"string","enum":["signature_delta"]},"signature":{"type":"string"}},"required":["type","signature"]},{"type":"object","properties":{"type":{"type":"string","enum":["input_json_delta"]},"partial_json":{"type":"string"}},"required":["type","partial_json"]}]}},"required":["type","index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["content_block_stop"]},"index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","index"]},{"type":"object","properties":{"type":{"type":"string","enum":["message_delta"]},"delta":{"type":"object","properties":{"stop_reason":{"type":"string","enum":["end_turn","max_tokens","stop_sequence","tool_use"]},"stop_sequence":{"type":"string","nullable":true}},"required":["stop_reason","stop_sequence"]},"usage":{"type":"object","properties":{"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["output_tokens"]}},"required":["type","delta","usage"]},{"type":"object","properties":{"type":{"type":"string","enum":["message_stop"]}},"required":["type"]},{"type":"object","properties":{"type":{"type":"string","enum":["error"]},"error":{"type":"object","properties":{"type":{"type":"string"},"message":{"type":"string"}},"required":["type","message"]}},"required":["type","error"]}]},"AnthropicMessagesRequestDto":{"type":"object","properties":{"model":{"type":"string","minLength":1},"max_tokens":{"type":"integer","exclusiveMinimum":true,"maximum":200000,"minimum":0},"messages":{"minItems":1,"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"type":"string"},{"minItems":1,"maxItems":200,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_use"]},"id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"input":{}},"required":["type","id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_result"]},"tool_use_id":{"type":"string","minLength":1},"content":{"anyOf":[{"type":"string"},{"minItems":0,"maxItems":50,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["type","text"],"additionalProperties":false},"description":"Up to 50 text blocks."}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id"],"additionalProperties":false}]},"description":"Up to 200 text / tool_use / tool_result blocks."}]}},"required":["role","content"],"additionalProperties":false}},"system":{"anyOf":[{"type":"string"},{"minItems":1,"maxItems":20,"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["text"]},"text":{"type":"string"},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["type","text"],"additionalProperties":false},"description":"Up to 20 text blocks."}]},"metadata":{"type":"object","properties":{"user_id":{"type":"string","maxLength":256,"nullable":true}},"additionalProperties":false},"stop_sequences":{"maxItems":4,"type":"array","items":{"type":"string","minLength":1,"maxLength":200}},"stream":{"type":"boolean"},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"thinking":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["enabled"]},"budget_tokens":{"type":"integer","exclusiveMinimum":true,"maximum":200000,"minimum":0}},"required":["type","budget_tokens"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["disabled"]}},"required":["type"],"additionalProperties":false}]},"tools":{"maxItems":128,"type":"array","items":{"type":"object","properties":{"name":{"type":"string","minLength":1,"maxLength":64},"description":{"type":"string","maxLength":10000},"input_schema":{"type":"object","additionalProperties":{}},"cache_control":{"type":"object","properties":{"type":{"type":"string","enum":["ephemeral"]},"ttl":{"type":"string","enum":["5m","1h"]}},"required":["type"],"additionalProperties":false,"nullable":true}},"required":["name","input_schema"],"additionalProperties":false}},"tool_choice":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["auto"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["any"]},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool"]},"name":{"type":"string","minLength":1},"disable_parallel_tool_use":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false}]},"models":{"minItems":1,"maxItems":8,"type":"array","items":{"type":"string","minLength":1,"maxLength":128}},"routing_bias":{"type":"string","enum":["cheaper","balanced","better"]}},"required":["model","max_tokens","messages"],"additionalProperties":false},"ResponsesResponseDto":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"status":{"type":"string","enum":["in_progress","queued","completed","incomplete","failed","cancelled",null],"nullable":true},"model":{"type":"string","description":"Canonical `vendor/model` or `handle/alias` id of the model that served the request."},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"description":"What the request was billed for, in the Responses usage shape: the counts the upstream reported, with a side a catalogue model's vendor left out measured. Null when nothing was billed — an answer of no tokens, or a supplier's answer without valid usage.","nullable":true},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"nullable":true}},"required":["id","object","created_at","status","model","output","usage","incomplete_details","error"]},"ResponsesStreamEventDto":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["response.created"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"status":{"type":"string","enum":["in_progress","queued","completed","incomplete","failed","cancelled",null],"nullable":true},"model":{"type":"string","description":"Canonical `vendor/model` or `handle/alias` id of the model that served the request."},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"description":"What the request was billed for, in the Responses usage shape: the counts the upstream reported, with a side a catalogue model's vendor left out measured. Null when nothing was billed — an answer of no tokens, or a supplier's answer without valid usage.","nullable":true},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"nullable":true}},"required":["id","object","created_at","status","model","output","usage","incomplete_details","error"]}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.in_progress"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"status":{"type":"string","enum":["in_progress","queued","completed","incomplete","failed","cancelled",null],"nullable":true},"model":{"type":"string","description":"Canonical `vendor/model` or `handle/alias` id of the model that served the request."},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"description":"What the request was billed for, in the Responses usage shape: the counts the upstream reported, with a side a catalogue model's vendor left out measured. Null when nothing was billed — an answer of no tokens, or a supplier's answer without valid usage.","nullable":true},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"nullable":true}},"required":["id","object","created_at","status","model","output","usage","incomplete_details","error"]}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_item.added"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"required":["type","sequence_number","output_index","item"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_item.done"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"required":["type","sequence_number","output_index","item"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.content_part.added"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"part":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}},"required":["type","sequence_number","item_id","output_index","content_index","part"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.content_part.done"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"content_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"part":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}},"required":["type","sequence_number","item_id","output_index","content_index","part"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.delta"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"string"},"content_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","sequence_number","item_id","output_index","delta","content_index"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.output_text.done"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"text":{"type":"string"},"content_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["type","sequence_number","item_id","output_index","text","content_index"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.custom_tool_call_input.delta"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.custom_tool_call_input.done"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.function_call_arguments.delta"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"delta":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","delta"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.function_call_arguments.done"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"item_id":{"type":"string"},"output_index":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"arguments":{"type":"string"}},"required":["type","sequence_number","item_id","output_index","arguments"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.completed"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"status":{"type":"string","enum":["in_progress","queued","completed","incomplete","failed","cancelled",null],"nullable":true},"model":{"type":"string","description":"Canonical `vendor/model` or `handle/alias` id of the model that served the request."},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"description":"What the request was billed for, in the Responses usage shape: the counts the upstream reported, with a side a catalogue model's vendor left out measured. Null when nothing was billed — an answer of no tokens, or a supplier's answer without valid usage.","nullable":true},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"nullable":true}},"required":["id","object","created_at","status","model","output","usage","incomplete_details","error"]}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.incomplete"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"status":{"type":"string","enum":["in_progress","queued","completed","incomplete","failed","cancelled",null],"nullable":true},"model":{"type":"string","description":"Canonical `vendor/model` or `handle/alias` id of the model that served the request."},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"description":"What the request was billed for, in the Responses usage shape: the counts the upstream reported, with a side a catalogue model's vendor left out measured. Null when nothing was billed — an answer of no tokens, or a supplier's answer without valid usage.","nullable":true},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"nullable":true}},"required":["id","object","created_at","status","model","output","usage","incomplete_details","error"]}},"required":["type","sequence_number","response"]},{"type":"object","properties":{"type":{"type":"string","enum":["response.failed"]},"sequence_number":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"response":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","enum":["response"]},"created_at":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Unix seconds."},"status":{"type":"string","enum":["in_progress","queued","completed","incomplete","failed","cancelled",null],"nullable":true},"model":{"type":"string","description":"Canonical `vendor/model` or `handle/alias` id of the model that served the request."},"output":{"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["assistant"]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}}},"required":["type","text","annotations"]}}},"required":["type","id","role","status","content"]},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the called function belongs to, when it belongs to one.","type":"string"},"arguments":{"type":"string","description":"The call's arguments as a JSON string."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","arguments","status"]},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string"},"name":{"type":"string"},"namespace":{"description":"The `namespace` tool the custom tool belongs to, when it belongs to one.","type":"string"},"input":{"type":"string","description":"The custom tool's raw input, preserved without JSON encoding or whitespace changes."},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","id","call_id","name","input"]},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"]}},"encrypted_content":{"type":"string","description":"Opaque; replay it unchanged in `input` and only to the model that produced it.","nullable":true}},"required":["type","id","summary"]},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false}],"description":"A model served over chat completions returns messages, function calls, custom tool calls and client tool-search calls."}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["cached_tokens"]},"output_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["reasoning_tokens"]},"total_tokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["input_tokens","input_tokens_details","output_tokens","output_tokens_details","total_tokens"],"description":"What the request was billed for, in the Responses usage shape: the counts the upstream reported, with a side a catalogue model's vendor left out measured. Null when nothing was billed — an answer of no tokens, or a supplier's answer without valid usage.","nullable":true},"incomplete_details":{"type":"object","properties":{"reason":{"type":"string"}},"required":["reason"],"nullable":true},"error":{"type":"object","properties":{"code":{"type":"string"},"message":{"type":"string"}},"required":["code","message"],"nullable":true}},"required":["id","object","created_at","status","model","output","usage","incomplete_details","error"]}},"required":["type","sequence_number","response"]}],"description":"The events the exchange writes itself. A model served natively relays every event its endpoint emits, these and any other type, as the endpoint sent it, with the response object rebuilt and reasoning marked."},"ResponsesRequestDto":{"type":"object","properties":{"model":{"type":"string","minLength":1},"input":{"anyOf":[{"type":"string","minLength":1},{"minItems":1,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["message"]},"id":{"type":"string"},"role":{"type":"string","enum":["user","assistant","system","developer"]},"content":{"anyOf":[{"type":"string"},{"minItems":0,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}},"logprobs":{"type":"array","items":{}}},"required":["type","text"],"additionalProperties":false}]}}]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]},"phase":{"type":"string","enum":["commentary","final_answer"]}},"required":["type","role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["function_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"arguments":{"type":"string"},"namespace":{"type":"string","minLength":1},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["function_call_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1},"output":{"anyOf":[{"type":"string"},{"minItems":0,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}},"logprobs":{"type":"array","items":{}}},"required":["type","text"],"additionalProperties":false}]}}]},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1},"name":{"type":"string","minLength":1},"input":{"type":"string"},"namespace":{"type":"string","minLength":1},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","call_id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom_tool_call_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1},"output":{"anyOf":[{"type":"string"},{"minItems":0,"maxItems":50,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["input_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["output_text"]},"text":{"type":"string"},"annotations":{"type":"array","items":{}},"logprobs":{"type":"array","items":{}}},"required":["type","text"],"additionalProperties":false}]}}]}},"required":["type","call_id","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["reasoning"]},"id":{"type":"string"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["summary_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}},"content":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","enum":["reasoning_text"]},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},"nullable":true},"encrypted_content":{"type":"string","nullable":true},"status":{"type":"string","enum":["in_progress","completed","incomplete"]}},"required":["type","summary"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_call"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"arguments":{"type":"object","additionalProperties":{}}},"required":["type","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search_output"]},"id":{"type":"string"},"call_id":{"type":"string","minLength":1,"nullable":true},"execution":{"type":"string","enum":["server","client"]},"status":{"type":"string","enum":["in_progress","completed","incomplete",null],"nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["additional_tools"]},"id":{"type":"string"},"role":{"type":"string","enum":["developer"]},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]}}},"required":["type","role","tools"],"additionalProperties":false}]}}]},"instructions":{"type":"string","nullable":true},"tools":{"minItems":0,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["namespace"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"tools":{"minItems":1,"maxItems":128,"type":"array","items":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{},"nullable":true},"strict":{"type":"boolean","nullable":true},"defer_loading":{"type":"boolean"}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1,"maxLength":128},"description":{"type":"string"},"defer_loading":{"type":"boolean"},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["grammar"]},"syntax":{"type":"string","enum":["lark","regex"]},"definition":{"type":"string"}},"required":["type","syntax","definition"],"additionalProperties":false}]}},"required":["type","name"],"additionalProperties":false}]}}},"required":["type","name","tools"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["tool_search"]},"execution":{"type":"string","enum":["server","client"]},"description":{"type":"string","nullable":true},"parameters":{"type":"object","additionalProperties":{},"nullable":true}},"required":["type"],"additionalProperties":false}]},"nullable":true},"tool_choice":{"anyOf":[{"type":"string","enum":["none","auto","required"]},{"type":"object","properties":{"type":{"type":"string","enum":["function"]},"name":{"type":"string","minLength":1}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["custom"]},"name":{"type":"string","minLength":1}},"required":["type","name"],"additionalProperties":false}]},"parallel_tool_calls":{"type":"boolean","nullable":true},"reasoning":{"type":"object","properties":{"effort":{"anyOf":[{"type":"string","minLength":1},{"type":"integer","minimum":0,"maximum":9007199254740991}],"description":"Any effort the model advertises — none, minimal, low, medium, high, xhigh, max, ultra, persistent or its own value.","nullable":true},"summary":{"type":"string","enum":["auto","concise","detailed",null],"nullable":true}},"additionalProperties":false,"nullable":true},"text":{"type":"object","properties":{"verbosity":{"type":"string","enum":["low","medium","high",null],"nullable":true},"format":{"oneOf":[{"type":"object","properties":{"type":{"type":"string","enum":["text"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_object"]}},"required":["type"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["json_schema"]},"name":{"type":"string","minLength":1,"maxLength":64},"schema":{"type":"object","additionalProperties":{}},"description":{"type":"string"},"strict":{"type":"boolean","nullable":true}},"required":["type","name","schema"],"additionalProperties":false}]}},"additionalProperties":false},"max_output_tokens":{"type":"integer","exclusiveMinimum":true,"maximum":9007199254740991,"nullable":true,"minimum":0},"store":{"type":"boolean","description":"Only false is accepted; true answers 422 history_unsupported.","nullable":true},"previous_response_id":{"description":"Not supported: any value but null answers 422 history_unsupported."},"include":{"type":"array","items":{"type":"string","enum":["reasoning.encrypted_content"]},"nullable":true},"stream":{"type":"boolean","nullable":true},"stream_options":{"type":"object","properties":{"include_obfuscation":{"type":"boolean"}},"additionalProperties":false},"prompt_cache_key":{"type":"string","minLength":1,"maxLength":256},"metadata":{"type":"object","additionalProperties":{"type":"string"},"nullable":true},"client_metadata":{"type":"object","additionalProperties":{"type":"string"}},"user":{"type":"string","minLength":1,"maxLength":256},"truncation":{"type":"string","enum":["auto","disabled",null],"nullable":true},"service_tier":{"type":"string","enum":["auto","default","flex","scale","priority",null],"nullable":true}},"required":["model","input"],"additionalProperties":false},"EstimateResponseDto":{"type":"object","properties":{"model":{"type":"string"},"resolvedModel":{"type":"string"},"promptTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"completionTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"creditsCost":{"type":"number"},"creditsWei":{"type":"string"},"usdCost":{"type":"number"},"reservedWei":{"type":"string"},"tierFromInputTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"nullable":true}},"required":["model","resolvedModel","promptTokens","completionTokens","creditsCost","creditsWei","usdCost","reservedWei","tierFromInputTokens"]},"ModelAvailabilityResponseDto":{"type":"object","properties":{"computedAt":{"type":"string","format":"date-time","pattern":"^(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))T(?:(?:[01]\\d|2[0-3]):[0-5]\\d:[0-5]\\d(?:\\.\\d+)?(?:Z))$","description":"When the map was computed; it is advisory afterwards."},"ttlSeconds":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"How long the map is recomputed at most once within."},"models":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"routable":{"type":"boolean","description":"Whether a request can be routed to the model now; for a model a supplier offers to the key's pool, only while every operation it declares can serve."},"availability":{"description":"For a model of an offer the key's pool accepted: `available` only while every operation it declares can serve; otherwise the reason one of them cannot. `GET /v1/models` answers for each operation.","type":"string","enum":["available","awaiting_acceptance","price_above_ceiling","endpoint_disabled","endpoint_removed","model_retired","offer_closed","validation_failed","cooldown"]}},"required":["id","routable"]}},"auto":{"type":"object","properties":{"id":{"type":"string"}},"required":["id"],"description":"Model the routing directive resolves to from the operator's preference list, or null when nothing the caller may use has capacity.","nullable":true},"scope":{"description":"Present only when a key is sent: `pool` when the key's account owns or belongs to the key's pool, so the models suppliers offer to that pool are listed; `public` when the key is bound to no pool; `detached` when the key's account no longer owns or belongs to the key's pool, so nothing private is listed.","type":"string","enum":["public","pool","detached"]}},"required":["computedAt","ttlSeconds","models","auto"]},"ModelsListResponseDto":{"type":"object","properties":{"object":{"type":"string","enum":["list"]},"data":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"id":{"type":"string","description":"Canonical `handle/alias` id of a model a supplier offered to the key's pool and the pool accepted."},"object":{"type":"string","enum":["model"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"When the supplier declared it, in Unix seconds."},"owned_by":{"type":"string","description":"The supplier's handle — the same handle the id is prefixed with."},"displayName":{"type":"string"},"contextWindow":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"admittedInputTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The largest prompt the model admits, counted by the exchange's tokenizer: `contextWindow` ÷ the supplier's declared input reserve ratio, rounded down. A prompt above it is refused, or on a streamed `/v1/responses` request answered `response.failed` with `context_length_exceeded`. Set a coding client's context window to at most this figure."},"maxOutputTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"operations":{"type":"array","items":{"type":"object","properties":{"customToolFormats":{"type":"array","items":{"type":"string","enum":["text","lark","regex"]}},"operation":{"type":"string","enum":["chat_completions","responses"]},"capabilities":{"type":"array","items":{"type":"string","enum":["tools","structured_outputs","reasoning"]}},"availability":{"type":"string","enum":["available","awaiting_acceptance","price_above_ceiling","endpoint_disabled","endpoint_removed","model_retired","offer_closed","validation_failed","cooldown"]}},"required":["customToolFormats","operation","capabilities","availability"]}},"availability":{"type":"string","enum":["available","awaiting_acceptance","price_above_ceiling","endpoint_disabled","endpoint_removed","model_retired","offer_closed","validation_failed","cooldown"],"description":"`available` only while every operation the model declares can serve; otherwise the reason one of them cannot. A request uses one operation, and `operations[].availability` says whether that one is served."},"eligibleUpToInputTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"The largest input size, in prompt tokens, the accepted price ceilings admit: null when they admit every size, 0 when they admit none — the base rates already exceed a ceiling, or no terms admit the model — and otherwise a request with more input tokens lands on a tier priced above a ceiling. `operations[].availability` says whether each operation is served.","nullable":true},"pricing":{"type":"object","properties":{"buyer":{"type":"object","properties":{"rates":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cachedInput":{"type":"number"},"reasoningOutput":{"type":"number"}},"required":["input","output","cachedInput","reasoningOutput"]},"tiers":{"type":"array","items":{"type":"object","properties":{"fromInputTokens":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991},"rates":{"type":"object","properties":{"input":{"type":"number"},"output":{"type":"number"},"cachedInput":{"type":"number"},"reasoningOutput":{"type":"number"}},"required":["input","output","cachedInput","reasoningOutput"]}},"required":["fromInputTokens","rates"]}}},"required":["rates","tiers"],"description":"What a request is charged per million tokens in USD, the routing markup included, below the first tier and from each tier on."}},"required":["buyer"],"nullable":true}},"required":["id","object","created","owned_by","displayName","contextWindow","admittedInputTokens","maxOutputTokens","operations","availability","eligibleUpToInputTokens","pricing"]},{"type":"object","properties":{"customToolFormats":{"type":"array","items":{"type":"string","enum":["text","lark","regex"]}},"id":{"type":"string","description":"Canonical `vendor/model` id — what `model` and `models[]` accept."},"object":{"type":"string","enum":["model"]},"created":{"type":"integer","minimum":-9007199254740991,"maximum":9007199254740991,"description":"Release date in Unix seconds."},"owned_by":{"type":"string","description":"Vendor slug — the same slug the id is prefixed with."},"displayName":{"type":"string"},"maxInputTokens":{"description":"Context window the vendor serves. Absent means the model declares none and only the request-body ceiling bounds it.","type":"integer","minimum":-9007199254740991,"maximum":9007199254740991}},"required":["customToolFormats","id","object","created","owned_by","displayName"]}]}},"scope":{"description":"Present only when a key is sent: `pool` when the key's account owns or belongs to the key's pool, so the models suppliers offer to that pool are listed; `public` when the key is bound to no pool; `detached` when the key's account no longer owns or belongs to the key's pool, so nothing private is listed.","type":"string","enum":["public","pool","detached"]}},"required":["object","data"]},"ErrorEnvelope":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string","description":"Human-readable summary."},"type":{"type":"string","description":"OpenAI-compatible coarse category, derived from the canonical code except on a request that fails schema validation with no coded refusal among its issues, which answers `validation_error` with `code` `validation_failed` and carries `issues[]`. A refusal the schema raises under its own code answers that code and the type derived from it, names the field in `param` and carries no `issues[]`."},"code":{"$ref":"#/components/schemas/ErrorCode"},"param":{"type":"string","nullable":true,"description":"Field name when the error is bound to a specific input."},"details":{"type":"object","additionalProperties":true,"nullable":true,"description":"Code-specific structured payload."},"issues":{"type":"array","items":{"type":"object","additionalProperties":true},"description":"Per-field issues, present only on a `validation_failed` whose `type` is `validation_error`."}}}}},"ErrorCode":{"type":"string","description":"Canonical taxonomy code. Full descriptions live under the `Errors` tag.","enum":["unauthorized","forbidden","org_role_required","invalid_signature","signature_reused","invalid_api_key","api_key_frozen","api_key_revoked","invalid_app_grant","app_grant_frozen","app_grant_revoked","model_restricted","bad_request","validation_failed","upstream_rejected","method_not_allowed","payload_too_large","not_found","already_exists","conflict","invitation_expired","invitation_revoked","invitation_already_accepted","supplier_handle_taken","supplier_handle_required","offer_changed","offer_pool_public","offer_unavailable","operation_unsupported","history_unsupported","history_unavailable","insufficient_balance","spending_limit_reached","all_routes_exhausted","deadline_exceeded","rate_limited","stream_interrupted","endpoint_unreachable","contract_error","internal_error","service_unavailable"]}},"responses":{"Error_unauthorized":{"description":"401 unauthorized — Authentication is required to access this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"Authentication is required to access this endpoint.","type":"invalid_request_error","code":"unauthorized"}}}}},"Error_forbidden":{"description":"403 forbidden — The caller is authenticated but is not allowed to perform this action.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The caller is authenticated but is not allowed to perform this action.","type":"forbidden","code":"forbidden"}}}}},"Error_org_role_required":{"description":"403 org_role_required — The caller's role in the active organization is below the one this action requires.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The caller's role in the active organization is below the one this action requires.","type":"forbidden","code":"org_role_required"}}}}},"Error_invalid_signature":{"description":"401 invalid_signature — The provided signature could not be verified.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The provided signature could not be verified.","type":"invalid_request_error","code":"invalid_signature"}}}}},"Error_signature_reused":{"description":"409 signature_reused — This signed request has already been submitted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"This signed request has already been submitted.","type":"invalid_request_error","code":"signature_reused"}}}}},"Error_invalid_api_key":{"description":"401 invalid_api_key — The Bearer API key is missing, malformed, or not recognized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The Bearer API key is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_api_key"}}}}},"Error_api_key_frozen":{"description":"403 api_key_frozen — The API key is currently frozen and cannot be used for requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The API key is currently frozen and cannot be used for requests.","type":"forbidden","code":"api_key_frozen"}}}}},"Error_api_key_revoked":{"description":"401 api_key_revoked — The API key has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The API key has been revoked and can no longer be used.","type":"invalid_request_error","code":"api_key_revoked"}}}}},"Error_invalid_app_grant":{"description":"401 invalid_app_grant — The Bearer app grant token is missing, malformed, or not recognized.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The Bearer app grant token is missing, malformed, or not recognized.","type":"invalid_request_error","code":"invalid_app_grant"}}}}},"Error_app_grant_frozen":{"description":"403 app_grant_frozen — The app grant is currently frozen and cannot be used for requests.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The app grant is currently frozen and cannot be used for requests.","type":"forbidden","code":"app_grant_frozen"}}}}},"Error_app_grant_revoked":{"description":"401 app_grant_revoked — The app grant has been revoked and can no longer be used.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The app grant has been revoked and can no longer be used.","type":"invalid_request_error","code":"app_grant_revoked"}}}}},"Error_model_restricted":{"description":"403 model_restricted — The requested model is not in this key's allowed-models list.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The requested model is not in this key's allowed-models list.","type":"forbidden","code":"model_restricted"}}}}},"Error_bad_request":{"description":"400 bad_request — The request is invalid in a way that does not match a more specific error code.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request is invalid in a way that does not match a more specific error code.","type":"invalid_request_error","code":"bad_request"}}}}},"Error_validation_failed":{"description":"422 validation_failed — The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request failed validation. A schema failure lists every issue in `error.issues[]`; a single-field failure names that field in `error.param`.","type":"invalid_request_error","code":"validation_failed"}}}}},"Error_upstream_rejected":{"description":"422 upstream_rejected — The upstream the request was routed to refused it as invalid.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The upstream the request was routed to refused it as invalid.","type":"invalid_request_error","code":"upstream_rejected"}}}}},"Error_method_not_allowed":{"description":"405 method_not_allowed — The endpoint exists but does not accept this HTTP method.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The endpoint exists but does not accept this HTTP method.","type":"invalid_request_error","code":"method_not_allowed"}}}}},"Error_payload_too_large":{"description":"413 payload_too_large — The request body is larger than the exchange accepts.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request body is larger than the exchange accepts.","type":"invalid_request_error","code":"payload_too_large"}}}}},"Error_not_found":{"description":"404 not_found — The requested resource does not exist.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The requested resource does not exist.","type":"not_found","code":"not_found"}}}}},"Error_already_exists":{"description":"409 already_exists — A resource with the same unique identity already exists.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"A resource with the same unique identity already exists.","type":"conflict","code":"already_exists"}}}}},"Error_conflict":{"description":"409 conflict — The request conflicts with the current state of the resource; read it again before retrying.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request conflicts with the current state of the resource; read it again before retrying.","type":"conflict","code":"conflict"}}}}},"Error_invitation_expired":{"description":"409 invitation_expired — The organization invitation is past its expiry and can no longer be accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The organization invitation is past its expiry and can no longer be accepted.","type":"conflict","code":"invitation_expired"}}}}},"Error_invitation_revoked":{"description":"409 invitation_revoked — The organization invitation was withdrawn before it was accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The organization invitation was withdrawn before it was accepted.","type":"conflict","code":"invitation_revoked"}}}}},"Error_invitation_already_accepted":{"description":"409 invitation_already_accepted — The organization invitation has already been accepted.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The organization invitation has already been accepted.","type":"conflict","code":"invitation_already_accepted"}}}}},"Error_supplier_handle_taken":{"description":"409 supplier_handle_taken — The supplier handle is already registered or reserved.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The supplier handle is already registered or reserved.","type":"conflict","code":"supplier_handle_taken"}}}}},"Error_supplier_handle_required":{"description":"409 supplier_handle_required — The caller has no supplier handle yet.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The caller has no supplier handle yet.","type":"conflict","code":"supplier_handle_required"}}}}},"Error_offer_changed":{"description":"409 offer_changed — The supplier's offer changed after the terms were read, or the terms name a price version that is not open.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The supplier's offer changed after the terms were read, or the terms name a price version that is not open.","type":"conflict","code":"offer_changed"}}}}},"Error_offer_pool_public":{"description":"422 offer_pool_public — The pool is public, and endpoints are shared only with private pools.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The pool is public, and endpoints are shared only with private pools.","type":"invalid_request_error","code":"offer_pool_public"}}}}},"Error_offer_unavailable":{"description":"422 offer_unavailable — A model a supplier offers to the key's pool cannot serve this request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"A model a supplier offers to the key's pool cannot serve this request.","type":"invalid_request_error","code":"offer_unavailable"}}}}},"Error_operation_unsupported":{"description":"422 operation_unsupported — The request uses a feature the exchange does not offer on this endpoint.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request uses a feature the exchange does not offer on this endpoint.","type":"invalid_request_error","code":"operation_unsupported"}}}}},"Error_history_unsupported":{"description":"422 history_unsupported — The request relies on response state the exchange does not keep.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request relies on response state the exchange does not keep.","type":"invalid_request_error","code":"history_unsupported"}}}}},"Error_history_unavailable":{"description":"422 history_unavailable — The conversation replays state only another backend can continue.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The conversation replays state only another backend can continue.","type":"invalid_request_error","code":"history_unavailable"}}}}},"Error_insufficient_balance":{"description":"402 insufficient_balance — The account's $COMPUTE balance is below the requested amount.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The account's $COMPUTE balance is below the requested amount.","type":"insufficient_quota","code":"insufficient_balance"}}}}},"Error_spending_limit_reached":{"description":"429 spending_limit_reached — A spending cap has been reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"A spending cap has been reached.","type":"rate_limit_error","code":"spending_limit_reached"}}}}},"Error_all_routes_exhausted":{"description":"502 all_routes_exhausted — No upstream capacity could serve the routed models.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"No upstream capacity could serve the routed models.","type":"server_error","code":"all_routes_exhausted"}}}}},"Error_deadline_exceeded":{"description":"504 deadline_exceeded — The request ran out of time before any upstream produced output.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The request ran out of time before any upstream produced output.","type":"server_error","code":"deadline_exceeded"}}}}},"Error_rate_limited":{"description":"429 rate_limited — A rate or concurrency limit this request falls under was reached.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"A rate or concurrency limit this request falls under was reached.","type":"rate_limit_error","code":"rate_limited"}}}}},"Error_stream_interrupted":{"description":"500 stream_interrupted — The SSE stream aborted before completion.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"The SSE stream aborted before completion.","type":"server_error","code":"stream_interrupted"}}}}},"Error_endpoint_unreachable":{"description":"502 endpoint_unreachable — An inference endpoint could not be reached, or its response broke the exchange's transport rules.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"An inference endpoint could not be reached, or its response broke the exchange's transport rules.","type":"server_error","code":"endpoint_unreachable"}}}}},"Error_contract_error":{"description":"500 contract_error — An on-chain call reverted or could not be confirmed.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"An on-chain call reverted or could not be confirmed.","type":"server_error","code":"contract_error"}}}}},"Error_internal_error":{"description":"500 internal_error — An unexpected server-side failure occurred.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"An unexpected server-side failure occurred.","type":"server_error","code":"internal_error"}}}}},"Error_service_unavailable":{"description":"503 service_unavailable — A dependency, a setting or the capacity this request needs is unavailable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ErrorEnvelope"},"example":{"error":{"message":"A dependency, a setting or the capacity this request needs is unavailable.","type":"server_error","code":"service_unavailable"}}}}}}},"externalDocs":{"description":"Inference guide, quickstarts, SDK matrix","url":"https://docs.compute.finance/#inference-api"}}