Nova API — /api/models
The operations Nova tags public under /api/models. Generated from reference-src/nova-openapi.json.
POST /api/models/{endpoint}/v1/chat/completions
Operation id model_proxy_chat: in Python client.call("model_proxy_chat", …), on the command line stardelt api model_proxy_chat.
The OpenAI chat-completions route — the endpoint, through the person.
The OpenAI chat-completions protocol, answered by the ModelEndpoint named in the path, on behalf of the signed-in caller. Point an OpenAI client's base URL at https://<nova>/api/models/<endpoint>/v1 and use the person's own Nova token as the API key: the budget and the audit then cover the agent's work. The caller must be signed in (401); the endpoint must exist (404), list the purpose agents (403) and its last probe must have found it reachable (503). The body must be a JSON object of at most 1 MiB (413); model is replaced by the endpoint's spec.model, max_tokens is capped at 4096 (absent means 4096), stream: true is refused with 400 (streaming is not supported yet; send stream: false), and messages, tools, tool_choice and response_format pass through unchanged. The person's or their group's model budget is checked before the call (429 as on /api/ask), and exactly one model_call row is written with feature: agent — the body's messages as its prompt, the answer's usage as its tokens, and ok, refused or error as its outcome. A 2xx answer passes through with its status; a non-2xx answer passes through with its status and its body cut to 2000 characters; no answer at all is a 502. The endpoint's URL and key never appear in an answer or a log line. Answers Cache-Control: no-store; streaming is not supported yet.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
endpoint | path | string | Yes | The ModelEndpoint's name |
Responses
| Code | Description |
|---|---|
200 | The endpoint's own answer, passed through |
400 | The body is not a JSON object, or it asks for stream: true |
401 | Not signed in |
403 | The endpoint does not list the purpose agents |
404 | No such model endpoint |
413 | The body is larger than 1 MiB |
429 | The person's or their group's model budget is spent |
502 | The model endpoint did not answer |
503 | No state store, no cluster connection, no HTTP client, or the endpoint is not reachable now |
GET /api/models/{endpoint}/v1/models
Operation id model_proxy_models: in Python client.call("model_proxy_models", …), on the command line stardelt api model_proxy_models.
The OpenAI model list for one endpoint.
The OpenAI model-list protocol for one ModelEndpoint: {"object":"list","data":[{"id":"<spec.model>","object":"model"}]}. A client that checks GET /v1/models before its first call reads this. The caller must be signed in (401); the endpoint must exist (404), list the purpose agents (403) and its last probe must have found it reachable (503), exactly as on the chat-completions route. The endpoint's URL and key never appear in the answer. Answers Cache-Control: no-store.
Parameters
| Name | In | Type | Required | Description |
|---|---|---|---|---|
endpoint | path | string | Yes | The ModelEndpoint's name |
Responses
| Code | Description |
|---|---|
200 | The endpoint's model in the OpenAI list shape |
401 | Not signed in |
403 | The endpoint does not list the purpose agents |
404 | No such model endpoint |
503 | No cluster connection, or the endpoint is not reachable now |