Перейти к содержимомуKumoДокументация
Разделы
На странице
Шлюз

Справочник API

Каждая операция шлюза Kumo, сгенерированная из опубликованного описания API: адрес, способ аутентификации, содержимое запроса и то, что приходит в ответ.

Открыть как Markdown

Эта страница сгенерирована из описания API, против которого собрана эта сборка, — поэтому она говорит, на что шлюз отвечает, а не на что его когда-то описали отвечающим. Каждый член ниже — член провода. Формулировки самих операций процитированы из описания API и потому остаются английскими: перевод создал бы второе утверждение о проводе, за которым не следит ни одна проверка.

POST /v1/chat/completions

Метод
POST
Путь
/v1/chat/completions
Аутентификация
Authorization: Bearer <key>
Операция
public.chat_completions.create

OpenAI-совместимый чат: отправляете разговор, получаете одно завершение или поток чанков в ответ.

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_tokensinteger, необязателен — The output ceiling, in the current spelling.
max_tokensinteger, необязателен — The output ceiling, in the spelling long-established clients send.
messagesarray of ChatMessage, обязателен — The conversation, in order.
modelstring, обязателен — The model to answer with: a canonical name or an alias the published catalog carries.
ninteger, необязателен — How many completions to answer with.
presence_penaltynumber, необязателен — Presence penalty from -2 to 2 inclusive.
reasoning_effortstring, необязателен — 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_formatChatResponseFormat, необязателен — A structured output requirement.
stoparray 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.
streamboolean, необязателен — Whether to stream the answer.
stream_optionsChatStreamOptions, необязателен — Options that apply only when stream is true.
systemstring or array of ChatContentPart, необязателен — A system prompt beside the conversation, as OpenAI-compatible agents sometimes spell it.
temperaturenumber, необязателен — 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.
toolsarray of ChatTool, необязателен — The tools this turn may call.
top_pnumber, необязателен — Nucleus sampling, from 0 to 1.
userstring, необязателен — An opaque label for the end user this request is made on behalf of, as OpenAI-compatible clients send it.

ChatMessage

членчто это
cache_controlChatCacheControl, необязателен — 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.
contentstring 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.
namestring, необязателен — The tool this result came from, as OpenAI-compatible clients write it on a tool turn.
reasoningstring, необязателен — Accepted and NOT CARRIED: a prior assistant answer's reasoning, replayed by an OpenAI-compatible client.
reasoning_contentstring, необязателен — 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_idstring, необязателен — The call this result answers.
tool_callsarray 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.

ChatResponseFormat

членчто это
json_schemaStructuredSchema, необязателен — The named schema an answer must satisfy.
typestring, обязателен — The kind of format.

ChatStreamOptions

членчто это
include_usageboolean, необязателен — 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_controlChatCacheControl, необязателен — 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.
fileChatContentPartFile, необязателен — Declared and NEVER SERVED: the document a file part carries.
image_urlChatContentPartImage, необязателен — The image carried by an image_url part.
input_audioChatContentPartAudio, необязателен — Declared and NEVER SERVED: the sound an input_audio part carries.
refusalstring, необязателен — Declared and NEVER SERVED: the model's own refusal, replayed.
textstring, необязателен — On a text part, the text.
type"text" or "image_url" or "input_audio" or "file" or "refusal", обязателен — Which kind of part this is.

ChatTool

членчто это
functionChatToolFunction, обязателен
type"function", обязателен — The kind of tool.

Ответ:

application/jsonChatCompletionsReply
text/event-streamChatCompletionsChunk
при отказеChatCompletionsError

ChatCompletionsReply

членчто это
choicesarray of ReplyChoice, обязателен — The answer.
createdinteger, обязателен — The instant this completion was answered, as whole seconds since the Unix epoch.
idstring, обязателен — This request's Kumo identity.
modelstring, обязателен — The model this request named, echoed back exactly as it was sent.
object"chat.completion", обязателен — The kind of object this is.
usageReplyUsage, необязателен — What the supplier reported this request consumed.

