Sozdai LogoDocs
Endpoints/LLM

Chat completions

Send chat requests to specified LLMs. The request format is fully compatible with OpenAI and can be used directly with OpenAI SDKs.

POSThttps://api.sozdai.ai/v1/chat/completions

#Authentication

All requests carry your API key in the Authorization header.

http
Authorization: Bearer sk-corr-...

#Request Parameters

ParameterTypeRequiredDescription
modelstringYesID of the model to use, e.g. gpt-4o
messagesarrayYesThe list of chat messages. Each message contains a role and content
streambooleanNo (default false)Whether to stream responses using Server-Sent Events
temperaturenumberNoSampling temperature between 0 and 2
max_tokensintegerNoThe maximum number of tokens to generate
reasoning_effortstringNoThe reasoning effort level (low/medium/high) for reasoning models

#Request Example

curl https://api.sozdai.ai/v1/chat/completions \
  -H "Authorization: Bearer $CORRY_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "claude-3-5-sonnet",
    "messages": [
      { "role": "user", "content": "Hello" }
    ],
    "stream": false
  }'

#Response Example

Returns a standard JSON object containing the model's generated response.

json
{
  "id": "chatcmpl-123",
  "object": "chat.completion",
  "created": 1700000000,
  "model": "claude-3-5-sonnet",
  "choices": [
    {
      "index": 0,
      "message": {
        "role": "assistant",
        "content": "Hello! How can I help you today?"
      },
      "finish_reason": "stop"
    }
  ],
  "usage": {
    "prompt_tokens": 10,
    "completion_tokens": 9,
    "total_tokens": 19
  }
}

Tip

You can click the 'Try it' button on any model detail page to launch the live Playground for debugging.