Text to Text
| Parameter | Type | Required | Default | Description |
|---|---|---|---|---|
model | string | ✅ Yes | claude-3-5-haiku-20241022 | The model to use for the request. claude-3-5-haiku-20241022 |
messages | array | ✅ Yes | - | Array of message objects for the conversation * role:user,The role of the message. * role:assistant,The role of the message. * role:system,The role of the message. |
content | array | ✅ Yes | - | text |
text | string | ✅ Yes | - | * type:text,The positive prompt for the generation. |
stream | boolean | ❌ No | true | Whether to stream the response |
messages array should have the following structure:
| Field | Type | Required | Description |
|---|---|---|---|
role | string | ✅ Yes | The role of the message. Can be: user, assistant, or system |
content | array/string | ✅ Yes | The content of the message |
| Field | Type | Required | Example | Description |
|---|---|---|---|---|
type | string | ✅ Yes | text | The type of content |
text | string | ✅ Yes | "The positive prompt for the generation." | The text content when type is text |