{ "components": { "schemas": { "AllItemsFailedResponse": { "properties": { "details": { "items": { "$ref": "#/components/schemas/InferenceErrorDetail" }, "type": "array" }, "error": { "type": "string" } }, "required": [ "error", "details" ], "type": "object" }, "AssignedWorker": { "properties": { "gpu": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "required": [ "name", "url", "gpu" ], "type": "object" }, "BundleConfigDocument": { "properties": { "adapters": { "items": { "type": "string" }, "type": "array" }, "name": { "type": "string" }, "priority": { "format": "int32", "type": "integer" }, "source": { "type": "string" } }, "required": [ "name", "priority", "source", "adapters" ], "type": "object" }, "BundleConfigSummary": { "properties": { "adapter_count": { "minimum": 0, "type": "integer" }, "bundle_id": { "type": "string" }, "connected_workers": { "minimum": 0, "type": "integer" }, "priority": { "format": "int32", "type": "integer" }, "source": { "type": "string" } }, "required": [ "bundle_id", "priority", "adapter_count", "source", "connected_workers" ], "type": "object" }, "BundleConfigsResponse": { "properties": { "bundles": { "items": { "$ref": "#/components/schemas/BundleConfigSummary" }, "type": "array" } }, "required": [ "bundles" ], "type": "object" }, "BundleConflictResponse": { "properties": { "detail": { "$ref": "#/components/schemas/BundleRoutingConflictDetail" } }, "required": [ "detail" ], "type": "object" }, "BundleRoutingConflictDetail": { "properties": { "code": { "type": "string" }, "compatible_bundles": { "items": { "type": "string" }, "type": "array" }, "message": { "type": "string" } }, "required": [ "code", "message", "compatible_bundles" ], "type": "object" }, "ChatCompletionChoice": { "properties": { "finish_reason": { "description": "One of ``\"stop\" | \"length\" | \"tool_calls\"``. The chat surface collapses\nunknown SIE-native finish reasons to ``stop`` so strict OpenAI clients\nstill parse the response. ``_close_choice`` coerces a length-truncated\ncandidate that also produced a tool call to ``\"tool_calls\"`` per the\nOpenAI convention.", "type": "string" }, "index": { "format": "int32", "minimum": 0, "type": "integer" }, "message": { "$ref": "#/components/schemas/ChatCompletionChoiceMessage" } }, "required": [ "index", "message", "finish_reason" ], "type": "object" }, "ChatCompletionChoiceMessage": { "properties": { "content": { "type": "string" }, "role": { "type": "string" }, "tool_calls": { "description": "Per-candidate tool-call list (Workstream B). Present when the model\nemitted one or more tool calls for this choice; absent otherwise.\nEach entry has the OpenAI shape ``{id, type:\"function\",\nfunction:{name, arguments}}`` where ``arguments`` is a JSON-encoded string." } }, "required": [ "role", "content" ], "type": "object" }, "ChatCompletionMessage": { "description": "One chat message in an OpenAI chat-completions request.\n\nPer the strict allow-list parser (Workstream A), ``content`` is either a\nplain string OR a list of text-only content parts (``{type:\"text\"|\"input_text\",\ntext:\"...\"}``); ``image_url`` and ``input_image`` parts reject with 400\n``unsupported_field`` until a vision-capable model ships. Assistant\nmessages that carry ``tool_calls`` may set ``content: null``.\n\n``tool_calls`` is accepted only on ``role:\"assistant\"`` messages; each\nentry has the validated shape ``{id, type:\"function\", function:{name, arguments}}``\nwhere ``arguments`` is a JSON-encoded string (OpenAI convention).\n``tool_call_id`` is required on ``role:\"tool\"`` messages and rejected\non every other role.", "properties": { "content": { "description": "Either a string or an array of text-only content parts (`{type:\"text\"|\"input_text\", text:\"...\"}`). Image content parts (`image_url` / `input_image`) reject with 400 unsupported_field until a vision-capable model ships. May be `null` on a `role:\"assistant\"` message that carries `tool_calls`.", "oneOf": [ { "type": "string" }, { "items": { "properties": { "text": { "type": "string" }, "type": { "enum": [ "text", "input_text" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "type": "array" }, { "type": "null" } ] }, "role": { "description": "One of ``\"system\" | \"user\" | \"assistant\" | \"tool\" | \"developer\"``.\n``tool`` carries multi-turn tool-call replay; ``developer`` is OpenAI's\nnewer alias for ``system`` and is normalized to ``system``. Any other\nrole rejects with 400 ``invalid_request``.", "type": "string" }, "tool_call_id": { "description": "Required on `role:\"tool\"` messages (matches the assistant turn's `tool_calls[].id`). Rejected on every other role with 400 invalid_request.", "type": [ "string", "null" ] }, "tool_calls": { "description": "OpenAI tool-call replay on `role:\"assistant\"` messages. Each entry MUST match `{id, type:\"function\", function:{name, arguments}}`; `arguments` is a JSON-encoded string. Rejected on other roles with 400.", "items": { "properties": { "function": { "properties": { "arguments": { "description": "JSON-encoded argument string (OpenAI convention).", "type": "string" }, "name": { "type": "string" } }, "required": [ "name", "arguments" ], "type": "object" }, "id": { "type": "string" }, "type": { "enum": [ "function" ], "type": "string" } }, "required": [ "id", "type", "function" ], "type": "object" }, "type": [ "array", "null" ] } }, "required": [ "role" ], "type": "object" }, "ChatCompletionRequest": { "description": "OpenAI-compatible ``POST /v1/chat/completions`` request.\n\n**Strict allow-list:** unknown top-level fields reject with 400\n``unsupported_field``. Type-invalid values for accepted fields reject\nwith 400 ``invalid_request``.\n\n**Known-rejected fields** (per `product/design.md` §5.14):\n- ``functions`` / ``function_call`` — deprecated by OpenAI; use ``tools`` instead.\n- ``modalities``, ``audio``, ``metadata``, ``store``, ``service_tier``,\n ``prediction``, ``reasoning_effort``, ``verbosity`` — out of scope.\n\n**Streaming:** ``stream: true`` is supported (SSE ``chat.completion.chunk``).\n``n > 1`` streaming fans candidates out as per-``choice_index``-tagged delta\nchunks with a per-choice closure carrying ``finish_reason`` (and a per-choice\n``delta.role:\"assistant\"`` once per choice) before the single global ``[DONE]``.", "properties": { "best_of": { "description": "Generate this many candidates and return the top `n` by cumulative logprob. Integer in [1, 128]. Cross-field rule: `best_of >= n` (otherwise 400 invalid_request). Rejected with 400 unsupported_field when `stream: true` (mirrors OpenAI).", "format": "int32", "maximum": 128, "minimum": 1, "type": [ "integer", "null" ] }, "frequency_penalty": { "description": "OpenAI ``frequency_penalty`` in ``[-2.0, 2.0]``; out-of-range or\nnon-numeric values yield 400 ``invalid_request``.", "format": "float", "type": [ "number", "null" ] }, "logit_bias": { "additionalProperties": { "format": "double", "maximum": 100.0, "minimum": -100.0, "type": "number" }, "description": "OpenAI `logit_bias` — `{token_id_string: bias_float}`. Keys must parse as integer token ids; values must be finite numbers in [-100.0, 100.0]. Map size capped at 1024 keys (request rejects with 400 invalid_request beyond the cap).", "maxProperties": 1024, "type": [ "object", "null" ] }, "logprobs": { "description": "Return per-token logprobs. Boolean. When true, the chosen token's logprob (and optionally a top-N list via `top_logprobs`) rides on each `choices[].logprobs` entry.", "type": [ "boolean", "null" ] }, "lora_adapter": { "description": "SIE extension: non-empty served-name of a LoRA adapter declared in the model profile's `lora_paths`. Absent → the base model. Unknown name → 400 with `param:\"lora_adapter\"`. The gateway forwards it to the worker as a top-level `lora_path` generation kwarg (SGLang then selects the adapter by served name; the sampling-params placement is an SGLang implementation detail, not part of the SIE wire contract).", "minLength": 1, "type": [ "string", "null" ] }, "max_completion_tokens": { "description": "Preferred output-token cap. Falls back to ``max_tokens`` when\nabsent. When BOTH are omitted the gateway applies a default\n(1024, override via ``SIE_GATEWAY_DEFAULT_MAX_TOKENS``) rather\nthan rejecting — matching OpenAI, where this field is optional.", "format": "int32", "minimum": 0, "type": [ "integer", "null" ] }, "max_tokens": { "description": "Legacy compatibility — ``max_completion_tokens`` wins when both\nare present. Optional; see ``max_completion_tokens`` for the\nbehaviour when neither is supplied.", "format": "int32", "minimum": 0, "type": [ "integer", "null" ] }, "messages": { "items": { "$ref": "#/components/schemas/ChatCompletionMessage" }, "type": "array" }, "model": { "type": "string" }, "n": { "description": "Number of candidate completions in [1, 128]. n>1 returns a multi-entry choices array; streaming with n>1 is supported (per-choice_index delta chunks + per-choice closure chunks ride before the single global [DONE]).", "format": "int32", "maximum": 128, "minimum": 1, "nullable": true, "type": "integer" }, "parallel_tool_calls": { "description": "OpenAI `parallel_tool_calls` — boolean controlling whether the model may emit multiple tool calls per turn.", "type": [ "boolean", "null" ] }, "presence_penalty": { "description": "OpenAI ``presence_penalty`` in ``[-2.0, 2.0]``; same validation as\n``frequency_penalty``.", "format": "float", "type": [ "number", "null" ] }, "prompt_cache_key": { "description": "Prompt-cache hint; plumbed onto the work envelope and\nignored by the worker on the chat-completions surface.", "type": [ "string", "null" ] }, "repetition_penalty": { "description": "Non-OpenAI `repetition_penalty`: float in (0.0, 2.0] (1.0 = no penalty). Absent → sampler default.", "exclusiveMinimum": 0.0, "format": "float", "maximum": 2.0, "type": [ "number", "null" ] }, "response_format": { "description": "OpenAI `response_format` — translated into a grammar spec on the worker. Accepted shapes: `{type:\"text\"}`, `{type:\"json_object\"}`, `{type:\"json_schema\", json_schema:{...}}`. Cannot be combined with a forcing `tool_choice` (`\"required\"` or a named function) — two competing grammars on one request reject with 400 invalid_request.", "properties": { "json_schema": { "type": "object" }, "type": { "enum": [ "text", "json_object", "json_schema" ], "type": "string" } }, "type": [ "object", "null" ] }, "routing_key": { "description": "Routing affinity hint; same plumbing as\n``prompt_cache_key``.", "type": [ "string", "null" ] }, "safety_identifier": { "description": "Accepted and silently ignored (never logged, never forwarded).", "type": [ "string", "null" ] }, "seed": { "description": "Best-effort determinism seed (i64 reinterpreted as u64). Plumbed to the worker as SGLang's `sampling_params.seed`. Non-integer values reject with 400 invalid_request.", "format": "int64", "type": [ "integer", "null" ] }, "stop": { "description": "Either a string or an array of strings, mirroring OpenAI.", "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "stream": { "description": "SSE streaming. When true, the response is a stream of `chat.completion.chunk` events terminated by `data: [DONE]`. For n > 1: per-`choice_index` delta chunks include a per-choice `delta.role:\"assistant\"` once per choice; per-choice closure chunks carry the `finish_reason` for that choice before the global `[DONE]`. Non-boolean values reject with 400 invalid_request.", "type": [ "boolean", "null" ] }, "stream_options": { "additionalProperties": false, "description": "OpenAI `stream_options`. Accepted sub-key: `include_usage` (boolean — when true, the gateway emits a terminal `usage` frame before `[DONE]`). Any other sub-key rejects with 400 unsupported_field. Legal with `stream:false` (options ignored).", "properties": { "include_usage": { "description": "Emit a terminal `usage` frame before `[DONE]`.", "type": [ "boolean", "null" ] } }, "type": [ "object", "null" ] }, "temperature": { "description": "Sampling temperature. Finite number ``>= 0``; non-finite values reject.", "format": "float", "type": [ "number", "null" ] }, "tool_choice": { "description": "OpenAI `tool_choice`. One of: `\"auto\"`, `\"none\"`, `\"required\"`, or `{type:\"function\", function:{name}}` (named function). Requires `tools` to be set (otherwise 400 invalid_request). `\"required\"` and named-function choices cannot be combined with `response_format` (two competing grammars; 400 invalid_request).", "oneOf": [ { "enum": [ "auto", "none", "required" ], "type": "string" }, { "properties": { "function": { "properties": { "name": { "type": "string" } }, "required": [ "name" ], "type": "object" }, "type": { "enum": [ "function" ], "type": "string" } }, "required": [ "type", "function" ], "type": "object" } ] }, "tools": { "description": "OpenAI tool-calling. Array of tool specs; each tool must match `{type:\"function\", function:{name, parameters, description?}}`. With n > 1, per-candidate `tool_calls` surface on `choices[i].message.tool_calls` (non-streaming) or ride on each `choices[].delta` (streaming).", "items": { "properties": { "function": { "properties": { "description": { "type": "string" }, "name": { "type": "string" }, "parameters": { "type": "object" } }, "required": [ "name" ], "type": "object" }, "type": { "enum": [ "function" ], "type": "string" } }, "required": [ "type", "function" ], "type": "object" }, "type": [ "array", "null" ] }, "top_k": { "description": "Non-OpenAI `top_k` (Together / Fireworks / vLLM extension): integer >= 1. Absent → top-k disabled (model default).", "format": "int32", "minimum": 1, "type": [ "integer", "null" ] }, "top_logprobs": { "description": "Number of alternative top tokens to return alongside each chosen token's logprob. Integer in [0, 20]. Requires `logprobs: true` when > 0 (OpenAI rule; 400 invalid_request otherwise).", "format": "int32", "maximum": 20, "minimum": 0, "type": [ "integer", "null" ] }, "top_p": { "description": "Nucleus sampling. Finite number in ``(0, 1]``.", "format": "float", "type": [ "number", "null" ] }, "user": { "description": "OpenAI `user` — Sensitive PII. Accepted-and-dropped: debug-logged only, never persisted, never forwarded to the worker.", "type": [ "string", "null" ], "x-sensitive": true } }, "required": [ "model", "messages" ], "type": "object" }, "ChatCompletionResponse": { "properties": { "choices": { "items": { "$ref": "#/components/schemas/ChatCompletionChoice" }, "type": "array" }, "created": { "description": "Epoch seconds.", "format": "int64", "minimum": 0, "type": "integer" }, "id": { "description": "Always ``\"chatcmpl-\"``.", "type": "string" }, "model": { "type": "string" }, "object": { "description": "Always ``\"chat.completion\"`` on the non-streaming endpoint.", "type": "string" }, "usage": { "$ref": "#/components/schemas/ChatCompletionUsage" } }, "required": [ "id", "object", "created", "model", "choices", "usage" ], "type": "object" }, "ChatCompletionUsage": { "properties": { "completion_tokens": { "format": "int32", "minimum": 0, "type": "integer" }, "prompt_tokens": { "format": "int32", "minimum": 0, "type": "integer" }, "total_tokens": { "format": "int32", "minimum": 0, "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens", "total_tokens" ], "type": "object" }, "ClusterSummary": { "properties": { "gpu_count": { "format": "int32", "type": "integer" }, "models_loaded": { "format": "int32", "type": "integer" }, "total_qps": { "format": "double", "type": "number" }, "worker_count": { "format": "int32", "type": "integer" } }, "required": [ "worker_count", "gpu_count", "models_loaded", "total_qps" ], "type": "object" }, "CompletionsRequest": { "description": "OpenAI-compatible ``POST /v1/completions`` request (legacy raw-prompt surface).\n\n**Strict allow-list** (Workstream A): unknown fields reject with 400\n``unsupported_field``. Type-invalid values reject with 400 ``invalid_request``.\n\n**Known-rejected fields** (per `product/design.md` §5.14):\n- ``echo`` — rejected with 400 ``unsupported_field``.\n- ``suffix`` — rejected with 400 ``unsupported_field``.\n- ``logprobs`` — rejected with 400 ``unsupported_field`` (the legacy\n ``{tokens, token_logprobs}`` response shape is a follow-up; chat\n ``logprobs`` is available on ``/v1/chat/completions``).\n- ``best_of`` — rejected with 400 ``unsupported_field`` (use chat).\n- ``n > 1`` — rejected with 400 ``unsupported_field`` (chat is the\n multi-candidate surface). ``n == 1`` (or absent) is a no-op.\n- Batched array ``prompt`` — rejected with 400 ``unsupported_field``;\n send one prompt string.\n\n**Streaming:** ``stream: true`` is supported (SSE ``text_completion``).\n\n**Response body wire change:** the always-null ``logprobs`` field has\nbeen dropped from the response body (Workstream A); SDKs that destructure\n``choices[].logprobs`` should treat absence as the new normal.", "properties": { "frequency_penalty": { "description": "In ``[-2.0, 2.0]``; out-of-range or non-numeric values yield 400.", "format": "float", "type": [ "number", "null" ] }, "max_tokens": { "description": "Positive integer; defaults to 16 (OpenAI's documented default for\ncompletions) when absent.", "format": "int32", "minimum": 0, "type": [ "integer", "null" ] }, "model": { "type": "string" }, "n": { "description": "Single-candidate only: integer `1` (or absent) accepted; `n > 1` rejects with 400 unsupported_field (use chat for multi-candidate). `n == 0` rejects with 400 invalid_request.", "format": "int32", "maximum": 1, "minimum": 1, "type": [ "integer", "null" ] }, "presence_penalty": { "description": "In ``[-2.0, 2.0]``; out-of-range or non-numeric values yield 400.", "format": "float", "type": [ "number", "null" ] }, "prompt": { "description": "Single prompt string. Batched array prompts reject with 400\n``unsupported_field``.", "type": "string" }, "seed": { "description": "Best-effort determinism seed (i64 reinterpreted as u64). Non-integer values reject with 400 invalid_request.", "format": "int64", "type": [ "integer", "null" ] }, "stop": { "description": "Either a string or an array of strings, mirroring OpenAI.", "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "stream": { "description": "SSE streaming. When true, the response is a stream of `text_completion` events terminated by `data: [DONE]`. Non-boolean values reject with 400 invalid_request.", "type": [ "boolean", "null" ] }, "temperature": { "description": "Sampling temperature. Finite number ``>= 0``.", "format": "float", "type": [ "number", "null" ] }, "top_p": { "description": "Nucleus sampling. Finite number in ``(0, 1]``.", "format": "float", "type": [ "number", "null" ] } }, "required": [ "model", "prompt" ], "type": "object" }, "ConfigModelDocument": { "properties": { "bundles": { "items": { "type": "string" }, "type": "array" }, "sie_id": { "type": "string" }, "source": { "type": "string" } }, "required": [ "sie_id", "source", "bundles" ], "type": "object" }, "ConfigModelSummary": { "properties": { "model_id": { "type": "string" }, "profiles": { "items": { "type": "string" }, "type": "array" }, "source": { "type": "string" } }, "required": [ "model_id", "profiles", "source" ], "type": "object" }, "ConfigModelsResponse": { "properties": { "models": { "items": { "$ref": "#/components/schemas/ConfigModelSummary" }, "type": "array" } }, "required": [ "models" ], "type": "object" }, "CreatePoolRequest": { "anyOf": [ { "properties": { "gpus": { "minProperties": 1 } }, "required": [ "gpus" ] }, { "properties": { "gpu_caps": { "minProperties": 1 } }, "required": [ "gpu_caps" ] } ], "properties": { "bundle": { "type": [ "string", "null" ] }, "gpu_caps": { "additionalProperties": { "format": "int32", "minimum": 0, "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "gpus": { "additionalProperties": { "format": "int32", "minimum": 0, "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "minimum_worker_count": { "format": "int32", "minimum": 0, "type": "integer" }, "name": { "type": "string" }, "ttl_seconds": { "format": "int64", "minimum": 0, "type": [ "integer", "null" ] } }, "required": [ "name" ], "type": "object" }, "DenseVector": { "properties": { "dims": { "minimum": 0, "type": "integer" }, "dtype": { "$ref": "#/components/schemas/OutputDtype" }, "values": { "items": { "format": "float", "type": "number" }, "type": "array" } }, "required": [ "dims", "dtype", "values" ], "type": "object" }, "DocumentInput": { "properties": { "data": { "items": { "format": "int32", "minimum": 0, "type": "integer" }, "type": "array" }, "format": { "type": [ "string", "null" ] } }, "required": [ "data" ], "type": "object" }, "EncodeParams": { "properties": { "instruction": { "type": [ "string", "null" ] }, "options": {}, "output_dtype": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/OutputDtype" } ] }, "output_types": { "items": { "$ref": "#/components/schemas/OutputType" }, "type": [ "array", "null" ] } }, "type": "object" }, "EncodeRequest": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ItemInput" }, "minItems": 1, "type": "array" }, "params": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/EncodeParams" } ] } }, "required": [ "items" ], "type": "object" }, "EncodeResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/EncodeResult" }, "type": "array" }, "model": { "type": "string" }, "timing": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/TimingInfo" } ] } }, "required": [ "model", "items" ], "type": "object" }, "EncodeResult": { "properties": { "dense": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DenseVector" } ] }, "id": { "type": [ "string", "null" ] }, "multivector": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/MultiVector" } ] }, "sparse": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/SparseVector" } ] } }, "type": "object" }, "Entity": { "properties": { "bbox": { "items": { "format": "double", "type": "number" }, "type": [ "array", "null" ] }, "end": { "minimum": 0, "type": [ "integer", "null" ] }, "label": { "type": "string" }, "score": { "format": "double", "type": "number" }, "start": { "minimum": 0, "type": [ "integer", "null" ] }, "text": { "type": "string" } }, "required": [ "text", "label", "score" ], "type": "object" }, "ErrorDetailCore": { "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ], "type": "object" }, "ExtractParams": { "properties": { "instruction": { "type": [ "string", "null" ] }, "labels": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "options": {}, "output_schema": {} }, "type": "object" }, "ExtractRequest": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ItemInput" }, "minItems": 1, "type": "array" }, "params": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ExtractParams" } ] } }, "required": [ "items" ], "type": "object" }, "ExtractResponse": { "properties": { "items": { "items": { "$ref": "#/components/schemas/ExtractResult" }, "type": "array" }, "model": { "type": "string" } }, "required": [ "model", "items" ], "type": "object" }, "ExtractResult": { "properties": { "classifications": { "items": {}, "type": "array" }, "data": {}, "entities": { "items": { "$ref": "#/components/schemas/Entity" }, "type": "array" }, "id": { "type": "string" }, "relations": { "items": { "$ref": "#/components/schemas/Relation" }, "type": "array" } }, "required": [ "id" ], "type": "object" }, "GatewayErrorResponse": { "properties": { "configured_gpu_types": { "items": { "type": "string" }, "type": [ "array", "null" ] }, "details": { "items": { "$ref": "#/components/schemas/InferenceErrorDetail" }, "type": [ "array", "null" ] }, "error": {}, "gpu": { "type": [ "string", "null" ] }, "message": { "type": [ "string", "null" ] }, "status": { "type": [ "string", "null" ] } }, "type": "object" }, "GatewayModelLoadFailedDetail": { "description": "SDK-style ``502`` body for ``MODEL_LOAD_FAILED`` (SDK short-circuit).", "properties": { "attempts": { "format": "int32", "type": "integer" }, "code": { "type": "string" }, "error_class": { "type": [ "string", "null" ] }, "message": { "type": "string" }, "permanent": { "type": "boolean" } }, "required": [ "code", "message", "attempts", "permanent" ], "type": "object" }, "GatewayModelLoadFailedResponse": { "properties": { "error": { "$ref": "#/components/schemas/GatewayModelLoadFailedDetail" } }, "required": [ "error" ], "type": "object" }, "GenerateRequest": { "description": "SIE-native blocking text-generation request.", "properties": { "frequency_penalty": { "format": "double", "type": [ "number", "null" ] }, "grammar": { "description": "Optional grammar object accepted by the gateway grammar validator." }, "max_new_tokens": { "format": "int32", "minimum": 1, "type": "integer" }, "presence_penalty": { "format": "double", "type": [ "number", "null" ] }, "prompt": { "minLength": 1, "type": "string" }, "prompt_cache_key": { "type": [ "string", "null" ] }, "routing_key": { "type": [ "string", "null" ] }, "safety_identifier": { "description": "Sensitive PII - parsed and dropped, never logged or forwarded.", "type": [ "string", "null" ] }, "stop": { "description": "Stop sequences for the native generate surface.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "temperature": { "format": "float", "type": [ "number", "null" ] }, "top_p": { "format": "float", "type": [ "number", "null" ] } }, "required": [ "prompt", "max_new_tokens" ], "type": "object" }, "GenerateResponse": { "properties": { "attempt_id": { "type": "string" }, "finish_reason": { "type": "string" }, "model": { "type": "string" }, "text": { "type": "string" }, "tpot_ms": { "format": "double", "type": [ "number", "null" ] }, "ttft_ms": { "format": "double", "type": [ "number", "null" ] }, "usage": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/GenerateUsage" } ] } }, "required": [ "model", "text", "finish_reason", "attempt_id" ], "type": "object" }, "GenerateUsage": { "properties": { "completion_tokens": { "format": "int32", "minimum": 0, "type": "integer" }, "prompt_tokens": { "format": "int32", "minimum": 0, "type": "integer" }, "total_tokens": { "format": "int32", "minimum": 0, "type": "integer" } }, "required": [ "prompt_tokens", "completion_tokens", "total_tokens" ], "type": "object" }, "GpuNotConfiguredDetail": { "description": "``detail`` when the caller's ``X-SIE-MACHINE-PROFILE`` GPU is not in the gateway allow-list.", "properties": { "code": { "type": "string" }, "configured_gpu_types": { "items": { "type": "string" }, "type": "array" }, "gpu": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message", "gpu", "configured_gpu_types" ], "type": "object" }, "GpuNotConfiguredError": { "properties": { "detail": { "$ref": "#/components/schemas/GpuNotConfiguredDetail" } }, "required": [ "detail" ], "type": "object" }, "HealthResponse": { "properties": { "cluster": { "$ref": "#/components/schemas/ClusterSummary" }, "configured_gpu_types": { "items": { "type": "string" }, "type": "array" }, "live_gpu_types": { "items": { "type": "string" }, "type": "array" }, "models": { "items": { "$ref": "#/components/schemas/ModelInfo" }, "type": "array" }, "status": { "type": "string" }, "type": { "type": "string" }, "workers": { "items": { "$ref": "#/components/schemas/WorkerInfo" }, "type": "array" } }, "required": [ "status", "type", "configured_gpu_types", "live_gpu_types", "cluster", "workers", "models" ], "type": "object" }, "ImageInput": { "properties": { "data": { "items": { "format": "int32", "minimum": 0, "type": "integer" }, "type": "array" }, "format": { "type": [ "string", "null" ] } }, "required": [ "data" ], "type": "object" }, "InferenceErrorDetail": { "properties": { "code": { "type": [ "string", "null" ] }, "error": { "type": [ "string", "null" ] }, "item_index": { "format": "int32", "minimum": 0, "type": "integer" } }, "required": [ "item_index" ], "type": "object" }, "InferenceInternalServerErrorResponse": { "oneOf": [ { "$ref": "#/components/schemas/AllItemsFailedResponse" }, { "$ref": "#/components/schemas/StandardApiError" } ] }, "InferenceServiceUnavailableResponse": { "oneOf": [ { "$ref": "#/components/schemas/GatewayErrorResponse" }, { "$ref": "#/components/schemas/StandardApiError" }, { "$ref": "#/components/schemas/GpuNotConfiguredError" } ] }, "ItemInput": { "properties": { "document": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/DocumentInput" } ] }, "id": { "type": [ "string", "null" ] }, "images": { "items": { "$ref": "#/components/schemas/ImageInput" }, "type": [ "array", "null" ] }, "metadata": {}, "text": { "type": [ "string", "null" ] } }, "type": "object" }, "MessageResponse": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" }, "ModelAckBundleStatus": { "properties": { "acked": { "type": "boolean" }, "acked_workers": { "items": { "type": "string" }, "type": "array" }, "bundle_id": { "type": "string" }, "expected_bundle_config_hash": { "type": "string" }, "pending_workers": { "items": { "type": "string" }, "type": "array" }, "total_eligible_workers": { "minimum": 0, "type": "integer" } }, "required": [ "bundle_id", "expected_bundle_config_hash", "total_eligible_workers", "acked_workers", "pending_workers", "acked" ], "type": "object" }, "ModelCapabilitiesWire": { "description": "Capability summary surfaced on each entry of ``GET /v1/models``.\n\nMirrors the JSON shape constructed in\n``types/model.rs::to_model_info_value``. All fields are optional —\ntheir presence depends on what the model config declares.", "properties": { "grammar": { "description": "Grammar kinds the model's active backend supports\n(``json_schema`` | ``regex`` | ``ebnf``). EBNF presence depends\non the backend: SGLang's Outlines backend does not implement\nEBNF, so a profile with ``grammar_backend: outlines`` advertises\nonly ``[\"json_schema\", \"regex\"]``; xgrammar/llguidance profiles\nadvertise all three. See ADR-0002.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "lora_adapters": { "description": "Union of LoRA served-names across profiles. Back-compat summary\nfor consumers that don't care about profile scope; validation\nMUST go through ``profile_lora_adapters``.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "profile_lora_adapters": { "additionalProperties": { "items": { "type": "string" }, "type": "array" }, "description": "Per-profile LoRA breakdown — keyed by profile name. Added by\nM10 so consumers needing precise routing scope don't have to\nreverse-engineer it from the union. The validation gate uses\nthis map; ``lora_adapters`` is for display only.", "propertyNames": { "type": "string" }, "type": [ "object", "null" ] }, "tools": { "description": "Whether the model supports tool / function calling.", "type": [ "boolean", "null" ] } }, "type": "object" }, "ModelConfigStatusResponse": { "properties": { "all_bundles_acked": { "type": "boolean" }, "bundles": { "items": { "$ref": "#/components/schemas/ModelAckBundleStatus" }, "type": "array" }, "config_epoch": { "format": "int64", "minimum": 0, "type": "integer" }, "model_id": { "type": "string" }, "no_bundles": { "type": "boolean" }, "source": { "type": "string" } }, "required": [ "model_id", "config_epoch", "all_bundles_acked", "no_bundles", "bundles", "source" ], "type": "object" }, "ModelInfo": { "properties": { "gpu_types": { "items": { "type": "string" }, "type": "array" }, "name": { "type": "string" }, "state": { "type": "string" }, "total_queue_depth": { "format": "int32", "type": "integer" }, "worker_count": { "format": "int32", "type": "integer" } }, "required": [ "name", "state", "worker_count", "gpu_types", "total_queue_depth" ], "type": "object" }, "ModelInfoWire": { "description": "Wire shape aligned with ``sie_server`` ``ModelInfo`` for ``GET /v1/models``.", "properties": { "capabilities": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ModelCapabilitiesWire", "description": "Advertised model capabilities. Consumers use this to discover\nwhich features the model supports before composing a request.\n\nValidation is profile-scoped per ADR-0001 / M10 — clients\nselecting a specific profile must check\n``capabilities.profile_lora_adapters[profile_name]``, not the\n``capabilities.lora_adapters`` union summary." } ] }, "dims": { "additionalProperties": { "format": "int64", "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "inputs": { "items": { "type": "string" }, "type": "array" }, "last_error": {}, "loaded": { "type": "boolean" }, "max_sequence_length": { "format": "int64", "minimum": 0, "type": [ "integer", "null" ] }, "name": { "type": "string" }, "outputs": { "items": { "type": "string" }, "type": "array" }, "profiles": { "additionalProperties": { "$ref": "#/components/schemas/ProfileInfoWire" }, "propertyNames": { "type": "string" }, "type": "object" }, "state": { "type": "string" } }, "required": [ "name", "inputs", "outputs", "dims", "loaded", "state", "profiles" ], "type": "object" }, "ModelNotFoundDetail": { "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ], "type": "object" }, "ModelNotFoundResponse": { "properties": { "detail": { "$ref": "#/components/schemas/ModelNotFoundDetail" } }, "required": [ "detail" ], "type": "object" }, "ModelsResponse": { "description": "Response for `GET /v1/models`.\n\nHybrid shape: `object` + `data` is the OpenAI list format (consumed\nby vanilla OpenAI clients and Open WebUI for model discovery);\n`models` is the richer native shape consumed by the SIE Python/TS\nSDKs. Both describe the same set of models.", "properties": { "data": { "description": "OpenAI-shaped model objects for ecosystem compatibility.", "items": { "$ref": "#/components/schemas/OpenAiModelObject" }, "type": "array" }, "models": { "description": "Native SIE model info (capabilities, dims, profiles).", "items": { "$ref": "#/components/schemas/ModelInfoWire" }, "type": "array" }, "object": { "description": "Always `\"list\"` (OpenAI list envelope).", "type": "string" } }, "required": [ "object", "data", "models" ], "type": "object" }, "MultiVector": { "properties": { "dtype": { "$ref": "#/components/schemas/OutputDtype" }, "num_tokens": { "minimum": 0, "type": "integer" }, "token_dims": { "minimum": 0, "type": "integer" }, "values": { "items": { "items": { "format": "float", "type": "number" }, "type": "array" }, "type": "array" } }, "required": [ "token_dims", "num_tokens", "dtype", "values" ], "type": "object" }, "OpenAIEmbeddingDataEntry": { "properties": { "embedding": { "$ref": "#/components/schemas/OpenAIEmbeddingVector" }, "index": { "minimum": 0, "type": "integer" }, "object": { "type": "string" } }, "required": [ "object", "embedding", "index" ], "type": "object" }, "OpenAIEmbeddingEncodingFormat": { "enum": [ "float", "base64" ], "type": "string" }, "OpenAIEmbeddingInput": { "oneOf": [ { "type": "string" }, { "items": { "type": "string" }, "type": "array" } ] }, "OpenAIEmbeddingRequest": { "description": "OpenAI-compatible ``POST /v1/embeddings`` request (subset supported on gateway).", "properties": { "dimensions": { "description": "Accepted but ignored; the gateway returns the model's native dimension.", "format": "int32", "minimum": 0, "type": [ "integer", "null" ] }, "encoding_format": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/OpenAIEmbeddingEncodingFormat" } ] }, "input": { "$ref": "#/components/schemas/OpenAIEmbeddingInput" }, "model": { "type": "string" }, "user": { "description": "Accepted but ignored; kept for OpenAI SDK compatibility.", "type": [ "string", "null" ] } }, "required": [ "model", "input" ], "type": "object" }, "OpenAIEmbeddingUsage": { "properties": { "prompt_tokens": { "format": "int64", "minimum": 0, "type": "integer" }, "total_tokens": { "format": "int64", "minimum": 0, "type": "integer" } }, "required": [ "prompt_tokens", "total_tokens" ], "type": "object" }, "OpenAIEmbeddingVector": { "oneOf": [ { "items": { "format": "double", "type": "number" }, "type": "array" }, { "type": "string" } ] }, "OpenAIEmbeddingsListResponse": { "properties": { "data": { "items": { "$ref": "#/components/schemas/OpenAIEmbeddingDataEntry" }, "type": "array" }, "model": { "type": "string" }, "object": { "type": "string" }, "usage": { "$ref": "#/components/schemas/OpenAIEmbeddingUsage" } }, "required": [ "object", "data", "model", "usage" ], "type": "object" }, "OpenAIErrorBody": { "description": "OpenAI-shaped error body used by ``/v1/generate/{model}`` and\n``/v1/chat/completions``.", "properties": { "code": { "description": "SIE-native discriminator, see ``http_error::openai_code``.", "type": "string" }, "message": { "type": "string" }, "param": { "description": "Offending field name (e.g. ``\"messages\"``, ``\"max_completion_tokens\"``).\n``null`` when the error is not field-specific.", "type": [ "string", "null" ] }, "type": { "description": "One of the stable types in ``http_error::openai_type``.", "type": "string" } }, "required": [ "message", "type", "code" ], "type": "object" }, "OpenAIErrorEnvelope": { "properties": { "error": { "$ref": "#/components/schemas/OpenAIErrorBody" } }, "required": [ "error" ], "type": "object" }, "OpenAiModelObject": { "description": "One OpenAI-shaped model object in the `data` array of\n`GET /v1/models`. Present for OpenAI-ecosystem compatibility; native\nSIE consumers read the richer [`ModelInfoWire`] entries under\n`models` instead.", "properties": { "created": { "description": "Unix epoch seconds. SIE has no per-model creation time, so this\nis a fixed sentinel; OpenAI clients use it only for display.", "format": "int64", "type": "integer" }, "id": { "description": "Model id — the same string `/v1/chat/completions` accepts as `model`.", "type": "string" }, "object": { "description": "Always `\"model\"`.", "type": "string" }, "owned_by": { "description": "Always `\"sie\"`.", "type": "string" } }, "required": [ "id", "object", "created", "owned_by" ], "type": "object" }, "OutputDtype": { "enum": [ "float32", "float16", "int8", "uint8", "binary" ], "type": "string" }, "OutputType": { "enum": [ "dense", "sparse", "multivector" ], "type": "string" }, "Pool": { "properties": { "spec": { "$ref": "#/components/schemas/PoolSpec" }, "status": { "$ref": "#/components/schemas/PoolStatus" } }, "required": [ "spec", "status" ], "type": "object" }, "PoolListResponse": { "properties": { "pools": { "items": { "$ref": "#/components/schemas/Pool" }, "type": "array" } }, "required": [ "pools" ], "type": "object" }, "PoolSpec": { "properties": { "bundle": { "type": [ "string", "null" ] }, "gpu_caps": { "additionalProperties": { "format": "int32", "minimum": 0, "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "gpus": { "additionalProperties": { "format": "int32", "minimum": 0, "type": "integer" }, "propertyNames": { "type": "string" }, "type": "object" }, "minimum_worker_count": { "format": "int32", "minimum": 0, "type": "integer" }, "name": { "type": "string" }, "ttl_seconds": { "format": "int64", "minimum": 0, "type": [ "integer", "null" ] } }, "required": [ "name" ], "type": "object" }, "PoolState": { "enum": [ "pending", "active", "expired" ], "type": "string" }, "PoolStatus": { "properties": { "assigned_workers": { "items": { "$ref": "#/components/schemas/AssignedWorker" }, "type": "array" }, "created_at": { "format": "double", "type": "number" }, "last_renewed": { "format": "double", "type": "number" }, "state": { "$ref": "#/components/schemas/PoolState" } }, "required": [ "state" ], "type": "object" }, "ProfileInfoWire": { "properties": { "is_default": { "type": "boolean" } }, "type": "object" }, "ProvisioningResponse": { "properties": { "bundle": { "type": "string" }, "estimated_wait_s": { "format": "int64", "minimum": 0, "type": "integer" }, "gpu": { "type": "string" }, "message": { "type": "string" }, "status": { "type": "string" } }, "required": [ "status", "estimated_wait_s" ], "type": "object" }, "Relation": { "properties": { "head": { "type": "string" }, "relation": { "type": "string" }, "score": { "format": "double", "type": "number" }, "tail": { "type": "string" } }, "required": [ "head", "tail", "relation", "score" ], "type": "object" }, "ResolveBundleConflictDetail": { "properties": { "bundle": { "type": "string" }, "code": { "type": "string" }, "compatible_bundles": { "items": { "type": "string" }, "type": "array" }, "message": { "type": "string" }, "model": { "type": "string" } }, "required": [ "code", "message", "model", "bundle", "compatible_bundles" ], "type": "object" }, "ResolveBundleConflictResponse": { "properties": { "detail": { "$ref": "#/components/schemas/ResolveBundleConflictDetail" } }, "required": [ "detail" ], "type": "object" }, "ResolveConfigResponse": { "properties": { "compatible_bundles": { "items": { "type": "string" }, "type": "array" }, "model": { "type": "string" }, "profiles": { "items": { "type": "string" }, "type": "array" }, "resolved_bundle": { "type": "string" } }, "required": [ "model", "resolved_bundle", "compatible_bundles", "profiles" ], "type": "object" }, "ResolveModelNotFoundDetail": { "properties": { "code": { "type": "string" }, "message": { "type": "string" }, "model": { "type": "string" } }, "required": [ "code", "message", "model" ], "type": "object" }, "ResolveModelNotFoundResponse": { "properties": { "detail": { "$ref": "#/components/schemas/ResolveModelNotFoundDetail" } }, "required": [ "detail" ], "type": "object" }, "ResolveRequest": { "description": "POST /v1/configs/resolve - Resolve bundle for a model.", "properties": { "bundle": { "type": [ "string", "null" ] }, "model": { "type": "string" } }, "required": [ "model" ], "type": "object" }, "ResponsesRequest": { "description": "OpenAI-compatible ``POST /v1/responses`` request (Responses MVP).\n\n**Strict allow-list** (Workstream A): unknown fields reject with 400\n``unsupported_field``. Type-invalid values reject with 400 ``invalid_request``.\n\n**Known-rejected fields** (per `product/design.md` §5.14):\n- ``tools`` / ``tool_choice`` — rejected with 400 ``unsupported_field``.\n- ``previous_response_id`` — rejected with 400 ``unsupported_field``\n (Responses MVP is stateless single-turn).\n- ``reasoning`` — rejected with 400 ``unsupported_field``.\n- ``background`` — rejected with 400 ``unsupported_field``.\n- ``metadata`` — rejected with 400 ``unsupported_field``.\n- ``instructions`` — rejected with 400 ``unsupported_field``.\n- ``stream: true`` — rejected with 400 ``unsupported_field`` (SSE on\n Responses is deferred; use ``stream: false`` or omit).\n- Multimodal ``image_url`` / ``input_image`` content parts on the array\n form — rejected with 400 ``unsupported_field`` until a VL profile ships.", "properties": { "input": { "description": "Either a string prompt OR an array of `{role, content}` messages (Workstream A array-input support). Array form: `role` is one of `\"system\" | \"user\" | \"assistant\" | \"developer\"` (\"developer\" normalizes to \"system\"). `content` is a string or an array of text-only content parts; image parts (`image_url` / `input_image`) reject with 400 unsupported_field. The array must not be empty.", "oneOf": [ { "type": "string" }, { "items": { "properties": { "content": { "oneOf": [ { "type": "string" }, { "items": { "properties": { "text": { "type": "string" }, "type": { "enum": [ "text", "input_text" ], "type": "string" } }, "required": [ "type" ], "type": "object" }, "type": "array" } ] }, "role": { "enum": [ "system", "user", "assistant", "developer" ], "type": "string" } }, "required": [ "role", "content" ], "type": "object" }, "minItems": 1, "type": "array" } ] }, "max_output_tokens": { "description": "Defaults to 16 (mirroring completions) when absent. Positive integer.", "format": "int32", "minimum": 0, "type": [ "integer", "null" ] }, "model": { "type": "string" }, "seed": { "description": "Best-effort determinism seed (i64 reinterpreted as u64). Non-integer values reject with 400 invalid_request.", "format": "int64", "type": [ "integer", "null" ] }, "stream": { "description": "Accepted only as `false` (or absent). `true` rejects with 400 unsupported_field (Responses SSE is deferred; tracked in `product/design.md` §5.14).", "enum": [ false, null ], "type": [ "boolean", "null" ] }, "temperature": { "description": "Sampling temperature. Finite number ``>= 0``.", "format": "float", "type": [ "number", "null" ] }, "top_p": { "description": "Nucleus sampling. Finite number in ``(0, 1]``.", "format": "float", "type": [ "number", "null" ] } }, "required": [ "model", "input" ], "type": "object" }, "ScoreEntry": { "properties": { "item_id": { "type": "string" }, "rank": { "minimum": 0, "type": "integer" }, "score": { "format": "double", "type": "number" } }, "required": [ "item_id", "score", "rank" ], "type": "object" }, "ScoreRequest": { "properties": { "instruction": { "type": [ "string", "null" ] }, "items": { "items": { "$ref": "#/components/schemas/ItemInput" }, "minItems": 1, "type": "array" }, "options": {}, "query": { "$ref": "#/components/schemas/ItemInput" } }, "required": [ "query", "items" ], "type": "object" }, "ScoreResponse": { "properties": { "model": { "type": "string" }, "query_id": { "type": [ "string", "null" ] }, "scores": { "items": { "$ref": "#/components/schemas/ScoreEntry" }, "type": "array" } }, "required": [ "model", "scores" ], "type": "object" }, "SparseVector": { "properties": { "dims": { "minimum": 0, "type": [ "integer", "null" ] }, "dtype": { "$ref": "#/components/schemas/OutputDtype" }, "indices": { "items": { "minimum": 0, "type": "integer" }, "type": "array" }, "values": { "items": { "format": "float", "type": "number" }, "type": "array" } }, "required": [ "dtype", "indices", "values" ], "type": "object" }, "StandardApiError": { "description": "FastAPI-style error envelope for most gateway JSON errors.", "properties": { "detail": { "$ref": "#/components/schemas/ErrorDetailCore" } }, "required": [ "detail" ], "type": "object" }, "TimingInfo": { "properties": { "inference_ms": { "format": "double", "type": "number" }, "postprocessing_ms": { "format": "double", "type": [ "number", "null" ] }, "queue_ms": { "format": "double", "type": "number" }, "tokenization_ms": { "format": "double", "type": "number" }, "total_ms": { "format": "double", "type": "number" } }, "required": [ "total_ms", "queue_ms", "tokenization_ms", "inference_ms" ], "type": "object" }, "WorkerInfo": { "properties": { "bundle": { "type": "string" }, "bundle_config_hash": { "type": "string" }, "gpu": { "type": "string" }, "gpu_count": { "format": "int32", "type": "integer" }, "healthy": { "type": "boolean" }, "loaded_models": { "items": { "type": "string" }, "type": "array" }, "memory_total_bytes": { "format": "int64", "type": "integer" }, "memory_used_bytes": { "format": "int64", "type": "integer" }, "name": { "type": "string" }, "queue_depth": { "format": "int32", "type": "integer" }, "url": { "type": "string" } }, "required": [ "name", "url", "gpu", "gpu_count", "loaded_models", "queue_depth", "memory_used_bytes", "memory_total_bytes", "healthy", "bundle", "bundle_config_hash" ], "type": "object" } }, "securitySchemes": { "bearerAuth": { "bearerFormat": "opaque", "description": "SIE bearer token. Mutating pool/config/admin routes require the configured admin token; other protected routes accept a normal gateway token.", "scheme": "bearer", "type": "http" } } }, "info": { "description": "Rust gateway API for SIE inference, pool coordination, and read-only runtime config.", "license": { "name": "Apache-2.0", "url": "https://www.apache.org/licenses/LICENSE-2.0.html" }, "title": "SIE Gateway", "version": "0.4.0" }, "openapi": "3.1.0", "paths": { "/": { "get": { "operationId": "status_page", "responses": { "200": { "content": { "text/html": { "schema": { "type": "string" } } }, "description": "HTML gateway status page" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "summary": "Static HTML status page", "tags": [ "health" ] } }, "/docs": { "get": { "operationId": "docs_ui", "responses": { "200": { "description": "Rendered API reference (Redoc)" } }, "security": [], "summary": "Rendered, human-browsable API reference (Redoc) over the live\n`/openapi.json`. Auth-exempt (documentation, like `/openapi.json`) and\nread-only — no in-browser request console, so no token-leak surface.", "tags": [ "docs" ] } }, "/health": { "get": { "operationId": "health", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/HealthResponse" } } }, "description": "Gateway cluster health" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "health" ] } }, "/healthz": { "get": { "operationId": "healthz", "responses": { "200": { "content": { "text/plain; charset=utf-8": { "schema": { "type": "string" } } }, "description": "Liveness probe (plain text, matches sie_server)" } }, "security": [], "tags": [ "health" ] } }, "/metrics": { "get": { "operationId": "metrics_handler", "responses": { "200": { "content": { "text/plain": { "schema": { "type": "string" } } }, "description": "Prometheus metrics" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "observability" ] } }, "/openapi.json": { "get": { "operationId": "openapi_json", "responses": { "200": { "content": { "application/json": { "schema": { "type": "object" } } }, "description": "OpenAPI document" } }, "security": [], "tags": [ "docs" ] } }, "/readyz": { "get": { "description": "Process readiness only. Always returns 200 once the gateway is serving requests; never returns 503. Worker readiness is reported by GET /health and by inference responses (202 + Retry-After from a workerless gateway). This contract supports KEDA scale-from-zero.", "operationId": "readyz", "responses": { "200": { "content": { "text/plain; charset=utf-8": { "schema": { "type": "string" } } }, "description": "Gateway process is ready" } }, "security": [], "tags": [ "health" ] } }, "/v1/chat/completions": { "post": { "description": "OpenAI-compatible chat completions. Strict allow-list parser (see `product/design.md` §5.14): unknown top-level fields reject with 400 `unsupported_field`. Streaming (`stream: true`) is supported and emits SSE `chat.completion.chunk` events; `n > 1` streaming fans candidates out as per-`choice_index` delta chunks with per-choice closure chunks (each carrying `finish_reason`) before the single global `[DONE]`. Content is either a string or an array of text-only content parts; image content parts (`image_url` / `input_image`) reject with 400 `unsupported_field`. `lora_adapter` is forwarded to the worker as a top-level `lora_path` generation kwarg.", "operationId": "proxy_chat", "parameters": [ { "description": "Preferred GPU or machine profile", "in": "header", "name": "X-SIE-MACHINE-PROFILE", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Explicit pool routing override", "in": "header", "name": "X-SIE-Pool", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Client SDK version for skew warnings", "in": "header", "name": "X-SIE-SDK-Version", "required": false, "schema": { "type": [ "string", "null" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ChatCompletionResponse" } } }, "description": "Chat completion response" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Invalid or unsupported request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/OpenAIErrorEnvelope" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Worker emitted malformed response; gateway auth enabled but no tokens configured" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Queue unavailable" } }, "tags": [ "inference" ] } }, "/v1/completions": { "post": { "description": "OpenAI-compatible legacy Completions. Strict allow-list parser (`product/design.md` §5.14): unknown top-level fields reject with 400 `unsupported_field`. `stream: true` is supported (SSE `text_completion`). Known-rejected fields: `echo`, `suffix`, `logprobs`, `best_of`, `n > 1`, batched array `prompt` — each rejects with 400 `unsupported_field`. The response body no longer carries the always-null `logprobs` field (Workstream A wire change).", "operationId": "proxy_completions", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompletionsRequest" } } }, "required": true }, "responses": { "200": { "description": "Text completion response" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Invalid or unsupported request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/OpenAIErrorEnvelope" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Worker emitted malformed response; gateway auth enabled but no tokens configured" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Queue unavailable" } }, "summary": "`/v1/completions` — legacy OpenAI Completions (single-candidate, raw-prompt).", "tags": [ "inference" ] } }, "/v1/configs/bundles": { "get": { "operationId": "get_bundle_configs", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BundleConfigsResponse" } } }, "description": "Bundle configs visible to this gateway replica" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "summary": "GET /v1/configs/bundles - List all bundle configs.", "tags": [ "config" ] } }, "/v1/configs/bundles/{id}": { "get": { "operationId": "get_bundle_config", "parameters": [ { "description": "Bundle id", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/x-yaml": { "schema": { "$ref": "#/components/schemas/BundleConfigDocument" } } }, "description": "Bundle config YAML" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Bundle not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Failed to serialize YAML; gateway auth enabled but no tokens configured" } }, "summary": "GET /v1/configs/bundles/{id} - Get specific bundle config.", "tags": [ "config" ] } }, "/v1/configs/models": { "get": { "operationId": "get_model_configs", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ConfigModelsResponse" } } }, "description": "Model configs visible to this gateway replica" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "summary": "GET /v1/configs/models - List all model configs visible to this gateway.", "tags": [ "config" ] } }, "/v1/configs/models/{id}": { "get": { "description": "Handles two endpoints sharing the same wildcard route:\n\n- `GET /v1/configs/models/{id}` — YAML view of the gateway's model.\n- `GET /v1/configs/models/{id}/status` — JSON worker-ack readiness for\n that model on this specific gateway replica.\n\nThe `{*id}` wildcard is necessary because model IDs routinely contain\nforward slashes (`BAAI/bge-m3`), so we strip an optional trailing\n`/status` segment here rather than maintain two overlapping axum routes\n(axum's `matchit` panics on overlapping catch-all routes).\n\nDisambiguation when a model literally named `something/status` exists:\nwe prefer the status interpretation only when the `/status`-stripped\nid resolves to a real model. That keeps an accidental model whose ID\nends with `/status` addressable under `GET\n/v1/configs/models/foo/status` as a config read, and matches what\nadmin tooling expects (status requests are only meaningful against\nmodels that actually exist). `sie-config` additionally refuses to\nregister model IDs ending in `/status` so the pathological case where\n**both** `foo` and `foo/status` are models cannot arise, but we\nstill degrade gracefully if it ever does.", "operationId": "get_model_config_or_status", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/configs/models/{*id}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/x-yaml": { "schema": { "$ref": "#/components/schemas/ConfigModelDocument" } } }, "description": "Model config YAML" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Failed to serialize YAML; gateway auth enabled but no tokens configured" } }, "summary": "GET /v1/configs/models/{*id} — dual-purpose dispatcher.", "tags": [ "config" ], "x-sie-axum-catch-all": "/v1/configs/models/{*id}" } }, "/v1/configs/models/{id}/status": { "get": { "operationId": "get_model_config_status", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/configs/models/{*id}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "id", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelConfigStatusResponse" } } }, "description": "Per-replica worker acknowledgement status" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "config" ], "x-sie-axum-catch-all": "/v1/configs/models/{*id}" } }, "/v1/configs/resolve": { "post": { "operationId": "resolve_config", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveConfigResponse" } } }, "description": "Resolved runtime bundle" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Valid bearer token but admin token required for this mutation (or admin token not configured)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveModelNotFoundResponse" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResolveBundleConflictResponse" } } }, "description": "Bundle override conflict" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "config" ] } }, "/v1/embeddings": { "post": { "description": "OpenAI-compatible embeddings proxy. A 200 response contains one embedding per input; partial or truncated internal encode success is treated as a 500 INTERNAL_ERROR instead of returning a partial 200. Every error path returns the OpenAI `{error:{message,type,param,code}}` envelope (inner SIE-native encode failures are translated), so an `openai`-client error handler works unchanged.", "operationId": "proxy_openai_embeddings", "parameters": [ { "description": "Preferred GPU or machine profile", "in": "header", "name": "X-SIE-MACHINE-PROFILE", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Explicit pool routing override", "in": "header", "name": "X-SIE-Pool", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Client SDK version for skew warnings", "in": "header", "name": "X-SIE-SDK-Version", "required": false, "schema": { "type": [ "string", "null" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIEmbeddingRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIEmbeddingsListResponse" } } }, "description": "OpenAI-compatible embeddings response", "headers": { "X-Inference-Time": { "description": "Worker-reported inference time in milliseconds", "schema": { "type": "string" } }, "X-Payload-Fetch-Time": { "description": "Worker-reported offloaded payload fetch time in milliseconds, when available", "schema": { "type": "string" } }, "X-Postprocessing-Time": { "description": "Worker-reported postprocessing time in milliseconds, when available", "schema": { "type": "string" } }, "X-Queue-Publish-Time": { "description": "Milliseconds spent publishing work to the queue", "schema": { "type": "string" } }, "X-Queue-Time": { "description": "Worker-reported queue time in milliseconds", "schema": { "type": "string" } }, "X-Queue-Wait-Time": { "description": "Milliseconds spent waiting for worker results", "schema": { "type": "string" } }, "X-SIE-Request-Id": { "description": "Gateway request id for queue-backed inference", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } }, "X-SIE-Worker": { "description": "Logical queue worker tag that produced the response", "schema": { "type": "string" } }, "X-Tokenization-Time": { "description": "Worker-reported tokenization time in milliseconds, when available", "schema": { "type": "string" } } } }, "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvisioningResponse" } } }, "description": "Worker provisioning in progress", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Invalid request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Bundle override conflicts with model routing" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Request body too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/OpenAIErrorEnvelope" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "All batch items failed or gateway internal error; gateway auth enabled but no tokens configured" }, "502": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "MODEL_LOAD_FAILED", "headers": { "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Error-Version": { "description": "Gateway package version associated with the error envelope", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Model loading, capacity, queue unavailable, or GPU not configured", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds, when retryable", "schema": { "type": "string" } }, "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Result channel closed" } }, "tags": [ "inference" ] } }, "/v1/encode/{model}": { "post": { "description": "Mixed-success batches return 200 with only successful items; the response carries no per-item error envelope. For per-item error visibility, send single-item batches.", "operationId": "proxy_encode", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/encode/{*model}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "model", "required": true, "schema": { "type": "string" } }, { "description": "Preferred GPU or machine profile", "in": "header", "name": "X-SIE-MACHINE-PROFILE", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Explicit pool routing override", "in": "header", "name": "X-SIE-Pool", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Client SDK version for skew warnings", "in": "header", "name": "X-SIE-SDK-Version", "required": false, "schema": { "type": [ "string", "null" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EncodeRequest" } }, "application/msgpack": { "schema": { "$ref": "#/components/schemas/EncodeRequest" } }, "application/vnd.msgpack": { "schema": { "$ref": "#/components/schemas/EncodeRequest" } }, "application/x-msgpack": { "schema": { "$ref": "#/components/schemas/EncodeRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/EncodeResponse" } }, "application/msgpack": { "schema": { "$ref": "#/components/schemas/EncodeResponse" } }, "application/vnd.msgpack": { "schema": { "$ref": "#/components/schemas/EncodeResponse" } }, "application/x-msgpack": { "schema": { "$ref": "#/components/schemas/EncodeResponse" } } }, "description": "Encode response", "headers": { "X-Inference-Time": { "description": "Worker-reported inference time in milliseconds", "schema": { "type": "string" } }, "X-Payload-Fetch-Time": { "description": "Worker-reported offloaded payload fetch time in milliseconds, when available", "schema": { "type": "string" } }, "X-Postprocessing-Time": { "description": "Worker-reported postprocessing time in milliseconds, when available", "schema": { "type": "string" } }, "X-Queue-Publish-Time": { "description": "Milliseconds spent publishing work to the queue", "schema": { "type": "string" } }, "X-Queue-Time": { "description": "Worker-reported queue time in milliseconds", "schema": { "type": "string" } }, "X-Queue-Wait-Time": { "description": "Milliseconds spent waiting for worker results", "schema": { "type": "string" } }, "X-SIE-Request-Id": { "description": "Gateway request id for queue-backed inference", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } }, "X-SIE-Worker": { "description": "Logical queue worker tag that produced the response", "schema": { "type": "string" } }, "X-Tokenization-Time": { "description": "Worker-reported tokenization time in milliseconds, when available", "schema": { "type": "string" } } } }, "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvisioningResponse" } } }, "description": "Worker provisioning in progress", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Invalid request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BundleConflictResponse" } } }, "description": "Bundle override conflicts with model routing" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Request body too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/InferenceInternalServerErrorResponse" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "All batch items failed or gateway internal error; gateway auth enabled but no tokens configured" }, "502": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayModelLoadFailedResponse" } } }, "description": "Terminal model load failure (MODEL_LOAD_FAILED)", "headers": { "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Error-Version": { "description": "Gateway package version associated with the error envelope", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InferenceServiceUnavailableResponse" } } }, "description": "Queue unavailable, GPU not configured, model loading, or capacity exhausted", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds, when retryable", "schema": { "type": "string" } }, "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Result channel closed" } }, "tags": [ "inference" ], "x-sie-axum-catch-all": "/v1/encode/{*model}" } }, "/v1/extract/{model}": { "post": { "description": "Mixed-success batches return 200 with only successful items; the response carries no per-item error envelope. For per-item error visibility, send single-item batches.", "operationId": "proxy_extract", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/extract/{*model}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "model", "required": true, "schema": { "type": "string" } }, { "description": "Preferred GPU or machine profile", "in": "header", "name": "X-SIE-MACHINE-PROFILE", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Explicit pool routing override", "in": "header", "name": "X-SIE-Pool", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Client SDK version for skew warnings", "in": "header", "name": "X-SIE-SDK-Version", "required": false, "schema": { "type": [ "string", "null" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractRequest" } }, "application/msgpack": { "schema": { "$ref": "#/components/schemas/ExtractRequest" } }, "application/vnd.msgpack": { "schema": { "$ref": "#/components/schemas/ExtractRequest" } }, "application/x-msgpack": { "schema": { "$ref": "#/components/schemas/ExtractRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ExtractResponse" } }, "application/msgpack": { "schema": { "$ref": "#/components/schemas/ExtractResponse" } }, "application/vnd.msgpack": { "schema": { "$ref": "#/components/schemas/ExtractResponse" } }, "application/x-msgpack": { "schema": { "$ref": "#/components/schemas/ExtractResponse" } } }, "description": "Extract response", "headers": { "X-Inference-Time": { "description": "Worker-reported inference time in milliseconds", "schema": { "type": "string" } }, "X-Payload-Fetch-Time": { "description": "Worker-reported offloaded payload fetch time in milliseconds, when available", "schema": { "type": "string" } }, "X-Postprocessing-Time": { "description": "Worker-reported postprocessing time in milliseconds, when available", "schema": { "type": "string" } }, "X-Queue-Publish-Time": { "description": "Milliseconds spent publishing work to the queue", "schema": { "type": "string" } }, "X-Queue-Time": { "description": "Worker-reported queue time in milliseconds", "schema": { "type": "string" } }, "X-Queue-Wait-Time": { "description": "Milliseconds spent waiting for worker results", "schema": { "type": "string" } }, "X-SIE-Request-Id": { "description": "Gateway request id for queue-backed inference", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } }, "X-SIE-Worker": { "description": "Logical queue worker tag that produced the response", "schema": { "type": "string" } }, "X-Tokenization-Time": { "description": "Worker-reported tokenization time in milliseconds, when available", "schema": { "type": "string" } } } }, "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvisioningResponse" } } }, "description": "Worker provisioning in progress", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Invalid request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BundleConflictResponse" } } }, "description": "Bundle override conflicts with model routing" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Request body too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/InferenceInternalServerErrorResponse" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "All batch items failed or gateway internal error; gateway auth enabled but no tokens configured" }, "502": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayModelLoadFailedResponse" } } }, "description": "Terminal model load failure (MODEL_LOAD_FAILED)", "headers": { "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Error-Version": { "description": "Gateway package version associated with the error envelope", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InferenceServiceUnavailableResponse" } } }, "description": "Queue unavailable, GPU not configured, model loading, or capacity exhausted", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds, when retryable", "schema": { "type": "string" } }, "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Result channel closed" } }, "tags": [ "inference" ], "x-sie-axum-catch-all": "/v1/extract/{*model}" } }, "/v1/generate/{model}": { "post": { "description": "Blocking text generation (walking-skeleton surface). The model path parameter must use the SIE-safe ID (e.g. ``Qwen__Qwen3-4B-Instruct``); HF-style slashes are rejected with 400.", "operationId": "proxy_generate", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/generate/{*model}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "model", "required": true, "schema": { "type": "string" } }, { "description": "Preferred GPU or machine profile", "in": "header", "name": "X-SIE-MACHINE-PROFILE", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Explicit pool routing override", "in": "header", "name": "X-SIE-Pool", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Client SDK version for skew warnings", "in": "header", "name": "X-SIE-SDK-Version", "required": false, "schema": { "type": [ "string", "null" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GenerateResponse" } } }, "description": "Generated text response" }, "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvisioningResponse" } } }, "description": "Worker provisioning in progress" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Invalid request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/OpenAIErrorEnvelope" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Worker emitted malformed response; gateway auth enabled but no tokens configured" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Queue unavailable or model loading" }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Generation timeout" } }, "tags": [ "inference" ], "x-sie-axum-catch-all": "/v1/generate/{*model}" } }, "/v1/models": { "get": { "operationId": "get_models", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelsResponse" } } }, "description": "Models visible to this gateway replica" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "models" ] } }, "/v1/models/{model}": { "get": { "operationId": "get_model", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/models/{*model}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "model", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelInfoWire" } } }, "description": "Model detail" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ModelNotFoundResponse" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "summary": "Detail counterpart to `get_models`.", "tags": [ "models" ], "x-sie-axum-catch-all": "/v1/models/{*model}" } }, "/v1/moderations": { "post": { "description": "OpenAI-compatible moderations endpoint. Not implemented: SIE serves operator-provided models only and has no moderation model or governance store yet (Tier 0). The route is registered so the surface is discoverable and returns an explicit 501 `not_implemented` rather than a 404 — never a silent 'not flagged', which would be an unsafe lie about content safety.", "operationId": "proxy_moderations", "responses": { "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" }, "501": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Moderations not implemented" } }, "tags": [ "inference" ] } }, "/v1/pools": { "get": { "operationId": "list_pools", "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/PoolListResponse" } } }, "description": "Pools visible to this gateway replica" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "pools" ] }, "post": { "operationId": "create_pool", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CreatePoolRequest" } } }, "required": true }, "responses": { "201": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pool" } } }, "description": "Pool created, renewed, or updated" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Invalid pool request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Valid bearer token but admin token required for this mutation (or admin token not configured)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "pools" ] } }, "/v1/pools/{name}": { "delete": { "operationId": "delete_pool", "parameters": [ { "description": "Pool name", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" } } }, "description": "Pool deleted" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Pool cannot be deleted" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Pool not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "pools" ] }, "get": { "operationId": "get_pool", "parameters": [ { "description": "Pool name", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/Pool" } } }, "description": "Pool detail" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Pool not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "pools" ] } }, "/v1/pools/{name}/renew": { "post": { "operationId": "renew_pool", "parameters": [ { "description": "Pool name", "in": "path", "name": "name", "required": true, "schema": { "type": "string" } } ], "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/MessageResponse" } } }, "description": "Pool renewed" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "403": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Valid bearer token but admin token required for this mutation (or admin token not configured)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Pool not found" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "pools" ] } }, "/v1/responses": { "post": { "description": "OpenAI Responses API (MVP). Strict allow-list parser (`product/design.md` §5.14): unknown top-level fields reject with 400 `unsupported_field`. `input` is either a string prompt OR an array of `{role, content}` messages (Workstream A array-input support). Known-rejected fields: `tools`, `tool_choice`, `previous_response_id`, `reasoning`, `background`, `metadata`, `instructions` — each rejects with 400 `unsupported_field`. `stream: true` is rejected (Responses SSE is deferred). Multimodal image content parts reject with 400 `unsupported_field` on the array form.", "operationId": "proxy_responses", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ResponsesRequest" } } }, "required": true }, "responses": { "200": { "description": "Response object" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Invalid or unsupported request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Model not found" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/OpenAIErrorEnvelope" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Worker emitted malformed response; gateway auth enabled but no tokens configured" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Queue unavailable" } }, "summary": "`/v1/responses` — OpenAI Responses API (MVP, stateless single-turn).", "tags": [ "inference" ] } }, "/v1/score/{model}": { "post": { "description": "Mixed-success batches return 200 with only successful items; the response carries no per-item error envelope. For per-item error visibility, send single-item batches.", "operationId": "proxy_score", "parameters": [ { "description": "Model id. Runtime route is Axum catch-all `/v1/score/{*model}`; clients using this OpenAPI path template should percent-encode slashes in model ids, for example `BAAI%2Fbge-m3`.", "in": "path", "name": "model", "required": true, "schema": { "type": "string" } }, { "description": "Preferred GPU or machine profile", "in": "header", "name": "X-SIE-MACHINE-PROFILE", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Explicit pool routing override", "in": "header", "name": "X-SIE-Pool", "required": false, "schema": { "type": [ "string", "null" ] } }, { "description": "Client SDK version for skew warnings", "in": "header", "name": "X-SIE-SDK-Version", "required": false, "schema": { "type": [ "string", "null" ] } } ], "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoreRequest" } }, "application/msgpack": { "schema": { "$ref": "#/components/schemas/ScoreRequest" } }, "application/vnd.msgpack": { "schema": { "$ref": "#/components/schemas/ScoreRequest" } }, "application/x-msgpack": { "schema": { "$ref": "#/components/schemas/ScoreRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ScoreResponse" } }, "application/msgpack": { "schema": { "$ref": "#/components/schemas/ScoreResponse" } }, "application/vnd.msgpack": { "schema": { "$ref": "#/components/schemas/ScoreResponse" } }, "application/x-msgpack": { "schema": { "$ref": "#/components/schemas/ScoreResponse" } } }, "description": "Score response", "headers": { "X-Inference-Time": { "description": "Worker-reported inference time in milliseconds", "schema": { "type": "string" } }, "X-Payload-Fetch-Time": { "description": "Worker-reported offloaded payload fetch time in milliseconds, when available", "schema": { "type": "string" } }, "X-Postprocessing-Time": { "description": "Worker-reported postprocessing time in milliseconds, when available", "schema": { "type": "string" } }, "X-Queue-Publish-Time": { "description": "Milliseconds spent publishing work to the queue", "schema": { "type": "string" } }, "X-Queue-Time": { "description": "Worker-reported queue time in milliseconds", "schema": { "type": "string" } }, "X-Queue-Wait-Time": { "description": "Milliseconds spent waiting for worker results", "schema": { "type": "string" } }, "X-SIE-Request-Id": { "description": "Gateway request id for queue-backed inference", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } }, "X-SIE-Worker": { "description": "Logical queue worker tag that produced the response", "schema": { "type": "string" } }, "X-Tokenization-Time": { "description": "Worker-reported tokenization time in milliseconds, when available", "schema": { "type": "string" } } } }, "202": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/ProvisioningResponse" } } }, "description": "Worker provisioning in progress", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Invalid request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/BundleConflictResponse" } } }, "description": "Bundle override conflicts with model routing" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Request body too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/InferenceInternalServerErrorResponse" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "All batch items failed or gateway internal error; gateway auth enabled but no tokens configured" }, "502": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/GatewayModelLoadFailedResponse" } } }, "description": "Terminal model load failure (MODEL_LOAD_FAILED)", "headers": { "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Error-Version": { "description": "Gateway package version associated with the error envelope", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/InferenceServiceUnavailableResponse" } } }, "description": "Queue unavailable, GPU not configured, model loading, or capacity exhausted", "headers": { "Retry-After": { "description": "Suggested retry delay in seconds, when retryable", "schema": { "type": "string" } }, "X-SIE-Error-Code": { "description": "SDK-stable gateway or worker error code", "schema": { "type": "string" } }, "X-SIE-Server-Version": { "description": "Gateway-compatible server version advertised by this gateway", "schema": { "type": "string" } }, "X-SIE-Version": { "description": "Gateway package version that handled the request", "schema": { "type": "string" } } } }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Result channel closed" } }, "tags": [ "inference" ], "x-sie-axum-catch-all": "/v1/score/{*model}" } }, "/ws/cluster-status": { "get": { "operationId": "ws_cluster_status", "responses": { "101": { "description": "WebSocket cluster status stream" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Missing or invalid bearer token (inference token)" }, "500": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/StandardApiError" } } }, "description": "Gateway auth enabled but no tokens configured" } }, "tags": [ "observability" ] } } }, "security": [ { "bearerAuth": [] } ], "tags": [ { "description": "Gateway health, readiness, and status surfaces", "name": "health" }, { "description": "Queue-backed inference entrypoints", "name": "inference" }, { "description": "Models visible to this gateway replica", "name": "models" }, { "description": "Runtime pool coordination", "name": "pools" }, { "description": "Read-only gateway view of model and bundle config", "name": "config" }, { "description": "Metrics and streaming status", "name": "observability" }, { "description": "API description", "name": "docs" } ] }