ReplyChoice

членчто это
finish_reason"stop" or "length" or "tool_calls" or "content_filter", обязателен — Why the model stopped.
indexinteger, обязателен — The position of this choice.
messageReplyMessage, обязателен

ReplyUsage

членчто это
completion_tokensinteger, необязателен — Output tokens the supplier counted.
prompt_tokensinteger, необязателен — Input tokens the supplier counted, including any it served from its own cache.
prompt_tokens_detailsPromptTokensDetails, необязателен — How the input divides, when the supplier said.
total_tokensinteger, необязателен — Input and output together.

ChatCompletionsChunk

членчто это
choicesarray of ChunkChoice, обязателен — This chunk's delta.
createdinteger, обязателен — The instant this completion was answered, as whole seconds since the Unix epoch.
idstring, обязателен — This request's Kumo identity, identical on every chunk of one stream.
modelstring, обязателен — 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.
usageReplyUsage, необязателен — 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

членчто это
deltaChunkDelta, обязателен
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.
indexinteger, обязателен — The position of this choice.

ReplyUsage

ReplyUsage — см. выше.

ChatCompletionsError

членчто это
errorChatCompletionsErrorBody, обязателен

ChatCompletionsErrorBody

членчто это
codestring, необязателен — The machine-readable reason.
limitRequestLimit, необязателен — On a request_limit_exceeded refusal, which limit the request exceeded, the limit and the value the request reached; param names the member.
messagestring, обязателен — What went wrong, in a fixed safe sentence.
paramstring, необязателен — The request member at fault, when one member is at fault.
probestring, необязателен — 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_atstring, необязателен — 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

Метод
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.
inputarray of string, обязателен — The batch of inputs to embed, at most 128 members and 131072 bytes in total.
modelstring, обязателен — The catalog model to embed with, as the customer names it.

Ответ:

application/jsonEmbeddingsResponseBody
при отказеEmbeddingsError

EmbeddingsResponseBody

членчто это
dataarray of EmbeddingsVector, обязателен — One vector per input, in the order the inputs were given.
modelstring, обязателен — The model the vectors were produced with.
object"list", обязателен — Always "list".
usageEmbeddingsUsage, обязателен — What the request cost.

EmbeddingsVector

членчто это
embeddingstring, обязателен — The vector components as base64-encoded little-endian float32 values, which is this protocol's own "base64" encoding format.
indexinteger, обязателен — The position of the input this vector is for.
object"embedding", обязателен — Always "embedding".

EmbeddingsUsage

членчто это
prompt_tokensinteger, обязателен — The input tokens charged for this request.
total_tokensinteger, обязателен — The total tokens charged, which on this surface equals prompt_tokens.

EmbeddingsError

членчто это
errorEmbeddingsErrorBody, обязателен — The failure.

EmbeddingsErrorBody

членчто это
codestring, обязателен — The machine-readable reason, shared with every Kumo surface.
messagestring, обязателен — A safe description of the failure.
request_idstring, необязателен — The Kumo request identifier, for support.
typestring, обязателен — The class of failure.

GET /v1/free/limits

Метод
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

членчто это
activeboolean, обязателен — Whether the organization has free variants at all: the promotion is on and released to it.
modelsarray of FreeLimitsModel, обязателен — Every free model the key may use, by canonical name.
object"free_limits", обязателен
rateFreeLimitsRate, обязателен — The rate limits of free usage, shared by every free model; past either a request answers 429 free_rate_limited.
routerstring, необязателен — 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_modelstring, обязателен — The model's canonical name — the ID of the paid model.
expires_atstring, необязателен — On the welcome level, when the Welcome package ends.
leftinteger, обязателен — 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.
limitinteger, обязателен — The model's limit on its level — on the daily level never above the account's common daily limit; 0 at level none.
modelstring, обязателен — The model ID that uses the model for free: the canonical name with the suffix :free.
requestsFreeLimitsRequests, необязателен — On the daily level, the model's free requests per Moscow day.
reset_atstring, обязателен — 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.
usedinteger, обязателен — What admission counts as taken, requests in flight included; 0 at level none.

