Create Chat Completion
Creates a model response from conversation history with streaming, tools, and usage accounting.
ProtocolOpenAI Chat Completions
Reference category채팅
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
}'파라미터
| Name | 유형 | 필수 | Description |
|---|---|---|---|
model | string | 예 | 모델 이름 |
messages | array<object> | 예 | 채팅 |
temperature | number | 아니요 | Temperature |
top_p | number | 아니요 | Top P |
stream | boolean | 아니요 | 실시간 |
max_tokens | integer | 아니요 | Max tokens |
tools | array<object> | 아니요 | Tools |
response_format | object | 아니요 | Response format |
응답
| Name | 유형 | 필수 | Description |
|---|---|---|---|
id | string | - | ID |
object | string | - | Object |
created | integer | - | Created |
model | string | - | 모델 이름 |
choices | array<object> | - | Choices |
usage | object | - | Usage |
참고
- OpenAI Chat Completions
- Use the same request shape as the matching provider API when the backend channel is enabled.
Your applicationRouteKeyOpenAI