Sociaro Docs
View Markdown

Chat and completions

POST /v1/chat/completions accepts OpenAI-compatible chat requests. Set the SDK base URL to https://api.sociaro.com/v1 and authenticate with a Sociaro API key.

Send a request

Send a chat model ID and a messages array. The examples below use minimax/minimax-m3. Replace it with the ID of the chat model you want to call.

curl https://api.sociaro.com/v1/chat/completions \
  -H "Authorization: Bearer $SOCIARO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
        "model": "minimax/minimax-m3",
        "messages": [{"role": "user", "content": "Explain a hash join in two sentences."}]
      }'

The same request with the OpenAI Python SDK:

from openai import OpenAI

client = OpenAI(api_key="sk-...", base_url="https://api.sociaro.com/v1")

reply = client.chat.completions.create(
    model="minimax/minimax-m3",
    messages=[{"role": "user", "content": "Explain a hash join in two sentences."}],
)
print(reply.choices[0].message.content)

Streaming

Set stream to true to receive server-sent events as the response is generated. In the Python SDK, iterate over the stream and read choices[0].delta.content when present.

Model discovery

Use GET /v1/models to discover model IDs for your API key. The catalogue documents each model's parameters and public rates. Send the exact model ID, including its prefix.

Request parameters

Parameter support depends on the selected model. For example, check support for temperature, top_p, max_tokens, tools and response_format before including them.