FreeLimitsRate

членчто это
concurrencyFreeLimitsConcurrency, обязателен
requests_per_minuteFreeLimitsWindow, обязателен

ErrorEnvelope

членчто это
errorErrorBody, обязателен — The envelope payload.

ErrorBody

членчто это
codestring, обязателен — Machine-readable error code.
field_detailsarray of FieldDetail, необязателен — Per-field rejections, when the error is a validation error.
limitLimitDetail, необязателен — Present when the error is a limit or funding-source rejection.
messagestring, обязателен — Safe human-readable fallback.
promotionPromotionDetail, необязателен — Present when the error is a named promotion refusal.
request_idstring, обязателен — Matches the X-Request-Id response header.
versionstring, обязателен — Envelope version.

POST /v1/images/edits

Метод
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>"
}

Запрос несёт:

членчто это
imagearray of string, необязателен — Source files, in order.
image[]array of string, необязателен — Alternative spelling of image for OpenAI-style clients.
modelstring, обязателен
ninteger, необязателен — How many images to generate.
promptstring, обязателен
response_format"b64_json", необязателен
sizestring, необязателен

Ответ:

application/jsonImagesResponseBody
при отказеImagesErrorBody

ImagesResponseBody

членчто это
createdinteger, обязателен — When the images were generated, as a Unix timestamp in seconds.
dataarray of ImagesDataEntry, обязателен — The generated images, in the order the supplier answered them.

ImagesDataEntry

членчто это
b64_jsonstring, необязателен — The image bytes, base64-encoded.
urlstring, необязателен — A URL the image can be fetched from.

ImagesErrorBody

членчто это
errorImagesErrorPayload, обязателен — The refusal, in the OpenAI-compatible error shape.

ImagesErrorPayload

членчто это
codestring, обязателен — The machine-readable reason.
messagestring, обязателен — A safe human-readable description of the refusal.
paramstring, обязателен — 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_atstring, необязателен — 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.
typestring, обязателен — The coarse OpenAI error class.

POST /v1/images/generations

Метод
POST
Путь
/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>"
}

Запрос несёт:

членчто это
backgroundstring, необязателен — Accepted for OpenAI compatibility and not applied.
modelstring, обязателен — The public model name to generate with.
moderationstring, необязателен — Accepted for OpenAI compatibility and not applied.
ninteger, необязателен — How many images to generate.
output_compressioninteger, необязателен — Accepted for OpenAI compatibility and not applied.
output_formatstring, необязателен — Accepted for OpenAI compatibility and not applied.
promptstring, обязателен — The prompt to generate an image from.
qualitystring, необязателен — Accepted for OpenAI compatibility and not applied.
response_formatstring, необязателен — Requested image representation: url or b64_json.
sizestring, необязателен — The image size as WIDTHxHEIGHT, for example 1024x1024.
stylestring, необязателен — Accepted for OpenAI compatibility and not applied.
userstring, необязателен — 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

Метод
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_managementobject, необязателен — This protocol's context-management configuration, as the beta spells it.
max_tokensinteger, обязателен — The maximum number of tokens to generate.
messagesarray of MessagesInputMessage, обязателен — The conversation, oldest turn first.
metadataMessagesMetadata, необязателен — This protocol's request metadata.
modelstring, обязателен — The catalog model to answer with, as the customer names it.
output_configobject, необязателен — 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).
safeguardsarray 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_sequencesarray of string, необязателен — Sequences that end the answer when the model produces one.
streamboolean, необязателен — 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.
systemstring or array of MessagesSystemBlock, необязателен — The system prompt, beside the conversation rather than as a turn of it.
temperaturenumber, необязателен — How much randomness to use, from 0 to 1.
thinkingobject, необязателен — 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_choiceMessagesToolChoice, необязателен — Forces one of the declared tools.
toolsarray of MessagesTool, необязателен — The tools this turn may call.
top_kinteger, необязателен — Keep only the K most likely tokens when sampling.
top_pnumber, необязателен — Nucleus sampling, from 0 to 1.

