{"openapi":"3.1.0","info":{"title":"SentioGate API","version":"1.0.0","summary":"OpenAI-compatible BYOK gateway with price-aware auto routing.","description":"SentioGate forwards OpenAI-compatible chat completions to the providers whose keys you store in your vault (BYOK).\n\nSend `model: \"auto\"` to let SentioGate pick a suitable, cost-effective model from the providers you enabled.\n\nRequests on your own models run on the provider keys in your vault. Without any keys, `model: \"auto\"` is served by the free community pool (600 requests per 5 hours per user).\n\nErrors from /chat/completions use the OpenAI shape `{error:{message,type,code}}`.\n\nPOST /messages speaks the Anthropic Messages API (for Claude Code and Anthropic SDKs). Errors there use the Anthropic shape `{type:\"error\",error:{type,message}}`."},"servers":[{"url":"https://api.sentiogate.dev/v1","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Inference"},{"name":"Anthropic"},{"name":"Chat"},{"name":"Modalities"},{"name":"Catalog"}],"paths":{"/chat/completions":{"post":{"tags":["Inference"],"operationId":"createChatCompletion","summary":"Create a chat completion (OpenAI-compatible)","description":"With `stream: true` the upstream Server-Sent Events stream is passed through unchanged and router metadata is returned in the `X-SentioGate-Router` response header (JSON). Non-streaming responses carry the same metadata in the `router` field.","parameters":[{"name":"X-Session-ID","in":"header","required":false,"description":"Conversation or agent-session id (max 256 chars) for session affinity.","schema":{"type":"string"}},{"name":"X-SentioGate-Prompt-Cache","in":"header","required":false,"description":"Set to `off` to disable automatic prompt-cache optimization.","schema":{"type":"string","enum":["off"]}},{"name":"X-SentioGate-Cache","in":"header","required":false,"description":"Set to `off` to skip response caching for this request.","schema":{"type":"string","enum":["off","bypass","force"]}},{"name":"X-SentioGate-Tool-Guard","in":"header","required":false,"description":"Tool-call safety guard (`flag`, `block`, or `off`).","schema":{"type":"string","enum":["flag","block","off"]}},{"name":"X-SentioGate-PII-Redact","in":"header","required":false,"description":"Opt-in PII and secret redaction for outbound prompts (`on` or `off`).","schema":{"type":"string","enum":["on","off"]}},{"name":"X-SentioGate-Allow-Queue","in":"header","required":false,"description":"Allow queuing on the community batch queue when busy (`true` or `false`).","schema":{"type":"string","enum":["true","false","on","off","1","0"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionRequest"}}}},"responses":{"200":{"description":"Completion. `text/event-stream` when `stream: true`.","headers":{"X-SentioGate-Router":{"description":"JSON-encoded RouterInfo (streaming responses).","schema":{"type":"string"}},"X-SentioGate-Cache":{"description":"Cache status for this request.","schema":{"type":"string"}},"X-SentioGate-Cache-Saved-USD":{"description":"Estimated USD saved when served from cache.","schema":{"type":"string"}},"X-SentioGate-Guard":{"description":"Present when a tool call is flagged or blocked. Also summarized in `router.guard`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}},"text/event-stream":{"schema":{"type":"string","description":"OpenAI-format SSE chunks, ending with `data: [DONE]`."}}}},"400":{"description":"Invalid request body or blocked request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid SentioGate API key (`invalid_api_key`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"402":{"description":"No provider key in your vault for the requested provider, or no keys at all (`no_provider_key`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"403":{"description":"Model disabled by vault policy (`model_disabled_by_policy`), or auto found no capable/enabled model (`no_capable_model`, `no_enabled_models`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"422":{"description":"Strict per-request budget exceeded when strict_cost is enabled with max_cost_usd (`max_cost_exceeded`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"429":{"description":"Vault spend/request cap reached (`policy_limit_reached`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"501":{"description":"Selected provider is not OpenAI-compatible and cannot be forwarded by the edge (`provider_not_supported_on_edge`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"description":"Upstream provider returned an error or was unreachable.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"503":{"description":"Temporarily unavailable, for example the free community pool is busy (`community_busy`, with `Retry-After`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/messages":{"post":{"tags":["Anthropic"],"operationId":"createMessage","summary":"Create a message (Anthropic Messages API)","security":[{"apiKeyHeader":[]},{"bearerAuth":[]}],"description":"Anthropic-compatible endpoint for Claude Code and Anthropic SDKs: set `ANTHROPIC_BASE_URL=https://api.sentiogate.dev` and `ANTHROPIC_API_KEY` to your `sg_live_...` key (sent as `x-api-key` or `Authorization: Bearer`).\n\nSupports `claude-*`, `auto`, `auto-code`, and `provider/model` ids. Router summary metadata is returned in the `X-SentioGate-Router` header.","parameters":[{"name":"anthropic-version","in":"header","required":false,"description":"Anthropic API version (default `2023-06-01`).","schema":{"type":"string"}},{"name":"anthropic-beta","in":"header","required":false,"description":"Anthropic beta flags.","schema":{"type":"string"}},{"name":"X-SentioGate-Tool-Guard","in":"header","required":false,"description":"Tool-call safety guard (`flag`, `block`, or `off`).","schema":{"type":"string","enum":["flag","block","off"]}},{"name":"X-SentioGate-PII-Redact","in":"header","required":false,"description":"Opt-in PII and secret redaction for outbound prompts (`on` or `off`).","schema":{"type":"string","enum":["on","off"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"Message. `text/event-stream` when `stream: true`.","headers":{"X-SentioGate-Router":{"description":"JSON-encoded RouterInfo.","schema":{"type":"string"}},"X-SentioGate-Guard":{"description":"Present when a tool call is flagged or blocked. Also summarized in `router.guard`.","schema":{"type":"string"}}},"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesResponse"}},"text/event-stream":{"schema":{"type":"string","description":"Anthropic-format SSE events."}}}},"400":{"description":"Invalid request (`invalid_request_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"401":{"description":"Missing or invalid SentioGate API key (`authentication_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"402":{"description":"No provider key in your vault for the requested model (`billing_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"403":{"description":"Model not available without your own provider key, or disabled by vault policy (`permission_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"405":{"description":"Only POST (and HEAD) are supported.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"413":{"description":"Request too large (`request_too_large`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"429":{"description":"Rate limited (`rate_limit_error`); `Retry-After` is set when known.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"501":{"description":"The requested provider cannot be served by the edge (`api_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"502":{"description":"Upstream provider error (`api_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"504":{"description":"Upstream provider timed out (`timeout_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"529":{"description":"Upstream provider overloaded (`overloaded_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/messages/count_tokens":{"post":{"tags":["Anthropic"],"operationId":"countMessageTokens","summary":"Count input tokens (Anthropic Messages API)","security":[{"apiKeyHeader":[]},{"bearerAuth":[]}],"description":"For `claude-*` models with your own Anthropic key in the Vault, Anthropic counts the tokens. Otherwise SentioGate returns an estimate. The `X-SentioGate-Token-Count` response header says which (`anthropic` or `estimate`).","parameters":[{"name":"anthropic-version","in":"header","required":false,"description":"Anthropic API version (default `2023-06-01`).","schema":{"type":"string"}},{"name":"anthropic-beta","in":"header","required":false,"description":"Anthropic beta flags.","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MessagesRequest"}}}},"responses":{"200":{"description":"Token count","content":{"application/json":{"schema":{"type":"object","required":["input_tokens"],"properties":{"input_tokens":{"type":"integer"}}}}}},"400":{"description":"Invalid request (`invalid_request_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"401":{"description":"Missing or invalid SentioGate API key (`authentication_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}},"429":{"description":"Rate limited (`rate_limit_error`).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/responses":{"post":{"tags":["Chat"],"operationId":"createResponse","summary":"OpenAI Responses API","security":[{"bearerAuth":[]}],"description":"OpenAI-compatible `/v1/responses` endpoint with SentioGate routing and failover.","parameters":[{"name":"X-SentioGate-Tool-Guard","in":"header","required":false,"description":"Tool-call safety guard (`flag`, `block`, or `off`).","schema":{"type":"string","enum":["flag","block","off"]}},{"name":"X-SentioGate-PII-Redact","in":"header","required":false,"description":"Opt-in PII and secret redaction for outbound prompts (`on` or `off`).","schema":{"type":"string","enum":["on","off"]}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"properties":{"model":{"type":"string"},"input":{},"instructions":{"type":"string"},"stream":{"type":"boolean"},"store":{"type":"boolean"},"previous_response_id":{"type":"string"},"max_output_tokens":{"type":"integer"}}}}}},"responses":{"200":{"description":"Response object or SSE stream","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request or guardrail block.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Missing or invalid SentioGate API key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/responses/{response_id}":{"get":{"tags":["Chat"],"operationId":"getResponse","summary":"Retrieve a stored response (when store=true)","security":[{"bearerAuth":[]}],"parameters":[{"name":"response_id","in":"path","required":true,"schema":{"type":"string"}}],"responses":{"200":{"description":"Stored response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"404":{"description":"Not found or expired.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/embeddings":{"post":{"tags":["Modalities"],"operationId":"createEmbedding","summary":"Multi-provider BYOK embeddings","security":[{"bearerAuth":[]}],"parameters":[{"name":"X-SentioGate-Provider","in":"header","required":false,"description":"Pin a specific provider for this request (for example `openai`, `anthropic`, `openrouter`).","schema":{"type":"string"}},{"name":"X-SentioGate-Provider-Key","in":"header","required":false,"description":"Per-request provider API key override (never stored).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["input"],"properties":{"model":{"type":"string"},"input":{},"dimensions":{"type":"integer"}}}}}},"responses":{"200":{"description":"Embeddings response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request or missing provider key.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/images/generations":{"post":{"tags":["Modalities"],"operationId":"createImage","summary":"BYOK image generation pass-through","security":[{"bearerAuth":[]}],"parameters":[{"name":"X-SentioGate-Provider","in":"header","required":false,"description":"Pin a specific provider for this request (for example `openai`, `anthropic`, `openrouter`).","schema":{"type":"string"}},{"name":"X-SentioGate-Provider-Key","in":"header","required":false,"description":"Per-request provider API key override (never stored).","schema":{"type":"string"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["prompt"],"properties":{"model":{"type":"string"},"prompt":{"type":"string"}}}}}},"responses":{"200":{"description":"Image response","content":{"application/json":{"schema":{"type":"object"}}}},"400":{"description":"Invalid request.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"401":{"description":"Not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audio/transcriptions":{"post":{"tags":["Modalities"],"operationId":"createTranscription","summary":"BYOK audio transcription pass-through","security":[{"bearerAuth":[]}],"parameters":[{"name":"X-SentioGate-Provider","in":"header","required":false,"description":"Pin a specific provider for this request (for example `openai`, `anthropic`, `openrouter`).","schema":{"type":"string"}},{"name":"X-SentioGate-Provider-Key","in":"header","required":false,"description":"Per-request provider API key override (never stored).","schema":{"type":"string"}}],"responses":{"200":{"description":"Transcription response","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/audio/speech":{"post":{"tags":["Modalities"],"operationId":"createSpeech","summary":"BYOK text-to-speech pass-through","security":[{"bearerAuth":[]}],"parameters":[{"name":"X-SentioGate-Provider","in":"header","required":false,"description":"Pin a specific provider for this request (for example `openai`, `anthropic`, `openrouter`).","schema":{"type":"string"}},{"name":"X-SentioGate-Provider-Key","in":"header","required":false,"description":"Per-request provider API key override (never stored).","schema":{"type":"string"}}],"responses":{"200":{"description":"Audio stream","content":{"application/json":{"schema":{"type":"object"}}}},"401":{"description":"Not authenticated.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/models":{"get":{"tags":["Catalog"],"operationId":"listModels","summary":"List routable model ids","security":[],"responses":{"200":{"description":"Model list","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelList"}}}}}}},"/providers":{"get":{"tags":["Catalog"],"operationId":"listProviders","summary":"List supported providers","security":[],"responses":{"200":{"description":"Providers","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/pricing":{"get":{"tags":["Catalog"],"operationId":"getPricing","summary":"Model list prices used for routing and cost estimates","security":[],"responses":{"200":{"description":"Pricing snapshot","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/pricing/models":{"get":{"tags":["Catalog"],"operationId":"getModelPrices","summary":"Per-model list prices (USD per token), context length and tool support","security":[],"responses":{"200":{"description":"Model price catalog","content":{"application/json":{"schema":{"type":"object","properties":{"source":{"type":"string"},"fetched_at":{"type":["string","null"]},"count":{"type":"integer"},"models":{"type":"object","additionalProperties":{"type":"object","properties":{"prompt":{"type":["number","null"]},"completion":{"type":["number","null"]},"context":{"type":["integer","null"]},"tools":{"type":["boolean","null"]}}}}}}}}}}}},"/benchmarks":{"get":{"tags":["Catalog"],"operationId":"getBenchmarks","summary":"Per-model latency and success rates measured from recent routed traffic","security":[],"responses":{"200":{"description":"Measured model stats","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BenchmarkList"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"A SentioGate API key (`sg_live_...`) or a dashboard session JWT."},"apiKeyHeader":{"type":"apiKey","in":"header","name":"x-api-key","description":"A SentioGate API key (`sg_live_...`), as Anthropic SDKs and Claude Code send it."}},"schemas":{"Error":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message"],"properties":{"message":{"type":"string"},"type":{"type":"string"},"code":{"type":"string","enum":["invalid_api_key","no_provider_key","model_disabled_by_policy","no_capable_model","no_enabled_models","max_cost_exceeded","policy_limit_reached","provider_not_supported_on_edge"]},"provider":{"type":["string","null"]},"model":{"type":["string","null"]}}}}},"Detail":{"type":"object","properties":{"detail":{"type":"string"}}},"AnthropicError":{"type":"object","required":["type","error"],"properties":{"type":{"type":"string","const":"error"},"error":{"type":"object","required":["type","message"],"properties":{"type":{"type":"string","enum":["invalid_request_error","authentication_error","billing_error","permission_error","not_found_error","request_too_large","rate_limit_error","timeout_error","api_error","overloaded_error"]},"message":{"type":"string"}}}}},"MessagesRequest":{"type":"object","required":["model","max_tokens","messages"],"properties":{"model":{"type":"string","description":"`claude-*` (native with your Anthropic key; via OpenRouter as `anthropic/<id>` otherwise), `auto`, `auto-code`, `sentiogate-community`, or `provider/model`."},"max_tokens":{"type":"integer","minimum":1},"messages":{"type":"array","items":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]}}}},"system":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"stream":{"type":"boolean","default":false},"temperature":{"type":"number"},"top_p":{"type":"number"},"top_k":{"type":"integer"},"stop_sequences":{"type":"array","items":{"type":"string"}},"tools":{"type":"array","items":{"type":"object"},"description":"Custom tools are supported on every route; Anthropic server tools only on the native route."},"tool_choice":{"type":"object"},"thinking":{"type":"object"},"metadata":{"type":"object"}}},"MessagesResponse":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"message"},"role":{"type":"string","const":"assistant"},"model":{"type":"string"},"content":{"type":"array","items":{"type":"object"}},"stop_reason":{"type":["string","null"],"enum":["end_turn","max_tokens","stop_sequence","tool_use","pause_turn","refusal",null]},"stop_sequence":{"type":["string","null"]},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"cache_creation_input_tokens":{"type":"integer"},"cache_read_input_tokens":{"type":"integer"}}}}},"Message":{"type":"object","required":["role","content"],"properties":{"role":{"type":"string","enum":["system","user","assistant","tool"]},"content":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"object"}}]},"name":{"type":"string"}}},"ChatCompletionRequest":{"type":"object","required":["messages"],"properties":{"model":{"type":"string","default":"auto","description":"`auto`, `auto-code` (dedicated coding agent profile), `sentiogate/auto-code`, `provider/model` (e.g. `openai/gpt-4o-mini`) or a bare model id."},"models":{"type":"array","items":{"type":"string"},"maxItems":32,"description":"Optional whitelist of candidate models for `auto` or `auto-code` routing."},"messages":{"type":"array","items":{"$ref":"#/components/schemas/Message"}},"stream":{"type":"boolean","default":false},"temperature":{"type":"number","description":"Sent upstream only when set; unset uses the provider default."},"max_tokens":{"type":"integer"},"top_p":{"type":"number"},"frequency_penalty":{"type":"number"},"presence_penalty":{"type":"number"},"stop":{"oneOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"task_class":{"$ref":"#/components/schemas/TaskClass"},"route_preference":{"$ref":"#/components/schemas/RoutePreference"},"strict_cost":{"type":"boolean","description":"Prioritize lowest estimated dollar cost over quality/value weighting."},"max_cost_usd":{"type":"number","description":"Optional per-request expected cost ceiling (USD). Picks highest intelligence within budget, or relaxes gracefully unless strict_cost is true (which returns 422 max_cost_exceeded when no initial or fallback model fits the remaining budget)."},"max_latency_ms":{"type":"integer","description":"Optional per-request predicted wall-clock latency ceiling (ms)."},"session_id":{"type":"string","description":"Same as header X-Session-ID."},"cache":{"type":"boolean","description":"Set to false to skip response caching for this request."},"compress":{"type":"string","enum":["auto","lossless","on","off"],"default":"auto","description":"Context optimization mode: auto (default), lossless, on, or off."},"metadata":{"type":"object","properties":{"task_class":{"$ref":"#/components/schemas/TaskClass"},"route_preference":{"$ref":"#/components/schemas/RoutePreference"},"strict_cost":{"type":"boolean"},"max_cost_usd":{"type":"number"},"max_latency_ms":{"type":"integer"}}},"tools":{"type":"array","items":{"type":"object"},"description":"OpenAI-style tools; forwarded upstream."},"tool_choice":{"description":"Forwarded upstream with tools."},"parallel_tool_calls":{"type":"boolean","description":"Forwarded upstream when set."},"functions":{"type":"array","items":{"type":"object"},"description":"Legacy OpenAI functions; forwarded when tools is absent."},"provider_keys":{"type":"object","additionalProperties":{"type":"string"},"description":"Per-request provider key overrides (not stored)."}}},"TaskClass":{"type":"string","enum":["classification","simple_qa","summarization","general","long_context","coding","reasoning"],"description":"Optional hint for `model: \"auto\"` that overrides the automatic task detection."},"RoutePreference":{"type":"string","enum":["cost","quality","latency","strict_cost"],"default":"cost","description":"`cost` (default): balanced cost/capability. `strict_cost`: lowest cost. `quality`: prefer more capable models. `latency`: prefer faster models."},"RouterInfo":{"type":"object","description":"SentioGate routing summary.","properties":{"latency_ms":{"type":"integer","description":"End-to-end time at the edge (non-streaming)."},"provider":{"type":"string"},"model":{"type":"string"},"policy":{"type":"string","enum":["sentiogate_auto","sentiogate_auto_code","explicit","cache"]},"task_class":{"$ref":"#/components/schemas/TaskClass"},"estimated_cost_usd":{"type":["number","null"]},"constraints":{"type":"object","description":"Present when max_cost_usd or max_latency_ms was requested.","properties":{"status":{"type":"string","enum":["satisfied","relaxed"]},"max_cost_usd":{"type":"number"},"max_latency_ms":{"type":"integer"}}},"attempts":{"type":"array","items":{"type":"string"},"description":"`provider/model:status` per upstream attempt."},"route_preference":{"$ref":"#/components/schemas/RoutePreference"},"prompt_cache":{"type":"object","description":"Provider prompt-cache usage and estimated savings.","properties":{"cached_tokens":{"type":"integer"},"saved_usd":{"type":["number","null"]}}},"cache":{"type":"object","properties":{"hit":{"type":"boolean"},"saved_usd":{"type":"number"}}},"compression":{"type":"object","properties":{"applied":{"type":"boolean"},"saved_tokens":{"type":"integer"},"saved_pct":{"type":"number"}}},"guard":{"type":"object","description":"Present when tool-call safety guard inspects tool calls.","properties":{"mode":{"type":"string","enum":["flag","block"]},"flagged":{"type":"integer"},"blocked":{"type":"boolean"}}}}},"ChatCompletionResponse":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer"},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"$ref":"#/components/schemas/Message"},"finish_reason":{"type":["string","null"]}}}},"usage":{"type":"object","properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"}}},"cached":{"type":"boolean"},"router":{"$ref":"#/components/schemas/RouterInfo"}}},"ModelList":{"type":"object","properties":{"object":{"type":"string","const":"list"},"data":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"object":{"type":"string"},"owned_by":{"type":"string"},"context_length":{"type":"integer"}}}}}},"BenchmarkList":{"type":"object","properties":{"window":{"type":"string"},"measured":{"type":"boolean"},"benchmarks":{"type":"array","items":{"type":"object","properties":{"provider":{"type":"string"},"model":{"type":"string"},"samples":{"type":"integer"},"p50_latency_ms":{"type":["number","null"]},"avg_ttft_ms":{"type":["number","null"]},"error_rate_pct":{"type":["number","null"]}}}}}}}}}