Инструменты, которые выполняет Polza внутри одного запроса, — поиск, чтение страниц, дата и время. Модель вызывает их сама, вы получаете готовый ответ:
Уровень усилий: xhigh, high, medium, low, minimal, none
max_tokens
integer
Максимум токенов на рассуждения
summary
string
Детализация: auto, concise, detailed
enabled
boolean
Включить/выключить рассуждения
exclude
boolean
Скрыть рассуждения из ответа
Авторизации
Authorization
string
header
обязательно
API ключ передаётся в заголовке: Authorization: Bearer <POLZA_AI_API_KEY>
Тело
application/json
model
string
обязательно
Идентификатор модели. Для Chat Completions API поддерживается alias-формат @=&=. Поддерживаемые ключи: provider, reasoning_effort, allow_fallbacks, data_residency. При конфликте alias и обычных полей body API возвращает 400. Для некоторых провайдеров и моделей допустимые значения reasoning_effort отличаются; например, Yandex AI Studio поддерживает только low, medium и high.
Текстовый промпт (альтернатива messages). Если указан, будет преобразован в messages с role=user
Пример:
"Напиши стихотворение про кота"
max_tokens
number
Максимальное количество токенов для генерации
Требуемый диапазон: x >= 1
Пример:
1000
max_completion_tokens
number
Максимальное количество токенов для completion (альтернатива max_tokens)
Требуемый диапазон: x >= 1
Пример:
1000
temperature
number
Температура сэмплинга (0-2). Более высокие значения делают вывод более случайным
Требуемый диапазон: 0 <= x <= 2
Пример:
1
top_p
number
Nucleus sampling: вероятностная масса для рассмотрения (0-1)
Требуемый диапазон: 0 <= x <= 1
Пример:
1
frequency_penalty
number
Штраф за частоту использования токенов (-2 до 2)
Требуемый диапазон: -2 <= x <= 2
Пример:
0
presence_penalty
number
Штраф за присутствие токенов (-2 до 2)
Требуемый диапазон: -2 <= x <= 2
Пример:
0
response_format
object
Формат ответа модели
provider
object
Настройки провайдера для роутинга и фильтрации
Show child attributes
tools
object[]
Инструменты: функции (type: function) исполняет ваш код; серверные (type: polza:*) исполняет Polza внутри запроса
Option 1
Option 2
Show child attributes
max_tool_calls
integer
Максимум вызовов серверных инструментов за запрос (по умолчанию 10, потолок 30; без polza:* игнорируется)
Требуемый диапазон: 1 <= x <= 30
Пример:
10
stop_server_tools_when
object[]
Условия остановки цикла серверных инструментов: step_count заменяет max_tool_calls (потолок 30), spend_cap добавляет мягкий потолок расходов на запрос: он проверяется перед каждым шагом модели, поэтому итог может превысить spend_cap на шаг, на котором потолок пройден, его инструменты и финальный ответ
Выбор инструмента: режим none, auto, required (строкой или объектом {type}), named function или серверный инструмент {type: "polza:<инструмент>"}
Доступные опции:
none,
auto,
required
Пример:
"auto"
reasoning
object
Настройки reasoning для reasoning моделей
Show child attributes
plugins
array
Плагины для расширения функциональности
web_search_options
object
Веб-поиск для любой модели. Модель с родным поиском у провайдера (Возможность native_web_search) ищет сама. Иначе ищет Polza: серверным инструментом polza:web_search, если модель умеет tool calling и организации доступны серверные инструменты, или поиском до вызова модели. Если веб-поиск через Polza выключен на сервере, параметр передаётся провайдеру как есть
Show child attributes
user
string
Уникальный идентификатор конечного пользователя для отслеживания и предотвращения злоупотреблений
Maximum string length: 256
Пример:
"user-123"
stop
stringstring[]
Последовательности, при которых модель прекращает генерацию
Пример:
["\n"]
seed
number
Seed для детерминированной генерации (best-effort)
Пример:
42
n
number
Количество вариантов ответа (1-10)
Требуемый диапазон: 1 <= x <= 10
Пример:
1
stream
boolean
Включить потоковую передачу ответа
Пример:
false
logprobs
boolean
Возвращать log probabilities для output токенов
Пример:
false
top_logprobs
number
Количество наиболее вероятных токенов для возврата (0-20). Требует logprobs: true
Требуемый диапазон: 0 <= x <= 20
Пример:
5
logit_bias
object
Смещение вероятностей токенов по их ID (-100 до 100)
Пример:
{ "50256": -100 }
parallel_tool_calls
boolean
Разрешить параллельный вызов нескольких tools
Пример:
true
prompt_cache_key
string
Ключ серии запросов с общим началом: запросы с одним ключом идут к тому же провайдеру, чтобы попадать в его кэш
Пример:
"agent-42"
prompt_cache_options
object
Настройки кэша начала запроса (OpenAI)
Show child attributes
Пример:
{ "ttl": "12h" }
image_config
object
Настройки обработки изображений
Пример:
{ "quality": "high", "size": 512 }
media_resolution
string
Разрешение обработки медиа для google/gemini-* моделей (Gemini media_resolution). Допустимые значения: MEDIA_RESOLUTION_LOW, MEDIA_RESOLUTION_MEDIUM, MEDIA_RESOLUTION_HIGH, MEDIA_RESOLUTION_UNSPECIFIED. Для остальных моделей игнорируется.
Пример:
"MEDIA_RESOLUTION_LOW"
modalities
enum<string>[]
Типы вывода модели
Доступные опции:
text,
image,
audio
Пример:
["text", "audio"]
audio
object
Настройки аудио выхода для моделей с поддержкой аудио (gpt-audio и др.)
Show child attributes
Ответ
id
string
обязательно
Уникальный идентификатор генерации
Пример:
"gen_581761234567890123"
object
string
обязательно
Тип объекта
Пример:
"chat.completion"
created
number
обязательно
Временная метка создания (Unix timestamp)
Пример:
1703001234
model
string
обязательно
ID модели, которая сгенерировала ответ
Пример:
"openai/gpt-4o"
choices
object[]
обязательно
Массив вариантов ответа
Show child attributes
provider
string
Провайдер обработавший запрос
Пример:
"openai-direct"
system_fingerprint
string
System fingerprint от провайдера
Пример:
"fp_29330a9688"
usage
object
Информация об использовании токенов
Show child attributes
polza
object
Есть, если модель вызывала серверные инструменты: parent_generation_id — id запроса в истории (GET /v1/history/generations/{id}), шаги — /children
Пример:
{ "parent_generation_id": "gen_…" }
Была ли эта страница полезной?
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Polza.ai","colors":{"primary":"#4D7C0F","light":"#A3E635","dark":"#65A30D"},"logo":{"light":"https://mintcdn.com/polza/vvxkgBWcVlkywuwq/logo/light.svg?fit=max\u0026auto=format\u0026n=vvxkgBWcVlkywuwq\u0026q=85\u0026s=03a6a8e98a87bf6c97e54c1bd77e3658","dark":"https://mintcdn.com/polza/vvxkgBWcVlkywuwq/logo/dark.svg?fit=max\u0026auto=format\u0026n=vvxkgBWcVlkywuwq\u0026q=85\u0026s=336d0f754173bad8a33f3ef81a16267b"},"favicon":"https://mintcdn.com/polza/AzzTGFLop3jcikZx/favicon.ico?fit=max\u0026auto=format\u0026n=AzzTGFLop3jcikZx\u0026q=85\u0026s=806cdc343f38a57a177db57fda38732f","api":{"openapi":"https://polza.ai/api/openapi.json"},"navbar":{"links":[{"href":"/glavnoe/support","label":"Поддержка"}],"primary":{"type":"button","label":"Консоль","href":"https://polza.ai/dashboard"}},"footer":{"socials":{"telegram":"https://t.me/polzaai","x":"https://x.com/polza_ai","instagram":"https://instagram.com/polza_ai","youtube":"https://www.youtube.com/@polza_ai"},"links":[{"header":"Polza.ai","items":[{"label":"Главная","href":"https://polza.ai/"},{"label":"Модели и цены","href":"https://polza.ai/models"}]},{"header":"Начать работу","items":[{"label":"Получить API-ключ","href":"https://polza.ai/register"},{"label":"Личный кабинет","href":"https://polza.ai/dashboard"}]},{"header":"Документы","items":[{"label":"Политика обработки персональных данных","href":"https://polza.ai/documents/privacy-policy"},{"label":"Пользовательское соглашение","href":"https://polza.ai/documents/user-agreement"},{"label":"Сведения о ПО Polza.AI","href":"https://polza.ai/software-registry"}]},{"header":"Помощь","items":[{"label":"Поддержка","href":"/glavnoe/support"},{"label":"support@polza.ai","href":"mailto:support@polza.ai"}]}]},"errors":{"404":{"redirect":false,"title":"Страница не найдена","description":"Такой страницы в документации нет — возможно, адрес изменился. Начните с [быстрого старта](/glavnoe/quickstart) или напишите в [поддержку](/glavnoe/support)."}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":false},"navigation":{"global":{"languages":[{"language":"ru","default":true,"href":"/"}],"anchors":[{"anchor":"Модели","icon":"microchip","href":"https://polza.ai/models"},{"anchor":"Консоль","icon":"gauge","href":"https://polza.ai/dashboard"},{"anchor":"Обновления","icon":"clock-rotate-left","href":"/changelog"}]},"pages":[]}},"deployment":{"deploymentMetadataValue":{"subdomain":"polza","hasAudioNarration":false,"actualSubdomain":"polza","customDomains":["polza.ai"],"gitSource":{"type":"github","owner":"polza-ai","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"feedback":{"thumbs":true},"entitlements":{},"buildId":"6b06b18c52e6e0fc9aa10dd4","clientVersion":"0.0.4340","searchFilterCounts":[{"language":"default","tag":"Руководства","count":81},{"language":"default","tag":"Генерация медиа","count":35},{"language":"default","tag":"Интеграции","count":26},{"language":"default","tag":"API Reference","count":23},{"language":"default","tag":"Изображения","count":19},{"language":"default","tag":"Продвинутое","count":13},{"language":"default","tag":"Видео","count":11},{"language":"default","tag":"Документация","count":8},{"language":"default","tag":"Главное","count":8},{"language":"default","tag":"Хранилище","count":6}]},"assistantConfig":{"enableAskAiButton":false,"enableStarterQuestions":false,"enableAskAiSearchBar":true},"basePath":"/docs","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-rbac-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-mintlify-slack","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"agent-integrations-settings","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"site-roles","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"wildcard-email-auth","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[]}
{"page":{"pagePath":"api-reference/chat/completions","slug":"/api-reference/chat/completions","pageMetadata":{"title":"POST Chat Completions","description":"Основной эндпоинт для генерации текста и диалогов","openapi":"POST /v1/chat/completions","icon":"message","href":"/api-reference/chat/completions"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Основной эндпоинт для генерации текста и диалогов\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,li:`li`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,tbody:`tbody`,td:`td`,th:`th`,thead:`thead`,tr:`tr`,ul:`ul`,..._provideComponents(),...props.components},{CodeBlock,CodeGroup,Heading,Table}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!Table)_missingMdxReference(`Table`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Поддерживает текстовые диалоги, мультимодальные запросы (текст + изображения + аудио + видео + файлы), вызов функций и потоковую передачу.`}),`\n`,_jsx(Heading,{level:`2`,id:`возможности`,children:`Возможности`}),`\n`,_jsxs(_components.ul,{children:[`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Агрегация провайдеров`}),` — автоматический выбор оптимального провайдера`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Биллинг в рублях`}),` — точный учет стоимости`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Reasoning Tokens`}),` — поддержка моделей с рассуждениями`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Streaming`}),` — потоковая передача через SSE`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Tool Calling`}),` — вызов внешних функций`]}),`\n`,_jsxs(_components.li,{children:[_jsx(_components.strong,{children:`Мультимодальность`}),` — обработка текста, изображений, аудио, видео и файлов`]}),`\n`]}),`\n`,_jsx(Heading,{level:`2`,id:`параметры-запроса`,children:`Параметры запроса`}),`\n`,_jsx(Heading,{level:`3`,id:`обязательные`,children:`Обязательные`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Параметр`}),_jsx(_components.th,{children:`Тип`}),_jsx(_components.th,{children:`Описание`})]})}),_jsx(_components.tbody,{children:_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`model`})}),_jsx(_components.td,{children:`string`}),_jsxs(_components.td,{children:[`ID модели из `,_jsx(_components.a,{href:`/api-reference/models/list`,children:`списка моделей`})]})]})})]}),`\n`,_jsx(Heading,{level:`3`,id:`контент`,children:`Контент`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Параметр`}),_jsx(_components.th,{children:`Тип`}),_jsx(_components.th,{children:`Описание`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`messages`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Массив сообщений диалога (рекомендуется)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`prompt`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Простой текстовый промпт (альтернатива messages)`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`параметры-генерации`,children:`Параметры генерации`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Параметр`}),_jsx(_components.th,{children:`Тип`}),_jsx(_components.th,{children:`По умолчанию`}),_jsx(_components.th,{children:`Описание`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Без лимита`}),_jsx(_components.td,{children:`Максимум токенов в ответе`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_completion_tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Без лимита`}),_jsx(_components.td,{children:`Альтернатива max_tokens`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`temperature`})}),_jsx(_components.td,{children:`float (0-2)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.0`}),_jsx(_components.td,{children:`Температура (0=детерминированный, 2=креативный)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`top_p`})}),_jsx(_components.td,{children:`float (0-1)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`1.0`}),_jsx(_components.td,{children:`Nucleus sampling`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`top_k`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Top-K sampling`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`frequency_penalty`})}),_jsx(_components.td,{children:`float (-2..2)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0`}),_jsx(_components.td,{children:`Штраф за повторение слов`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`presence_penalty`})}),_jsx(_components.td,{children:`float (-2..2)`}),_jsx(_components.td,{\"data-numeric\":`true`,children:`0`}),_jsx(_components.td,{children:`Штраф за повторение токенов`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stop`})}),_jsx(_components.td,{children:`string/array`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Стоп-последовательности`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`seed`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`—`}),_jsx(_components.td,{children:`Seed для воспроизводимости`})]})]})]}),`\n`,_jsx(Heading,{level:`3`,id:`специальные-возможности`,children:`Специальные возможности`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Параметр`}),_jsx(_components.th,{children:`Тип`}),_jsx(_components.th,{children:`Описание`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stream`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Включить streaming (SSE)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stream_options`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[`Опции стрима: `,_jsx(_components.code,{children:`include_usage`}),`, `,_jsx(_components.code,{children:`include_server_tool_events`}),` (события серверных инструментов), `,_jsx(_components.code,{children:`hide_intermediate_text`}),` (только финальный ответ)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`reasoning`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Настройки reasoning tokens`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tools`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[`Инструменты: ваши функции (`,_jsx(_components.code,{children:`type: \"function\"`}),`) и `,_jsx(_components.a,{href:`/gaidy/server-tools`,children:`серверные инструменты`}),` Polza (`,_jsx(_components.code,{children:`type: \"polza:web_search\"`}),` и др.)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`tool_choice`})}),_jsx(_components.td,{children:`string/object`}),_jsx(_components.td,{children:`Выбор инструмента: “none”, “auto”, “required”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_tool_calls`})}),_jsx(_components.td,{children:`integer (1–30)`}),_jsx(_components.td,{children:`Сколько вызовов серверных инструментов модель может сделать за запрос, по умолчанию 10`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`stop_server_tools_when`})}),_jsx(_components.td,{children:`array`}),_jsxs(_components.td,{children:[`Условия остановки цикла серверных инструментов: `,_jsx(_components.code,{children:`step_count`}),`, `,_jsx(_components.code,{children:`spend_cap`}),` (`,_jsx(_components.a,{href:`/gaidy/server-tools#%D0%BB%D0%B8%D0%BC%D0%B8%D1%82%D1%8B-%D0%B2%D1%8B%D0%B7%D0%BE%D0%B2%D0%BE%D0%B2`,children:`подробнее`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`response_format`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Формат ответа: text, json_object, json_schema, grammar`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`web_search_options`})}),_jsx(_components.td,{children:`object`}),_jsxs(_components.td,{children:[`Веб-поиск: родной поиск провайдера, если модель его поддерживает, иначе поиск Polza (`,_jsx(_components.a,{href:`/gaidy/web-search`,children:`подробнее`}),`)`]})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`provider`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Конфигурация роутинга по провайдерам`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`plugins`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Подключение плагинов`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`modalities`})}),_jsx(_components.td,{children:`array`}),_jsx(_components.td,{children:`Выходные модальности: “text”, “image”, “audio”`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`audio`})}),_jsx(_components.td,{children:`object`}),_jsx(_components.td,{children:`Конфигурация аудио-вывода (voice, format)`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`user`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Идентификатор конечного пользователя`})]})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`структура-сообщений`,children:`Структура сообщений`}),`\n`,_jsx(Heading,{level:`3`,id:`базовый-формат`,children:`Базовый формат`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`4`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`4`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user|assistant|system|developer|tool\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Текст сообщения\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`мультимодальные-сообщения`,children:`Мультимодальные сообщения`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Что на этом изображении?\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"image_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/image.jpg\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`другие-типы-контента`,children:`Другие типы контента`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Аудио вход`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"input_audio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"input_audio\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"base64...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"mp3\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Видео вход`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"video_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"video_url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"url\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://example.com/video.mp4\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Файл`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"file\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"filename\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"doc.pdf\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"file_data\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"data:application/pdf;base64,...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`системные-сообщения-с-кешированием`,children:`Системные сообщения с кешированием`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`10`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`10`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"system\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Длинная системная инструкция...\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cache_control\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"ephemeral\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`примеры`,children:`Примеры`}),`\n`,_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`7`,language:`shellscript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`shellscript`,children:_jsxs(_components.code,{language:`shellscript`,numberOfLines:`7`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -X`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` POST`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://polza.ai/api/v1/chat/completions\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization: Bearer YOUR_API_KEY\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -H`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type: application/json\"`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:` \\\\`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` -d`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` '{`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\": \"openai/gpt-4o\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [{\"role\": \"user\", \"content\": \"Привет!\"}]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`14`,language:`python`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`python`,children:_jsxs(_components.code,{language:`python`,numberOfLines:`14`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` openai `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`client `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` OpenAI(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` base_url`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://polza.ai/api/v1\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` api_key`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"YOUR_API_KEY\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client.chat.completions.create(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` model`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-5-20250929\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` messages`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[{`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Объясни квантовую механику\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.choices[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].message.content)`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`f`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Стоимость: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`response.usage.cost_rub`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`}`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` руб.\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`)`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`16`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`16`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'openai'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` client`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` OpenAI`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` baseURL:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'https://polza.ai/api/v1'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` apiKey:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'YOUR_API_KEY'`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` response`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` client`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chat`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`completions`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`create`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`({`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` model:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'openai/gpt-4o'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` messages:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` [{`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`role:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'user'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` 'Напиши историю'`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` stream:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:` true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`});`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` chunk`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` process`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`stdout`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`write`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`chunk`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`choices`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`delta`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`?.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` ||`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` ''`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]}),`\n`,_jsx(Heading,{level:`2`,id:`ответ`,children:`Ответ`}),`\n`,_jsx(Heading,{level:`3`,id:`успешный-ответ-200`,children:`Успешный ответ (200)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`30`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`30`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"gen_581761234567890123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"chat.completion\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"created\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1677652288`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/gpt-4o\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"provider\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"OpenAI\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"choices\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"index\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"message\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"assistant\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Текст ответа\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finish_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"stop\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usage\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`25`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`150`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"total_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`175`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost_rub\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.04131306`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cost\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.04131306`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"prompt_tokens_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"cached_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"completion_tokens_details\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reasoning_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`streaming-sse`,children:`Streaming (SSE)`}),`\n`,_jsxs(_components.p,{children:[`При `,_jsx(_components.code,{children:`stream: true`}),` ответ приходит в формате Server-Sent Events:`]}),`\n`,_jsx(CodeBlock,{numberOfLines:`8`,language:`text`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`text`,children:_jsxs(_components.code,{language:`text`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"gen_123\",\"object\":\"chat.completion.chunk\",\"created\":1703001234,\"model\":\"openai/gpt-4o\",\"choices\":[{\"index\":0,\"delta\":{\"role\":\"assistant\",\"content\":\"Привет\"}}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"gen_123\",\"object\":\"chat.completion.chunk\",\"created\":1703001234,\"model\":\"openai/gpt-4o\",\"choices\":[{\"index\":0,\"delta\":{\"content\":\" мир\"}}]}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: {\"id\":\"gen_123\",\"object\":\"chat.completion.chunk\",\"created\":1703001234,\"model\":\"openai/gpt-4o\",\"choices\":[],\"usage\":{\"prompt_tokens\":10,\"completion_tokens\":20,\"total_tokens\":30,\"cost_rub\":0.015,\"cost\":0.015}}`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{children:`data: [DONE]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{})})]})})}),`\n`,_jsx(Heading,{level:`2`,id:`tool-calling`,children:`Tool Calling`}),`\n`,_jsx(Heading,{level:`3`,id:`определение-функций`,children:`Определение функций`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`17`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`17`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tools\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"function\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"function\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get_weather\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"description\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Получить текущую погоду\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parameters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"required\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"city\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`]`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool_choice\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"auto\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`серверные-инструменты`,children:`Серверные инструменты`}),`\n`,_jsx(_components.p,{children:`Инструменты, которые выполняет Polza внутри одного запроса, — поиск, чтение страниц, дата и время. Модель вызывает их сама, вы получаете готовый ответ:`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`7`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`7`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tools\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"polza:web_search\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"parameters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"max_results\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`3`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"polza:datetime\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"parameters\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"timezone\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Europe/Moscow\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"max_tool_calls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`5`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Список инструментов, ответ и стриминг — в гайде `,_jsx(_components.a,{href:`/gaidy/server-tools`,children:`Серверные инструменты`}),`.`]}),`\n`,_jsx(Heading,{level:`3`,id:`ответ-модели-с-вызовом-функции`,children:`Ответ модели с вызовом функции`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`6`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`6`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"tool_calls\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"id\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"call_123\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"function\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"get_weather\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"arguments\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`city`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Москва`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`2`,id:`response-format`,children:`Response Format`}),`\n`,_jsx(Heading,{level:`3`,id:`json-schema-структурированный-вывод`,children:`JSON Schema (структурированный вывод)`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"response_format\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"json_schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"json_schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"name\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"my_schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"schema\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"object\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"properties\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"answer\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"string\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`},`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"confidence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"number\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"strict\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`true`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsxs(_components.p,{children:[`Поддерживаемые типы: `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`json_object`}),`, `,_jsx(_components.code,{children:`json_schema`}),`, `,_jsx(_components.code,{children:`grammar`}),` (GBNF).`]}),`\n`,_jsx(Heading,{level:`2`,id:`reasoning-tokens`,children:`Reasoning Tokens`}),`\n`,_jsx(_components.p,{children:`Для моделей с рассуждениями (o1, o3, DeepSeek-R1 и другие):`}),`\n`,_jsx(CodeBlock,{filename:``,numberOfLines:`8`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`8`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"openai/o1-preview\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"messages\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: [{`}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:`\"content\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Реши: 2x + 5 = 13\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}],`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"reasoning\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"effort\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"high\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"max_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1000`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})}),`\n`,_jsx(Heading,{level:`3`,id:`параметры-reasoning`,children:`Параметры reasoning`}),`\n`,_jsxs(Table,{children:[_jsx(_components.thead,{children:_jsxs(_components.tr,{children:[_jsx(_components.th,{children:`Параметр`}),_jsx(_components.th,{children:`Тип`}),_jsx(_components.th,{children:`Описание`})]})}),_jsxs(_components.tbody,{children:[_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`effort`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Уровень усилий: xhigh, high, medium, low, minimal, none`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`max_tokens`})}),_jsx(_components.td,{children:`integer`}),_jsx(_components.td,{children:`Максимум токенов на рассуждения`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`summary`})}),_jsx(_components.td,{children:`string`}),_jsx(_components.td,{children:`Детализация: auto, concise, detailed`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`enabled`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Включить/выключить рассуждения`})]}),_jsxs(_components.tr,{children:[_jsx(_components.td,{children:_jsx(_components.code,{children:`exclude`})}),_jsx(_components.td,{children:`boolean`}),_jsx(_components.td,{children:`Скрыть рассуждения из ответа`})]})]})]})]})}function MDXContent(props={}){const{wrapper:MDXLayout}={..._provideComponents(),...props.components};return MDXLayout?_jsx(MDXLayout,{...props,children:_jsx(_createMdxContent,{...props})}):_createMdxContent(props)}return{default:MDXContent};function _missingMdxReference(id,component){throw new Error(`Expected `+(component?`component`:`object`)+\" `\"+id+\"` to be defined: you likely forgot to import, pass, or provide it.\")}","frontmatter":{},"scope":{"config":{},"pageMetadata":{"title":"POST Chat Completions","description":"Основной эндпоинт для генерации текста и диалогов","openapi":"POST /v1/chat/completions","icon":"message","href":"/api-reference/chat/completions"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Возможности","slug":"возможности","depth":2,"children":[]},{"title":"Параметры запроса","slug":"параметры-запроса","depth":2,"children":[{"title":"Обязательные","slug":"обязательные","depth":3,"children":[]},{"title":"Контент","slug":"контент","depth":3,"children":[]},{"title":"Параметры генерации","slug":"параметры-генерации","depth":3,"children":[]},{"title":"Специальные возможности","slug":"специальные-возможности","depth":3,"children":[]}]},{"title":"Структура сообщений","slug":"структура-сообщений","depth":2,"children":[{"title":"Базовый формат","slug":"базовый-формат","depth":3,"children":[]},{"title":"Мультимодальные сообщения","slug":"мультимодальные-сообщения","depth":3,"children":[]},{"title":"Другие типы контента","slug":"другие-типы-контента","depth":3,"children":[]},{"title":"Системные сообщения с кешированием","slug":"системные-сообщения-с-кешированием","depth":3,"children":[]}]},{"title":"Примеры","slug":"примеры","depth":2,"children":[]},{"title":"Ответ","slug":"ответ","depth":2,"children":[{"title":"Успешный ответ (200)","slug":"успешный-ответ-200","depth":3,"children":[]},{"title":"Streaming (SSE)","slug":"streaming-sse","depth":3,"children":[]}]},{"title":"Tool Calling","slug":"tool-calling","depth":2,"children":[{"title":"Определение функций","slug":"определение-функций","depth":3,"children":[]},{"title":"Серверные инструменты","slug":"серверные-инструменты","depth":3,"children":[]},{"title":"Ответ модели с вызовом функции","slug":"ответ-модели-с-вызовом-функции","depth":3,"children":[]}]},{"title":"Response Format","slug":"response-format","depth":2,"children":[{"title":"JSON Schema (структурированный вывод)","slug":"json-schema-структурированный-вывод","depth":3,"children":[]}]},{"title":"Reasoning Tokens","slug":"reasoning-tokens","depth":2,"children":[{"title":"Параметры reasoning","slug":"параметры-reasoning","depth":3,"children":[]}]}],"codeExamples":{}},"jsLinks":["/docs/_mintlify/custom/polza/2b0415a21fa98304/powered-by-mintlify.js","/docs/_mintlify/custom/polza/4c3cb2e13b25640b/logo-home-link.js"],"openApiReferenceData":{"operation":{"operationId":"ChatController_createChatCompletion[1]","parameters":[],"requestBody":"39260c33-1f63-4137-968a-2c9109db8e73","responses":{"200":"9a1521b8-162a-46f9-a371-09e65b9922c9","400":"347bb2b0-963f-4aca-bb76-08ce740904c6","401":"65fd4b69-7d0c-44fb-ab25-055d3d44419a","402":"68977d92-376b-4f25-b49c-1bc73607a2c0","403":"7d961714-f841-499b-9467-90945ff394b6","404":"3ce5f7b2-afad-4fd7-b292-3e40940c0bd3","408":"f2187167-5a91-485b-a35c-b030d2b2c26f","409":"7943f4a4-3988-44c2-9265-932c94f0be2b","413":"652f4f0c-cdea-436c-9a8c-2630a0b60ef6","429":"1dfd1adf-22b8-4a9b-a1ca-076fdfaf5489","500":"f32f3874-e14d-40b4-8d3b-9e5e5869af03","502":"e80279cb-187d-44fb-b63a-6f701e5dd635","503":"16c58617-cf39-4113-8c2b-a7b2f7f24a93"},"security":["857d845f-e476-4799-bd68-51c5d2fa1315"],"summary":"Создать chat completion","tags":["Чат"],"method":"post","type":"path","servers":["f1a1b627-c52a-463a-86f0-ada828c76efc"],"path":"/v1/chat/completions","baseUrlOptions":["https://polza.ai/api"],"title":"Создать chat completion","description":"Основной эндпоинт для генерации текста и диалогов","codeSamples":[],"requiredOnlyExamples":false,"requestExampleType":"generated","responseExampleType":"generated"},"dependencies":{"parameters":{},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"model":{"type":"string","description":"Идентификатор модели. Для Chat Completions API поддерживается alias-формат \u003cmodel>@\u003ckey>=\u003cvalue>\u0026\u003ckey>=\u003cvalue>. Поддерживаемые ключи: provider, reasoning_effort, allow_fallbacks, data_residency. При конфликте alias и обычных полей body API возвращает 400. Для некоторых провайдеров и моделей допустимые значения reasoning_effort отличаются; например, Yandex AI Studio поддерживает только low, medium и high.","example":"openai/gpt-4o@provider=google\u0026reasoning_effort=high\u0026allow_fallbacks=false","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"messages":{"description":"Массив сообщений для отправки модели (обязателен если не указан prompt)","example":[{"role":"system","content":"Ты полезный ассистент"},{"role":"user","content":"Привет! Как дела?"}],"type":"array","items":{"type":"object","properties":{"role":{"type":"string","description":"Роль отправителя сообщения","enum":["user","assistant","system","developer","tool"],"example":"user","isRequired":true,"uniqueKey":"messages.items.[INDEX].role","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","description":"Содержимое сообщения: строка, массив частей контента или null для assistant с tool_calls. Часть массива — объект с полем type из списка: text, refusal, image_url, input_audio, video_url, input_video, file, document, search_result; вложенные массивы и части-строки не принимаются","example":"Привет, как дела?","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"oneOf":[{"type":"object","required":["type","text"],"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"text":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.text","typeLabel":"string"},"cache_control":{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["ephemeral"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.cache_control.type","typeLabel":"enum\u003cstring>"},"ttl":{"type":"string","enum":["5m","1h"],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.cache_control.ttl","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0.cache_control","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type","refusal"],"properties":{"type":{"type":"string","enum":["refusal"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.type","typeLabel":"enum\u003cstring>"},"refusal":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1.refusal","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.1","typeLabel":"object"},{"type":"object","required":["type","image_url"],"properties":{"type":{"type":"string","enum":["image_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.type","typeLabel":"enum\u003cstring>"},"image_url":{"type":"object","properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.image_url.url","typeLabel":"string"},"detail":{"type":"string","enum":["auto","low","high"],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.image_url.detail","typeLabel":"enum\u003cstring>"}},"required":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.image_url","typeLabel":"object"},"video_metadata":{"type":"object","properties":{"fps":{"type":"number","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_metadata.fps","typeLabel":"number"},"start_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_metadata.start_offset","typeLabel":"string"},"end_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_metadata.end_offset","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2.video_metadata","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.2","typeLabel":"object"},{"type":"object","required":["type","input_audio"],"properties":{"type":{"type":"string","enum":["input_audio"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.type","typeLabel":"enum\u003cstring>"},"input_audio":{"type":"object","properties":{"data":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio.data","typeLabel":"string"},"format":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio.format","typeLabel":"string"}},"required":["data","format"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3.input_audio","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.3","typeLabel":"object"},{"type":"object","required":["type","video_url"],"properties":{"type":{"type":"string","enum":["video_url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.type","typeLabel":"enum\u003cstring>"},"video_url":{"type":"object","properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.video_url.url","typeLabel":"string"}},"required":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.video_url","typeLabel":"object"},"video_metadata":{"type":"object","properties":{"fps":{"type":"number","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.video_metadata.fps","typeLabel":"number"},"start_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.video_metadata.start_offset","typeLabel":"string"},"end_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.video_metadata.end_offset","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4.video_metadata","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.4","typeLabel":"object"},{"type":"object","required":["type","video_url"],"properties":{"type":{"type":"string","enum":["input_video"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.type","typeLabel":"enum\u003cstring>"},"video_url":{"type":"object","properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.video_url.url","typeLabel":"string"}},"required":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.video_url","typeLabel":"object"},"video_metadata":{"type":"object","properties":{"fps":{"type":"number","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.video_metadata.fps","typeLabel":"number"},"start_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.video_metadata.start_offset","typeLabel":"string"},"end_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.video_metadata.end_offset","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5.video_metadata","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.5","typeLabel":"object"},{"type":"object","required":["type","file"],"properties":{"type":{"type":"string","enum":["file"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.type","typeLabel":"enum\u003cstring>"},"file":{"oneOf":[{"type":"object","required":["file_data"],"properties":{"file_data":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.0.file_data","typeLabel":"string"},"url":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.0.url","typeLabel":"string"},"filename":{"type":"string","example":"document.pdf","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.0.filename","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.0","typeLabel":"object"},{"type":"object","required":["url"],"properties":{"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.1.url","typeLabel":"string"},"file_data":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.1.file_data","typeLabel":"string"},"filename":{"type":"string","example":"document.pdf","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.1.filename","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file.oneOf.1","typeLabel":"object"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.file","typeLabel":"object"},"video_metadata":{"type":"object","properties":{"fps":{"type":"number","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.video_metadata.fps","typeLabel":"number"},"start_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.video_metadata.start_offset","typeLabel":"string"},"end_offset":{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.video_metadata.end_offset","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6.video_metadata","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.6","typeLabel":"object"},{"type":"object","required":["type","source"],"properties":{"type":{"type":"string","enum":["document"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.type","typeLabel":"enum\u003cstring>"},"source":{"oneOf":[{"type":"object","description":"Источник документа: PDF в base64, простой текст, ссылка на PDF или набор текстовых частей и картинок","required":["type","media_type","data"],"properties":{"type":{"type":"string","enum":["base64"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.0.type","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","enum":["application/pdf"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.0.media_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.0.data","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.0","typeLabel":"object"},{"type":"object","description":"Источник документа: PDF в base64, простой текст, ссылка на PDF или набор текстовых частей и картинок","required":["type","media_type","data"],"properties":{"type":{"type":"string","enum":["text"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.1.type","typeLabel":"enum\u003cstring>"},"media_type":{"type":"string","enum":["text/plain"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.1.media_type","typeLabel":"enum\u003cstring>"},"data":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.1.data","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.1","typeLabel":"object"},{"type":"object","description":"Источник документа: PDF в base64, простой текст, ссылка на PDF или набор текстовых частей и картинок","required":["type","url"],"properties":{"type":{"type":"string","enum":["url"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.2.type","typeLabel":"enum\u003cstring>"},"url":{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.2.url","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.2","typeLabel":"object"},{"type":"object","description":"Источник документа: PDF в base64, простой текст, ссылка на PDF или набор текстовых частей и картинок","required":["type","content"],"properties":{"type":{"type":"string","enum":["content"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.3.type","typeLabel":"enum\u003cstring>"},"content":{"oneOf":[{"type":"string","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.3.content.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"object","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.3.content.oneOf.1.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.3.content.oneOf.1","typeLabel":"object[]"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.3.content","typeLabel":"string | object[]"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source.oneOf.3","typeLabel":"object"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.source","typeLabel":"object"},"title":{"oneOf":[{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.title.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.title.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.title","typeLabel":"string | null"},"context":{"oneOf":[{"type":"string","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.context.oneOf.0","typeLabel":"string"},{"type":"null","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.context.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.context","typeLabel":"string | null"},"citations":{"oneOf":[{"type":"object","description":"Цитаты по документу работают только у провайдера с родным форматом Anthropic. Если у модели такого провайдера нет, enabled: true даёт 400 с reason chatDocumentCitationsUnsupported","properties":{"enabled":{"type":"boolean","uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.citations.oneOf.0.enabled","typeLabel":"boolean"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.citations.oneOf.0","typeLabel":"object"},{"type":"null","description":"Цитаты по документу работают только у провайдера с родным форматом Anthropic. Если у модели такого провайдера нет, enabled: true даёт 400 с reason chatDocumentCitationsUnsupported","properties":{"enabled":{"type":"boolean"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.citations.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7.citations","typeLabel":"object | null"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.7","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","enum":["search_result"],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.8.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX].oneOf.8","typeLabel":"object"}],"uniqueKey":"messages.items.[INDEX].content.oneOf.1.items.[INDEX]","typeLabel":"object"},"description":"Содержимое сообщения: строка, массив частей контента или null для assistant с tool_calls. Часть массива — объект с полем type из списка: text, refusal, image_url, input_audio, video_url, input_video, file, document, search_result; вложенные массивы и части-строки не принимаются","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.1","typeLabel":"object[]"},{"type":"null","isRequired":true,"uniqueKey":"messages.items.[INDEX].content.oneOf.2","typeLabel":"null"}],"isRequired":true,"uniqueKey":"messages.items.[INDEX].content","typeLabel":"string | object[] | null"},"name":{"type":"string","description":"Имя отправителя (опционально)","example":"Иван","uniqueKey":"messages.items.[INDEX].name","typeLabel":"string"},"tool_call_id":{"type":"string","description":"ID вызова инструмента (только для role=tool)","example":"call_abc123","uniqueKey":"messages.items.[INDEX].tool_call_id","typeLabel":"string"},"tool_calls":{"description":"Массив вызовов инструментов (только для role=assistant)","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"Уникальный идентификатор вызова инструмента","example":"call_abc123xyz","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","description":"Тип вызова инструмента","enum":["function"],"example":"function","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"Информация о вызываемой функции","required":["name","arguments"],"properties":{"name":{"type":"string","description":"Имя вызываемой функции","example":"get_weather","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"JSON-строка с аргументами функции","example":"{\"location\": \"Moscow\", \"unit\": \"celsius\"}","isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"isRequired":true,"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].function","typeLabel":"object"},"extra_content":{"type":"object","description":"Подпись вызова провайдера","properties":{"google":{"type":"object","description":"Метаданные вызова Google","properties":{"thought_signature":{"type":"string","description":"Непрозрачная подпись вызова Google","example":"opaque-signature","uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].extra_content.google.thought_signature","typeLabel":"string"}},"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].extra_content.google","typeLabel":"object"}},"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX].extra_content","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"messages.items.[INDEX].tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].tool_calls","typeLabel":"object[]"},"refusal":{"oneOf":[{"type":"object","description":"Текст отказа модели от выполнения запроса (только для role=assistant)","example":"Я не могу помочь с этим запросом","uniqueKey":"messages.items.[INDEX].refusal.oneOf.0","typeLabel":"object"},{"type":"null","description":"Текст отказа модели от выполнения запроса (только для role=assistant)","example":"Я не могу помочь с этим запросом","uniqueKey":"messages.items.[INDEX].refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].refusal","typeLabel":"object | null"},"reasoning":{"oneOf":[{"type":"object","description":"Reasoning текст для моделей с reasoning (только для role=assistant)","example":"Для решения этой задачи мне нужно...","uniqueKey":"messages.items.[INDEX].reasoning.oneOf.0","typeLabel":"object"},{"type":"null","description":"Reasoning текст для моделей с reasoning (только для role=assistant)","example":"Для решения этой задачи мне нужно...","uniqueKey":"messages.items.[INDEX].reasoning.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].reasoning","typeLabel":"object | null"},"reasoning_content":{"oneOf":[{"type":"object","description":"Текст reasoning в формате DeepSeek","example":"Проверяю условия","uniqueKey":"messages.items.[INDEX].reasoning_content.oneOf.0","typeLabel":"object"},{"type":"null","description":"Текст reasoning в формате DeepSeek","example":"Проверяю условия","uniqueKey":"messages.items.[INDEX].reasoning_content.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].reasoning_content","typeLabel":"object | null"},"reasoning_details":{"description":"Структурированные детали reasoning для повторной отправки","type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Тип детали reasoning","example":"reasoning.text","isRequired":true,"uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].type","typeLabel":"string"},"index":{"type":"number","description":"Индекс детали в ответе провайдера","example":0,"uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].index","typeLabel":"number"},"id":{"oneOf":[{"type":"object","description":"Исходный ID reasoning","example":"rs_123","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].id.oneOf.0","typeLabel":"object"},{"type":"null","description":"Исходный ID reasoning","example":"rs_123","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].id.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].id","typeLabel":"object | null"},"text":{"type":"string","description":"Текст рассуждений","example":"Проверяю условия задачи","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].text","typeLabel":"string"},"summary":{"type":"string","description":"Краткое описание рассуждений","example":"Нужен результат инструмента","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].summary","typeLabel":"string"},"signature":{"oneOf":[{"type":"object","description":"Подпись рассуждений провайдера","example":"opaque-signature","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].signature.oneOf.0","typeLabel":"object"},{"type":"null","description":"Подпись рассуждений провайдера","example":"opaque-signature","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].signature.oneOf.1","typeLabel":"null"}],"uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].signature","typeLabel":"object | null"},"data":{"type":"string","description":"Непрозрачные зашифрованные данные провайдера","example":"opaque-data","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].data","typeLabel":"string"},"format":{"type":"string","description":"Формат reasoning провайдера","example":"anthropic-claude-v1","uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX].format","typeLabel":"string"}},"required":["type"],"uniqueKey":"messages.items.[INDEX].reasoning_details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].reasoning_details","typeLabel":"object[]"},"annotations":{"type":"array","description":"Аннотации из ответа провайдера (для кэширования парсинга PDF и других документов)","items":{"type":"object","uniqueKey":"messages.items.[INDEX].annotations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"messages.items.[INDEX].annotations","typeLabel":"object[]"}},"required":["role","content"],"uniqueKey":"messages.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"messages","typeLabel":"object[]"},"prompt":{"type":"string","description":"Текстовый промпт (альтернатива messages). Если указан, будет преобразован в messages с role=user","example":"Напиши стихотворение про кота","uniqueKey":"prompt","typeLabel":"string"},"max_tokens":{"type":"number","description":"Максимальное количество токенов для генерации","example":1000,"minimum":1,"uniqueKey":"max_tokens","typeLabel":"number"},"max_completion_tokens":{"type":"number","description":"Максимальное количество токенов для completion (альтернатива max_tokens)","example":1000,"minimum":1,"uniqueKey":"max_completion_tokens","typeLabel":"number"},"temperature":{"type":"number","description":"Температура сэмплинга (0-2). Более высокие значения делают вывод более случайным","example":1,"minimum":0,"maximum":2,"uniqueKey":"temperature","typeLabel":"number"},"top_p":{"type":"number","description":"Nucleus sampling: вероятностная масса для рассмотрения (0-1)","example":1,"minimum":0,"maximum":1,"uniqueKey":"top_p","typeLabel":"number"},"frequency_penalty":{"type":"number","description":"Штраф за частоту использования токенов (-2 до 2)","example":0,"minimum":-2,"maximum":2,"uniqueKey":"frequency_penalty","typeLabel":"number"},"presence_penalty":{"type":"number","description":"Штраф за присутствие токенов (-2 до 2)","example":0,"minimum":-2,"maximum":2,"uniqueKey":"presence_penalty","typeLabel":"number"},"response_format":{"type":"object","description":"Формат ответа модели","uniqueKey":"response_format","typeLabel":"object"},"provider":{"type":"object","description":"Настройки провайдера для роутинга и фильтрации","properties":{"require_parameters":{"type":"boolean","description":"Требовать от провайдера поддержку всех переданных параметров","example":true,"uniqueKey":"provider.require_parameters","typeLabel":"boolean"},"allow_fallbacks":{"type":"boolean","description":"Разрешить использование резервных провайдеров","example":true,"uniqueKey":"provider.allow_fallbacks","typeLabel":"boolean"},"order":{"description":"Упорядоченный список slug провайдеров для использования","example":["OpenAI","Anthropic"],"type":"array","items":{"type":"string","uniqueKey":"provider.order.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider.order","typeLabel":"string[]"},"only":{"description":"Список разрешенных slug провайдеров","example":["OpenAI","Google"],"type":"array","items":{"type":"string","uniqueKey":"provider.only.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider.only","typeLabel":"string[]"},"ignore":{"description":"Список игнорируемых slug провайдеров","example":["DeepInfra"],"type":"array","items":{"type":"string","uniqueKey":"provider.ignore.items.[INDEX]","typeLabel":"string"},"uniqueKey":"provider.ignore","typeLabel":"string[]"},"sort":{"type":"string","description":"Критерий сортировки провайдеров","enum":["price","throughput","latency"],"example":"price","uniqueKey":"provider.sort","typeLabel":"enum\u003cstring>"},"data_residency":{"type":"string","description":"Где должны обрабатываться данные запроса. `ru` — только провайдеры на инфраструктуре в РФ, в том числе при fallback. Если таких провайдеров у модели нет, запрос отклоняется, а не уходит к иностранному провайдеру. Распознавание PDF (OCR) плагина polza-pdf-parser при `ru` отключается: текст извлекается без него. Инструменты, которые клиент включает сам (веб-поиск, web_fetch), параметр не ограничивает: они обращаются к внешним сервисам","enum":["ru"],"example":"ru","uniqueKey":"provider.data_residency","typeLabel":"enum\u003cstring>"},"max_price":{"type":"object","description":"Максимальные цены для запроса","properties":{"prompt":{"type":"number","description":"Максимальная цена за промпт токены (RUB за миллион токенов)","example":10,"uniqueKey":"provider.max_price.prompt","typeLabel":"number"},"completion":{"type":"number","description":"Максимальная цена за completion токены (RUB за миллион токенов)","example":20,"uniqueKey":"provider.max_price.completion","typeLabel":"number"},"image":{"type":"number","description":"Максимальная цена за изображение (RUB за штуку)","example":5,"uniqueKey":"provider.max_price.image","typeLabel":"number"},"audio":{"type":"number","description":"Максимальная цена за аудио (RUB за миллион токенов)","example":15,"uniqueKey":"provider.max_price.audio","typeLabel":"number"},"request":{"type":"number","description":"Максимальная цена за запрос (RUB за запрос)","example":1,"uniqueKey":"provider.max_price.request","typeLabel":"number"},"video_per_second":{"type":"number","description":"Максимальная цена за секунду видео (RUB за секунду)","example":50,"uniqueKey":"provider.max_price.video_per_second","typeLabel":"number"},"stt_per_minute":{"type":"number","description":"Максимальная цена распознавания речи (RUB за минуту)","example":5,"uniqueKey":"provider.max_price.stt_per_minute","typeLabel":"number"},"tts_per_million_characters":{"type":"number","description":"Максимальная цена синтеза речи (RUB за миллион символов)","example":1500,"uniqueKey":"provider.max_price.tts_per_million_characters","typeLabel":"number"}},"uniqueKey":"provider.max_price","typeLabel":"object"}},"uniqueKey":"provider","typeLabel":"object"},"tools":{"type":"array","description":"Инструменты: функции (type: function) исполняет ваш код; серверные (type: polza:*) исполняет Polza внутри запроса","items":{"oneOf":[{"type":"object","required":["type","function"],"properties":{"type":{"type":"string","description":"Тип инструмента","example":"function","enum":["function"],"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"Определение функции","required":["name"],"properties":{"name":{"type":"string","description":"Название функции","example":"get_weather","isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.function.name","typeLabel":"string"},"description":{"type":"string","description":"Описание функции","example":"Получить текущую погоду для указанного местоположения","uniqueKey":"tools.items.[INDEX].oneOf.0.function.description","typeLabel":"string"},"parameters":{"type":"object","description":"JSON Schema параметров функции","example":{"type":"object","properties":{"location":{"type":"string","description":"Название города"},"unit":{"type":"string","enum":["celsius","fahrenheit"]}},"required":["location"]},"uniqueKey":"tools.items.[INDEX].oneOf.0.function.parameters","typeLabel":"object"},"strict":{"type":"boolean","description":"Строгое соответствие схеме","example":false,"uniqueKey":"tools.items.[INDEX].oneOf.0.function.strict","typeLabel":"boolean"}},"isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.0.function","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX].oneOf.0","typeLabel":"object"},{"type":"object","required":["type"],"properties":{"type":{"type":"string","description":"Тип серверного инструмента с префиксом polza: (openrouter: принимается как алиас); список — GET /v1/server-tools","example":"polza:web_search","isRequired":true,"uniqueKey":"tools.items.[INDEX].oneOf.1.type","typeLabel":"string"},"parameters":{"type":"object","description":"Параметры инструмента по его parameters_schema из GET /v1/server-tools (например max_results, max_uses для polza:web_search). В Responses API параметры можно передать и рядом с type","example":{"max_results":5,"max_uses":3},"uniqueKey":"tools.items.[INDEX].oneOf.1.parameters","typeLabel":"object"}},"uniqueKey":"tools.items.[INDEX].oneOf.1","typeLabel":"object"}],"uniqueKey":"tools.items.[INDEX]","typeLabel":"object"},"uniqueKey":"tools","typeLabel":"object[]"},"max_tool_calls":{"type":"integer","description":"Максимум вызовов серверных инструментов за запрос (по умолчанию 10, потолок 30; без polza:* игнорируется)","example":10,"minimum":1,"maximum":30,"uniqueKey":"max_tool_calls","typeLabel":"integer"},"stop_server_tools_when":{"description":"Условия остановки цикла серверных инструментов: step_count заменяет max_tool_calls (потолок 30), spend_cap добавляет мягкий потолок расходов на запрос: он проверяется перед каждым шагом модели, поэтому итог может превысить spend_cap на шаг, на котором потолок пройден, его инструменты и финальный ответ","type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Тип условия","enum":["step_count","spend_cap"],"example":"step_count","isRequired":true,"uniqueKey":"stop_server_tools_when.items.[INDEX].type","typeLabel":"enum\u003cstring>"},"value":{"type":"number","description":"Для step_count: максимум вызовов серверных инструментов (больше 30 — считается как 30)","example":5,"uniqueKey":"stop_server_tools_when.items.[INDEX].value","typeLabel":"number"},"value_rub":{"type":"number","description":"Для spend_cap: потолок расходов на запрос (модель и инструменты), RUB","example":20,"uniqueKey":"stop_server_tools_when.items.[INDEX].value_rub","typeLabel":"number"}},"required":["type"],"uniqueKey":"stop_server_tools_when.items.[INDEX]","typeLabel":"object"},"uniqueKey":"stop_server_tools_when","typeLabel":"object[]"},"stream_options":{"type":"object","description":"Опции стриминга","properties":{"include_usage":{"type":"boolean","description":"Отдавать usage в финальном чанке (совместимость OpenAI)","example":true,"uniqueKey":"stream_options.include_usage","typeLabel":"boolean"},"include_server_tool_events":{"type":"boolean","description":"Отдавать события цикла серверных инструментов (tool_call, tool_result, step_end, budget_exhausted) полем `polza` в чанках","example":false,"uniqueKey":"stream_options.include_server_tool_events","typeLabel":"boolean"},"hide_intermediate_text":{"type":"boolean","description":"Не отдавать текст промежуточных шагов цикла серверных инструментов («Сейчас поищу…»); финальный ответ приходит одним куском после завершения шага. Только для stream","example":false,"uniqueKey":"stream_options.hide_intermediate_text","typeLabel":"boolean"}},"uniqueKey":"stream_options","typeLabel":"object"},"tool_choice":{"oneOf":[{"type":"string","description":"Выбор инструмента: режим none, auto, required (строкой или объектом `{type}`), named function или серверный инструмент `{type: \"polza:\u003cинструмент>\"}`","enum":["none","auto","required"],"example":"auto","uniqueKey":"tool_choice.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"object","description":"Выбор инструмента: режим none, auto, required (строкой или объектом `{type}`), named function или серверный инструмент `{type: \"polza:\u003cинструмент>\"}`","required":["type"],"example":"auto","properties":{"type":{"type":"string","enum":["none","auto","required"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.1.type","typeLabel":"enum\u003cstring>"}},"uniqueKey":"tool_choice.oneOf.1","typeLabel":"object"},{"type":"object","description":"Выбор инструмента: режим none, auto, required (строкой или объектом `{type}`), named function или серверный инструмент `{type: \"polza:\u003cинструмент>\"}`","required":["type","function"],"example":"auto","properties":{"type":{"type":"string","description":"Тип инструмента","example":"function","enum":["function"],"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.type","typeLabel":"enum\u003cstring>"},"function":{"type":"object","description":"Выбранная функция","required":["name"],"properties":{"name":{"type":"string","description":"Название функции для вызова","example":"get_weather","isRequired":true,"uniqueKey":"tool_choice.oneOf.2.function.name","typeLabel":"string"}},"isRequired":true,"uniqueKey":"tool_choice.oneOf.2.function","typeLabel":"object"}},"uniqueKey":"tool_choice.oneOf.2","typeLabel":"object"},{"type":"object","description":"Выбор инструмента: режим none, auto, required (строкой или объектом `{type}`), named function или серверный инструмент `{type: \"polza:\u003cинструмент>\"}`","required":["type"],"example":"auto","properties":{"type":{"type":"string","pattern":"^polza:","example":"polza:web_search","isRequired":true,"uniqueKey":"tool_choice.oneOf.3.type","typeLabel":"string"}},"uniqueKey":"tool_choice.oneOf.3","typeLabel":"object"}],"uniqueKey":"tool_choice","typeLabel":"enum\u003cstring> · object · object · object"},"reasoning":{"type":"object","description":"Настройки reasoning для reasoning моделей","properties":{"type":{"type":"string","description":"Тип reasoning: adaptive — автовыбор глубины (Claude 4.6+), disabled — отключить. Для Claude 4.6+ используйте adaptive вместо enabled+max_tokens","enum":["adaptive","disabled"],"example":"adaptive","uniqueKey":"reasoning.type","typeLabel":"enum\u003cstring>"},"effort":{"type":"string","description":"Уровень усилий reasoning модели. Для некоторых провайдеров и моделей допустимые значения могут отличаться. Проверяйте документацию конкретного провайдера. Например, для Yandex AI Studio поддерживаются только low, medium и high.","enum":["max","xhigh","high","medium","low","minimal","none"],"example":"medium","uniqueKey":"reasoning.effort","typeLabel":"enum\u003cstring>"},"effort_level":{"type":"string","description":"Уровень усилий для adaptive thinking (Claude 4.6+). Значение max даёт максимальную глубину мышления. Используется вместо effort для Claude 4.6+ моделей","example":"max","uniqueKey":"reasoning.effort_level","typeLabel":"string"},"summary":{"type":"string","description":"Уровень детализации резюме reasoning","enum":["auto","concise","detailed","none"],"example":"auto","uniqueKey":"reasoning.summary","typeLabel":"enum\u003cstring>"},"enabled":{"type":"boolean","description":"Включить/выключить reasoning. По умолчанию определяется из effort или max_tokens","example":true,"uniqueKey":"reasoning.enabled","typeLabel":"boolean"},"max_tokens":{"type":"number","description":"Максимальное количество токенов для reasoning (стиль Anthropic)","example":2000,"uniqueKey":"reasoning.max_tokens","typeLabel":"number"},"exclude":{"type":"boolean","description":"Скрыть reasoning из ответа (модель будет использовать reasoning, но не вернёт его)","example":false,"uniqueKey":"reasoning.exclude","typeLabel":"boolean"}},"uniqueKey":"reasoning","typeLabel":"object"},"plugins":{"type":"array","description":"Плагины для расширения функциональности","uniqueKey":"plugins","typeLabel":"array"},"web_search_options":{"type":"object","description":"Веб-поиск для любой модели. Модель с родным поиском у провайдера (Возможность native_web_search) ищет сама. Иначе ищет Polza: серверным инструментом polza:web_search, если модель умеет tool calling и организации доступны серверные инструменты, или поиском до вызова модели. Если веб-поиск через Polza выключен на сервере, параметр передаётся провайдеру как есть","properties":{"search_context_size":{"type":"string","description":"Принимается для совместимости с OpenAI и на поиск Polza не влияет","enum":["low","medium","high"],"example":"medium","uniqueKey":"web_search_options.search_context_size","typeLabel":"enum\u003cstring>"}},"uniqueKey":"web_search_options","typeLabel":"object"},"user":{"type":"string","description":"Уникальный идентификатор конечного пользователя для отслеживания и предотвращения злоупотреблений","example":"user-123","maxLength":256,"uniqueKey":"user","typeLabel":"string"},"stop":{"oneOf":[{"type":"string","description":"Последовательности, при которых модель прекращает генерацию","example":["\n"],"uniqueKey":"stop.oneOf.0","typeLabel":"string"},{"type":"array","items":{"type":"string","uniqueKey":"stop.oneOf.1.items.[INDEX]","typeLabel":"string"},"description":"Последовательности, при которых модель прекращает генерацию","example":["\n"],"uniqueKey":"stop.oneOf.1","typeLabel":"string[]"}],"uniqueKey":"stop","typeLabel":"string | string[]"},"seed":{"type":"number","description":"Seed для детерминированной генерации (best-effort)","example":42,"uniqueKey":"seed","typeLabel":"number"},"n":{"type":"number","description":"Количество вариантов ответа (1-10)","example":1,"minimum":1,"maximum":10,"uniqueKey":"n","typeLabel":"number"},"stream":{"type":"boolean","description":"Включить потоковую передачу ответа","example":false,"uniqueKey":"stream","typeLabel":"boolean"},"logprobs":{"type":"boolean","description":"Возвращать log probabilities для output токенов","example":false,"uniqueKey":"logprobs","typeLabel":"boolean"},"top_logprobs":{"type":"number","description":"Количество наиболее вероятных токенов для возврата (0-20). Требует logprobs: true","example":5,"minimum":0,"maximum":20,"uniqueKey":"top_logprobs","typeLabel":"number"},"logit_bias":{"type":"object","description":"Смещение вероятностей токенов по их ID (-100 до 100)","example":{"50256":-100},"uniqueKey":"logit_bias","typeLabel":"object"},"parallel_tool_calls":{"type":"boolean","description":"Разрешить параллельный вызов нескольких tools","example":true,"uniqueKey":"parallel_tool_calls","typeLabel":"boolean"},"prompt_cache_key":{"type":"string","description":"Ключ серии запросов с общим началом: запросы с одним ключом идут к тому же провайдеру, чтобы попадать в его кэш","example":"agent-42","uniqueKey":"prompt_cache_key","typeLabel":"string"},"prompt_cache_options":{"type":"object","description":"Настройки кэша начала запроса (OpenAI)","required":["ttl"],"example":{"ttl":"12h"},"properties":{"ttl":{"type":"string","description":"Минимальный срок действия кэша начала запроса у OpenAI: 30m — 30 минут (по умолчанию), 12h — 12 часов. Срок относится к условиям тарификации чтения кэша и не гарантирует ускорение каждого запроса. Запись в 12-часовой кэш стоит вдвое дороже обычной записи, чтение — как обычно. OpenRouter поддерживает настройку для OpenAI GPT-5.6 и новее: явный TTL включает строгую проверку всех параметров запроса; если подходящего маршрута нет, запрос отклоняется. Другие провайдеры поле не используют.","enum":["30m","12h"],"example":"12h","isRequired":true,"uniqueKey":"prompt_cache_options.ttl","typeLabel":"enum\u003cstring>"}},"uniqueKey":"prompt_cache_options","typeLabel":"object"},"image_config":{"type":"object","description":"Настройки обработки изображений","example":{"quality":"high","size":512},"uniqueKey":"image_config","typeLabel":"object"},"media_resolution":{"type":"string","description":"Разрешение обработки медиа для google/gemini-* моделей (Gemini media_resolution). Допустимые значения: MEDIA_RESOLUTION_LOW, MEDIA_RESOLUTION_MEDIUM, MEDIA_RESOLUTION_HIGH, MEDIA_RESOLUTION_UNSPECIFIED. Для остальных моделей игнорируется.","example":"MEDIA_RESOLUTION_LOW","uniqueKey":"media_resolution","typeLabel":"string"},"modalities":{"type":"array","description":"Типы вывода модели","example":["text","audio"],"items":{"type":"string","enum":["text","image","audio"],"uniqueKey":"modalities.items.[INDEX]","typeLabel":"enum\u003cstring>"},"uniqueKey":"modalities","typeLabel":"enum\u003cstring>[]"},"audio":{"type":"object","description":"Настройки аудио выхода для моделей с поддержкой аудио (gpt-audio и др.)","properties":{"voice":{"type":"string","example":"alloy","description":"Голос для генерации аудио","uniqueKey":"audio.voice","typeLabel":"string"},"format":{"type":"string","example":"pcm16","description":"Формат аудио","uniqueKey":"audio.format","typeLabel":"string"}},"uniqueKey":"audio","typeLabel":"object"}},"required":["model","messages"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"model":"openai/gpt-4o@provider=google\u0026reasoning_effort=high\u0026allow_fallbacks=false","messages":[{"role":"system","content":"Ты полезный ассистент"},{"role":"user","content":"Привет! Как дела?"}],"prompt":"Напиши стихотворение про кота","max_tokens":1000,"max_completion_tokens":1000,"temperature":1,"top_p":1,"frequency_penalty":0,"presence_penalty":0,"response_format":{},"provider":{"require_parameters":true,"allow_fallbacks":true,"order":["OpenAI","Anthropic"],"only":["OpenAI","Google"],"ignore":["DeepInfra"],"sort":"price","data_residency":"ru","max_price":{"prompt":10,"completion":20,"image":5,"audio":15,"request":1,"video_per_second":50,"stt_per_minute":5,"tts_per_million_characters":1500}},"tools":[{"type":"function","function":{"name":"get_weather","description":"Получить текущую погоду для указанного местоположения","parameters":{"type":"object","properties":{"location":{"type":"string","description":"Название города"},"unit":{"type":"string","enum":["celsius","fahrenheit"]}},"required":["location"]},"strict":false}}],"max_tool_calls":10,"stop_server_tools_when":[{"type":"step_count","value":5,"value_rub":20}],"stream_options":{"include_usage":true,"include_server_tool_events":false,"hide_intermediate_text":false},"tool_choice":"auto","reasoning":{"type":"adaptive","effort":"medium","effort_level":"max","summary":"auto","enabled":true,"max_tokens":2000,"exclude":false},"plugins":"\u003carray>","web_search_options":{"search_context_size":"medium"},"user":"user-123","stop":["\n"],"seed":42,"n":1,"stream":false,"logprobs":false,"top_logprobs":5,"logit_bias":{"50256":-100},"parallel_tool_calls":true,"prompt_cache_key":"agent-42","prompt_cache_options":{"ttl":"12h"},"image_config":{"quality":"high","size":512},"media_resolution":"MEDIA_RESOLUTION_LOW","modalities":["text","audio"],"audio":{"voice":"alloy","format":"pcm16"}}}},"exampleType":"generated"}},"exampleType":"generated"},"responses":{"9a1521b8-162a-46f9-a371-09e65b9922c9":{"description":"","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","description":"Уникальный идентификатор генерации","example":"gen_581761234567890123","isRequired":true,"uniqueKey":"id","typeLabel":"string"},"object":{"type":"string","description":"Тип объекта","example":"chat.completion","isRequired":true,"uniqueKey":"object","typeLabel":"string"},"created":{"type":"number","description":"Временная метка создания (Unix timestamp)","example":1703001234,"isRequired":true,"uniqueKey":"created","typeLabel":"number"},"model":{"type":"string","description":"ID модели, которая сгенерировала ответ","example":"openai/gpt-4o","isRequired":true,"uniqueKey":"model","typeLabel":"string"},"choices":{"description":"Массив вариантов ответа","type":"array","items":{"type":"object","properties":{"index":{"type":"number","description":"Индекс выбора в массиве choices","example":0,"isRequired":true,"uniqueKey":"choices.items.[INDEX].index","typeLabel":"number"},"message":{"type":"object","description":"Сообщение от модели","required":["role","content"],"properties":{"role":{"type":"string","description":"Роль отправителя сообщения","example":"assistant","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.role","typeLabel":"string"},"content":{"oneOf":[{"type":"object","description":"Содержимое сообщения","example":"Привет! Я хорошо, спасибо что спросили. Чем могу помочь?","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.0","typeLabel":"object"},{"type":"null","description":"Содержимое сообщения","example":"Привет! Я хорошо, спасибо что спросили. Чем могу помочь?","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.content","typeLabel":"object | null"},"name":{"oneOf":[{"type":"object","description":"Имя отправителя","example":"Ассистент","uniqueKey":"choices.items.[INDEX].message.name.oneOf.0","typeLabel":"object"},{"type":"null","description":"Имя отправителя","example":"Ассистент","uniqueKey":"choices.items.[INDEX].message.name.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.name","typeLabel":"object | null"},"tool_calls":{"description":"Вызовы инструментов (tool calls)","type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"ID вызова функции","example":"call_abc123","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].id","typeLabel":"string"},"type":{"type":"string","description":"Тип вызова","example":"function","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].type","typeLabel":"string"},"function":{"type":"object","description":"Информация о функции","required":["name","arguments"],"properties":{"name":{"type":"string","description":"Название функции","example":"get_weather","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.name","typeLabel":"string"},"arguments":{"type":"string","description":"Аргументы функции в JSON формате","example":"{\"location\": \"Moscow\"}","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function.arguments","typeLabel":"string"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].function","typeLabel":"object"},"extra_content":{"type":"object","description":"Подпись вызова провайдера","properties":{"google":{"type":"object","description":"Метаданные вызова Google","properties":{"thought_signature":{"type":"string","description":"Непрозрачная подпись вызова Google","example":"opaque-signature","uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].extra_content.google.thought_signature","typeLabel":"string"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].extra_content.google","typeLabel":"object"}},"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX].extra_content","typeLabel":"object"}},"required":["id","type","function"],"uniqueKey":"choices.items.[INDEX].message.tool_calls.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.tool_calls","typeLabel":"object[]"},"refusal":{"oneOf":[{"type":"object","description":"Отказ модели от выполнения запроса","example":null,"uniqueKey":"choices.items.[INDEX].message.refusal.oneOf.0","typeLabel":"object"},{"type":"null","description":"Отказ модели от выполнения запроса","example":null,"uniqueKey":"choices.items.[INDEX].message.refusal.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.refusal","typeLabel":"object | null"},"reasoning":{"oneOf":[{"type":"object","description":"Reasoning текст (для reasoning моделей)","example":null,"uniqueKey":"choices.items.[INDEX].message.reasoning.oneOf.0","typeLabel":"object"},{"type":"null","description":"Reasoning текст (для reasoning моделей)","example":null,"uniqueKey":"choices.items.[INDEX].message.reasoning.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning","typeLabel":"object | null"},"reasoning_details":{"description":"Детали reasoning для повторной отправки истории","type":"array","items":{"type":"object","properties":{"type":{"type":"string","description":"Тип reasoning детали","example":"reasoning.text","isRequired":true,"uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].type","typeLabel":"string"},"index":{"type":"number","description":"Индекс детали","example":0,"uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].index","typeLabel":"number"},"id":{"oneOf":[{"type":"object","description":"Исходный ID reasoning","example":"rs_123","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].id.oneOf.0","typeLabel":"object"},{"type":"null","description":"Исходный ID reasoning","example":"rs_123","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].id.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].id","typeLabel":"object | null"},"summary":{"type":"string","description":"Краткое описание рассуждений","example":"Нужен результат инструмента","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].summary","typeLabel":"string"},"signature":{"oneOf":[{"type":"object","description":"Непрозрачная подпись рассуждений","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].signature.oneOf.0","typeLabel":"object"},{"type":"null","description":"Непрозрачная подпись рассуждений","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].signature.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].signature","typeLabel":"object | null"},"text":{"type":"string","description":"Текст reasoning (если type=reasoning.text)","example":"Анализирую запрос...","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].text","typeLabel":"string"},"data":{"type":"string","description":"Зашифрованные данные (если type=reasoning.encrypted)","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].data","typeLabel":"string"},"format":{"type":"string","description":"Формат данных","example":"google-gemini-v1","uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX].format","typeLabel":"string"}},"required":["type"],"uniqueKey":"choices.items.[INDEX].message.reasoning_details.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.reasoning_details","typeLabel":"object[]"},"audio":{"type":"object","description":"Аудио данные (для моделей с audio output)","properties":{"id":{"type":"string","description":"ID аудио","uniqueKey":"choices.items.[INDEX].message.audio.id","typeLabel":"string"},"data":{"type":"string","description":"Base64-encoded аудио данные","uniqueKey":"choices.items.[INDEX].message.audio.data","typeLabel":"string"},"transcript":{"type":"string","description":"Текстовая расшифровка","uniqueKey":"choices.items.[INDEX].message.audio.transcript","typeLabel":"string"},"expires_at":{"type":"number","description":"Unix timestamp истечения","uniqueKey":"choices.items.[INDEX].message.audio.expires_at","typeLabel":"number"}},"uniqueKey":"choices.items.[INDEX].message.audio","typeLabel":"object"},"annotations":{"type":"array","description":"Аннотации (ссылки на источники от web search)","items":{"type":"object","uniqueKey":"choices.items.[INDEX].message.annotations.items.[INDEX]","typeLabel":"object"},"uniqueKey":"choices.items.[INDEX].message.annotations","typeLabel":"object[]"}},"isRequired":true,"uniqueKey":"choices.items.[INDEX].message","typeLabel":"object"},"finish_reason":{"oneOf":[{"type":"string","description":"Причина завершения генерации","example":"stop","enum":["stop","length","content_filter","error","tool_calls"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.0","typeLabel":"enum\u003cstring>"},{"type":"null","description":"Причина завершения генерации","example":"stop","enum":["stop","length","content_filter","error","tool_calls"],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].finish_reason","typeLabel":"enum\u003cstring> | null"},"reasoning_details":{"type":"array","description":"Детали reasoning процесса (для reasoning моделей)","uniqueKey":"choices.items.[INDEX].reasoning_details","typeLabel":"array"},"logprobs":{"oneOf":[{"type":"object","description":"Log probabilities для токенов","required":["content","refusal"],"properties":{"content":{"oneOf":[{"description":"Log probabilities для контента","type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5,"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"object"},{"type":"null","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].bytes","typeLabel":"object | null"},"top_logprobs":{"description":"Топ наиболее вероятных токенов с их вероятностями","type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5,"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"object"},{"type":"null","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"object | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.0","typeLabel":"object[]"},{"description":"Log probabilities для контента","type":"null","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111]},{"type":"null","description":"Байты токена","example":[104,101,108,108,111]}]},"top_logprobs":{"description":"Топ наиболее вероятных токенов с их вероятностями","type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111]},{"type":"null","description":"Байты токена","example":[104,101,108,108,111]}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.content","typeLabel":"object[] | null"},"refusal":{"oneOf":[{"description":"Log probabilities для refusal","type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5,"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.0","typeLabel":"object"},{"type":"null","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].bytes","typeLabel":"object | null"},"top_logprobs":{"description":"Топ наиболее вероятных токенов с их вероятностями","type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello","isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].token","typeLabel":"string"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5,"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].logprob","typeLabel":"number"},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.0","typeLabel":"object"},{"type":"null","description":"Байты токена","example":[104,101,108,108,111],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX].bytes","typeLabel":"object | null"}},"required":["token","logprob","bytes"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX].top_logprobs","typeLabel":"object[]"}},"required":["token","logprob","bytes","top_logprobs"],"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.0","typeLabel":"object[]"},{"description":"Log probabilities для refusal","type":"null","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111]},{"type":"null","description":"Байты токена","example":[104,101,108,108,111]}]},"top_logprobs":{"description":"Топ наиболее вероятных токенов с их вероятностями","type":"array","items":{"type":"object","properties":{"token":{"type":"string","description":"Токен","example":"hello"},"logprob":{"type":"number","description":"Log probability токена","example":-0.5},"bytes":{"oneOf":[{"type":"object","description":"Байты токена","example":[104,101,108,108,111]},{"type":"null","description":"Байты токена","example":[104,101,108,108,111]}]}},"required":["token","logprob","bytes"]}}},"required":["token","logprob","bytes","top_logprobs"]},"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal.oneOf.1","typeLabel":"null"}],"isRequired":true,"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0.refusal","typeLabel":"object[] | null"}},"uniqueKey":"choices.items.[INDEX].logprobs.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"choices.items.[INDEX].logprobs.oneOf.1","typeLabel":"null"}],"uniqueKey":"choices.items.[INDEX].logprobs","typeLabel":"object | null"}},"required":["index","message","finish_reason"],"uniqueKey":"choices.items.[INDEX]","typeLabel":"object"},"isRequired":true,"uniqueKey":"choices","typeLabel":"object[]"},"provider":{"type":"string","description":"Провайдер обработавший запрос","example":"openai-direct","uniqueKey":"provider","typeLabel":"string"},"system_fingerprint":{"type":"string","description":"System fingerprint от провайдера","example":"fp_29330a9688","uniqueKey":"system_fingerprint","typeLabel":"string"},"usage":{"type":"object","description":"Информация об использовании токенов","required":["prompt_tokens","completion_tokens","total_tokens"],"properties":{"prompt_tokens":{"type":"number","description":"Количество токенов в промпте","example":10,"isRequired":true,"uniqueKey":"usage.prompt_tokens","typeLabel":"number"},"completion_tokens":{"type":"number","description":"Количество токенов в ответе","example":50,"isRequired":true,"uniqueKey":"usage.completion_tokens","typeLabel":"number"},"total_tokens":{"type":"number","description":"Общее количество токенов (prompt + completion)","example":60,"isRequired":true,"uniqueKey":"usage.total_tokens","typeLabel":"number"},"completion_tokens_details":{"oneOf":[{"type":"object","description":"Детализация токенов completion","properties":{"reasoning_tokens":{"oneOf":[{"type":"object","description":"Токены reasoning (для reasoning моделей)","example":100,"uniqueKey":"usage.completion_tokens_details.oneOf.0.reasoning_tokens.oneOf.0","typeLabel":"object"},{"type":"null","description":"Токены reasoning (для reasoning моделей)","example":100,"uniqueKey":"usage.completion_tokens_details.oneOf.0.reasoning_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details.oneOf.0.reasoning_tokens","typeLabel":"object | null"},"audio_tokens":{"oneOf":[{"type":"object","description":"Аудио токены в ответе","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.audio_tokens.oneOf.0","typeLabel":"object"},{"type":"null","description":"Аудио токены в ответе","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.audio_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details.oneOf.0.audio_tokens","typeLabel":"object | null"},"image_tokens":{"oneOf":[{"type":"object","description":"Токены изображений в ответе","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.image_tokens.oneOf.0","typeLabel":"object"},{"type":"null","description":"Токены изображений в ответе","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.image_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details.oneOf.0.image_tokens","typeLabel":"object | null"},"accepted_prediction_tokens":{"oneOf":[{"type":"object","description":"Принятые токены предсказаний","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.accepted_prediction_tokens.oneOf.0","typeLabel":"object"},{"type":"null","description":"Принятые токены предсказаний","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.accepted_prediction_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details.oneOf.0.accepted_prediction_tokens","typeLabel":"object | null"},"rejected_prediction_tokens":{"oneOf":[{"type":"object","description":"Отклоненные токены предсказаний","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.rejected_prediction_tokens.oneOf.0","typeLabel":"object"},{"type":"null","description":"Отклоненные токены предсказаний","example":0,"uniqueKey":"usage.completion_tokens_details.oneOf.0.rejected_prediction_tokens.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details.oneOf.0.rejected_prediction_tokens","typeLabel":"object | null"}},"uniqueKey":"usage.completion_tokens_details.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.completion_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.completion_tokens_details","typeLabel":"object | null"},"prompt_tokens_details":{"oneOf":[{"type":"object","description":"Детализация токенов промпта","properties":{"cached_tokens":{"type":"number","description":"Кэшированные токены","example":0,"uniqueKey":"usage.prompt_tokens_details.oneOf.0.cached_tokens","typeLabel":"number"},"cache_write_tokens":{"type":"number","description":"Токены, записанные в prompt cache","example":0,"uniqueKey":"usage.prompt_tokens_details.oneOf.0.cache_write_tokens","typeLabel":"number"},"audio_tokens":{"type":"number","description":"Аудио токены в промпте","example":0,"uniqueKey":"usage.prompt_tokens_details.oneOf.0.audio_tokens","typeLabel":"number"},"video_tokens":{"type":"number","description":"Видео токены в промпте","example":0,"uniqueKey":"usage.prompt_tokens_details.oneOf.0.video_tokens","typeLabel":"number"}},"uniqueKey":"usage.prompt_tokens_details.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.prompt_tokens_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.prompt_tokens_details","typeLabel":"object | null"},"server_tool_use":{"oneOf":[{"type":"object","description":"Число исполненных вызовов серверных инструментов по типам: web_search_requests, web_fetch_requests, datetime_requests, …","properties":{"web_search_requests":{"type":"number","description":"Количество вызовов веб-поиска","example":1,"uniqueKey":"usage.server_tool_use.oneOf.0.web_search_requests","typeLabel":"number"}},"uniqueKey":"usage.server_tool_use.oneOf.0","typeLabel":"object"},{"type":"null","uniqueKey":"usage.server_tool_use.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.server_tool_use","typeLabel":"object | null"},"cost_rub":{"oneOf":[{"type":"object","description":"Стоимость запроса в рублях (списано с баланса клиента)","example":0.04131306,"uniqueKey":"usage.cost_rub.oneOf.0","typeLabel":"object"},{"type":"null","description":"Стоимость запроса в рублях (списано с баланса клиента)","example":0.04131306,"uniqueKey":"usage.cost_rub.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.cost_rub","typeLabel":"object | null"},"cost":{"oneOf":[{"type":"object","description":"Стоимость запроса в рублях (alias для cost_rub)","example":0.04131306,"uniqueKey":"usage.cost.oneOf.0","typeLabel":"object"},{"type":"null","description":"Стоимость запроса в рублях (alias для cost_rub)","example":0.04131306,"uniqueKey":"usage.cost.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.cost","typeLabel":"object | null"},"cost_details":{"oneOf":[{"type":"object","description":"Разбивка cost_rub запроса с серверными инструментами: модель (все шаги) и инструменты, RUB","example":{"inference_cost_rub":1.2,"server_tools_cost_rub":0.4},"uniqueKey":"usage.cost_details.oneOf.0","typeLabel":"object"},{"type":"null","description":"Разбивка cost_rub запроса с серверными инструментами: модель (все шаги) и инструменты, RUB","example":{"inference_cost_rub":1.2,"server_tools_cost_rub":0.4},"uniqueKey":"usage.cost_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.cost_details","typeLabel":"object | null"},"server_tool_use_details":{"oneOf":[{"type":"object","description":"Детали цикла серверных инструментов: исполненные вызовы по типам, запрошенные и исполненные вызовы всего, число шагов модели","example":{"web_search_requests":1,"tool_calls_requested":2,"tool_calls_executed":2,"steps":2},"uniqueKey":"usage.server_tool_use_details.oneOf.0","typeLabel":"object"},{"type":"null","description":"Детали цикла серверных инструментов: исполненные вызовы по типам, запрошенные и исполненные вызовы всего, число шагов модели","example":{"web_search_requests":1,"tool_calls_requested":2,"tool_calls_executed":2,"steps":2},"uniqueKey":"usage.server_tool_use_details.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.server_tool_use_details","typeLabel":"object | null"},"plugins":{"oneOf":[{"type":"object","description":"Детализация серверных плагинов","example":{"masker":{"operations":[{"operation":"mask","latency_ms":15,"cost_rub":0.001},{"operation":"unmask","latency_ms":8,"cost_rub":0}],"total_cost_rub":0.001}},"uniqueKey":"usage.plugins.oneOf.0","typeLabel":"object"},{"type":"null","description":"Детализация серверных плагинов","example":{"masker":{"operations":[{"operation":"mask","latency_ms":15,"cost_rub":0.001},{"operation":"unmask","latency_ms":8,"cost_rub":0}],"total_cost_rub":0.001}},"uniqueKey":"usage.plugins.oneOf.1","typeLabel":"null"}],"uniqueKey":"usage.plugins","typeLabel":"object | null"},"plugin_post_process_error":{"type":"boolean","description":"Ошибка post-process плагинов (ответ возвращён в замаскированном виде)","example":true,"uniqueKey":"usage.plugin_post_process_error","typeLabel":"boolean"},"guard":{"type":"object","description":"Проверка запроса политикой защиты данных организации; нет поля — политика к ключу не назначена","required":["policy_version_id","action","entities","layers","degraded"],"properties":{"policy_version_id":{"type":"string","description":"Версия политики защиты, по которой проверен запрос","example":"3f2c1a9e-7b4d-4e8a-9c1f-2d5e6a7b8c9d","isRequired":true,"uniqueKey":"usage.guard.policy_version_id","typeLabel":"string"},"action":{"type":"string","description":"Что сделано с найденными данными: none — ничего не нашлось, audit — только записано, mask — заменено на [ТИП] до отправки модели","enum":["none","audit","mask","pseudonymize","block"],"example":"mask","isRequired":true,"uniqueKey":"usage.guard.action","typeLabel":"enum\u003cstring>"},"entities":{"type":"object","description":"Сколько данных каждого типа нашлось в запросе","additionalProperties":{"type":"number","uniqueKey":"usage.guard.entities.additionalProperties","typeLabel":"number"},"example":{"PHONE":1,"EMAIL":1},"isRequired":true,"uniqueKey":"usage.guard.entities","typeLabel":"object"},"layers":{"description":"Какими способами проверялся запрос","example":["regex"],"type":"array","items":{"type":"string","uniqueKey":"usage.guard.layers.items.[INDEX]","typeLabel":"string"},"isRequired":true,"uniqueKey":"usage.guard.layers","typeLabel":"string[]"},"degraded":{"type":"boolean","description":"true — часть проверок была недоступна и запрос проверен не полностью","example":false,"isRequired":true,"uniqueKey":"usage.guard.degraded","typeLabel":"boolean"}},"uniqueKey":"usage.guard","typeLabel":"object"}},"uniqueKey":"usage","typeLabel":"object"},"polza":{"type":"object","description":"Есть, если модель вызывала серверные инструменты: parent_generation_id — id запроса в истории (GET /v1/history/generations/{id}), шаги — /children","example":{"parent_generation_id":"gen_…"},"uniqueKey":"polza","typeLabel":"object"}},"required":["id","object","created","model","choices"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"id":"gen_581761234567890123","object":"chat.completion","created":1703001234,"model":"openai/gpt-4o","choices":[{"index":0,"message":{"role":"assistant","content":"Привет! Я хорошо, спасибо что спросили. Чем могу помочь?","name":"Ассистент","tool_calls":[{"id":"call_abc123","type":"function","function":{"name":"get_weather","arguments":"{\"location\": \"Moscow\"}"},"extra_content":{"google":{"thought_signature":"opaque-signature"}}}],"refusal":null,"reasoning":null,"reasoning_details":[{"type":"reasoning.text","index":0,"id":"rs_123","summary":"Нужен результат инструмента","signature":{},"text":"Анализирую запрос...","data":"\u003cstring>","format":"google-gemini-v1"}],"audio":{"id":"\u003cstring>","data":"\u003cstring>","transcript":"\u003cstring>","expires_at":123},"annotations":[{}]},"finish_reason":"stop","reasoning_details":"\u003carray>","logprobs":{"content":[{"token":"hello","logprob":-0.5,"bytes":[104,101,108,108,111],"top_logprobs":[{"token":"hello","logprob":-0.5,"bytes":[104,101,108,108,111]}]}],"refusal":[{"token":"hello","logprob":-0.5,"bytes":[104,101,108,108,111],"top_logprobs":[{"token":"hello","logprob":-0.5,"bytes":[104,101,108,108,111]}]}]}}],"provider":"openai-direct","system_fingerprint":"fp_29330a9688","usage":{"prompt_tokens":10,"completion_tokens":50,"total_tokens":60,"completion_tokens_details":{"reasoning_tokens":100,"audio_tokens":0,"image_tokens":0,"accepted_prediction_tokens":0,"rejected_prediction_tokens":0},"prompt_tokens_details":{"cached_tokens":0,"cache_write_tokens":0,"audio_tokens":0,"video_tokens":0},"server_tool_use":{"web_search_requests":1},"cost_rub":0.04131306,"cost":0.04131306,"cost_details":{"inference_cost_rub":1.2,"server_tools_cost_rub":0.4},"server_tool_use_details":{"web_search_requests":1,"tool_calls_requested":2,"tool_calls_executed":2,"steps":2},"plugins":{"masker":{"operations":[{"operation":"mask","latency_ms":15,"cost_rub":0.001},{"operation":"unmask","latency_ms":8,"cost_rub":0}],"total_cost_rub":0.001}},"plugin_post_process_error":true,"guard":{"policy_version_id":"3f2c1a9e-7b4d-4e8a-9c1f-2d5e6a7b8c9d","action":"mask","entities":{"PHONE":1,"EMAIL":1},"layers":["regex"],"degraded":false}},"polza":{"parent_generation_id":"gen_…"}}}},"exampleType":"generated"}},"exampleType":"generated"},"347bb2b0-963f-4aca-bb76-08ce740904c6":{"description":"Некорректный запрос. Проверьте параметры и тело","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"65fd4b69-7d0c-44fb-ab25-055d3d44419a":{"description":"Ошибка авторизации. Проверьте ключ доступа","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"68977d92-376b-4f25-b49c-1bc73607a2c0":{"description":"Недостаточно средств или достигнут лимит","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"7d961714-f841-499b-9467-90945ff394b6":{"description":"Ошибка доступа. Проверьте права доступа ключа","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"3ce5f7b2-afad-4fd7-b292-3e40940c0bd3":{"description":"Ресурс не найден","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"f2187167-5a91-485b-a35c-b030d2b2c26f":{"description":"Истекло время ожидания ответа. Повторите запрос","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"7943f4a4-3988-44c2-9265-932c94f0be2b":{"description":"Конфликт состояния. Перечитайте ресурс и повторите запрос","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"652f4f0c-cdea-436c-9a8c-2630a0b60ef6":{"description":"Размер тела запроса превышает допустимый предел","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"1dfd1adf-22b8-4a9b-a1ca-076fdfaf5489":{"description":"Слишком много запросов. Повторите позже","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"f32f3874-e14d-40b4-8d3b-9e5e5869af03":{"description":"Ошибка сервера. Обратитесь к поставщику услуг","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"e80279cb-187d-44fb-b63a-6f701e5dd635":{"description":"Поставщик услуг вернул некорректный ответ","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"},"16c58617-cf39-4113-8c2b-a7b2f7f24a93":{"description":"Сервис временно недоступен. Повторите позже","content":{"application/json":{"schema":{"type":"object","properties":{"error":{"type":"object","description":"Информация об ошибке","required":["code","message"],"properties":{"code":{"type":"string","description":"Код ошибки","enum":["BAD_REQUEST","UNAUTHORIZED","api_key_revoked","INSUFFICIENT_BALANCE","FORBIDDEN","guard_no_route","guard_blocked","unofficial_providers_disabled","NOT_FOUND","REQUEST_TIMEOUT","CONFLICT","PAYLOAD_TOO_LARGE","TOO_MANY_REQUESTS","BAD_GATEWAY","SERVICE_UNAVAILABLE","INTERNAL_ERROR"],"example":"BAD_REQUEST","isRequired":true,"uniqueKey":"error.code","typeLabel":"enum\u003cstring>"},"message":{"type":"string","description":"Описание ошибки","example":"Недопустимое значение параметра","isRequired":true,"uniqueKey":"error.message","typeLabel":"string"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"error.trace_id","typeLabel":"string"},"details":{"type":"object","description":"Уточняющие поля ошибки. Отдаются только для 4xx","additionalProperties":true,"uniqueKey":"error.details","typeLabel":"object"},"metadata":{"type":"object","description":"Метаданные ошибки провайдера","properties":{"reason":{"type":"string","description":"Машинная причина отказа: по ней можно ветвиться, не разбирая текст","example":"noProvidersForModel","uniqueKey":"error.metadata.reason","typeLabel":"string"},"raw":{"type":"string","description":"Исходный текст ответа провайдера","example":"The parameter `duration` specified in the request is not valid","uniqueKey":"error.metadata.raw","typeLabel":"string"},"provider_name":{"type":"string","description":"Провайдер, вернувший ошибку","example":"alibaba","uniqueKey":"error.metadata.provider_name","typeLabel":"string"}},"uniqueKey":"error.metadata","typeLabel":"object"}},"isRequired":true,"uniqueKey":"error","typeLabel":"object"},"trace_id":{"type":"string","description":"ID трассировки запроса","example":"550e8400-e29b-41d4-a716-446655440000","uniqueKey":"trace_id","typeLabel":"string"}},"required":["error"],"uniqueKey":"","typeLabel":"object"},"examples":{"Example":{"title":"Example","value":{"error":{"code":"BAD_REQUEST","message":"Недопустимое значение параметра","trace_id":"550e8400-e29b-41d4-a716-446655440000","details":{},"metadata":{"reason":"noProvidersForModel","raw":"The parameter `duration` specified in the request is not valid","provider_name":"alibaba"}},"trace_id":"550e8400-e29b-41d4-a716-446655440000"}}},"exampleType":"generated"}},"exampleType":"generated"}},"security":{"857d845f-e476-4799-bd68-51c5d2fa1315":{"bearer":{"scheme":"bearer","bearerFormat":"API Key","type":"http","description":"API ключ передаётся в заголовке: Authorization: Bearer \u003cPOLZA_AI_API_KEY>","scopes":[],"schemeName":"bearer"}}},"servers":{"f1a1b627-c52a-463a-86f0-ada828c76efc":{"url":"https://polza.ai/api","description":"Production"}},"processedSecurityOptions":[{"schemes":[{"scheme":{"scheme":"bearer","bearerFormat":"API Key","type":"http","description":"API ключ передаётся в заголовке: Authorization: Bearer \u003cPOLZA_AI_API_KEY>","scopes":[],"schemeName":"bearer"},"schema":{"title":"Bearer Auth","type":"string","isRequired":true,"description":"API ключ передаётся в заголовке: Authorization: Bearer \u003cPOLZA_AI_API_KEY>","format":"bearer","typeLabel":"string\u003cbearer>","deprecated":false},"schemeName":"bearer","name":"Authorization"}],"title":"bearer"}]},"originalFileLocation":"https://polza.ai/api/openapi.json"},"subdomain":"polza","siteName":"Polza.ai","title":"POST Chat Completions - Polza.ai","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{}},"lastModified":"2026-10-15T10:20:01.748Z","originalFileLocation":"api-reference/chat/completions.mdx","locale":"ru"},"headHtml":"\u003cscript data-mint-head>(function(){var d=document.documentElement,p=null;if(!p){try{p=localStorage.getItem(\"isDarkMode\")}catch(e){}if(p==='true')p='dark';else if(p==='false')p='light';if(p!=='light'\u0026\u0026p!=='dark'\u0026\u0026p!=='system')p=\"system\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Основной эндпоинт для генерации текста и диалогов\">\u003cmeta data-mint-head name=\"application-name\" content=\"Polza.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon/android-chrome-192x192.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"apple-touch-icon\" type=\"image/png\" sizes=\"180x180\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"POST Chat Completions - Polza.ai\">\u003cmeta data-mint-head property=\"og:description\" content=\"Основной эндпоинт для генерации текста и диалогов\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Polza.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://polza.ai/docs/api-reference/chat/completions\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://polza.mintlify.site/docs/_mintlify/api/og/v2?division=%D0%A2%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D0%B0%D1%8F+%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D1%8F\u0026amp;title=POST+Chat+Completions\u0026amp;description=%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D0%BD%D0%BE%D0%B9+%D1%8D%D0%BD%D0%B4%D0%BF%D0%BE%D0%B8%D0%BD%D1%82+%D0%B4%D0%BB%D1%8F+%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8+%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%B0+%D0%B8+%D0%B4%D0%B8%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%B2\u0026amp;theme=e66d600095dcc8df2fba5d6f\u0026amp;signature=f50f6b005815c5854242733a731cd93065d208b61f4a710a910ee5879342a600\">\u003cmeta data-mint-head property=\"og:image:width\" content=\"1200\">\u003cmeta data-mint-head property=\"og:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"twitter:card\" content=\"summary_large_image\">\u003cmeta data-mint-head name=\"twitter:title\" content=\"POST Chat Completions - Polza.ai\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Основной эндпоинт для генерации текста и диалогов\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://polza.mintlify.site/docs/_mintlify/api/og/v2?division=%D0%A2%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D0%B0%D1%8F+%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D1%8F\u0026amp;title=POST+Chat+Completions\u0026amp;description=%D0%9E%D1%81%D0%BD%D0%BE%D0%B2%D0%BD%D0%BE%D0%B9+%D1%8D%D0%BD%D0%B4%D0%BF%D0%BE%D0%B8%D0%BD%D1%82+%D0%B4%D0%BB%D1%8F+%D0%B3%D0%B5%D0%BD%D0%B5%D1%80%D0%B0%D1%86%D0%B8%D0%B8+%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%B0+%D0%B8+%D0%B4%D0%B8%D0%B0%D0%BB%D0%BE%D0%B3%D0%BE%D0%B2\u0026amp;theme=e66d600095dcc8df2fba5d6f\u0026amp;signature=f50f6b005815c5854242733a731cd93065d208b61f4a710a910ee5879342a600\">\u003cmeta data-mint-head name=\"twitter:image:width\" content=\"1200\">\u003cmeta data-mint-head name=\"twitter:image:height\" content=\"630\">\u003cmeta data-mint-head name=\"msapplication-config\" content=\"/docs/mintlify-assets/_mintlify/favicons/polza/CQHRsFqB3M6hClzF/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Polza.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#4D7C0F\">\u003clink data-mint-head rel=\"canonical\" href=\"https://polza.ai/docs/api-reference/chat/completions\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/docs/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/docs/api-reference/chat/completions.md\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://polza.ai/#organization\",\"name\":\"Polza.ai\",\"url\":\"https://polza.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/polza/vvxkgBWcVlkywuwq/logo/light.svg?fit=max\u0026auto=format\u0026n=vvxkgBWcVlkywuwq\u0026q=85\u0026s=03a6a8e98a87bf6c97e54c1bd77e3658\"}},{\"@type\":\"WebSite\",\"@id\":\"https://polza.ai/docs#website\",\"name\":\"Polza.ai\",\"url\":\"https://polza.ai/docs\",\"publisher\":{\"@id\":\"https://polza.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://polza.ai/docs/api-reference/chat/completions#webpage\",\"url\":\"https://polza.ai/docs/api-reference/chat/completions\",\"name\":\"POST Chat Completions\",\"description\":\"Основной эндпоинт для генерации текста и диалогов\",\"dateModified\":\"2026-10-15T10:20:01.748Z\",\"isPartOf\":{\"@id\":\"https://polza.ai/docs#website\"},\"breadcrumb\":{\"@id\":\"https://polza.ai/docs/api-reference/chat/completions#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://polza.ai/docs/api-reference/chat/completions#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Polza.ai\",\"item\":\"https://polza.ai/docs\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"POST Chat Completions\",\"item\":\"https://polza.ai/docs/api-reference/chat/completions\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://polza.ai/docs/api-reference/chat/completions#apireference\",\"headline\":\"POST Chat Completions\",\"name\":\"POST Chat Completions\",\"description\":\"Основной эндпоинт для генерации текста и диалогов\",\"url\":\"https://polza.ai/docs/api-reference/chat/completions\",\"mainEntityOfPage\":{\"@id\":\"https://polza.ai/docs/api-reference/chat/completions#webpage\"},\"dateModified\":\"2026-10-15T10:20:01.748Z\",\"publisher\":{\"@id\":\"https://polza.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://polza.ai/docs#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Polza.ai\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"Polza.ai\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/docs/api-reference/chat/completions.md","siteName":"Polza.ai","nav":{"global":{"languages":[{"language":"ru","default":true,"href":"/"}],"anchors":[{"anchor":"Модели","icon":"microchip","href":"https://polza.ai/models"},{"anchor":"Консоль","icon":"gauge","href":"https://polza.ai/dashboard"},{"anchor":"Обновления","icon":"clock-rotate-left","href":"/changelog"}]},"tabs":[{"tab":"Документация","pages":[{"title":"Документация","href":""}]},{"tab":"Руководства","pages":[{"title":"Руководства","href":"/gaidy/getting-started"}]},{"tab":"API Reference","groups":[{"group":"Обзор","pages":[{"title":"Введение в API","description":"Обзор Polza.ai API и способы аутентификации","icon":"book","href":"/api-reference/introduction"}]},{"group":"Текстовая генерация","pages":[{"title":"POST Chat Completions","openapi":"POST /v1/chat/completions","icon":"message","href":"/api-reference/chat/completions"},{"title":"POST Responses","description":"Responses API — OpenAI-совместимый формат запросов с tool calling и streaming","icon":"reply","openapi":"POST /v1/responses","href":"/api-reference/responses/create"}]},{"group":"Изображения","pages":[{"title":"POST Images Generations","icon":"image","openapi":"POST /v2/images/generations","href":"/api-reference/images/generations"}]},{"group":"Медиа","pages":[{"title":"POST Media","icon":"photo-film","openapi":"POST /v1/media","href":"/api-reference/media/create"},{"title":"GET Media Status","icon":"spinner","openapi":"GET /v1/media/{id}","href":"/api-reference/media/status"},{"title":"POST Media Operations","icon":"wand-magic-sparkles","openapi":"POST /v1/media/{id}/operations","href":"/api-reference/media/operations"}]},{"group":"Аудио","pages":[{"title":"POST Audio Transcriptions","icon":"microphone","openapi":"POST /v1/audio/transcriptions","href":"/api-reference/audio/transcriptions"},{"title":"POST Audio Speech","icon":"volume-high","openapi":"POST /v1/audio/speech","href":"/api-reference/audio/speech"}]},{"group":"Эмбеддинги","pages":[{"title":"POST Embeddings","icon":"vector-square","openapi":"POST /v1/embeddings","href":"/api-reference/embeddings/create"}]},{"group":"Классификация и оценка","pages":[{"title":"POST Systemone","icon":"scale-balanced","openapi":"POST /v1/systemone","href":"/api-reference/systemone/create"}]},{"group":"Модели","pages":[{"title":"GET Models","icon":"list","openapi":"GET /v1/models","href":"/api-reference/models/list"},{"title":"GET Models Catalog","icon":"table-cells","openapi":"GET /v1/models/catalog","href":"/api-reference/models/catalog"}]},{"group":"Хранилище","pages":[{"title":"Загрузить файл","icon":"upload","openapi":"POST /v1/storage/upload","href":"/api-reference/storage/upload"},{"title":"Список файлов","icon":"list","openapi":"GET /v1/storage/files","href":"/api-reference/storage/list-files"},{"title":"Информация о файле","icon":"file","openapi":"GET /v1/storage/files/{id}","href":"/api-reference/storage/get-file"},{"title":"Удалить файл","icon":"trash","openapi":"DELETE /v1/storage/files/{id}","href":"/api-reference/storage/delete-file"},{"title":"Сохранить файл навсегда","icon":"floppy-disk","openapi":"PATCH /v1/storage/files/{id}/keep","href":"/api-reference/storage/keep"},{"title":"Статистика хранилища","icon":"chart-pie","openapi":"GET /v1/storage/stats","href":"/api-reference/storage/stats"}]},{"group":"История","pages":[{"title":"История генераций","icon":"clock-rotate-left","href":"/api-reference/history/generations"}]},{"group":"Другое","pages":[{"title":"GET Balance (устарел)","openapi":"GET /v1/balance","icon":"wallet","deprecated":true,"href":"/api-reference/other/balance"},{"title":"GET Balance v2","openapi":"GET /v2/balance","icon":"wallet","href":"/api-reference/other/balance-v2"},{"title":"GET Key","openapi":"GET /v1/key","icon":"key","href":"/api-reference/other/key"}]}]}]},"basePath":"","title":"POST Chat Completions - Polza.ai","deploymentId":"dpl_3UWrZQodFHfxeNZNwJGtAN3LFPAW","buildId":"dpl_3UWrZQodFHfxeNZNwJGtAN3LFPAW","dynamics":["c2aa737661","2b790eda92","b0f84f53ff","a9bb46feb3"],"chunks":["OpenApiReferenceProvider-CTHyyeRf.js","snippetPresets-BMdpRCxb.js","utils-65AYcjfi.js","style-to-object-BY3JEAdk.js","utils-CRPs3K4p.js","v4-DIgz8zy6.js","addUniqueKeysToSchema-CC8CXHAU.js","conditional-requirements-CFM0id0Q.js","cloneDeep-DnTPJyjR.js","_Uint8Array-DltIFDhI.js","isObject-FP1Yky1u.js","ApiExamples-BmEVj_uj.js","usePlaygroundInputsStore-5xBwOVka.js","shallow-QpQlGReT.js","isEqual-4QLmF2GJ.js","CodeSnippets-B0iGodOk.js","CodeSnippet-Cy-nvZF7.js","use-playground-group-access-BPfR0_D1.js","Page-Bq_BC2g4.js","api-description-markdown-DXw2P8dC.js","DynamicMarkdown-ml2SNL31.js","SectionHeading-D0OhyutH.js","MethodPill-CF74kDsA.js","getPastedJson-CALFOPz5.js","Check2Icon-cho9ghlh.js","axios-CsQoIw0U.js","Markdown-D1fsl0nG.js","AssistantPageLink-oluH6-IK.js","dist-9rfMSp9u.js","lib-DMeTj1gb.js","lib-B8HbPgcC.js","katex-Dbtb6Wk7.js","html-void-elements-mCSPHezU.js","marked.esm-CZWythHk.js"]}