Create chat completions using any supported model.
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer your_api_key |
Content-Type | Yes | application/json |
claude-sonnet-4-5, gpt-4o, gemini-2.5-pro). See Supported Models for the full list.role (string): One of system, user, or assistantcontent (string): The message contenttrue, responses are streamed back as Server-Sent Events (SSE).| Field | Type | Description |
|---|---|---|
id | string | Unique identifier for the completion |
object | string | Always chat.completion |
created | integer | Unix timestamp of creation |
model | string | The model used |
choices | array | Array of completion choices |
choices[].message | object | The generated message |
choices[].finish_reason | string | stop, length, or content_filter |
usage | object | Token usage statistics |
"stream": true to receive Server-Sent Events (SSE) as the model generates tokens.
data: :