Sozdai LogoDocs

Quickstart

Integrate in minutes — fully OpenAI-compatible, just change one base_url.

#Overview

The API is fully OpenAI-compatible. Point any OpenAI SDK or tool's base_url to the address below and send your key in the header to call any available model.

Base URL: https://api.sozdai.ai/v1

#3-Step Quickstart Guide

1

Get your API key

Create a secure API key in the console to authorize requests. Keep your key confidential.

API Keys

API keys are created inside the **API 密钥 (API Keys)** section. All keys start with `sk-corr-`.
2

Configure authorization headers

Include the API key in the request headers for authorization:

http
Authorization: Bearer sk-corr-...
3

Send your first request

Point the API client to the Base URL and invoke the completion endpoint:

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

#Streaming

Set stream: true to receive tokens incrementally in OpenAI format, terminated by data: [DONE].

python
resp = client.chat.completions.create(
    model="claude-sonnet-4-6",
    messages=[{"role": "user", "content": "Hello"}],
    stream=True,
)
for chunk in resp:
    print(chunk.choices[0].delta.content or "", end="")

#Parameters

The request body matches OpenAI. Common parameters are listed below; other OpenAI fields are also supported:

ParameterTypeDescription
streambooleanStream the response (SSE)
max_tokensintegerMax tokens to generate
temperaturenumberSampling temperature, 0–2
toolsarrayFunction calling (tools)
stopstring[]Stop sequences
reasoning_effortstringEnable thinking: low / medium / high

#Error codes

Errors return a standard error object (with message and type fields). Common status codes:

StatusMeaning
401Invalid or missing key
402Insufficient balance
404The requested model does not exist or is unavailable
429Rate limited — retry shortly
502Service temporarily unavailable, please retry