The Zalthar API is compatible with the OpenAI API. Point any OpenAI SDK at the Zalthar base URL, use a Zalthar API key, and pass a Zalthar model slug.
Base URL
https://api.zalthar.com/v1
Endpoints
| Method | Path | Description |
|---|---|---|
POST |
/v1/chat/completions |
Generate a reply to a conversation. |
POST |
/v1/completions |
Continue a text prompt. |
POST |
/v1/responses |
The Responses API. |
POST |
/v1/decisions |
Ask a decision model typed questions. |
GET |
/v1/models |
List the models your key can use. |
GET |
/v1/models/{model} |
Get one model. |
Requests
- Send JSON with
Content-Type: application/json. The maximum request body is 32 MiB. - Authenticate with
Authorization: Bearer <key>. See Authentication. - The API is meant to be called from servers. It does not send CORS headers, so calls from a browser are blocked. Never put an API key in front-end code.
Responses
Responses follow the OpenAI shape. A few fields are set by Zalthar:
modelis the slug you called.- IDs are prefixed
chatcmpl-,cmpl-,resp_ordec_. system_fingerprintisfp_zalthar.usage.cost, when present, is what the request cost you in USD.
Every response carries an x-request-id header (req_…). Include it when you contact support.
SDKs
There is no separate SDK: use the official OpenAI libraries and change the base URL.
pip install openai
npm install openai
