For the complete documentation index, see llms.txt. This page is also available as Markdown.

Chat

Create a chat completion

post

Sends a request for a model response for the given chat conversation. Supports both streaming and non-streaming modes.

Authorizations
AuthorizationstringRequired

API key as bearer token in Authorization header

Body
providerone of · nullableOptional

When multiple model providers are available, optionally indicate your routing preference.

routeone of · nullableOptional
string · enumOptionalPossible values:
userstringOptional
session_idstringOptional

A unique identifier for grouping related requests (e.g., a conversation or agent workflow) for observability. If provided in both the request body and the x-session-id header, the body value takes precedence. Maximum of 128 characters.

modelstringOptional
modelsstring[]Optional
frequency_penaltynumber · double · nullableOptional
logprobsboolean · nullableOptional
top_logprobsnumber · double · nullableOptional
max_completion_tokensnumber · double · nullableOptional
max_tokensnumber · double · nullableOptional
presence_penaltynumber · double · nullableOptional
response_formatone ofOptional
or
or
or
or
seedinteger · nullableOptional
stopone of · nullableOptional
stringOptional
or
string[]Optional
streambooleanOptionalDefault: false
stream_optionsone of · nullableOptional
temperaturenumber · double · nullableOptionalDefault: 1
tool_choiceone ofOptional
string · enumOptionalPossible values:
or
top_pnumber · double · nullableOptionalDefault: 1
Responses
200

Successful chat completion response

application/json
idstringRequired
creatednumber · doubleRequired
modelstringRequired
objectstring · enumRequiredPossible values:
system_fingerprintstring · nullableOptional
post/chat/completions

Last updated

Was this helpful?