Chat Completions
/v1/chat/completions is the OpenAI Chat Completions compatible entrypoint. OpenAI groups use the OpenAI-compatible path; other groups are converted by the gateway when supported.
Interface
| Item | Value |
|---|---|
| Method | POST |
| Path | /v1/chat/completions |
| Content-Type | application/json |
| Authentication | Authorization: Bearer YOUR_API_KEY |
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | Requested model. |
messages | array | Yes | OpenAI Chat Completions message array. |
stream | boolean | No | Whether to stream the response. |
temperature | number | No | Sampling temperature, forwarded when supported upstream. |
max_tokens | integer | No | Maximum output tokens, forwarded when supported upstream. |
Request Example
bash
curl https://llmapi.site/v1/chat/completions \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"model": "gpt-5.1",
"messages": [
{ "role": "user", "content": "Hello" }
]
}'Compatible Path
Some clients use the path without /v1:
text
POST /chat/completionsThis path points to the same gateway capability as /v1/chat/completions.