Chat Completions
Generate chat completions with text and tool calls.
Work in progress
OpenAPI specification and detailed schema documentation coming soon.
Endpoint
POST /v1/chat/completionsRequest body
| Field | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Model identifier |
messages | array | Yes | Conversation messages |
stream | boolean | No | Enable streaming |
max_tokens | integer | No | Maximum tokens to generate |
temperature | float | No | Sampling temperature (0-2) |
tools | array | No | Tool definitions |
See Parameters for complete parameter reference.
Response
{
"id": "chatcmpl-...",
"object": "chat.completion",
"created": 1234567890,
"model": "gpt-4o",
"choices": [
{
"index": 0,
"message": {
"role": "assistant",
"content": "Hello! How can I help you today?"
},
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 10,
"completion_tokens": 15,
"total_tokens": 25
}
}How is this guide?
Last updated on
