Степень случайности, добавляемая в ответ. Диапазон от 0.0 до 1.0. Используйте temperature ближе к 0.0 для аналитических задач/задач с множественным выбором и ближе к 1.0 для творческих и генеративных задач.
Использовать nucleus-сэмплирование. При nucleus-сэмплировании мы вычисляем кумулятивное распределение по всем вариантам для каждого последующего токена в порядке убывания вероятности и обрезаем его, когда оно достигает определённой вероятности, заданной top_p.
Сэмплирование только из верхних K вариантов для каждого последующего токена. Используется для удаления маловероятных ответов из «длинного хвоста». Рекомендуется только для продвинутых случаев использования.
Пользовательские текстовые последовательности, которые заставят модель прекратить генерацию. Возвращённый текст не будет содержать стоп-последовательность.
Поддерживаемые значения: auto (по умолчанию, решает модель), any (модель должна использовать инструмент), tool (модель должна использовать конкретный инструмент).
Причина остановки модели. Может быть end_turn (модель достигла естественной точки остановки), max_tokens (превышен max_tokens или максимум модели), stop_sequence (сгенерирована одна из ваших пользовательских стоп-последовательностей) или tool_use (модель вызвала один или несколько инструментов).
Присутствует со значением anthropic.exclusive.v1, когда Sunra нормализовала этот ответ. Проверяйте это значение, а не выводите соглашение из чисел. См. Использование токенов.
{ "id": "msg_01XFDUDYJgAACzvnptvVoYEL", "type": "message", "role": "assistant", "content": [ { "type": "text", "text": "Hello! I'm doing well, thank you for asking. How can I help you today?" } ], "model": "anthropic/claude-sonnet-4-20250514", "stop_reason": "end_turn", "stop_sequence": null, "usage": { "input_tokens": 12, "output_tokens": 19, "total_tokens": 31, "sunra_usage_semantics": "anthropic.exclusive.v1" }}
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"Sunra.ai","colors":{"primary":"#ff632f","light":"#ff632f","dark":"#ff632f"},"logo":{"light":"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/logo/light.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=520c0afb29ad1fddc46fec66c975eb2a","dark":"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/logo/dark.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=16e2ed4856376448550627daa81544b9"},"favicon":"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/favicon.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=c47b7db8e76fb19f94de55c161e2fcd1","api":{},"navbar":{"links":[{"href":"https://sunra.ai/about","label":"About"}],"primary":{"type":"button","label":"Go to sunra.ai","href":"https://sunra.ai"}},"footer":{"socials":{"x":"https://x.com/sunra_ai","discord":"https://discord.gg/897qCzvCcU","github":"https://github.com/sunra-ai"}},"integrations":{"amplitude":{"apiKey":"94a6621e5239157d3f0a392f6d5f8a21"}},"banner":{"content":"The developer site has moved to **platform.sunra.ai**. API endpoints, SDKs and keys are unchanged — you may just need to sign in again.","dismissible":true},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"global":{"anchors":[{"anchor":"X (Twitter)","icon":"x-twitter","href":"https://x.com/sunra_ai"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/897qCzvCcU"},{"anchor":"GitHub","icon":"github","href":"https://github.com/sunra-ai"}]},"languages":[{"language":"en","href":""},{"language":"zh-Hans","href":"zh-Hans"},{"language":"zh-Hant","href":"zh-Hant"},{"language":"fr","href":"fr"},{"language":"ja","href":"ja"},{"language":"es","href":"es"},{"language":"pt","href":"pt"},{"language":"hi","href":"hi"},{"language":"tr","href":"tr"},{"language":"de","href":"de"},{"language":"id","href":"id"},{"language":"it","href":"it"},{"language":"ko","href":"ko"},{"language":"ru","href":"ru"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"sunraai","hasAudioNarration":false,"actualSubdomain":"sunraai","customDomains":["docs.sunra.ai"],"gitSource":{"type":"github","owner":"sunra-ai","repo":"sunra-docs","deployBranch":"main","contentDirectory":"","isPrivate":true,"mountPath":"","label":""},"chroma":{"liveDeploymentHistoryId":"6ae46d92a3eed560d7e4c18a","collectionId":"4754d27b-94dc-45d7-b9f3-30dbad1abac8","schemaVersion":"v3","latestBuiltDeploymentHistoryId":"6ae46d92a3eed560d7e4c18a"},"entitlements":{},"buildId":"6ae46d92a3eed560d7e4c18a","clientVersion":"0.0.4045","searchFilterCounts":[{"language":"en","tag":"Multimodal","count":10},{"language":"en","tag":"LLM","count":9},{"language":"de","tag":"Multimodal","count":9},{"language":"es","tag":"Multimodal","count":9},{"language":"fr","tag":"Multimodal","count":9},{"language":"hi","tag":"Multimodal","count":9},{"language":"id","tag":"Multimodal","count":9},{"language":"it","tag":"Multimodal","count":9},{"language":"ja","tag":"Multimodal","count":9},{"language":"ko","tag":"Multimodal","count":9},{"language":"pt","tag":"Multimodal","count":9},{"language":"ru","tag":"Multimodal","count":9},{"language":"tr","tag":"Multimodal","count":9},{"language":"zh-Hans","tag":"Multimodal","count":9},{"language":"zh-Hant","tag":"Multimodal","count":9},{"language":"zh-Hans","tag":"LLM","count":8},{"language":"en","tag":"Platform","count":6},{"language":"de","tag":"LLM","count":6},{"language":"es","tag":"LLM","count":6},{"language":"fr","tag":"LLM","count":6},{"language":"hi","tag":"LLM","count":6},{"language":"id","tag":"LLM","count":6},{"language":"it","tag":"LLM","count":6},{"language":"ja","tag":"LLM","count":6},{"language":"ko","tag":"LLM","count":6},{"language":"pt","tag":"LLM","count":6},{"language":"ru","tag":"LLM","count":6},{"language":"tr","tag":"LLM","count":6},{"language":"zh-Hant","tag":"LLM","count":6},{"language":"zh-Hans","tag":"平台","count":5},{"language":"en","tag":"Client Libraries","count":4},{"language":"de","tag":"Client-Bibliotheken","count":4},{"language":"es","tag":"Bibliotecas de cliente","count":4},{"language":"fr","tag":"Bibliothèques clientes","count":4},{"language":"hi","tag":"क्लाइंट लाइब्रेरी","count":4},{"language":"id","tag":"Pustaka Klien","count":4},{"language":"it","tag":"Librerie client","count":4},{"language":"ja","tag":"クライアントライブラリ","count":4},{"language":"ko","tag":"클라이언트 라이브러리","count":4},{"language":"pt","tag":"Bibliotecas de cliente","count":4},{"language":"ru","tag":"Клиентские библиотеки","count":4},{"language":"tr","tag":"İstemci Kütüphaneleri","count":4},{"language":"zh-Hans","tag":"客户端 SDK","count":4},{"language":"zh-Hant","tag":"客戶端 SDK","count":4},{"language":"en","tag":"Overview","count":1},{"language":"de","tag":"Überblick","count":1},{"language":"es","tag":"Descripción general","count":1},{"language":"fr","tag":"Aperçu","count":1},{"language":"hi","tag":"अवलोकन","count":1},{"language":"id","tag":"Ikhtisar","count":1},{"language":"it","tag":"Panoramica","count":1},{"language":"ja","tag":"概要","count":1},{"language":"ko","tag":"개요","count":1},{"language":"pt","tag":"Visão geral","count":1},{"language":"ru","tag":"Обзор","count":1},{"language":"tr","tag":"Genel Bakış","count":1},{"language":"zh-Hans","tag":"概述","count":1},{"language":"zh-Hant","tag":"概述","count":1}]},"assistantConfig":{},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":false,"toggles":[{"name":"kill-isr","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":"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":"workos-onboarding","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","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":"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":"assistant-v5","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"byok-sep-25","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":"vite-origin","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-updated-9-15","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workos-sso-scim","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":"workos-signup","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":"workos-enabled","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":"sso-setup-deadline-banner","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"googleFontsInlined":false},"customCss":[{"filePath":"style.css","content":"#navbar>div>div>div>div>div{border-bottom:0}.codeblock-light{background:#fafafa!important}.dark .codeblock-light{background:#0a0a0a!important}#search-bar-entry>span{font-weight:400!important}#assistant-entry>span{color:#000!important}.dark #assistant-entry>span{color:#fff!important}.rounded-2xl,.rounded-3xl,.rounded-\\[14px\\],.rounded-full,.rounded-lg,.rounded-md,.rounded-sm,.rounded-xl{border-radius:4px!important}"}],"page":{"pagePath":"ru/llm/messages","slug":"/ru/llm/messages","pageMetadata":{"title":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","description":null,"href":"/ru/llm/messages"},"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`,p:`p`,..._provideComponents(),...props.components},{Expandable,Heading,ParamField,ResponseField}=_components;if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Создаёт сообщение в формате API Anthropic Messages. Поддерживает текст, изображения, PDF, инструменты и расширенное мышление.`}),`\n`,_jsx(Heading,{level:`2`,id:`аутентификация`,children:`Аутентификация`}),`\n`,_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:[_jsx(_components.p,{children:`Bearer-токен. Используйте ваш API-ключ в качестве Bearer-токена в заголовке Authorization.`}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`Bearer \u003cSUNRA_KEY>`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`запрос`,children:`Запрос`}),`\n`,_jsx(_components.p,{children:`Этот эндпоинт принимает объект.`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Модель, которая завершит ваш промпт. Просмотрите доступные модели на `,_jsx(_components.a,{href:`https://sunra.ai/models`,children:`sunra.ai/models`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`messages`,type:`object[]`,required:true,id:`param-messages`,children:[_jsxs(_components.p,{children:[`Входные сообщения. Каждое входное сообщение имеет `,_jsx(_components.code,{children:`role`}),` и `,_jsx(_components.code,{children:`content`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`role`,type:`string`,required:true,id:`param-role`,children:_jsxs(_components.p,{children:[`Роль автора сообщения. Поддерживаемые значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`assistant`}),`.`]})}),_jsxs(ParamField,{body:`content`,type:`string | object[]`,required:true,id:`param-content`,children:[_jsx(_components.p,{children:`Содержание сообщения. Может быть одной строкой или массивом блоков контента.`}),_jsxs(Expandable,{title:`content block types`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Тип блока контента. Поддерживаемые значения: `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`image`}),`, `,_jsx(_components.code,{children:`tool_use`}),`, `,_jsx(_components.code,{children:`tool_result`}),`.`]})}),_jsx(ParamField,{body:`text`,type:`string`,id:`param-text`,children:_jsxs(_components.p,{children:[`Текстовое содержание. Используется, когда type — `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsxs(ParamField,{body:`source`,type:`object`,id:`param-source`,children:[_jsxs(_components.p,{children:[`Источник изображения. Используется, когда type — `,_jsx(_components.code,{children:`image`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-1`,children:_jsxs(_components.p,{children:[`Тип источника. Поддерживаемые значения: `,_jsx(_components.code,{children:`base64`}),`, `,_jsx(_components.code,{children:`url`}),`.`]})}),_jsx(ParamField,{body:`media_type`,type:`string`,required:true,id:`param-media-type`,children:_jsxs(_components.p,{children:[`Медиатип изображения. Например, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/gif`}),`, `,_jsx(_components.code,{children:`image/webp`}),`.`]})}),_jsx(ParamField,{body:`data`,type:`string`,id:`param-data`,children:_jsxs(_components.p,{children:[`Данные изображения в кодировке base64. Обязательно, когда тип источника — `,_jsx(_components.code,{children:`base64`}),`.`]})}),_jsx(ParamField,{body:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`URL изображения. Обязательно, когда тип источника — `,_jsx(_components.code,{children:`url`}),`.`]})})]})]})]})]})]})]}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,required:true,id:`param-max-tokens`,children:_jsx(_components.p,{children:`Максимальное количество токенов для генерации перед остановкой. Обратите внимание, что модель может остановиться до достижения этого максимума.`})}),`\n`,_jsx(ParamField,{body:`system`,type:`string | object[]`,id:`param-system`,children:_jsx(_components.p,{children:`Системный промпт. Способ предоставления контекста и инструкций модели. Может быть строкой или массивом блоков контента.`})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:false,id:`param-stream`,children:_jsx(_components.p,{children:`Передавать ли ответ в потоковом режиме с использованием Server-Sent Events (SSE).`})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,default:1,id:`param-temperature`,children:_jsxs(_components.p,{children:[`Степень случайности, добавляемая в ответ. Диапазон от 0.0 до 1.0. Используйте `,_jsx(_components.code,{children:`temperature`}),` ближе к 0.0 для аналитических задач/задач с множественным выбором и ближе к 1.0 для творческих и генеративных задач.`]})}),`\n`,_jsx(ParamField,{body:`top_p`,type:`number`,id:`param-top-p`,children:_jsxs(_components.p,{children:[`Использовать nucleus-сэмплирование. При nucleus-сэмплировании мы вычисляем кумулятивное распределение по всем вариантам для каждого последующего токена в порядке убывания вероятности и обрезаем его, когда оно достигает определённой вероятности, заданной `,_jsx(_components.code,{children:`top_p`}),`.`]})}),`\n`,_jsx(ParamField,{body:`top_k`,type:`integer`,id:`param-top-k`,children:_jsx(_components.p,{children:`Сэмплирование только из верхних K вариантов для каждого последующего токена. Используется для удаления маловероятных ответов из «длинного хвоста». Рекомендуется только для продвинутых случаев использования.`})}),`\n`,_jsx(ParamField,{body:`stop_sequences`,type:`string[]`,id:`param-stop-sequences`,children:_jsx(_components.p,{children:`Пользовательские текстовые последовательности, которые заставят модель прекратить генерацию. Возвращённый текст не будет содержать стоп-последовательность.`})}),`\n`,_jsxs(ParamField,{body:`tools`,type:`object[]`,id:`param-tools`,children:[_jsx(_components.p,{children:`Определения инструментов, которые модель может использовать.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Имя инструмента.`})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Описание того, что делает этот инструмент.`})}),_jsx(ParamField,{body:`input_schema`,type:`object`,required:true,id:`param-input-schema`,children:_jsxs(_components.p,{children:[`JSON-схема для входных данных этого инструмента. Определяет структуру `,_jsx(_components.code,{children:`input`}),`, которую принимает ваш инструмент.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`tool_choice`,type:`object`,id:`param-tool-choice`,children:[_jsx(_components.p,{children:`Как модель должна использовать предоставленные инструменты.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-2`,children:_jsxs(_components.p,{children:[`Поддерживаемые значения: `,_jsx(_components.code,{children:`auto`}),` (по умолчанию, решает модель), `,_jsx(_components.code,{children:`any`}),` (модель должна использовать инструмент), `,_jsx(_components.code,{children:`tool`}),` (модель должна использовать конкретный инструмент).`]})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name-1`,children:_jsxs(_components.p,{children:[`Имя инструмента для использования. Обязательно, когда type — `,_jsx(_components.code,{children:`tool`}),`.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Объект, описывающий метаданные запроса.`}),_jsx(Expandable,{title:`properties`,children:_jsx(ParamField,{body:`user_id`,type:`string`,id:`param-user-id`,children:_jsx(_components.p,{children:`Внешний идентификатор пользователя, связанного с запросом.`})})})]}),`\n`,_jsxs(ParamField,{body:`thinking`,type:`object`,id:`param-thinking`,children:[_jsx(_components.p,{children:`Конфигурация расширенного мышления. При включении модель будет думать перед ответом.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-3`,children:_jsxs(_components.p,{children:[`Должно быть `,_jsx(_components.code,{children:`enabled`}),`.`]})}),_jsx(ParamField,{body:`budget_tokens`,type:`integer`,required:true,id:`param-budget-tokens`,children:_jsx(_components.p,{children:`Максимальное количество токенов для размышлений. Должно быть больше или равно 1024.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`ответ`,children:`Ответ`}),`\n`,_jsx(_components.p,{children:`Успешный ответ сообщения.`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Уникальный идентификатор сообщения, например `,_jsx(_components.code,{children:`msg_01XFDUDYJgAACzvnptvVoYEL`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-4`,children:_jsxs(_components.p,{children:[`Тип объекта. Всегда `,_jsx(_components.code,{children:`message`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`role`,type:`string`,id:`param-role-1`,children:_jsxs(_components.p,{children:[`Роль сгенерированного сообщения в беседе. Всегда `,_jsx(_components.code,{children:`assistant`}),`.`]})}),`\n`,_jsxs(ResponseField,{name:`content`,type:`object[]`,id:`param-content-1`,children:[_jsx(_components.p,{children:`Контент, сгенерированный моделью. Это массив блоков контента.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-5`,children:_jsxs(_components.p,{children:[`Тип блока контента. Может быть `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`tool_use`}),` или `,_jsx(_components.code,{children:`thinking`}),`.`]})}),_jsx(ResponseField,{name:`text`,type:`string`,id:`param-text-1`,children:_jsxs(_components.p,{children:[`Сгенерированный текст. Присутствует, когда type — `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-1`,children:_jsxs(_components.p,{children:[`Идентификатор блока использования инструмента. Присутствует, когда type — `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-2`,children:_jsxs(_components.p,{children:[`Имя инструмента. Присутствует, когда type — `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`input`,type:`object`,id:`param-input`,children:_jsxs(_components.p,{children:[`Входные данные инструмента. Присутствует, когда type — `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`thinking`,type:`string`,id:`param-thinking-1`,children:_jsxs(_components.p,{children:[`Содержание размышлений. Присутствует, когда type — `,_jsx(_components.code,{children:`thinking`}),`.`]})})]})]}),`\n`,_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-1`,children:_jsx(_components.p,{children:`Модель, обработавшая запрос.`})}),`\n`,_jsx(ResponseField,{name:`stop_reason`,type:`string | null`,id:`param-stop-reason`,children:_jsxs(_components.p,{children:[`Причина остановки модели. Может быть `,_jsx(_components.code,{children:`end_turn`}),` (модель достигла естественной точки остановки), `,_jsx(_components.code,{children:`max_tokens`}),` (превышен `,_jsx(_components.code,{children:`max_tokens`}),` или максимум модели), `,_jsx(_components.code,{children:`stop_sequence`}),` (сгенерирована одна из ваших пользовательских стоп-последовательностей) или `,_jsx(_components.code,{children:`tool_use`}),` (модель вызвала один или несколько инструментов).`]})}),`\n`,_jsx(ResponseField,{name:`stop_sequence`,type:`string | null`,id:`param-stop-sequence`,children:_jsx(_components.p,{children:`Какая пользовательская стоп-последовательность была сгенерирована, если таковая имеется.`})}),`\n`,_jsxs(ResponseField,{name:`usage`,type:`object`,id:`param-usage`,children:[_jsxs(_components.p,{children:[`Использование для выставления счетов и ограничения скорости. Три входные корзины взаимоисключающие — см. `,_jsx(_components.a,{href:`/ru/llm/token-usage`,children:`Использование токенов`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`input_tokens`,type:`integer`,id:`param-input-tokens`,children:_jsx(_components.p,{children:`Количество использованных свежих входных токенов. Исключает обе корзины кэша.`})}),_jsx(ResponseField,{name:`output_tokens`,type:`integer`,id:`param-output-tokens`,children:_jsx(_components.p,{children:`Количество использованных выходных токенов.`})}),_jsx(ResponseField,{name:`total_tokens`,type:`integer`,id:`param-total-tokens`,children:_jsxs(_components.p,{children:[`Все входные корзины плюс `,_jsx(_components.code,{children:`output_tokens`}),`. Не включается в потоковые ответы.`]})}),_jsx(ResponseField,{name:`cache_creation_input_tokens`,type:`integer`,id:`param-cache-creation-input-tokens`,children:_jsx(_components.p,{children:`Количество входных токенов, использованных для создания записи кэша.`})}),_jsx(ResponseField,{name:`cache_read_input_tokens`,type:`integer`,id:`param-cache-read-input-tokens`,children:_jsx(_components.p,{children:`Количество входных токенов, прочитанных из кэша.`})}),_jsx(ResponseField,{name:`sunra_usage_semantics`,type:`string | null`,id:`param-sunra-usage-semantics`,children:_jsxs(_components.p,{children:[`Присутствует со значением `,_jsx(_components.code,{children:`anthropic.exclusive.v1`}),`, когда Sunra нормализовала этот ответ. Проверяйте это значение, а не выводите соглашение из чисел. См. `,_jsx(_components.a,{href:`/ru/llm/token-usage`,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":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","description":null,"href":"/ru/llm/messages"}}},"mdxSourceWithNoJs":{"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`,p:`p`,pre:`pre`,span:`span`,..._provideComponents(),...props.components},{CodeBlock,Expandable,Heading,ParamField,RequestExample,ResponseExample,ResponseField}=_components;if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!Expandable)_missingMdxReference(`Expandable`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!RequestExample)_missingMdxReference(`RequestExample`,true);if(!ResponseExample)_missingMdxReference(`ResponseExample`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Создаёт сообщение в формате API Anthropic Messages. Поддерживает текст, изображения, PDF, инструменты и расширенное мышление.`}),`\n`,_jsx(Heading,{level:`2`,id:`аутентификация`,children:`Аутентификация`}),`\n`,_jsxs(ParamField,{header:`Authorization`,type:`string`,required:true,id:`param-authorization`,children:[_jsx(_components.p,{children:`Bearer-токен. Используйте ваш API-ключ в качестве Bearer-токена в заголовке Authorization.`}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`Bearer \u003cSUNRA_KEY>`})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`запрос`,children:`Запрос`}),`\n`,_jsx(_components.p,{children:`Этот эндпоинт принимает объект.`}),`\n`,_jsx(ParamField,{body:`model`,type:`string`,required:true,id:`param-model`,children:_jsxs(_components.p,{children:[`Модель, которая завершит ваш промпт. Просмотрите доступные модели на `,_jsx(_components.a,{href:`https://sunra.ai/models`,children:`sunra.ai/models`}),`.`]})}),`\n`,_jsxs(ParamField,{body:`messages`,type:`object[]`,required:true,id:`param-messages`,children:[_jsxs(_components.p,{children:[`Входные сообщения. Каждое входное сообщение имеет `,_jsx(_components.code,{children:`role`}),` и `,_jsx(_components.code,{children:`content`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`role`,type:`string`,required:true,id:`param-role`,children:_jsxs(_components.p,{children:[`Роль автора сообщения. Поддерживаемые значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`assistant`}),`.`]})}),_jsxs(ParamField,{body:`content`,type:`string | object[]`,required:true,id:`param-content`,children:[_jsx(_components.p,{children:`Содержание сообщения. Может быть одной строкой или массивом блоков контента.`}),_jsxs(Expandable,{title:`content block types`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type`,children:_jsxs(_components.p,{children:[`Тип блока контента. Поддерживаемые значения: `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`image`}),`, `,_jsx(_components.code,{children:`tool_use`}),`, `,_jsx(_components.code,{children:`tool_result`}),`.`]})}),_jsx(ParamField,{body:`text`,type:`string`,id:`param-text`,children:_jsxs(_components.p,{children:[`Текстовое содержание. Используется, когда type — `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsxs(ParamField,{body:`source`,type:`object`,id:`param-source`,children:[_jsxs(_components.p,{children:[`Источник изображения. Используется, когда type — `,_jsx(_components.code,{children:`image`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-1`,children:_jsxs(_components.p,{children:[`Тип источника. Поддерживаемые значения: `,_jsx(_components.code,{children:`base64`}),`, `,_jsx(_components.code,{children:`url`}),`.`]})}),_jsx(ParamField,{body:`media_type`,type:`string`,required:true,id:`param-media-type`,children:_jsxs(_components.p,{children:[`Медиатип изображения. Например, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/gif`}),`, `,_jsx(_components.code,{children:`image/webp`}),`.`]})}),_jsx(ParamField,{body:`data`,type:`string`,id:`param-data`,children:_jsxs(_components.p,{children:[`Данные изображения в кодировке base64. Обязательно, когда тип источника — `,_jsx(_components.code,{children:`base64`}),`.`]})}),_jsx(ParamField,{body:`url`,type:`string`,id:`param-url`,children:_jsxs(_components.p,{children:[`URL изображения. Обязательно, когда тип источника — `,_jsx(_components.code,{children:`url`}),`.`]})})]})]})]})]})]})]}),`\n`,_jsx(ParamField,{body:`max_tokens`,type:`integer`,required:true,id:`param-max-tokens`,children:_jsx(_components.p,{children:`Максимальное количество токенов для генерации перед остановкой. Обратите внимание, что модель может остановиться до достижения этого максимума.`})}),`\n`,_jsx(ParamField,{body:`system`,type:`string | object[]`,id:`param-system`,children:_jsx(_components.p,{children:`Системный промпт. Способ предоставления контекста и инструкций модели. Может быть строкой или массивом блоков контента.`})}),`\n`,_jsx(ParamField,{body:`stream`,type:`boolean`,default:false,id:`param-stream`,children:_jsx(_components.p,{children:`Передавать ли ответ в потоковом режиме с использованием Server-Sent Events (SSE).`})}),`\n`,_jsx(ParamField,{body:`temperature`,type:`number`,default:1,id:`param-temperature`,children:_jsxs(_components.p,{children:[`Степень случайности, добавляемая в ответ. Диапазон от 0.0 до 1.0. Используйте `,_jsx(_components.code,{children:`temperature`}),` ближе к 0.0 для аналитических задач/задач с множественным выбором и ближе к 1.0 для творческих и генеративных задач.`]})}),`\n`,_jsx(ParamField,{body:`top_p`,type:`number`,id:`param-top-p`,children:_jsxs(_components.p,{children:[`Использовать nucleus-сэмплирование. При nucleus-сэмплировании мы вычисляем кумулятивное распределение по всем вариантам для каждого последующего токена в порядке убывания вероятности и обрезаем его, когда оно достигает определённой вероятности, заданной `,_jsx(_components.code,{children:`top_p`}),`.`]})}),`\n`,_jsx(ParamField,{body:`top_k`,type:`integer`,id:`param-top-k`,children:_jsx(_components.p,{children:`Сэмплирование только из верхних K вариантов для каждого последующего токена. Используется для удаления маловероятных ответов из «длинного хвоста». Рекомендуется только для продвинутых случаев использования.`})}),`\n`,_jsx(ParamField,{body:`stop_sequences`,type:`string[]`,id:`param-stop-sequences`,children:_jsx(_components.p,{children:`Пользовательские текстовые последовательности, которые заставят модель прекратить генерацию. Возвращённый текст не будет содержать стоп-последовательность.`})}),`\n`,_jsxs(ParamField,{body:`tools`,type:`object[]`,id:`param-tools`,children:[_jsx(_components.p,{children:`Определения инструментов, которые модель может использовать.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`name`,type:`string`,required:true,id:`param-name`,children:_jsx(_components.p,{children:`Имя инструмента.`})}),_jsx(ParamField,{body:`description`,type:`string`,id:`param-description`,children:_jsx(_components.p,{children:`Описание того, что делает этот инструмент.`})}),_jsx(ParamField,{body:`input_schema`,type:`object`,required:true,id:`param-input-schema`,children:_jsxs(_components.p,{children:[`JSON-схема для входных данных этого инструмента. Определяет структуру `,_jsx(_components.code,{children:`input`}),`, которую принимает ваш инструмент.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`tool_choice`,type:`object`,id:`param-tool-choice`,children:[_jsx(_components.p,{children:`Как модель должна использовать предоставленные инструменты.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-2`,children:_jsxs(_components.p,{children:[`Поддерживаемые значения: `,_jsx(_components.code,{children:`auto`}),` (по умолчанию, решает модель), `,_jsx(_components.code,{children:`any`}),` (модель должна использовать инструмент), `,_jsx(_components.code,{children:`tool`}),` (модель должна использовать конкретный инструмент).`]})}),_jsx(ParamField,{body:`name`,type:`string`,id:`param-name-1`,children:_jsxs(_components.p,{children:[`Имя инструмента для использования. Обязательно, когда type — `,_jsx(_components.code,{children:`tool`}),`.`]})})]})]}),`\n`,_jsxs(ParamField,{body:`metadata`,type:`object`,id:`param-metadata`,children:[_jsx(_components.p,{children:`Объект, описывающий метаданные запроса.`}),_jsx(Expandable,{title:`properties`,children:_jsx(ParamField,{body:`user_id`,type:`string`,id:`param-user-id`,children:_jsx(_components.p,{children:`Внешний идентификатор пользователя, связанного с запросом.`})})})]}),`\n`,_jsxs(ParamField,{body:`thinking`,type:`object`,id:`param-thinking`,children:[_jsx(_components.p,{children:`Конфигурация расширенного мышления. При включении модель будет думать перед ответом.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ParamField,{body:`type`,type:`string`,required:true,id:`param-type-3`,children:_jsxs(_components.p,{children:[`Должно быть `,_jsx(_components.code,{children:`enabled`}),`.`]})}),_jsx(ParamField,{body:`budget_tokens`,type:`integer`,required:true,id:`param-budget-tokens`,children:_jsx(_components.p,{children:`Максимальное количество токенов для размышлений. Должно быть больше или равно 1024.`})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`ответ`,children:`Ответ`}),`\n`,_jsx(_components.p,{children:`Успешный ответ сообщения.`}),`\n`,_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id`,children:_jsxs(_components.p,{children:[`Уникальный идентификатор сообщения, например `,_jsx(_components.code,{children:`msg_01XFDUDYJgAACzvnptvVoYEL`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-4`,children:_jsxs(_components.p,{children:[`Тип объекта. Всегда `,_jsx(_components.code,{children:`message`}),`.`]})}),`\n`,_jsx(ResponseField,{name:`role`,type:`string`,id:`param-role-1`,children:_jsxs(_components.p,{children:[`Роль сгенерированного сообщения в беседе. Всегда `,_jsx(_components.code,{children:`assistant`}),`.`]})}),`\n`,_jsxs(ResponseField,{name:`content`,type:`object[]`,id:`param-content-1`,children:[_jsx(_components.p,{children:`Контент, сгенерированный моделью. Это массив блоков контента.`}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`type`,type:`string`,id:`param-type-5`,children:_jsxs(_components.p,{children:[`Тип блока контента. Может быть `,_jsx(_components.code,{children:`text`}),`, `,_jsx(_components.code,{children:`tool_use`}),` или `,_jsx(_components.code,{children:`thinking`}),`.`]})}),_jsx(ResponseField,{name:`text`,type:`string`,id:`param-text-1`,children:_jsxs(_components.p,{children:[`Сгенерированный текст. Присутствует, когда type — `,_jsx(_components.code,{children:`text`}),`.`]})}),_jsx(ResponseField,{name:`id`,type:`string`,id:`param-id-1`,children:_jsxs(_components.p,{children:[`Идентификатор блока использования инструмента. Присутствует, когда type — `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`name`,type:`string`,id:`param-name-2`,children:_jsxs(_components.p,{children:[`Имя инструмента. Присутствует, когда type — `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`input`,type:`object`,id:`param-input`,children:_jsxs(_components.p,{children:[`Входные данные инструмента. Присутствует, когда type — `,_jsx(_components.code,{children:`tool_use`}),`.`]})}),_jsx(ResponseField,{name:`thinking`,type:`string`,id:`param-thinking-1`,children:_jsxs(_components.p,{children:[`Содержание размышлений. Присутствует, когда type — `,_jsx(_components.code,{children:`thinking`}),`.`]})})]})]}),`\n`,_jsx(ResponseField,{name:`model`,type:`string`,id:`param-model-1`,children:_jsx(_components.p,{children:`Модель, обработавшая запрос.`})}),`\n`,_jsx(ResponseField,{name:`stop_reason`,type:`string | null`,id:`param-stop-reason`,children:_jsxs(_components.p,{children:[`Причина остановки модели. Может быть `,_jsx(_components.code,{children:`end_turn`}),` (модель достигла естественной точки остановки), `,_jsx(_components.code,{children:`max_tokens`}),` (превышен `,_jsx(_components.code,{children:`max_tokens`}),` или максимум модели), `,_jsx(_components.code,{children:`stop_sequence`}),` (сгенерирована одна из ваших пользовательских стоп-последовательностей) или `,_jsx(_components.code,{children:`tool_use`}),` (модель вызвала один или несколько инструментов).`]})}),`\n`,_jsx(ResponseField,{name:`stop_sequence`,type:`string | null`,id:`param-stop-sequence`,children:_jsx(_components.p,{children:`Какая пользовательская стоп-последовательность была сгенерирована, если таковая имеется.`})}),`\n`,_jsxs(ResponseField,{name:`usage`,type:`object`,id:`param-usage`,children:[_jsxs(_components.p,{children:[`Использование для выставления счетов и ограничения скорости. Три входные корзины взаимоисключающие — см. `,_jsx(_components.a,{href:`/ru/llm/token-usage`,children:`Использование токенов`}),`.`]}),_jsxs(Expandable,{title:`properties`,children:[_jsx(ResponseField,{name:`input_tokens`,type:`integer`,id:`param-input-tokens`,children:_jsx(_components.p,{children:`Количество использованных свежих входных токенов. Исключает обе корзины кэша.`})}),_jsx(ResponseField,{name:`output_tokens`,type:`integer`,id:`param-output-tokens`,children:_jsx(_components.p,{children:`Количество использованных выходных токенов.`})}),_jsx(ResponseField,{name:`total_tokens`,type:`integer`,id:`param-total-tokens`,children:_jsxs(_components.p,{children:[`Все входные корзины плюс `,_jsx(_components.code,{children:`output_tokens`}),`. Не включается в потоковые ответы.`]})}),_jsx(ResponseField,{name:`cache_creation_input_tokens`,type:`integer`,id:`param-cache-creation-input-tokens`,children:_jsx(_components.p,{children:`Количество входных токенов, использованных для создания записи кэша.`})}),_jsx(ResponseField,{name:`cache_read_input_tokens`,type:`integer`,id:`param-cache-read-input-tokens`,children:_jsx(_components.p,{children:`Количество входных токенов, прочитанных из кэша.`})}),_jsx(ResponseField,{name:`sunra_usage_semantics`,type:`string | null`,id:`param-sunra-usage-semantics`,children:_jsxs(_components.p,{children:[`Присутствует со значением `,_jsx(_components.code,{children:`anthropic.exclusive.v1`}),`, когда Sunra нормализовала этот ответ. Проверяйте это значение, а не выводите соглашение из чисел. См. `,_jsx(_components.a,{href:`/ru/llm/token-usage`,children:`Использование токенов`}),`.`]})})]})]}),`\n`,_jsxs(RequestExample,{children:[_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`13`,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:`13`,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://api-llm.sunra.ai/v1/messages`}),_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 \u003cSUNRA_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\": \"anthropic/claude-sonnet-4-20250514\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\": 1024,`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\": [`})}),`\n`,_jsx(_components.span,{className:`line`,children:_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:` \"role\": \"user\",`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"content\": \"Hello, how are you?\"`})}),`\n`,_jsx(_components.span,{className:`line`,children:_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:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` }'`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`Python`,numberOfLines:`17`,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:`17`,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\":`#D4D4D4`},children:` requests`})]}),`\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:` requests.post(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"https://api-llm.sunra.ai/v1/messages\"`}),_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:` headers`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Bearer \u003cSUNRA_KEY>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"application/json\"`})]}),`\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:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:` json`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-20250514\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"max_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`1024`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"messages\"`}),_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:`#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:`\"Hello, how are you?\"`}),_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:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:`print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(response.json())`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`JavaScript`,numberOfLines:`16`,language:`javascript`,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:`javascript`,children:_jsxs(_components.code,{language:`javascript`,numberOfLines:`16`,children:[_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:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` fetch`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"https://api-llm.sunra.ai/v1/messages\"`}),_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:` method:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"POST\"`}),_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:` headers:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` {`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Authorization\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Bearer \u003cSUNRA_KEY>\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Content-Type\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"application/json\"`})]}),`\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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` body:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` JSON`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`stringify`}),_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:` \"anthropic/claude-sonnet-4-20250514\"`}),_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:` max_tokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 1024`}),_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:` [`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_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:` \"Hello, how are you?\"`}),_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:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` data`}),_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:` response`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`json`}),_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:`console`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`log`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`data`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})})]}),`\n`,_jsx(ResponseExample,{children:_jsx(CodeBlock,{filename:`200`,numberOfLines:`20`,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:`20`,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:`\"msg_01XFDUDYJgAACzvnptvVoYEL\"`}),_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:`\"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:`: [`})]}),`\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:`\"Hello! I'm doing well, thank you for asking. How can I help you today?\"`})]}),`\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:` \"model\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic/claude-sonnet-4-20250514\"`}),_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:` \"stop_reason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"end_turn\"`}),_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:` \"stop_sequence\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#569CD6`},children:`null`}),_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:` \"input_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`12`}),_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:` \"output_tokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`19`}),_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:`31`}),_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:` \"sunra_usage_semantics\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"anthropic.exclusive.v1\"`})]}),`\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`]})})})})]})}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":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","description":null,"href":"/ru/llm/messages"}}}},"mdxExtracts":{"tableOfContents":[{"title":"Аутентификация","slug":"аутентификация","depth":2,"children":[]},{"title":"Запрос","slug":"запрос","depth":2,"children":[]},{"title":"Ответ","slug":"ответ","depth":2,"children":[]}],"codeExamples":{"request":{"type":"RequestExample","children":[{"filename":"cURL","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"shellscript\">\u003ccode language=\"shellscript\" numberOfLines=\"13\">\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#DCDCAA\">curl\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -X\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> POST\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> https://api-llm.sunra.ai/v1/messages\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization: Bearer \u0026#x3C;SUNRA_KEY>\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -H\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type: application/json\"\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D7BA7D\"> \\\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\"> -d\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> '{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\": \"anthropic/claude-sonnet-4-20250514\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_tokens\": 1024,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"messages\": [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"role\": \"user\",\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"content\": \"Hello, how are you?\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> }'\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"Python","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"python\">\u003ccode language=\"python\" numberOfLines=\"17\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\">import\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">response \u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> requests.post(\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"https://api-llm.sunra.ai/v1/messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> headers\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Bearer \u0026#x3C;SUNRA_KEY>\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"application/json\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#953800;--shiki-dark:#9CDCFE\"> json\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\">=\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"anthropic/claude-sonnet-4-20250514\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"max_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">1024\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"user\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hello, how are you?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">)\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0550AE;--shiki-dark:#DCDCAA\">print\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(response.json())\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"},{"filename":"JavaScript","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"javascript\">\u003ccode language=\"javascript\" numberOfLines=\"16\">\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> response\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\"> fetch\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"https://api-llm.sunra.ai/v1/messages\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> method:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"POST\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> headers:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Authorization\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Bearer \u0026#x3C;SUNRA_KEY>\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Content-Type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"application/json\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> },\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> body:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> JSON\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">stringify\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">({\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> model:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"anthropic/claude-sonnet-4-20250514\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> max_tokens:\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\"> 1024\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> messages:\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> { \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">role:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"user\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">, \u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">content:\u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\"> \"Hello, how are you?\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ]\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> })\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">});\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#CF222E;--shiki-dark:#569CD6\">const\u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#4FC1FF\"> data\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#D4D4D4\"> =\u003c/span>\u003cspan style=\"color:#CF222E;--shiki-dark:#C586C0\"> await\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\"> response\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">json\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">();\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">console\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">.\u003c/span>\u003cspan style=\"color:#8250DF;--shiki-dark:#DCDCAA\">log\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">(\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#9CDCFE\">data\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">);\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]},"response":{"type":"ResponseExample","children":[{"filename":"200","html":"\u003cpre class=\"shiki shiki-themes github-light-default dark-plus\" style=\"background-color:#ffffff;--shiki-dark-bg:#0B0C0E;color:#1f2328;--shiki-dark:#D4D4D4\" language=\"json\">\u003ccode language=\"json\" numberOfLines=\"20\">\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">{\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"id\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"msg_01XFDUDYJgAACzvnptvVoYEL\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"message\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"role\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"assistant\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"content\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: [\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"type\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"text\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"text\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"Hello! I'm doing well, thank you for asking. How can I help you today?\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> ],\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"model\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"anthropic/claude-sonnet-4-20250514\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"stop_reason\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"end_turn\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"stop_sequence\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#569CD6\">null\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"usage\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: {\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"input_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">12\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"output_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">19\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"total_tokens\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0550AE;--shiki-dark:#B5CEA8\">31\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">,\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#116329;--shiki-dark:#9CDCFE\"> \"sunra_usage_semantics\"\u003c/span>\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">: \u003c/span>\u003cspan style=\"color:#0A3069;--shiki-dark:#CE9178\">\"anthropic.exclusive.v1\"\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\"> }\u003c/span>\u003c/span>\n\u003cspan class=\"line\">\u003cspan style=\"color:#1F2328;--shiki-dark:#D4D4D4\">}\u003c/span>\u003c/span>\n\u003c/code>\u003c/pre>"}],"attributes":[]}},"endpoint":{"title":"Create a message","path":"/v1/messages","servers":[{"url":"https://api-llm.sunra.ai"}],"method":"post","request":{"security":[],"parameters":{"query":{},"header":{"Authorization":{"schema":[{"type":"string","description":"Bearer-токен. Используйте ваш API-ключ в качестве Bearer-токена в заголовке Authorization. Формат: `Bearer \u003cSUNRA_KEY>`","required":true}]}},"cookie":{},"path":{}},"body":{"application/json":{"schemaArray":[{"type":"object","properties":{"model":[{"type":"string","description":"Модель, которая завершит ваш промпт. Просмотрите доступные модели на sunra.ai/models .","required":true}],"messages":[{"type":"array","items":[{"type":"object","properties":{"role":[{"type":"string","description":"Роль автора сообщения. Поддерживаемые значения: `user` , `assistant` .","required":true}],"content":[{"type":"array","items":[{"type":"object","properties":{"type":[{"type":"string","description":"Тип блока контента. Поддерживаемые значения: `text` , `image` , `tool_use` , `tool_result` .","required":true}],"text":[{"type":"string","description":"Текстовое содержание. Используется, когда type — `text` ."}],"source":[{"type":"object","properties":{"type":[{"type":"string","description":"Тип источника. Поддерживаемые значения: `base64` , `url` .","required":true}],"media_type":[{"type":"string","description":"Медиатип изображения. Например, `image/jpeg` , `image/png` , `image/gif` , `image/webp` .","required":true}],"data":[{"type":"string","description":"Данные изображения в кодировке base64. Обязательно, когда тип источника — `base64` ."}],"url":[{"type":"string","description":"URL изображения. Обязательно, когда тип источника — `url` ."}]},"description":"Источник изображения. Используется, когда type — `image` ."}]}}],"description":"Содержание сообщения. Может быть одной строкой или массивом блоков контента.","required":true}]}}],"description":"Входные сообщения. Каждое входное сообщение имеет `role` и `content` .","required":true}],"max_tokens":[{"type":"integer","description":"Максимальное количество токенов для генерации перед остановкой. Обратите внимание, что модель может остановиться до достижения этого максимума.","required":true}],"system":[{"type":"array","items":[{"type":"object","properties":{}}],"description":"Системный промпт. Способ предоставления контекста и инструкций модели. Может быть строкой или массивом блоков контента."}],"stream":[{"type":"boolean","description":"Передавать ли ответ в потоковом режиме с использованием Server-Sent Events (SSE)."}],"temperature":[{"type":"number","description":"Степень случайности, добавляемая в ответ. Диапазон от 0.0 до 1.0. Используйте `temperature` ближе к 0.0 для аналитических задач/задач с множественным выбором и ближе к 1.0 для творческих и генеративных задач."}],"top_p":[{"type":"number","description":"Использовать nucleus-сэмплирование. При nucleus-сэмплировании мы вычисляем кумулятивное распределение по всем вариантам для каждого последующего токена в порядке убывания вероятности и обрезаем его, когда оно достигает определённой вероятности, заданной `top_p` ."}],"top_k":[{"type":"integer","description":"Сэмплирование только из верхних K вариантов для каждого последующего токена. Используется для удаления маловероятных ответов из «длинного хвоста». Рекомендуется только для продвинутых случаев использования."}],"stop_sequences":[{"type":"array","items":[{"type":"string"}],"description":"Пользовательские текстовые последовательности, которые заставят модель прекратить генерацию. Возвращённый текст не будет содержать стоп-последовательность."}],"tools":[{"type":"array","items":[{"type":"object","properties":{"name":[{"type":"string","description":"Имя инструмента.","required":true}],"description":[{"type":"string","description":"Описание того, что делает этот инструмент."}],"input_schema":[{"type":"object","properties":{},"description":"JSON-схема для входных данных этого инструмента. Определяет структуру `input` , которую принимает ваш инструмент.","required":true}]}}],"description":"Определения инструментов, которые модель может использовать."}],"tool_choice":[{"type":"object","properties":{"type":[{"type":"string","description":"Поддерживаемые значения: `auto` (по умолчанию, решает модель), `any` (модель должна использовать инструмент), `tool` (модель должна использовать конкретный инструмент).","required":true}],"name":[{"type":"string","description":"Имя инструмента для использования. Обязательно, когда type — `tool` ."}]},"description":"Как модель должна использовать предоставленные инструменты."}],"metadata":[{"type":"object","properties":{"user_id":[{"type":"string","description":"Внешний идентификатор пользователя, связанного с запросом."}]},"description":"Объект, описывающий метаданные запроса."}],"thinking":[{"type":"object","properties":{"type":[{"type":"string","description":"Должно быть `enabled` .","required":true}],"budget_tokens":[{"type":"integer","description":"Максимальное количество токенов для размышлений. Должно быть больше или равно 1024.","required":true}]},"description":"Конфигурация расширенного мышления. При включении модель будет думать перед ответом."}]}}],"examples":{"example":{"value":{"model":"\u003cstring>","messages":[{"role":"\u003cstring>","content":[{"type":"\u003cstring>","text":"\u003cstring>","source":{"type":"\u003cstring>","media_type":"\u003cstring>","data":"\u003cstring>","url":"\u003cstring>"}}]}],"max_tokens":123,"system":[{}],"stream":true,"temperature":123,"top_p":123,"top_k":123,"stop_sequences":["\u003cstring>"],"tools":[{"name":"\u003cstring>","description":"\u003cstring>","input_schema":{}}],"tool_choice":{"type":"\u003cstring>","name":"\u003cstring>"},"metadata":{"user_id":"\u003cstring>"},"thinking":{"type":"\u003cstring>","budget_tokens":123}}}}}}},"response":{"200":{"application/json":{"schemaArray":[{"type":"object","properties":{"id":[{"type":"string","description":"Уникальный идентификатор сообщения, например `msg_01XFDUDYJgAACzvnptvVoYEL` ."}],"type":[{"type":"string","description":"Тип объекта. Всегда `message` ."}],"role":[{"type":"string","description":"Роль сгенерированного сообщения в беседе. Всегда `assistant` ."}],"content":[{"type":"array","items":[{"type":"object","properties":{"type":[{"type":"string","description":"Тип блока контента. Может быть `text` , `tool_use` или `thinking` ."}],"text":[{"type":"string","description":"Сгенерированный текст. Присутствует, когда type — `text` ."}],"id":[{"type":"string","description":"Идентификатор блока использования инструмента. Присутствует, когда type — `tool_use` ."}],"name":[{"type":"string","description":"Имя инструмента. Присутствует, когда type — `tool_use` ."}],"input":[{"type":"object","properties":{},"description":"Входные данные инструмента. Присутствует, когда type — `tool_use` ."}],"thinking":[{"type":"string","description":"Содержание размышлений. Присутствует, когда type — `thinking` ."}]}}],"description":"Контент, сгенерированный моделью. Это массив блоков контента."}],"model":[{"type":"string","description":"Модель, обработавшая запрос."}],"stop_reason":[{"type":"object","properties":{},"description":"Причина остановки модели. Может быть `end_turn` (модель достигла естественной точки остановки), `max_tokens` (превышен `max_tokens` или максимум модели), `stop_sequence` (сгенерирована одна из ваших пользовательских стоп-последовательностей) или `tool_use` (модель вызвала один или несколько инструментов)."}],"stop_sequence":[{"type":"object","properties":{},"description":"Какая пользовательская стоп-последовательность была сгенерирована, если таковая имеется."}],"usage":[{"type":"object","properties":{"input_tokens":[{"type":"integer","description":"Количество использованных свежих входных токенов. Исключает обе корзины кэша."}],"output_tokens":[{"type":"integer","description":"Количество использованных выходных токенов."}],"total_tokens":[{"type":"integer","description":"Все входные корзины плюс `output_tokens` . Не включается в потоковые ответы."}],"cache_creation_input_tokens":[{"type":"integer","description":"Количество входных токенов, использованных для создания записи кэша."}],"cache_read_input_tokens":[{"type":"integer","description":"Количество входных токенов, прочитанных из кэша."}],"sunra_usage_semantics":[{"type":"object","properties":{},"description":"Присутствует со значением `anthropic.exclusive.v1` , когда Sunra нормализовала этот ответ. Проверяйте это значение, а не выводите соглашение из чисел. См. Использование токенов ."}]},"description":"Использование для выставления счетов и ограничения скорости. Три входные корзины взаимоисключающие — см. Использование токенов ."}]}}],"examples":{"example":{"value":{"id":"\u003cstring>","type":"\u003cstring>","role":"\u003cstring>","content":[{"type":"\u003cstring>","text":"\u003cstring>","id":"\u003cstring>","name":"\u003cstring>","input":{},"thinking":"\u003cstring>"}],"model":"\u003cstring>","stop_reason":{},"stop_sequence":{},"usage":{"input_tokens":123,"output_tokens":123,"total_tokens":123,"cache_creation_input_tokens":123,"cache_read_input_tokens":123,"sunra_usage_semantics":{}}}}}}}},"deprecated":false}},"jsLinks":[],"subdomain":"sunraai","siteName":"Sunra.ai","title":"Create a message - Sunra.ai","navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/llm/messages","matchLevel":1},"zh-Hans":{"href":"/zh-Hans/llm/messages","matchLevel":1},"zh-Hant":{"href":"/zh-Hant/llm/messages","matchLevel":1},"fr":{"href":"/fr/llm/messages","matchLevel":1},"ja":{"href":"/ja/llm/messages","matchLevel":1},"es":{"href":"/es/llm/messages","matchLevel":1},"pt":{"href":"/pt/llm/messages","matchLevel":1},"hi":{"href":"/hi/llm/messages","matchLevel":1},"tr":{"href":"/tr/llm/messages","matchLevel":1},"de":{"href":"/de/llm/messages","matchLevel":1},"id":{"href":"/id/llm/messages","matchLevel":1},"it":{"href":"/it/llm/messages","matchLevel":1},"ko":{"href":"/ko/llm/messages","matchLevel":1},"ru":{"href":"/ru/llm/messages","matchLevel":0}}},"lastModified":"2026-09-19T11:27:28.960Z","originalFileLocation":"ru/llm/messages.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=\"application-name\" content=\"Sunra.ai\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_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=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/favicon-16x16.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/favicon-32x32.png\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/favicon.ico\" media=\"(prefers-color-scheme: light)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon-dark/android-chrome-192x192.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon-dark/favicon-16x16.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"32x32\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon-dark/favicon-32x32.png\" media=\"(prefers-color-scheme: dark)\">\u003clink data-mint-head rel=\"shortcut icon\" type=\"image/x-icon\" href=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Create a message - Sunra.ai\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"Sunra.ai\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.sunra.ai/ru/llm/messages\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://sunraai.mintlify.app/_mintlify/api/og/v2?division=LLM\u0026amp;title=Create+a+message\u0026amp;theme=bd1a022ff2457f18109208ab\u0026amp;signature=544d4e819ffada71d4fbc6b3453b1d90f00818aece73d2e98361ac8e31bd50c5\">\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=\"Create a message - Sunra.ai\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://sunraai.mintlify.app/_mintlify/api/og/v2?division=LLM\u0026amp;title=Create+a+message\u0026amp;theme=bd1a022ff2457f18109208ab\u0026amp;signature=544d4e819ffada71d4fbc6b3453b1d90f00818aece73d2e98361ac8e31bd50c5\">\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=\"/mintlify-assets/_mintlify/favicons/sunraai/LRMCLsYjFvskNvgC/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"Sunra.ai\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#ff632f\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.sunra.ai/ru/llm/messages\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ru/llm/messages.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://docs.sunra.ai/ru/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.sunra.ai/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hans\" href=\"https://docs.sunra.ai/zh-Hans/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh-Hant\" href=\"https://docs.sunra.ai/zh-Hant/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"fr\" href=\"https://docs.sunra.ai/fr/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.sunra.ai/ja/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.sunra.ai/es/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"pt\" href=\"https://docs.sunra.ai/pt/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"hi\" href=\"https://docs.sunra.ai/hi/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"tr\" href=\"https://docs.sunra.ai/tr/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"de\" href=\"https://docs.sunra.ai/de/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"id\" href=\"https://docs.sunra.ai/id/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"it\" href=\"https://docs.sunra.ai/it/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.sunra.ai/ko/llm/messages\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.sunra.ai/llm/messages\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.sunra.ai/#organization\",\"name\":\"Sunra.ai\",\"url\":\"https://docs.sunra.ai\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/sunraai/U2o8uzmv75no70tM/logo/light.svg?fit=max\u0026auto=format\u0026n=U2o8uzmv75no70tM\u0026q=85\u0026s=520c0afb29ad1fddc46fec66c975eb2a\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.sunra.ai#website\",\"name\":\"Sunra.ai\",\"url\":\"https://docs.sunra.ai\",\"publisher\":{\"@id\":\"https://docs.sunra.ai/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.sunra.ai/ru/llm/messages#webpage\",\"url\":\"https://docs.sunra.ai/ru/llm/messages\",\"name\":\"Create a message\",\"dateModified\":\"2026-09-19T11:27:28.960Z\",\"isPartOf\":{\"@id\":\"https://docs.sunra.ai#website\"},\"breadcrumb\":{\"@id\":\"https://docs.sunra.ai/ru/llm/messages#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.sunra.ai/ru/llm/messages#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"LLM\",\"item\":\"https://docs.sunra.ai/ru/llm/llm-quickstart\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Create a message\",\"item\":\"https://docs.sunra.ai/ru/llm/messages\"}]},{\"@type\":[\"TechArticle\",\"APIReference\"],\"@id\":\"https://docs.sunra.ai/ru/llm/messages#apireference\",\"headline\":\"Create a message\",\"name\":\"Create a message\",\"url\":\"https://docs.sunra.ai/ru/llm/messages\",\"mainEntityOfPage\":{\"@id\":\"https://docs.sunra.ai/ru/llm/messages#webpage\"},\"dateModified\":\"2026-09-19T11:27:28.960Z\",\"publisher\":{\"@id\":\"https://docs.sunra.ai/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.sunra.ai#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"Sunra.ai\",\"creator\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","siteName":"Sunra.ai","nav":{"global":{"anchors":[{"anchor":"X (Twitter)","icon":"x-twitter","href":"https://x.com/sunra_ai"},{"anchor":"Discord","icon":"discord","href":"https://discord.gg/897qCzvCcU"},{"anchor":"GitHub","icon":"github","href":"https://github.com/sunra-ai"}]},"languages":[{"language":"en","pages":[{"title":"en","href":"/llm/messages"}]},{"language":"zh-Hans","pages":[{"title":"zh-Hans","href":"/zh-Hans/llm/messages"}]},{"language":"zh-Hant","pages":[{"title":"zh-Hant","href":"/zh-Hant/llm/messages"}]},{"language":"fr","pages":[{"title":"fr","href":"/fr/llm/messages"}]},{"language":"ja","pages":[{"title":"ja","href":"/ja/llm/messages"}]},{"language":"es","pages":[{"title":"es","href":"/es/llm/messages"}]},{"language":"pt","pages":[{"title":"pt","href":"/pt/llm/messages"}]},{"language":"hi","pages":[{"title":"hi","href":"/hi/llm/messages"}]},{"language":"tr","pages":[{"title":"tr","href":"/tr/llm/messages"}]},{"language":"de","pages":[{"title":"de","href":"/de/llm/messages"}]},{"language":"id","pages":[{"title":"id","href":"/id/llm/messages"}]},{"language":"it","pages":[{"title":"it","href":"/it/llm/messages"}]},{"language":"ko","pages":[{"title":"ko","href":"/ko/llm/messages"}]},{"language":"ru","groups":[{"group":"Обзор","pages":[{"title":"Введение","href":"/ru"}]},{"group":"Multimodal","pages":[{"title":"Быстрый старт","href":"/ru/multimodal/quickstart"},{"title":"Текст в изображение","href":"/ru/multimodal/text-to-image"},{"title":"Текст в видео","href":"/ru/multimodal/text-to-video"},{"title":"Изображение в видео","href":"/ru/multimodal/image-to-video"},{"title":"Преобразование речи в текст","href":"/ru/multimodal/speech-to-text"},{"title":"Сервер MCP","href":"/ru/multimodal/mcp-server-setup"},{"title":"Очередь","href":"/ru/multimodal/queue"},{"title":"Интеграция на стороне сервера","href":"/ru/multimodal/server-side-integration"},{"title":"Ошибки","href":"/ru/multimodal/error"}]},{"group":"LLM","pages":[{"title":"Быстрый старт LLM","href":"/ru/llm/llm-quickstart"},{"title":"Использование токенов","href":"/ru/llm/token-usage"},{"title":"Create a chat completion","api":"POST https://api-llm.sunra.ai/v1/chat/completions","description":null,"href":"/ru/llm/chat"},{"title":"Create a message","api":"POST https://api-llm.sunra.ai/v1/messages","href":"/ru/llm/messages"},{"title":"Create a response","api":"POST https://api-llm.sunra.ai/v1/responses","description":null,"href":"/ru/llm/responses"},{"title":"Create embeddings","api":"POST https://api-llm.sunra.ai/v1/embeddings","href":"/ru/llm/embeddings"}]},{"group":"Клиентские библиотеки","pages":[{"title":"JavaScript / TypeScript","href":"/ru/client-libraries/javascript"},{"title":"Python","href":"/ru/client-libraries/python"},{"title":"Java","href":"/ru/client-libraries/java"},{"title":"Запросить новый клиент","href":"/ru/client-libraries/request-new-client"}]}]}]},"basePath":"","title":"Create a message - Sunra.ai","buildId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","deploymentId":"dpl_36EDyZCDfRuoUD9af5CH4M1bqY2h","dynamics":["10e4515597","c2aa737661","2b790eda92","b0f84f53ff"],"chunks":["BannerMarkdown-DHaG7hr_.js","dist-DKZWslLH.js","lib-DuNMoZ05.js","lib-B8HbPgcC.js","clsx-BIWXJmsZ.js","html-void-elements-mCSPHezU.js","katex-YMM-FMeD.js","marked.esm-CZWythHk.js","OpenApiReferenceProvider-DCDCdBVX.js","utils-ME8dDnLe.js","cloneDeep-izs3Hzxb.js","_Uint8Array-BVIqJ90l.js","isObjectLike-C8vmzPEN.js","isArray-Dcu1dQ5t.js","utils-0e84ACsd.js","toString-BX-iyh8G.js","isSymbol-CSH9U2Gm.js","addUniqueKeysToSchema-wgRBj-ia.js","snippetPresets-C11Sgb-o.js","style-to-object-BY3JEAdk.js","v4-DIgz8zy6.js","ApiExamples-C0lapOpP.js","isEqual-BfaiBbcl.js","usePlaygroundInputsStore-ZeRQV8fF.js","shallow-BupWh095.js","getApiPlaygroundDisplay-BnYQO2Ss.js","CodeSnippet-RKKOc8c_.js","CodeSnippets-Drf_m8wS.js","Page-Bevw23-4.js","getPastedJson-u6QiPzNZ.js","icon-Bb-CBSxO.js","MethodPill-F7l5AI7V.js","DuplicateIcon-IiAXkdSg.js","createIcon-FliI8EBc.js","DynamicMarkdown-B62XqCSI.js","SectionHeading-Dj31pT03.js","axios-vUo_bRtp.js"]}