MessagesInputMessage

членчто это
contentstring or array of MessagesContentBlock, обязателен — What the turn says.
output_configobject, необязателен — 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.

MessagesMetadata

членчто это
user_idstring, необязателен — An opaque identifier the caller keeps for its own end user.

MessagesSystemBlock

членчто это
cache_controlMessagesCacheControl, необязателен — Marks this block as a prompt-cache anchor.
textstring, обязателен — The block's text.
type"text", обязателен — Always "text".

MessagesToolChoice

членчто это
disable_parallel_tool_useboolean, необязателен — Whether at most one tool may be called in one answer; the default is that several may be.
namestring, необязателен — 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.

MessagesTool

членчто это
allowed_callersarray of string, необязателен — The beta's list of tools permitted to call this one.
allowed_domainsarray of string, необязателен — On a hosted search, the allowed domains; mutually exclusive with blocked_domains.
blocked_domainsarray of string, необязателен — On a hosted search, the blocked domains; mutually exclusive with allowed_domains.
cache_controlMessagesCacheControl, необязателен — Marks this declaration as a prompt-cache anchor; the tool list is part of the cached prefix.
defer_loadingboolean, необязателен — The beta's request to load this declaration only when it is first needed.
descriptionstring, необязателен — What the tool does.
eager_input_streamingboolean, необязателен — The beta's request to begin streaming this tool's arguments before they are complete.
input_examplesarray of object, необязателен — The beta's example arguments for this tool, each the JSON object input_schema describes.
input_schemaobject, необязателен — The tool's parameters, as the JSON Schema the caller wrote for its own tool.
max_usesinteger, необязателен — On native web search, the maximum number of searches in this request, relayed to the supplier and reserved before execution.
namestring, обязателен — The tool's name.
strictboolean, необязателен — The beta's request that the arguments conform exactly to input_schema.
typestring, необязателен — The declaration kind: absent or custom is a caller tool; web_search_20250305 is supplier-hosted web search, relayed natively.
user_locationMessagesSearchLocation, необязателен — On a hosted search, its approximate search location.

Ответ:

application/jsonMessagesReply
text/event-streamMessagesStreamEvent
при отказеMessagesError

MessagesReply

членчто это
contentarray of MessagesReplyBlock, обязателен — The answer's blocks, in order.
idstring, обязателен — The Kumo request identifier for this answer.
modelstring, обязателен — The model the customer named.
rolestring, обязателен — Always "assistant".
stop_reason"end_turn" or "max_tokens" or "stop_sequence" or "tool_use" or "pause_turn", обязателен — Why the answer ended.
typestring, обязателен — Always "message".
usageMessagesReplyUsage, необязателен — What the request cost, exactly as this platform settles it.

MessagesReplyBlock

членчто это
citationsarray of MessagesWebCitation, необязателен — On a text block, native web-search citations.
contentstring or array of MessagesToolResultBlock or object, необязателен — On a web_search_tool_result, the native result list or typed search error, preserved for replay.
datastring, необязателен — On a redacted_thinking block, the vendor's opaque data: thinking the vendor encrypted rather than showed.
idstring, необязателен — On a tool use, its identifier.
inputobject, необязателен — On a tool use, the arguments as the JSON object the supplier produced.
namestring, необязателен — On a tool use, the tool called.
signaturestring, необязателен — On a thinking block, the vendor's opaque signature of it.
textstring, необязателен — On a text block, the text.
thinkingstring, необязателен — On a thinking block, the model's thinking text; it may be the empty string.
tool_use_idstring, необязателен — 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_creationMessagesCacheCreation, необязателен — The cache write by lifetime.
cache_creation_input_tokensinteger, обязателен — Input tokens written to the prompt cache.
cache_read_input_tokensinteger, обязателен — Input tokens served from the prompt cache.
input_tokensinteger, обязателен — Input tokens charged, excluding cache reads and writes.
output_tokensinteger, обязателен — Output tokens charged.
server_tool_useMessagesWebSearchUsage, необязателен — Supplier-reported server-tool usage, including successful web search calls.

