{"openapi":"3.1.0","info":{"title":"HyperInfer API","version":"1","description":"The HyperInfer AI Gateway: any-to-any AI-format translation — OpenAI Chat Completions, OpenAI Responses, and Anthropic Messages, each against any model in the catalog. Generated at boot from the same zod schemas that validate requests. Human docs: https://hyperinfer.ai/docs","contact":{"name":"HyperInfer","url":"https://hyperinfer.ai/contact","email":"sales@hyperinfer.ai"}},"servers":[{"url":"https://api.hyperinfer.ai","description":"Production"}],"security":[{"bearerAuth":[]}],"tags":[{"name":"Gateway","description":"AI Gateway ingress formats (002-R4) — any model, any format."},{"name":"Catalog","description":"Public model catalog (002-R13)."},{"name":"Metadata","description":"Post-hoc request metadata (002-R9)."},{"name":"Health","description":"Liveness/readiness (002-R32)."},{"name":"Internal","description":"Internal service endpoints — not for API-key callers."}],"paths":{"/api/v1/chat/completions":{"post":{"tags":["Gateway"],"operationId":"createChatCompletion","summary":"Create a chat completion (OpenAI Chat Completions format)","description":"OpenAI Chat Completions ingress. Works with every model in the catalog via any-to-any translation (002-R5). Server tools activate via the OpenRouter-style top-level `plugins` array (002-R11).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["system","developer","user","assistant","tool"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image_url"},"image_url":{"type":"object","properties":{"url":{"type":"string"},"detail":{"type":"string"}},"required":["url"],"additionalProperties":false}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"file"},"file":{"type":"object","properties":{"filename":{"type":"string"},"file_data":{"type":"string"},"file_url":{"type":"string"},"file_id":{"type":"string"}},"additionalProperties":false}},"required":["type","file"],"additionalProperties":false}]}},{"type":"null"}]},"name":{"type":"string"},"reasoning":{"type":["string","null"]},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}},"required":["name","arguments"],"additionalProperties":false}},"required":["id","type","function"],"additionalProperties":false}},"tool_call_id":{"type":"string"}},"required":["role"],"additionalProperties":false},"minItems":1},"tools":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"parameters":{"type":"object","additionalProperties":{}}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"}},"required":["name"],"additionalProperties":false}},"required":["type","function"],"additionalProperties":false}]},"max_tokens":{"type":"integer","exclusiveMinimum":0},"max_completion_tokens":{"type":"integer","exclusiveMinimum":0},"temperature":{"type":"number","minimum":0,"maximum":2},"top_p":{"type":"number","minimum":0,"maximum":1},"stop":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"string"}}]},"response_format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"]},"json_schema":{"type":"object","properties":{"name":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":"boolean"}},"required":["name","schema"],"additionalProperties":false}},"required":["type"],"additionalProperties":false},"reasoning_effort":{"type":"string","enum":["low","medium","high"]},"stream":{"type":"boolean"},"stream_options":{"type":"object","properties":{"include_usage":{"type":"boolean"}},"additionalProperties":false},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["web_search","web_fetch","pdf","datetime","image"]},"events":{"type":"boolean"}},"required":["id"],"additionalProperties":true}},"hi_tool_events":{"type":"boolean"},"user":{"type":"string"}},"required":["model","messages"],"additionalProperties":true}}}},"responses":{"200":{"description":"The completion. With `stream: true`, an SSE stream instead (see the text/event-stream variant).","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChatCompletionResponse"}},"text/event-stream":{"schema":{"type":"string","description":"SSE stream of `chat.completion.chunk` objects (`data:` frames): a role frame, then content/reasoning/tool_call deltas, a finish_reason frame, a final usage-only chunk (always emitted — stream_options.include_usage semantics, 002-R8), and `data: [DONE]`. Keep-alive comments every 15 s."}}}},"default":{"description":"Error in this ingress format's native envelope, with the stable taxonomy `code` (002-R7). See the ErrorCode schema for the code → HTTP status mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/api/v1/responses":{"post":{"tags":["Gateway"],"operationId":"createResponse","summary":"Create a response (OpenAI Responses format)","description":"OpenAI Responses ingress. Stateless: `previous_response_id` is rejected explicitly — send the full input. Server tools activate as built-in tools (`tools: [{ type: \"web_search\" }, …]`).","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"input":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"message"},"role":{"type":"string","enum":["system","developer","user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"input_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"output_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_image"},"image_url":{"type":"string"},"detail":{"type":"string"}},"required":["type","image_url"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"input_file"},"filename":{"type":"string"},"file_data":{"type":"string"},"file_url":{"type":"string"}},"required":["type"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"function_call"},"call_id":{"type":"string"},"name":{"type":"string"},"arguments":{"type":"string"}},"required":["type","call_id","name","arguments"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"function_call_output"},"call_id":{"type":"string"},"output":{"type":"string"}},"required":["type","call_id","output"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"reasoning"},"summary":{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"summary_text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},"default":[]}},"required":["type"],"additionalProperties":false}]}}]},"instructions":{"type":["string","null"]},"tools":{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string"},"description":{"type":["string","null"]},"parameters":{"anyOf":[{"type":"object","additionalProperties":{}},{"type":"null"}]},"strict":{"type":["boolean","null"]}},"required":["type","name"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","enum":["web_search","web_fetch","pdf","datetime","image"]},"events":{"type":"boolean"}},"required":["type"],"additionalProperties":true}]}},"tool_choice":{"anyOf":[{"type":"string","enum":["auto","none","required"]},{"type":"object","properties":{"type":{"type":"string","const":"function"},"name":{"type":"string"}},"required":["type","name"],"additionalProperties":false}]},"max_output_tokens":{"anyOf":[{"type":"integer","exclusiveMinimum":0},{"type":"null"}]},"temperature":{"anyOf":[{"type":"number","minimum":0,"maximum":2},{"type":"null"}]},"top_p":{"anyOf":[{"type":"number","minimum":0,"maximum":1},{"type":"null"}]},"stream":{"type":"boolean"},"text":{"type":"object","properties":{"format":{"type":"object","properties":{"type":{"type":"string","enum":["text","json_object","json_schema"]},"name":{"type":"string"},"schema":{"type":"object","additionalProperties":{}},"strict":{"type":"boolean"}},"required":["type"],"additionalProperties":false}},"additionalProperties":false},"reasoning":{"anyOf":[{"type":"object","properties":{"effort":{"anyOf":[{"type":"string","enum":["low","medium","high"]},{"type":"null"}]}},"additionalProperties":false},{"type":"null"}]},"previous_response_id":{"type":["string","null"]},"store":{"type":"boolean"},"hi_tool_events":{"type":"boolean"}},"required":["model","input"],"additionalProperties":true}}}},"responses":{"200":{"description":"The response object. With `stream: true`, an SSE stream instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ResponsesResponse"}},"text/event-stream":{"schema":{"type":"string","description":"Semantic SSE event protocol (`event:` + `data:` frames): `response.created` / `response.in_progress`, then per-item events (`response.output_item.added`, `response.output_text.delta`, `response.function_call_arguments.delta`, matching `*.done` events), ending with `response.completed` carrying the full response incl. usage (002-R8). Keep-alive comments every 15 s."}}}},"default":{"description":"Error in this ingress format's native envelope, with the stable taxonomy `code` (002-R7). See the ErrorCode schema for the code → HTTP status mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/api/v1/messages":{"post":{"tags":["Gateway"],"operationId":"createMessage","summary":"Create a message (Anthropic Messages format)","description":"Anthropic Messages ingress. Server tools activate via the top-level `plugins` array (HyperInfer extension, same idiom as chat completions). `response_format` has no Anthropic equivalent and is rejected explicitly.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string"},"max_tokens":{"type":"integer","exclusiveMinimum":0},"messages":{"type":"array","items":{"type":"object","properties":{"role":{"type":"string","enum":["user","assistant"]},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"thinking"},"thinking":{"type":"string"},"signature":{"type":"string"}},"required":["type","thinking"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"document"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]},"title":{"type":"string"}},"required":["type","source"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_use"},"id":{"type":"string"},"name":{"type":"string"},"input":{"type":"object","additionalProperties":{}}},"required":["type","id","name","input"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"tool_result"},"tool_use_id":{"type":"string"},"content":{"anyOf":[{"type":"string"},{"type":"array","items":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"image"},"source":{"anyOf":[{"type":"object","properties":{"type":{"type":"string","const":"base64"},"media_type":{"type":"string"},"data":{"type":"string"}},"required":["type","media_type","data"],"additionalProperties":false},{"type":"object","properties":{"type":{"type":"string","const":"url"},"url":{"type":"string"}},"required":["type","url"],"additionalProperties":false}]}},"required":["type","source"],"additionalProperties":false}]}}]},"is_error":{"type":"boolean"}},"required":["type","tool_use_id"],"additionalProperties":false}]}}]}},"required":["role","content"],"additionalProperties":false},"minItems":1},"system":{"anyOf":[{"type":"string"},{"type":"array","items":{"type":"object","properties":{"type":{"type":"string","const":"text"},"text":{"type":"string"}},"required":["type","text"],"additionalProperties":false}}]},"tools":{"type":"array","items":{"type":"object","properties":{"name":{"type":"string"},"description":{"type":"string"},"input_schema":{"type":"object","additionalProperties":{}}},"required":["name","input_schema"],"additionalProperties":false}},"tool_choice":{"type":"object","properties":{"type":{"type":"string","enum":["auto","any","tool","none"]},"name":{"type":"string"}},"required":["type"],"additionalProperties":false},"temperature":{"type":"number","minimum":0,"maximum":1},"top_p":{"type":"number","minimum":0,"maximum":1},"stop_sequences":{"type":"array","items":{"type":"string"}},"stream":{"type":"boolean"},"thinking":{"type":"object","properties":{"type":{"type":"string","enum":["enabled","disabled"]},"budget_tokens":{"type":"integer"}},"required":["type"],"additionalProperties":false},"metadata":{"type":"object","additionalProperties":{}},"plugins":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","enum":["web_search","web_fetch","pdf","datetime","image"]},"events":{"type":"boolean"}},"required":["id"],"additionalProperties":true}},"hi_tool_events":{"type":"boolean"}},"required":["model","max_tokens","messages"],"additionalProperties":true}}}},"responses":{"200":{"description":"The message. With `stream: true`, an SSE stream instead.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicMessageResponse"}},"text/event-stream":{"schema":{"type":"string","description":"Anthropic content-block SSE protocol (`event:` + `data:` frames): `message_start`, then `content_block_start` / `content_block_delta` / `content_block_stop` per block (text_delta, thinking_delta, input_json_delta), `message_delta` with stop_reason + usage (002-R8), and `message_stop`. Keep-alive comments every 15 s."}}}},"default":{"description":"Error in this ingress format's native envelope, with the stable taxonomy `code` (002-R7). See the ErrorCode schema for the code → HTTP status mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AnthropicError"}}}}}}},"/api/v1/models":{"get":{"tags":["Catalog"],"operationId":"listModels","summary":"List models","description":"Public model catalog from providers.yaml (002-R13): pricing, context length, max output tokens, features, datacenter locations. No auth required (002-R3).","security":[],"responses":{"200":{"description":"The catalog.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"array","items":{"$ref":"#/components/schemas/PublicModel"}},"meta":{"type":"object","description":"Deployment capabilities (not per-model).","required":["image_generation_configured"],"properties":{"image_generation_configured":{"type":"boolean","description":"Whether the chat `image` server tool has a real provider configured (009-R74)."}}}}}}}}}}},"/api/v1/generation":{"get":{"tags":["Metadata"],"operationId":"getGeneration","summary":"Get generation metadata","description":"Post-hoc metadata for one of your workspace's requests (002-R9), OpenRouter-style: model, token breakdown, cost in credits, latency. The id is the `X-Request-Id` response header (also embedded in response ids).","parameters":[{"name":"id","in":"query","required":true,"schema":{"type":"string"},"description":"The request id."}],"responses":{"200":{"description":"Generation metadata.","content":{"application/json":{"schema":{"type":"object","required":["data"],"properties":{"data":{"type":"object","properties":{"id":{"type":"string"},"model":{"type":"string"},"ingress_format":{"type":"string","enum":["chat_completions","responses","anthropic_messages"]},"source":{"type":"string","enum":["api","playground","chat"]},"tokens_prompt":{"type":"integer"},"tokens_completion":{"type":"integer"},"tokens_reasoning":{"type":"integer"},"tokens_cached_prompt":{"type":"integer"},"total_cost":{"type":"number","description":"Credits (USD)."},"cost_micro_usd":{"type":"string","description":"Exact micro-USD, as a string."},"tool_costs_micro_usd":{"type":"object","additionalProperties":{"type":"string"}},"latency_ms":{"type":"integer"},"status":{"type":"string"},"error_code":{"$ref":"#/components/schemas/ErrorCode"},"created_at":{"type":"string"}}}}}}}},"default":{"description":"Error in this ingress format's native envelope, with the stable taxonomy `code` (002-R7). See the ErrorCode schema for the code → HTTP status mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/api/v1/playground-keys":{"post":{"tags":["Internal"],"operationId":"mintPlaygroundKey","summary":"Mint a one-time playground key (internal)","description":"INTERNAL — platform app only, authenticated with the `X-Internal-Token` shared secret (003-R13). Mints a one-time key (10 min TTL) for the docs playground / dashboard chat. Not available to API-key callers.","x-internal":true,"security":[{"internalToken":[]}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["workspace_id","user_id"],"properties":{"workspace_id":{"type":"string"},"user_id":{"type":"string"},"source":{"type":"string","enum":["playground","chat"],"default":"playground"}}}}}},"responses":{"201":{"description":"The one-time key.","content":{"application/json":{"schema":{"type":"object","required":["key","expires_at","source"],"properties":{"key":{"type":"string"},"expires_at":{"type":"string","format":"date-time"},"source":{"type":"string","enum":["playground","chat"]}}}}}},"default":{"description":"Error in this ingress format's native envelope, with the stable taxonomy `code` (002-R7). See the ErrorCode schema for the code → HTTP status mapping.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OpenAIError"}}}}}}},"/healthz":{"get":{"tags":["Health"],"operationId":"getHealthz","summary":"Liveness","description":"Dependency-free liveness check (002-R32).","security":[],"responses":{"200":{"description":"Alive.","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"string","const":"ok"}}}}}}}}},"/readyz":{"get":{"tags":["Health"],"operationId":"getReadyz","summary":"Readiness","description":"Readiness incl. Redis/Postgres checks (002-R32). 503 when degraded.","security":[],"responses":{"200":{"description":"Ready.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}},"503":{"description":"Degraded — a dependency is down.","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Readiness"}}}}}}},"/openapi.json":{"get":{"tags":["Metadata"],"operationId":"getOpenApi","summary":"This document","description":"The OpenAPI 3.1 description of this API, generated at boot from the same zod schemas that validate requests (002-R42). Cacheable for 5 minutes.","security":[],"responses":{"200":{"description":"The OpenAPI document.","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer","description":"HyperInfer API key (or one-time playground key): `Authorization: Bearer <key>` (002-R3)."},"internalToken":{"type":"apiKey","in":"header","name":"X-Internal-Token","description":"Shared secret for internal service endpoints — platform app only."}},"schemas":{"ErrorCode":{"type":"string","enum":["provider_auth","provider_rate_limit","provider_overloaded","context_length_exceeded","content_filter","provider_timeout","provider_unavailable","insufficient_credits","key_limit_exceeded","model_not_allowed","invalid_api_key","workspace_locked","rate_limit_exceeded","invalid_request","payload_too_large","internal_error"],"description":"Stable error taxonomy (002-R7), identical across ingress formats. HTTP status per code: provider_auth=502, provider_rate_limit=429, provider_overloaded=529, context_length_exceeded=400, content_filter=400, provider_timeout=504, provider_unavailable=502, insufficient_credits=402, key_limit_exceeded=402, model_not_allowed=403, invalid_api_key=401, workspace_locked=403, rate_limit_exceeded=429, invalid_request=400, payload_too_large=413, internal_error=500."},"OpenAIError":{"type":"object","required":["error"],"properties":{"error":{"type":"object","required":["message","type","code"],"properties":{"message":{"type":"string"},"type":{"type":"string","description":"OpenAI-compatible error class (e.g. invalid_request_error)."},"code":{"$ref":"#/components/schemas/ErrorCode"},"param":{"type":["string","null"]},"request_id":{"type":"string"}}}}},"AnthropicError":{"type":"object","required":["type","error"],"properties":{"type":{"type":"string","const":"error"},"error":{"type":"object","required":["type","code","message"],"properties":{"type":{"type":"string","description":"Anthropic-compatible error class (e.g. invalid_request_error)."},"code":{"$ref":"#/components/schemas/ErrorCode"},"message":{"type":"string"}}},"request_id":{"type":"string"}}},"ChatCompletionsUsage":{"type":"object","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"integer"},"completion_tokens":{"type":"integer"},"total_tokens":{"type":"integer"},"prompt_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}}},"completion_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}}},"cost":{"type":"number","description":"HyperInfer usage-accounting extension: total cost in credits (USD)."}}},"ChatCompletionResponse":{"type":"object","required":["id","object","created","model","choices","usage"],"properties":{"id":{"type":"string","description":"gen-<request id> — pass the request id to GET /api/v1/generation."},"object":{"type":"string","const":"chat.completion"},"created":{"type":"integer","description":"Unix seconds."},"model":{"type":"string"},"choices":{"type":"array","items":{"type":"object","properties":{"index":{"type":"integer"},"message":{"type":"object","properties":{"role":{"type":"string","const":"assistant"},"content":{"type":["string","null"]},"reasoning":{"type":"string"},"tool_calls":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string"},"type":{"type":"string","const":"function"},"function":{"type":"object","properties":{"name":{"type":"string"},"arguments":{"type":"string"}}}}}}}},"finish_reason":{"type":"string","enum":["stop","length","tool_calls","content_filter"]},"logprobs":{"type":"null"}}}},"usage":{"$ref":"#/components/schemas/ChatCompletionsUsage"}}},"ResponsesResponse":{"type":"object","required":["id","object","created_at","status","model","output","usage"],"properties":{"id":{"type":"string","description":"resp_<request id>."},"object":{"type":"string","const":"response"},"created_at":{"type":"integer","description":"Unix seconds."},"status":{"type":"string","enum":["completed","incomplete"]},"incomplete_details":{"type":["object","null"],"properties":{"reason":{"type":"string","enum":["max_output_tokens","content_filter"]}}},"model":{"type":"string"},"output":{"type":"array","description":"Output items in order: optional `reasoning` (summary_text), `message` (output_text content), and one `function_call` per tool call.","items":{"type":"object"}},"usage":{"type":"object","properties":{"input_tokens":{"type":"integer"},"input_tokens_details":{"type":"object","properties":{"cached_tokens":{"type":"integer"}}},"output_tokens":{"type":"integer"},"output_tokens_details":{"type":"object","properties":{"reasoning_tokens":{"type":"integer"}}},"total_tokens":{"type":"integer"}}}}},"AnthropicMessageResponse":{"type":"object","required":["id","type","role","model","content","stop_reason","usage"],"properties":{"id":{"type":"string","description":"msg_<request id>."},"type":{"type":"string","const":"message"},"role":{"type":"string","const":"assistant"},"model":{"type":"string"},"content":{"type":"array","description":"Content blocks: `text`, `thinking`, and `tool_use`.","items":{"type":"object"}},"stop_reason":{"type":"string","enum":["end_turn","max_tokens","tool_use","refusal"]},"stop_sequence":{"type":["string","null"]},"usage":{"type":"object","description":"Anthropic semantics: input_tokens excludes cache reads.","properties":{"input_tokens":{"type":"integer"},"output_tokens":{"type":"integer"},"cache_read_input_tokens":{"type":"integer"},"cache_creation_input_tokens":{"type":"integer"}}}}},"PublicModel":{"type":"object","required":["slug","name","provider","description","release_date","context_length","max_output_tokens","pricing","features","datacenter_locations","benchmarks"],"properties":{"slug":{"type":"string","description":"OpenRouter-style slug, e.g. deepseek/deepseek-v4-pro."},"name":{"type":"string"},"provider":{"type":"object","description":"Creator branding (avatar, title prefix, `by {creator}`).","required":["slug","name"],"properties":{"slug":{"type":"string","description":"Creator slug, e.g. deepseek."},"name":{"type":"string","description":"Creator display name, e.g. DeepSeek."},"brand_color":{"type":"string","description":"Brand colour hex, e.g. #4D6BFE."}}},"description":{"type":"string","description":"Marketing paragraph (2-line clamp on the list)."},"release_date":{"type":"string","description":"ISO release date YYYY-MM-DD (\"\" when unset)."},"context_length":{"type":"integer"},"max_output_tokens":{"type":"integer"},"pricing":{"type":"object","description":"USD per 1M tokens.","required":["prompt","completion"],"properties":{"prompt":{"type":"number"},"completion":{"type":"number"},"cached_prompt":{"type":"number"}}},"features":{"type":"array","items":{"type":"string","enum":["tools","vision","json_mode","reasoning","streaming","prompt_caching"]}},"datacenter_locations":{"type":"array","items":{"type":"string"}},"hugging_face_id":{"type":"string"},"benchmarks":{"type":"array","description":"Public benchmark scores (010-R11): primary (canonical) first, then extra; [] when none are cited (009-R44).","items":{"type":"object","required":["label","score","source_url","tier"],"properties":{"label":{"type":"string","description":"Exact published benchmark name, e.g. GPQA Diamond."},"score":{"type":"number"},"unit":{"type":"string","enum":["%","elo","pass@1"],"description":"Score unit (default %)."},"mode":{"type":"string","description":"Optional reasoning-mode qualifier, e.g. High."},"source_url":{"type":"string","description":"Canonical source for the number."},"tier":{"type":"string","enum":["primary","extra"]}}}},"weekly_token_volume":{"type":"integer","description":"Derived platform-wide 7-day token sum, injected from usage rollups (009-R44); omitted by the config reflection."}}},"Readiness":{"type":"object","required":["status","checks"],"properties":{"status":{"type":"string","enum":["ok","degraded"]},"checks":{"type":"object","properties":{"redis":{"type":"string","enum":["ok","down"]},"postgres":{"type":"string","enum":["ok","down"]}}}}}}}}