API Reference
POST /v1/chat/completions
OpenAI-compatible chat completions, non-streaming and SSE; requests run as-is in the official OpenAI format.
Request
curl https://api.unioapi.com/v1/chat/completions \
-H "Authorization: Bearer $UNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"messages": [{"role": "user", "content": "Hello"}],
"stream": false
}'Key parameters
| Parameter | Type | Notes |
|---|---|---|
model | string, required | Model identifier (see GET /v1/models); echoed in responses |
messages | array, required | OpenAI-shaped message list |
stream | boolean | SSE output ending with [DONE]; see Streaming |
service_tier | string | Service tier; see Service Tiers |
Use the Chat Completions format for OpenAI models. The response echoes the requested model identifier.
service_tier
| Request value | Tier |
|---|---|
default | Standard |
omitted, null, auto | Automatic; uses Standard when Fast is not enabled |
fast, priority | Fast |
flex | Flex |
ultrafast | Only with compatible translation to Responses; prefer Responses |
- Native Chat Completions does not send
ultrafast. If no OpenAI Fast or Ultrafast route is available, the gateway falls back to Standard on the same model before dispatch. Use Responses for Ultrafast. - Invalid values and unsupported Flex requests still return a
service_tierparameter error. - The response includes the reported
service_tierwhen available. Fast and Ultrafast are billed at the dispatch tier, shown in the console request record.
Responses-only models
gpt-5.5-pro, gpt-5.4-pro and gpt-5.2-pro can only be called through
POST /v1/responses. Calling them through Chat Completions returns the same
error as the official API:
{
"error": {
"message": "This model is only supported in v1/responses and not in v1/chat/completions.",
"type": "invalid_request_error",
"param": "model",
"code": null
}
}The HTTP status is 404. The endpoints each model offers are in endpoint_capabilities of
GET /v1/models; see Choose a Protocol for
how the two endpoints differ.
Response (excerpt)
{
"model": "gpt-5.6-sol",
"choices": [
{
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 8,
"completion_tokens": 21,
"prompt_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 }
},
"service_tier": "default"
}Caching usage fields are described in Caching & TTL.
Limits
- Request body limit is 256 MiB (413 beyond);
Content-Typemust beapplication/json(or absent), otherwise 415. - See Errors for error codes.