MessagesStreamEvent

членчто это
content_blockMessagesStreamBlock, необязателен — On content_block_start, the opening block.
deltaMessagesStreamDelta, необязателен — On content_block_delta, the fragment; on message_delta, the closing facts.
errorMessagesErrorBody, необязателен — On error, the failure, in this protocol's own envelope.
indexinteger, необязателен — On the block events, which block.
messageMessagesStreamMessage, необязателен — 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.
usageMessagesReplyUsage, необязателен — On message_delta, what the request cost — exactly as this platform settles it, and exactly what the unary reply would state.

MessagesStreamBlock

членчто это
citationsarray of MessagesWebCitation, необязателен — On a text opening, the native citations already present.
contentstring or array of MessagesToolResultBlock or object, необязателен — On a web_search_tool_result, its complete native results or typed error.
datastring, необязателен — On a redacted_thinking block, the vendor's opaque data, whole: this block has no fragments.
idstring, необязателен — On a tool use, its identifier.
inputobject, необязателен — On a tool use, the opening input — the empty object; the arguments arrive as input_json_delta fragments.
namestring, необязателен — On a tool use, the tool called.
signaturestring, необязателен — On a thinking block, the opening signature — ordinarily empty; the vendor's opaque signature arrives as a signature_delta fragment before the block closes.
textstring, необязателен — On a text block, the opening text — empty; the text arrives as deltas.
thinkingstring, необязателен — On a thinking block, the opening thinking text — ordinarily empty; the text arrives as thinking_delta fragments.
tool_use_idstring, необязателен — 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

членчто это
citationMessagesWebCitation, необязателен — On citations_delta, the native web-search citation.
partial_jsonstring, необязателен — On input_json_delta, the fragment of the call's input object, as partial JSON text.
signaturestring, необязателен — 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.
textstring, необязателен — On text_delta, the fragment of the answer's text.
thinkingstring, необязателен — 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

членчто это
codestring, необязателен — The machine-readable reason, shared with every Kumo surface.
limitRequestLimit, необязателен — On a request_limit_exceeded refusal, which limit the request exceeded, the limit and the value the request reached; param names the member.
messagestring, обязателен — A safe description of the failure.
paramstring, необязателен — The member the failure is about, when it is about one.
probestring, необязателен — 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_atstring, необязателен — 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

членчто это
contentarray of MessagesReplyBlock, обязателен — Always empty here: the blocks arrive as events.
idstring, обязателен — The Kumo request identifier for this answer, identical on every event of one stream.
modelstring, обязателен — The model the customer named.
rolestring, обязателен — Always "assistant".
typestring, обязателен — Always "message".
usageMessagesReplyUsage, обязателен — The account's input half, as the supplier stated it on opening; the closing message_delta states the settled whole.

MessagesReplyUsage

MessagesReplyUsage — см. выше.

MessagesError

членчто это
errorMessagesErrorBody, обязателен — The failure.
type"error", обязателен — Always "error".

MessagesErrorBody

MessagesErrorBody — см. выше.

POST /v1/messages/count_tokens

Метод
POST
Путь
/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_managementobject, необязателен — This protocol's context-management configuration, as the beta spells it.
messagesarray of MessagesInputMessage, обязателен — The conversation, oldest turn first.
metadataMessagesMetadata, необязателен — This protocol's request metadata.
modelstring, обязателен — The catalog model to answer with, as the customer names it.
safeguardsarray 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).
systemstring or array of MessagesSystemBlock, необязателен — The system prompt, beside the conversation rather than as a turn of it.
thinkingobject, необязателен — 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_choiceMessagesToolChoice, необязателен — Forces one of the declared tools.
toolsarray of MessagesTool, необязателен — The tools this turn may call.

