Parameters
Core Parameters
| Parameter | Type | Required | Default | Range | Description |
|---|---|---|---|---|---|
stream | bool | ✅ | false | - | |
model | string | ✅ | - | - | Model ID used to generate the response |
messages | array | ✅ | [{'role': 'user', 'content': 'Who are you?'}] | role list:userassistantsystemdeveloper | Array of message objects for the conversation. Each message must have a role (user or assistant) and content. |
Messages Array Structure
Each message object in themessages array should have the following structure:
| Field | Type | Required | Description |
|---|---|---|---|
role | string | ✅ | The role of the message. Can be: user, assistant, system, or developer |
content | array | ✅ | The content of the message |
Content Array Structure
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
type | string | ✅ | text | The type of content |
text | string | ✅ | Hello, who are you! | The text content when type is text |