OpenAI-compatible
POST
/v1/chat/completions/v1/chat/completions
| Field | Type | Description |
|---|---|---|
| model | string · required | A model id from GET /v1/models. |
| messages | array · required | Chat messages, each { role, content }. |
| max_tokens | integer | Max output tokens. Reasoning models spend their thinking inside this budget — set it too low and you get a `200` with empty content (see [Errors](/docs/errors)). |
| temperature | number | Sampling temperature, 0–2. |
| stream | boolean | Stream the response as SSE chunks. |
| tools | array | Tool/function definitions (OpenAI tool schema). |