MessagesInputMessage

MessagesInputMessage — см. выше.

MessagesMetadata

MessagesMetadata — см. выше.

MessagesSystemBlock

MessagesSystemBlock — см. выше.

MessagesToolChoice

MessagesToolChoice — см. выше.

MessagesTool

MessagesTool — см. выше.

Ответ:

application/jsonAnthropicTokenCountReply
при отказеMessagesError

AnthropicTokenCountReply

членчто это
estimatedboolean, обязателен — Always true until an exact local tokenizer is available.
input_tokensinteger, обязателен — The deterministic local estimate of input tokens.

MessagesError

MessagesError — см. выше.

MessagesErrorBody

MessagesErrorBody — см. выше.

GET /v1/models

Метод
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_revisioninteger, обязателен — The append-only catalog revision.
dataarray of PublicCatalogModel, обязателен
first_idstring, необязателен — Anthropic list shape: id of the first entry of data.
has_moreboolean, необязателен — Anthropic list shape: always false, the listing is never paged.
last_idstring, необязателен — Anthropic list shape: id of the last entry of data.
loaded_atstring, обязателен
object"list", обязателен
staleboolean, обязателен — True only when a database refresh failed; the response then retains revision diagnostics but advertises no model capabilities.

PublicCatalogModel

членчто это
added_onstring, необязателен — The UTC day this model was added to the Kumo catalogue, as yyyy-mm-dd.
aliasesarray of string, необязателен
banner_seedinteger, обязателен — The seed of the model's halftone banner.
base_modelstring, необязателен — 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.
benchmarksCatalogBenchmarks, необязателен — 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_namestring, обязателен — The model's canonical name.
capabilitiesarray of ModelCapability, обязателен
context_window_tokensinteger, необязателен — How many tokens this model accepts in one request.
created_atstring, необязателен — RFC 3339 instant of the model.
descriptionstring, необязателен — The model's one-line description as a client that discovers models through this list shows it.
description_enstring, обязателен
description_rustring, обязателен
display_namestring, необязателен — The model's name as a client that discovers models through this list labels it.
display_name_enstring, обязателен
display_name_rustring, обязателен
free_routerboolean, необязателен — 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_variantboolean, необязателен — 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.
idstring, обязателен — 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_inputboolean, необязателен — True when the model accepts photos (image_url parts): declared by the catalogue AND proven by a vision probe.
max_output_tokensinteger, необязателен — How many tokens this model may answer with in one call.
modality_codesarray of "text_generation" or "embeddings" or "image_generation" or "decisions", обязателен
model_idstring, обязателен — The catalog's UUID for this model, the key that pricing, key scopes and usage rows join on.
object"model", обязателен
popularity_rankinteger, необязателен — The model's place in the catalogue's popularity order, 1 first.
protocol_codesarray of "responses" or "chat_completions" or "anthropic_messages" or "embeddings" or "images" or "decisions", обязателен
reasoning_protocol_codesarray 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_onstring, необязателен — The day this model's maker released it, as yyyy-mm-dd.
showcase_positioninteger, необязателен — The model's place on the landing model carousel, ascending.
supplier_countinteger, обязателен — Deprecated compatibility placeholder, always 1.
type"model", необязателен — Anthropic Models API discriminator, always model.
typical_requestCatalogTypicalRequest, необязателен — What one average request to this model actually spends, measured over the platform's own finished traffic.
vendorCatalogVendor, обязателен

ErrorEnvelope

ErrorEnvelope — см. выше.

ErrorBody

ErrorBody — см. выше.

POST /v1/responses

