{ "components": { "schemas": { "AllItemsFailedResponse": { "properties": { "details": { "items": { "$ref": "#/components/schemas/InferenceErrorDetail" }, "type": "array" }, "error": { "type": "string" } }, "required": [ "error", "details" ], "type": "object" }, "AssignedWorker": { "properties": { "bundle": { "type": "string" }, "gpu": { "type": "string" }, "name": { "type": "string" }, "url": { "type": "string" } }, "required": [ "name", "url", "gpu" ], "type": "object" }, "BundleConfigDocument": { "properties": { "adapters": { "items": { "type": "string" }, "type": "array" }, "engine": { "type": "string" }, "name": { "type": "string" }, "priority": { "format": "int32", "type": "integer" }, "source": { "type": "string" } }, "required": [ "name", "engine", "priority", "source", "adapters" ], "type": "object" }, "BundleConfigSummary": { "properties": { "adapter_count": { "minimum": 0, "type": "integer" }, "bundle_id": { "type": "string" }, "connected_workers": { "minimum": 0, "type": "integer" }, "engine": { "type": "string" }, "priority": { "format": "int32", "type": "integer" }, "source": { "type": "string" } }, "required": [ "bundle_id", "engine", "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. 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, ``content`` is either a\nplain string OR a list of content parts (``{type:\"text\"|\"input_text\",\ntext:\"...\"}``). ``image_url`` / ``input_image`` parts carrying a base64\n``data:`` URI are accepted for generation models declaring ``inputs.image`` (non-vision\nmodels reject 400 ``unsupported_field``; remote URLs reject 400\n``invalid_request``). Assistant messages that carry ``tool_calls`` may set\n``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 content parts (`{type:\"text\"|\"input_text\", text:\"...\"}`). Image parts (`image_url` / `input_image`) carrying a base64 `data:` URI are accepted for generation models that declare `inputs.image`; non-vision models reject with 400 unsupported_field and remote (non-`data:`) URLs reject with 400 invalid_request. May be `null` on a `role:\"assistant\"` message that carries `tool_calls`.", "oneOf": [ { "type": "string" }, { "items": { "properties": { "image_url": { "description": "Image payload for `image_url` / `input_image` parts: a base64 `data:` URI, either as a bare string or as `{ \"url\": \"data:...\" }`. Remote (non-`data:`) URLs reject with 400 invalid_request.", "oneOf": [ { "type": "string" }, { "properties": { "url": { "type": "string" } }, "type": "object" } ] }, "text": { "type": "string" }, "type": { "enum": [ "text", "input_text", "image_url", "input_image" ], "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**:\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" ] }, "chat_template_kwargs": { "description": "Per-request overrides for kwargs passed to the tokenizer's\n``apply_chat_template`` call. Object whose entries are merged on\ntop of the model YAML's ``chat_template_kwargs`` (the YAML wins\nfor keys present in both — adjust the YAML when a request needs\nto defeat a baked-in default). Typical use: pass\n``{\"enable_thinking\": false}`` to the Qwen3 family to suppress\n```` reasoning on a per-request basis. Absent → only the\nmodel YAML's defaults apply." }, "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" }, "min_tokens": { "description": "SGLang ``sampling_params.min_new_tokens``: integer ``>= 0`` capping\nhow many tokens the model must emit before any stop condition can\nfire. Use to work around models that occasionally emit the stop\ntoken as the very first decoded token (e.g. Qwen3.6 thinking-off\nunder greedy decode). Absent → sampler default (no minimum).", "format": "int32", "minimum": 0, "type": [ "integer", "null" ] }, "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": "Optional signed 64-bit per-request sampling seed. Reproducibility is best effort, not guaranteed, and depends on the active generation backend and deployment configuration. Non-integer or out-of-range values reject with 400 invalid_request.", "format": "int64", "maximum": 9223372036854775807, "minimum": -9223372036854775808, "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**: unknown fields reject with 400\n``unsupported_field``. Type-invalid values reject with 400 ``invalid_request``.\n\n**Known-rejected fields**:\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; 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": "Optional signed 64-bit per-request sampling seed. Reproducibility is best effort, not guaranteed, and depends on the active generation backend and deployment configuration. Non-integer or out-of-range values reject with 400 invalid_request.", "format": "int64", "maximum": 9223372036854775807, "minimum": -9223372036854775808, "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": { "description": "Per-pool warm floor (minimum machines kept warm via KEDA). Default 0\nkeeps scale-from-zero. See `PoolSpec::minimum_worker_count`.", "format": "int32", "minimum": 0, "type": "integer" }, "name": { "description": "Pool name used in gpu=\"pool/machine_profile\" routing. Names are stored and routed in lowercase. Only ASCII letters, digits, '_' and '-' are allowed; '_default' is reserved.", "maxLength": 128, "minLength": 1, "pattern": "^(?!_[dD][eE][fF][aA][uU][lL][tT]$)[A-Za-z0-9_-]+$", "type": "string" }, "pinned_models": { "description": "Per-pool pinned-model set. Each id is validated against the models the\ngateway already tracks and stored canonicalized; ids may be\nprofile-qualified (`model-name:profile_name`). Default empty leaves\nlazy-loading unchanged. See `PoolSpec::pinned_models`.", "items": { "type": "string" }, "type": "array" }, "queue_pool": { "description": "Physical Helm/NATS queue namespace to draw workers from. Omit for normal\ndynamic logical pools; they use `default`. Set only to an\noperator-provisioned Helm queue pool declared under\n`queueRouting.staticQueuePools` for dedicated capacity.", "maxLength": 128, "minLength": 1, "pattern": "^(?!_[dD][eE][fF][aA][uU][lL][tT]$)[A-Za-z0-9_-]+$", "type": [ "string", "null" ] }, "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" }, "maxItems": 4096, "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" }, "ExtractItemError": { "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" }, "maxItems": 4096, "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" }, "error": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ExtractItemError" } ] }, "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" }, "GenerateChunk": { "description": "One JSON payload from a SIE-native generation SSE ``data:`` event.\nThe stream is terminated separately by the literal ``data: [DONE]``.", "properties": { "done": { "type": "boolean" }, "error": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/GenerateChunkError" } ] }, "finish_reason": { "type": [ "string", "null" ] }, "logprobs": { "description": "Per-token log probabilities aligned with ``text_delta``. Present only\nwhen the streaming request set ``logprobs: true``.", "items": {}, "type": [ "array", "null" ] }, "request_id": { "type": "string" }, "seq": { "format": "int32", "minimum": 0, "type": "integer" }, "text_delta": { "type": "string" }, "ttft_ms": { "format": "double", "type": [ "number", "null" ] }, "usage": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/GenerateUsage" } ] } }, "required": [ "request_id", "seq", "text_delta", "done" ], "type": "object" }, "GenerateChunkError": { "description": "Error carried by a terminal SIE-native generation SSE event.", "properties": { "code": { "type": "string" }, "message": { "type": "string" } }, "required": [ "code", "message" ], "type": "object" }, "GenerateRequest": { "description": "SIE-native text-generation request. Set ``stream`` to true for SSE.", "properties": { "frequency_penalty": { "format": "double", "type": [ "number", "null" ] }, "grammar": { "description": "Optional grammar object accepted by the gateway grammar validator." }, "images": { "description": "Optional inline images paired with ``prompt``. When present, the worker\nrenders one user turn through the model's native chat template.", "items": { "$ref": "#/components/schemas/NativeGenerateImage" }, "maxItems": 16, "minItems": 1, "type": [ "array", "null" ] }, "logit_bias": { "additionalProperties": { "format": "double", "type": "number" }, "description": "Per-token additive sampler bias. Keys are integer token ids encoded as\nstrings; values are finite numbers in ``[-100, 100]``. At most 1024\nentries are accepted.", "propertyNames": { "type": "string" }, "type": [ "object", "null" ] }, "logprobs": { "description": "Return per-token log probabilities on native SSE chunks. Native\nblocking responses reject this field because they have no logprob\nresponse member.", "type": [ "boolean", "null" ] }, "lora_adapter": { "description": "Served LoRA adapter name. The gateway validates it against the resolved\nmodel before queue dispatch.", "minLength": 1, "type": [ "string", "null" ] }, "max_new_tokens": { "format": "int32", "minimum": 1, "type": "integer" }, "options": { "description": "Governed generation runtime options. Explicit top-level sampler fields\noverride matching values in ``default_sampling``." }, "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" ] }, "seed": { "description": "Optional signed 64-bit per-request sampling seed. Reproducibility is best effort, not guaranteed, and depends on the active generation backend and deployment configuration. Non-integer or out-of-range values reject with 400 invalid_request.", "format": "int64", "maximum": 9223372036854775807, "minimum": -9223372036854775808, "type": [ "integer", "null" ] }, "stop": { "description": "Stop sequences for the native generate surface.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "stream": { "description": "SSE streaming. When true, the 200 response uses `text/event-stream`; each `data:` event contains a SIE-native `GenerateChunk` JSON object and the stream terminates with `data: [DONE]`. Defaults to false. Non-boolean values reject with 400 invalid_request.", "type": [ "boolean", "null" ] }, "temperature": { "format": "float", "type": [ "number", "null" ] }, "top_logprobs": { "description": "Number of alternative tokens per position. Requires ``logprobs: true``\nand ``stream: true``.", "format": "int32", "maximum": 20, "minimum": 0, "type": [ "integer", "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" }, "pending_generation": { "$ref": "#/components/schemas/PendingGenerationSnapshot" }, "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.\n\nThese flags indicate that a model *supports* a task — they are NOT a\nprecision-independent quality SLA. A flag is true at the model level even\nwhen quality is profile/precision-dependent (e.g. ``sql`` quality regresses\nunder FP8; route SQL-critical traffic to a BF16 bundle via the ``sql``\nalias). Treat them as \"can do this\", not \"guaranteed to score X\".", "properties": { "code": { "description": "Whether the model is validated for code generation — backs the\n``model=\"code\"`` alias. Informational only; never request-gated.", "type": "boolean" }, "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.", "items": { "type": "string" }, "type": [ "array", "null" ] }, "guard": { "description": "Whether the model is a content-moderation / policy-check guard —\nbacks the ``model=\"guard\"`` alias. Informational only; never\nrequest-gated.", "type": "boolean" }, "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" ] }, "sql": { "description": "Whether the model targets the SQL path — backs the ``model=\"sql\"``\nalias. Informational only; never request-gated. Precision-sensitive:\nSQL quality can regress sharply under FP8, so this model-level flag is a\nsupport signal, not a per-profile quality guarantee.", "type": "boolean" }, "tools": { "description": "Whether the model supports tool / function calling.", "type": [ "boolean", "null" ] } }, "required": [ "code", "sql", "guard" ], "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" }, "pending_generation": { "$ref": "#/components/schemas/PendingGenerationSnapshot" }, "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" }, "pending_generation": { "$ref": "#/components/schemas/PendingGenerationSnapshot" }, "profiles": { "additionalProperties": { "$ref": "#/components/schemas/ProfileInfoWire" }, "propertyNames": { "type": "string" }, "type": "object" }, "revision": { "description": "Immutable model weights revision, when the catalog pins one.", "type": [ "string", "null" ] }, "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" }, "NativeGenerateImage": { "description": "One inline image on the SIE-native generate surface.", "properties": { "data": { "description": "Canonical standard-base64 encoded image bytes, at most 16 MiB decoded.\nRemote URLs are not accepted.", "maxLength": 22369624, "minLength": 1, "type": "string" }, "format": { "description": "Short media-format hint such as ``png`` or ``jpeg``.", "maxLength": 32, "minLength": 1, "pattern": "^[A-Za-z0-9.+-]+$", "type": [ "string", "null" ] } }, "required": [ "data" ], "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" }, "maxItems": 256, "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" }, "OpenAITranscriptionRequest": { "properties": { "file": { "format": "binary", "type": "string" }, "language": { "type": [ "string", "null" ] }, "model": { "type": "string" }, "prompt": { "type": [ "string", "null" ] }, "response_format": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/OpenAITranscriptionResponseFormat" } ] }, "stream": { "type": [ "boolean", "null" ] }, "temperature": { "format": "double", "maximum": 1, "minimum": 0, "type": [ "number", "null" ] }, "timestamp_granularities[]": { "items": { "$ref": "#/components/schemas/OpenAITranscriptionTimestampGranularity" }, "maxItems": 2, "type": [ "array", "null" ] } }, "required": [ "file", "model" ], "type": "object" }, "OpenAITranscriptionResponse": { "properties": { "duration": { "format": "double", "type": [ "number", "null" ] }, "language": { "type": [ "string", "null" ] }, "segments": { "items": { "$ref": "#/components/schemas/OpenAITranscriptionSegment" }, "type": [ "array", "null" ] }, "task": { "type": [ "string", "null" ] }, "text": { "type": "string" }, "usage": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/OpenAITranscriptionUsage" } ] }, "words": { "items": { "$ref": "#/components/schemas/OpenAITranscriptionWord" }, "type": [ "array", "null" ] } }, "required": [ "text" ], "type": "object" }, "OpenAITranscriptionResponseFormat": { "enum": [ "json", "text", "srt", "verbose_json", "vtt" ], "type": "string" }, "OpenAITranscriptionSegment": { "properties": { "end": { "format": "double", "type": "number" }, "id": { "format": "int64", "minimum": 0, "type": "integer" }, "start": { "format": "double", "type": "number" }, "text": { "type": "string" } }, "required": [ "id", "start", "end", "text" ], "type": "object" }, "OpenAITranscriptionTimestampGranularity": { "enum": [ "word", "segment" ], "type": "string" }, "OpenAITranscriptionUsage": { "properties": { "seconds": { "format": "double", "type": "number" }, "type": { "type": "string" } }, "required": [ "type", "seconds" ], "type": "object" }, "OpenAITranscriptionWord": { "properties": { "end": { "format": "double", "type": "number" }, "start": { "format": "double", "type": "number" }, "word": { "type": "string" } }, "required": [ "word", "start", "end" ], "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" }, "PendingGenerationGroup": { "properties": { "active_streams": { "format": "int64", "minimum": 0, "type": "integer" }, "count": { "format": "int64", "minimum": 0, "type": "integer" }, "display_model": { "type": "string" }, "model": { "type": "string" }, "oldest_request_age_ms": { "format": "int64", "minimum": 0, "type": "integer" }, "pool": { "type": "string" }, "republished": { "format": "int64", "minimum": 0, "type": "integer" }, "waiting_first_chunk": { "format": "int64", "minimum": 0, "type": "integer" } }, "required": [ "model", "display_model", "pool", "count", "waiting_first_chunk", "active_streams", "republished", "oldest_request_age_ms" ], "type": "object" }, "PendingGenerationSnapshot": { "properties": { "groups": { "items": { "$ref": "#/components/schemas/PendingGenerationGroup" }, "type": "array" }, "total": { "format": "int64", "minimum": 0, "type": "integer" } }, "required": [ "total", "groups" ], "type": "object" }, "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": { "description": "Per-pool warm floor: the minimum number of machines the gateway keeps\nwarm (via KEDA) so the first request to the pool never hits a cold VM.\nThe gateway publishes it as `sie.gateway.pool.warm_floor`; the\ncollector translates it for KEDA's Prometheus query.\nDefault 0 leaves scale-from-zero unchanged.", "format": "int32", "minimum": 0, "type": "integer" }, "name": { "type": "string" }, "pinned_models": { "description": "Per-pool pinned-model set: models the gateway keeps loaded so the first\nrequest to them pays no cold model-load. Chosen from the models the\ngateway already tracks (see `GET /v1/configs/models`); ids may be\nprofile-qualified (`model-name:profile_name`). Default empty leaves\nlazy-loading unchanged.", "items": { "type": "string" }, "type": "array" }, "queue_pool": { "description": "Physical Helm/NATS queue namespace backing this logical API pool.\n\nAPI-created pools default to the Helm `default` queue pool. Pool `name`\nis user/dynamic; a non-default `queue_pool` is infra/admin and must\nmatch a Helm worker queue declared under `queueRouting.staticQueuePools`.", "maxLength": 128, "minLength": 1, "pattern": "^(?!_[dD][eE][fF][aA][uU][lL][tT]$)[A-Za-z0-9_-]+$", "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" }, "Relation": { "properties": { "head": { "type": "string" }, "relation": { "type": "string" }, "score": { "format": "double", "type": "number" }, "tail": { "type": "string" } }, "required": [ "head", "tail", "relation", "score" ], "type": "object" }, "RerankDocument": { "properties": { "text": { "type": "string" } }, "required": [ "text" ], "type": "object" }, "RerankError": { "properties": { "message": { "type": "string" } }, "required": [ "message" ], "type": "object" }, "RerankOptions": { "additionalProperties": false, "properties": { "max_seq_length": { "description": "Positive request-time sequence-length cap, clamped to the model's\nconfigured ceiling. Reranker truncation preserves the instruction and\nquery and truncates candidate document tokens first.", "minimum": 1, "type": [ "integer", "null" ] }, "profile": { "description": "Named SIE model profile. Blank values are rejected.", "minLength": 1, "pattern": ".*\\S.*", "type": [ "string", "null" ] } }, "type": "object" }, "RerankRequest": { "additionalProperties": false, "properties": { "documents": { "description": "One to 1,000 nonblank text candidates. Execution is internally batched\nwithin the selected model profile's max_batch_tokens limit.", "items": { "minLength": 1, "pattern": ".*\\S.*", "type": "string" }, "maxItems": 1000, "minItems": 1, "type": "array" }, "model": { "description": "SIE model id. Blank or whitespace-only values are rejected.", "minLength": 1, "pattern": ".*\\S.*", "type": "string" }, "options": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RerankOptions", "description": "SIE extension. Only profile and max_seq_length are accepted." } ] }, "query": { "description": "Text query. Blank or whitespace-only values are rejected.", "minLength": 1, "pattern": ".*\\S.*", "type": "string" }, "return_documents": { "type": [ "boolean", "null" ] }, "top_n": { "minimum": 1, "type": [ "integer", "null" ] } }, "required": [ "model", "query", "documents" ], "type": "object" }, "RerankResponse": { "properties": { "model": { "type": "string" }, "results": { "items": { "$ref": "#/components/schemas/RerankResult" }, "type": "array" }, "usage": { "$ref": "#/components/schemas/ScoreUsage" } }, "required": [ "model", "results", "usage" ], "type": "object" }, "RerankResult": { "properties": { "document": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RerankDocument" } ] }, "index": { "minimum": 0, "type": "integer" }, "relevance_score": { "format": "double", "type": "number" } }, "required": [ "index", "relevance_score" ], "type": "object" }, "RerankV2Request": { "additionalProperties": false, "properties": { "documents": { "description": "One to 1,000 nonblank text candidates. Execution is internally batched\nwithin the selected model profile's max_batch_tokens limit.", "items": { "minLength": 1, "pattern": ".*\\S.*", "type": "string" }, "maxItems": 1000, "minItems": 1, "type": "array" }, "max_tokens_per_doc": { "description": "`max_tokens_per_doc` is not supported by this SIE compatibility subset; omit it or send null.", "type": "null" }, "model": { "description": "SIE model id. Blank or whitespace-only values are rejected.", "minLength": 1, "pattern": ".*\\S.*", "type": "string" }, "options": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/RerankOptions", "description": "SIE extension. Only profile and max_seq_length are accepted." } ] }, "priority": { "description": "`priority` is not supported by this SIE compatibility subset; omit it or send null.", "type": "null" }, "query": { "description": "Text query. Blank or whitespace-only values are rejected.", "minLength": 1, "pattern": ".*\\S.*", "type": "string" }, "top_n": { "minimum": 1, "type": [ "integer", "null" ] } }, "required": [ "model", "query", "documents" ], "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**: unknown fields reject with 400\n``unsupported_field``. Type-invalid values reject with 400 ``invalid_request``.\n\n**Known-rejected fields**:\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``: the Responses surface is\n text-only. (Vision input is supported on ``/v1/chat/completions``.)", "properties": { "input": { "description": "Either a string prompt OR an array of `{role, content}` messages (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": "Optional signed 64-bit per-request sampling seed. Reproducibility is best effort, not guaranteed, and depends on the active generation backend and deployment configuration. Non-integer or out-of-range values reject with 400 invalid_request.", "format": "int64", "maximum": 9223372036854775807, "minimum": -9223372036854775808, "type": [ "integer", "null" ] }, "stream": { "description": "Accepted only as `false` (or absent). `true` rejects with 400 unsupported_field because Responses SSE is not supported yet.", "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" }, "maxItems": 1000, "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" }, "usage": { "oneOf": [ { "type": "null" }, { "$ref": "#/components/schemas/ScoreUsage" } ] } }, "required": [ "model", "scores" ], "type": "object" }, "ScoreUsage": { "properties": { "images": { "format": "int64", "minimum": 0, "type": [ "integer", "null" ] }, "input_tokens": { "format": "int64", "minimum": 0, "type": "integer" } }, "required": [ "input_tokens" ], "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" }, "inflight_batches": { "format": "int32", "type": "integer" }, "loaded_models": { "items": { "type": "string" }, "type": "array" }, "memory_total_bytes": { "format": "int64", "type": "integer" }, "memory_used_bytes": { "format": "int64", "type": "integer" }, "name": { "type": "string" }, "pending_cost": { "format": "int64", "type": "integer" }, "queue_depth": { "format": "int32", "type": "integer" }, "ready_gpu_slots": { "format": "int32", "type": "integer" }, "url": { "type": "string" } }, "required": [ "name", "url", "gpu", "gpu_count", "ready_gpu_slots", "loaded_models", "queue_depth", "pending_cost", "inflight_batches", "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.6.26" }, "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" ] } }, "/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 with retryable provisioning signals 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/audio/transcriptions": { "post": { "description": "OpenAI-compatible audio transcription backed by SIE native extract. The multipart upload is bounded at 24 MiB. json, text, srt, verbose_json, and vtt responses are supported; stream=true and diarized_json are rejected explicitly.", "operationId": "proxy_openai_transcription", "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": { "multipart/form-data": { "schema": { "$ref": "#/components/schemas/OpenAITranscriptionRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAITranscriptionResponse" } } }, "description": "OpenAI-compatible transcription 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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Invalid or unsupported field" }, "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" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/OpenAIErrorEnvelope" } } }, "description": "Multipart body or audio file too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/OpenAIErrorEnvelope" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Malformed worker response 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": "Provisioning, queue, loading, or capacity unavailable", "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/chat/completions": { "post": { "description": "OpenAI-compatible chat completions. Strict allow-list parser: 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 content parts; image parts (`image_url` / `input_image`) with a base64 `data:` URI are accepted for generation models declaring `inputs.image` (non-vision/encode-only models reject 400 `unsupported_field`; remote URLs reject 400 `invalid_request`). `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", "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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, queue unavailable, or model loading", "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" } } } } }, "tags": [ "inference" ] } }, "/v1/completions": { "post": { "description": "OpenAI-compatible legacy Completions. Strict allow-list parser: 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.", "operationId": "proxy_completions", "requestBody": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/CompletionsRequest" } } }, "required": true }, "responses": { "200": { "description": "Text completion 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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, queue unavailable, or model loading", "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" } } } } }, "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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, 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/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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, 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": "Successful extract work results may carry an aligned per-item error alongside partial data. Transport-level mixed failures retain generic batch behavior: the 200 response includes only successful work results.", "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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, 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": "SIE-native generation with optional bounded inline images. Omit `stream` or set it to false for a blocking JSON response; set `stream: true` for SIE-native Server-Sent Events terminated by `data: [DONE]`. The model path parameter must use the SIE-safe ID (for example `Qwen__Qwen3-4B-Instruct`); HF-style slashes reject 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" } }, "text/event-stream": { "schema": { "description": "SSE-framed text containing SIE-native `GenerateChunk` JSON in each `data:` event; the stream terminates with `data: [DONE]`.", "type": "string" }, "x-sie-event-schema": { "$ref": "#/components/schemas/GenerateChunk" } } }, "description": "Generated text as blocking JSON, or SIE-native SSE `GenerateChunk` events when `stream: true`; SSE terminates with `data: [DONE]`.", "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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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" }, "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": "Worker emitted malformed response; 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/OpenAIErrorEnvelope" } } }, "description": "Provisioning in progress, queue unavailable, or model loading", "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": "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/rerank": { "post": { "description": "Cohere v1-compatible text-only subset over SIE's native score primitive. Supported request fields are model, query, string documents, top_n, return_documents, and the documented SIE options extension. Unknown or unsupported fields reject with 400. The adapter rejects partial native results and forwards only authoritative worker-emitted usage.", "operationId": "proxy_rerank", "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/RerankRequest" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankResponse" } } }, "description": "Cohere v1-compatible subset response" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Invalid request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Missing or invalid bearer token" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Bundle override conflicts with model routing" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Request body too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/RerankError" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Malformed or partial native score result; gateway auth enabled but no tokens configured" }, "502": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "MODEL_LOAD_FAILED" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Provisioning, model loading, or capacity exhausted" }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Result channel closed" } }, "tags": [ "inference" ] } }, "/v1/responses": { "post": { "description": "OpenAI Responses API (MVP). Strict allow-list parser: unknown top-level fields reject with 400 `unsupported_field`. `input` is either a string prompt OR an array of `{role, content}` messages. 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", "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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, queue unavailable, or model loading", "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" } } } } }, "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-Execution-Identity-SHA256": { "description": "Worker-origin SHA-256 identity of the immutable release and realized serving resources, when available", "schema": { "pattern": "^[0-9a-f]{64}$", "type": "string" } }, "X-SIE-Model-Revision": { "description": "Immutable deployed bundle/config execution revision that handled the request, when available", "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" } } } }, "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": "Provisioning in progress, 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}" } }, "/v2/rerank": { "post": { "description": "Cohere v2-compatible text-only subset over SIE's native score primitive. Supported request fields are model, query, string documents, top_n, and the documented SIE options extension. max_tokens_per_doc and priority must be omitted or null; unknown or unsupported fields reject with 400. The adapter rejects partial native results and forwards only authoritative worker-emitted usage.", "operationId": "proxy_rerank_v2", "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/RerankV2Request" } } }, "required": true }, "responses": { "200": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankResponse" } } }, "description": "Cohere v2-compatible subset response" }, "400": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Invalid or unsupported request" }, "401": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Missing or invalid bearer token" }, "404": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Model not found" }, "409": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Bundle override conflicts with model routing" }, "413": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Request body too large" }, "500": { "content": { "application/json": { "schema": { "oneOf": [ { "$ref": "#/components/schemas/RerankError" }, { "$ref": "#/components/schemas/StandardApiError" } ] } } }, "description": "Malformed or partial native score result; gateway auth enabled but no tokens configured" }, "502": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "MODEL_LOAD_FAILED" }, "503": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Provisioning, model loading, or capacity exhausted" }, "504": { "content": { "application/json": { "schema": { "$ref": "#/components/schemas/RerankError" } } }, "description": "Result channel closed" } }, "tags": [ "inference" ] } }, "/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" } ] }