Эта страница сгенерирована из описания API, против которого собрана эта сборка, — поэтому она говорит, на что шлюз отвечает, а не на что его когда-то описали отвечающим. Каждый член ниже — член провода. Формулировки самих операций процитированы из описания API и потому остаются английскими: перевод создал бы второе утверждение о проводе, за которым не следит ни одна проверка.
POST /v1/chat/completions
Аутентификация
Authorization: Bearer <key>Операция
public.chat_completions.createOpenAI-совместимый чат: отправляете разговор, получаете одно завершение или поток чанков в ответ.
Create a chat completion.
- Протокол: нативный OpenAI Chat Completions, а не перевод другого протокола — члены запроса, форма ответа, словарь
usage и конверт ошибки принадлежат этому протоколу. - Стриминг: при
stream: true ответ приходит как text/event-stream — события chat.completion.chunk, при stream_options.include_usage отдельный чанк с usage, затем финальный кадр [DONE]; отказ до первого события оформляется обычной JSON-ошибкой этого протокола. - Аутентификация: ключ Kumo передаётся заголовком
Authorization: Bearer. - Потолок вывода:
max_tokens и max_completion_tokens необязательны и взаимозаменяемы — запрос, не назвавший ни одного, отвечается под опубликованным умолчанием в 32768 токенов вывода, против которого и берётся резерв; назвать оба с разными значениями — отказ, а не правило старшинства. - Параметр рассуждения:
reasoning_effort доходит до модели только на маршруте, который доказал, что передаёт параметр рассуждения, и отбрасывается на остальных; на выбор каналов он не влияет, а что произошло, говорит заголовок ответа X-Kumo-Reasoning (forwarded или dropped).
{
"max_tokens": 128,
"messages": [
{
"role": "user"
}
],
"model": "<model>"
}
Запрос несёт:
| член | что это |
|---|
max_completion_tokens | integer, необязателен — The output ceiling, in the current spelling. |
max_tokens | integer, необязателен — The output ceiling, in the spelling long-established clients send. |
messages | array of ChatMessage, обязателен — The conversation, in order. |
model | string, обязателен — The model to answer with: a canonical name or an alias the published catalog carries. |
n | integer, необязателен — How many completions to answer with. |
presence_penalty | number, необязателен — Presence penalty from -2 to 2 inclusive. |
reasoning_effort | string, необязателен — Carried to the model ONLY on a route that has proven it forwards a reasoning parameter, and dropped otherwise, with the X-Kumo-Reasoning response header saying which (forwarded or dropped). |
response_format | ChatResponseFormat, необязателен — A structured output requirement. |
stop | array of string, необязателен — Sequences whose appearance ends the answer, at most four, as a LIST — the bare-string spelling this protocol also defines is not accepted on this surface and is refused rather than ignored. |
stream | boolean, необязателен — Whether to stream the answer. |
stream_options | ChatStreamOptions, необязателен — Options that apply only when stream is true. |
system | string or array of ChatContentPart, необязателен — A system prompt beside the conversation, as OpenAI-compatible agents sometimes spell it. |
temperature | number, необязателен — How much randomness to use, from 0 to 2 — this protocol's own interval, and not the [0, 1] of the Anthropic Messages surface. |
tool_choice | "auto" or "none" or "required" or object, необязателен — What this request requires of its tool list, in either spelling this protocol defines: the bare mode word "auto", "none" or "required", or an object naming one declared tool. |
tools | array of ChatTool, необязателен — The tools this turn may call. |
top_p | number, необязателен — Nucleus sampling, from 0 to 1. |
user | string, необязателен — An opaque label for the end user this request is made on behalf of, as OpenAI-compatible clients send it. |
ChatMessage
| член | что это |
|---|
cache_control | ChatCacheControl, необязателен — Accepted and NOT CARRIED: this marks the turn as a prompt-cache anchor, the way OpenAI-compatible clients write it when they address an Anthropic model, but the supplier wire this protocol is served by has no member for an anchor, so the cached-token counts in usage come back as though it had not been sent. |
content | string or array of ChatContentPart, необязателен — The turn's text, in either spelling this protocol defines: a bare string, or a list of typed parts joined in order. |
name | string, необязателен — The tool this result came from, as OpenAI-compatible clients write it on a tool turn. |
reasoning | string, необязателен — Accepted and NOT CARRIED: a prior assistant answer's reasoning, replayed by an OpenAI-compatible client. |
reasoning_content | string, необязателен — Accepted and NOT CARRIED: the alternate spelling of a prior assistant answer's replayed reasoning. |
role | "system" or "developer" or "user" or "assistant" or "tool", обязателен — Who is speaking. |
tool_call_id | string, необязателен — The call this result answers. |
tool_calls | array of ChatToolCall, необязателен — The calls this assistant turn made, replayed back into the conversation so that a tool result has something in the history to answer. |
| член | что это |
|---|
json_schema | StructuredSchema, необязателен — The named schema an answer must satisfy. |
type | string, обязателен — The kind of format. |
ChatStreamOptions
| член | что это |
|---|
include_usage | boolean, необязателен — Whether the stream ends with a usage chunk — an event with an empty choices array carrying only usage — before the terminal [DONE] frame. |
ChatContentPart
| член | что это |
|---|
cache_control | ChatCacheControl, необязателен — Accepted and NOT CARRIED: this marks the part as a prompt-cache anchor, the way OpenAI-compatible clients write it when they address an Anthropic model, but the supplier wire this protocol is served by has no member for an anchor, so the cached-token counts in usage come back as though it had not been sent. |
file | ChatContentPartFile, необязателен — Declared and NEVER SERVED: the document a file part carries. |
image_url | ChatContentPartImage, необязателен — The image carried by an image_url part. |
input_audio | ChatContentPartAudio, необязателен — Declared and NEVER SERVED: the sound an input_audio part carries. |
refusal | string, необязателен — Declared and NEVER SERVED: the model's own refusal, replayed. |
text | string, необязателен — On a text part, the text. |
type | "text" or "image_url" or "input_audio" or "file" or "refusal", обязателен — Which kind of part this is. |
| член | что это |
|---|
function | ChatToolFunction, обязателен |
type | "function", обязателен — The kind of tool. |
Ответ:
application/jsonChatCompletionsReply
text/event-streamChatCompletionsChunk
при отказеChatCompletionsError
ChatCompletionsReply
| член | что это |
|---|
choices | array of ReplyChoice, обязателен — The answer. |
created | integer, обязателен — The instant this completion was answered, as whole seconds since the Unix epoch. |
id | string, обязателен — This request's Kumo identity. |
model | string, обязателен — The model this request named, echoed back exactly as it was sent. |
object | "chat.completion", обязателен — The kind of object this is. |
usage | ReplyUsage, необязателен — What the supplier reported this request consumed. |
ReplyChoice
| член | что это |
|---|
finish_reason | "stop" or "length" or "tool_calls" or "content_filter", обязателен — Why the model stopped. |
index | integer, обязателен — The position of this choice. |
message | ReplyMessage, обязателен |
ReplyUsage
| член | что это |
|---|
completion_tokens | integer, необязателен — Output tokens the supplier counted. |
prompt_tokens | integer, необязателен — Input tokens the supplier counted, including any it served from its own cache. |
prompt_tokens_details | PromptTokensDetails, необязателен — How the input divides, when the supplier said. |
total_tokens | integer, необязателен — Input and output together. |
ChatCompletionsChunk
| член | что это |
|---|
choices | array of ChunkChoice, обязателен — This chunk's delta. |
created | integer, обязателен — The instant this completion was answered, as whole seconds since the Unix epoch. |
id | string, обязателен — This request's Kumo identity, identical on every chunk of one stream. |
model | string, обязателен — The model this request named, echoed back exactly as it was sent, on every chunk. |
object | "chat.completion.chunk", обязателен — The kind of object this is. |
usage | ReplyUsage, необязателен — Present only on the usage chunk — the last event before [DONE] when stream_options.include_usage asked for one — and absent from every content chunk. |
ChunkChoice
| член | что это |
|---|
delta | ChunkDelta, обязателен |
finish_reason | "stop" or "length" or "tool_calls" or "content_filter" or null, обязателен — Why the model stopped, stated once on the chunk that closes the answer and null until then. |
index | integer, обязателен — The position of this choice. |
ReplyUsage
ReplyUsage — см. выше.
ChatCompletionsError
ChatCompletionsErrorBody
| член | что это |
|---|
code | string, необязателен — The machine-readable reason. |
limit | RequestLimit, необязателен — On a request_limit_exceeded refusal, which limit the request exceeded, the limit and the value the request reached; param names the member. |
message | string, обязателен — What went wrong, in a fixed safe sentence. |
param | string, необязателен — The request member at fault, when one member is at fault. |
probe | string, необязателен — On a connect-check refusal only (a model named kumo-connect-check-<32 hex> that no live model answers to, asked with a valid key): kumo-connect-check-<nonce>:<proof>, where proof is the first 16 hex characters of HMAC-SHA256 over the nonce and the key id under a gateway-held key. |
reason | "welcome_model_cap" or "welcome_spent" or "welcome_photos_spent" or "daily_model_limit" or "daily_common_limit" or "daily_usage_limit" or "native_search" or "no_free_allowance" or "input_too_large" or "request_unbounded" or "not_eligible" or "free_variant_unavailable" or "limits_changed" or "free_limits_exhausted" or "requests_per_minute" or "concurrency", необязателен — On a free_limit_exhausted or free_rate_limited refusal only — a request that named a free variant (<model>:free) or the alias kumo/free, which is never paid: why it was refused, in a closed vocabulary. |
reset_at | string, необязателен — On a free_limit_exhausted or free_rate_limited refusal, the instant the limit resets, when one exists: the next 00:00 Europe/Moscow for a daily free limit (and for an account whose daily free limits open then), the end of the counted minute for the per-minute limit. |
type | "invalid_request_error" or "not_found_error" or "authentication_error" or "permission_error" or "rate_limit_error" or "api_error", обязателен — The class of failure, in this protocol's own closed vocabulary. |
POST /v1/embeddings
Аутентификация
Authorization: Bearer <key>Операция
public.embeddings.createПревратить пакет входов в векторы, по одному вектору на вход.
Create embedding vectors for a batch of inputs.
- Протокол: возвращает по одному вектору на вход, в том же порядке, что и во входном пакете; тарифицируются только входные токены.
- Потолок: у пакета есть предел числа входов и суммарного размера в байтах — запрос за этими пределами отклоняется до обращения к провайдеру.
- Формат ответа:
encoding_format обязателен и должен быть "base64" — векторы приходят как base64 от little-endian float32; запрос формата "float" или без указания формата отклоняется по имени. - Стриминг: у этой операции его нет.
{
"encoding_format": "base64",
"input": [
"<input>"
],
"model": "<model>"
}
Запрос несёт:
| член | что это |
|---|
encoding_format | "base64", обязателен — Must be "base64": this surface does not serve the protocol's "float" default. |
input | array of string, обязателен — The batch of inputs to embed, at most 128 members and 131072 bytes in total. |
model | string, обязателен — The catalog model to embed with, as the customer names it. |
Ответ:
application/jsonEmbeddingsResponseBody
при отказеEmbeddingsError
EmbeddingsResponseBody
| член | что это |
|---|
data | array of EmbeddingsVector, обязателен — One vector per input, in the order the inputs were given. |
model | string, обязателен — The model the vectors were produced with. |
object | "list", обязателен — Always "list". |
usage | EmbeddingsUsage, обязателен — What the request cost. |
EmbeddingsVector
| член | что это |
|---|
embedding | string, обязателен — The vector components as base64-encoded little-endian float32 values, which is this protocol's own "base64" encoding format. |
index | integer, обязателен — The position of the input this vector is for. |
object | "embedding", обязателен — Always "embedding". |
EmbeddingsUsage
| член | что это |
|---|
prompt_tokens | integer, обязателен — The input tokens charged for this request. |
total_tokens | integer, обязателен — The total tokens charged, which on this surface equals prompt_tokens. |
EmbeddingsError
EmbeddingsErrorBody
| член | что это |
|---|
code | string, обязателен — The machine-readable reason, shared with every Kumo surface. |
message | string, обязателен — A safe description of the failure. |
request_id | string, необязателен — The Kumo request identifier, for support. |
type | string, обязателен — The class of failure. |
GET /v1/free/limits
Аутентификация
Authorization: Bearer <key>Операция
public.free_limits.readУзнать бесплатные лимиты аккаунта ключа: по каждой бесплатной модели — сколько осталось и когда лимит сбросится.
Read the free limits of the API key's organization.
- Что возвращает: по каждой бесплатной модели, доступной ключу, — ID её бесплатного варианта (
<модель>:free), уровень, с которого сейчас оплачивается запрос (welcome — пакет Welcome, daily — дневные бесплатные лимиты аккаунта с подходящим купленным пакетом, none — ничего), лимит, израсходованное и остаток в собственных токенах модели (для фото-модели Welcome — в изображениях) и reset_at — ближайшие 00:00 по Москве, когда дневной лимит сбрасывается или открывается. - Ограничения частоты:
rate — два лимита бесплатного использования на аккаунт: запросов в минуту и запросов одновременно. - Те же цифры в ответах: заголовки
x-ratelimit-* и x-free-* каждого ответа на запрос к бесплатному варианту и поля reason и reset_at его отказа 429. - Без списаний: запрос к бесплатному варианту никогда не оплачивается — сверх бесплатных лимитов он получает 429
free_limit_exhausted, сверх ограничений частоты — 429 free_rate_limited. Платный — обычный ID модели. Само чтение лимитов ничего не расходует. - Любая бесплатная модель:
router называет ID алиаса kumo/free, пока в списке есть хотя бы одна текстовая модель.
{
"active": true,
"models": [
{
"base_model": "<base_model>",
"left": 1,
"level": "welcome",
"limit": 1,
"model": "<model>",
"reset_at": "<reset_at>",
"unit": "tokens",
"used": 1
}
],
"object": "free_limits",
"rate": {
"concurrency": {
"in_flight": 1,
"limit": 1
},
"requests_per_minute": {
"left": 1,
"limit": 1,
"reset_at": "<reset_at>"
}
}
}
Запрос не несёт тела.
Ответ:
application/jsonFreeLimitsBody
при отказеErrorEnvelope
FreeLimitsBody
| член | что это |
|---|
active | boolean, обязателен — Whether the organization has free variants at all: the promotion is on and released to it. |
models | array of FreeLimitsModel, обязателен — Every free model the key may use, by canonical name. |
object | "free_limits", обязателен |
rate | FreeLimitsRate, обязателен — The rate limits of free usage, shared by every free model; past either a request answers 429 free_rate_limited. |
router | string, необязателен — The model ID of the «any free model» alias, kumo/free, while at least one free text model is listed: a request that names it is routed to the first listed text model with remaining allowance and a free channel, and behaves as that model's :free. |
FreeLimitsModel
| член | что это |
|---|
base_model | string, обязателен — The model's canonical name — the ID of the paid model. |
expires_at | string, необязателен — On the welcome level, when the Welcome package ends. |
left | integer, обязателен — What a request can still take: the model's own remainder, never more than its level's other bound leaves (the Welcome package's total, the common daily limit); 0 at level none. |
level | "welcome" or "daily" or "none", обязателен — The level a request of the free variant is funded from now. |
limit | integer, обязателен — The model's limit on its level — on the daily level never above the account's common daily limit; 0 at level none. |
model | string, обязателен — The model ID that uses the model for free: the canonical name with the suffix :free. |
requests | FreeLimitsRequests, необязателен — On the daily level, the model's free requests per Moscow day. |
reset_at | string, обязателен — When the allowance resets: the next 00:00 Europe/Moscow on the daily level, and at level none for an account whose daily free limits open then (a qualifying purchased package, its Welcome finished today). |
unit | "tokens" or "images", обязателен — What limit, used and remaining count: the model's own tokens (uncached input, cache read, cache write and output, summed; no multiplier), or images for the Welcome photo model. |
used | integer, обязателен — What admission counts as taken, requests in flight included; 0 at level none. |
FreeLimitsRate
| член | что это |
|---|
concurrency | FreeLimitsConcurrency, обязателен |
requests_per_minute | FreeLimitsWindow, обязателен |
ErrorEnvelope
| член | что это |
|---|
error | ErrorBody, обязателен — The envelope payload. |
ErrorBody
| член | что это |
|---|
code | string, обязателен — Machine-readable error code. |
field_details | array of FieldDetail, необязателен — Per-field rejections, when the error is a validation error. |
limit | LimitDetail, необязателен — Present when the error is a limit or funding-source rejection. |
message | string, обязателен — Safe human-readable fallback. |
promotion | PromotionDetail, необязателен — Present when the error is a named promotion refusal. |
request_id | string, обязателен — Matches the X-Request-Id response header. |
version | string, обязателен — Envelope version. |
POST /v1/images/edits
Аутентификация
Authorization: Bearer <key>Операция
public.images.editОтредактировать до четырёх исходных изображений PNG или JPEG по текстовому промпту.
Edit images from a prompt and source files.
- Запрос: используйте
multipart/form-data. Передавайте исходные файлы в повторяющемся поле image или image[]. - Лимиты: до четырёх файлов, до 5 МиБ и 4096 пикселей по каждой стороне на файл.
- Тарификация: списывается за возвращённые изображения. Доступность зависит от результатов проверки редактирования на канале модели.
{
"model": "<model>",
"prompt": "<prompt>"
}
Запрос несёт:
| член | что это |
|---|
image | array of string, необязателен — Source files, in order. |
image[] | array of string, необязателен — Alternative spelling of image for OpenAI-style clients. |
model | string, обязателен |
n | integer, необязателен — How many images to generate. |
prompt | string, обязателен |
response_format | "b64_json", необязателен |
size | string, необязателен |
Ответ:
application/jsonImagesResponseBody
при отказеImagesErrorBody
ImagesResponseBody
| член | что это |
|---|
created | integer, обязателен — When the images were generated, as a Unix timestamp in seconds. |
data | array of ImagesDataEntry, обязателен — The generated images, in the order the supplier answered them. |
ImagesDataEntry
| член | что это |
|---|
b64_json | string, необязателен — The image bytes, base64-encoded. |
url | string, необязателен — A URL the image can be fetched from. |
ImagesErrorBody
| член | что это |
|---|
error | ImagesErrorPayload, обязателен — The refusal, in the OpenAI-compatible error shape. |
ImagesErrorPayload
| член | что это |
|---|
code | string, обязателен — The machine-readable reason. |
message | string, обязателен — A safe human-readable description of the refusal. |
param | string, обязателен — Always null: this surface never names a field of the request. |
reason | "welcome_model_cap" or "welcome_spent" or "welcome_photos_spent" or "daily_model_limit" or "daily_common_limit" or "daily_usage_limit" or "native_search" or "no_free_allowance" or "input_too_large" or "request_unbounded" or "not_eligible" or "free_variant_unavailable" or "limits_changed" or "free_limits_exhausted" or "requests_per_minute" or "concurrency", необязателен — On a free_limit_exhausted or free_rate_limited refusal only — a request that named a free variant (<model>:free) or the alias kumo/free, which is never paid: why it was refused, in a closed vocabulary. |
reset_at | string, необязателен — On a free_limit_exhausted or free_rate_limited refusal, the instant the limit resets, when one exists: the next 00:00 Europe/Moscow for a daily free limit (and for an account whose daily free limits open then), the end of the counted minute for the per-minute limit. |
type | string, обязателен — The coarse OpenAI error class. |
POST /v1/images/generations
Путь
/v1/images/generationsАутентификация
Authorization: Bearer <key>Операция
public.images.generateСгенерировать одно или несколько изображений по текстовому промпту.
Generate images from a prompt.
- Протокол: конверты запроса, ответа и ошибки совместимы с OpenAI — отказ несёт
error.message, error.type и error.code, а не REST-конверт Kumo. - Тарификация: списывается за единицу изображения через то же ядро допуска, резервирования и расчёта, что и у остальных поверхностей моделей.
{
"model": "<model>",
"prompt": "<prompt>"
}
Запрос несёт:
| член | что это |
|---|
background | string, необязателен — Accepted for OpenAI compatibility and not applied. |
model | string, обязателен — The public model name to generate with. |
moderation | string, необязателен — Accepted for OpenAI compatibility and not applied. |
n | integer, необязателен — How many images to generate. |
output_compression | integer, необязателен — Accepted for OpenAI compatibility and not applied. |
output_format | string, необязателен — Accepted for OpenAI compatibility and not applied. |
prompt | string, обязателен — The prompt to generate an image from. |
quality | string, необязателен — Accepted for OpenAI compatibility and not applied. |
response_format | string, необязателен — Requested image representation: url or b64_json. |
size | string, необязателен — The image size as WIDTHxHEIGHT, for example 1024x1024. |
style | string, необязателен — Accepted for OpenAI compatibility and not applied. |
user | string, необязателен — Accepted for OpenAI compatibility, never forwarded to a supplier and never stored. |
Ответ:
application/jsonImagesResponseBody
при отказеImagesErrorBody
ImagesResponseBody
ImagesResponseBody — см. выше.
ImagesDataEntry
ImagesDataEntry — см. выше.
ImagesErrorBody
ImagesErrorBody — см. выше.
ImagesErrorPayload
ImagesErrorPayload — см. выше.
POST /v1/messages
Аутентификация
Authorization: Bearer <key> or x-api-key: <key>Операция
public.anthropic_messages.createПротокол Anthropic Messages: отправляете разговор в его собственной форме, получаете одно сообщение или поток событий.
Create a message.
- Протокол: нативный Anthropic Messages —
max_tokens обязателен и без значения по умолчанию, системный промпт передаётся отдельным членом запроса, а инструменты несут input_schema без обёртки function. - Стриминг: при
stream: true ответ приходит как text/event-stream с именованными событиями протокола — message_start, блоки контента, message_delta, message_stop; отказ после начала потока выражается ошибкой внутри потока, без message_stop. - Аутентификация: ключ Kumo передаётся заголовком
Authorization: Bearer или, как в нативном API, самим значением в заголовке x-api-key — любой из них впускает вызывающего, и оба называют один и тот же ключ. - Игнорируемые члены:
metadata, context_management и safeguards принимаются, но не влияют на ответ — каждый называет это в собственном описании. - Параметр рассуждения: каждый из двух членов —
thinking и output_config.effort — доходит до модели только на маршруте, который доказал, что передаёт параметр рассуждения, и отбрасывается на остальных; на выбор каналов он не влияет, а что произошло, говорит заголовок ответа X-Kumo-Reasoning (forwarded или dropped). - Кэш промпта: якорь
cache_control доходит до поставщика, а его ttl (5m или 1h) принимается, но не пересылается — якорь живёт пять минут, как по умолчанию в протоколе, какой бы срок ни был указан, и запрос рассчитывается по этому сроку.
{
"max_tokens": 128,
"messages": [
{
"content": "<content>",
"role": "user"
}
],
"model": "<model>"
}
Запрос несёт:
| член | что это |
|---|
context_management | object, необязателен — This protocol's context-management configuration, as the beta spells it. |
max_tokens | integer, обязателен — The maximum number of tokens to generate. |
messages | array of MessagesInputMessage, обязателен — The conversation, oldest turn first. |
metadata | MessagesMetadata, необязателен — This protocol's request metadata. |
model | string, обязателен — The catalog model to answer with, as the customer names it. |
output_config | object, необязателен — Its effort member is carried to the model ONLY on a route that has proven it forwards a reasoning parameter, and dropped otherwise, with the X-Kumo-Reasoning response header saying which (forwarded or dropped). |
safeguards | array of object, необязателен — ACCEPTED and NOT forwarded: the context a client states for its own permission classifier, as the dangerous-tool-use beta spells it (Claude Code sends it in auto mode). |
stop_sequences | array of string, необязателен — Sequences that end the answer when the model produces one. |
stream | boolean, необязателен — Stream the answer as this protocol's own named events over text/event-stream: message_start, content_block_start, content_block_delta, content_block_stop, message_delta, message_stop. |
system | string or array of MessagesSystemBlock, необязателен — The system prompt, beside the conversation rather than as a turn of it. |
temperature | number, необязателен — How much randomness to use, from 0 to 1. |
thinking | object, необязателен — Carried to the model ONLY on a route that has proven it forwards a reasoning parameter, and dropped otherwise, with the X-Kumo-Reasoning response header saying which (forwarded or dropped). |
tool_choice | MessagesToolChoice, необязателен — Forces one of the declared tools. |
tools | array of MessagesTool, необязателен — The tools this turn may call. |
top_k | integer, необязателен — Keep only the K most likely tokens when sampling. |
top_p | number, необязателен — Nucleus sampling, from 0 to 1. |
| член | что это |
|---|
content | string or array of MessagesContentBlock, обязателен — What the turn says. |
output_config | object, необязателен — The beta's per-turn output configuration, as the client states it on a turn — an effort level, a timing. |
role | "user" or "assistant" or "system", обязателен — Who is speaking. |
| член | что это |
|---|
user_id | string, необязателен — An opaque identifier the caller keeps for its own end user. |
MessagesSystemBlock
| член | что это |
|---|
cache_control | MessagesCacheControl, необязателен — Marks this block as a prompt-cache anchor. |
text | string, обязателен — The block's text. |
type | "text", обязателен — Always "text". |
| член | что это |
|---|
disable_parallel_tool_use | boolean, необязателен — Whether at most one tool may be called in one answer; the default is that several may be. |
name | string, необязателен — The tool to force. |
type | "auto" or "any" or "tool" or "none", обязателен — What the request requires: "auto" leaves the choice to the model, "any" requires a call to some declared tool, "tool" requires a call to the one "name" states, and "none" forbids a call while the declarations stay visible. |
| член | что это |
|---|
allowed_callers | array of string, необязателен — The beta's list of tools permitted to call this one. |
allowed_domains | array of string, необязателен — On a hosted search, the allowed domains; mutually exclusive with blocked_domains. |
blocked_domains | array of string, необязателен — On a hosted search, the blocked domains; mutually exclusive with allowed_domains. |
cache_control | MessagesCacheControl, необязателен — Marks this declaration as a prompt-cache anchor; the tool list is part of the cached prefix. |
defer_loading | boolean, необязателен — The beta's request to load this declaration only when it is first needed. |
description | string, необязателен — What the tool does. |
eager_input_streaming | boolean, необязателен — The beta's request to begin streaming this tool's arguments before they are complete. |
input_examples | array of object, необязателен — The beta's example arguments for this tool, each the JSON object input_schema describes. |
input_schema | object, необязателен — The tool's parameters, as the JSON Schema the caller wrote for its own tool. |
max_uses | integer, необязателен — On native web search, the maximum number of searches in this request, relayed to the supplier and reserved before execution. |
name | string, обязателен — The tool's name. |
strict | boolean, необязателен — The beta's request that the arguments conform exactly to input_schema. |
type | string, необязателен — The declaration kind: absent or custom is a caller tool; web_search_20250305 is supplier-hosted web search, relayed natively. |
user_location | MessagesSearchLocation, необязателен — On a hosted search, its approximate search location. |
Ответ:
application/jsonMessagesReply
text/event-streamMessagesStreamEvent
при отказеMessagesError
MessagesReply
| член | что это |
|---|
content | array of MessagesReplyBlock, обязателен — The answer's blocks, in order. |
id | string, обязателен — The Kumo request identifier for this answer. |
model | string, обязателен — The model the customer named. |
role | string, обязателен — Always "assistant". |
stop_reason | "end_turn" or "max_tokens" or "stop_sequence" or "tool_use" or "pause_turn", обязателен — Why the answer ended. |
type | string, обязателен — Always "message". |
usage | MessagesReplyUsage, необязателен — What the request cost, exactly as this platform settles it. |
MessagesReplyBlock
| член | что это |
|---|
citations | array of MessagesWebCitation, необязателен — On a text block, native web-search citations. |
content | string or array of MessagesToolResultBlock or object, необязателен — On a web_search_tool_result, the native result list or typed search error, preserved for replay. |
data | string, необязателен — On a redacted_thinking block, the vendor's opaque data: thinking the vendor encrypted rather than showed. |
id | string, необязателен — On a tool use, its identifier. |
input | object, необязателен — On a tool use, the arguments as the JSON object the supplier produced. |
name | string, необязателен — On a tool use, the tool called. |
signature | string, необязателен — On a thinking block, the vendor's opaque signature of it. |
text | string, необязателен — On a text block, the text. |
thinking | string, необязателен — On a thinking block, the model's thinking text; it may be the empty string. |
tool_use_id | string, необязателен — On a web_search_tool_result, the server call it answers. |
type | "text" or "tool_use" or "thinking" or "redacted_thinking" or "server_tool_use" or "web_search_tool_result", обязателен — Which kind of block this is. |
MessagesReplyUsage
| член | что это |
|---|
cache_creation | MessagesCacheCreation, необязателен — The cache write by lifetime. |
cache_creation_input_tokens | integer, обязателен — Input tokens written to the prompt cache. |
cache_read_input_tokens | integer, обязателен — Input tokens served from the prompt cache. |
input_tokens | integer, обязателен — Input tokens charged, excluding cache reads and writes. |
output_tokens | integer, обязателен — Output tokens charged. |
server_tool_use | MessagesWebSearchUsage, необязателен — Supplier-reported server-tool usage, including successful web search calls. |
MessagesStreamEvent
| член | что это |
|---|
content_block | MessagesStreamBlock, необязателен — On content_block_start, the opening block. |
delta | MessagesStreamDelta, необязателен — On content_block_delta, the fragment; on message_delta, the closing facts. |
error | MessagesErrorBody, необязателен — On error, the failure, in this protocol's own envelope. |
index | integer, необязателен — On the block events, which block. |
message | MessagesStreamMessage, необязателен — On message_start, the opening envelope: the answer's identity and the account's input half. |
type | "message_start" or "content_block_start" or "content_block_delta" or "content_block_stop" or "message_delta" or "message_stop" or "ping" or "error", обязателен — Which event this is; it is also the SSE frame's event name. |
usage | MessagesReplyUsage, необязателен — On message_delta, what the request cost — exactly as this platform settles it, and exactly what the unary reply would state. |
MessagesStreamBlock
| член | что это |
|---|
citations | array of MessagesWebCitation, необязателен — On a text opening, the native citations already present. |
content | string or array of MessagesToolResultBlock or object, необязателен — On a web_search_tool_result, its complete native results or typed error. |
data | string, необязателен — On a redacted_thinking block, the vendor's opaque data, whole: this block has no fragments. |
id | string, необязателен — On a tool use, its identifier. |
input | object, необязателен — On a tool use, the opening input — the empty object; the arguments arrive as input_json_delta fragments. |
name | string, необязателен — On a tool use, the tool called. |
signature | string, необязателен — On a thinking block, the opening signature — ordinarily empty; the vendor's opaque signature arrives as a signature_delta fragment before the block closes. |
text | string, необязателен — On a text block, the opening text — empty; the text arrives as deltas. |
thinking | string, необязателен — On a thinking block, the opening thinking text — ordinarily empty; the text arrives as thinking_delta fragments. |
tool_use_id | string, необязателен — On a web_search_tool_result, the server call it answers. |
type | "text" or "tool_use" or "thinking" or "redacted_thinking" or "server_tool_use" or "web_search_tool_result", обязателен — Which kind of block opened. |
MessagesStreamDelta
| член | что это |
|---|
citation | MessagesWebCitation, необязателен — On citations_delta, the native web-search citation. |
partial_json | string, необязателен — On input_json_delta, the fragment of the call's input object, as partial JSON text. |
signature | string, необязателен — On signature_delta, the vendor's opaque signature of the thinking block being streamed, or a fragment of it. |
stop_reason | "end_turn" or "max_tokens" or "stop_sequence" or "tool_use" or "pause_turn", необязателен — On message_delta, why the answer ended. |
text | string, необязателен — On text_delta, the fragment of the answer's text. |
thinking | string, необязателен — On thinking_delta, the fragment of a thinking block's text. |
type | "text_delta" or "input_json_delta" or "thinking_delta" or "signature_delta" or "citations_delta", необязателен — On content_block_delta, which fragment this is; absent on message_delta. |
MessagesErrorBody
| член | что это |
|---|
code | string, необязателен — The machine-readable reason, shared with every Kumo surface. |
limit | RequestLimit, необязателен — On a request_limit_exceeded refusal, which limit the request exceeded, the limit and the value the request reached; param names the member. |
message | string, обязателен — A safe description of the failure. |
param | string, необязателен — The member the failure is about, when it is about one. |
probe | string, необязателен — On a connect-check refusal only (a model named kumo-connect-check-<32 hex> that no live model answers to, asked with a valid key): kumo-connect-check-<nonce>:<proof>, where proof is the first 16 hex characters of HMAC-SHA256 over the nonce and the key id under a gateway-held key. |
reason | "welcome_model_cap" or "welcome_spent" or "welcome_photos_spent" or "daily_model_limit" or "daily_common_limit" or "daily_usage_limit" or "native_search" or "no_free_allowance" or "input_too_large" or "request_unbounded" or "not_eligible" or "free_variant_unavailable" or "limits_changed" or "free_limits_exhausted" or "requests_per_minute" or "concurrency", необязателен — On a free_limit_exhausted or free_rate_limited refusal only — a request that named a free variant (<model>:free) or the alias kumo/free, which is never paid: why it was refused, in a closed vocabulary. |
reset_at | string, необязателен — On a free_limit_exhausted or free_rate_limited refusal, the instant the limit resets, when one exists: the next 00:00 Europe/Moscow for a daily free limit (and for an account whose daily free limits open then), the end of the counted minute for the per-minute limit. |
type | "invalid_request_error" or "not_found_error" or "authentication_error" or "permission_error" or "billing_error" or "rate_limit_error" or "api_error" or "overloaded_error", обязателен — The class of failure. |
MessagesStreamMessage
| член | что это |
|---|
content | array of MessagesReplyBlock, обязателен — Always empty here: the blocks arrive as events. |
id | string, обязателен — The Kumo request identifier for this answer, identical on every event of one stream. |
model | string, обязателен — The model the customer named. |
role | string, обязателен — Always "assistant". |
type | string, обязателен — Always "message". |
usage | MessagesReplyUsage, обязателен — The account's input half, as the supplier stated it on opening; the closing message_delta states the settled whole. |
MessagesReplyUsage
MessagesReplyUsage — см. выше.
MessagesError
| член | что это |
|---|
error | MessagesErrorBody, обязателен — The failure. |
type | "error", обязателен — Always "error". |
MessagesErrorBody
MessagesErrorBody — см. выше.
POST /v1/messages/count_tokens
Путь
/v1/messages/count_tokensАутентификация
Authorization: Bearer <key> or x-api-key: <key>Операция
public.anthropic_messages.count_tokensПосчитать, сколько токенов потратил бы запрос Messages, не тратя их.
Count message input tokens.
- Протокол: возвращает детерминированную локальную оценку числа входных токенов для подмножества членов запроса Messages —
model, messages, system, tools, tool_choice, thinking, metadata, context_management, safeguards — без обращения к провайдеру, без резервирования и без списаний с баланса. - Аутентификация: тот же ключ, что и у
/v1/messages — заголовком Authorization: Bearer или x-api-key. - Отклоняемые члены: всё, что относится только к генерации, —
max_tokens, stream, output_config, stop_sequences, temperature, top_p — на этой операции отклоняется.
{
"messages": [
{
"content": "<content>",
"role": "user"
}
],
"model": "<model>"
}
Запрос несёт:
| член | что это |
|---|
context_management | object, необязателен — This protocol's context-management configuration, as the beta spells it. |
messages | array of MessagesInputMessage, обязателен — The conversation, oldest turn first. |
metadata | MessagesMetadata, необязателен — This protocol's request metadata. |
model | string, обязателен — The catalog model to answer with, as the customer names it. |
safeguards | array of object, необязателен — ACCEPTED and NOT forwarded: the context a client states for its own permission classifier, as the dangerous-tool-use beta spells it (Claude Code sends it in auto mode). |
system | string or array of MessagesSystemBlock, необязателен — The system prompt, beside the conversation rather than as a turn of it. |
thinking | object, необязателен — Carried to the model ONLY on a route that has proven it forwards a reasoning parameter, and dropped otherwise, with the X-Kumo-Reasoning response header saying which (forwarded or dropped). |
tool_choice | MessagesToolChoice, необязателен — Forces one of the declared tools. |
tools | array of MessagesTool, необязателен — The tools this turn may call. |
MessagesInputMessage
MessagesInputMessage — см. выше.
MessagesMetadata
MessagesMetadata — см. выше.
MessagesSystemBlock
MessagesSystemBlock — см. выше.
MessagesToolChoice
MessagesToolChoice — см. выше.
MessagesTool
MessagesTool — см. выше.
Ответ:
application/jsonAnthropicTokenCountReply
при отказеMessagesError
AnthropicTokenCountReply
| член | что это |
|---|
estimated | boolean, обязателен — Always true until an exact local tokenizer is available. |
input_tokens | integer, обязателен — The deterministic local estimate of input tokens. |
MessagesError
MessagesError — см. выше.
MessagesErrorBody
MessagesErrorBody — см. выше.
GET /v1/models
Аутентификация
None — this operation is open.Операция
public.models.listПеречислить все модели, на которые шлюз отвечает прямо сейчас.
List enabled, evidence-backed models.
- Протокол: возвращает только активные модели каталога, у которых включена хотя бы одна возможность в опубликованной сейчас конфигурации провайдеров.
- Поддержка протоколов и модальностей: ровно пересечение объявлений каталога и подтверждённых маршрутизацией доказательств — выключенные или недоказанные сочетания в список не попадают.
{
"catalog_revision": 1,
"data": [
{
"banner_seed": 1,
"canonical_name": "<canonical_name>",
"capabilities": [
{
"modality_code": "text_generation",
"protocol_code": "responses",
"status": "enabled",
"streaming_status": "unsupported",
"strict_semantics_status": "unsupported",
"structured_output_mode": "none",
"structured_output_status": "unsupported",
"structured_output_streaming_status": "unsupported",
"tools_status": "unsupported"
}
],
"description_en": "<description_en>",
"description_ru": "<description_ru>",
"display_name_en": "<display_name_en>",
"display_name_ru": "<display_name_ru>",
"id": "<id>",
"modality_codes": [
"text_generation"
],
"model_id": "<model_id>",
"object": "model",
"protocol_codes": [
"responses"
],
"supplier_count": 1,
"vendor": {
"code": "<code>",
"display_name_en": "<display_name_en>",
"display_name_ru": "<display_name_ru>",
"id": "<id>"
}
}
],
"loaded_at": "<loaded_at>",
"object": "list",
"stale": true
}
Запрос не несёт тела.
Ответ:
application/jsonPublicModelCatalog
при отказеErrorEnvelope
PublicModelCatalog
| член | что это |
|---|
catalog_revision | integer, обязателен — The append-only catalog revision. |
data | array of PublicCatalogModel, обязателен |
first_id | string, необязателен — Anthropic list shape: id of the first entry of data. |
has_more | boolean, необязателен — Anthropic list shape: always false, the listing is never paged. |
last_id | string, необязателен — Anthropic list shape: id of the last entry of data. |
loaded_at | string, обязателен |
object | "list", обязателен |
stale | boolean, обязателен — True only when a database refresh failed; the response then retains revision diagnostics but advertises no model capabilities. |
PublicCatalogModel
| член | что это |
|---|
added_on | string, необязателен — The UTC day this model was added to the Kumo catalogue, as yyyy-mm-dd. |
aliases | array of string, необязателен |
banner_seed | integer, обязателен — The seed of the model's halftone banner. |
base_model | string, необязателен — On a free-variant row, the canonical name of the model it is the free variant of — the id of the paid row beside it. |
benchmarks | CatalogBenchmarks, необязателен — The model's place on the benchmark leaderboards this platform publishes at /benchmarks: Artificial Analysis indices, speed, latency and cost per task with the rank among every measured model, its weekly place on OpenRouter and its best task categories. |
canonical_name | string, обязателен — The model's canonical name. |
capabilities | array of ModelCapability, обязателен |
context_window_tokens | integer, необязателен — How many tokens this model accepts in one request. |
created_at | string, необязателен — RFC 3339 instant of the model. |
description | string, необязателен — The model's one-line description as a client that discovers models through this list shows it. |
description_en | string, обязателен |
description_ru | string, обязателен |
display_name | string, необязателен — The model's name as a client that discovers models through this list labels it. |
display_name_en | string, обязателен |
display_name_ru | string, обязателен |
free_router | boolean, необязателен — True on the one row of the «any free model» alias, kumo/free, listed for an API key while its organization has at least one free text model the key may use. |
free_variant | boolean, необязателен — True on the row of a model's free variant: the model ID <canonical>:free. |
header_badge | "top" or "value" or "fast", необязателен — The card this model fills in the header models panel. |
id | string, обязателен — The name an API request names this model by — the canonical name, so an OpenAI-compatible client that lists models and sends back data[].id as model is answered. |
image_input | boolean, необязателен — True when the model accepts photos (image_url parts): declared by the catalogue AND proven by a vision probe. |
max_output_tokens | integer, необязателен — How many tokens this model may answer with in one call. |
modality_codes | array of "text_generation" or "embeddings" or "image_generation" or "decisions", обязателен |
model_id | string, обязателен — The catalog's UUID for this model, the key that pricing, key scopes and usage rows join on. |
object | "model", обязателен |
popularity_rank | integer, необязателен — The model's place in the catalogue's popularity order, 1 first. |
protocol_codes | array of "responses" or "chat_completions" or "anthropic_messages" or "embeddings" or "images" or "decisions", обязателен |
reasoning_protocol_codes | array of "responses" or "chat_completions" or "anthropic_messages" or "embeddings" or "images" or "decisions", необязателен — The protocols, a subset of protocol_codes in the same order, on which a reasoning parameter (Messages thinking / output_config.effort, Chat Completions reasoning_effort, Responses reasoning) is forwarded to the supplier on this model's primary route. |
released_on | string, необязателен — The day this model's maker released it, as yyyy-mm-dd. |
showcase_position | integer, необязателен — The model's place on the landing model carousel, ascending. |
supplier_count | integer, обязателен — Deprecated compatibility placeholder, always 1. |
type | "model", необязателен — Anthropic Models API discriminator, always model. |
typical_request | CatalogTypicalRequest, необязателен — What one average request to this model actually spends, measured over the platform's own finished traffic. |
vendor | CatalogVendor, обязателен |
ErrorEnvelope
ErrorEnvelope — см. выше.
ErrorBody
ErrorBody — см. выше.
POST /v1/responses
Аутентификация
Authorization: Bearer <key>Операция
public.responses.createБолее новый протокол OpenAI Responses: отправляете входные элементы, получаете один объект ответа или поток событий.
Create a response.
- Протокол: нативный OpenAI Responses — входные и выходные элементы, словарь
usage и конверт ошибки принадлежат этому протоколу, а не переведены из другого. - Стриминг: при
stream: true ответ приходит как text/event-stream с именованными событиями протокола — response.created, элементы вывода и их дельты, затем ровно одно финальное событие: response.completed или response.failed. - Потолок вывода:
max_output_tokens необязателен — если он не указан, действует опубликованное по умолчанию конечное значение, а явный ноль отклоняется как запрос нулевого вывода. - Игнорируемые члены:
parallel_tool_calls, include, prompt_cache_key, client_metadata и text.verbosity принимаются, но не влияют на ответ; store допускает только false, а previous_response_id проверяется лишь на владение и не продолжает контекст на стороне сервера. - Параметр рассуждения:
reasoning доходит до модели только на маршруте, который доказал, что передаёт параметр рассуждения, и отбрасывается на остальных; на выбор каналов он не влияет, а что произошло, говорит заголовок ответа X-Kumo-Reasoning (forwarded или dropped).
{
"input": "<input>",
"model": "<model>"
}
Запрос несёт:
| член | что это |
|---|
client_metadata | object, необязателен — Metadata the client keeps about its own session. |
include | array of string, необязателен — Extra members the caller asks the answer to carry. |
input | string or array of ResponsesInputItem, обязателен — The conversation, in either spelling this protocol defines: a bare string, or a list of typed items in order. |
instructions | string, необязателен — The system prompt, as this protocol carries it: a member of the request rather than a turn of the conversation. |
max_output_tokens | integer, необязателен — The output ceiling. |
model | string, обязателен — The model to answer with: a canonical name or an alias the published catalog carries. |
parallel_tool_calls | boolean, необязателен — Whether the model may make several tool calls in one turn. |
previous_response_id | string, необязателен — A response of this organization that this request follows. |
prompt_cache_key | string, необязателен — An opaque key the caller uses to group requests for prompt caching. |
reasoning | object, необязателен — Carried to the model ONLY on a route that has proven it forwards a reasoning parameter, and dropped otherwise, with the X-Kumo-Reasoning response header saying which (forwarded or dropped). |
store | boolean, необязателен — Whether the supplier should retain this response for later retrieval. |
stream | boolean, необязателен — Whether to stream the answer. |
text | ResponsesTextConfig, необязателен — How the answer's text is shaped. |
tool_choice | "auto" or "none" or "required" or object, необязателен — What this request requires of its tool list, as a bare mode word or as an object naming one declared tool. |
tools | array of ResponsesTool, необязателен — The tools this turn may call. |
| член | что это |
|---|
action | object, необязателен — What a supplier-side search DID, as the supplier described it and as this surface published it. |
arguments | string, необязателен — The arguments the call was made with, as the JSON text the model produced. |
call_id | string, необязателен — The call this item is or answers. |
content | string or array of ResponsesInputContentPart, необязателен — The text of a message item, and the reasoning prose of a reasoning item, in either spelling this protocol defines: a bare string, or a list of typed parts. |
encrypted_content | string, необязателен — The supplier's own encrypted record of a reasoning item, as it was given to the client. |
execution | string, необязателен — Which side runs a tool_search_call. |
id | string, необязателен — The identity this item carried when the caller last saw it. |
input | string, необязателен — The model's FREEFORM answer to a custom tool, as the text it produced: a patch, a query, whatever the tool's own grammar admits. |
name | string, необязателен — The tool that was called. |
namespace | string, необязателен — The group the called tool was declared in, on a function_call or a custom_tool_call, when the request that produced the call declared its tools in namespaces. |
output | string or array of ResponsesInputContentPart, необязателен — The result of running the tool, in either spelling this protocol defines: a bare string, or a list of parts. |
role | "system" or "user" or "developer" or "assistant", необязателен — Who is speaking. |
status | string, необязателен — How far the item got, in this protocol's own vocabulary and carried as the caller stated it. |
summary | array of ResponsesInputContentPart, необязателен — A reasoning item's summary, in parts of kind summary_text. |
tools | array of object, необязателен — The namespaces of an additional_tools item, or the ordered declarations of a tool_search_output. |
type | "message" or "function_call" or "function_call_output" or "additional_tools" or "custom_tool_call" or "custom_tool_call_output" or "tool_search_call" or "tool_search_output" or "reasoning" or "web_search_call", необязателен — Which kind of item this is. |
ResponsesTextConfig
| член | что это |
|---|
format | ResponsesTextFormat, необязателен — The named schema an answer must satisfy. |
verbosity | "low" or "medium" or "high", необязателен — How much the answer should say. |
| член | что это |
|---|
description | string, необязателен — What the tool or namespace does. |
execution | string, необязателен — Which side runs a TOOL_SEARCH — the reference spells "client" and "server". |
external_web_access | boolean, необязателен — Whether a WEB_SEARCH may reach the open web. |
filters | ResponsesWebSearchFilters, необязателен — What a WEB_SEARCH is limited to. |
format | ResponsesToolFormat, необязателен — How a CUSTOM tool's freeform answer is shaped. |
name | string, необязателен — The tool's name, as it will come back on the call, or a namespace's client-chosen group name. |
parameters | object, необязателен — The tool's parameters, as the JSON Schema the caller wrote for its own tool. |
search_content_types | array of string, необязателен — Which kinds of content a WEB_SEARCH may return. |
search_context_size | string, необязателен — How much search context a WEB_SEARCH should gather. |
strict | boolean, необязателен — Whether the supplier must enforce the parameter schema rather than be encouraged toward it. |
tools | array of ResponsesNamespacedTool, необязателен — The declarations inside a namespace, in client order. |
type | "function" or "custom" or "tool_search" or "web_search" or "namespace", обязателен — The kind of tool. |
user_location | ResponsesWebSearchLocation, необязателен — Where a WEB_SEARCH should answer as though it were. |
Ответ:
application/jsonResponsesReply
text/event-streamResponsesStreamEvent
при отказеResponsesError
ResponsesReply
| член | что это |
|---|
created_at | integer, обязателен — The instant this response was answered, as whole seconds since the Unix epoch. |
id | string, обязателен — This request's Kumo identity. |
model | string, обязателен — The model this request named, echoed back exactly as sent. |
object | "response", обязателен — The kind of object this is. |
output | array of ResponsesOutputItem, обязателен — What the model produced, in order, as typed items. |
status | "completed" or "incomplete", обязателен — How the answer ended. |
usage | ResponsesUsage, необязателен — What the supplier reported this request consumed. |
ResponsesOutputItem
| член | что это |
|---|
action | object, необязателен — What a supplier-side search DID, as the supplier described it. |
arguments | string, необязателен — The arguments, as the JSON text the supplier produced. |
call_id | string, необязателен — The call's identity, to quote when answering it on the next turn. |
content | array of ResponsesOutputContentPart, необязателен — The message's content, in parts, and a reasoning item's own reasoning text, in parts of kind reasoning_text. |
encrypted_content | string, необязателен — The supplier's own encrypted record of a reasoning item. |
execution | string, необязателен — Which side runs a tool_search_call, exactly as the supplier stated it. |
id | string, необязателен — The item's own identity. |
input | string, необязателен — The model's freeform answer to a CUSTOM tool, as the text it produced. |
name | string, необязателен — The tool that was called. |
namespace | string, необязателен — The group the called tool was declared in, on a function_call or a custom_tool_call, when this request declared its tools in namespaces. |
role | "assistant", необязателен — Who is speaking. |
status | string, необязателен — How far the item got. |
summary | array of ResponsesOutputContentPart, необязателен — A reasoning item's summary, in parts of kind summary_text. |
tools | array of ResponsesTool, необязателен — The declarations a tool_search_output returned, in their original order. |
type | "message" or "function_call" or "custom_tool_call" or "tool_search_call" or "tool_search_output" or "web_search_call" or "reasoning", обязателен — Which kind of item this is. |
ResponsesUsage
| член | что это |
|---|
input_tokens | integer, необязателен — Input tokens the supplier counted, including any it served from its own cache. |
input_tokens_details | ResponsesInputTokensDetails, необязателен — How the input divides, when the supplier said. |
output_tokens | integer, необязателен — Output tokens the supplier counted. |
total_tokens | integer, необязателен — Input and output together. |
ResponsesStreamEvent
| член | что это |
|---|
content_index | integer, необязателен — The index of the content part this event is about, within its own output item. |
delta | string, необязателен — The fragment a delta event carries: text on response.output_text.delta, the model's own refusal on response.refusal.delta, argument text on response.function_call_arguments.delta and response.tool_search_call_arguments.delta, and a custom tool's freeform input on response.custom_tool_call_input.delta. |
item | ResponsesOutputItem, необязателен — The item, on response.output_item.added — opened, so it carries its id and status in_progress, a message an empty content list and a call its identity and an empty argument string — on response.output_item.done, finished, under the same id, and on the three web_search_call stage events, carrying the status the search has reached. |
item_id | string, необязателен — The id of the output item this event is about — the same id the item carries on its response.output_item.added, its response.output_item.done and in the finished output. |
logprobs | array of object, необязателен — The token log probabilities of a text fragment, on response.output_text.delta and response.output_text.done — present on both, and always empty: this platform asks no supplier for them and publishes none. |
output_index | integer, необязателен — The index of the output item this event is about. |
part | ResponsesStreamContentPart, необязателен — The content part, on response.content_part.added — opened, so its text is still the empty string — and on response.content_part.done, assembled, carrying exactly the text the fragments between the two events delivered. |
refusal | string, необязателен — The part's assembled refusal, on response.refusal.done: exactly what the part's refusal deltas delivered. |
response | ResponsesStreamSnapshot, необязателен — The response, on the response-scoped events: opening on response.created, complete with output and usage on response.completed or response.incomplete, and carrying this protocol's error envelope on response.failed. |
sequence_number | integer, обязателен — This event's position in the stream that carried it, counting from zero and rising by one on every event the customer is sent. |
text | string, необязателен — The part's assembled text, on response.output_text.done: exactly what the part's output_text deltas delivered. |
type | "response.created" or "response.output_item.added" or "response.content_part.added" or "response.output_text.delta" or "response.refusal.delta" or "response.function_call_arguments.delta" or "response.tool_search_call_arguments.delta" or "response.custom_tool_call_input.delta" or "response.output_text.done" or "response.refusal.done" or "response.web_search_call.in_progress" or "response.web_search_call.searching" or "response.web_search_call.completed" or "response.content_part.done" or "response.output_item.done" or "response.completed" or "response.incomplete" or "response.failed", обязателен — Which event this is. |
ResponsesOutputItem
ResponsesOutputItem — см. выше.
ResponsesStreamContentPart
| член | что это |
|---|
annotations | array of object, необязателен — The annotations of an output_text part — present on one, and always empty, as on the finished item's own parts. |
refusal | string, необязателен — The model's own refusal, on a refusal part: the empty string on response.content_part.added, and the assembled refusal on response.content_part.done. |
text | string, необязателен — The part's text, on an output_text part: the empty string on response.content_part.added, and the assembled text on response.content_part.done. |
type | "output_text" or "refusal", обязателен — The kind of part: the text the model spoke, or its own refusal. |
ResponsesStreamSnapshot
| член | что это |
|---|
created_at | integer, обязателен — The instant this response was answered, as whole seconds since the Unix epoch. |
error | ResponsesErrorBody, необязателен — This protocol's own error envelope, on response.failed. |
id | string, обязателен — This request's Kumo identity, identical on every event of one stream. |
model | string, обязателен — The model this request named, echoed back exactly as sent, on every snapshot. |
object | "response", обязателен — The kind of object this is. |
output | array of ResponsesOutputItem, необязателен — What the model produced, in order, on response.completed or response.incomplete. |
status | "in_progress" or "completed" or "incomplete" or "failed", обязателен — Where the answer stands. |
usage | ResponsesUsage, необязателен — What the supplier reported this request consumed, on response.completed or response.incomplete. |
ResponsesError
ResponsesErrorBody
| член | что это |
|---|
code | string, необязателен — The machine-readable reason. |
limit | RequestLimit, необязателен — On a request_limit_exceeded refusal, which limit the request exceeded, the limit and the value the request reached; param names the member. |
message | string, обязателен — What went wrong, in a fixed safe sentence. |
param | string, необязателен — The request member at fault, when one member is at fault. |
probe | string, необязателен — On a connect-check refusal only (a model named kumo-connect-check-<32 hex> that no live model answers to, asked with a valid key): kumo-connect-check-<nonce>:<proof>, where proof is the first 16 hex characters of HMAC-SHA256 over the nonce and the key id under a gateway-held key. |
reason | "welcome_model_cap" or "welcome_spent" or "welcome_photos_spent" or "daily_model_limit" or "daily_common_limit" or "daily_usage_limit" or "native_search" or "no_free_allowance" or "input_too_large" or "request_unbounded" or "not_eligible" or "free_variant_unavailable" or "limits_changed" or "free_limits_exhausted" or "requests_per_minute" or "concurrency", необязателен — On a free_limit_exhausted or free_rate_limited refusal only — a request that named a free variant (<model>:free) or the alias kumo/free, which is never paid: why it was refused, in a closed vocabulary. |
reset_at | string, необязателен — On a free_limit_exhausted or free_rate_limited refusal, the instant the limit resets, when one exists: the next 00:00 Europe/Moscow for a daily free limit (and for an account whose daily free limits open then), the end of the counted minute for the per-minute limit. |
type | "invalid_request_error" or "not_found_error" or "authentication_error" or "permission_error" or "rate_limit_error" or "api_error", обязателен — The class of failure, in this protocol's own closed vocabulary. |
POST /v1/systemone
Аутентификация
Authorization: Bearer <key>Операция
public.systemone.createЗадать модели решений типизированные вопросы о состоянии и получить ответы с вероятностями.
Ask a decision model typed questions about a state.
- Протокол: совместим с System One OpenRouter и SDK TypeSafe —
model, state (строка, JSON-объект или JSON-массив) и questions (объект вопросов типов noul, choice, score); ответ — answers по одному на вопрос. - Тарификация: списываются только входные токены;
usage.output_tokens всегда 0. - Стриминг: у этой операции его нет.
{
"model": "<model>",
"questions": {},
"state": "<state>"
}
Запрос несёт:
| член | что это |
|---|
model | string, обязателен — The catalog model to ask, as the customer names it. |
questions | object, обязателен — The questions, keyed by names the caller chooses; each is the model's own question object (for example {"type":"noul","instructions":"…"}). |
state | string or object or array, обязателен — What the questions are about: free text, a JSON object (for example a conversation), or a JSON array (for example a list of messages or of content parts). |
Ответ:
application/jsonDecisionsResponseBody
при отказеDecisionsError
DecisionsResponseBody
| член | что это |
|---|
answers | object, обязателен — One answer per question, keyed by the question's name. |
id | string, обязателен — This request's Kumo identity, to quote in a support question. |
model | string, обязателен — The model this request named, echoed back exactly as it was sent. |
usage | DecisionsUsage, обязателен — What the request cost. |
DecisionsUsage
| член | что это |
|---|
input_tokens | integer, обязателен — The input tokens charged for this request. |
output_tokens | integer, обязателен — Always zero: this surface bills input tokens only. |
DecisionsError
DecisionsErrorBody
| член | что это |
|---|
code | string, обязателен — The machine-readable reason, shared with every Kumo surface. |
message | string, обязателен — A safe description of the failure. |
request_id | string, необязателен — The Kumo request identifier, for support. |
type | string, обязателен — The class of failure. |
Каждая операция выше выпущена из описания API, против которого собрана эта сборка. О том, как получить всю эту документацию одним Markdown-документом, — на машиночитаемой странице.