Eterial Docs
API reference

Chat Completions

POST /v1/chat/completions — the endpoint that serves every model.

POST https://chat.eterial.ai/v1/chat/completions

The 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

HeaderRequiredNotes
AuthorizationyesBearer <key>. See Authentication.
Content-Typeyesapplication/json.
Idempotency-KeynoMakes 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:

FieldEffect
modelThe model id, from the catalogue.
messagesThe conversation, in the usual roles.
streamSwitches to server-sent events. See Streaming.
max_tokensCaps the answer, and sets how much balance is reserved for the request.
tools, tool_choiceSee Tool calling.
reasoning_effortSee Reasoning.
response_formatSee 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 the image_input capability.
  • file or input_file — a document, on models with pdf_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.

On this page