API reference
OneNexus’s OpenAI-compatible chat-completions API works only when a request’s base URL and model value belong to the same serving surface, and its API key is authorized for it.
For a guided first request, use the Platform quickstart or Call a self-hosted model endpoint.
Choose the correct serving surface
Section titled “Choose the correct serving surface”| Surface | Base URL | API key | Request model |
|---|---|---|---|
| Hosted Platform catalog | https://catalog.onenexus-do.cloud/v1 | Platform | Exact model value in the expanded row’s cURL request |
| Tenant self-hosted models | Copy the tenant Endpoint shown on a model detail page and append /v1 | Inference authorizing the selected model’s Served Model Name | Exact Served Model Name configured on that model |
Do not mix a host and model value from different rows; a valid key sent to a host it cannot access can still be refused.
Authentication
Section titled “Authentication”Send the key as a bearer token on every request:
Authorization: Bearer <your-api-key>Create keys in API Keys → Generate API key.
| Key type | Scope |
|---|---|
| Platform | Every published Platform catalog model, including models added later. It cannot call tenant self-hosted models and cannot be narrowed to one model. |
| Inference | The Served Model Names of the models selected when the key was created. A replacement in the same tenant that continues using one of those Served Model Names shares access. Other Served Model Names and the shared catalog are refused. |
Use a Platform key for the shared catalog and an Inference key scoped to the required Served Model Names for self-hosted models. Deleting a model does not revoke a key; revoke the credential explicitly when its Served Model Names should no longer be authorized.
The secret is shown only once, so give each application and environment its own expiring key, keep it in a server-side secret store or protected environment variable, and never send it to support.
Revocation is immediate and cannot be undone. Rotate: create a replacement, update the application’s secret configuration, verify a non-sensitive request, then revoke the old key.
Model names
Section titled “Model names”The Console is the authority for the string sent as model:
- Platform catalog: open Platform models, expand a row, and copy the JSON
modelvalue from its cURL request. Do not substitute the Public model ID column; that is the catalog and billing identity, while routing uses the generated request’s model value. - Self-hosted model: open the model and copy its Served Model Name. The Copy as cURL tab combines it with the correct endpoint and path.
The catalog host does not currently expose GET /v1/models; that path returns 404. Discover Platform models in the Console instead.
Chat completions
Section titled “Chat completions”Send POST /v1/chat/completions relative to the selected base URL:
{ "model": "<model-value-from-generated-curl>", "messages": [ { "role": "user", "content": "Hello" } ], "max_tokens": 512, "temperature": 0.7, "stream": false}A non-streaming Chat Completions response contains a choices array; read final text, when present, from choices[0].message.content:
{ "choices": [ { "message": { "role": "assistant", "content": "Hello!" } } ]}A 2xx response can have empty final text when the model returns reasoning without a final answer; treat transport/API success separately from application-level final-answer success, and inspect the complete response before deciding to retry. Other response fields can vary by model and serving engine; do not make application logic depend on an undocumented field.
Set stream to true for a server-sent event stream. If a stream has emitted data and then fails, do not automatically replay the whole request; a replay can duplicate work or output.
Errors and retries
Section titled “Errors and retries”| Status | Meaning | Action |
|---|---|---|
Validation 4xx | The request body contains unsupported or malformed data | Fix the request; do not retry unchanged |
401 | No credential was presented, or the Authorization header is malformed | Send Authorization: Bearer <key> |
403 | The credential was refused because of its type, tenant, expiry, revocation state, Served Model Name scope, host, or model name | Recheck the full base URL + key type + model tuple; do not retry unchanged |
404 | The URL or route does not exist | Correct the URL or path; do not treat it as a transient model error |
429 | The authenticated request-rate ceiling was reached | Retry a bounded number of times with exponential backoff and jitter |
503 | The serving path is temporarily unavailable | Retry a bounded number of times; inspect the model’s health if it persists |
GPU quota shown under Quotas is a control-plane admission limit for GPU-backed resources. A data-plane 429 is a separate request-rate response; it is not evidence that you need more GPU quota.
Support context
Section titled “Support context”When escalating, include the serving surface, endpoint, model name, UTC timestamp, HTTP status, and request identifier if the response provides one. Never include an API key or sensitive prompt content.