OpenAI-compatible API
SAALT exposes an OpenAI-compatible API so you can reuse existing OpenAI SDKs and tooling. Point any OpenAI client at the SAALT base URL, authenticate with your SAALT API key, and call chat/completions, embeddings, and models as you would against OpenAI.
Base URL
Code
Set this as the baseURL of your OpenAI client. This is separate from the core REST API (which lives under /api/v1/core, documented in the API Reference).
Authentication
Authenticate with your SAALT API key using either header:
Authorization: Bearer <key>x-api-key: <key>
Create and scope keys in the SAALT dashboard under Developer Settings, the same as for the core API.
Errors are returned in the OpenAI error envelope:
Code
Raw model gateway, not agent chat
This API is a raw model gateway, not an Agent conversation endpoint. No Agent system prompt, knowledge, tools, or memory are applied to your requests — the input is sent straight to the model. If you need Agent behavior (retrieval, tools, conversation state), use the core conversation endpoint instead.
The model field must be the id of a model configured in your SAALT instance. Retrieve the available ids from the GET /models endpoint below. An unknown model id returns 404 with code model_not_found.
POST /chat/completions
Create a chat completion.
Request
| Field | Type | Notes |
|---|---|---|
model | string | Required. A configured model id (see GET /models). |
messages | array | Required. OpenAI-style chat messages. |
temperature | number | Optional. |
top_p | number | Optional. |
max_completion_tokens | number | Optional. Takes precedence over max_tokens when both are sent. |
max_tokens | number | Optional. Legacy alias for max_completion_tokens. |
stop | string | string[] | Optional. |
seed | number | Optional. |
frequency_penalty | number | Optional. |
presence_penalty | number | Optional. |
tools | array | Optional. OpenAI tool definitions. |
tool_choice | string | object | Optional. |
stream | boolean | Optional. Stream the response as Server-Sent Events. |
stream_options.include_usage | boolean | Optional. Include a final usage chunk when streaming. |
Not supported: n, logprobs, response_format, logit_bias.
Response
For a non-streaming request, the response is a standard chat.completion object with choices[].message and a usage object.
When stream is true, the response is a Server-Sent Events stream of chat.completion.chunk objects (each carrying a choices[].delta), terminated by a final data: [DONE] line.
Errors
404(model_not_found) — the requestedmodelis not configured.429(type: "rate_limit_error",code: "usage_limit_exceeded") — the API key's usage limit has been exceeded.
Example — curl
Code
Example — OpenAI Node SDK
Code
POST /embeddings
Create embeddings for one or more inputs.
Request
| Field | Type | Notes |
|---|---|---|
model | string | Required. Must be a configured embedding model id. |
input | string | string[] | Required. Up to 2048 inputs. |
encoding_format | "float" | "base64" | Optional. |
dimensions | number | Optional. Truncates each returned vector to this length. |
Response
Code
Errors
404— the requestedmodelis not configured.400— more than 2048 inputs were supplied.
Example — curl
Code
GET /models
List the configured chat and embedding models.
Response
Code
Example — curl
Code
This gateway is documented here in prose only. The canonical REST reference at /docs/core-api covers the core API and does not include the OpenAI-compatible endpoints.