OpenAI Chat Format
POST /v1/chat/completions
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Required | - |
stream | boolean | Required | - |
messages | array<object> | Required | - |
messages[].role | string | Optional | - |
messages[].content | string | Optional | - |
extra_body | object | Optional | - |
extra_body.google | object | Required | - |
extra_body.google.image_config | object | Required | - |
contents | array<object> | Required | - |
contents[].role | string | Optional | - |
contents[].parts | array<object> | Optional | - |
contents[].parts[].text | string | Optional | - |
Request Example
{
"body": {
"model": "string",
"stream": true,
"messages": [
{}
],
"contents": [
{}
]
}
}
Response Fields(200)
| Field Name | Type | Description |
|---|---|---|
model | string | - |
stream | boolean | - |
messages | array<object> | - |
messages[].role | string | - |
messages[].content | string | - |
extra_body | object | - |
extra_body.google | object | - |
extra_body.google.image_config | object | - |
contents | array<object> | - |
contents[].role | string | - |
contents[].parts | array<object> | - |
contents[].parts[].text | string | - |