Метод
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_metadataobject, необязателен — Metadata the client keeps about its own session.
includearray of string, необязателен — Extra members the caller asks the answer to carry.
inputstring or array of ResponsesInputItem, обязателен — The conversation, in either spelling this protocol defines: a bare string, or a list of typed items in order.
instructionsstring, необязателен — The system prompt, as this protocol carries it: a member of the request rather than a turn of the conversation.
max_output_tokensinteger, необязателен — The output ceiling.
modelstring, обязателен — The model to answer with: a canonical name or an alias the published catalog carries.
parallel_tool_callsboolean, необязателен — Whether the model may make several tool calls in one turn.
previous_response_idstring, необязателен — A response of this organization that this request follows.
prompt_cache_keystring, необязателен — An opaque key the caller uses to group requests for prompt caching.
reasoningobject, необязателен — 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).
storeboolean, необязателен — Whether the supplier should retain this response for later retrieval.
streamboolean, необязателен — Whether to stream the answer.
textResponsesTextConfig, необязателен — 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.
toolsarray of ResponsesTool, необязателен — The tools this turn may call.

ResponsesInputItem

членчто это
actionobject, необязателен — What a supplier-side search DID, as the supplier described it and as this surface published it.
argumentsstring, необязателен — The arguments the call was made with, as the JSON text the model produced.
call_idstring, необязателен — The call this item is or answers.
contentstring 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_contentstring, необязателен — The supplier's own encrypted record of a reasoning item, as it was given to the client.
executionstring, необязателен — Which side runs a tool_search_call.
idstring, необязателен — The identity this item carried when the caller last saw it.
inputstring, необязателен — 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.
namestring, необязателен — The tool that was called.
namespacestring, необязателен — 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.
outputstring 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.
statusstring, необязателен — How far the item got, in this protocol's own vocabulary and carried as the caller stated it.
summaryarray of ResponsesInputContentPart, необязателен — A reasoning item's summary, in parts of kind summary_text.
toolsarray 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

членчто это
formatResponsesTextFormat, необязателен — The named schema an answer must satisfy.
verbosity"low" or "medium" or "high", необязателен — How much the answer should say.

ResponsesTool

членчто это
descriptionstring, необязателен — What the tool or namespace does.
executionstring, необязателен — Which side runs a TOOL_SEARCH — the reference spells "client" and "server".
external_web_accessboolean, необязателен — Whether a WEB_SEARCH may reach the open web.
filtersResponsesWebSearchFilters, необязателен — What a WEB_SEARCH is limited to.
formatResponsesToolFormat, необязателен — How a CUSTOM tool's freeform answer is shaped.
namestring, необязателен — The tool's name, as it will come back on the call, or a namespace's client-chosen group name.
parametersobject, необязателен — The tool's parameters, as the JSON Schema the caller wrote for its own tool.
search_content_typesarray of string, необязателен — Which kinds of content a WEB_SEARCH may return.
search_context_sizestring, необязателен — How much search context a WEB_SEARCH should gather.
strictboolean, необязателен — Whether the supplier must enforce the parameter schema rather than be encouraged toward it.
toolsarray 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_locationResponsesWebSearchLocation, необязателен — Where a WEB_SEARCH should answer as though it were.

Ответ:

application/jsonResponsesReply
text/event-streamResponsesStreamEvent
при отказеResponsesError

ResponsesReply

членчто это
created_atinteger, обязателен — The instant this response was answered, as whole seconds since the Unix epoch.
idstring, обязателен — This request's Kumo identity.
modelstring, обязателен — The model this request named, echoed back exactly as sent.
object"response", обязателен — The kind of object this is.
outputarray of ResponsesOutputItem, обязателен — What the model produced, in order, as typed items.
status"completed" or "incomplete", обязателен — How the answer ended.
usageResponsesUsage, необязателен — What the supplier reported this request consumed.

ResponsesOutputItem

