Skip to main content
POST
Model response

Authorizations

Authorization
string
header
required

Passing the authorization token in the Authorization header: Bearer .

Headers

X-Session-ID
string

Conversation session ID (alternative to the session_id field in the request body).

Body

application/json

The standard OpenAI fields temperature, top_p, max_tokens, max_completion_tokens, stop, n and response_format are accepted but not applied.

messages
object[]
required

A list of previous messages in the conversation.

Minimum array length: 1
model
enum<string>
default:niya-1

Model ID:

  • niya-1 - Niya (main model for general tasks and moderation, 1M context)
  • emmy-1 - Emmy (intellectual model with step-by-step reasoning, 1M context)
  • hubert-1 - Hubert (custom model, 1M context)
Available options:
niya-1,
emmy-1,
hubert-1,
default
Example:

"niya-1"

files
object[]

Additional list of files or images attached to the request.

stream
boolean
default:false

Enable streaming of Server-Sent Events (SSE) responses.

stream_options
object
thinking
boolean

Enabling step-by-step thinking mode (chain of reasoning).

Example:

true

surzhyk
boolean
default:false

For the hubert-1 model it includes a proprietary surzhik. By default, Hubert responds in the language of the user's last message.

effort
enum<string>

Degree of detail of reasoning (level of reflection):

  • low - basic fact checking;
  • medium — balanced analysis (default);
  • high - comprehensive step-by-step analysis;
  • extra / max - the maximum level of analytics.
Available options:
low,
medium,
high,
extra,
max
Example:

"medium"

session_id
string

Public chat session identifier (UUIDv4). Allows you to save context between requests.

Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

regenerate
boolean

Flag for forced regeneration of the last response.

tools
object[]

Tools in the OpenAI format. They work only with an agent key (sk-agent-…) and are ignored for a chat key.

tool_choice

Tool choice in the OpenAI format.

reasoning_effort
string

Reasoning level in the OpenAI format. Same as effort.

Allow the model to search the web.

Response

Successful model response or chunk stream (SSE).

id
string
Example:

"chatcmpl-9b2f6c1e4a7d4c0e9f1a2b3c"

session_id
string
Example:

"f47ac10b-58cc-4372-a567-0e02b2c3d479"

object
string
Example:

"chat.completion"

created
integer
Example:

1726838400

model
string
Example:

"niya-1"

choices
object[]
usage
object

Token usage. prompt_tokens includes cached tokens; total_tokens = prompt_tokens + completion_tokens. cost_credits is the AI credits charged.