SDK & Examples
curl
Minimal calls for the four public endpoints.
The examples below assume UNIO_API_KEY is exported.
Chat Completions
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"}]
}'Responses
curl https://api.unioapi.com/v1/responses \
-H "Authorization: Bearer $UNIO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "gpt-5.6-sol",
"input": "Hello"
}'Messages (Anthropic-compatible)
curl https://api.unioapi.com/v1/messages \
-H "x-api-key: $UNIO_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{
"model": "claude-sonnet-5",
"max_tokens": 1024,
"messages": [{"role": "user", "content": "Hello"}]
}'Models
curl https://api.unioapi.com/v1/models \
-H "Authorization: Bearer $UNIO_API_KEY"Filter by capability (multiple values are AND-ed):
curl "https://api.unioapi.com/v1/models?capability=tools" \
-H "Authorization: Bearer $UNIO_API_KEY"Troubleshooting tip
Every response carries an X-Request-ID header; include it when contacting support.
See Errors.