членчто это
actionobject, необязателен — What a supplier-side search DID, as the supplier described it.
argumentsstring, необязателен — The arguments, as the JSON text the supplier produced.
call_idstring, необязателен — The call's identity, to quote when answering it on the next turn.
contentarray of ResponsesOutputContentPart, необязателен — The message's content, in parts, and a reasoning item's own reasoning text, in parts of kind reasoning_text.
encrypted_contentstring, необязателен — The supplier's own encrypted record of a reasoning item.
executionstring, необязателен — Which side runs a tool_search_call, exactly as the supplier stated it.
idstring, необязателен — The item's own identity.
inputstring, необязателен — The model's freeform answer to a CUSTOM tool, as the text it produced.
namestring, необязателен — The tool that was called.
namespacestring, необязателен — 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.
statusstring, необязателен — How far the item got.
summaryarray of ResponsesOutputContentPart, необязателен — A reasoning item's summary, in parts of kind summary_text.
toolsarray 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_tokensinteger, необязателен — Input tokens the supplier counted, including any it served from its own cache.
input_tokens_detailsResponsesInputTokensDetails, необязателен — How the input divides, when the supplier said.
output_tokensinteger, необязателен — Output tokens the supplier counted.
total_tokensinteger, необязателен — Input and output together.

ResponsesStreamEvent

членчто это
content_indexinteger, необязателен — The index of the content part this event is about, within its own output item.
deltastring, необязателен — 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.
itemResponsesOutputItem, необязателен — 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_idstring, необязателен — 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.
logprobsarray 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_indexinteger, необязателен — The index of the output item this event is about.
partResponsesStreamContentPart, необязателен — 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.
refusalstring, необязателен — The part's assembled refusal, on response.refusal.done: exactly what the part's refusal deltas delivered.
responseResponsesStreamSnapshot, необязателен — 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_numberinteger, обязателен — This event's position in the stream that carried it, counting from zero and rising by one on every event the customer is sent.
textstring, необязателен — 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

членчто это
annotationsarray of object, необязателен — The annotations of an output_text part — present on one, and always empty, as on the finished item's own parts.
refusalstring, необязателен — 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.
textstring, необязателен — 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_atinteger, обязателен — The instant this response was answered, as whole seconds since the Unix epoch.
errorResponsesErrorBody, необязателен — This protocol's own error envelope, on response.failed.
idstring, обязателен — This request's Kumo identity, identical on every event of one stream.
modelstring, обязателен — The model this request named, echoed back exactly as sent, on every snapshot.
object"response", обязателен — The kind of object this is.
outputarray 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.
usageResponsesUsage, необязателен — What the supplier reported this request consumed, on response.completed or response.incomplete.

ResponsesError

членчто это
errorResponsesErrorBody, обязателен

ResponsesErrorBody

членчто это
codestring, необязателен — The machine-readable reason.
limitRequestLimit, необязателен — On a request_limit_exceeded refusal, which limit the request exceeded, the limit and the value the request reached; param names the member.
messagestring, обязателен — What went wrong, in a fixed safe sentence.
paramstring, необязателен — The request member at fault, when one member is at fault.
probestring, необязателен — 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_atstring, необязателен — 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

Метод
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>"
}

Запрос несёт:

членчто это
modelstring, обязателен — The catalog model to ask, as the customer names it.
questionsobject, обязателен — The questions, keyed by names the caller chooses; each is the model's own question object (for example {"type":"noul","instructions":"…"}).
statestring 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

членчто это
answersobject, обязателен — One answer per question, keyed by the question's name.
idstring, обязателен — This request's Kumo identity, to quote in a support question.
modelstring, обязателен — The model this request named, echoed back exactly as it was sent.
usageDecisionsUsage, обязателен — What the request cost.

DecisionsUsage

членчто это
input_tokensinteger, обязателен — The input tokens charged for this request.
output_tokensinteger, обязателен — Always zero: this surface bills input tokens only.

DecisionsError

членчто это
errorDecisionsErrorBody, обязателен — The failure.

DecisionsErrorBody

членчто это
codestring, обязателен — The machine-readable reason, shared with every Kumo surface.
messagestring, обязателен — A safe description of the failure.
request_idstring, необязателен — The Kumo request identifier, for support.
typestring, обязателен — The class of failure.

Каждая операция выше выпущена из описания API, против которого собрана эта сборка. О том, как получить всю эту документацию одним Markdown-документом, — на машиночитаемой странице.