LLM API

Run deterministic utility chat completion

Runs the selected model over a chat transcript and returns an assistant message. Tokenizer-backed utility chat remains deterministic, while configured provider-backed models are routed through the provider service when advertised in GET /v1/models.

post/v1/chat/completions

Request

  • Base URL: https://api.algenta.ai
  • URL: https://api.algenta.ai/v1/chat/completions
  • Auth: one of:
    • HTTP bearer
    • API key in header X-API-Key

Request body

modelstring

Chat-capable utility model identifier from GET /v1/models.

streamboolean

When true, return Server-Sent Events with deterministic completion chunks.

parallel_tool_callsboolean nullable

Hint to allow/disallow multiple tool calls in one turn. Best-effort: honored where the provider's API exposes an equivalent knob, otherwise ignored.

max_tokensinteger nullable

Maximum tokens to generate. Applies to algenta_local backend models (default 256) and forwarded providers that accept an output budget; ignored otherwise.

temperaturenumber nullable

Sampling temperature. Applies to algenta_local backend models: 0 or omitted is greedy (argmax), > 0 draws from the model distribution. Remote providers use their server-side defaults.

top_pnumber nullable

Nucleus sampling threshold for algenta_local backend models. Remote providers use their server-side defaults.

seedinteger nullable

Sampling seed for algenta_local backend models: same prompt + parameters + seed reproduce the identical completion. Remote providers use their server-side defaults.

Response

JSON chat completion by default, or Server-Sent Events chunks when stream=true.

idstring required
object'chat.completion'
modelstring required
provider_backendstring nullable

Concrete provider backend that served this chat completion when routed.

provider_model_idstring nullable

Concrete configured provider model that served this chat completion when routed.

Changes

No recorded changes to this operation across all 1 revision of this API.