Generate chat-based completions using the specified model.
| Parameter | Type | Required | Description |
|---|---|---|---|
| Authorization | string | Yes | Bearer authentication header of the form Bearer <token> where <token> is your API key |
| Parameter | Type | Required | Description |
|---|---|---|---|
| model | string | Yes | Model identifier (deployment name, adapter name, or routing) |
| messages | array | Yes | Array of message objects forming the conversation |
| temperature | float | No | Sampling temperature (0.0 to 2.0). Default: model default |
| max_tokens | integer | No | Maximum tokens to generate. Default: model default |
| max_completion_tokens | integer | No | Maximum tokens to generate (alternative to max_tokens) |
| top_p | float | No | Nucleus sampling parameter (0.0 to 1.0). Default: 1.0 |
| frequency_penalty | float | No | Penalize tokens based on frequency (-2.0 to 2.0). Default: 0.0 |
| presence_penalty | float | No | Penalize tokens based on presence (-2.0 to 2.0). Default: 0.0 |
| repetition_penalty | float | No | Penalize token repetition (> 0.0). Default: 1.0 |
| stream | boolean | No | Enable streaming response. Default: false |
| stream_options | object | No | Streaming options (e.g., {"include_usage": true}) |
| n | integer | No | Number of chat completion choices to generate. Default: 1 |
| stop | string or array | No | Up to 4 sequences where the API will stop generating |
| response_format | object | No | Response format specification (e.g., {"type": "json_object"}) |
| seed | integer | No | Random seed for deterministic sampling |
| logprobs | boolean | No | Include log probabilities in response. Default: false |
| top_logprobs | integer | No | Number of most likely tokens to return (0-20) |
| logit_bias | object | No | Modify likelihood of specified tokens appearing |
| tools | array | No | Available tool/function definitions |
| tool_choice | string or object | No | Tool selection strategy. Options: auto, none, required, or specific tool |
| parallel_tool_calls | boolean | No | Allow parallel tool calls. Default: true |
| user | string | No | Unique identifier representing your end-user |