Create Chat Completion
Creates a model response from conversation history with streaming, tools, and usage accounting.
ProtocolOpenAI Chat Completions
Reference categoryChat
Compatible model examples
gpt-4ogpt-4.1gpt-5o3o4-mini
Keep the format. Choose your model.
curl -X POST https://api.routekey.ai/v1/chat/completions \
-H "Authorization: Bearer sk-your-key" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-4o",
"messages": [
{
"role": "user",
"content": "Hello from Route Key"
}
],
"stream": false
}'Tham so
| Name | Kieu | Bat buoc | Description |
|---|---|---|---|
model | string | Co | Ten mo hinh |
messages | array<object> | Co | Chat |
temperature | number | Khong | Temperature |
top_p | number | Khong | Top P |
stream | boolean | Khong | Thoi gian thuc |
max_tokens | integer | Khong | Max tokens |
tools | array<object> | Khong | Tools |
response_format | object | Khong | Response format |
Phan hoi
| Name | Kieu | Bat buoc | Description |
|---|---|---|---|
id | string | - | ID |
object | string | - | Object |
created | integer | - | Created |
model | string | - | Ten mo hinh |
choices | array<object> | - | Choices |
usage | object | - | Usage |
Ghi chu
- OpenAI Chat Completions
- Use the same request shape as the matching provider API when the backend channel is enabled.
Your applicationRouteKeyOpenAI