Chat Completions
POST
/v1/chat/completions
const url = 'https://example.com/v1/chat/completions';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"model":"example","messages":[{"role":"example","content":"example"}],"stream":false,"reasoning":"turbo"}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://example.com/v1/chat/completions \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "model": "example", "messages": [ { "role": "example", "content": "example" } ], "stream": false, "reasoning": "turbo" }'Authorizations
Section titled “Authorizations”Request Bodyrequired
Section titled “Request Bodyrequired”Media typeapplication/json
ChatCompletionRequest
OpenAI chat-completions-compatible; unknown fields pass through to the underlying model.
model accepts a catalogue tag (llm_models.tags) or "auto".
reasoning is a Nairon-specific extension consulted only when
model == "auto" — not passed through to the model.
object
model
required
Model
string
messages
required
Messages
Array<object>
ChatMessageA single OpenAI chat message. content may be a string or a list of
content-part objects (image/audio parts) — kept as Any and forwarded
verbatim rather than re-modeled.
object
role
required
Role
string
content
Content
key
additional properties
any
stream
Stream
boolean
key
additional properties
any
Responses
Section titled “Responses”Successful Response
Media typeapplication/json
Examplegenerated
exampleValidation Error
Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationErrorobject
loc
required
Location
Array
msg
required
Message
string
type
required
Error Type
string
input
Input
ctx
Context
object
Examplegenerated
{ "detail": [ { "loc": [ "example" ], "msg": "example", "type": "example", "input": "example", "ctx": {} } ]}