Chat completions
Use POST /v1/chat/completions for chat, assistant workflows, and server-side app integrations. The endpoint supports non-streaming JSON responses and Server-Sent Events streaming.
Request
{
"model": "mistral-small-latest",
"messages": [
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Write a haiku about Amsterdam."}
],
"temperature": 0.7,
"stream": false
}
Response
{
"id": "chatcmpl-abc123",
"object": "chat.completion",
"created": 1717200000,
"model": "mistral-small-latest",
"choices": [{
"index": 0,
"message": {"role": "assistant", "content": "Canals under grey skies..."},
"finish_reason": "stop"
}],
"usage": {"prompt_tokens": 18, "completion_tokens": 25, "total_tokens": 43}
}
Supported request fields
model- required unless supplied by a preset. Must be a chat-capable model from/v1/models.messages- required OpenAI-style message list.temperature,top_p,max_tokens,frequency_penalty,presence_penalty,stop,seed- forwarded where supported by the provider.stream- set totruefor SSE streaming.presetorX-Preset- apply saved defaults from your account.
Model validation
Unknown models, wrong-modality models, unpriced models, or models without a configured provider are rejected before any upstream provider call. This prevents accidental routing to unsupported or unpriced infrastructure.