The OpenAI-compatible subset the router implements, the fields it honours, the extension fields in usage, and the streaming rules.
ReferenceFor developers
Base URL: https://api.router.superprotocol.com/v1 directly, or http://127.0.0.1:8787/v1 through Gatekeeper. Same paths, same bodies: Gatekeeper is a transparent forward proxy. The contract is the OpenAI API where specified and silent where not; the normative text is docs/contracts/router-api.md in the repository.
Authentication
Authorization: Bearer sk-tee-v1-<43 characters> on every /v1 request. No cookies, no query parameters.
A key is sk-tee-v1- plus 32 random bytes in base64url. The router stores its SHA-256 and the first 12 characters for display; the plaintext is shown exactly once, at creation.
Optional headers: X-Request-Id is echoed back; the response carries X-Confidential-Router-Generation-Id.
Paths
Method and path
Status
Notes
POST /v1/chat/completions
required
non-stream and stream: true
GET /v1/models
required
OpenAI list shape plus extension fields; only models within the key's scope
GET /v1/models/{id}
required
one model
POST /v1/completions
required
legacy text completions, same streaming rules; served for every model with a chat route
POST /v1/embeddings
optional
only when the model's capabilities include embeddings
GET /v1/generation?id=
required
the metering record of one generation, never any content
GET /v1/evidence
required
this deployment's latest published bundle, no key; see Evidence endpoints
GET /v1/evidence/{endpoint}
required
the same for a named endpoint, including a registered external upstream
GET /v1/invites/{code}
extension
what an invitation code grants; no key, rate-limited per source address
Request: the OpenAI schema. Honoured fields: model, messages, stream, stream_options.include_usage, max_tokens or max_completion_tokens, temperature, top_p, stop, n (1 only), seed, response_format, tools, tool_choice, user. Unknown fields are forwarded to the model backend unchanged. The router never inspects or stores messages.
Response: an OpenAI chat.completion object. id is the router's generation id (gen-<ulid>), model echoes the router model id, and usage is authoritative and extended:
The three extension fields live inside usage, where OpenAI SDKs ignore them:
Field
Meaning
cost_micros
What the generation cost, in integer micro-dollars, debited from the workspace balance
endpoint
The router endpoint that served it; an external endpoint's name for a model served elsewhere
evidence_digest
The digest the platform had published for that endpoint at generation time, null if none. A fact about publication, never a verdict
Streaming
Content-Type: text/event-stream, one data: <chat.completion.chunk> per event, a final usage-only chunk (empty choices) when stream_options.include_usage is true, then data: [DONE]. A comment line : ping is sent every 15 seconds while waiting for the first token. Chunks are forwarded as they arrive, with no buffering, through Gatekeeper as well.
An error after the stream started is sent as a last data: event carrying an error object, then [DONE].
[DONE] is where the generation ends for metering. A client that closes the connection after reading it has the whole answer and the row is ok. A client that leaves before it is metered aborted.
POST /v1/completions
The legacy route, and it works for every model this router serves chat on.
Request: model, prompt, and the generation parameters of the chat route. Response: a text_completion object, carrying choices[].text instead of choices[].message and the same extended usage. Streaming is the same SSE contract with text_completion chunks.
Two things get served under that one path, and which one you get depends on the model's backend rather than on anything you send:
The backend serves the legacy route itself. The request is forwarded verbatim. This is the only form in which suffix works, because the prompt reaches the model with no chat template around it.
The backend serves chat only. The router serves the route: your prompt becomes one user message, and the answer is translated back. Metering, rate limits, streaming and the usage extension are identical.
A model's capabilities list says completions either way. In the translated form, four legacy-only parameters answer 400 unsupported_parameter naming the parameter rather than being quietly ignored: suffix, echo, logprobs, and best_of greater than 1. An ignored suffix is the dangerous one, because it means prose written as if your file ended at the cursor, pasted into the middle of it. A prompt holding several strings, or token ids instead of text, is refused for the same reason a request with n greater than 1 is.
:::note
Until 2026-10-20 this route answered 400 for a model whose catalogue entry had not declared completions, which included production's. That broke the tools which use it for one feature and chat for another, the apply and autocomplete roles in Continue being the ones that showed up: the feature failed while chat kept working, which reads like the tool being broken rather than like one path being unsupported.
:::
capabilities is what the router actually does with this model, not what someone typed when registering it: it is derived from the model's backend, and the admission gate reads the same derivation, so a route is accepted exactly when it is listed here.
Value
Means
chat
POST /v1/chat/completions is accepted
completions
POST /v1/completions is accepted, forwarded or translated as described in the preceding section
embeddings
POST /v1/embeddings is accepted
tools
tools and tool_choice are forwarded untouched, and tool_calls deltas are relayed untouched. A fact about this surface, saying nothing about how well the model chooses tools
streaming
stream: true is honoured
A chat model therefore reads ["chat", "completions", "tools", "streaming"]. An embeddings-only model reads ["embeddings"], with no streaming: that route answers one JSON body whatever you asked for. It ignores stream: true rather than refusing it, so the value tells you what is honoured, not what is accepted. Before 2026-10-20 the field echoed the operator's declaration instead, so production advertised ["chat"] for a model that does native OpenAI tool calling, and a client that enables agent mode only for an advertised capability had nothing to go on.
pricing is micro-dollars per million tokens. endpoint.tee is read from the serving endpoint’s published evidence, not declared by the operator: it is one of a closed set of labels the platform’s own branch map defines, Intel TDX (Azure) on production today. It is null when the evidence names nothing this router recognises, and absent for a model served by an external upstream, because this router reads no evidence label for another deployment. None of these labels says anything about a GPU; see Deployment topology.
GET /v1/generation?id=gen-…
The Generation record for a generation owned by the key's workspace: tokens, cost, model, endpoint, timings and evidence_digest. Never any content.
Metering
Every accepted request creates one generation record at completion, or at abort with what was counted. Debit is prompt_tokens × prompt price + completion_tokens × completion price, per million tokens, rounded up to one micro-dollar, written as one ledger row. The meter is exact: the router asks the backend for usage on every stream and strips the extra chunk if you did not ask for it.
Compatibility promise
/v1 paths and response shapes are stable; extension fields only ever get added. A breaking change would be /v2.