Skip to content

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

ItemValue
MethodPOST
Path/v1/chat/completions
Content-Typeapplication/json
AuthenticationAuthorization: Bearer YOUR_API_KEY

Request Parameters

ParameterTypeRequiredDescription
modelstringYesRequested model.
messagesarrayYesOpenAI Chat Completions message array.
streambooleanNoWhether to stream the response.
temperaturenumberNoSampling temperature, forwarded when supported upstream.
max_tokensintegerNoMaximum 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/completions

This path points to the same gateway capability as /v1/chat/completions.