API reference
The OpenAI-compatible chat completions endpoint — identical request and response shape regardless of upstream provider.
The gateway exposes an OpenAI Chat Completions endpoint. Send the standard OpenAI body; the response comes back in OpenAI shape even when the upstream is Anthropic.
Base: https://api.cloud.nevtan.com/api/v1POST
/gateway/v1/chat/completionsRoute a chat request to the hosted provider named in `model`.Parameters
| Parameter | Type | Description |
|---|---|---|
modelrequired | string | A provider/model id from the catalog, e.g. anthropic/claude-sonnet-5. |
messagesrequired | array | Conversation as {role, content} objects (system, user, assistant). |
max_tokens | integer | Max tokens to generate. Required by Anthropic models; defaulted when omitted. |
temperature | number | Sampling temperature, 0–2. |
Example
The response is a standard OpenAI chat.completion object with choices[0].message.content and a usage block (prompt_tokens, completion_tokens, total_tokens).
Errors
A missing BYOK key returns
402 with a message pointing you to Bring Your Own Key. Upstream provider errors are surfaced as 502 with the provider’s own error text. See Errors.