Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата
Справочник по API для Google Gemini. Google Gemini: семейство мультимодальных текстовых моделей Google, от быстрой черновой генерации до глубоких рассуждений в уровнях Flash и Pro.
Быстрый старт
Создайте ключ в вашем рабочем пространстве Comfy и экспортируйте его как COMFY_API_KEY. Сниппеты Python и TypeScript используют Comfy SDK (pip install comfy-sdk и npm install @comfyorg/sdk); сниппет cURL выполняет тот же вызов напрямую по HTTP.Выберите модель, которую хотите вызвать. Всё ниже, от сниппетов до схемы и примеров, зависит от вашего выбора.
Gemini 3.1 Pro
Gemini 3.5 Flash
Gemini 2.5 Pro
Gemini 2.5 Flash
ID модели:vertexai/gemini-3.1-pro-previewЭндпоинт:POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview
Дождаться результата
Поставить в очередь и забрать позже
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменной окружения.# SDK автоматически создаёт ключ идемпотентности и использует его повторно при автоматических повторных попытках.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-3.1-pro-preview", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменной окружения.// SDK автоматически создаёт ключ идемпотентности и использует его повторно при автоматических повторных попытках.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const result = await comfy.models.run<Result>("vertexai/gemini-3.1-pro-preview", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
То же тело запроса, отправленное на POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests. Router отвечает 201 с request_id сразу после приёма запуска, а результат забирается, когда он готов, из этого или другого процесса. Доставка через очередь описывает статус, отмену и получение результата.
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменной окружения.# Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-3.1-pro-preview", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # вместе с ID модели это всё, что нужно другому процессу # Опрашивайте, пока запрос не завершится, выдерживая Retry-After, указанный сервером. async for update in handle.iter_events(): print(update.status, update.queue_position) # Собственный payload провайдера, то же значение, что возвращает models.run(). # Запрос, который завершился ошибкой или был отменён, вызывает здесь типизированную ошибку Router. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменной окружения.// Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-3.1-pro-preview", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // вместе с ID модели это всё, что нужно другому процессу// Опрашивайте, пока запрос не завершится, выдерживая Retry-After, указанный сервером.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// Тот же результат, что возвращает models.run(). Запрос, который завершился ошибкой или был отменён, отклоняется здесь.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Отправка. Router отвечает 201 с request_id, status_url, response_url и cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Опрашивайте, пока status не станет COMPLETED, выдерживая Retry-After секунд, указанные в каждом ответе.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Получение. 200 с собственным выводом модели, 202 с телом статуса, пока запрос ещё выполняется.curl https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Схема
Входы
object[]
обязательно
Содержимое текущего диалога с моделью. Для одноходовых запросов это один экземпляр. Для многоходовых запросов это повторяющееся поле, содержащее историю диалога и последний запрос.
object[]
обязательно
object
Данные на основе URI.
string
URI
string
Тип медиа файла, указанного в полях data или fileUri. Допустимы следующие значения. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8.4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
object
Встроенные данные в виде необработанных байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash с помощью inlineData можно указать до 3000 изображений.
string (byte)
Кодировка base64 изображения, PDF или видео для встраивания непосредственно в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MBФормат: byte
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8,4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Для получения дополнительной информации см. требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается при подсчёте лимита токенов. Ограничений на разрешение изображений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
string
Как модель читает видео в этой части. Укажите «AGENTIC», чтобы модель сама решала, какие сегменты проверять, вместо покадровой выборки с фиксированной частотой. Пропустите поле, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается в gemini-3.7-flash и более новых моделях Flash.
string
Текстовый промпт или фрагмент кода.
boolean
Указывает, что эта часть является шагом размышления/рассуждения модели.
string
Возможные значения: user, model
object
Настройки выборки, длины и вывода для генерации. Все поля необязательны: поля ниже, в которых объявлено значение default, применяют его при пропуске, а остальные используют поведение самой модели.
object
Настройки генерации изображений
string
Соотношение сторон для сгенерированных изображений
object
Необязательно. Формат вывода изображений для сгенерированных изображений.
integer
Необязательно. Качество сжатия выходного изображения.
string
Необязательно. Формат изображения, в котором следует сохранять вывод, на путях Vertex AI: в запросах, обслуживаемых собственными учётными данными Comfy, и в BYOK-запросах, аутентифицированных с помощью сервисного аккаунта GCP. Там принимаются значения image/png и image/jpeg, которые сопоставляются без учёта регистра и нормализуются к нижнему регистру перед пересылкой запроса; любое другое значение отклоняется с ошибкой 400, в которой указано это поле. Если не указано, по умолчанию используется image/png. Исключение составляет BYOK-запрос, аутентифицированный API-ключом Google AI Studio: у этого вышестоящего сервиса нет такого свойства, и он отклоняет весь вызов, если свойство присутствует, поэтому поле удаляется из запроса, вместо того чтобы применяться или отклоняться, а формат вывода будет тем, который выберет AI Studio. В каждом сценарии читайте тип медиа из полученной части ответа (inlineData.mimeType или fileData.mimeType, если задано uploadImagesToStorage), а не полагайтесь на отправленное значение.
string
Необязательно. Задаёт размер сгенерированных изображений. Поддерживаемые значения: 1K, 2K, 4K. Если не указано, модель будет использовать значение по умолчанию 1K.
integer
Максимальное количество токенов, которое можно сгенерировать в ответе. Один токен приблизительно равен 4 символам. 100 токенов соответствуют приблизительно 60-80 словам.Диапазон: от 16 до 65536
`TEXT`, `IMAGE`[]
integer
Если seed зафиксирован на конкретном значении, модель делает всё возможное, чтобы выдавать одинаковый ответ на повторные запросы. Детерминированный вывод не гарантируется. Кроме того, изменение модели или настроек параметров, например температуры, может вызывать вариации в ответе даже при использовании одного и того же значения seed. По умолчанию используется случайное значение seed. Доступно для следующих моделей: gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001
string[]
number
по умолчанию:"1"
Температура используется для выборки при генерации ответа, которая происходит при применении topP и topK. Температура управляет степенью случайности при выборе токенов. Низкие температуры подходят для промптов, требующих менее открытого или творческого ответа, а высокие температуры могут давать более разнообразные или творческие результаты. Температура 0 означает, что всегда выбираются токены с наибольшей вероятностью. В этом случае ответы на заданный промпт в основном детерминированы, но небольшая вариативность всё же возможна. Если модель возвращает слишком общий или слишком короткий ответ либо выдаёт запасной ответ, попробуйте увеличить температуру.Диапазон: от 0 до 2Формат: float
object
Необязательно. Настройки функций размышления. Размышление представляет собой процесс, в котором модель разбивает сложную задачу на более мелкие шаги для генерации более качественного ответа.
boolean
Необязательно. Если задано значение true, модель включит свои рассуждения в ответ.
integer
Необязательно. Бюджет токенов для процесса рассуждений модели. Модель постарается не выходить за рамки этого бюджета.
string
Необязательно. Уровень рассуждений для модели.Возможные значения: THINKING_LEVEL_UNSPECIFIED, LOW, MEDIUM, HIGH, MINIMAL, XHIGH
integer
по умолчанию:"40"
Top-K определяет, как модель выбирает токены для вывода. При top-K равном 1 следующий выбранный токен будет наиболее вероятным среди всех токенов словаря модели. При top-K равном 3 следующий токен выбирается из 3 наиболее вероятных токенов с помощью температуры.Диапазон: от 1 до …
number
по умолчанию:"0.95"
Если указано, используется ядерная выборка (nucleus sampling).
Top-P определяет, как модель выбирает токены для вывода. Токены выбираются от наиболее вероятных (см. top-K) к наименее вероятным, пока сумма их вероятностей не достигнет значения top-P. Например, если токены A, B и C имеют вероятности 0.3, 0.2 и 0.1, а значение top-P равно 0.5, то модель выберет в качестве следующего токена либо A, либо B с помощью температуры, а C исключит из числа кандидатов.
Укажите меньшее значение для менее случайных ответов и большее значение для более случайных ответов.Диапазон: от 0 до 1Формат: float
object[]
Настройки блокировки небезопасного содержимого для каждого запроса. Применяются к GenerateContentResponse.candidates.
Инструкции для модели, направляющие её к более качественной работе. Например, «Отвечай как можно более кратко» или «Не используй технические термины в ответе». Текстовые строки учитываются в лимите токенов. Поле role в systemInstruction игнорируется и не влияет на работу модели. Примечание: в parts следует использовать только текст, а содержимое каждой части должно быть отдельным абзацем.
object[]
обязательно
Список упорядоченных частей, составляющих одно сообщение. Разные части могут иметь разные MIME-типы IANA. Ограничения на входы, например максимальное число токенов или количество изображений, смотрите в спецификациях моделей на странице моделей Google.
string
Текстовый промпт или фрагмент кода.
string
Идентификатор сущности, создающей сообщение. Поддерживаются следующие значения: user: сообщение отправлено реальным человеком, обычно это сообщение, созданное пользователем. model: сообщение сгенерировано моделью. Значение model используется для вставки сообщений от модели в диалог в ходе многошаговых бесед. Для одношаговых бесед это поле можно оставить пустым или не задавать.Возможные значения: user, model
object[]
Фрагмент кода, позволяющий системе взаимодействовать с внешними системами для выполнения действия или набора действий за пределами знаний и области применения модели. См. Function calling.
object[]
string
string
обязательно
object
JSON-схема параметров функции
boolean
Если задано значение true, сгенерированные изображения будут загружены в облачное хранилище и возвращены в виде подписанных URL вместо встроенных данных base64. Срок действия URL истекает через 24 часа.
object
Для видео на входе: смещения начала и конца видео в формате Duration. Например, чтобы указать 10-секундный фрагмент, начинающийся на 1:00, задайте “startOffset”: { “seconds”: 60 } и “endOffset”: { “seconds”: 70 }. Метаданные следует указывать только тогда, когда видеоданные передаются в inlineData или fileData.
object
Представляет смещение длительности для позиций на временной шкале видео.
integer
Дробная часть секунды со знаком с наносекундной точностью. Отрицательные значения секунд с дробной частью должны иметь неотрицательное значение nanos.Диапазон: от 0 до 999999999
integer
Секунды со знаком в пределах интервала времени. Должны быть в диапазоне от -315,576,000,000 до +315,576,000,000 включительно.Диапазон: от -315576000000 до 315576000000
object
Представляет смещение длительности для позиций на временной шкале видео.
integer
Дробная часть секунды со знаком с наносекундной точностью. Отрицательные значения секунд с дробной частью должны иметь неотрицательное значение nanos.Диапазон: от 0 до 999999999
integer
Знаковые секунды интервала времени. Должно быть от -315,576,000,000 до +315,576,000,000 включительно.Диапазон: от -315576000000 до 315576000000
Сгенерировано из схемы, которую Router отдаёт по GET /v2/models/vertexai/gemini-3.1-pro-preview/openapi.json, того же документа, по которому он проверяет вызов, прежде чем запрос дойдёт до провайдера.
Выходы
object[]
object
object[]
string[]
integer
string
string (date)
Формат: date
integer
string
string
object
Содержимое текущей беседы с моделью. Для одноходовых запросов это единственный экземпляр. Для многоходовых запросов это повторяющееся поле, содержащее историю беседы и последний запрос.
object[]
обязательно
object
Данные на основе URI.
string
URI
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8.4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
object
Встроенные данные в виде сырых байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash можно указать до 3000 изображений с помощью inlineData.
string (byte)
Кодировка base64 для изображения, PDF или видео, которые нужно встроить прямо в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MBФормат: byte
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8.4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
string
Как модель читает видео из этой части. Укажите “AGENTIC”, чтобы модель сама решала, какие сегменты просматривать, вместо выборки кадров с фиксированной частотой. Не указывайте значение, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается на gemini-3.7-flash и более новых моделях Flash.
string
Текстовый промпт или фрагмент кода.
boolean
Указывает, что эта часть является шагом размышления/рассуждения модели.
Вероятность того, что содержимое нарушает указанную категорию безопасностиВозможные значения: NEGLIGIBLE, LOW, MEDIUM, HIGH, UNKNOWN
string
Уникальный идентификатор ответа.
object
integer
Только для вывода. Количество токенов в кэшированной части входа (кэшированное содержимое).
integer
Количество токенов в ответе (ответах).
object[]
Разбивка токенов кандидатов по модальностям.
string
Тип модальности входного или выходного содержимого.Возможные значения: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Количество токенов для указанной модальности.
integer
Количество токенов в запросе. Если задан cachedContent, это всё равно общий эффективный размер промпта, то есть он включает количество токенов в кэшированном содержимом.
object[]
Разбивка токенов промпта по модальностям.
string
Тип модальности входного или выходного содержимого.Возможные значения: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Количество токенов для указанной модальности.
integer
Количество токенов в выводе мыслей.
integer
Количество токенов в промпте (промптах) использования инструментов.
object[]
Разбивка токенов промпта использования инструментов по модальностям.
string
Тип модальности входного или выходного содержимого.Возможные значения: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Количество токенов для указанной модальности.
integer
Общее количество токенов (промпт + кандидаты).
string
Тип трафика, использованный для запроса (например, PROVISIONED_THROUGHPUT).
Примеры
Вход
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Выход
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
ID модели:vertexai/gemini-3.5-flashЭндпоинт:POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash
Дождаться результата
Поставить в очередь и забрать позже
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменных окружения.# SDK автоматически создаёт ключ идемпотентности и повторно использует его для автоматических повторных попыток.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-3.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменных окружения.// SDK автоматически создаёт ключ идемпотентности и повторно использует его для автоматических повторных попыток.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const result = await comfy.models.run<Result>("vertexai/gemini-3.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
То же тело запроса, отправленное на POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests. Router отвечает 201 с request_id, как только запуск принят, а результат забирается, когда он готов, из этого процесса или из любого другого. В разделе Доставка через очередь описаны статус, отмена и получение результата.
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменной окружения.# Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-3.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # вместе с ID модели это всё, что нужно другому процессу # Опрашивайте, пока запрос не завершится, выдерживая Retry-After, который называет сервер. async for update in handle.iter_events(): print(update.status, update.queue_position) # Собственный payload провайдера, то же значение, которое возвращает models.run(). # Запрос, завершившийся ошибкой или отменённый, вызовет здесь типизированную ошибку Router. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменной окружения.// Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-3.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // вместе с ID модели это всё, что нужно другому процессу// Опрашивайте, пока запрос не завершится, выдерживая Retry-After, который называет сервер.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// Тот же результат, который возвращает models.run(). Запрос, завершившийся ошибкой или отменённый, будет отклонён здесь.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Отправка. Router отвечает 201 с request_id, status_url, response_url и cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Опрашивайте, пока статус не станет COMPLETED, выдерживая Retry-After секунд, указанные в каждом ответе.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Получение. 200 с нативным выводом модели, 202 с телом статуса, пока запрос ещё выполняется.curl https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Схема
Входы
object[]
обязательно
Содержимое текущего диалога с моделью. Для одноходовых запросов это один экземпляр. Для многоходовых запросов это повторяющееся поле, которое содержит историю диалога и последний запрос.
object[]
обязательно
object
Данные на основе URI.
string
URI
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8,4 часа, а максимальная длина видеофайла (без аудио) составляет один час. Для получения дополнительной информации см. требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображения нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
object
Встроенные данные в виде необработанных байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash можно указать до 3000 изображений, используя inlineData.
string (byte)
Кодировка base64 изображения, PDF-файла или видео, которые нужно включить прямо в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MBФормат: byte
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8,4 часа, а максимальная длина видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. На разрешение изображения ограничений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
string
Как модель читает видео в этой части. Установите “AGENTIC”, чтобы модель сама решала, какие сегменты просматривать, вместо выборки кадров с фиксированной частотой. Пропустите поле, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается на gemini-3.7-flash и более новых моделях Flash.
string
Текстовый промпт или фрагмент кода.
boolean
Указывает, что эта часть является шагом размышления (reasoning) модели.
string
Возможные значения: user, model
object
Настройки выборки, длины и вывода для генерации. Все поля необязательны: поля ниже, для которых указан default, применяют его при пропуске, а остальные используют собственное поведение модели.
object
Конфигурация генерации изображений
string
Соотношение сторон для сгенерированных изображений
object
Необязательно. Формат вывода для сгенерированных изображений.
integer
Необязательно. Качество сжатия выходного изображения.
string
Необязательно. Формат изображения, в котором следует сохранять результат, на путях Vertex AI: запросы, обслуживаемые собственными учётными данными Comfy, и BYOK-запросы, аутентифицированные сервисным аккаунтом GCP. Принимаемые там значения: image/png и image/jpeg, они сопоставляются без учёта регистра и нормализуются к нижнему регистру перед пересылкой запроса; любое другое значение отклоняется с ошибкой 400, в которой указано это поле. Если поле не указано, используется image/png. Исключение составляет BYOK-запрос, аутентифицированный API-ключом Google AI Studio: у этого апстрима нет такого свойства, и он отклоняет весь вызов, если оно присутствует, поэтому поле удаляется из запроса, а не учитывается или отклоняется, и формат вывода будет таким, какой выберет AI Studio. На любом пути читайте тип медиа из полученной части ответа (inlineData.mimeType или fileData.mimeType, если задан uploadImagesToStorage), а не полагайтесь на отправленное значение.
string
Необязательно. Задаёт размер сгенерированных изображений. Поддерживаемые значения: 1K, 2K, 4K. Если не указано, модель использует значение по умолчанию 1K.
integer
Максимальное количество токенов, которое может быть сгенерировано в ответе. Один токен — это примерно 4 символа. 100 токенов соответствуют примерно 60-80 словам.Диапазон: от 16 до 65536
`TEXT`, `IMAGE`[]
integer
Если seed зафиксирован на определённом значении, модель делает всё возможное, чтобы выдать одинаковый ответ на повторные запросы. Детерминированный вывод не гарантируется. Кроме того, изменение модели или параметров, например температуры, может вызвать вариации ответа даже при одном и том же значении seed. По умолчанию используется случайное значение seed. Доступно для следующих моделей:, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001
string[]
number
по умолчанию:"1"
Температура используется для выборки при генерации ответа, которая происходит при применении topP и topK. Температура управляет степенью случайности при выборе токенов. Низкие температуры подходят для промптов, требующих менее открытого или творческого ответа, а высокие могут привести к более разнообразным или творческим результатам. Температура 0 означает, что всегда выбираются токены с наибольшей вероятностью. В этом случае ответы на данный промпт в основном детерминированы, но небольшая вариативность всё же возможна. Если модель возвращает слишком общий, слишком короткий ответ или выдаёт резервный ответ, попробуйте увеличить температуруДиапазон: от 0 до 2Формат: float
object
Необязательно. Настройки функций размышления. Размышление - это процесс, в котором модель разбивает сложную задачу на меньшие шаги, чтобы сгенерировать более качественный ответ.
boolean
Необязательно. Если указано true, модель включит свои размышления в ответ.
integer
Необязательно. Бюджет токенов для процесса размышления модели. Модель постарается не выходить за пределы этого бюджета.
string
Необязательно. Уровень размышления для модели.Возможные значения: THINKING_LEVEL_UNSPECIFIED, LOW, MEDIUM, HIGH, MINIMAL, XHIGH
integer
по умолчанию:"40"
Top-K меняет то, как модель выбирает токены для вывода. Значение top-K, равное 1, означает, что следующий выбранный токен является наиболее вероятным среди всех токенов словаря модели. Значение top-K, равное 3, означает, что следующий токен выбирается из 3 наиболее вероятных токенов с помощью температуры.Диапазон: от 1 до …
number
по умолчанию:"0.95"
Если указано, используется ядерная выборка.
Top-P меняет то, как модель выбирает токены для вывода. Токены выбираются от наиболее (см. top-K) до наименее вероятных, пока сумма их вероятностей не достигнет значения top-P. Например, если токены A, B и C имеют вероятность 0.3, 0.2 и 0.1, а значение top-P равно 0.5, то модель выберет в качестве следующего токена либо A, либо B с помощью температуры, а C исключит как кандидата.
Укажите меньшее значение для менее случайных ответов и большее значение для более случайных ответов.Диапазон: от 0 до 1Формат: float
object[]
Настройки для каждого запроса для блокировки небезопасного содержимого. Применяются к GenerateContentResponse.candidates.
Инструкции для модели, направляющие её к более высокой производительности. Например, «Отвечай как можно более кратко» или «Не используй технические термины в ответе». Текстовые строки учитываются в лимите токенов. Поле role в systemInstruction игнорируется и не влияет на работу модели. Примечание: в parts следует использовать только текст, а содержимое каждой части должно быть отдельным абзацем.
object[]
обязательно
Список упорядоченных частей, составляющих одно сообщение. Разные части могут иметь разные типы IANA MIME. Об ограничениях на входы, например о максимальном числе токенов или количестве изображений, см. спецификации модели на странице моделей Google.
string
Текстовый промпт или фрагмент кода.
string
Роль сущности, создающей сообщение. Поддерживаются следующие значения: user: указывает, что сообщение отправлено реальным человеком, обычно это сообщение, созданное пользователем. model: указывает, что сообщение сгенерировано моделью. Значение model используется для вставки сообщений от модели в разговор в ходе многоходовых диалогов. Для одноходовых разговоров это поле можно оставить пустым или не задавать.Возможные значения: user, model
object[]
Фрагмент кода, который позволяет системе взаимодействовать с внешними системами для выполнения действия или набора действий вне знаний и области компетенции модели. См. Function calling.
object[]
string
string
обязательно
object
Схема JSON для параметров функции
boolean
Если указано true, сгенерированные изображения будут загружены в облачное хранилище и возвращены как подписанные URL вместо встроенных данных base64. URL истекают через 24 часа.
object
Для видео на входе: начальное и конечное смещение видео в формате Duration. Например, чтобы указать 10-секундный фрагмент, начинающийся с 1:00, задайте “startOffset”: { “seconds”: 60 } и “endOffset”: { “seconds”: 70 }. Метаданные следует указывать только тогда, когда видеоданные передаются в inlineData или fileData.
object
Представляет смещение длительности для позиций на временной шкале видео.
integer
Знаковые доли секунды с наносекундной точностью. Отрицательные значения секунд с дробной частью должны всё равно иметь неотрицательные значения nanos.Диапазон: от 0 до 999999999
integer
Знаковые секунды интервала времени. Должно быть от -315,576,000,000 до +315,576,000,000 включительно.Диапазон: от -315576000000 до 315576000000
object
Представляет смещение длительности для позиций на временной шкале видео.
integer
Дробная часть секунды со знаком в наносекундном разрешении. Отрицательные значения секунд с дробной частью всё равно должны иметь неотрицательные значения наносекунд.Диапазон: от 0 до 999999999
integer
Секунды интервала времени со знаком. Значение должно быть от -315,576,000,000 до +315,576,000,000 включительно.Диапазон: от -315576000000 до 315576000000
Сгенерировано из схемы, которую Router предоставляет по адресу GET /v2/models/vertexai/gemini-3.5-flash/openapi.json, того же документа, по которому он проверяет вызов перед тем, как запрос поступит к провайдеру.
Выходы
object[]
object
object[]
string[]
integer
string
string (date)
Формат: date
integer
string
string
object
Содержимое текущего диалога с моделью. Для запросов с одним ходом это один экземпляр. Для запросов с несколькими ходами это повторяющееся поле, содержащее историю диалога и последний запрос.
object[]
обязательно
object
Данные на основе URI.
string
URI
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения включают следующие. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8.4 часа, а максимальная длина видеофайла (без звука) составляет один час. Дополнительные сведения см. в разделе Требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
object
Встроенные данные в виде необработанных байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash можно указать до 3000 изображений с помощью inlineData.
string (byte)
Кодировка base64 изображения, PDF или видео для встраивания непосредственно в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MBФормат: byte
string
Тип медиа файла, указанного в полях data или fileUri. Допустимые значения включают следующие. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8.4 часа, а максимальная длина видеофайла (без звука) составляет один час. Дополнительные сведения см. в разделе Требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.Возможные значения: application/pdf, audio/mpeg, audio/mp3, audio/wav, image/png, image/jpeg, image/webp, text/plain, video/mov, video/mpeg, video/mp4, video/mpg, video/avi, video/wmv, video/mpegps, video/flv, image/heic, image/heif, audio/flac, video/webm
string
Как модель читает видео в этой части. Укажите "AGENTIC", чтобы модель сама решала, какие сегменты проверять, вместо покадровой выборки с фиксированной частотой. Не указывайте поле, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается в gemini-3.7-flash и более новых моделях Flash.
string
Текстовый промпт или фрагмент кода.
boolean
Указывает, что эта часть является шагом размышления/рассуждения модели.
Вероятность того, что содержимое нарушает указанную категорию безопасностиВозможные значения: NEGLIGIBLE, LOW, MEDIUM, HIGH, UNKNOWN
string
Уникальный идентификатор ответа.
object
integer
Только вывод. Количество токенов в кэшированной части входных данных (кэшированное содержимое).
integer
Количество токенов в ответе (ответах).
object[]
Разбивка токенов кандидатов по модальностям.
string
Тип модальности входного или выходного содержимого.Возможные значения: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Количество токенов для данной модальности.
integer
Количество токенов в запросе. Если задан cachedContent, это по-прежнему общий эффективный размер промпта, то есть он включает количество токенов в кэшированном содержимом.
object[]
Разбивка токенов промпта по модальностям.
string
Тип модальности входного или выходного содержимого.Возможные значения: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Количество токенов для данной модальности.
integer
Количество токенов в выводе мыслей.
integer
Количество токенов в промпте (промптах) использования инструментов.
object[]
Разбивка токенов промпта использования инструментов по модальностям.
string
Тип модальности входного или выходного содержимого.Возможные значения: MODALITY_UNSPECIFIED, TEXT, IMAGE, VIDEO, AUDIO, DOCUMENT
integer
Количество токенов для данной модальности.
integer
Общее количество токенов (промпт + кандидаты).
string
Тип трафика, использованный для запроса (например, PROVISIONED_THROUGHPUT).
Примеры
Входы
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Выходы
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
ID модели:vertexai/gemini-2.5-proЭндпоинт:POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro
Дождаться результата
Поставить в очередь и забрать позже
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменной окружения.# SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторных попытках.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-2.5-pro", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменной окружения.// SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторных попытках.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const result = await comfy.models.run<Result>("vertexai/gemini-2.5-pro", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
То же тело, отправленное на POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests. Router отвечает 201 с request_id, как только запуск принят, а результат забирается, когда он готов, из этого или другого процесса. Доставка через очередь подробно описывает статус, отмену и получение результата.
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменных окружения.# Каждый вызов submit() создаёт собственный Idempotency-Key и повторно использует его при автоматических повторных попытках.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-2.5-pro", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # вместе с ID модели это всё, что нужно другому процессу # Опрашивает до завершения запроса, ожидая Retry-After, указанный сервером. async for update in handle.iter_events(): print(update.status, update.queue_position) # Собственный payload провайдера, то же значение, которое возвращает models.run(). # Запрос, завершившийся ошибкой или отменённый, вызывает здесь типизированную ошибку Router. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменных окружения.// Каждый вызов submit() создаёт собственный Idempotency-Key и повторно использует его при автоматических повторных попытках.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-2.5-pro", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // вместе с ID модели это всё, что нужно другому процессу// Опрашивает до завершения запроса, ожидая Retry-After, указанный сервером.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// Тот же результат, который возвращает models.run(). Запрос, завершившийся ошибкой или отменённый, отклоняется здесь.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Отправка. Router отвечает 201 с request_id, status_url, response_url и cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Опрашивайте, пока статус не станет COMPLETED, ожидая Retry-After секунд, указанные в каждом ответе.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Получение. 200 с выводом модели в исходном формате, 202 с телом статуса, пока запрос ещё выполняется.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Схема
Входы
Поля соответствуют опубликованной спецификации API Google и проверяются на соответствие ей в CI. Собственная схема Router для этой модели пока не опубликована, поэтому запросы передаются провайдеру без валидации.
object[]
обязательно
Диалог на текущий момент, сначала старые. Часть бывает text или inlineData, чтобы отправить изображение, аудио или видео вместе с промптом.
string
обязательно
Автор реплики.Возможные значения: user, model
object[]
обязательно
Части содержимого реплики.
string
Текстовая часть.
object
Встроенная часть медиа.
string
Тип медиа, например image/png.
string
Медиабайты в кодировке Base64.
object
Системный промпт, применяемый ко всему диалогу.
object[]
string
object
Настройки выборки и длины.
number
Случайность выборки. Значения по умолчанию модель-специфичны.Диапазон: от 0 до 2
number
Порог нуклеусной выборки. Значения по умолчанию модель-специфичны.
integer
Порог отсечения top-k выборки. Значения по умолчанию модель-специфичны.
integer
Верхняя граница сгенерированных токенов.
integer
Сид для воспроизводимой выборки.
string[]
Строки, которые завершают генерацию при появлении.
object
Управление уровнем рассуждений на моделях с поддержкой.
string
Возможные значения: MINIMAL, LOW, MEDIUM, HIGH
boolean
Возвращать рассуждения модели вместе с ответом.
object[]
Объявления функций, которые модель может вызвать.
object[]
string
string
object
JSON Schema для аргументов функции.
Выходы
Router возвращает нативный ответ Google без изменений. Текст находится в candidates[0].content.parts[0].text.
object[]
Сгенерированные кандидаты; один, если вы не запросили больше.
object
string
Возможные значения: model
object[]
string
Сгенерированный текст.
object
Присутствует, когда модель решила вызвать один из ваших tools.
string
object
string
Почему генерация остановилась: STOP, MAX_TOKENS, SAFETY, …
object
Учёт токенов для вызова.
integer
Токены в промпте.
integer
Токены в сгенерированных кандидатах.
object
Присутствует, когда был заблокирован сам промпт. Перед чтением результата проверьте, присутствует ли candidates; usageMetadata также может присутствовать в заблокированном ответе.
string
Почему промпт был заблокирован. Кандидаты не возвращаются; переформулируйте промпт и повторите попытку.Возможные значения: SAFETY, OTHER, BLOCKLIST, PROHIBITED_CONTENT, IMAGE_SAFETY
Примеры
Вход
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Выход
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
ID модели:vertexai/gemini-2.5-flashЭндпоинт:POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash
Дождаться результата
Поставить в очередь и забрать позже
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменных окружения.# SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторах.async def main(): async with AsyncComfy() as client: result = await client.models.run( "vertexai/gemini-2.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменных окружения.// SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторах.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const result = await comfy.models.run<Result>("vertexai/gemini-2.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"
То же тело, отправленное на POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests. Router отвечает 201 с request_id, как только запуск принят, а результат забирается, когда он готов, из этого процесса или из любого другого. В разделе Доставка через очередь описаны статус, отмена и получение результата.
import asynciofrom comfy_sdk import AsyncComfy# Читает COMFY_API_KEY из переменной окружения.# Каждый вызов submit() создаёт свой Idempotency-Key и повторно использует его при автоматических повторах.async def main(): async with AsyncComfy() as client: handle = await client.models.submit( "vertexai/gemini-2.5-flash", { "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256, }, }, ) print("request_id:", handle.request_id) # вместе с ID модели, этого достаточно другому процессу # Опрашивать до завершения запроса, ожидая указанный сервером Retry-After. async for update in handle.iter_events(): print(update.status, update.queue_position) # Собственный payload провайдера, то же значение, что возвращает models.run(). # Запрос, который завершился ошибкой или был отменён, здесь вызывает типизированную ошибку Router. result = await handle.get() print("text:", result["candidates"][0]["content"]["parts"][0]["text"])asyncio.run(main())
import { comfy } from "@comfyorg/sdk";// Читает COMFY_API_KEY из переменной окружения.// Каждый вызов submit() создаёт свой Idempotency-Key и повторно использует его при автоматических повторах.type Result = { candidates: { content: { parts: { text: string }[] } }[] };const handle = await comfy.models.submit<Result>("vertexai/gemini-2.5-flash", { contents: [ { role: "user", parts: [ { text: "Describe a single red maple leaf on a white background in one sentence.", }, ], }, ], generationConfig: { temperature: 0.7, maxOutputTokens: 256, },});console.log("requestId:", handle.requestId); // вместе с ID модели, этого достаточно другому процессу// Опрашивать до завершения запроса, ожидая указанный сервером Retry-After.for await (const update of handle.events()) { console.log(update.status, update.queuePosition);}// Тот же результат, что возвращает models.run(). Запрос, который завершился ошибкой или был отменён, отклоняется здесь.const result = await handle.get();if (result.kind !== "json") throw new Error("expected a JSON result");console.log("text:", result.data.candidates[0].content.parts[0].text);
# 1. Отправить. Router отвечает 201 с request_id, status_url, response_url и cancel_url.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests \ -H "X-API-Key: $COMFY_API_KEY" \ -H "Idempotency-Key: $(uuidgen)" \ -H "Content-Type: application/json" \ -d "{\"contents\": [{\"role\":\"user\",\"parts\":[{\"text\":\"Describe a single red maple leaf on a white background in one sentence.\"}]}], \"generationConfig\": {\"temperature\":0.7,\"maxOutputTokens\":256}}"# 2. Опрашивать до статуса COMPLETED, ожидая указанное в каждом ответе число секунд Retry-After.REQUEST_ID="<request_id from the 201 body>"curl -i https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/$REQUEST_ID/status \ -H "X-API-Key: $COMFY_API_KEY"# 3. Забрать. 200 с нативным выводом модели, 202 с телом статуса, пока запрос ещё выполняется.curl https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/$REQUEST_ID \ -H "X-API-Key: $COMFY_API_KEY"
Схема
Входы
Поля соответствуют опубликованной спецификации API Google и проверяются по ней в CI. Собственная схема Router для этой модели пока не опубликована, поэтому запросы передаются провайдеру без валидации.
object[]
обязательно
Диалог на данный момент, сначала старые. Часть это text либо inlineData, чтобы отправить изображение, аудио или видео вместе с промптом.
string
обязательно
Кто автор реплики.Возможные значения: user, model
object[]
обязательно
Части содержимого реплики.
string
Текстовая часть.
object
Встроенная часть с медиа.
string
Тип медиа, например image/png.
string
Байты медиа в кодировке Base64.
object
Системный промпт, применяемый ко всему диалогу.
object[]
string
object
Настройки выборки и длины.
number
Случайность выборки. Значения по умолчанию зависят от модели.Диапазон: от 0 до 2.
number
Порог nucleus-выборки. Значения по умолчанию зависят от модели.
integer
Порог top-k выборки. Значения по умолчанию зависят от модели.
integer
Верхняя граница количества сгенерированных токенов.
integer
Начальное значение (seed) для воспроизводимой выборки.
string[]
Строки, при появлении которых генерация завершается.
object
Управление уровнем рассуждений для моделей, которые это поддерживают.
string
Возможные значения: MINIMAL, LOW, MEDIUM, HIGH
boolean
Возвращать рассуждения модели вместе с ответом.
object[]
Объявления функций, которые модель может вызывать.
object[]
string
string
object
JSON Schema для аргументов функции.
Выходы
Router возвращает нативный ответ Google без изменений. Текст находится в candidates[0].content.parts[0].text.
object[]
Сгенерированные кандидаты; один, если вы не запросили больше.
object
string
Возможные значения: model
object[]
string
Сгенерированный текст.
object
Присутствует, когда модель решила вызвать один из ваших tools.
string
object
string
Причина остановки генерации: STOP, MAX_TOKENS, SAFETY, …
object
Учет токенов для вызова.
integer
Количество токенов в промпте.
integer
Количество токенов в сгенерированных кандидатах.
object
Присутствует, когда был заблокирован сам промпт. Перед чтением результата проверьте, присутствует ли candidates; usageMetadata также может присутствовать в заблокированном ответе.
string
Причина блокировки промпта. Кандидаты не возвращаются; переформулируйте промпт и повторите попытку.Возможные значения: SAFETY, OTHER, BLOCKLIST, PROHIBITED_CONTENT, IMAGE_SAFETY
Примеры
Входы
{ "contents": [ { "role": "user", "parts": [ { "text": "Describe a single red maple leaf on a white background in one sentence." } ] } ], "generationConfig": { "temperature": 0.7, "maxOutputTokens": 256 }}
Выходы
{ "candidates": [ { "content": { "role": "model", "parts": [ { "text": "A single red maple leaf rests on a plain white background, its edges sharp and its color deep." } ] }, "finishReason": "STOP" } ], "usageMetadata": { "promptTokenCount": 18, "candidatesTokenCount": 24 }}
Перед публикацией
SDK создают Idempotency-Key и переиспользуют его для автоматических повторов. При ручных повторах используйте исходный ключ. Router может удерживать соединение до 10 минут.Когда запрос завершается ошибкой, Router отправляет заголовок ответа X-Comfy-Error-Type с объяснением причины. Код 422 означает, что Router отклонил вход до вызова провайдера, а 413 означает, что тело запроса оказалось больше, чем Router принимает. Скачивайте сгенерированные ассеты своевременно, поскольку URL результатов могут истекать.Любое ограничение размера, указанное в описании поля выше, это собственный предел провайдера для этого поля, приведённый из спецификации провайдера. Router применяет отдельное ограничение ко всему телу запроса, в которое засчитываются медиа в base64: см. размер тела запроса.Эта страница описывает одну партнёрскую модель, вызываемую через Comfy Router. Тот же пакет comfy-sdk / @comfyorg/sdk также поставляется со вторым клиентом для запуска целого графа рабочего процесса ComfyUI на Comfy Cloud: Comfy(api_key=...) / new Comfy({ apiKey }), с client.workflows, client.assets и client.jobs. См. Comfy SDKs.
Заголовки
Аутентификация, идемпотентность, идентификаторы запросов, группы ошибок, темп повторов, лимиты расходов.
Использование Router API
Обнаружение моделей, ошибки валидации, повторы и выставление счетов.
Ограничения
Что Router не делает сегодня и что использовать вместо этого.
{"docsConfig":{"theme":"mint","$schema":"https://mintlify.com/docs.json","name":"ComfyUI","colors":{"primary":"#49378B","light":"#F2FF59","dark":"#F2FF59"},"logo":{"light":"https://mintcdn.com/dripart/WCFdTagRdhtvk9-o/logo/light.svg?fit=max\u0026auto=format\u0026n=WCFdTagRdhtvk9-o\u0026q=85\u0026s=ec112de87239058f5a931a7e4b594965","dark":"https://mintcdn.com/dripart/QzWbjSCBG7w61rR3/logo/dark.svg?fit=max\u0026auto=format\u0026n=QzWbjSCBG7w61rR3\u0026q=85\u0026s=62b4d879fb3aadbd7a468d1539032d6f","href":"/"},"favicon":"https://mintcdn.com/dripart/maKDA164-rrTfyxY/favicon.ico?fit=max\u0026auto=format\u0026n=maKDA164-rrTfyxY\u0026q=85\u0026s=94f3a697cf4c9a1ee3961b69219d0942","appearance":{"default":"dark"},"navbar":{"links":[{"href":"https://blog.comfy.org/?utm_source=docs","label":"Blog"},{"href":"/tutorials/partner-nodes/pricing","label":"Pricing"},{"href":"https://platform.comfy.org/?utm_source=docs","label":"Platform"},{"href":"https://comfy.org/download?utm_source=docs","label":"Download"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"Resources","items":[{"label":"installation","href":"/installation/system_requirements"},{"label":"Tutorials","href":"/tutorials/basic/text-to-image"},{"label":"Development","href":"/development/overview"}]},{"header":"Products","items":[{"label":"Features","href":"https://www.comfy.org/?utm_source=docs"},{"label":"Gallery","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"Download","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"Company","items":[{"label":"About","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"Careers","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"Terms of Service","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"Privacy Policy","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"search":{"prompt":"Search Comfy documentation..."},"seo":{"metatags":{"googlebot":"max-video-preview:0"}},"icons":{"library":"fontawesome"},"integrations":{"ga4":{"measurementId":"G-MXC01ZDDHQ"},"posthog":{"apiKey":"phc_iKfK86id4xVYws9LybMje0h44eGtfwFgRPIBehmy8rO"}},"contextual":{"options":["copy","view","chatgpt","claude"],"display":"header"},"styling":{"latex":true},"navigation":{"languages":[{"language":"en","href":""},{"language":"zh","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"资源","items":[{"label":"安装","href":"/zh/installation/system_requirements"},{"label":"教程","href":"/zh/tutorials/basic/text-to-image"},{"label":"开发","href":"/zh/development/overview"}]},{"header":"产品","items":[{"label":"功能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"画廊","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"下载","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"公司","items":[{"label":"关于","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"招聘","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"服务条款","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"隐私政策","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"href":"zh"},{"language":"ja","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"リソース","items":[{"label":"インストール","href":"/ja/installation/system_requirements"},{"label":"チュートリアル","href":"/ja/tutorials/basic/text-to-image"},{"label":"開発","href":"/ja/development/overview"}]},{"header":"プロダクト","items":[{"label":"機能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"ギャラリー","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"ダウンロード","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"会社情報","items":[{"label":"概要","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"採用情報","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"利用規約","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"プライバシーポリシー","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ja/tutorials/partner-nodes/pricing","label":"料金"},{"href":"https://comfy.org/download?utm_source=docs","label":"ダウンロード"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"href":"ja"},{"language":"ko","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"리소스","items":[{"label":"설치","href":"/ko/installation/system_requirements"},{"label":"튜토리얼","href":"/ko/tutorials/basic/text-to-image"},{"label":"개발","href":"/ko/development/overview"}]},{"header":"제품","items":[{"label":"기능","href":"https://www.comfy.org/?utm_source=docs"},{"label":"갤러리","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"다운로드","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"회사 정보","items":[{"label":"소개","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"채용","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"이용약관","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"개인정보 처리방침","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ko/tutorials/partner-nodes/pricing","label":"가격 정책"},{"href":"https://comfy.org/download?utm_source=docs","label":"다운로드"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"href":"ko"},{"language":"es","href":"es"},{"language":"ru","href":"ru"}]}},"deployment":{"deploymentMetadataValue":{"subdomain":"dripart","hasAudioNarration":false,"actualSubdomain":"dripart","customDomains":["docs.comfy.org"],"gitSource":{"type":"github","owner":"comfy-org","repo":"docs","deployBranch":"main","contentDirectory":"","isPrivate":false,"mountPath":"","label":""},"feedback":{"thumbs":true,"edits":true,"issues":true,"agentFeedback":true},"entitlements":{"AI_CHAT":{"status":"DISABLED"},"WEB_MCP":{"status":"ENABLED"},"NARRATION":{"status":"DISABLED"}},"buildId":"6b106644bbd70c6d2eb3ec4a","clientVersion":"0.0.4410","searchFilterCounts":[{"language":"en","tag":"Built-in Nodes","count":1216},{"language":"ja","tag":"組み込みノード","count":1216},{"language":"zh","tag":"内置节点","count":1216},{"language":"en","tag":"Nodes","count":1215},{"language":"ja","tag":"ノード","count":1215},{"language":"zh","tag":"节点","count":1215},{"language":"ko","tag":"내장 노드 (Built-in Nodes)","count":1174},{"language":"ko","tag":"노드","count":1173},{"language":"es","tag":"Nodos integrados","count":1108},{"language":"es","tag":"Nodos","count":1107},{"language":"en","tag":"Tutorials","count":457},{"language":"ru","tag":"Руководства","count":457},{"language":"es","tag":"Tutoriales","count":456},{"language":"ja","tag":"API 開発","count":449},{"language":"ko","tag":"API 개발","count":449},{"language":"zh","tag":"API 开发","count":449},{"language":"en","tag":"Partner","count":387},{"language":"ja","tag":"Partner","count":387},{"language":"ko","tag":"Partner","count":387},{"language":"zh","tag":"Partner","count":387},{"language":"en","tag":"Model","count":385},{"language":"es","tag":"Partner","count":385},{"language":"ja","tag":"Model","count":385},{"language":"ko","tag":"Model","count":385},{"language":"zh","tag":"Model","count":385},{"language":"es","tag":"Modelo","count":378},{"language":"ja","tag":"はじめに","count":377},{"language":"ko","tag":"시작하기","count":377},{"language":"zh","tag":"开始使用","count":377},{"language":"en","tag":"Image","count":367},{"language":"ru","tag":"Comfy Router","count":361},{"language":"es","tag":"Comfy Router","count":360},{"language":"en","tag":"Comfy Router","count":352},{"language":"ja","tag":"Comfy Router","count":352},{"language":"ko","tag":"Comfy Router","count":352},{"language":"zh","tag":"Comfy Router","count":352},{"language":"es","tag":"Imagen","count":334},{"language":"en","tag":"Agent tools","count":327},{"language":"en","tag":"Models","count":320},{"language":"es","tag":"Models","count":320},{"language":"ja","tag":"Models","count":320},{"language":"ko","tag":"Models","count":320},{"language":"ru","tag":"Модели","count":320},{"language":"zh","tag":"Models","count":320},{"language":"en","tag":"Catalog","count":319},{"language":"es","tag":"All Models","count":317},{"language":"ru","tag":"Все модели","count":317},{"language":"es","tag":"Video","count":290},{"language":"ja","tag":"画像","count":222},{"language":"ko","tag":"이미지","count":222},{"language":"zh","tag":"图像","count":222},{"language":"ru","tag":"Для разработчиков","count":213},{"language":"ja","tag":"Video","count":208},{"language":"zh","tag":"Video","count":208},{"language":"ko","tag":"Video","count":191},{"language":"ru","tag":"Партнёрские узлы","count":170},{"language":"ru","tag":"Партнёрские модели","count":163},{"language":"ru","tag":"Пользовательские узлы","count":123},{"language":"ru","tag":"Видео","count":106},{"language":"ru","tag":"Изображения","count":96}],"searchSettings":{"maxResults":10}},"assistantConfig":{"enableStarterQuestions":false},"basePath":"","hasChatPermissions":false,"hasWebMcpPermissions":true,"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":"rbac-expansion","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-pr-grouping","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"custom-prefix","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"analytics-v7","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"user-flows-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"no-publish-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving-live","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"stripTemperatureMiddleware","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"support-platform-pylon-zendesk","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"snapshot-serving","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"instant-rollback","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications-server","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"granular-notifications","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automations-fable","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fixed-ai-action-pricing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"automation-resolve-merge-conflict","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"scoped-publishing","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"mintql","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"page-level-analytics","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-version-history-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"billing-page-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"full-page-search","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"workspace-projects","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"fork-pr-previews","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"revalidation-jwt","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"hobby-abuse-scan","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"dashboard-inbox","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-dual-write","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"approve-review-flow","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"editor-metadata","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"turbopuffer-serve","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"live-agents","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false},{"name":"starter-pricing","enabled":true,"variant":{"name":"control","enabled":true,"payload":{"type":"string","value":"control"},"feature_enabled":true},"impressionData":false},{"name":"llms-txt-v2","enabled":true,"variant":{"name":"disabled","enabled":false,"feature_enabled":true},"impressionData":false}],"starterQuestions":[],"googleFontsInlined":false},"customCss":[{"filePath":"custom.css","content":":root{--ink-900: #151417;--hub-shell-light: #f7f6f9;--accent-purple: #49378b;--accent-yellow: #f2ff59;--primary: 73 55 139 !important;--primary-light: 242 255 89 !important;--primary-dark: 242 255 89 !important}html.dark{--primary: 242 255 89 !important;--background-dark: 14 14 13 !important}html.dark body{background-color:#0e0e0d!important}html.dark #navbar,html.dark #navbar-transition{background-color:var(--ink-900)!important}html.dark #sidebar,html.dark #sidebar-content{background-color:rgb(var(--background-dark))!important}html.dark #navbar,html.dark #navbar-transition{box-shadow:none!important;filter:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important}html.dark #navbar-transition{border-bottom:1px solid rgba(255, 255, 255, 0.08)!important;opacity:1!important}html.dark img.nav-logo{filter:none}html.dark #sidebar-content a:not([aria-current=\"page\"]){color:rgba(255, 255, 255, 0.72)!important}html.dark #sidebar-content a:not([aria-current=\"page\"]) *{color:inherit!important}html.dark #sidebar-content a[aria-current=\"page\"]{color:var(--accent-yellow)!important;background-color:rgba(242, 255, 89, 0.10)!important}html.dark #sidebar-content a[aria-current=\"page\"] *{color:inherit!important}html.dark .nav-tabs-item[data-active],html.dark mobile-nav-tabs-item[data-active]{color:var(--accent-yellow)!important}html.dark #navbar a[href*=\"comfy.org/cloud\"] span.absolute{background-color:var(--accent-yellow)!important}html.dark #navbar a[href*=\"comfy.org/cloud\"] span.text-white{color:#151417!important}html:not(.dark) #background-color,html:not(.dark) #navbar,html:not(.dark) #navbar-transition,html:not(.dark) #sidebar,html:not(.dark) #sidebar-content{background-color:var(--hub-shell-light)!important}html:not(.dark) .nav-tabs-item[data-active],html:not(.dark) mobile-nav-tabs-item[data-active],html:not(.dark) nav-dropdown-item[data-active]{background-color:transparent!important;box-shadow:none!important;color:var(--accent-purple)!important;font-weight:600!important}html:not(.dark) .nav-tabs-item[data-active] *,html:not(.dark) mobile-nav-tabs-item[data-active] *,html:not(.dark) nav-dropdown-item[data-active] *{color:inherit!important}html:not(.dark) #sidebar-content li:has(>a[aria-current=\"page\"]){background-color:transparent!important;box-shadow:none!important}html:not(.dark) #sidebar-content a[aria-current=\"page\"]{color:var(--accent-purple)!important;background-color:rgba(73, 55, 139, 0.1)!important;font-weight:600!important}html:not(.dark) #sidebar-content a[aria-current=\"page\"] *{color:inherit!important}html:not(.dark) toc-item[data-active],html:not(.dark) toc-item[data-active-deepest],html:not(.dark) toc-item[data-active] a,html:not(.dark) toc-item[data-active-deepest] a{background-color:transparent!important;color:var(--accent-purple)!important;font-weight:600!important}html:not(.dark) #header :where(h1,h2,h3,h4,h5,h6),html:not(.dark) #content-area :where(h1,h2,h3,h4,h5,h6){color:#151417!important}html:not(.dark) #navbar a[href*=\"comfy.org/cloud\"]{background-color:transparent!important;color:var(--accent-purple)!important;border-radius:0.75rem;box-shadow:inset 0 0 0 1px var(--accent-purple)!important}html:not(.dark) #navbar a[href*=\"comfy.org/cloud\"] span.absolute{background-color:transparent!important}html:not(.dark) #navbar a[href*=\"comfy.org/cloud\"] *{color:inherit!important}#sidebar .sticky.top-0.pointer-events-none.bg-linear-to-b{background-image:none!important}@media (min-width: 1024px){#navbar.is-not-custom.is-not-center+div:has(>#sidebar),.max-w-8xl.mx-auto.relative,.max-w-8xl.mx-auto{max-width:none!important;width:100%!important;margin-left:0!important;margin-right:0!important;padding-left:0!important;padding-right:0!important}#navbar [class*=\"px-12\"],#navbar [class*=\"mx-4\"]{padding-left:0!important;padding-right:1.5rem!important;margin-left:0!important;margin-right:0!important}#navbar a.select-none,#navbar .nav-logo{margin-left:1rem!important}#navbar .nav-tabs{padding-left:2rem!important}#sidebar{left:0!important;margin-left:0!important;box-shadow:none!important}#sidebar-content{margin-left:0!important;padding-left:1rem!important;box-sizing:border-box!important}#navbar,#navbar-transition{left:0!important;right:0!important;width:100%!important;max-width:none!important}#content-area{margin-left:0!important;max-width:none!important;width:100%!important;padding-left:18rem!important}#sidebar.sticky~#content-container #content-area{padding-left:2rem!important;padding-right:2rem!important}#content-container,#body-content{max-width:none!important;width:100%!important}:root{--content-width: 100%;--sidebar-width: 18rem}}@media (min-width: 1024px){nav#sidebar,#sidebar[style]{left:0!important;right:auto!important;margin-left:0!important;transform:none!important}#navbar li.navbar-link:has(a[href*=\"comfy.org/download\"]){margin-right:0!important}#navbar a[href*=\"comfy.org/download\"]{box-sizing:border-box;border:1px solid rgb(255 255 255 / 0.22);border-radius:0.75rem;padding:7px 0.875rem!important;color:#fff!important;font-size:0.875rem;line-height:1.25rem}html:not(.dark) #navbar a[href*=\"comfy.org/download\"]{border-color:rgb(0 0 0 / 0.16);color:#151417!important}#navbar a[href*=\"comfy.org/download\"]:hover{background:rgb(255 255 255 / 0.06)}html:not(.dark) #navbar a[href*=\"comfy.org/download\"]:hover{background:rgb(0 0 0 / 0.04)}#navbar li.navbar-link:has(a[href*=\"comfy.org/download\"])+.whitespace-nowrap,#navbar .flex.space-x-6>.whitespace-nowrap.hidden{margin-left:0.5rem!important}}body:has(.router-api-reference-marker) #content,body:has(.router-api-reference-marker) #header{max-width:48rem}body:has(.router-api-reference-marker) #content-area table{width:100%;table-layout:auto}body:has(.router-api-reference-marker) #content-area th,body:has(.router-api-reference-marker) #content-area td{min-width:4rem!important;overflow-wrap:anywhere}body:has(.router-api-reference-marker) #content-area table:has(th:nth-child(6)) th:nth-child(3),body:has(.router-api-reference-marker) #content-area table:has(th:nth-child(6)) td:nth-child(3){min-width:5rem!important}@media (max-width: 1535px){body:has(.router-api-reference-marker) #content-side-layout{display:none!important}}body:has(.router-provider-coverage-marker) #content,body:has(.router-provider-coverage-marker) #header{max-width:64rem}body:has(.router-provider-coverage-marker) #content-area table{width:100%;table-layout:auto}body:has(.router-provider-coverage-marker) #content-area th,body:has(.router-provider-coverage-marker) #content-area td{min-width:5rem!important;overflow-wrap:anywhere}body:has(.router-provider-coverage-marker) #content-area th:first-child,body:has(.router-provider-coverage-marker) #content-area td:first-child{min-width:12rem!important}body:has(.router-quickstart-marker) [data-component-part=\"card-content\"] [data-component-part=\"code-block-root\"][style*=\"height:190px\"],body:has(.router-quickstart-marker) [data-component-part=\"card-content\"] [data-component-part=\"code-block-root\"][style*=\"height: 190px\"]{height:86px!important}#content img:not([data-component-part=\"card-image\"]){max-width:min(100%, 750px)}#content .frame:has(img){max-width:calc(750px + 1rem)}"},{"filePath":"samples-cards.css","content":".sample-card-grid{display:grid;gap:20px;grid-template-columns:repeat(2, minmax(0, 1fr));margin-top:28px}.sample-card{min-width:0;perspective:1200px}.sample-card-inner{height:565px;position:relative;transform-style:preserve-3d;transition:transform 560ms cubic-bezier(.2, .75, .3, 1)}.sample-card[data-flipped=\"true\"] .sample-card-inner{transform:rotateY(180deg)}.sample-card-face{backface-visibility:hidden;background:#fff;border:1px solid #e5e1eb;border-radius:12px;box-sizing:border-box;height:100%;inset:0;overflow:hidden;position:absolute;width:100%}.sample-card-front{display:flex;flex-direction:column}.sample-card-back{opacity:0;pointer-events:none;transform:rotateY(180deg);visibility:hidden}.sample-card[data-flipped=\"true\"] .sample-card-front{pointer-events:none;transition:visibility 0s linear 280ms;visibility:hidden}.sample-card[data-flipped=\"true\"][data-active-path=\"api\"] .sample-card-back[data-sample-path=\"api\"],.sample-card[data-flipped=\"true\"][data-active-path=\"endpoint\"] .sample-card-back[data-sample-path=\"endpoint\"]{opacity:1;pointer-events:auto;visibility:visible}.sample-card-preview{border-bottom:1px solid #e5e1eb;cursor:pointer;display:block;width:100%}.sample-card-body{display:flex;flex:1;flex-direction:column;padding:20px}.sample-card-body h2,.sample-path-body h2{color:#49378b;font-size:18px;font-weight:700;letter-spacing:-.02em;margin:0 0 8px}.sample-path-body h2{text-align:center}.sample-card-body>p{color:#5f5966;font-size:14px;line-height:1.55;margin:0;min-height:66px}.sample-card-actions{display:flex;gap:8px;margin-top:20px}.sample-card-actions button{background:#fff;border:1px solid #cfc8de;border-radius:6px;color:#49378b;cursor:pointer;flex:1;font-size:13px;font-weight:700;padding:10px 12px}.sample-card-links{border-top:1px solid #eeeaf1;display:flex;gap:8px;margin-top:16px;padding-top:12px}.sample-card-links a{color:#625b6c;font-size:12px;font-weight:650;text-decoration:none}.sample-card-links span{color:#b3adba}.sample-path-body{padding:20px}.sample-path-body>button{background:transparent;border:0;color:#625b6c;cursor:pointer;font-size:12px;font-weight:700;padding:0}.sample-path-eyebrow{color:#857a9e;font-size:10px;font-weight:700;letter-spacing:.08em;margin:19px 0 5px;text-align:center;text-transform:uppercase}.sample-path-body>p:not(.sample-path-eyebrow){color:#5f5966;font-size:12px;line-height:1.5;margin:0 0 15px}.sample-path-steps{display:grid;gap:8px}.sample-path-step{align-items:center;background:#faf9fc;border:1px solid #e5e1ea;border-radius:8px;display:flex;gap:10px;padding:10px 11px}.sample-path-number{align-items:center;background:#49378b;border-radius:999px;color:#fff;display:inline-flex;flex:0 0 21px;font-size:11px;font-weight:700;height:21px;justify-content:center}.sample-path-copy{flex:1;min-width:0}.sample-path-copy strong{color:#312c36;display:block;font-size:12px}.sample-path-copy span{color:#706a75;display:block;font-size:11px;line-height:1.35;margin-top:2px}.sample-path-step a{color:#49378b;flex:0 0 auto;font-size:11px;font-weight:700;text-decoration:none}@media (max-width: 768px){.sample-card-grid{grid-template-columns:1fr}.sample-card-inner{height:clamp(620px, 180vw, 760px)}}"}]}
{"page":{"pagePath":"ru/development/comfy-router/models/google/gemini/code","slug":"/ru/development/comfy-router/models/google/gemini/code","pageMetadata":{"title":"Использовать Google Gemini с Comfy Router","description":"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата","sidebarTitle":"Google Gemini","translationSourceHash":"0958828b","translationFrom":"development/comfy-router/models/google/gemini/code.mdx","href":"/ru/development/comfy-router/models/google/gemini/code"},"description":{"compiledSource":"\"use strict\";\nconst {jsx: _jsx} = arguments[0];\nconst {useMDXComponents: _provideComponents} = arguments[0];\nfunction _createMdxContent(props) {\n const _components = {\n p: \"p\",\n ..._provideComponents(),\n ...props.components\n };\n return _jsx(_components.p, {\n children: \"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата\"\n });\n}\nfunction MDXContent(props = {}) {\n const {wrapper: MDXLayout} = {\n ..._provideComponents(),\n ...props.components\n };\n return MDXLayout ? _jsx(MDXLayout, {\n ...props,\n children: _jsx(_createMdxContent, {\n ...props\n })\n }) : _createMdxContent(props);\n}\nreturn {\n default: MDXContent\n};\n","frontmatter":{},"scope":{}},"pageType":"default","mdx":{"mdxSource":{"compiledSource":"\"use strict\";const{Fragment:_Fragment,jsx:_jsx,jsxs:_jsxs}=arguments[0];const{useMDXComponents:_provideComponents}=arguments[0];function _createMdxContent(props){const _components={a:`a`,code:`code`,em:`em`,p:`p`,pre:`pre`,span:`span`,strong:`strong`,..._provideComponents(),...props.components},{Card,CardGroup,CodeBlock,CodeGroup,Heading,ParamField,ResponseField,Tab,Tabs}=_components;if(!Card)_missingMdxReference(`Card`,true);if(!CardGroup)_missingMdxReference(`CardGroup`,true);if(!CodeBlock)_missingMdxReference(`CodeBlock`,true);if(!CodeGroup)_missingMdxReference(`CodeGroup`,true);if(!Heading)_missingMdxReference(`Heading`,true);if(!ParamField)_missingMdxReference(`ParamField`,true);if(!ResponseField)_missingMdxReference(`ResponseField`,true);if(!Tab)_missingMdxReference(`Tab`,true);if(!Tabs)_missingMdxReference(`Tabs`,true);return _jsxs(_Fragment,{children:[_jsx(_components.p,{children:`Справочник по API для Google Gemini. Google Gemini: семейство мультимодальных текстовых моделей Google, от быстрой черновой генерации до глубоких рассуждений в уровнях Flash и Pro.`}),`\n`,_jsx(Heading,{level:`2`,id:`быстрый-старт`,children:`Быстрый старт`}),`\n`,_jsxs(_components.p,{children:[`Создайте ключ в `,_jsx(_components.a,{href:`https://platform.comfy.org/profile/api-keys?onboarding=router`,children:`вашем рабочем пространстве Comfy`}),` и экспортируйте его как `,_jsx(_components.code,{children:`COMFY_API_KEY`}),`. Сниппеты Python и TypeScript используют Comfy SDK (`,_jsx(_components.code,{children:`pip install comfy-sdk`}),` и `,_jsx(_components.code,{children:`npm install @comfyorg/sdk`}),`); сниппет cURL выполняет тот же вызов напрямую по HTTP.`]}),`\n`,_jsx(_components.p,{children:`Выберите модель, которую хотите вызвать. Всё ниже, от сниппетов до схемы и примеров, зависит от вашего выбора.`}),`\n`,_jsxs(Tabs,{children:[_jsxs(Tab,{title:`Gemini 3.1 Pro`,id:`gemini-3-1-pro`,\"data-child-tab-ids\":`[\"%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0\",\"%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`ID модели:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-3.1-pro-preview`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Эндпоинт:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Дождаться результата`,id:`%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,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:`30`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# SDK автоматически создаёт ключ идемпотентности и использует его повторно при автоматических повторных попытках.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.1-pro-preview\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// SDK автоматически создаёт ключ идемпотентности и использует его повторно при автоматических повторных попытках.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` result`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.1-pro-preview\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Поставить в очередь и забрать позже`,id:`%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5`,children:[_jsxs(_components.p,{children:[`То же тело запроса, отправленное на `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests`}),`. Router отвечает `,_jsx(_components.code,{children:`201`}),` с `,_jsx(_components.code,{children:`request_id`}),` сразу после приёма запуска, а результат забирается, когда он готов, из этого или другого процесса. `,_jsx(_components.a,{href:`/ru/development/comfy-router/queue`,children:`Доставка через очередь`}),` описывает статус, отмену и получение результата.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,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:`39`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_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\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.1-pro-preview\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# вместе с ID модели это всё, что нужно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Опрашивайте, пока запрос не завершится, выдерживая Retry-After, указанный сервером.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\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:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Собственный payload провайдера, то же значение, что возвращает models.run().`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Запрос, который завершился ошибкой или был отменён, вызывает здесь типизированную ошибку Router.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` handle`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.1-pro-preview\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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:`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// вместе с ID модели это всё, что нужно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Опрашивайте, пока запрос не завершится, выдерживая Retry-After, указанный сервером.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_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:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Тот же результат, что возвращает models.run(). Запрос, который завершился ошибкой или был отменён, отклоняется здесь.`})}),`\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:` result`}),_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:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,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:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Отправка. Router отвечает 201 с request_id, status_url, response_url и cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Опрашивайте, пока status не станет COMPLETED, выдерживая Retry-After секунд, указанные в каждом ответе.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_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:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Получение. 200 с собственным выводом модели, 202 с телом статуса, пока запрос ещё выполняется.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.1-pro-preview/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`%D1%81%D1%85%D0%B5%D0%BC%D0%B0`,children:`Схема`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4%D1%8B`,children:`Входы`}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents`,children:_jsx(_components.p,{children:`Содержимое текущего диалога с моделью. Для одноходовых запросов это один экземпляр. Для многоходовых запросов это повторяющееся поле, содержащее историю диалога и последний запрос.`})}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts`}),_jsx(ParamField,{body:`contents[].parts[].fileData`,type:`object`,id:`param-contents-parts-file-data`,children:_jsx(_components.p,{children:`Данные на основе URI.`})}),_jsx(ParamField,{body:`contents[].parts[].fileData.fileUri`,type:`string`,id:`param-contents-parts-file-data-file-uri`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ParamField,{body:`contents[].parts[].fileData.mimeType`,type:`string`,id:`param-contents-parts-file-data-mime-type`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимы следующие значения. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8.4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data`,children:_jsx(_components.p,{children:`Встроенные данные в виде необработанных байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash с помощью inlineData можно указать до 3000 изображений.`})}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string (byte)`,id:`param-contents-parts-inline-data-data`,children:[_jsx(_components.p,{children:`Кодировка base64 изображения, PDF или видео для встраивания непосредственно в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MB`}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8,4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Для получения дополнительной информации см. требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается при подсчёте лимита токенов. Ограничений на разрешение изображений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].mediaProcessing`,type:`string`,id:`param-contents-parts-media-processing`,children:_jsx(_components.p,{children:`Как модель читает видео в этой части. Укажите «AGENTIC», чтобы модель сама решала, какие сегменты проверять, вместо покадровой выборки с фиксированной частотой. Пропустите поле, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается в gemini-3.7-flash и более новых моделях Flash.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text`,children:_jsx(_components.p,{children:`Текстовый промпт или фрагмент кода.`})}),_jsx(ParamField,{body:`contents[].parts[].thought`,type:`boolean`,id:`param-contents-parts-thought`,children:_jsx(_components.p,{children:`Указывает, что эта часть является шагом размышления/рассуждения модели.`})}),_jsx(ParamField,{body:`contents[].role`,type:`string`,id:`param-contents-role`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config`,children:_jsxs(_components.p,{children:[`Настройки выборки, длины и вывода для генерации. Все поля необязательны: поля ниже, в которых объявлено значение `,_jsx(_components.code,{children:`default`}),`, применяют его при пропуске, а остальные используют поведение самой модели.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig`,type:`object`,id:`param-generation-config-image-config`,children:_jsx(_components.p,{children:`Настройки генерации изображений`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.aspectRatio`,type:`string`,id:`param-generation-config-image-config-aspect-ratio`,children:_jsx(_components.p,{children:`Соотношение сторон для сгенерированных изображений`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions`,type:`object`,id:`param-generation-config-image-config-image-output-options`,children:_jsx(_components.p,{children:`Необязательно. Формат вывода изображений для сгенерированных изображений.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.compressionQuality`,type:`integer`,id:`param-generation-config-image-config-image-output-options-compression-quality`,children:_jsx(_components.p,{children:`Необязательно. Качество сжатия выходного изображения.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.mimeType`,type:`string`,id:`param-generation-config-image-config-image-output-options-mime-type`,children:_jsxs(_components.p,{children:[`Необязательно. Формат изображения, в котором следует сохранять вывод, на путях Vertex AI: в запросах, обслуживаемых собственными учётными данными Comfy, и в BYOK-запросах, аутентифицированных с помощью сервисного аккаунта GCP. Там принимаются значения `,_jsx(_components.code,{children:`image/png`}),` и `,_jsx(_components.code,{children:`image/jpeg`}),`, которые сопоставляются без учёта регистра и нормализуются к нижнему регистру перед пересылкой запроса; любое другое значение отклоняется с ошибкой 400, в которой указано это поле. Если не указано, по умолчанию используется `,_jsx(_components.code,{children:`image/png`}),`. Исключение составляет BYOK-запрос, аутентифицированный API-ключом Google AI Studio: у этого вышестоящего сервиса нет такого свойства, и он отклоняет весь вызов, если свойство присутствует, поэтому поле удаляется из запроса, вместо того чтобы применяться или отклоняться, а формат вывода будет тем, который выберет AI Studio. В каждом сценарии читайте тип медиа из полученной части ответа (`,_jsx(_components.code,{children:`inlineData.mimeType`}),` или `,_jsx(_components.code,{children:`fileData.mimeType`}),`, если задано `,_jsx(_components.code,{children:`uploadImagesToStorage`}),`), а не полагайтесь на отправленное значение.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageSize`,type:`string`,id:`param-generation-config-image-config-image-size`,children:_jsx(_components.p,{children:`Необязательно. Задаёт размер сгенерированных изображений. Поддерживаемые значения: 1K, 2K, 4K. Если не указано, модель будет использовать значение по умолчанию 1K.`})}),_jsxs(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens`,children:[_jsx(_components.p,{children:`Максимальное количество токенов, которое можно сгенерировать в ответе. Один токен приблизительно равен 4 символам. 100 токенов соответствуют приблизительно 60-80 словам.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`16`}),` до `,_jsx(_components.code,{children:`65536`})]})]}),_jsx(ParamField,{body:`generationConfig.responseModalities`,type:\"`TEXT`, `IMAGE`[]\",id:`param-generation-config-response-modalities`}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed`,children:_jsx(_components.p,{children:`Если seed зафиксирован на конкретном значении, модель делает всё возможное, чтобы выдавать одинаковый ответ на повторные запросы. Детерминированный вывод не гарантируется. Кроме того, изменение модели или настроек параметров, например температуры, может вызывать вариации в ответе даже при использовании одного и того же значения seed. По умолчанию используется случайное значение seed. Доступно для следующих моделей: gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences`}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,default:`1`,id:`param-generation-config-temperature`,children:[_jsx(_components.p,{children:`Температура используется для выборки при генерации ответа, которая происходит при применении topP и topK. Температура управляет степенью случайности при выборе токенов. Низкие температуры подходят для промптов, требующих менее открытого или творческого ответа, а высокие температуры могут давать более разнообразные или творческие результаты. Температура 0 означает, что всегда выбираются токены с наибольшей вероятностью. В этом случае ответы на заданный промпт в основном детерминированы, но небольшая вариативность всё же возможна. Если модель возвращает слишком общий или слишком короткий ответ либо выдаёт запасной ответ, попробуйте увеличить температуру.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`2`})]}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config`,children:_jsx(_components.p,{children:`Необязательно. Настройки функций размышления. Размышление представляет собой процесс, в котором модель разбивает сложную задачу на более мелкие шаги для генерации более качественного ответа.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts`,children:_jsx(_components.p,{children:`Необязательно. Если задано значение true, модель включит свои рассуждения в ответ.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingBudget`,type:`integer`,id:`param-generation-config-thinking-config-thinking-budget`,children:_jsx(_components.p,{children:`Необязательно. Бюджет токенов для процесса рассуждений модели. Модель постарается не выходить за рамки этого бюджета.`})}),_jsxs(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level`,children:[_jsx(_components.p,{children:`Необязательно. Уровень рассуждений для модели.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`THINKING_LEVEL_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`XHIGH`})]})]}),_jsxs(ParamField,{body:`generationConfig.topK`,type:`integer`,default:`40`,id:`param-generation-config-top-k`,children:[_jsx(_components.p,{children:`Top-K определяет, как модель выбирает токены для вывода. При top-K равном 1 следующий выбранный токен будет наиболее вероятным среди всех токенов словаря модели. При top-K равном 3 следующий токен выбирается из 3 наиболее вероятных токенов с помощью температуры.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`1`}),` до `,_jsx(_components.code,{children:`…`})]})]}),_jsxs(ParamField,{body:`generationConfig.topP`,type:`number`,default:`0.95`,id:`param-generation-config-top-p`,children:[_jsx(_components.p,{children:`Если указано, используется ядерная выборка (nucleus sampling).\nTop-P определяет, как модель выбирает токены для вывода. Токены выбираются от наиболее вероятных (см. top-K) к наименее вероятным, пока сумма их вероятностей не достигнет значения top-P. Например, если токены A, B и C имеют вероятности 0.3, 0.2 и 0.1, а значение top-P равно 0.5, то модель выберет в качестве следующего токена либо A, либо B с помощью температуры, а C исключит из числа кандидатов.\nУкажите меньшее значение для менее случайных ответов и большее значение для более случайных ответов.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`1`})]}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`safetySettings`,type:`object[]`,id:`param-safety-settings`,children:_jsx(_components.p,{children:`Настройки блокировки небезопасного содержимого для каждого запроса. Применяются к GenerateContentResponse.candidates.`})}),_jsx(ParamField,{body:`safetySettings[].category`,type:`string`,required:true,id:`param-safety-settings-category`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsx(ParamField,{body:`safetySettings[].threshold`,type:`string`,required:true,id:`param-safety-settings-threshold`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`OFF`}),`, `,_jsx(_components.code,{children:`BLOCK_NONE`}),`, `,_jsx(_components.code,{children:`BLOCK_LOW_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_MEDIUM_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_ONLY_HIGH`})]})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction`,children:_jsx(_components.p,{children:`Инструкции для модели, направляющие её к более качественной работе. Например, «Отвечай как можно более кратко» или «Не используй технические термины в ответе». Текстовые строки учитываются в лимите токенов. Поле role в systemInstruction игнорируется и не влияет на работу модели. Примечание: в parts следует использовать только текст, а содержимое каждой части должно быть отдельным абзацем.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,required:true,id:`param-system-instruction-parts`,children:_jsx(_components.p,{children:`Список упорядоченных частей, составляющих одно сообщение. Разные части могут иметь разные MIME-типы IANA. Ограничения на входы, например максимальное число токенов или количество изображений, смотрите в спецификациях моделей на странице моделей Google.`})}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text`,children:_jsx(_components.p,{children:`Текстовый промпт или фрагмент кода.`})}),_jsxs(ParamField,{body:`systemInstruction.role`,type:`string`,id:`param-system-instruction-role`,children:[_jsx(_components.p,{children:`Идентификатор сущности, создающей сообщение. Поддерживаются следующие значения: user: сообщение отправлено реальным человеком, обычно это сообщение, созданное пользователем. model: сообщение сгенерировано моделью. Значение model используется для вставки сообщений от модели в диалог в ходе многошаговых бесед. Для одношаговых бесед это поле можно оставить пустым или не задавать.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools`,children:_jsx(_components.p,{children:`Фрагмент кода, позволяющий системе взаимодействовать с внешними системами для выполнения действия или набора действий за пределами знаний и области применения модели. См. Function calling.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,required:true,id:`param-tools-function-declarations-name`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters`,children:_jsx(_components.p,{children:`JSON-схема параметров функции`})}),_jsx(ParamField,{body:`uploadImagesToStorage`,type:`boolean`,id:`param-upload-images-to-storage`,children:_jsx(_components.p,{children:`Если задано значение true, сгенерированные изображения будут загружены в облачное хранилище и возвращены в виде подписанных URL вместо встроенных данных base64. Срок действия URL истекает через 24 часа.`})}),_jsx(ParamField,{body:`videoMetadata`,type:`object`,id:`param-video-metadata`,children:_jsx(_components.p,{children:`Для видео на входе: смещения начала и конца видео в формате Duration. Например, чтобы указать 10-секундный фрагмент, начинающийся на 1:00, задайте “startOffset”: { “seconds”: 60 } и “endOffset”: { “seconds”: 70 }. Метаданные следует указывать только тогда, когда видеоданные передаются в inlineData или fileData.`})}),_jsx(ParamField,{body:`videoMetadata.endOffset`,type:`object`,id:`param-video-metadata-end-offset`,children:_jsx(_components.p,{children:`Представляет смещение длительности для позиций на временной шкале видео.`})}),_jsxs(ParamField,{body:`videoMetadata.endOffset.nanos`,type:`integer`,id:`param-video-metadata-end-offset-nanos`,children:[_jsx(_components.p,{children:`Дробная часть секунды со знаком с наносекундной точностью. Отрицательные значения секунд с дробной частью должны иметь неотрицательное значение nanos.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.endOffset.seconds`,type:`integer`,id:`param-video-metadata-end-offset-seconds`,children:[_jsx(_components.p,{children:`Секунды со знаком в пределах интервала времени. Должны быть в диапазоне от -315,576,000,000 до +315,576,000,000 включительно.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`-315576000000`}),` до `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsx(ParamField,{body:`videoMetadata.startOffset`,type:`object`,id:`param-video-metadata-start-offset`,children:_jsx(_components.p,{children:`Представляет смещение длительности для позиций на временной шкале видео.`})}),_jsxs(ParamField,{body:`videoMetadata.startOffset.nanos`,type:`integer`,id:`param-video-metadata-start-offset-nanos`,children:[_jsx(_components.p,{children:`Дробная часть секунды со знаком с наносекундной точностью. Отрицательные значения секунд с дробной частью должны иметь неотрицательное значение nanos.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.startOffset.seconds`,type:`integer`,id:`param-video-metadata-start-offset-seconds`,children:[_jsx(_components.p,{children:`Знаковые секунды интервала времени. Должно быть от -315,576,000,000 до +315,576,000,000 включительно.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`-315576000000`}),` до `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsxs(_components.p,{children:[`Сгенерировано из схемы, которую Router отдаёт по `,_jsx(_components.code,{children:`GET /v2/models/vertexai/gemini-3.1-pro-preview/openapi.json`}),`, того же документа, по которому он проверяет вызов, прежде чем запрос дойдёт до провайдера.`]}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B`,children:`Выходы`}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates`}),_jsx(ResponseField,{name:`candidates[].citationMetadata`,type:`object`,id:`param-candidates-citation-metadata`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations`,type:`object[]`,id:`param-candidates-citation-metadata-citations`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].authors`,type:`string[]`,id:`param-candidates-citation-metadata-citations-authors`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].endIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-end-index`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].license`,type:`string`,id:`param-candidates-citation-metadata-citations-license`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].publicationDate`,type:`string (date)`,id:`param-candidates-citation-metadata-citations-publication-date`,children:_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`date`})]})}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].startIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-start-index`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].title`,type:`string`,id:`param-candidates-citation-metadata-citations-title`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].uri`,type:`string`,id:`param-candidates-citation-metadata-citations-uri`}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content`,children:_jsx(_components.p,{children:`Содержимое текущей беседы с моделью. Для одноходовых запросов это единственный экземпляр. Для многоходовых запросов это повторяющееся поле, содержащее историю беседы и последний запрос.`})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,required:true,id:`param-candidates-content-parts`}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData`,type:`object`,id:`param-candidates-content-parts-file-data`,children:_jsx(_components.p,{children:`Данные на основе URI.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData.fileUri`,type:`string`,id:`param-candidates-content-parts-file-data-file-uri`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].fileData.mimeType`,type:`string`,id:`param-candidates-content-parts-file-data-mime-type`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8.4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].inlineData`,type:`object`,id:`param-candidates-content-parts-inline-data`,children:_jsx(_components.p,{children:`Встроенные данные в виде сырых байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash можно указать до 3000 изображений с помощью inlineData.`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.data`,type:`string (byte)`,id:`param-candidates-content-parts-inline-data-data`,children:[_jsx(_components.p,{children:`Кодировка base64 для изображения, PDF или видео, которые нужно встроить прямо в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MB`}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.mimeType`,type:`string`,id:`param-candidates-content-parts-inline-data-mime-type`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длительность аудиофайла составляет 8.4 часа, а максимальная длительность видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].mediaProcessing`,type:`string`,id:`param-candidates-content-parts-media-processing`,children:_jsx(_components.p,{children:`Как модель читает видео из этой части. Укажите “AGENTIC”, чтобы модель сама решала, какие сегменты просматривать, вместо выборки кадров с фиксированной частотой. Не указывайте значение, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается на gemini-3.7-flash и более новых моделях Flash.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text`,children:_jsx(_components.p,{children:`Текстовый промпт или фрагмент кода.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].thought`,type:`boolean`,id:`param-candidates-content-parts-thought`,children:_jsx(_components.p,{children:`Указывает, что эта часть является шагом размышления/рассуждения модели.`})}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason`}),_jsx(ResponseField,{name:`candidates[].safetyRatings`,type:`object[]`,id:`param-candidates-safety-ratings`}),_jsx(ResponseField,{name:`candidates[].safetyRatings[].category`,type:`string`,id:`param-candidates-safety-ratings-category`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`candidates[].safetyRatings[].probability`,type:`string`,id:`param-candidates-safety-ratings-probability`,children:[_jsx(_components.p,{children:`Вероятность того, что содержимое нарушает указанную категорию безопасности`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`createTime`,type:`string`,id:`param-create-time`,children:_jsx(_components.p,{children:`Метка времени создания ответа.`})}),_jsx(ResponseField,{name:`modelVersion`,type:`string`,id:`param-model-version`,children:_jsx(_components.p,{children:`Версия модели, использованной для генерации ответа.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback`}),_jsx(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason`}),_jsx(ResponseField,{name:`promptFeedback.blockReasonMessage`,type:`string`,id:`param-prompt-feedback-block-reason-message`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings`,type:`object[]`,id:`param-prompt-feedback-safety-ratings`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings[].category`,type:`string`,id:`param-prompt-feedback-safety-ratings-category`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`promptFeedback.safetyRatings[].probability`,type:`string`,id:`param-prompt-feedback-safety-ratings-probability`,children:[_jsx(_components.p,{children:`Вероятность того, что содержимое нарушает указанную категорию безопасности`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`responseId`,type:`string`,id:`param-response-id`,children:_jsx(_components.p,{children:`Уникальный идентификатор ответа.`})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata`}),_jsx(ResponseField,{name:`usageMetadata.cachedContentTokenCount`,type:`integer`,id:`param-usage-metadata-cached-content-token-count`,children:_jsx(_components.p,{children:`Только для вывода. Количество токенов в кэшированной части входа (кэшированное содержимое).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count`,children:_jsx(_components.p,{children:`Количество токенов в ответе (ответах).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails`,type:`object[]`,id:`param-usage-metadata-candidates-tokens-details`,children:_jsx(_components.p,{children:`Разбивка токенов кандидатов по модальностям.`})}),_jsxs(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-candidates-tokens-details-modality`,children:[_jsx(_components.p,{children:`Тип модальности входного или выходного содержимого.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-candidates-tokens-details-token-count`,children:_jsx(_components.p,{children:`Количество токенов для указанной модальности.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count`,children:_jsx(_components.p,{children:`Количество токенов в запросе. Если задан cachedContent, это всё равно общий эффективный размер промпта, то есть он включает количество токенов в кэшированном содержимом.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails`,type:`object[]`,id:`param-usage-metadata-prompt-tokens-details`,children:_jsx(_components.p,{children:`Разбивка токенов промпта по модальностям.`})}),_jsxs(ResponseField,{name:`usageMetadata.promptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-prompt-tokens-details-modality`,children:[_jsx(_components.p,{children:`Тип модальности входного или выходного содержимого.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-prompt-tokens-details-token-count`,children:_jsx(_components.p,{children:`Количество токенов для указанной модальности.`})}),_jsx(ResponseField,{name:`usageMetadata.thoughtsTokenCount`,type:`integer`,id:`param-usage-metadata-thoughts-token-count`,children:_jsx(_components.p,{children:`Количество токенов в выводе мыслей.`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-token-count`,children:_jsx(_components.p,{children:`Количество токенов в промпте (промптах) использования инструментов.`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails`,type:`object[]`,id:`param-usage-metadata-tool-use-prompt-tokens-details`,children:_jsx(_components.p,{children:`Разбивка токенов промпта использования инструментов по модальностям.`})}),_jsxs(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-tool-use-prompt-tokens-details-modality`,children:[_jsx(_components.p,{children:`Тип модальности входного или выходного содержимого.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-tokens-details-token-count`,children:_jsx(_components.p,{children:`Количество токенов для указанной модальности.`})}),_jsx(ResponseField,{name:`usageMetadata.totalTokenCount`,type:`integer`,id:`param-usage-metadata-total-token-count`,children:_jsx(_components.p,{children:`Общее количество токенов (промпт + кандидаты).`})}),_jsx(ResponseField,{name:`usageMetadata.trafficType`,type:`string`,id:`param-usage-metadata-traffic-type`,children:_jsx(_components.p,{children:`Тип трафика, использованный для запроса (например, PROVISIONED_THROUGHPUT).`})}),_jsx(Heading,{level:`2`,id:`%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B`,children:`Примеры`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4`,children:`Вход`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_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:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\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`,_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:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\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(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4`,children:`Выход`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,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:`19`,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:` \"candidates\"`}),_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:` \"content\"`}),_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:`\"model\"`}),_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:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_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:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_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:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\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(Tab,{title:`Gemini 3.5 Flash`,id:`gemini-3-5-flash`,\"data-child-tab-ids\":`[\"%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0-2\",\"%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5-2\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`ID модели:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-3.5-flash`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Эндпоинт:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Дождаться результата`,id:`%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0-2`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,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:`30`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменных окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# SDK автоматически создаёт ключ идемпотентности и повторно использует его для автоматических повторных попыток.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.5-flash\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменных окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// SDK автоматически создаёт ключ идемпотентности и повторно использует его для автоматических повторных попыток.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` result`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.5-flash\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Поставить в очередь и забрать позже`,id:`%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5-2`,children:[_jsxs(_components.p,{children:[`То же тело запроса, отправленное на `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests`}),`. Router отвечает `,_jsx(_components.code,{children:`201`}),` с `,_jsx(_components.code,{children:`request_id`}),`, как только запуск принят, а результат забирается, когда он готов, из этого процесса или из любого другого. В разделе `,_jsx(_components.a,{href:`/ru/development/comfy-router/queue`,children:`Доставка через очередь`}),` описаны статус, отмена и получение результата.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,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:`39`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_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\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-3.5-flash\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# вместе с ID модели это всё, что нужно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Опрашивайте, пока запрос не завершится, выдерживая Retry-After, который называет сервер.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\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:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Собственный payload провайдера, то же значение, которое возвращает models.run().`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Запрос, завершившийся ошибкой или отменённый, вызовет здесь типизированную ошибку Router.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Каждый вызов submit() создаёт собственный Idempotency-Key и переиспользует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` handle`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-3.5-flash\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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:`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// вместе с ID модели это всё, что нужно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Опрашивайте, пока запрос не завершится, выдерживая Retry-After, который называет сервер.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_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:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Тот же результат, который возвращает models.run(). Запрос, завершившийся ошибкой или отменённый, будет отклонён здесь.`})}),`\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:` result`}),_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:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,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:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Отправка. Router отвечает 201 с request_id, status_url, response_url и cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Опрашивайте, пока статус не станет COMPLETED, выдерживая Retry-After секунд, указанные в каждом ответе.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_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:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Получение. 200 с нативным выводом модели, 202 с телом статуса, пока запрос ещё выполняется.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-3.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`%D1%81%D1%85%D0%B5%D0%BC%D0%B0-2`,children:`Схема`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-2`,children:`Входы`}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents-1`,children:_jsx(_components.p,{children:`Содержимое текущего диалога с моделью. Для одноходовых запросов это один экземпляр. Для многоходовых запросов это повторяющееся поле, которое содержит историю диалога и последний запрос.`})}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts-1`}),_jsx(ParamField,{body:`contents[].parts[].fileData`,type:`object`,id:`param-contents-parts-file-data-1`,children:_jsx(_components.p,{children:`Данные на основе URI.`})}),_jsx(ParamField,{body:`contents[].parts[].fileData.fileUri`,type:`string`,id:`param-contents-parts-file-data-file-uri-1`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ParamField,{body:`contents[].parts[].fileData.mimeType`,type:`string`,id:`param-contents-parts-file-data-mime-type-1`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8,4 часа, а максимальная длина видеофайла (без аудио) составляет один час. Для получения дополнительной информации см. требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображения нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data-1`,children:_jsx(_components.p,{children:`Встроенные данные в виде необработанных байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash можно указать до 3000 изображений, используя inlineData.`})}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string (byte)`,id:`param-contents-parts-inline-data-data-1`,children:[_jsx(_components.p,{children:`Кодировка base64 изображения, PDF-файла или видео, которые нужно включить прямо в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MB`}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type-1`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения перечислены ниже. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8,4 часа, а максимальная длина видеофайла (без аудио) составляет один час. Дополнительные сведения см. в требованиях Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. На разрешение изображения ограничений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ParamField,{body:`contents[].parts[].mediaProcessing`,type:`string`,id:`param-contents-parts-media-processing-1`,children:_jsx(_components.p,{children:`Как модель читает видео в этой части. Установите “AGENTIC”, чтобы модель сама решала, какие сегменты просматривать, вместо выборки кадров с фиксированной частотой. Пропустите поле, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается на gemini-3.7-flash и более новых моделях Flash.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text-1`,children:_jsx(_components.p,{children:`Текстовый промпт или фрагмент кода.`})}),_jsx(ParamField,{body:`contents[].parts[].thought`,type:`boolean`,id:`param-contents-parts-thought-1`,children:_jsx(_components.p,{children:`Указывает, что эта часть является шагом размышления (reasoning) модели.`})}),_jsx(ParamField,{body:`contents[].role`,type:`string`,id:`param-contents-role-1`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config-1`,children:_jsxs(_components.p,{children:[`Настройки выборки, длины и вывода для генерации. Все поля необязательны: поля ниже, для которых указан `,_jsx(_components.code,{children:`default`}),`, применяют его при пропуске, а остальные используют собственное поведение модели.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig`,type:`object`,id:`param-generation-config-image-config-1`,children:_jsx(_components.p,{children:`Конфигурация генерации изображений`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.aspectRatio`,type:`string`,id:`param-generation-config-image-config-aspect-ratio-1`,children:_jsx(_components.p,{children:`Соотношение сторон для сгенерированных изображений`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions`,type:`object`,id:`param-generation-config-image-config-image-output-options-1`,children:_jsx(_components.p,{children:`Необязательно. Формат вывода для сгенерированных изображений.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.compressionQuality`,type:`integer`,id:`param-generation-config-image-config-image-output-options-compression-quality-1`,children:_jsx(_components.p,{children:`Необязательно. Качество сжатия выходного изображения.`})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageOutputOptions.mimeType`,type:`string`,id:`param-generation-config-image-config-image-output-options-mime-type-1`,children:_jsxs(_components.p,{children:[`Необязательно. Формат изображения, в котором следует сохранять результат, на путях Vertex AI: запросы, обслуживаемые собственными учётными данными Comfy, и BYOK-запросы, аутентифицированные сервисным аккаунтом GCP. Принимаемые там значения: `,_jsx(_components.code,{children:`image/png`}),` и `,_jsx(_components.code,{children:`image/jpeg`}),`, они сопоставляются без учёта регистра и нормализуются к нижнему регистру перед пересылкой запроса; любое другое значение отклоняется с ошибкой 400, в которой указано это поле. Если поле не указано, используется `,_jsx(_components.code,{children:`image/png`}),`. Исключение составляет BYOK-запрос, аутентифицированный API-ключом Google AI Studio: у этого апстрима нет такого свойства, и он отклоняет весь вызов, если оно присутствует, поэтому поле удаляется из запроса, а не учитывается или отклоняется, и формат вывода будет таким, какой выберет AI Studio. На любом пути читайте тип медиа из полученной части ответа (`,_jsx(_components.code,{children:`inlineData.mimeType`}),` или `,_jsx(_components.code,{children:`fileData.mimeType`}),`, если задан `,_jsx(_components.code,{children:`uploadImagesToStorage`}),`), а не полагайтесь на отправленное значение.`]})}),_jsx(ParamField,{body:`generationConfig.imageConfig.imageSize`,type:`string`,id:`param-generation-config-image-config-image-size-1`,children:_jsx(_components.p,{children:`Необязательно. Задаёт размер сгенерированных изображений. Поддерживаемые значения: 1K, 2K, 4K. Если не указано, модель использует значение по умолчанию 1K.`})}),_jsxs(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens-1`,children:[_jsx(_components.p,{children:`Максимальное количество токенов, которое может быть сгенерировано в ответе. Один токен — это примерно 4 символа. 100 токенов соответствуют примерно 60-80 словам.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`16`}),` до `,_jsx(_components.code,{children:`65536`})]})]}),_jsx(ParamField,{body:`generationConfig.responseModalities`,type:\"`TEXT`, `IMAGE`[]\",id:`param-generation-config-response-modalities-1`}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed-1`,children:_jsx(_components.p,{children:`Если seed зафиксирован на определённом значении, модель делает всё возможное, чтобы выдать одинаковый ответ на повторные запросы. Детерминированный вывод не гарантируется. Кроме того, изменение модели или параметров, например температуры, может вызвать вариации ответа даже при одном и том же значении seed. По умолчанию используется случайное значение seed. Доступно для следующих моделей:, gemini-2.5-flash, gemini-2.5-pro, gemini-2.5-flash-preview-04-1, gemini-2.5-pro-preview-05-0, gemini-2.0-flash-lite-00, gemini-2.0-flash-001`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences-1`}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,default:`1`,id:`param-generation-config-temperature-1`,children:[_jsx(_components.p,{children:`Температура используется для выборки при генерации ответа, которая происходит при применении topP и topK. Температура управляет степенью случайности при выборе токенов. Низкие температуры подходят для промптов, требующих менее открытого или творческого ответа, а высокие могут привести к более разнообразным или творческим результатам. Температура 0 означает, что всегда выбираются токены с наибольшей вероятностью. В этом случае ответы на данный промпт в основном детерминированы, но небольшая вариативность всё же возможна. Если модель возвращает слишком общий, слишком короткий ответ или выдаёт резервный ответ, попробуйте увеличить температуру`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`2`})]}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config-1`,children:_jsx(_components.p,{children:`Необязательно. Настройки функций размышления. Размышление - это процесс, в котором модель разбивает сложную задачу на меньшие шаги, чтобы сгенерировать более качественный ответ.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts-1`,children:_jsx(_components.p,{children:`Необязательно. Если указано true, модель включит свои размышления в ответ.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingBudget`,type:`integer`,id:`param-generation-config-thinking-config-thinking-budget-1`,children:_jsx(_components.p,{children:`Необязательно. Бюджет токенов для процесса размышления модели. Модель постарается не выходить за пределы этого бюджета.`})}),_jsxs(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level-1`,children:[_jsx(_components.p,{children:`Необязательно. Уровень размышления для модели.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`THINKING_LEVEL_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`XHIGH`})]})]}),_jsxs(ParamField,{body:`generationConfig.topK`,type:`integer`,default:`40`,id:`param-generation-config-top-k-1`,children:[_jsx(_components.p,{children:`Top-K меняет то, как модель выбирает токены для вывода. Значение top-K, равное 1, означает, что следующий выбранный токен является наиболее вероятным среди всех токенов словаря модели. Значение top-K, равное 3, означает, что следующий токен выбирается из 3 наиболее вероятных токенов с помощью температуры.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`1`}),` до `,_jsx(_components.code,{children:`…`})]})]}),_jsxs(ParamField,{body:`generationConfig.topP`,type:`number`,default:`0.95`,id:`param-generation-config-top-p-1`,children:[_jsx(_components.p,{children:`Если указано, используется ядерная выборка.\nTop-P меняет то, как модель выбирает токены для вывода. Токены выбираются от наиболее (см. top-K) до наименее вероятных, пока сумма их вероятностей не достигнет значения top-P. Например, если токены A, B и C имеют вероятность 0.3, 0.2 и 0.1, а значение top-P равно 0.5, то модель выберет в качестве следующего токена либо A, либо B с помощью температуры, а C исключит как кандидата.\nУкажите меньшее значение для менее случайных ответов и большее значение для более случайных ответов.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`1`})]}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`float`})]})]}),_jsx(ParamField,{body:`safetySettings`,type:`object[]`,id:`param-safety-settings-1`,children:_jsx(_components.p,{children:`Настройки для каждого запроса для блокировки небезопасного содержимого. Применяются к GenerateContentResponse.candidates.`})}),_jsx(ParamField,{body:`safetySettings[].category`,type:`string`,required:true,id:`param-safety-settings-category-1`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsx(ParamField,{body:`safetySettings[].threshold`,type:`string`,required:true,id:`param-safety-settings-threshold-1`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`OFF`}),`, `,_jsx(_components.code,{children:`BLOCK_NONE`}),`, `,_jsx(_components.code,{children:`BLOCK_LOW_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_MEDIUM_AND_ABOVE`}),`, `,_jsx(_components.code,{children:`BLOCK_ONLY_HIGH`})]})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction-1`,children:_jsx(_components.p,{children:`Инструкции для модели, направляющие её к более высокой производительности. Например, «Отвечай как можно более кратко» или «Не используй технические термины в ответе». Текстовые строки учитываются в лимите токенов. Поле role в systemInstruction игнорируется и не влияет на работу модели. Примечание: в parts следует использовать только текст, а содержимое каждой части должно быть отдельным абзацем.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,required:true,id:`param-system-instruction-parts-1`,children:_jsx(_components.p,{children:`Список упорядоченных частей, составляющих одно сообщение. Разные части могут иметь разные типы IANA MIME. Об ограничениях на входы, например о максимальном числе токенов или количестве изображений, см. спецификации модели на странице моделей Google.`})}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text-1`,children:_jsx(_components.p,{children:`Текстовый промпт или фрагмент кода.`})}),_jsxs(ParamField,{body:`systemInstruction.role`,type:`string`,id:`param-system-instruction-role-1`,children:[_jsx(_components.p,{children:`Роль сущности, создающей сообщение. Поддерживаются следующие значения: user: указывает, что сообщение отправлено реальным человеком, обычно это сообщение, созданное пользователем. model: указывает, что сообщение сгенерировано моделью. Значение model используется для вставки сообщений от модели в разговор в ходе многоходовых диалогов. Для одноходовых разговоров это поле можно оставить пустым или не задавать.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools-1`,children:_jsx(_components.p,{children:`Фрагмент кода, который позволяет системе взаимодействовать с внешними системами для выполнения действия или набора действий вне знаний и области компетенции модели. См. Function calling.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations-1`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description-1`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,required:true,id:`param-tools-function-declarations-name-1`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters-1`,children:_jsx(_components.p,{children:`Схема JSON для параметров функции`})}),_jsx(ParamField,{body:`uploadImagesToStorage`,type:`boolean`,id:`param-upload-images-to-storage-1`,children:_jsx(_components.p,{children:`Если указано true, сгенерированные изображения будут загружены в облачное хранилище и возвращены как подписанные URL вместо встроенных данных base64. URL истекают через 24 часа.`})}),_jsx(ParamField,{body:`videoMetadata`,type:`object`,id:`param-video-metadata-1`,children:_jsx(_components.p,{children:`Для видео на входе: начальное и конечное смещение видео в формате Duration. Например, чтобы указать 10-секундный фрагмент, начинающийся с 1:00, задайте “startOffset”: { “seconds”: 60 } и “endOffset”: { “seconds”: 70 }. Метаданные следует указывать только тогда, когда видеоданные передаются в inlineData или fileData.`})}),_jsx(ParamField,{body:`videoMetadata.endOffset`,type:`object`,id:`param-video-metadata-end-offset-1`,children:_jsx(_components.p,{children:`Представляет смещение длительности для позиций на временной шкале видео.`})}),_jsxs(ParamField,{body:`videoMetadata.endOffset.nanos`,type:`integer`,id:`param-video-metadata-end-offset-nanos-1`,children:[_jsx(_components.p,{children:`Знаковые доли секунды с наносекундной точностью. Отрицательные значения секунд с дробной частью должны всё равно иметь неотрицательные значения nanos.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.endOffset.seconds`,type:`integer`,id:`param-video-metadata-end-offset-seconds-1`,children:[_jsx(_components.p,{children:`Знаковые секунды интервала времени. Должно быть от -315,576,000,000 до +315,576,000,000 включительно.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`-315576000000`}),` до `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsx(ParamField,{body:`videoMetadata.startOffset`,type:`object`,id:`param-video-metadata-start-offset-1`,children:_jsx(_components.p,{children:`Представляет смещение длительности для позиций на временной шкале видео.`})}),_jsxs(ParamField,{body:`videoMetadata.startOffset.nanos`,type:`integer`,id:`param-video-metadata-start-offset-nanos-1`,children:[_jsx(_components.p,{children:`Дробная часть секунды со знаком в наносекундном разрешении. Отрицательные значения секунд с дробной частью всё равно должны иметь неотрицательные значения наносекунд.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`999999999`})]})]}),_jsxs(ParamField,{body:`videoMetadata.startOffset.seconds`,type:`integer`,id:`param-video-metadata-start-offset-seconds-1`,children:[_jsx(_components.p,{children:`Секунды интервала времени со знаком. Значение должно быть от -315,576,000,000 до +315,576,000,000 включительно.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`-315576000000`}),` до `,_jsx(_components.code,{children:`315576000000`})]})]}),_jsxs(_components.p,{children:[`Сгенерировано из схемы, которую Router предоставляет по адресу `,_jsx(_components.code,{children:`GET /v2/models/vertexai/gemini-3.5-flash/openapi.json`}),`, того же документа, по которому он проверяет вызов перед тем, как запрос поступит к провайдеру.`]}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-2`,children:`Выходы`}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata`,type:`object`,id:`param-candidates-citation-metadata-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations`,type:`object[]`,id:`param-candidates-citation-metadata-citations-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].authors`,type:`string[]`,id:`param-candidates-citation-metadata-citations-authors-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].endIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-end-index-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].license`,type:`string`,id:`param-candidates-citation-metadata-citations-license-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].publicationDate`,type:`string (date)`,id:`param-candidates-citation-metadata-citations-publication-date-1`,children:_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`date`})]})}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].startIndex`,type:`integer`,id:`param-candidates-citation-metadata-citations-start-index-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].title`,type:`string`,id:`param-candidates-citation-metadata-citations-title-1`}),_jsx(ResponseField,{name:`candidates[].citationMetadata.citations[].uri`,type:`string`,id:`param-candidates-citation-metadata-citations-uri-1`}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content-1`,children:_jsx(_components.p,{children:`Содержимое текущего диалога с моделью. Для запросов с одним ходом это один экземпляр. Для запросов с несколькими ходами это повторяющееся поле, содержащее историю диалога и последний запрос.`})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,required:true,id:`param-candidates-content-parts-1`}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData`,type:`object`,id:`param-candidates-content-parts-file-data-1`,children:_jsx(_components.p,{children:`Данные на основе URI.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].fileData.fileUri`,type:`string`,id:`param-candidates-content-parts-file-data-file-uri-1`,children:_jsx(_components.p,{children:`URI`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].fileData.mimeType`,type:`string`,id:`param-candidates-content-parts-file-data-mime-type-1`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения включают следующие. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8.4 часа, а максимальная длина видеофайла (без звука) составляет один час. Дополнительные сведения см. в разделе Требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].inlineData`,type:`object`,id:`param-candidates-content-parts-inline-data-1`,children:_jsx(_components.p,{children:`Встроенные данные в виде необработанных байтов. Для gemini-2.0-flash-lite и gemini-2.0-flash можно указать до 3000 изображений с помощью inlineData.`})}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.data`,type:`string (byte)`,id:`param-candidates-content-parts-inline-data-data-1`,children:[_jsx(_components.p,{children:`Кодировка base64 изображения, PDF или видео для встраивания непосредственно в промпт. При встраивании медиа необходимо также указать тип медиа (mimeType) данных. Ограничение размера: 20MB`}),_jsxs(_components.p,{children:[`Формат: `,_jsx(_components.code,{children:`byte`})]})]}),_jsxs(ResponseField,{name:`candidates[].content.parts[].inlineData.mimeType`,type:`string`,id:`param-candidates-content-parts-inline-data-mime-type-1`,children:[_jsx(_components.p,{children:`Тип медиа файла, указанного в полях data или fileUri. Допустимые значения включают следующие. Для gemini-2.0-flash-lite и gemini-2.0-flash максимальная длина аудиофайла составляет 8.4 часа, а максимальная длина видеофайла (без звука) составляет один час. Дополнительные сведения см. в разделе Требования Gemini к аудио и видео. Текстовые файлы должны быть в кодировке UTF-8. Содержимое текстового файла учитывается в лимите токенов. Ограничений на разрешение изображений нет.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`application/pdf`}),`, `,_jsx(_components.code,{children:`audio/mpeg`}),`, `,_jsx(_components.code,{children:`audio/mp3`}),`, `,_jsx(_components.code,{children:`audio/wav`}),`, `,_jsx(_components.code,{children:`image/png`}),`, `,_jsx(_components.code,{children:`image/jpeg`}),`, `,_jsx(_components.code,{children:`image/webp`}),`, `,_jsx(_components.code,{children:`text/plain`}),`, `,_jsx(_components.code,{children:`video/mov`}),`, `,_jsx(_components.code,{children:`video/mpeg`}),`, `,_jsx(_components.code,{children:`video/mp4`}),`, `,_jsx(_components.code,{children:`video/mpg`}),`, `,_jsx(_components.code,{children:`video/avi`}),`, `,_jsx(_components.code,{children:`video/wmv`}),`, `,_jsx(_components.code,{children:`video/mpegps`}),`, `,_jsx(_components.code,{children:`video/flv`}),`, `,_jsx(_components.code,{children:`image/heic`}),`, `,_jsx(_components.code,{children:`image/heif`}),`, `,_jsx(_components.code,{children:`audio/flac`}),`, `,_jsx(_components.code,{children:`video/webm`})]})]}),_jsx(ResponseField,{name:`candidates[].content.parts[].mediaProcessing`,type:`string`,id:`param-candidates-content-parts-media-processing-1`,children:_jsxs(_components.p,{children:[`Как модель читает видео в этой части. Укажите `,_jsx(_components.code,{children:`\"AGENTIC\"`}),`, чтобы модель сама решала, какие сегменты проверять, вместо покадровой выборки с фиксированной частотой. Не указывайте поле, чтобы использовать выборку с фиксированной частотой по умолчанию. Поддерживается в gemini-3.7-flash и более новых моделях Flash.`]})}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text-1`,children:_jsx(_components.p,{children:`Текстовый промпт или фрагмент кода.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].thought`,type:`boolean`,id:`param-candidates-content-parts-thought-1`,children:_jsx(_components.p,{children:`Указывает, что эта часть является шагом размышления/рассуждения модели.`})}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role-1`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason-1`}),_jsx(ResponseField,{name:`candidates[].safetyRatings`,type:`object[]`,id:`param-candidates-safety-ratings-1`}),_jsx(ResponseField,{name:`candidates[].safetyRatings[].category`,type:`string`,id:`param-candidates-safety-ratings-category-1`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`candidates[].safetyRatings[].probability`,type:`string`,id:`param-candidates-safety-ratings-probability-1`,children:[_jsx(_components.p,{children:`Вероятность того, что содержимое нарушает указанную категорию безопасности`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`createTime`,type:`string`,id:`param-create-time-1`,children:_jsx(_components.p,{children:`Метка времени создания ответа.`})}),_jsx(ResponseField,{name:`modelVersion`,type:`string`,id:`param-model-version-1`,children:_jsx(_components.p,{children:`Версия модели, использованная для генерации ответа.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback-1`}),_jsx(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason-1`}),_jsx(ResponseField,{name:`promptFeedback.blockReasonMessage`,type:`string`,id:`param-prompt-feedback-block-reason-message-1`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings`,type:`object[]`,id:`param-prompt-feedback-safety-ratings-1`}),_jsx(ResponseField,{name:`promptFeedback.safetyRatings[].category`,type:`string`,id:`param-prompt-feedback-safety-ratings-category-1`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`HARM_CATEGORY_SEXUALLY_EXPLICIT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HATE_SPEECH`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_HARASSMENT`}),`, `,_jsx(_components.code,{children:`HARM_CATEGORY_DANGEROUS_CONTENT`})]})}),_jsxs(ResponseField,{name:`promptFeedback.safetyRatings[].probability`,type:`string`,id:`param-prompt-feedback-safety-ratings-probability-1`,children:[_jsx(_components.p,{children:`Вероятность того, что содержимое нарушает указанную категорию безопасности`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`NEGLIGIBLE`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`}),`, `,_jsx(_components.code,{children:`UNKNOWN`})]})]}),_jsx(ResponseField,{name:`responseId`,type:`string`,id:`param-response-id-1`,children:_jsx(_components.p,{children:`Уникальный идентификатор ответа.`})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata-1`}),_jsx(ResponseField,{name:`usageMetadata.cachedContentTokenCount`,type:`integer`,id:`param-usage-metadata-cached-content-token-count-1`,children:_jsx(_components.p,{children:`Только вывод. Количество токенов в кэшированной части входных данных (кэшированное содержимое).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов в ответе (ответах).`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails`,type:`object[]`,id:`param-usage-metadata-candidates-tokens-details-1`,children:_jsx(_components.p,{children:`Разбивка токенов кандидатов по модальностям.`})}),_jsxs(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-candidates-tokens-details-modality-1`,children:[_jsx(_components.p,{children:`Тип модальности входного или выходного содержимого.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-candidates-tokens-details-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов для данной модальности.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов в запросе. Если задан cachedContent, это по-прежнему общий эффективный размер промпта, то есть он включает количество токенов в кэшированном содержимом.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails`,type:`object[]`,id:`param-usage-metadata-prompt-tokens-details-1`,children:_jsx(_components.p,{children:`Разбивка токенов промпта по модальностям.`})}),_jsxs(ResponseField,{name:`usageMetadata.promptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-prompt-tokens-details-modality-1`,children:[_jsx(_components.p,{children:`Тип модальности входного или выходного содержимого.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.promptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-prompt-tokens-details-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов для данной модальности.`})}),_jsx(ResponseField,{name:`usageMetadata.thoughtsTokenCount`,type:`integer`,id:`param-usage-metadata-thoughts-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов в выводе мыслей.`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов в промпте (промптах) использования инструментов.`})}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails`,type:`object[]`,id:`param-usage-metadata-tool-use-prompt-tokens-details-1`,children:_jsx(_components.p,{children:`Разбивка токенов промпта использования инструментов по модальностям.`})}),_jsxs(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].modality`,type:`string`,id:`param-usage-metadata-tool-use-prompt-tokens-details-modality-1`,children:[_jsx(_components.p,{children:`Тип модальности входного или выходного содержимого.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MODALITY_UNSPECIFIED`}),`, `,_jsx(_components.code,{children:`TEXT`}),`, `,_jsx(_components.code,{children:`IMAGE`}),`, `,_jsx(_components.code,{children:`VIDEO`}),`, `,_jsx(_components.code,{children:`AUDIO`}),`, `,_jsx(_components.code,{children:`DOCUMENT`})]})]}),_jsx(ResponseField,{name:`usageMetadata.toolUsePromptTokensDetails[].tokenCount`,type:`integer`,id:`param-usage-metadata-tool-use-prompt-tokens-details-token-count-1`,children:_jsx(_components.p,{children:`Количество токенов для данной модальности.`})}),_jsx(ResponseField,{name:`usageMetadata.totalTokenCount`,type:`integer`,id:`param-usage-metadata-total-token-count-1`,children:_jsx(_components.p,{children:`Общее количество токенов (промпт + кандидаты).`})}),_jsx(ResponseField,{name:`usageMetadata.trafficType`,type:`string`,id:`param-usage-metadata-traffic-type-1`,children:_jsx(_components.p,{children:`Тип трафика, использованный для запроса (например, PROVISIONED_THROUGHPUT).`})}),_jsx(Heading,{level:`2`,id:`%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B-2`,children:`Примеры`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-3`,children:`Входы`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_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:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\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`,_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:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\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(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-3`,children:`Выходы`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,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:`19`,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:` \"candidates\"`}),_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:` \"content\"`}),_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:`\"model\"`}),_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:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_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:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_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:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\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(Tab,{title:`Gemini 2.5 Pro`,id:`gemini-2-5-pro`,\"data-child-tab-ids\":`[\"%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0-3\",\"%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5-3\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`ID модели:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-2.5-pro`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Эндпоинт:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Дождаться результата`,id:`%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0-3`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,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:`30`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторных попытках.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-pro\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторных попытках.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` result`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-pro\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Поставить в очередь и забрать позже`,id:`%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5-3`,children:[_jsxs(_components.p,{children:[`То же тело, отправленное на `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests`}),`. Router отвечает `,_jsx(_components.code,{children:`201`}),` с `,_jsx(_components.code,{children:`request_id`}),`, как только запуск принят, а результат забирается, когда он готов, из этого или другого процесса. `,_jsx(_components.a,{href:`/ru/development/comfy-router/queue`,children:`Доставка через очередь`}),` подробно описывает статус, отмену и получение результата.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,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:`39`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменных окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Каждый вызов submit() создаёт собственный Idempotency-Key и повторно использует его при автоматических повторных попытках.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_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\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-pro\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# вместе с ID модели это всё, что нужно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Опрашивает до завершения запроса, ожидая Retry-After, указанный сервером.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\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:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Собственный payload провайдера, то же значение, которое возвращает models.run().`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Запрос, завершившийся ошибкой или отменённый, вызывает здесь типизированную ошибку Router.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменных окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Каждый вызов submit() создаёт собственный Idempotency-Key и повторно использует его при автоматических повторных попытках.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` handle`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-pro\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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:`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// вместе с ID модели это всё, что нужно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Опрашивает до завершения запроса, ожидая Retry-After, указанный сервером.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_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:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Тот же результат, который возвращает models.run(). Запрос, завершившийся ошибкой или отменённый, отклоняется здесь.`})}),`\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:` result`}),_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:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,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:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Отправка. Router отвечает 201 с request_id, status_url, response_url и cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Опрашивайте, пока статус не станет COMPLETED, ожидая Retry-After секунд, указанные в каждом ответе.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_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:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Получение. 200 с выводом модели в исходном формате, 202 с телом статуса, пока запрос ещё выполняется.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-pro/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`%D1%81%D1%85%D0%B5%D0%BC%D0%B0-3`,children:`Схема`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-4`,children:`Входы`}),_jsx(_components.p,{children:_jsx(_components.em,{children:`Поля соответствуют опубликованной спецификации API Google и проверяются на соответствие ей в CI. Собственная схема Router для этой модели пока не опубликована, поэтому запросы передаются провайдеру без валидации.`})}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents-2`,children:_jsxs(_components.p,{children:[`Диалог на текущий момент, сначала старые. Часть бывает `,_jsx(_components.code,{children:`text`}),` или `,_jsx(_components.code,{children:`inlineData`}),`, чтобы отправить изображение, аудио или видео вместе с промптом.`]})}),_jsxs(ParamField,{body:`contents[].role`,type:`string`,required:true,id:`param-contents-role-2`,children:[_jsx(_components.p,{children:`Автор реплики.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts-2`,children:_jsx(_components.p,{children:`Части содержимого реплики.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text-2`,children:_jsx(_components.p,{children:`Текстовая часть.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data-2`,children:_jsx(_components.p,{children:`Встроенная часть медиа.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type-2`,children:_jsxs(_components.p,{children:[`Тип медиа, например `,_jsx(_components.code,{children:`image/png`}),`.`]})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string`,id:`param-contents-parts-inline-data-data-2`,children:_jsx(_components.p,{children:`Медиабайты в кодировке Base64.`})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction-2`,children:_jsx(_components.p,{children:`Системный промпт, применяемый ко всему диалогу.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,id:`param-system-instruction-parts-2`}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text-2`}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config-2`,children:_jsx(_components.p,{children:`Настройки выборки и длины.`})}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,id:`param-generation-config-temperature-2`,children:[_jsx(_components.p,{children:`Случайность выборки. Значения по умолчанию модель-специфичны.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`2`})]})]}),_jsx(ParamField,{body:`generationConfig.topP`,type:`number`,id:`param-generation-config-top-p-2`,children:_jsx(_components.p,{children:`Порог нуклеусной выборки. Значения по умолчанию модель-специфичны.`})}),_jsx(ParamField,{body:`generationConfig.topK`,type:`integer`,id:`param-generation-config-top-k-2`,children:_jsx(_components.p,{children:`Порог отсечения top-k выборки. Значения по умолчанию модель-специфичны.`})}),_jsx(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens-2`,children:_jsx(_components.p,{children:`Верхняя граница сгенерированных токенов.`})}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed-2`,children:_jsx(_components.p,{children:`Сид для воспроизводимой выборки.`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences-2`,children:_jsx(_components.p,{children:`Строки, которые завершают генерацию при появлении.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config-2`,children:_jsx(_components.p,{children:`Управление уровнем рассуждений на моделях с поддержкой.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level-2`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`})]})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts-2`,children:_jsx(_components.p,{children:`Возвращать рассуждения модели вместе с ответом.`})}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools-2`,children:_jsx(_components.p,{children:`Объявления функций, которые модель может вызвать.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations-2`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,id:`param-tools-function-declarations-name-2`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description-2`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters-2`,children:_jsx(_components.p,{children:`JSON Schema для аргументов функции.`})}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-4`,children:`Выходы`}),_jsxs(_components.p,{children:[`Router возвращает нативный ответ Google без изменений. Текст находится в `,_jsx(_components.code,{children:`candidates[0].content.parts[0].text`}),`.`]}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates-2`,children:_jsx(_components.p,{children:`Сгенерированные кандидаты; один, если вы не запросили больше.`})}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content-2`}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role-2`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,id:`param-candidates-content-parts-2`}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text-2`,children:_jsx(_components.p,{children:`Сгенерированный текст.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall`,type:`object`,id:`param-candidates-content-parts-function-call`,children:_jsxs(_components.p,{children:[`Присутствует, когда модель решила вызвать один из ваших `,_jsx(_components.code,{children:`tools`}),`.`]})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.name`,type:`string`,id:`param-candidates-content-parts-function-call-name`}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.args`,type:`object`,id:`param-candidates-content-parts-function-call-args`}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason-2`,children:_jsxs(_components.p,{children:[`Почему генерация остановилась: `,_jsx(_components.code,{children:`STOP`}),`, `,_jsx(_components.code,{children:`MAX_TOKENS`}),`, `,_jsx(_components.code,{children:`SAFETY`}),`, …`]})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata-2`,children:_jsx(_components.p,{children:`Учёт токенов для вызова.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count-2`,children:_jsx(_components.p,{children:`Токены в промпте.`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count-2`,children:_jsx(_components.p,{children:`Токены в сгенерированных кандидатах.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback-2`,children:_jsxs(_components.p,{children:[`Присутствует, когда был заблокирован сам промпт. Перед чтением результата проверьте, присутствует ли `,_jsx(_components.code,{children:`candidates`}),`; `,_jsx(_components.code,{children:`usageMetadata`}),` также может присутствовать в заблокированном ответе.`]})}),_jsxs(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason-2`,children:[_jsx(_components.p,{children:`Почему промпт был заблокирован. Кандидаты не возвращаются; переформулируйте промпт и повторите попытку.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`SAFETY`}),`, `,_jsx(_components.code,{children:`OTHER`}),`, `,_jsx(_components.code,{children:`BLOCKLIST`}),`, `,_jsx(_components.code,{children:`PROHIBITED_CONTENT`}),`, `,_jsx(_components.code,{children:`IMAGE_SAFETY`})]})]}),_jsx(Heading,{level:`2`,id:`%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B-3`,children:`Примеры`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4-2`,children:`Вход`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_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:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\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`,_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:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\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(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4-2`,children:`Выход`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,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:`19`,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:` \"candidates\"`}),_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:` \"content\"`}),_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:`\"model\"`}),_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:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_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:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_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:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\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(Tab,{title:`Gemini 2.5 Flash`,id:`gemini-2-5-flash`,\"data-child-tab-ids\":`[\"%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0-4\",\"%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5-4\"]`,children:[_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`ID модели:`}),` `,_jsx(_components.code,{children:`vertexai/gemini-2.5-flash`})]}),_jsxs(_components.p,{children:[_jsx(_components.strong,{children:`Эндпоинт:`}),` `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash`})]}),_jsxs(Tabs,{defaultTabIndex:1,children:[_jsx(Tab,{title:`Дождаться результата`,id:`%D0%B4%D0%BE%D0%B6%D0%B4%D0%B0%D1%82%D1%8C%D1%81%D1%8F-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0-4`,children:_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`30`,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:`30`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменных окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` client.models.run(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-flash\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`24`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`24`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменных окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// SDK автоматически создаёт ключ идемпотентности и переиспользует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` result`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`run`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-flash\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`5`,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:`5`,children:[_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`]})})})]})}),_jsxs(Tab,{title:`Поставить в очередь и забрать позже`,id:`%D0%BF%D0%BE%D1%81%D1%82%D0%B0%D0%B2%D0%B8%D1%82%D1%8C-%D0%B2-%D0%BE%D1%87%D0%B5%D1%80%D0%B5%D0%B4%D1%8C-%D0%B8-%D0%B7%D0%B0%D0%B1%D1%80%D0%B0%D1%82%D1%8C-%D0%BF%D0%BE%D0%B7%D0%B6%D0%B5-4`,children:[_jsxs(_components.p,{children:[`То же тело, отправленное на `,_jsx(_components.code,{children:`POST https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests`}),`. Router отвечает `,_jsx(_components.code,{children:`201`}),` с `,_jsx(_components.code,{children:`request_id`}),`, как только запуск принят, а результат забирается, когда он готов, из этого процесса или из любого другого. В разделе `,_jsx(_components.a,{href:`/ru/development/comfy-router/queue`,children:`Доставка через очередь`}),` описаны статус, отмена и получение результата.`]}),_jsxs(CodeGroup,{children:[_jsx(CodeBlock,{filename:`Python`,numberOfLines:`39`,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:`39`,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:` asyncio`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` comfy_sdk `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`import`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# Каждый вызов submit() создаёт свой Idempotency-Key и повторно использует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` def`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` main`}),_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\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` with`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` AsyncComfy() `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`as`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` client:`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle `}),_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\":`#D4D4D4`},children:` client.models.submit(`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"vertexai/gemini-2.5-flash\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"contents\"`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"parts\"`}),_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`}),_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:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"request_id:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, handle.request_id) `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# вместе с ID модели, этого достаточно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Опрашивать до завершения запроса, ожидая указанный сервером Retry-After.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` async`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` for`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` update `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`in`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` handle.iter_events():`})]}),`\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:`(update.status, update.queue_position)`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Собственный payload провайдера, то же значение, что возвращает models.run().`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:` # Запрос, который завершился ошибкой или был отменён, здесь вызывает типизированную ошибку Router.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` result `}),_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\":`#D4D4D4`},children:` handle.get()`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#DCDCAA`},children:` print`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, result[`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"candidates\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#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:`\"parts\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`][`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`])`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`asyncio.run(main())`})}),`\n`]})})}),_jsx(CodeBlock,{filename:`TypeScript`,numberOfLines:`33`,language:`typescript`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`typescript`,children:_jsxs(_components.code,{language:`typescript`,numberOfLines:`33`,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:` { `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` } `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`from`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"@comfyorg/sdk\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`;`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Читает COMFY_API_KEY из переменной окружения.`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Каждый вызов submit() создаёт свой Idempotency-Key и повторно использует его при автоматических повторах.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`type`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:` Result`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` =`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` { `}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4EC9B0`},children:` string`}),_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:` handle`}),_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:` comfy`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`models`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`submit`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`\u003c`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#4EC9B0`},children:`Result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`>(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"vertexai/gemini-2.5-flash\"`}),_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:` contents:`}),_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:`#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:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` parts:`}),_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:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` text:`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"Describe a single red maple leaf on a white background in one sentence.\"`}),_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`,_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:` generationConfig:`}),_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:` temperature:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 0.7`}),_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:` maxOutputTokens:`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:` 256`}),_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:`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"requestId:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`requestId`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`); `}),_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// вместе с ID модели, этого достаточно другому процессу`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Опрашивать до завершения запроса, ожидая указанный сервером Retry-After.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`for`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:` await`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:`const`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#4FC1FF`},children:` update`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` of`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`events`}),_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:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`status`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`update`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`queuePosition`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`// Тот же результат, что возвращает models.run(). Запрос, который завершился ошибкой или был отменён, отклоняется здесь.`})}),`\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:` result`}),_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:` handle`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:`get`}),_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\":`#C586C0`},children:`if`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` (`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`kind`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:` !==`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` \"json\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`) `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#C586C0`},children:`throw`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#569CD6`},children:` new`}),_jsx(_components.span,{style:{color:`#8250DF`,\"--shiki-dark\":`#DCDCAA`},children:` Error`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`(`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"expected a JSON result\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#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:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"text:\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`, `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`result`}),_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:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`candidates`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`content`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`.`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`parts`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`[`}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`].`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`text`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`);`})]}),`\n`]})})}),_jsx(CodeBlock,{filename:`cURL`,numberOfLines:`15`,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:`15`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 1. Отправить. Router отвечает 201 с request_id, status_url, response_url и cancel_url.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`}),_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:` \"Idempotency-Key: $(`}),_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`uuidgen`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`)\"`}),_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:` \"{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`contents`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: [{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`role`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`user`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`parts`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:[{`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`text`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`Describe a single red maple leaf on a white background in one sentence.`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`}]}], `}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`generationConfig`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`: {`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`temperature`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:0.7,`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`maxOutputTokens`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D7BA7D`},children:`\\\\\"`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`:256}}\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 2. Опрашивать до статуса COMPLETED, ожидая указанное в каждом ответе число секунд Retry-After.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`REQUEST_ID`}),_jsx(_components.span,{style:{color:`#CF222E`,\"--shiki-dark\":`#D4D4D4`},children:`=`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"\u003crequest_id from the 201 body>\"`})]}),`\n`,_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:` -i`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`/status`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`,_jsx(_components.span,{className:`line`}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#6E7781`,\"--shiki-dark\":`#6A9955`},children:`# 3. Забрать. 200 с нативным выводом модели, 202 с телом статуса, пока запрос ещё выполняется.`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#953800`,\"--shiki-dark\":`#DCDCAA`},children:`curl`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:` https://api.comfy.org/v2/models/vertexai/gemini-2.5-flash/requests/`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$REQUEST_ID`}),_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:` \"X-API-Key: `}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#9CDCFE`},children:`$COMFY_API_KEY`}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"`})]}),`\n`]})})})]})]})]}),_jsx(Heading,{level:`2`,id:`%D1%81%D1%85%D0%B5%D0%BC%D0%B0-4`,children:`Схема`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-5`,children:`Входы`}),_jsx(_components.p,{children:_jsx(_components.em,{children:`Поля соответствуют опубликованной спецификации API Google и проверяются по ней в CI. Собственная схема Router для этой модели пока не опубликована, поэтому запросы передаются провайдеру без валидации.`})}),_jsx(ParamField,{body:`contents`,type:`object[]`,required:true,id:`param-contents-3`,children:_jsxs(_components.p,{children:[`Диалог на данный момент, сначала старые. Часть это `,_jsx(_components.code,{children:`text`}),` либо `,_jsx(_components.code,{children:`inlineData`}),`, чтобы отправить изображение, аудио или видео вместе с промптом.`]})}),_jsxs(ParamField,{body:`contents[].role`,type:`string`,required:true,id:`param-contents-role-3`,children:[_jsx(_components.p,{children:`Кто автор реплики.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`user`}),`, `,_jsx(_components.code,{children:`model`})]})]}),_jsx(ParamField,{body:`contents[].parts`,type:`object[]`,required:true,id:`param-contents-parts-3`,children:_jsx(_components.p,{children:`Части содержимого реплики.`})}),_jsx(ParamField,{body:`contents[].parts[].text`,type:`string`,id:`param-contents-parts-text-3`,children:_jsx(_components.p,{children:`Текстовая часть.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData`,type:`object`,id:`param-contents-parts-inline-data-3`,children:_jsx(_components.p,{children:`Встроенная часть с медиа.`})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.mimeType`,type:`string`,id:`param-contents-parts-inline-data-mime-type-3`,children:_jsxs(_components.p,{children:[`Тип медиа, например `,_jsx(_components.code,{children:`image/png`}),`.`]})}),_jsx(ParamField,{body:`contents[].parts[].inlineData.data`,type:`string`,id:`param-contents-parts-inline-data-data-3`,children:_jsx(_components.p,{children:`Байты медиа в кодировке Base64.`})}),_jsx(ParamField,{body:`systemInstruction`,type:`object`,id:`param-system-instruction-3`,children:_jsx(_components.p,{children:`Системный промпт, применяемый ко всему диалогу.`})}),_jsx(ParamField,{body:`systemInstruction.parts`,type:`object[]`,id:`param-system-instruction-parts-3`}),_jsx(ParamField,{body:`systemInstruction.parts[].text`,type:`string`,id:`param-system-instruction-parts-text-3`}),_jsx(ParamField,{body:`generationConfig`,type:`object`,id:`param-generation-config-3`,children:_jsx(_components.p,{children:`Настройки выборки и длины.`})}),_jsxs(ParamField,{body:`generationConfig.temperature`,type:`number`,id:`param-generation-config-temperature-3`,children:[_jsx(_components.p,{children:`Случайность выборки. Значения по умолчанию зависят от модели.`}),_jsxs(_components.p,{children:[`Диапазон: от `,_jsx(_components.code,{children:`0`}),` до `,_jsx(_components.code,{children:`2`}),`.`]})]}),_jsx(ParamField,{body:`generationConfig.topP`,type:`number`,id:`param-generation-config-top-p-3`,children:_jsx(_components.p,{children:`Порог nucleus-выборки. Значения по умолчанию зависят от модели.`})}),_jsx(ParamField,{body:`generationConfig.topK`,type:`integer`,id:`param-generation-config-top-k-3`,children:_jsx(_components.p,{children:`Порог top-k выборки. Значения по умолчанию зависят от модели.`})}),_jsx(ParamField,{body:`generationConfig.maxOutputTokens`,type:`integer`,id:`param-generation-config-max-output-tokens-3`,children:_jsx(_components.p,{children:`Верхняя граница количества сгенерированных токенов.`})}),_jsx(ParamField,{body:`generationConfig.seed`,type:`integer`,id:`param-generation-config-seed-3`,children:_jsx(_components.p,{children:`Начальное значение (seed) для воспроизводимой выборки.`})}),_jsx(ParamField,{body:`generationConfig.stopSequences`,type:`string[]`,id:`param-generation-config-stop-sequences-3`,children:_jsx(_components.p,{children:`Строки, при появлении которых генерация завершается.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig`,type:`object`,id:`param-generation-config-thinking-config-3`,children:_jsx(_components.p,{children:`Управление уровнем рассуждений для моделей, которые это поддерживают.`})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.thinkingLevel`,type:`string`,id:`param-generation-config-thinking-config-thinking-level-3`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`MINIMAL`}),`, `,_jsx(_components.code,{children:`LOW`}),`, `,_jsx(_components.code,{children:`MEDIUM`}),`, `,_jsx(_components.code,{children:`HIGH`})]})}),_jsx(ParamField,{body:`generationConfig.thinkingConfig.includeThoughts`,type:`boolean`,id:`param-generation-config-thinking-config-include-thoughts-3`,children:_jsx(_components.p,{children:`Возвращать рассуждения модели вместе с ответом.`})}),_jsx(ParamField,{body:`tools`,type:`object[]`,id:`param-tools-3`,children:_jsx(_components.p,{children:`Объявления функций, которые модель может вызывать.`})}),_jsx(ParamField,{body:`tools[].functionDeclarations`,type:`object[]`,id:`param-tools-function-declarations-3`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].name`,type:`string`,id:`param-tools-function-declarations-name-3`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].description`,type:`string`,id:`param-tools-function-declarations-description-3`}),_jsx(ParamField,{body:`tools[].functionDeclarations[].parameters`,type:`object`,id:`param-tools-function-declarations-parameters-3`,children:_jsx(_components.p,{children:`JSON Schema для аргументов функции.`})}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-5`,children:`Выходы`}),_jsxs(_components.p,{children:[`Router возвращает нативный ответ Google без изменений. Текст находится в `,_jsx(_components.code,{children:`candidates[0].content.parts[0].text`}),`.`]}),_jsx(ResponseField,{name:`candidates`,type:`object[]`,id:`param-candidates-3`,children:_jsx(_components.p,{children:`Сгенерированные кандидаты; один, если вы не запросили больше.`})}),_jsx(ResponseField,{name:`candidates[].content`,type:`object`,id:`param-candidates-content-3`}),_jsx(ResponseField,{name:`candidates[].content.role`,type:`string`,id:`param-candidates-content-role-3`,children:_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`model`})]})}),_jsx(ResponseField,{name:`candidates[].content.parts`,type:`object[]`,id:`param-candidates-content-parts-3`}),_jsx(ResponseField,{name:`candidates[].content.parts[].text`,type:`string`,id:`param-candidates-content-parts-text-3`,children:_jsx(_components.p,{children:`Сгенерированный текст.`})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall`,type:`object`,id:`param-candidates-content-parts-function-call-1`,children:_jsxs(_components.p,{children:[`Присутствует, когда модель решила вызвать один из ваших `,_jsx(_components.code,{children:`tools`}),`.`]})}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.name`,type:`string`,id:`param-candidates-content-parts-function-call-name-1`}),_jsx(ResponseField,{name:`candidates[].content.parts[].functionCall.args`,type:`object`,id:`param-candidates-content-parts-function-call-args-1`}),_jsx(ResponseField,{name:`candidates[].finishReason`,type:`string`,id:`param-candidates-finish-reason-3`,children:_jsxs(_components.p,{children:[`Причина остановки генерации: `,_jsx(_components.code,{children:`STOP`}),`, `,_jsx(_components.code,{children:`MAX_TOKENS`}),`, `,_jsx(_components.code,{children:`SAFETY`}),`, …`]})}),_jsx(ResponseField,{name:`usageMetadata`,type:`object`,id:`param-usage-metadata-3`,children:_jsx(_components.p,{children:`Учет токенов для вызова.`})}),_jsx(ResponseField,{name:`usageMetadata.promptTokenCount`,type:`integer`,id:`param-usage-metadata-prompt-token-count-3`,children:_jsx(_components.p,{children:`Количество токенов в промпте.`})}),_jsx(ResponseField,{name:`usageMetadata.candidatesTokenCount`,type:`integer`,id:`param-usage-metadata-candidates-token-count-3`,children:_jsx(_components.p,{children:`Количество токенов в сгенерированных кандидатах.`})}),_jsx(ResponseField,{name:`promptFeedback`,type:`object`,id:`param-prompt-feedback-3`,children:_jsxs(_components.p,{children:[`Присутствует, когда был заблокирован сам промпт. Перед чтением результата проверьте, присутствует ли `,_jsx(_components.code,{children:`candidates`}),`; `,_jsx(_components.code,{children:`usageMetadata`}),` также может присутствовать в заблокированном ответе.`]})}),_jsxs(ResponseField,{name:`promptFeedback.blockReason`,type:`string`,id:`param-prompt-feedback-block-reason-3`,children:[_jsx(_components.p,{children:`Причина блокировки промпта. Кандидаты не возвращаются; переформулируйте промпт и повторите попытку.`}),_jsxs(_components.p,{children:[`Возможные значения: `,_jsx(_components.code,{children:`SAFETY`}),`, `,_jsx(_components.code,{children:`OTHER`}),`, `,_jsx(_components.code,{children:`BLOCKLIST`}),`, `,_jsx(_components.code,{children:`PROHIBITED_CONTENT`}),`, `,_jsx(_components.code,{children:`IMAGE_SAFETY`})]})]}),_jsx(Heading,{level:`2`,id:`%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B-4`,children:`Примеры`}),_jsx(Heading,{level:`3`,id:`%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-6`,children:`Входы`}),_jsx(CodeBlock,{filename:``,numberOfLines:`16`,language:`json`,children:_jsx(_components.pre,{className:`shiki shiki-themes github-light-default dark-plus`,style:{backgroundColor:`#ffffff`,\"--shiki-dark-bg\":`#0B0C0E`,color:`#1f2328`,\"--shiki-dark\":`#D4D4D4`},language:`json`,children:_jsxs(_components.code,{language:`json`,numberOfLines:`16`,children:[_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`{`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"contents\"`}),_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:` \"role\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"user\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`,`})]}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"Describe a single red maple leaf on a white background in one sentence.\"`})]}),`\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`,_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:` \"generationConfig\"`}),_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:` \"temperature\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`0.7`}),_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:` \"maxOutputTokens\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`256`})]}),`\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(Heading,{level:`3`,id:`%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-6`,children:`Выходы`}),_jsx(CodeBlock,{filename:``,numberOfLines:`19`,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:`19`,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:` \"candidates\"`}),_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:` \"content\"`}),_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:`\"model\"`}),_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:` \"parts\"`}),_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:` \"text\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"A single red maple leaf rests on a plain white background, its edges sharp and its color deep.\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ]`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` },`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"finishReason\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0A3069`,\"--shiki-dark\":`#CE9178`},children:`\"STOP\"`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` ],`})}),`\n`,_jsxs(_components.span,{className:`line`,children:[_jsx(_components.span,{style:{color:`#116329`,\"--shiki-dark\":`#9CDCFE`},children:` \"usageMetadata\"`}),_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:` \"promptTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`18`}),_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:` \"candidatesTokenCount\"`}),_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`: `}),_jsx(_components.span,{style:{color:`#0550AE`,\"--shiki-dark\":`#B5CEA8`},children:`24`})]}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:` }`})}),`\n`,_jsx(_components.span,{className:`line`,children:_jsx(_components.span,{style:{color:`#1F2328`,\"--shiki-dark\":`#D4D4D4`},children:`}`})}),`\n`]})})})]})]}),`\n`,_jsx(Heading,{level:`2`,id:`перед-публикацией`,children:`Перед публикацией`}),`\n`,_jsxs(_components.p,{children:[`SDK создают `,_jsx(_components.code,{children:`Idempotency-Key`}),` и переиспользуют его для автоматических повторов. При ручных повторах используйте исходный ключ. Router может удерживать соединение до 10 минут.`]}),`\n`,_jsxs(_components.p,{children:[`Когда запрос завершается ошибкой, Router отправляет заголовок ответа `,_jsx(_components.code,{children:`X-Comfy-Error-Type`}),` с объяснением причины. Код `,_jsx(_components.code,{children:`422`}),` означает, что Router отклонил вход до вызова провайдера, а `,_jsx(_components.code,{children:`413`}),` означает, что тело запроса оказалось больше, чем Router принимает. Скачивайте сгенерированные ассеты своевременно, поскольку `,_jsx(_components.a,{href:`/ru/development/comfy-router/reference#%D0%B0%D1%81%D1%81%D0%B5%D1%82%D1%8B-%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%BE%D0%B2`,children:`URL результатов могут истекать`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Любое ограничение размера, указанное в описании поля выше, это собственный предел провайдера для этого поля, приведённый из спецификации провайдера. Router применяет отдельное ограничение ко всему телу запроса, в которое засчитываются медиа в base64: см. `,_jsx(_components.a,{href:`/ru/development/comfy-router/limitations#request-bodies-are-capped`,children:`размер тела запроса`}),`.`]}),`\n`,_jsxs(_components.p,{children:[`Эта страница описывает одну партнёрскую модель, вызываемую через Comfy Router. Тот же пакет `,_jsx(_components.code,{children:`comfy-sdk`}),` / `,_jsx(_components.code,{children:`@comfyorg/sdk`}),` также поставляется со вторым клиентом для запуска целого графа рабочего процесса ComfyUI на Comfy Cloud: `,_jsx(_components.code,{children:`Comfy(api_key=...)`}),` / `,_jsx(_components.code,{children:`new Comfy({ apiKey })`}),`, с `,_jsx(_components.code,{children:`client.workflows`}),`, `,_jsx(_components.code,{children:`client.assets`}),` и `,_jsx(_components.code,{children:`client.jobs`}),`. См. `,_jsx(_components.a,{href:`/ru/development/api-development/sdks`,children:`Comfy SDKs`}),`.`]}),`\n`,_jsxs(CardGroup,{cols:3,children:[_jsx(Card,{title:`Заголовки`,icon:`list`,href:`/ru/development/comfy-router/headers`,children:_jsx(_components.p,{children:`Аутентификация, идемпотентность, идентификаторы запросов, группы ошибок, темп повторов, лимиты расходов.`})}),_jsx(Card,{title:`Использование Router API`,icon:`code`,href:`/ru/development/comfy-router/api`,children:_jsx(_components.p,{children:`Обнаружение моделей, ошибки валидации, повторы и выставление счетов.`})}),_jsx(Card,{title:`Ограничения`,icon:`triangle-exclamation`,href:`/ru/development/comfy-router/limitations`,children:_jsx(_components.p,{children:`Что Router не делает сегодня и что использовать вместо этого.`})})]})]})}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":"Использовать Google Gemini с Comfy Router","description":"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата","sidebarTitle":"Google Gemini","translationSourceHash":"0958828b","translationFrom":"development/comfy-router/models/google/gemini/code.mdx","href":"/ru/development/comfy-router/models/google/gemini/code"}}},"mdxSourceWithNoJs":null},"mdxExtracts":{"tableOfContents":[{"title":"Быстрый старт","slug":"быстрый-старт","depth":2,"children":[]},{"title":"Схема","slug":"%D1%81%D1%85%D0%B5%D0%BC%D0%B0","depth":2,"children":[{"title":"Входы","slug":"%D0%B2%D1%85%D0%BE%D0%B4%D1%8B","depth":3,"children":[],"tabId":"gemini-3-1-pro"},{"title":"Выходы","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B","depth":3,"children":[],"tabId":"gemini-3-1-pro"}],"tabId":"gemini-3-1-pro"},{"title":"Примеры","slug":"%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B","depth":2,"children":[{"title":"Вход","slug":"%D0%B2%D1%85%D0%BE%D0%B4","depth":3,"children":[],"tabId":"gemini-3-1-pro"},{"title":"Выход","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4","depth":3,"children":[],"tabId":"gemini-3-1-pro"}],"tabId":"gemini-3-1-pro"},{"title":"Схема","slug":"%D1%81%D1%85%D0%B5%D0%BC%D0%B0-2","depth":2,"children":[{"title":"Входы","slug":"%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-2","depth":3,"children":[],"tabId":"gemini-3-5-flash"},{"title":"Выходы","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-2","depth":3,"children":[],"tabId":"gemini-3-5-flash"}],"tabId":"gemini-3-5-flash"},{"title":"Примеры","slug":"%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B-2","depth":2,"children":[{"title":"Входы","slug":"%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-3","depth":3,"children":[],"tabId":"gemini-3-5-flash"},{"title":"Выходы","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-3","depth":3,"children":[],"tabId":"gemini-3-5-flash"}],"tabId":"gemini-3-5-flash"},{"title":"Схема","slug":"%D1%81%D1%85%D0%B5%D0%BC%D0%B0-3","depth":2,"children":[{"title":"Входы","slug":"%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-4","depth":3,"children":[],"tabId":"gemini-2-5-pro"},{"title":"Выходы","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-4","depth":3,"children":[],"tabId":"gemini-2-5-pro"}],"tabId":"gemini-2-5-pro"},{"title":"Примеры","slug":"%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B-3","depth":2,"children":[{"title":"Вход","slug":"%D0%B2%D1%85%D0%BE%D0%B4-2","depth":3,"children":[],"tabId":"gemini-2-5-pro"},{"title":"Выход","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4-2","depth":3,"children":[],"tabId":"gemini-2-5-pro"}],"tabId":"gemini-2-5-pro"},{"title":"Схема","slug":"%D1%81%D1%85%D0%B5%D0%BC%D0%B0-4","depth":2,"children":[{"title":"Входы","slug":"%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-5","depth":3,"children":[],"tabId":"gemini-2-5-flash"},{"title":"Выходы","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-5","depth":3,"children":[],"tabId":"gemini-2-5-flash"}],"tabId":"gemini-2-5-flash"},{"title":"Примеры","slug":"%D0%BF%D1%80%D0%B8%D0%BC%D0%B5%D1%80%D1%8B-4","depth":2,"children":[{"title":"Входы","slug":"%D0%B2%D1%85%D0%BE%D0%B4%D1%8B-6","depth":3,"children":[],"tabId":"gemini-2-5-flash"},{"title":"Выходы","slug":"%D0%B2%D1%8B%D1%85%D0%BE%D0%B4%D1%8B-6","depth":3,"children":[],"tabId":"gemini-2-5-flash"}],"tabId":"gemini-2-5-flash"},{"title":"Перед публикацией","slug":"перед-публикацией","depth":2,"children":[]}],"codeExamples":{}},"jsLinks":["/_mintlify/custom/dripart/0598a3d384a97986/giscus-comments.js","/_mintlify/custom/dripart/bd0341946f3c75a6/syft.js","/_mintlify/custom/dripart/042392a43b5e681e/samples-cards.js"],"subdomain":"dripart","siteName":"ComfyUI","title":"Использовать Google Gemini с Comfy Router - ComfyUI","contextualStarterQuestions":[],"navMaps":{"firstHrefInVersion":{},"firstHrefInLanguage":{"en":{"href":"/development/comfy-router/models/google/gemini/code","matchLevel":1},"zh":{"href":"/zh/development/comfy-router/models/google/gemini/code","matchLevel":1},"ja":{"href":"/ja/development/comfy-router/models/google/gemini/code","matchLevel":1},"ko":{"href":"/ko/development/comfy-router/models/google/gemini/code","matchLevel":1},"es":{"href":"/es/development/comfy-router/models/google/gemini/code","matchLevel":1},"ru":{"href":"/ru/development/comfy-router/models/google/gemini/code","matchLevel":0}}},"lastModified":"2026-12-02T18:35:05.640Z","originalFileLocation":"ru/development/comfy-router/models/google/gemini/code.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=\"dark\"}var r=p==='system'?(matchMedia(\"(prefers-color-scheme: dark)\").matches?'dark':'light'):p;d.classList.remove(r==='dark'?'light':'dark');d.classList.add(r);d.setAttribute(\"data-theme-preference\",p)})();\u003c/script>\u003cmeta data-mint-head name=\"description\" content=\"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата\">\u003cmeta data-mint-head name=\"application-name\" content=\"ComfyUI\">\u003cmeta data-mint-head name=\"generator\" content=\"Mintlify\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"192x192\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_generated/favicon/apple-touch-icon.png\">\u003clink data-mint-head rel=\"icon\" type=\"image/png\" sizes=\"16x16\" href=\"/mintlify-assets/_mintlify/favicons/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_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/dripart/lS3H5I41bE6LSXEf/_generated/favicon-dark/favicon.ico\" media=\"(prefers-color-scheme: dark)\">\u003cmeta data-mint-head property=\"og:title\" content=\"Использовать Google Gemini с Comfy Router - ComfyUI\">\u003cmeta data-mint-head property=\"og:description\" content=\"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата\">\u003cmeta data-mint-head property=\"og:site_name\" content=\"ComfyUI\">\u003cmeta data-mint-head property=\"og:url\" content=\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code\">\u003cmeta data-mint-head property=\"og:type\" content=\"website\">\u003cmeta data-mint-head property=\"og:image\" content=\"https://dripart.mintlify.site/_mintlify/api/og/v2?division=Google\u0026amp;title=%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D1%8C+Google+Gemini+%D1%81+Comfy+Router\u0026amp;description=%D0%A1%D0%BD%D0%B8%D0%BF%D0%BF%D0%B5%D1%82%D1%8B+Python%2C+TypeScript+%D0%B8+cURL+%D0%B4%D0%BB%D1%8F+%D0%B2%D1%8B%D0%B7%D0%BE%D0%B2%D0%B0+%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D1%8B%D1%85+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B5%D0%B9+Google+Gemini+%D0%BF%D0%BE+HTTP+%D1%87%D0%B5%D1%80%D0%B5%D0%B7+Comfy+Router%2C+%D0%BF%D0%BE%D0%BB%D1%8F+%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0+%D0%B8+%D1%84%D0%BE%D1%80%D0%BC%D0%B0+%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0\u0026amp;theme=b252c39adf72ba65053766a0\u0026amp;signature=f89647a787c52209904f1a6169454af153261f27c61e178aa11f78be546d98ba\">\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=\"Использовать Google Gemini с Comfy Router - ComfyUI\">\u003cmeta data-mint-head name=\"twitter:description\" content=\"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата\">\u003cmeta data-mint-head name=\"twitter:image\" content=\"https://dripart.mintlify.site/_mintlify/api/og/v2?division=Google\u0026amp;title=%D0%98%D1%81%D0%BF%D0%BE%D0%BB%D1%8C%D0%B7%D0%BE%D0%B2%D0%B0%D1%82%D1%8C+Google+Gemini+%D1%81+Comfy+Router\u0026amp;description=%D0%A1%D0%BD%D0%B8%D0%BF%D0%BF%D0%B5%D1%82%D1%8B+Python%2C+TypeScript+%D0%B8+cURL+%D0%B4%D0%BB%D1%8F+%D0%B2%D1%8B%D0%B7%D0%BE%D0%B2%D0%B0+%D1%82%D0%B5%D0%BA%D1%81%D1%82%D0%BE%D0%B2%D1%8B%D1%85+%D0%BC%D0%BE%D0%B4%D0%B5%D0%BB%D0%B5%D0%B9+Google+Gemini+%D0%BF%D0%BE+HTTP+%D1%87%D0%B5%D1%80%D0%B5%D0%B7+Comfy+Router%2C+%D0%BF%D0%BE%D0%BB%D1%8F+%D0%B7%D0%B0%D0%BF%D1%80%D0%BE%D1%81%D0%B0+%D0%B8+%D1%84%D0%BE%D1%80%D0%BC%D0%B0+%D1%80%D0%B5%D0%B7%D1%83%D0%BB%D1%8C%D1%82%D0%B0%D1%82%D0%B0\u0026amp;theme=b252c39adf72ba65053766a0\u0026amp;signature=f89647a787c52209904f1a6169454af153261f27c61e178aa11f78be546d98ba\">\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/dripart/lS3H5I41bE6LSXEf/_generated/favicon/browserconfig.xml\">\u003cmeta data-mint-head name=\"apple-mobile-web-app-title\" content=\"ComfyUI\">\u003cmeta data-mint-head name=\"msapplication-TileColor\" content=\"#49378B\">\u003cmeta data-mint-head name=\"googlebot\" content=\"max-video-preview:0\">\u003clink data-mint-head rel=\"canonical\" href=\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" type=\"application/xml\" href=\"/sitemap.xml\">\u003clink data-mint-head rel=\"alternate\" type=\"text/markdown\" href=\"/ru/development/comfy-router/models/google/gemini/code.md\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ru\" href=\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"en\" href=\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"zh\" href=\"https://docs.comfy.org/zh/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ja\" href=\"https://docs.comfy.org/ja/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"ko\" href=\"https://docs.comfy.org/ko/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"es\" href=\"https://docs.comfy.org/es/development/comfy-router/models/google/gemini/code\">\u003clink data-mint-head rel=\"alternate\" hreflang=\"x-default\" href=\"https://docs.comfy.org/development/comfy-router/models/google/gemini/code\">\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@graph\":[{\"@type\":\"Organization\",\"@id\":\"https://docs.comfy.org/#organization\",\"name\":\"ComfyUI\",\"url\":\"https://docs.comfy.org\",\"logo\":{\"@type\":\"ImageObject\",\"url\":\"https://mintcdn.com/dripart/WCFdTagRdhtvk9-o/logo/light.svg?fit=max\u0026auto=format\u0026n=WCFdTagRdhtvk9-o\u0026q=85\u0026s=ec112de87239058f5a931a7e4b594965\"}},{\"@type\":\"WebSite\",\"@id\":\"https://docs.comfy.org#website\",\"name\":\"ComfyUI\",\"url\":\"https://docs.comfy.org\",\"publisher\":{\"@id\":\"https://docs.comfy.org/#organization\"}},{\"@type\":\"WebPage\",\"@id\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code#webpage\",\"url\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code\",\"name\":\"Использовать Google Gemini с Comfy Router\",\"description\":\"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата\",\"dateModified\":\"2026-12-02T18:35:05.640Z\",\"isPartOf\":{\"@id\":\"https://docs.comfy.org#website\"},\"breadcrumb\":{\"@id\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code#breadcrumb\"}},{\"@type\":\"BreadcrumbList\",\"@id\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Модели\",\"item\":\"https://docs.comfy.org/ru/development/comfy-router/models\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Все модели\",\"item\":\"https://docs.comfy.org/ru/development/comfy-router/models/anthropic/claude-fable-5-1/code\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Google\",\"item\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini-2-5-flash-image/code\"},{\"@type\":\"ListItem\",\"position\":4,\"name\":\"Использовать Google Gemini с Comfy Router\",\"item\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code\"}]},{\"@type\":[\"Article\",\"TechArticle\"],\"@id\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code#article\",\"headline\":\"Использовать Google Gemini с Comfy Router\",\"name\":\"Использовать Google Gemini с Comfy Router\",\"description\":\"Сниппеты Python, TypeScript и cURL для вызова текстовых моделей Google Gemini по HTTP через Comfy Router, поля запроса и форма результата\",\"url\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code\",\"mainEntityOfPage\":{\"@id\":\"https://docs.comfy.org/ru/development/comfy-router/models/google/gemini/code#webpage\"},\"dateModified\":\"2026-12-02T18:35:05.640Z\",\"publisher\":{\"@id\":\"https://docs.comfy.org/#organization\"},\"isPartOf\":{\"@id\":\"https://docs.comfy.org#website\"}}]}\u003c/script>\u003cscript data-mint-head type=\"application/ld+json\">{\"@context\":\"https://schema.org\",\"@type\":\"WebSite\",\"name\":\"ComfyUI\",\"publisher\":{\"@type\":\"Organization\",\"name\":\"ComfyUI\"},\"provider\":{\"@type\":\"Organization\",\"name\":\"Mintlify\",\"url\":\"https://mintlify.com\"}}\u003c/script>","agentPointerHref":"/ru/development/comfy-router/models/google/gemini/code.md","siteName":"ComfyUI","nav":{"global":null,"languages":[{"language":"en","pages":[{"title":"en","href":"/development/comfy-router/models/google/gemini/code"}]},{"language":"zh","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"资源","items":[{"label":"安装","href":"/zh/installation/system_requirements"},{"label":"教程","href":"/zh/tutorials/basic/text-to-image"},{"label":"开发","href":"/zh/development/overview"}]},{"header":"产品","items":[{"label":"功能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"画廊","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"下载","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"公司","items":[{"label":"关于","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"招聘","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"服务条款","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"隐私政策","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"pages":[{"title":"zh","href":"/zh/development/comfy-router/models/google/gemini/code"}]},{"language":"ja","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"リソース","items":[{"label":"インストール","href":"/ja/installation/system_requirements"},{"label":"チュートリアル","href":"/ja/tutorials/basic/text-to-image"},{"label":"開発","href":"/ja/development/overview"}]},{"header":"プロダクト","items":[{"label":"機能","href":"https://www.comfy.org/?utm_source=docs"},{"label":"ギャラリー","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"ダウンロード","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"会社情報","items":[{"label":"概要","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"採用情報","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"利用規約","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"プライバシーポリシー","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ja/tutorials/partner-nodes/pricing","label":"料金"},{"href":"https://comfy.org/download?utm_source=docs","label":"ダウンロード"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"pages":[{"title":"ja","href":"/ja/development/comfy-router/models/google/gemini/code"}]},{"language":"ko","footer":{"socials":{"github":"https://github.com/Comfy-Org/ComfyUI","x":"https://x.com/ComfyUI","discord":"https://discord.com/invite/comfyorg","youtube":"https://www.youtube.com/@comfyorg"},"links":[{"header":"리소스","items":[{"label":"설치","href":"/ko/installation/system_requirements"},{"label":"튜토리얼","href":"/ko/tutorials/basic/text-to-image"},{"label":"개발","href":"/ko/development/overview"}]},{"header":"제품","items":[{"label":"기능","href":"https://www.comfy.org/?utm_source=docs"},{"label":"갤러리","href":"https://www.comfy.org/gallery?utm_source=docs"},{"label":"다운로드","href":"https://www.comfy.org/download?utm_source=docs"}]},{"header":"회사 정보","items":[{"label":"소개","href":"https://www.comfy.org/about?utm_source=docs"},{"label":"채용","href":"https://www.comfy.org/careers?utm_source=docs"},{"label":"이용약관","href":"https://www.comfy.org/terms-of-service?utm_source=docs"},{"label":"개인정보 처리방침","href":"https://www.comfy.org/privacy-policy?utm_source=docs"}]}]},"navbar":{"links":[{"href":"/ko/tutorials/partner-nodes/pricing","label":"가격 정책"},{"href":"https://comfy.org/download?utm_source=docs","label":"다운로드"}],"primary":{"type":"button","label":"Comfy Cloud","href":"https://comfy.org/cloud?utm_source=docs"}},"pages":[{"title":"ko","href":"/ko/development/comfy-router/models/google/gemini/code"}]},{"language":"es","pages":[{"title":"es","href":"/es/development/comfy-router/models/google/gemini/code"}]},{"language":"ru","tabs":[{"tab":"Начало работы","pages":[{"title":"Начало работы","href":"/ru"}]},{"tab":"Руководства","pages":[{"title":"Руководства","href":"/ru/basic-concepts/workflow"}]},{"tab":"Comfy Router","pages":[{"title":"Быстрый старт с Comfy Router","sidebarTitle":"Быстрый старт","href":"/ru/development/comfy-router/quickstart"},{"group":"Router API","pages":[{"title":"Обзор API Comfy Router","sidebarTitle":"Обзор","href":"/ru/development/comfy-router/api"},{"title":"Найти модели Comfy Router","sidebarTitle":"Поиск моделей","href":"/ru/development/comfy-router/discover-models"},{"title":"Схемы и результаты моделей Comfy Router","sidebarTitle":"Схемы и результаты","href":"/ru/development/comfy-router/schemas"},{"title":"Ставить запросы Comfy Router в очередь","sidebarTitle":"Запросы в очереди","href":"/ru/development/comfy-router/queue"},{"title":"Ошибки и повторные попытки Comfy Router","sidebarTitle":"Ошибки и повторные попытки","href":"/ru/development/comfy-router/errors"},{"title":"Выставление счетов Comfy Router","sidebarTitle":"Выставление счетов","href":"/ru/development/comfy-router/billing"},{"title":"Использование Comfy Router с LiteLLM","sidebarTitle":"LiteLLM","href":"/ru/development/comfy-router/litellm"},{"title":"Модели реального времени Comfy Router","sidebarTitle":"Модели реального времени","href":"/ru/development/comfy-router/realtime"},{"title":"Элементы и голоса Kling 4.0 в Comfy Router","sidebarTitle":"Элементы и голоса Kling 4.0","href":"/ru/development/comfy-router/kling-4-0-elements-voices"},{"title":"Перейти со Stability API на Comfy Router","sidebarTitle":"Перейти со Stability API","href":"/ru/development/comfy-router/stability-migration"}]},{"group":"Справочник","pages":[{"title":"Справочник по API Comfy Router","sidebarTitle":"Справочник по API","href":"/ru/development/comfy-router/reference"},{"title":"Заголовки Comfy Router","sidebarTitle":"Заголовки","href":"/ru/development/comfy-router/headers"},{"title":"Возможности и ограничения Comfy Router","sidebarTitle":"Возможности и ограничения","href":"/ru/development/comfy-router/limitations"},{"group":"Справочник API","pages":[{"group":"Comfy Router","pages":[{"title":"List the models Comfy Router can run.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models","href":"/ru/api-reference/router/comfy-router/list-the-models-comfy-router-can-run"},{"title":"Read one partner model's catalog entry by canonical model ID.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}","href":"/ru/api-reference/router/comfy-router/read-one-partner-models-catalog-entry-by-canonical-model-id"},{"title":"Run a partner model synchronously by canonical model ID.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml post /v2/models/{provider}/{model}","href":"/ru/api-reference/router/comfy-router/run-a-partner-model-synchronously-by-canonical-model-id"},{"title":"Price a model call before running it, without running it.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml post /v2/models/{provider}/{model}/estimate","href":"/ru/api-reference/router/comfy-router/price-a-model-call-before-running-it-without-running-it"},{"title":"Read one partner model's input and output schemas as an OpenAPI document.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}/openapi.json","href":"/ru/api-reference/router/comfy-router/read-one-partner-models-input-and-output-schemas-as-an-openapi-document"},{"title":"Submit a partner model run to the queue and return immediately.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml post /v2/models/{provider}/{model}/requests","href":"/ru/api-reference/router/comfy-router/submit-a-partner-model-run-to-the-queue-and-return-immediately"},{"title":"Collect the result of one submitted request.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}/requests/{request_id}","href":"/ru/api-reference/router/comfy-router/collect-the-result-of-one-submitted-request"},{"title":"Ask for one submitted request to be cancelled.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml put /v2/models/{provider}/{model}/requests/{request_id}/cancel","href":"/ru/api-reference/router/comfy-router/ask-for-one-submitted-request-to-be-cancelled"},{"title":"Read the queue state of one submitted request.","deprecated":null,"version":null,"openapi":"/router-openapi.yaml get /v2/models/{provider}/{model}/requests/{request_id}/status","href":"/ru/api-reference/router/comfy-router/read-the-queue-state-of-one-submitted-request"}]}]}]},{"group":"Модели","pages":[{"title":"Модели Comfy Router","sidebarTitle":"Все модели","href":"/ru/development/comfy-router/models"},{"title":"Цены Comfy Router","sidebarTitle":"Цены","href":"/ru/development/comfy-router/pricing"},{"title":"Провайдеры обслуживания Comfy Router","sidebarTitle":"Провайдеры","href":"/ru/development/comfy-router/providers"},{"group":"Все модели","pages":[{"group":"Anthropic","pages":[{"title":"Использовать Claude Fable 5.1 с Comfy Router","sidebarTitle":"Claude Fable 5.1","href":"/ru/development/comfy-router/models/anthropic/claude-fable-5-1/code"},{"title":"Использовать Claude Fable 5.2 с Comfy Router","sidebarTitle":"Claude Fable 5.2","href":"/ru/development/comfy-router/models/anthropic/claude-fable-5-2/code"},{"title":"Использовать Claude Fable 5 с Comfy Router","sidebarTitle":"Claude Fable 5","href":"/ru/development/comfy-router/models/anthropic/claude-fable-5/code"},{"title":"Использовать Claude Haiku 4.5 20251001 в Comfy Router","sidebarTitle":"Claude Haiku 4.5 20251001","href":"/ru/development/comfy-router/models/anthropic/claude-haiku-4-5-20251001/code"},{"title":"Использовать Claude Opus 4.6 через Comfy Router","sidebarTitle":"Claude Opus 4.6","href":"/ru/development/comfy-router/models/anthropic/claude-opus-4-6/code"},{"title":"Использовать Claude Opus 4.7 с Comfy Router","sidebarTitle":"Claude Opus 4.7","href":"/ru/development/comfy-router/models/anthropic/claude-opus-4-7/code"},{"title":"Использовать Claude Opus 4.8 в Comfy Router","sidebarTitle":"Claude Opus 4.8","href":"/ru/development/comfy-router/models/anthropic/claude-opus-4-8/code"},{"title":"Использовать Claude Opus 5.5 с Comfy Router","sidebarTitle":"Claude Opus 5.5","href":"/ru/development/comfy-router/models/anthropic/claude-opus-5-5/code"},{"title":"Использовать Claude Opus 5 в Comfy Router","sidebarTitle":"Claude Opus 5","href":"/ru/development/comfy-router/models/anthropic/claude-opus-5/code"},{"title":"Использовать Claude Sonnet 4.6 с Comfy Router","sidebarTitle":"Claude Sonnet 4.6","href":"/ru/development/comfy-router/models/anthropic/claude-sonnet-4-6/code"},{"title":"Использовать Claude Sonnet 5.5 в Comfy Router","sidebarTitle":"Claude Sonnet 5.5","href":"/ru/development/comfy-router/models/anthropic/claude-sonnet-5-5/code"},{"title":"Использование Claude Sonnet 5 с Comfy Router","sidebarTitle":"Claude Sonnet 5","href":"/ru/development/comfy-router/models/anthropic/claude-sonnet-5/code"}]},{"group":"Beeble","pages":[{"title":"Использовать SwitchX с Comfy Router","sidebarTitle":"SwitchX","href":"/ru/development/comfy-router/models/beeble/switchx/code"}]},{"group":"Black Forest Labs","pages":[{"title":"Использовать Erase V1 с Comfy Router","sidebarTitle":"Erase V1","href":"/ru/development/comfy-router/models/black-forest-labs/erase-v1/code"},{"title":"Использовать Flux 1.1 Pro Ultra Image с Comfy Router","sidebarTitle":"Flux 1.1 Pro Ultra Image","href":"/ru/development/comfy-router/models/black-forest-labs/flux-1-1-pro-ultra-image/code"},{"title":"Использование FLUX.1 Kontext с Comfy Router","sidebarTitle":"FLUX.1 Kontext","href":"/ru/development/comfy-router/models/black-forest-labs/flux-1-kontext/code"},{"title":"Использовать FLUX 2 Max с Comfy Router","sidebarTitle":"FLUX 2 Max","href":"/ru/development/comfy-router/models/black-forest-labs/flux-2-max/code"},{"title":"Использовать FLUX 2 Pro с Comfy Router","sidebarTitle":"FLUX 2 Pro","href":"/ru/development/comfy-router/models/black-forest-labs/flux-2-pro/code"},{"title":"Использовать FLUX 3 Image с Comfy Router","sidebarTitle":"FLUX 3 Image","href":"/ru/development/comfy-router/models/black-forest-labs/flux-3-image/code"},{"title":"Использовать FLUX 3 Video с Comfy Router","sidebarTitle":"FLUX 3 Video","href":"/ru/development/comfy-router/models/black-forest-labs/flux-3-video/code"},{"title":"Использовать FLUX Pro 1.0 Expand в Comfy Router","sidebarTitle":"FLUX Pro 1.0 Expand","href":"/ru/development/comfy-router/models/black-forest-labs/flux-pro-1-0-expand/code"},{"title":"Использование FLUX Pro 1.0 Fill с Comfy Router","sidebarTitle":"FLUX Pro 1.0 Fill","href":"/ru/development/comfy-router/models/black-forest-labs/flux-pro-1-0-fill/code"},{"title":"Использовать FLUX Video Upscale в Comfy Router","sidebarTitle":"FLUX Video Upscale","href":"/ru/development/comfy-router/models/black-forest-labs/flux-video-upscale/code"},{"title":"Использовать Video Edit V1 с Comfy Router","sidebarTitle":"Video Edit V1","href":"/ru/development/comfy-router/models/black-forest-labs/video-edit-v1/code"},{"title":"Использовать VTO V1 в Comfy Router","sidebarTitle":"VTO V1","href":"/ru/development/comfy-router/models/black-forest-labs/vto-v1/code"}]},{"group":"Bria","pages":[{"title":"Использовать Fibo с Comfy Router","sidebarTitle":"Fibo","href":"/ru/development/comfy-router/models/bria/fibo/code"},{"title":"Использовать Image Edit Add Object By Text в Comfy Router","sidebarTitle":"Image Edit Add Object By Text","href":"/ru/development/comfy-router/models/bria/image-edit-add-object-by-text/code"},{"title":"Использовать Image Edit Erase By Text с Comfy Router","sidebarTitle":"Image Edit Erase By Text","href":"/ru/development/comfy-router/models/bria/image-edit-erase-by-text/code"},{"title":"Использовать Image Edit Erase Foreground с Comfy Router","sidebarTitle":"Image Edit Erase Foreground","href":"/ru/development/comfy-router/models/bria/image-edit-erase-foreground/code"},{"title":"Использовать Image Edit Erase с Comfy Router","sidebarTitle":"Image Edit Erase","href":"/ru/development/comfy-router/models/bria/image-edit-erase/code"},{"title":"Использовать Image Edit Expand с Comfy Router","sidebarTitle":"Image Edit Expand","href":"/ru/development/comfy-router/models/bria/image-edit-expand/code"},{"title":"Использовать Image Edit Gen Fill с Comfy Router","sidebarTitle":"Image Edit Gen Fill","href":"/ru/development/comfy-router/models/bria/image-edit-gen-fill/code"},{"title":"Использовать Image Edit Increase Resolution с Comfy Router","sidebarTitle":"Image Edit Increase Resolution","href":"/ru/development/comfy-router/models/bria/image-edit-increase-resolution/code"},{"title":"Использовать Image Edit Product Holding с Comfy Router","sidebarTitle":"Image Edit Product Holding","href":"/ru/development/comfy-router/models/bria/image-edit-product-holding/code"},{"title":"Использовать Image Edit Product Virtual Tryon с Comfy Router","sidebarTitle":"Image Edit Product Virtual Tryon","href":"/ru/development/comfy-router/models/bria/image-edit-product-virtual-tryon/code"},{"title":"Использовать Image Edit Relight с Comfy Router","sidebarTitle":"Image Edit Relight","href":"/ru/development/comfy-router/models/bria/image-edit-relight/code"},{"title":"Использовать Image Edit Remove Background Guided в Comfy Router","sidebarTitle":"Image Edit Remove Background Guided","href":"/ru/development/comfy-router/models/bria/image-edit-remove-background-guided/code"},{"title":"Использовать Image Edit Remove Background через Comfy Router","sidebarTitle":"Image Edit Remove Background","href":"/ru/development/comfy-router/models/bria/image-edit-remove-background/code"},{"title":"Использовать Image Edit Replace Background с Comfy Router","sidebarTitle":"Image Edit Replace Background","href":"/ru/development/comfy-router/models/bria/image-edit-replace-background/code"},{"title":"Использовать Image Edit Replace Object By Text с Comfy Router","sidebarTitle":"Image Edit Replace Object By Text","href":"/ru/development/comfy-router/models/bria/image-edit-replace-object-by-text/code"},{"title":"Использовать Image Edit Reseason с Comfy Router","sidebarTitle":"Image Edit Reseason","href":"/ru/development/comfy-router/models/bria/image-edit-reseason/code"},{"title":"Использовать Image Edit Restore с Comfy Router","sidebarTitle":"Image Edit Restore","href":"/ru/development/comfy-router/models/bria/image-edit-restore/code"},{"title":"Использовать Image Upscale Exact с Comfy Router","sidebarTitle":"Image Upscale Exact","href":"/ru/development/comfy-router/models/bria/image-upscale-exact/code"},{"title":"Использовать Image с Comfy Router","sidebarTitle":"Image","href":"/ru/development/comfy-router/models/bria/image/code"},{"title":"Использовать Video Edit Erase в Comfy Router","sidebarTitle":"Video Edit Erase","href":"/ru/development/comfy-router/models/bria/video-edit-erase/code"},{"title":"Использовать Video Edit Green Screen с Comfy Router","sidebarTitle":"Video Edit Green Screen","href":"/ru/development/comfy-router/models/bria/video-edit-green-screen/code"},{"title":"Использовать Video Edit Remove Background с Comfy Router","sidebarTitle":"Video Edit Remove Background","href":"/ru/development/comfy-router/models/bria/video-edit-remove-background/code"},{"title":"Использовать Video Edit Replace Background с Comfy Router","sidebarTitle":"Video Edit Replace Background","href":"/ru/development/comfy-router/models/bria/video-edit-replace-background/code"}]},{"group":"BytePlus","pages":[{"title":"Использовать Dreamina Seedance 2.0 260128 с Comfy Router","sidebarTitle":"Dreamina Seedance 2.0 260128","href":"/ru/development/comfy-router/models/byteplus/dreamina-seedance-2-0-260128/code"},{"title":"Использовать Dreamina Seedance 2.0 Fast 260128 с Comfy Router","sidebarTitle":"Dreamina Seedance 2.0 Fast 260128","href":"/ru/development/comfy-router/models/byteplus/dreamina-seedance-2-0-fast-260128/code"},{"title":"Использовать Dreamina Seedance 2.0 Mini с Comfy Router","sidebarTitle":"Dreamina Seedance 2.0 Mini","href":"/ru/development/comfy-router/models/byteplus/dreamina-seedance-2-0-mini/code"},{"title":"Использование Dreamina Seedance 2.5 260628 с Comfy Router","sidebarTitle":"Dreamina Seedance 2.5 260628","href":"/ru/development/comfy-router/models/byteplus/dreamina-seedance-2-5-260628/code"},{"title":"Использовать Dreamina Seedance 2.5 Flash 261115 в Comfy Router","sidebarTitle":"Dreamina Seedance 2.5 Flash 261115","href":"/ru/development/comfy-router/models/byteplus/dreamina-seedance-2-5-flash-261115/code"},{"title":"Использовать Seed 2.0 Lite 260228 с Comfy Router","sidebarTitle":"Seed 2.0 Lite 260228","href":"/ru/development/comfy-router/models/byteplus/seed-2-0-lite-260228/code"},{"title":"Использовать Seed 2.0 Mini 260215 с Comfy Router","sidebarTitle":"Seed 2.0 Mini 260215","href":"/ru/development/comfy-router/models/byteplus/seed-2-0-mini-260215/code"},{"title":"Использовать Seed 2.0 Pro 260328 с Comfy Router","sidebarTitle":"Seed 2.0 Pro 260328","href":"/ru/development/comfy-router/models/byteplus/seed-2-0-pro-260328/code"},{"title":"Использовать Seed Audio 1.0 Multilingual в Comfy Router","sidebarTitle":"Seed Audio 1.0 Multilingual","href":"/ru/development/comfy-router/models/byteplus/seed-audio-1-0-multilingual/code"},{"title":"Использовать Seed Audio 1.0 с Comfy Router","sidebarTitle":"Seed Audio 1.0","href":"/ru/development/comfy-router/models/byteplus/seed-audio-1-0/code"},{"title":"Использовать Seed Audio 1.5 261128 с Comfy Router","sidebarTitle":"Seed Audio 1.5 261128","href":"/ru/development/comfy-router/models/byteplus/seed-audio-1-5-261128/code"},{"title":"Использовать Seedance 1.0 Pro 250528 с Comfy Router","sidebarTitle":"Seedance 1.0 Pro 250528","href":"/ru/development/comfy-router/models/byteplus/seedance-1-0-pro-250528/code"},{"title":"Использовать Seedance 1.0 Pro Fast 251015 в Comfy Router","sidebarTitle":"Seedance 1.0 Pro Fast 251015","href":"/ru/development/comfy-router/models/byteplus/seedance-1-0-pro-fast-251015/code"},{"title":"Использовать Seedream 4.0 250828 в Comfy Router","sidebarTitle":"Seedream 4.0 250828","href":"/ru/development/comfy-router/models/byteplus/seedream-4-0-250828/code"},{"title":"Использовать Seedream 4.5 251128 с Comfy Router","sidebarTitle":"Seedream 4.5 251128","href":"/ru/development/comfy-router/models/byteplus/seedream-4-5-251128/code"},{"title":"Использовать Seedream 5.0 260128 в Comfy Router","sidebarTitle":"Seedream 5.0 260128","href":"/ru/development/comfy-router/models/byteplus/seedream-5-0-260128/code"},{"title":"Использовать Seedream 5.0 Flash 260915 с Comfy Router","sidebarTitle":"Seedream 5.0 Flash 260915","href":"/ru/development/comfy-router/models/byteplus/seedream-5-0-flash-260915/code"},{"title":"Использовать Seedream 5.0 Pro 260628 с Comfy Router","sidebarTitle":"Seedream 5.0 Pro 260628","href":"/ru/development/comfy-router/models/byteplus/seedream-5-0-pro-260628/code"},{"title":"Использовать Seedream 5.5 261028 в Comfy Router","sidebarTitle":"Seedream 5.5 261028","href":"/ru/development/comfy-router/models/byteplus/seedream-5-5-261028/code"}]},{"group":"Byteplusomnihuman","pages":[{"title":"Использовать Omnihuman 2.0 с Comfy Router","sidebarTitle":"Omnihuman 2.0","href":"/ru/development/comfy-router/models/byteplusomnihuman/omnihuman-2-0/code"}]},{"group":"Cartwheel","pages":[{"title":"Использовать Swing Choreo с Comfy Router","sidebarTitle":"Swing Choreo","href":"/ru/development/comfy-router/models/cartwheel/swing-choreo/code"},{"title":"Использовать Swing Sketch с Comfy Router","sidebarTitle":"Swing Sketch","href":"/ru/development/comfy-router/models/cartwheel/swing-sketch/code"}]},{"group":"Elevenlabs","pages":[{"title":"Использовать Eleven Multilingual V2 с Comfy Router","sidebarTitle":"Eleven Multilingual V2","href":"/ru/development/comfy-router/models/elevenlabs/eleven-multilingual-v2/code"},{"title":"Использовать Eleven Sfx V2 в Comfy Router","sidebarTitle":"Eleven Sfx V2","href":"/ru/development/comfy-router/models/elevenlabs/eleven-sfx-v2/code"},{"title":"Использовать Eleven Sfx V3 с Comfy Router","sidebarTitle":"Eleven Sfx V3","href":"/ru/development/comfy-router/models/elevenlabs/eleven-sfx-v3/code"},{"title":"Использовать Eleven V3 с Comfy Router","sidebarTitle":"Eleven V3","href":"/ru/development/comfy-router/models/elevenlabs/eleven-v3/code"},{"title":"Использовать Eleven V4 Turbo с Comfy Router","sidebarTitle":"Eleven V4 Turbo","href":"/ru/development/comfy-router/models/elevenlabs/eleven-v4-turbo/code"},{"title":"Использовать Eleven V4 с Comfy Router","sidebarTitle":"Eleven V4","href":"/ru/development/comfy-router/models/elevenlabs/eleven-v4/code"}]},{"group":"fal","pages":[{"title":"Использовать Crystal Upscaler с Comfy Router","sidebarTitle":"Crystal Upscaler","href":"/ru/development/comfy-router/models/fal/crystal-upscaler/code"},{"title":"Использовать Crystal Video Upscaler с Comfy Router","sidebarTitle":"Crystal Video Upscaler","href":"/ru/development/comfy-router/models/fal/crystal-video-upscaler/code"},{"title":"Использовать FLUX 3 Max с Comfy Router","sidebarTitle":"FLUX 3 Max","href":"/ru/development/comfy-router/models/fal/flux-3-max/code"},{"title":"Использовать H3 Max Turbo с Comfy Router","sidebarTitle":"H3 Max Turbo","href":"/ru/development/comfy-router/models/fal/h3-max-turbo/code"},{"title":"Использовать H3 Max с Comfy Router","sidebarTitle":"H3 Max","href":"/ru/development/comfy-router/models/fal/h3-max/code"},{"title":"Использовать Patina с Comfy Router","sidebarTitle":"Patina","href":"/ru/development/comfy-router/models/fal/patina/code"}]},{"group":"Freepik","pages":[{"title":"Использовать AI Image Relight с Comfy Router","sidebarTitle":"AI Image Relight","href":"/ru/development/comfy-router/models/freepik/ai-image-relight/code"},{"title":"Использовать AI Image Style Transfer в Comfy Router","sidebarTitle":"AI Image Style Transfer","href":"/ru/development/comfy-router/models/freepik/ai-image-style-transfer/code"},{"title":"Использовать AI Image Upscaler Precision V2 с Comfy Router","sidebarTitle":"AI Image Upscaler Precision V2","href":"/ru/development/comfy-router/models/freepik/ai-image-upscaler-precision-v2/code"},{"title":"Использовать AI Skin Enhancer Creative с Comfy Router","sidebarTitle":"AI Skin Enhancer Creative","href":"/ru/development/comfy-router/models/freepik/ai-skin-enhancer-creative/code"},{"title":"Использовать AI Skin Enhancer Faithful с Comfy Router","sidebarTitle":"AI Skin Enhancer Faithful","href":"/ru/development/comfy-router/models/freepik/ai-skin-enhancer-faithful/code"},{"title":"Использовать AI Skin Enhancer Flexible с Comfy Router","sidebarTitle":"AI Skin Enhancer Flexible","href":"/ru/development/comfy-router/models/freepik/ai-skin-enhancer-flexible/code"}]},{"group":"Gemini Interactions","pages":[{"title":"Использовать Gemini Omni 1.1 Flash с Comfy Router","sidebarTitle":"Gemini Omni 1.1 Flash","href":"/ru/development/comfy-router/models/gemini-interactions/gemini-omni-1-1-flash/code"},{"title":"Использовать Gemini Omni 1.2 Flash в Comfy Router","sidebarTitle":"Gemini Omni 1.2 Flash","href":"/ru/development/comfy-router/models/gemini-interactions/gemini-omni-1-2-flash/code"},{"title":"Использовать Gemini Omni Flash Preview в Comfy Router","sidebarTitle":"Gemini Omni Flash Preview","href":"/ru/development/comfy-router/models/gemini-interactions/gemini-omni-flash-preview/code"}]},{"group":"Google","pages":[{"title":"Использовать Gemini 2.5 Flash Image с Comfy Router","sidebarTitle":"Gemini 2.5 Flash Image","href":"/ru/development/comfy-router/models/google/gemini-2-5-flash-image/code"},{"title":"Использовать Gemini 3.1 Flash Lite с Comfy Router","sidebarTitle":"Gemini 3.1 Flash Lite","href":"/ru/development/comfy-router/models/google/gemini-3-1-flash-lite/code"},{"title":"Использовать Gemini 3.7 Flash в Comfy Router","sidebarTitle":"Gemini 3.7 Flash","href":"/ru/development/comfy-router/models/google/gemini-3-7-flash/code"},{"title":"Использовать Gemini 3.8 Flash с Comfy Router","sidebarTitle":"Gemini 3.8 Flash","href":"/ru/development/comfy-router/models/google/gemini-3-8-flash/code"},{"title":"Использовать Gemini 4 Argon с Comfy Router","sidebarTitle":"Gemini 4 Argon","href":"/ru/development/comfy-router/models/google/gemini-4-argon/code"},{"title":"Использовать Gemini 4 Carbon с Comfy Router","sidebarTitle":"Gemini 4 Carbon","href":"/ru/development/comfy-router/models/google/gemini-4-carbon/code"},{"title":"Использовать Gemini 4 Hydrogen с Comfy Router","sidebarTitle":"Gemini 4 Hydrogen","href":"/ru/development/comfy-router/models/google/gemini-4-hydrogen/code"},{"title":"Использовать Gemini 4 Neon с Comfy Router","sidebarTitle":"Gemini 4 Neon","href":"/ru/development/comfy-router/models/google/gemini-4-neon/code"},{"title":"Использовать Gemini Nano Banana 2.1 с Comfy Router","description":"Вызов vertexai/gemini-nano-banana-2.1 через Comfy Router: эндпоинт, форма запроса и ответ, который возвращает Router.","sidebarTitle":"Gemini Nano Banana 2.1","href":"/ru/development/comfy-router/models/google/gemini-nano-banana-2-1/code"},{"title":"Использовать Google Gemini с Comfy Router","sidebarTitle":"Google Gemini","href":"/ru/development/comfy-router/models/google/gemini/code"},{"title":"Использовать Nano Banana 2 Lite в Comfy Router","description":"Примеры на Python, TypeScript и cURL для генерации изображений с Nano Banana 2 Lite (Gemini 3.1 Flash-Lite Image) через Comfy Router и поля запроса","sidebarTitle":"Nano Banana 2 Lite","href":"/ru/development/comfy-router/models/google/nano-banana-2-lite/code"},{"title":"Использовать Nano Banana 2 с Comfy Router","sidebarTitle":"Nano Banana 2","href":"/ru/development/comfy-router/models/google/nano-banana-2/code"},{"title":"Использовать Nano Banana Pro с Comfy Router","sidebarTitle":"Nano Banana Pro","href":"/ru/development/comfy-router/models/google/nano-banana-pro/code"}]},{"group":"HeyGen","pages":[{"title":"Использовать Starfish с Comfy Router","sidebarTitle":"Starfish","href":"/ru/development/comfy-router/models/heygen/starfish/code"}]},{"group":"Higgsfield","pages":[{"title":"Использовать Higgsfield Genjutsu Motion Transfer V1.0 с Comfy Router","sidebarTitle":"Higgsfield Genjutsu Motion Transfer V1.0","href":"/ru/development/comfy-router/models/higgsfield/higgsfield-genjutsu-motion-transfer-v1-0/code"},{"title":"Использовать Higgsfield Kling 3.4k с Comfy Router","sidebarTitle":"Higgsfield Kling 3.4k","href":"/ru/development/comfy-router/models/higgsfield/higgsfield-kling-3-4k/code"},{"title":"Использовать Higgsfield Kling 3 Pro с Comfy Router","sidebarTitle":"Higgsfield Kling 3 Pro","href":"/ru/development/comfy-router/models/higgsfield/higgsfield-kling-3-pro/code"}]},{"group":"Ideogram","pages":[{"title":"Использовать Ideogram 4.5 с Comfy Router","sidebarTitle":"Ideogram 4.5","href":"/ru/development/comfy-router/models/ideogram/ideogram-4-5/code"},{"title":"Использовать Ideogram 4.6 с Comfy Router","sidebarTitle":"Ideogram 4.6","href":"/ru/development/comfy-router/models/ideogram/ideogram-4-6/code"},{"title":"Использовать Ideogram V3 с Comfy Router","sidebarTitle":"Ideogram V3","href":"/ru/development/comfy-router/models/ideogram/ideogram-v3/code"},{"title":"Использовать Ideogram 4.0 с Comfy Router","sidebarTitle":"Ideogram 4.0","href":"/ru/development/comfy-router/models/ideogram/ideogram-v4/code"},{"title":"Использовать P Image Ideogram с Comfy Router","sidebarTitle":"P Image Ideogram","href":"/ru/development/comfy-router/models/ideogram/p-image-ideogram/code"}]},{"group":"Kelly","pages":[{"title":"Использовать Kelly Kling 4.0 с Comfy Router","sidebarTitle":"Kelly Kling 4.0","href":"/ru/development/comfy-router/models/kelly/kelly-kling-4-0/code"},{"title":"Использовать Kelly Seedance 2.0 Fast в Comfy Router","sidebarTitle":"Kelly Seedance 2.0 Fast","href":"/ru/development/comfy-router/models/kelly/kelly-seedance-2-0-fast/code"},{"title":"Использовать Kelly Seedance 2.0 с Comfy Router","sidebarTitle":"Kelly Seedance 2.0","href":"/ru/development/comfy-router/models/kelly/kelly-seedance-2-0/code"},{"title":"Использовать Kelly Seedance 2.5 с Comfy Router","sidebarTitle":"Kelly Seedance 2.5","href":"/ru/development/comfy-router/models/kelly/kelly-seedance-2-5/code"}]},{"group":"Kling","pages":[{"title":"Использовать Kling 3.0 Turbo с Comfy Router","sidebarTitle":"Kling 3.0 Turbo","href":"/ru/development/comfy-router/models/kling/kling-3-0-turbo/code"},{"title":"Использовать Kling 4.0 Flash с Comfy Router","sidebarTitle":"Kling 4.0 Flash","href":"/ru/development/comfy-router/models/kling/kling-4-0-flash/code"},{"title":"Использовать Kling 4.0 с Comfy Router","sidebarTitle":"Kling 4.0","href":"/ru/development/comfy-router/models/kling/kling-4-0/code"},{"title":"Использовать Kling Image 4.0 в Comfy Router","sidebarTitle":"Kling Image 4.0","href":"/ru/development/comfy-router/models/kling/kling-image-4-0/code"},{"title":"Использовать Kling Image O1 с Comfy Router","sidebarTitle":"Kling Image O1","href":"/ru/development/comfy-router/models/kling/kling-image-o1/code"},{"title":"Использовать Kling Long Image 4.0 с Comfy Router","sidebarTitle":"Kling Long Image 4.0","href":"/ru/development/comfy-router/models/kling/kling-long-image-4-0/code"},{"title":"Использовать Kling V2.5 Turbo с Comfy Router","sidebarTitle":"Kling V2.5 Turbo","href":"/ru/development/comfy-router/models/kling/kling-v2-5-turbo/code"},{"title":"Использовать Kling V2.6 с Comfy Router","sidebarTitle":"Kling V2.6","href":"/ru/development/comfy-router/models/kling/kling-v2-6/code"},{"title":"Использовать Kling V3 Omni с Comfy Router","sidebarTitle":"Kling V3 Omni","href":"/ru/development/comfy-router/models/kling/kling-v3-omni/code"},{"title":"Использовать Kling V3 с Comfy Router","sidebarTitle":"Kling V3","href":"/ru/development/comfy-router/models/kling/kling-v3/code"},{"title":"Использовать Kling Video O1 в Comfy Router","sidebarTitle":"Kling Video O1","href":"/ru/development/comfy-router/models/kling/kling-video-o1/code"},{"title":"Использовать Videos Avatar Image 2video с Comfy Router","sidebarTitle":"Videos Avatar Image 2video","href":"/ru/development/comfy-router/models/kling/videos-avatar-image2video/code"},{"title":"Использовать Videos Lip Sync с Comfy Router","sidebarTitle":"Videos Lip Sync","href":"/ru/development/comfy-router/models/kling/videos-lip-sync/code"}]},{"group":"Krea","pages":[{"title":"Использовать Krea 2 Large с Comfy Router","sidebarTitle":"Krea 2 Large","href":"/ru/development/comfy-router/models/krea/krea-2-large/code"},{"title":"Использовать Krea 2 Medium Turbo с Comfy Router","sidebarTitle":"Krea 2 Medium Turbo","href":"/ru/development/comfy-router/models/krea/krea-2-medium-turbo/code"},{"title":"Использовать Krea 2 Medium в Comfy Router","sidebarTitle":"Krea 2 Medium","href":"/ru/development/comfy-router/models/krea/krea-2-medium/code"},{"title":"Использовать Krea 2 с Comfy Router","sidebarTitle":"Krea 2","href":"/ru/development/comfy-router/models/krea/krea-2/code"},{"title":"Использовать Krea 3 с Comfy Router","sidebarTitle":"Krea 3","href":"/ru/development/comfy-router/models/krea/krea-3/code"}]},{"group":"LTX","pages":[{"title":"Использовать LTX 2.5 Fast с Comfy Router","sidebarTitle":"LTX 2.5 Fast","href":"/ru/development/comfy-router/models/ltx/ltx-2-5-fast/code"},{"title":"Использовать LTX 2.5 Pro с Comfy Router","sidebarTitle":"LTX 2.5 Pro","href":"/ru/development/comfy-router/models/ltx/ltx-2-5-pro/code"},{"title":"Использовать LTX Video Alpha Gen с Comfy Router","sidebarTitle":"LTX Video Alpha Gen","href":"/ru/development/comfy-router/models/ltx/ltx-video-alpha-gen/code"},{"title":"Использовать LTX Video To Video Hdr с Comfy Router","sidebarTitle":"LTX Video To Video Hdr","href":"/ru/development/comfy-router/models/ltx/ltx-video-to-video-hdr/code"},{"title":"Использовать LTX Video To Video Reframe в Comfy Router","sidebarTitle":"LTX Video To Video Reframe","href":"/ru/development/comfy-router/models/ltx/ltx-video-to-video-reframe/code"},{"title":"Использовать LTX Video Upscale с Comfy Router","sidebarTitle":"LTX Video Upscale","href":"/ru/development/comfy-router/models/ltx/ltx-video-upscale/code"}]},{"group":"Luma 2","pages":[{"title":"Использовать Ray 3.2 с Comfy Router","sidebarTitle":"Ray 3.2","href":"/ru/development/comfy-router/models/luma_2/ray-3-2/code"},{"title":"Использовать Uni 1 Max с Comfy Router","sidebarTitle":"Uni 1 Max","href":"/ru/development/comfy-router/models/luma_2/uni-1-max/code"},{"title":"Использовать Uni 1 с Comfy Router","sidebarTitle":"Uni 1","href":"/ru/development/comfy-router/models/luma_2/uni-1/code"}]},{"group":"Meshy","pages":[{"title":"Использовать Animations с Comfy Router","sidebarTitle":"Animations","href":"/ru/development/comfy-router/models/meshy/animations/code"},{"title":"Использовать Meshy 6 с Comfy Router","sidebarTitle":"Meshy 6","href":"/ru/development/comfy-router/models/meshy/meshy-6/code"},{"title":"Использовать Meshy 7.1 с Comfy Router","sidebarTitle":"Meshy 7.1","href":"/ru/development/comfy-router/models/meshy/meshy-7-1/code"},{"title":"Использовать Meshy 7 с Comfy Router","sidebarTitle":"Meshy 7","href":"/ru/development/comfy-router/models/meshy/meshy-7/code"},{"title":"Использовать Meshy N1 с Comfy Router","sidebarTitle":"Meshy N1","href":"/ru/development/comfy-router/models/meshy/meshy-n1/code"},{"title":"Использовать Relief с Comfy Router","sidebarTitle":"Relief","href":"/ru/development/comfy-router/models/meshy/relief/code"},{"title":"Использовать Remesh с Comfy Router","sidebarTitle":"Remesh","href":"/ru/development/comfy-router/models/meshy/remesh/code"},{"title":"Использовать Rigging в Comfy Router","sidebarTitle":"Rigging","href":"/ru/development/comfy-router/models/meshy/rigging/code"}]},{"group":"MiniMax","pages":[{"title":"Использовать MiniMax H3 Image Highspeed с Comfy Router","sidebarTitle":"MiniMax H3 Image Highspeed","href":"/ru/development/comfy-router/models/minimax/minimax-h3-image-highspeed/code"},{"title":"Использовать изображение MiniMax H3 с Comfy Router","sidebarTitle":"Изображение MiniMax H3","href":"/ru/development/comfy-router/models/minimax/minimax-h3-image/code"},{"title":"Использовать MiniMax H3 с Comfy Router","sidebarTitle":"MiniMax H3","href":"/ru/development/comfy-router/models/minimax/minimax-h3/code"}]},{"group":"OpenAI","pages":[{"title":"Использовать GPT 4.1 Mini с Comfy Router","sidebarTitle":"GPT 4.1 Mini","href":"/ru/development/comfy-router/models/openai/gpt-4-1-mini/code"},{"title":"Использовать GPT 4.1 с Comfy Router","sidebarTitle":"GPT 4.1","href":"/ru/development/comfy-router/models/openai/gpt-4-1/code"},{"title":"Использовать GPT 4o с Comfy Router","sidebarTitle":"GPT 4o","href":"/ru/development/comfy-router/models/openai/gpt-4o/code"},{"title":"Использовать GPT 5.5 Pro с Comfy Router","sidebarTitle":"GPT 5.5 Pro","href":"/ru/development/comfy-router/models/openai/gpt-5-5-pro/code"},{"title":"Использовать GPT 5.5 через Comfy Router","sidebarTitle":"GPT 5.5","href":"/ru/development/comfy-router/models/openai/gpt-5-5/code"},{"title":"Использовать GPT 5.6 Luna с Comfy Router","sidebarTitle":"GPT 5.6 Luna","href":"/ru/development/comfy-router/models/openai/gpt-5-6-luna/code"},{"title":"Использовать GPT 5.6 Sol с Comfy Router","sidebarTitle":"GPT 5.6 Sol","href":"/ru/development/comfy-router/models/openai/gpt-5-6-sol/code"},{"title":"Использовать GPT 5.6 Terra через Comfy Router","sidebarTitle":"GPT 5.6 Terra","href":"/ru/development/comfy-router/models/openai/gpt-5-6-terra/code"},{"title":"Использовать GPT 5 Mini с Comfy Router","sidebarTitle":"GPT 5 Mini","href":"/ru/development/comfy-router/models/openai/gpt-5-mini/code"},{"title":"Использовать GPT 5 Nano с Comfy Router","sidebarTitle":"GPT 5 Nano","href":"/ru/development/comfy-router/models/openai/gpt-5-nano/code"},{"title":"Использовать GPT 5 с Comfy Router","sidebarTitle":"GPT 5","href":"/ru/development/comfy-router/models/openai/gpt-5/code"},{"title":"Использовать GPT 6.1 Sol с Comfy Router","sidebarTitle":"GPT 6.1 Sol","href":"/ru/development/comfy-router/models/openai/gpt-6-1-sol/code"},{"title":"Использовать GPT 6.1 Terra с Comfy Router","sidebarTitle":"GPT 6.1 Terra","href":"/ru/development/comfy-router/models/openai/gpt-6-1-terra/code"},{"title":"Использовать GPT 6.2 Astra с Comfy Router","sidebarTitle":"GPT 6.2 Astra","href":"/ru/development/comfy-router/models/openai/gpt-6-2-astra/code"},{"title":"Использовать GPT 6.2 Sol с Comfy Router","sidebarTitle":"GPT 6.2 Sol","href":"/ru/development/comfy-router/models/openai/gpt-6-2-sol/code"},{"title":"Использовать GPT 6 Astra с Comfy Router","sidebarTitle":"GPT 6 Astra","href":"/ru/development/comfy-router/models/openai/gpt-6-astra/code"},{"title":"Использовать GPT 6 Luna с Comfy Router","sidebarTitle":"GPT 6 Luna","href":"/ru/development/comfy-router/models/openai/gpt-6-luna/code"},{"title":"Использовать GPT 6 Sol с Comfy Router","sidebarTitle":"GPT 6 Sol","href":"/ru/development/comfy-router/models/openai/gpt-6-sol/code"},{"title":"Использовать GPT Image 1.5 с Comfy Router","sidebarTitle":"GPT Image 1.5","href":"/ru/development/comfy-router/models/openai/gpt-image-1-5/code"},{"title":"Использовать GPT Image 2.5 Flare с Comfy Router","sidebarTitle":"GPT Image 2.5 Flare","href":"/ru/development/comfy-router/models/openai/gpt-image-2-5-flare/code"},{"title":"Использовать GPT Image 2.5 Sunburst с Comfy Router","sidebarTitle":"GPT Image 2.5 Sunburst","href":"/ru/development/comfy-router/models/openai/gpt-image-2-5-sunburst/code"},{"title":"Использовать GPT Image 2.6 Flare в Comfy Router","sidebarTitle":"GPT Image 2.6 Flare","href":"/ru/development/comfy-router/models/openai/gpt-image-2-6-flare/code"},{"title":"Использовать GPT Image 2.6 Sunburst с Comfy Router","sidebarTitle":"GPT Image 2.6 Sunburst","href":"/ru/development/comfy-router/models/openai/gpt-image-2-6-sunburst/code"},{"title":"Использовать GPT Image 2 с Comfy Router","sidebarTitle":"GPT Image 2","href":"/ru/development/comfy-router/models/openai/gpt-image-2/code"},{"title":"Использовать o3 с Comfy Router","sidebarTitle":"o3","href":"/ru/development/comfy-router/models/openai/o3/code"}]},{"group":"Openrouter","pages":[{"title":"Использовать Chat Completions с Comfy Router","sidebarTitle":"Chat Completions","href":"/ru/development/comfy-router/models/openrouter/chat-completions/code"},{"title":"Использовать изображения с Comfy Router","sidebarTitle":"Изображения","href":"/ru/development/comfy-router/models/openrouter/images/code"}]},{"group":"Pika","pages":[{"title":"Использовать Pika 2.5 Image To Video с Comfy Router","sidebarTitle":"Pika 2.5 Image To Video","href":"/ru/development/comfy-router/models/pika/pika-2-5-image-to-video/code"},{"title":"Использовать Pika 2.5 Text To Video с Comfy Router","sidebarTitle":"Pika 2.5 Text To Video","href":"/ru/development/comfy-router/models/pika/pika-2-5-text-to-video/code"},{"title":"Использовать Pika H3 Flex Image To Video с Comfy Router","sidebarTitle":"Pika H3 Flex Image To Video","href":"/ru/development/comfy-router/models/pika/pika-h3-flex-image-to-video/code"},{"title":"Использовать Pika H3 Flex Reference To Video в Comfy Router","sidebarTitle":"Pika H3 Flex Reference To Video","href":"/ru/development/comfy-router/models/pika/pika-h3-flex-reference-to-video/code"},{"title":"Использовать Pika H3 Flex Text To Video с Comfy Router","sidebarTitle":"Pika H3 Flex Text To Video","href":"/ru/development/comfy-router/models/pika/pika-h3-flex-text-to-video/code"},{"title":"Использовать музыку Pika с Comfy Router","sidebarTitle":"Музыка Pika","href":"/ru/development/comfy-router/models/pika/pika-music/code"},{"title":"Использовать Pika Soundtrack с Comfy Router","sidebarTitle":"Pika Soundtrack","href":"/ru/development/comfy-router/models/pika/pika-soundtrack/code"}]},{"group":"Pixverse","pages":[{"title":"Использовать V3.5 с Comfy Router","sidebarTitle":"V3.5","href":"/ru/development/comfy-router/models/pixverse/v3-5/code"},{"title":"Использовать V6 Max с Comfy Router","sidebarTitle":"V6 Max","href":"/ru/development/comfy-router/models/pixverse/v6-max/code"},{"title":"Использовать V6 с Comfy Router","sidebarTitle":"V6","href":"/ru/development/comfy-router/models/pixverse/v6/code"}]},{"group":"Pruna","pages":[{"title":"Использовать P Video 2 Pro Avatar с Comfy Router","sidebarTitle":"P Video 2 Pro Avatar","href":"/ru/development/comfy-router/models/pruna/p-video-2-pro-avatar/code"},{"title":"Использовать P Video 2 Pro Reference с Comfy Router","sidebarTitle":"P Video 2 Pro Reference","href":"/ru/development/comfy-router/models/pruna/p-video-2-pro-reference/code"},{"title":"Использовать P Video 2 с Comfy Router","sidebarTitle":"P Video 2","href":"/ru/development/comfy-router/models/pruna/p-video-2/code"},{"title":"Использовать P Video Upscale с Comfy Router","sidebarTitle":"P Video Upscale","href":"/ru/development/comfy-router/models/pruna/p-video-upscale/code"}]},{"group":"Quiver","pages":[{"title":"Использовать Arrow 2 Telos с Comfy Router","sidebarTitle":"Arrow 2 Telos","href":"/ru/development/comfy-router/models/quiver/arrow-2-telos/code"},{"title":"Использовать Arrow 2 с Comfy Router","sidebarTitle":"Arrow 2","href":"/ru/development/comfy-router/models/quiver/arrow-2/code"}]},{"group":"Qwen","pages":[{"title":"Использовать Qwen Image 3.0 Pro с Comfy Router","sidebarTitle":"Qwen Image 3.0 Pro","href":"/ru/development/comfy-router/models/qwen/qwen-image-3-0-pro/code"},{"title":"Использовать Qwen Image 3.0 с Comfy Router","sidebarTitle":"Qwen Image 3.0","href":"/ru/development/comfy-router/models/qwen/qwen-image-3-0/code"}]},{"group":"Recraft","pages":[{"title":"Использовать Images Vectorize с Comfy Router","sidebarTitle":"Images Vectorize","href":"/ru/development/comfy-router/models/recraft/images-vectorize/code"},{"title":"Использовать Recraft V2 с Comfy Router","sidebarTitle":"Recraft V2","href":"/ru/development/comfy-router/models/recraft/recraftv2/code"},{"title":"Использовать Recraft V3 с Comfy Router","sidebarTitle":"Recraft V3","href":"/ru/development/comfy-router/models/recraft/recraftv3/code"},{"title":"Использование Recraft V4.1 Flash V2 с Comfy Router","sidebarTitle":"Recraft V4.1 Flash V2","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-flash-v2/code"},{"title":"Использовать Recraft V4.1 Pro Vector с Comfy Router","sidebarTitle":"Recraft V4.1 Pro Vector","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-pro-vector/code"},{"title":"Использовать Recraft V4.1 Pro с Comfy Router","sidebarTitle":"Recraft V4.1 Pro","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-pro/code"},{"title":"Использовать Recraft V4.1 Utility Pro Vector с Comfy Router","sidebarTitle":"Recraft V4.1 Utility Pro Vector","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-utility-pro-vector/code"},{"title":"Использовать Recraft V4.1 Utility Pro в Comfy Router","sidebarTitle":"Recraft V4.1 Utility Pro","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-utility-pro/code"},{"title":"Использовать Recraft V4.1 Utility Vector с Comfy Router","sidebarTitle":"Recraft V4.1 Utility Vector","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-utility-vector/code"},{"title":"Использовать Recraft V4.1 Utility в Comfy Router","sidebarTitle":"Recraft V4.1 Utility","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-utility/code"},{"title":"Использовать Recraft V4.1 Vector с Comfy Router","sidebarTitle":"Recraft V4.1 Vector","href":"/ru/development/comfy-router/models/recraft/recraftv4-1-vector/code"},{"title":"Использовать Recraft V4.1 с Comfy Router","sidebarTitle":"Recraft V4.1","href":"/ru/development/comfy-router/models/recraft/recraftv4-1/code"},{"title":"Использовать Recraft V4 Pro в Comfy Router","sidebarTitle":"Recraft V4 Pro","href":"/ru/development/comfy-router/models/recraft/recraftv4-pro/code"},{"title":"Использовать Recraft V4 Styles Pro Vector с Comfy Router","sidebarTitle":"Recraft V4 Styles Pro Vector","href":"/ru/development/comfy-router/models/recraft/recraftv4-styles-pro-vector/code"},{"title":"Использовать Recraft V4 Styles Pro с Comfy Router","sidebarTitle":"Recraft V4 Styles Pro","href":"/ru/development/comfy-router/models/recraft/recraftv4-styles-pro/code"},{"title":"Использовать Recraft V4 Styles Vector с Comfy Router","sidebarTitle":"Recraft V4 Styles Vector","href":"/ru/development/comfy-router/models/recraft/recraftv4-styles-vector/code"},{"title":"Использовать Recraft V4 Styles с Comfy Router","sidebarTitle":"Recraft V4 Styles","href":"/ru/development/comfy-router/models/recraft/recraftv4-styles/code"},{"title":"Использовать Recraft V4 с Comfy Router","sidebarTitle":"Recraft V4","href":"/ru/development/comfy-router/models/recraft/recraftv4/code"}]},{"group":"Runway","pages":[{"title":"Использовать Aleph 2 с Comfy Router","sidebarTitle":"Aleph 2","href":"/ru/development/comfy-router/models/runway/aleph2/code"},{"title":"Использовать Gen 4 Image с Comfy Router","sidebarTitle":"Gen 4 Image","href":"/ru/development/comfy-router/models/runway/gen4-image/code"},{"title":"Использовать Gen 4 Turbo с Comfy Router","sidebarTitle":"Gen 4 Turbo","href":"/ru/development/comfy-router/models/runway/gen4-turbo/code"}]},{"group":"Sandbase","pages":[{"title":"Использовать Magi 2 Image To Video с Comfy Router","sidebarTitle":"Magi 2 Image To Video","href":"/ru/development/comfy-router/models/sandbase/magi-2-image-to-video/code"},{"title":"Использовать Magi 2 Reference To Video в Comfy Router","sidebarTitle":"Magi 2 Reference To Video","href":"/ru/development/comfy-router/models/sandbase/magi-2-reference-to-video/code"},{"title":"Использовать Magi 2 Text To Video с Comfy Router","sidebarTitle":"Magi 2 Text To Video","href":"/ru/development/comfy-router/models/sandbase/magi-2-text-to-video/code"}]},{"group":"Stability","pages":[{"title":"Использовать Control Sketch с Comfy Router","sidebarTitle":"Control Sketch","href":"/ru/development/comfy-router/models/stability/control-sketch/code"},{"title":"Использовать Control Structure с Comfy Router","sidebarTitle":"Control Structure","href":"/ru/development/comfy-router/models/stability/control-structure/code"},{"title":"Использовать Control Style Transfer с Comfy Router","sidebarTitle":"Control Style Transfer","href":"/ru/development/comfy-router/models/stability/control-style-transfer/code"},{"title":"Использовать Control Style с Comfy Router","sidebarTitle":"Control Style","href":"/ru/development/comfy-router/models/stability/control-style/code"},{"title":"Использовать Edit Erase в Comfy Router","sidebarTitle":"Edit Erase","href":"/ru/development/comfy-router/models/stability/edit-erase/code"},{"title":"Использовать Edit Inpaint с Comfy Router","sidebarTitle":"Edit Inpaint","href":"/ru/development/comfy-router/models/stability/edit-inpaint/code"},{"title":"Использовать Edit Outpaint с Comfy Router","sidebarTitle":"Edit Outpaint","href":"/ru/development/comfy-router/models/stability/edit-outpaint/code"},{"title":"Использовать Edit Remove Background вместе с Comfy Router","sidebarTitle":"Edit Remove Background","href":"/ru/development/comfy-router/models/stability/edit-remove-background/code"},{"title":"Использовать Edit Replace Background And Relight с Comfy Router","sidebarTitle":"Edit Replace Background And Relight","href":"/ru/development/comfy-router/models/stability/edit-replace-background-and-relight/code"},{"title":"Использовать Edit Search And Recolor с Comfy Router","sidebarTitle":"Edit Search And Recolor","href":"/ru/development/comfy-router/models/stability/edit-search-and-recolor/code"},{"title":"Использовать Edit Search And Replace с Comfy Router","sidebarTitle":"Edit Search And Replace","href":"/ru/development/comfy-router/models/stability/edit-search-and-replace/code"},{"title":"Использовать Generate Core с Comfy Router","sidebarTitle":"Generate Core","href":"/ru/development/comfy-router/models/stability/generate-core/code"},{"title":"Использовать Generate Ultra с Comfy Router","sidebarTitle":"Generate Ultra","href":"/ru/development/comfy-router/models/stability/generate-ultra/code"},{"title":"Использовать Sd3.5 Flash с Comfy Router","sidebarTitle":"Sd3.5 Flash","href":"/ru/development/comfy-router/models/stability/sd3-5-flash/code"},{"title":"Использовать Sd3.5 Large Turbo с Comfy Router","sidebarTitle":"Sd3.5 Large Turbo","href":"/ru/development/comfy-router/models/stability/sd3-5-large-turbo/code"},{"title":"Использовать Sd3.5 Large с Comfy Router","sidebarTitle":"Sd3.5 Large","href":"/ru/development/comfy-router/models/stability/sd3-5-large/code"},{"title":"Использовать Sd3.5 Medium в Comfy Router","sidebarTitle":"Sd3.5 Medium","href":"/ru/development/comfy-router/models/stability/sd3-5-medium/code"},{"title":"Использовать Sdxl 1.0 Image To Image через Comfy Router","sidebarTitle":"Sdxl 1.0 Image To Image","href":"/ru/development/comfy-router/models/stability/sdxl-1-0-image-to-image/code"},{"title":"Использовать Sdxl 1.0 Masking с Comfy Router","sidebarTitle":"Sdxl 1.0 Masking","href":"/ru/development/comfy-router/models/stability/sdxl-1-0-masking/code"},{"title":"Использовать Sdxl 1.0 Text To Image с Comfy Router","sidebarTitle":"Sdxl 1.0 Text To Image","href":"/ru/development/comfy-router/models/stability/sdxl-1-0-text-to-image/code"},{"title":"Использовать Stable Fast 3D с Comfy Router","sidebarTitle":"Stable Fast 3D","href":"/ru/development/comfy-router/models/stability/stable-fast-3d/code"},{"title":"Использовать Stable Point Aware 3D с Comfy Router","sidebarTitle":"Stable Point Aware 3D","href":"/ru/development/comfy-router/models/stability/stable-point-aware-3d/code"},{"title":"Использовать Upscale Conservative с Comfy Router","sidebarTitle":"Upscale Conservative","href":"/ru/development/comfy-router/models/stability/upscale-conservative/code"},{"title":"Использовать Upscale Creative с Comfy Router","sidebarTitle":"Upscale Creative","href":"/ru/development/comfy-router/models/stability/upscale-creative/code"},{"title":"Использовать Upscale Fast с Comfy Router","sidebarTitle":"Upscale Fast","href":"/ru/development/comfy-router/models/stability/upscale-fast/code"}]},{"group":"Synclabs","pages":[{"title":"Использовать Sync 3 с Comfy Router","sidebarTitle":"Sync 3","href":"/ru/development/comfy-router/models/synclabs/sync-3/code"}]},{"group":"Tencent","pages":[{"title":"Использовать Hunyuan 3D Part с Comfy Router","sidebarTitle":"Hunyuan 3D Part","href":"/ru/development/comfy-router/models/tencent/hunyuan-3d-part/code"},{"title":"Использовать Hunyuan 3D Smart Topology с Comfy Router","sidebarTitle":"Hunyuan 3D Smart Topology","href":"/ru/development/comfy-router/models/tencent/hunyuan-3d-smart-topology/code"},{"title":"Использовать Hunyuan 3D Texture Edit с Comfy Router","sidebarTitle":"Hunyuan 3D Texture Edit","href":"/ru/development/comfy-router/models/tencent/hunyuan-3d-texture-edit/code"},{"title":"Использовать Hunyuan 3D Uv с Comfy Router","sidebarTitle":"Hunyuan 3D Uv","href":"/ru/development/comfy-router/models/tencent/hunyuan-3d-uv/code"},{"title":"Использовать Hunyuan Image 3.5 в Comfy Router","sidebarTitle":"Hunyuan Image 3.5","href":"/ru/development/comfy-router/models/tencent/hunyuan-image-3-5/code"},{"title":"Использовать Hy 3D 3.6 в Comfy Router","sidebarTitle":"Hy 3D 3.6","href":"/ru/development/comfy-router/models/tencent/hy-3d-3-6/code"}]},{"group":"Tripo","pages":[{"title":"Использовать P1 20260311 Image To Model с Comfy Router","sidebarTitle":"P1 20260311 Image To Model","href":"/ru/development/comfy-router/models/tripo/p1-20260311-image-to-model/code"},{"title":"Использовать P1 20260311 Multiview To Model с Comfy Router","sidebarTitle":"P1 20260311 Multiview To Model","href":"/ru/development/comfy-router/models/tripo/p1-20260311-multiview-to-model/code"},{"title":"Использовать P1 20260311 Text To Model с Comfy Router","sidebarTitle":"P1 20260311 Text To Model","href":"/ru/development/comfy-router/models/tripo/p1-20260311-text-to-model/code"},{"title":"Работа с P2 20260801 Image To Model в Comfy Router","sidebarTitle":"P2 20260801 Image To Model","href":"/ru/development/comfy-router/models/tripo/p2-20260801-image-to-model/code"},{"title":"Использовать P2 20260801 Multiview To Model с Comfy Router","sidebarTitle":"P2 20260801 Multiview To Model","href":"/ru/development/comfy-router/models/tripo/p2-20260801-multiview-to-model/code"},{"title":"Использовать P2 20260801 Text To Model с Comfy Router","sidebarTitle":"P2 20260801 Text To Model","href":"/ru/development/comfy-router/models/tripo/p2-20260801-text-to-model/code"},{"title":"Использовать V3.0 20250812 Image To Model с Comfy Router","sidebarTitle":"V3.0 20250812 Image To Model","href":"/ru/development/comfy-router/models/tripo/v3-0-20250812-image-to-model/code"},{"title":"Использовать V3.0 20250812 Multiview To Model в Comfy Router","sidebarTitle":"V3.0 20250812 Multiview To Model","href":"/ru/development/comfy-router/models/tripo/v3-0-20250812-multiview-to-model/code"},{"title":"Использовать V3.0 20250812 Text To Model с Comfy Router","sidebarTitle":"V3.0 20250812 Text To Model","href":"/ru/development/comfy-router/models/tripo/v3-0-20250812-text-to-model/code"},{"title":"Использовать V3.1 20260211 Image To Model с Comfy Router","sidebarTitle":"V3.1 20260211 Image To Model","href":"/ru/development/comfy-router/models/tripo/v3-1-20260211-image-to-model/code"},{"title":"Использовать V3.1 20260211 Multiview To Model в Comfy Router","sidebarTitle":"V3.1 20260211 Multiview To Model","href":"/ru/development/comfy-router/models/tripo/v3-1-20260211-multiview-to-model/code"},{"title":"Использовать V3.1 20260211 Text To Model с Comfy Router","sidebarTitle":"V3.1 20260211 Text To Model","href":"/ru/development/comfy-router/models/tripo/v3-1-20260211-text-to-model/code"}]},{"group":"Typesafe","pages":[{"title":"Использовать Jev 1.13.0 с Comfy Router","sidebarTitle":"Jev 1.13.0","href":"/ru/development/comfy-router/models/typesafe/jev-1-13-0/code"},{"title":"Использовать Jev 1.14.0 с Comfy Router","sidebarTitle":"Jev 1.14.0","href":"/ru/development/comfy-router/models/typesafe/jev-1-14-0/code"}]},{"group":"Veed","pages":[{"title":"Использовать Clean Audio Video с Comfy Router","sidebarTitle":"Clean Audio Video","href":"/ru/development/comfy-router/models/veed/clean-audio-video/code"},{"title":"Использовать Clean Audio с Comfy Router","sidebarTitle":"Clean Audio","href":"/ru/development/comfy-router/models/veed/clean-audio/code"},{"title":"Использовать Fabric 1.0 с Comfy Router","sidebarTitle":"Fabric 1.0","href":"/ru/development/comfy-router/models/veed/fabric-1-0/code"},{"title":"Использовать Fabric H3 с Comfy Router","sidebarTitle":"Fabric H3","href":"/ru/development/comfy-router/models/veed/fabric-h3/code"},{"title":"Использовать Lipsync 2.0 с Comfy Router","sidebarTitle":"Lipsync 2.0","href":"/ru/development/comfy-router/models/veed/lipsync-2-0/code"},{"title":"Использовать Video Background Removal Fast с Comfy Router","sidebarTitle":"Video Background Removal Fast","href":"/ru/development/comfy-router/models/veed/video-background-removal-fast/code"},{"title":"Использовать Video Background Removal Green Screen с Comfy Router","sidebarTitle":"Video Background Removal Green Screen","href":"/ru/development/comfy-router/models/veed/video-background-removal-green-screen/code"},{"title":"Использовать Video Background Removal с Comfy Router","sidebarTitle":"Video Background Removal","href":"/ru/development/comfy-router/models/veed/video-background-removal/code"}]},{"group":"Veo","pages":[{"title":"Использовать Veo 3.1 Fast Generate 001 с Comfy Router","sidebarTitle":"Veo 3.1 Fast Generate 001","href":"/ru/development/comfy-router/models/veo/veo-3-1-fast-generate-001/code"},{"title":"Использовать Veo 3.1 Generate 001 с Comfy Router","sidebarTitle":"Veo 3.1 Generate 001","href":"/ru/development/comfy-router/models/veo/veo-3-1-generate-001/code"},{"title":"Использование Veo 3.1 Lite Generate 001 с Comfy Router","sidebarTitle":"Veo 3.1 Lite Generate 001","href":"/ru/development/comfy-router/models/veo/veo-3-1-lite-generate-001/code"}]},{"group":"Viggle","pages":[{"title":"Использовать Jst 2 Scene View с Comfy Router","sidebarTitle":"Jst 2 Scene View","href":"/ru/development/comfy-router/models/viggle/jst-2-scene-view/code"},{"title":"Использовать Jst 2 Scene с Comfy Router","sidebarTitle":"Jst 2 Scene","href":"/ru/development/comfy-router/models/viggle/jst-2-scene/code"},{"title":"Использовать Motion Capture с Comfy Router","sidebarTitle":"Motion Capture","href":"/ru/development/comfy-router/models/viggle/motion-capture/code"},{"title":"Использовать Text To Motion с Comfy Router","sidebarTitle":"Text To Motion","href":"/ru/development/comfy-router/models/viggle/text-to-motion/code"},{"title":"Использовать Video Remix с Comfy Router","sidebarTitle":"Video Remix","href":"/ru/development/comfy-router/models/viggle/video-remix/code"}]},{"group":"Wan","pages":[{"title":"Использовать HappyHorse 1.0 I2V с Comfy Router","sidebarTitle":"HappyHorse 1.0 I2V","href":"/ru/development/comfy-router/models/wan/happyhorse-1-0-i2v/code"},{"title":"Использовать HappyHorse 1.0 R2V с Comfy Router","sidebarTitle":"HappyHorse 1.0 R2V","href":"/ru/development/comfy-router/models/wan/happyhorse-1-0-r2v/code"},{"title":"Использовать HappyHorse 1.0 T2V с Comfy Router","sidebarTitle":"HappyHorse 1.0 T2V","href":"/ru/development/comfy-router/models/wan/happyhorse-1-0-t2v/code"},{"title":"Использовать HappyHorse 1.0 Video Edit с Comfy Router","sidebarTitle":"HappyHorse 1.0 Video Edit","href":"/ru/development/comfy-router/models/wan/happyhorse-1-0-video-edit/code"},{"title":"Использовать HappyHorse 1.1 I2V с Comfy Router","sidebarTitle":"HappyHorse 1.1 I2V","href":"/ru/development/comfy-router/models/wan/happyhorse-1-1-i2v/code"},{"title":"Использовать HappyHorse 1.1 R2V с Comfy Router","sidebarTitle":"HappyHorse 1.1 R2V","href":"/ru/development/comfy-router/models/wan/happyhorse-1-1-r2v/code"},{"title":"Использовать HappyHorse 1.1 T2V с Comfy Router","sidebarTitle":"HappyHorse 1.1 T2V","href":"/ru/development/comfy-router/models/wan/happyhorse-1-1-t2v/code"},{"title":"Использовать Wan 2.5 I2I Preview с Comfy Router","sidebarTitle":"Wan 2.5 I2I Preview","href":"/ru/development/comfy-router/models/wan/wan2-5-i2i-preview/code"},{"title":"Использовать Wan 2.5 I2V Preview с Comfy Router","sidebarTitle":"Wan 2.5 I2V Preview","href":"/ru/development/comfy-router/models/wan/wan2-5-i2v-preview/code"},{"title":"Использовать Wan 2.5 T2I Preview с Comfy Router","sidebarTitle":"Wan 2.5 T2I Preview","href":"/ru/development/comfy-router/models/wan/wan2-5-t2i-preview/code"},{"title":"Использовать Wan 2.5 T2V Preview с Comfy Router","sidebarTitle":"Wan 2.5 T2V Preview","href":"/ru/development/comfy-router/models/wan/wan2-5-t2v-preview/code"},{"title":"Использовать Wan 2.6 I2V с Comfy Router","sidebarTitle":"Wan 2.6 I2V","href":"/ru/development/comfy-router/models/wan/wan2-6-i2v/code"},{"title":"Использовать Wan 2.6 R2V с Comfy Router","sidebarTitle":"Wan 2.6 R2V","href":"/ru/development/comfy-router/models/wan/wan2-6-r2v/code"},{"title":"Использовать Wan 2.6 T2V с Comfy Router","sidebarTitle":"Wan 2.6 T2V","href":"/ru/development/comfy-router/models/wan/wan2-6-t2v/code"},{"title":"Использование Wan 2.7 I2V с Comfy Router","sidebarTitle":"Wan 2.7 I2V","href":"/ru/development/comfy-router/models/wan/wan2-7-i2v/code"},{"title":"Использовать Wan 2.7 R2V с Comfy Router","sidebarTitle":"Wan 2.7 R2V","href":"/ru/development/comfy-router/models/wan/wan2-7-r2v/code"},{"title":"Использовать Wan 2.7 T2V с Comfy Router","sidebarTitle":"Wan 2.7 T2V","href":"/ru/development/comfy-router/models/wan/wan2-7-t2v/code"},{"title":"Использовать Wan 2.7 Video Edit с Comfy Router","sidebarTitle":"Wan 2.7 Video Edit","href":"/ru/development/comfy-router/models/wan/wan2-7-videoedit/code"},{"title":"Использовать Wan 3.0 Video Prime с Comfy Router","sidebarTitle":"Wan 3.0 Video Prime","href":"/ru/development/comfy-router/models/wan/wan3-0-video-prime/code"},{"title":"Использовать Wan 3.0 Video с Comfy Router","sidebarTitle":"Wan 3.0 Video","href":"/ru/development/comfy-router/models/wan/wan3-0-video/code"}]},{"group":"WaveSpeed","pages":[{"title":"Использовать Flashvsr с Comfy Router","sidebarTitle":"Flashvsr","href":"/ru/development/comfy-router/models/wavespeed/flashvsr/code"},{"title":"Использовать Seedvr 2 с Comfy Router","sidebarTitle":"Seedvr 2","href":"/ru/development/comfy-router/models/wavespeed/seedvr2/code"},{"title":"Использовать Ultimate Image Upscaler с Comfy Router","sidebarTitle":"Ultimate Image Upscaler","href":"/ru/development/comfy-router/models/wavespeed/ultimate-image-upscaler/code"}]},{"group":"xAI","pages":[{"title":"Использовать Grok Imagine Image 2.0 с Comfy Router","sidebarTitle":"Grok Imagine Image 2.0","href":"/ru/development/comfy-router/models/xai/grok-imagine-image-2-0/code"},{"title":"Использовать Grok Imagine Image Pro с Comfy Router","sidebarTitle":"Grok Imagine Image Pro","href":"/ru/development/comfy-router/models/xai/grok-imagine-image-pro/code"},{"title":"Использовать Grok Imagine Image Quality с Comfy Router","sidebarTitle":"Grok Imagine Image Quality","href":"/ru/development/comfy-router/models/xai/grok-imagine-image-quality/code"},{"title":"Использовать Grok Imagine Image с Comfy Router","sidebarTitle":"Grok Imagine Image","href":"/ru/development/comfy-router/models/xai/grok-imagine-image/code"},{"title":"Использовать Grok Imagine Video 1.5 Lite с Comfy Router","sidebarTitle":"Grok Imagine Video 1.5 Lite","href":"/ru/development/comfy-router/models/xai/grok-imagine-video-1-5-lite/code"},{"title":"Использовать Grok Imagine Video 1.5 Preview с Comfy Router","sidebarTitle":"Grok Imagine Video 1.5 Preview","href":"/ru/development/comfy-router/models/xai/grok-imagine-video-1-5-preview/code"},{"title":"Использовать Grok Imagine Video 1.5 с Comfy Router","sidebarTitle":"Grok Imagine Video 1.5","href":"/ru/development/comfy-router/models/xai/grok-imagine-video-1-5/code"},{"title":"Использовать Grok Imagine Video с Comfy Router","sidebarTitle":"Grok Imagine Video","href":"/ru/development/comfy-router/models/xai/grok-imagine-video/code"}]}]}]}]},{"tab":"Инструменты для агентов","pages":[{"title":"Инструменты для агентов","href":"/ru/agent-tools"}]},{"tab":"Для разработчиков","pages":[{"title":"Для разработчиков","href":"/ru/development/overview"}]},{"tab":"Рейтинги","pages":[{"title":"Рейтинги","href":"/ru/rankings"}]},{"tab":"Поддержка","pages":[{"title":"Поддержка","href":"/ru/support/contact-support"}]}]}]},"basePath":"","title":"Использовать Google Gemini с Comfy Router - ComfyUI","deploymentId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","buildId":"dpl_3VZr4zL4q2wbintGwWjSCGUgnuP7","dynamics":[],"chunks":[]}