Skip to content

Chat Completions

POST
/v1/chat/completions
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" }'
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>
ChatMessage

A 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
reasoning
Any of:
string
Allowed values: turbo fast balanced smart
key
additional properties
any

Successful Response

Media typeapplication/json
Examplegenerated
example

Validation Error

Media typeapplication/json
HTTPValidationError
object
detail
Detail
Array<object>
ValidationError
object
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": {}
}
]
}