Quickstart
Integrate in minutes — fully OpenAI-compatible, just change one base_url.
LLM Chat completions
Call leading models like Claude, GPT-4, and DeepSeek via a single OpenAI-compatible API endpoint.
Media generation
Submit asynchronous media generation tasks for image, video, and music models with simple polling.
Prompt caching
Save up to 90% in token pricing on supported models by caching long, static context sequences.
Deep thinking models
Control reasoning effort (low/medium/high) for models like o1/o3 and DeepSeek-R1 natively.
#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.
https://api.sozdai.ai/v1#3-Step Quickstart Guide
Get your API key
Create a secure API key in the console to authorize requests. Keep your key confidential.
API Keys
Configure authorization headers
Include the API key in the request headers for authorization:
Authorization: Bearer sk-corr-...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].
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:
| Parameter | Type | Description |
|---|---|---|
stream | boolean | Stream the response (SSE) |
max_tokens | integer | Max tokens to generate |
temperature | number | Sampling temperature, 0–2 |
tools | array | Function calling (tools) |
stop | string[] | Stop sequences |
reasoning_effort | string | Enable thinking: low / medium / high |
#Error codes
Errors return a standard error object (with message and type fields). Common status codes:
| Status | Meaning |
|---|---|
401 | Invalid or missing key |
402 | Insufficient balance |
404 | The requested model does not exist or is unavailable |
429 | Rate limited — retry shortly |
502 | Service temporarily unavailable, please retry |