Chat and completions
The OpenAI-compatible door. If your code already talks to OpenAI, change two things — the base URL and the key — and it talks to us.
Calling it
curl https://api.sociaro.com/v1/chat/completions \
-H "Authorization: Bearer $SOCIARO_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "anthropic/claude-sonnet-5",
"messages": [{"role": "user", "content": "Explain a hash join in two sentences."}]
}'
With the OpenAI Python library:
from openai import OpenAI
client = OpenAI(api_key="sk-...", base_url="https://api.sociaro.com/v1")
reply = client.chat.completions.create(
model="anthropic/claude-sonnet-5",
messages=[{"role": "user", "content": "Explain a hash join in two sentences."}],
)
print(reply.choices[0].message.content)
Streaming
Set "stream": true and read server-sent events, exactly as you would from OpenAI. Long generations
are safer streamed: a connection that produces nothing for a long time can be cut by the network
between us, and a stream keeps it alive by having something to say.
Which models
GET /v1/models lists what your key may reach. The catalogue has every model with its
parameters and what it costs.
Names read as vendor, then a slash, then the model — and the vendor is the one who made it, not whoever we happen to buy it through.
What we pass through
Standard parameters — temperature, top_p, max_tokens, tools, response_format — go to the
model unchanged. A parameter a model does not support is refused rather than silently dropped, so a
request that returns is a request that was understood.