Chat completions
The one endpoint you need.
POST /v1/chat/completions
| Parameter | Type | Required |
|---|---|---|
| model | string | Yes |
| messages | array | Yes |
| stream | boolean | No |
| temperature | number | No |
| max_tokens | integer | No |
| top_p | number | No |
Set stream: true to receive server-sent events (SSE), token by token.