Chat Completions
POST /v1/chat/completions — the endpoint that serves every model.
POST https://chat.eterial.ai/v1/chat/completionsThe OpenAI Chat Completions endpoint, with the same request and response shapes. Everything below is in addition to what you already know from that API.
Headers
| Header | Required | Notes |
|---|---|---|
Authorization | yes | Bearer <key>. See Authentication. |
Content-Type | yes | application/json. |
Idempotency-Key | no | Makes the request replay-safe. Non-streamed requests only. |
Request fields
Two are required — model and messages. The rest of the OpenAI request is
accepted as you send it.
These are the fields that change how the request is handled here:
| Field | Effect |
|---|---|
model | The model id, from the catalogue. |
messages | The conversation, in the usual roles. |
stream | Switches to server-sent events. See Streaming. |
max_tokens | Caps the answer, and sets how much balance is reserved for the request. |
tools, tool_choice | See Tool calling. |
reasoning_effort | See Reasoning. |
response_format | See Structured outputs. |
Everything else is passed to the model as you sent it
Parameters this page does not list — temperature, top_p, seed,
logprobs, stop and the rest — reach the model unchanged. Whether a given
one is honoured is the model's business, so test the ones your code relies on.
See OpenAI compatibility.
Multimodal content
A message's content may be a plain string or a list of parts. Beyond text,
two part types are recognised:
image_url— an image, on models with theimage_inputcapability.fileorinput_file— a document, on models withpdf_input.
Sending either restricts the request to models that support it, and asking for
one the model does not have is a 400. Check
GET /v1/models first.
Response
The standard object: id, object, created, model, choices and usage.
usage carries the counts you are billed on:
{
"usage": {
"prompt_tokens": 1204,
"completion_tokens": 318,
"total_tokens": 1522,
"prompt_tokens_details": { "cached_tokens": 1024 },
"completion_tokens_details": { "reasoning_tokens": 96 }
}
}The details objects appear when the model reports them — see
Prompt caching and Reasoning
for what they cost.
Limits
- Request body: 8 MiB. Over it,
413. Inline images and documents are base64, which inflates them by about a third — 8 MiB of body is roughly 6 MiB of file. - A non-streamed request has five minutes to produce an answer, then
504. Streamed requests may run considerably longer.