Skip to content
GPT-6.1 Sol & Luna, Claude Opus 5.5, Sonnet 5.5, Haiku 5.5, and Gemini 4 Argon are now available

API reference

Chat completions

The primary endpoint for chat and agentic workloads.

POST/v1/chat/completions

Create a chat completion. OpenAI-compatible.

Request body

FieldTypeDescription
modelstringModel id from the catalog (required)
messagesarrayList of { role, content } messages (required)
streambooleanEnable SSE streaming
temperaturenumberOutput creativity
max_tokensnumberMaximum output tokens
toolsarrayFunction calling (OpenAI format)

Example

terminal.sh
curl https://api.sobatnetwork.com/v1/chat/completions \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $SOBAT_API_KEY" \
-d '{
"model": "sobat/gpt-6-sol",
"messages": [
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain caching in one sentence."}
],
"max_tokens": 200
}'

Response

response.json
{
"id": "chatcmpl-...",
"object": "chat.completion",
"model": "sobat/gpt-6-sol",
"choices": [
{
"index": 0,
"message": { "role": "assistant", "content": "..." },
"finish_reason": "stop"
}
],
"usage": {
"prompt_tokens": 120,
"completion_tokens": 48,
"total_tokens": 168
}
}