Chat Models¶
Request and response schemas for the chat completion endpoint.
ChatCompletionRequest¶
A chat completion request.
| Field | Type | Required | Description |
|---|---|---|---|
model |
string |
Yes | Name of the MATVIS model configuration to use. |
messages |
ChatMessage[] |
Yes | The messages in the conversation. |
ChatMessage¶
A single message within messages. Additional OpenAI fields (tool_calls, tool_call_id, ...) are accepted and passed through.
| Field | Type | Required | Description |
|---|---|---|---|
role |
string |
Yes | One of system, user, assistant or tool. |
content |
string \| ContentPart[] \| null |
No | A plain string, or a list of content parts for multimodal input. May be null for tool-call messages. |
Content parts¶
When content is a list (multimodal input), each item is one of:
| Part | Field | Type | Required | Description |
|---|---|---|---|---|
| Text | type |
string |
Yes | "text". |
| Text | text |
string |
Yes | The text content. |
| Image | type |
string |
Yes | "image_url". |
| Image | image_url |
object |
Yes | { "url": string } an image URL or data: URI. |
ChatCompletionResponse¶
| Field | Type | Description |
|---|---|---|
id |
string |
Completion identifier. |
model |
string |
Model used for the completion. |
choices |
object[] |
Generated completion choices. |