Chat completions
Create a model response from a list of messages.
The Chat Completions endpoint generates a model response from an ordered list of messages. This page uses a non-streaming text request.
Request endpoint
POST https://api.vergora.ai/v1/chat/completionsInclude the following headers:
Authorization: Bearer YOUR_VERGORA_API_KEY
Content-Type: application/jsonRequest body
{
"model": "gpt-5.6-sol",
"messages": [
{
"role": "user",
"content": "Explain a unified model API concisely."
}
],
"stream": false
}Common fields
| Field | Required | Description |
|---|---|---|
model | Yes | A Model ID copied from the model catalog |
messages | Yes | An ordered array of conversation messages |
messages[].role | Yes | The message role; available roles depend on the model |
messages[].content | Yes | Text or another content structure supported by the model |
temperature | No | Controls sampling; range and default depend on the model |
max_tokens | No | Output limit; field support depends on the model |
stream | No | Whether to return a streaming response |
Do not send optional parameters that the selected model does not support. For the first test, use only required fields and stream: false.
Read the response
{
"id": "example-response-id",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "This is an example response."
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 30,
"completion_tokens": 20,
"total_tokens": 50
}
}The generated text is typically available at choices[0].message.content. Check finish_reason, and use usage to review input and output usage. These fields illustrate a compatible structure; use the actual API response as the source of truth.
Multi-turn conversations
Include the required conversation history in order with each new request. Control history length to avoid repeated content or exceeding the model context limit. When content is sensitive, send only what the task requires.
For incremental output, continue to Streaming.