POST
/v1/chat/completionsCreate chat completion
Generates a model response from a conversational message list — fields and streaming semantics are defined for Rodium’s API.
Request body parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Required | Provider-scoped model id (e.g. openai/gpt-4o, anthropic/claude-3-5-sonnet). Use GET /v1/models or the Models page to list all ids. |
| messages | array | Required | Array of message objects with role and content fields |
| max_tokens | integer | Optional | Maximum tokens to generate. Defaults to model maximum. |
| temperature | number | Optional | Sampling temperature between 0 and 2. Higher = more random. |
| top_p | number | Optional | Nucleus sampling probability mass. Between 0 and 1. |
| stream | boolean | Optional | If true, stream partial deltas as Server-Sent Events. |
| stop | string | array | Optional | Sequences where the API will stop generating tokens. |
OpenAI SDK mode (Python, JavaScript)
…Shell:
…Example request JSON
…Example response JSON
…Streamed deltas → Streaming reference