Эндпоинты/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.
POST
https://api.sozdai.ai/v1/chat/completions#Authentication
All requests carry your API key in the Authorization header.
http
Authorization: Bearer sk-corr-...#Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | ID of the model to use, e.g. gpt-4o |
messages | array | Yes | The list of chat messages. Each message contains a role and content |
stream | boolean | No (default false) | Whether to stream responses using Server-Sent Events |
temperature | number | No | Sampling temperature between 0 and 2 |
max_tokens | integer | No | The maximum number of tokens to generate |
reasoning_effort | string | No | The 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.