The Gemini Interactions API allows developers to build generative AI applications using Gemini models. Gemini is our most capable model, built from the ground up to be multimodal. It can generalize and seamlessly understand, operate across, and combine different types of information including language, images, audio, video, and code. You can use the Gemini API for use cases like reasoning across text and images, content generation, dialogue agents, summarization and classification systems, and more.
Создание взаимодействия
Создает новое взаимодействие.
Путь / Параметры запроса
Какую версию API использовать?
Текст запроса
Тело запроса содержит данные следующей структуры:
модель ModelOption (необязательно)
Название модели, использованной для генерации взаимодействия.
Обязательно, если параметр `agent` не указан.
Возможные значения
-
gemini-2.5-flashНаша первая гибридная модель рассуждений, поддерживающая контекстное окно в 1 миллион токенов и имеющая бюджеты мышления.
-
gemini-2.5-proНаша передовая многоцелевая модель, превосходно справляющаяся с задачами программирования и сложным логическим мышлением.
-
gemma-4-26b-a4b-itДжемма 4 26B A4B IT
-
gemma-4-31b-itДжемма 4 31B IT
-
gemini-flash-latestПоследняя версия Gemini Flash
-
gemini-flash-lite-latestНовейшая версия фонарика Gemini Flash-Lite
-
gemini-pro-latestПоследняя версия Gemini Pro
-
gemini-2.5-flash-liteНаша самая компактная и экономичная модель, предназначенная для масштабного использования.
-
gemini-2.5-flash-imageНаша собственная модель генерации изображений, оптимизированная для скорости, гибкости и контекстного понимания. Стоимость ввода и вывода текста такая же, как у 2,5-дюймовой версии Flash.
-
gemini-3-flash-previewНаша самая интеллектуальная модель, созданная для скорости, сочетает в себе передовые методы разведки с превосходными возможностями поиска и посадки на землю.
-
gemini-3.1-pro-previewНаша новейшая, передовая модель логического мышления с беспрецедентной глубиной и детализацией, а также мощными возможностями многомодального понимания и кодирования.
-
gemini-3.1-pro-preview-customtoolsGemini 3.1 Pro Preview оптимизирован для использования пользовательских инструментов.
-
gemini-3.1-flash-liteНаша наиболее экономичная модель, оптимизированная для выполнения больших объемов агентских задач, перевода и простой обработки данных.
-
gemini-3-pro-imageИзображение Gemini 3 Pro
-
nano-banana-pro-previewПредварительный просмотр изображения Gemini 3 Pro
-
gemini-3.1-flash-imageИзображение Gemini 3.1 Flash.
-
gemini-3.5-flashНаша наиболее интеллектуальная модель для достижения устойчиво высоких результатов в задачах, связанных с агентным программированием и кодированием.
-
gemini-3.6-flashНаша наиболее интеллектуальная модель для достижения устойчиво высоких результатов в задачах, связанных с агентным программированием и кодированием.
-
gemini-3.7-flashНаша наиболее интеллектуальная модель для достижения устойчиво высоких результатов в задачах, связанных с агентным программированием и кодированием.
-
lyria-3-clip-previewНаша модель генерации музыки с низкой задержкой оптимизирована для высококачественных аудиоклипов и точного контроля ритма.
-
lyria-3-pro-previewНаша передовая генеративная модель, способная обрабатывать целые композиции и обладающая глубоким пониманием композиции, оптимизирована для точного структурного контроля и сложных переходов между различными музыкальными стилями.
-
gemini-robotics-er-1.6-previewGemini Robotics-ER 1.6 Preview
-
gemini-robotics-er-2-previewПредварительный обзор Gemini Robotics Embodied Reasoning 2
агент AgentOption (необязательно)
Имя агента, использованного для генерации взаимодействия.
Обязательно, если параметр `model` не указан.
Возможные значения
-
deep-research-pro-preview-12-2025Агент по глубоким исследованиям компании Gemini
-
deep-research-preview-04-2026Агент по глубоким исследованиям компании Gemini
-
deep-research-max-preview-04-2026Gemini Deep Research Max Agent
-
antigravity-preview-05-2026Используйте управляемый агент Antigravity для выполнения многоэтапных задач, требующих логического мышления, работы с файлами и использования инструментов.
Входные данные для взаимодействия (общие для модели и агента).
Системная инструкция для взаимодействия.
Список объявлений инструментов, которые модель может вызывать во время взаимодействия.
Обеспечивает, чтобы сгенерированный ответ представлял собой объект JSON, соответствующий схеме JSON, указанной в этом поле.
Только ввод данных. Будет ли взаимодействие передаваться в потоковом режиме.
Только ввод. Следует ли сохранять ответ и запрос для последующего получения.
Только ввод данных. Следует ли запускать взаимодействие с моделью в фоновом режиме.
generation_config GenerationConfig (необязательно)
Конфигурация модели
Параметры конфигурации для взаимодействия модели.
Альтернатива `agent_config`. Применимо только при заданном `model`.
Поля
Максимальное количество токенов, которые можно включить в ответ.
Исходные данные используются при декодировании для обеспечения воспроизводимости.
speech_config SpeakerConfig или массив (SpeechConfig) (необязательно)
Дополнительно. Настройка речи и работы с несколькими говорящими.
Поля
Массив динамиков (SpeechConfig) (необязательно)
Индивидуальные настройки акустических систем.
Поля
Язык речи.
Имя выступающего должно совпадать с именем выступающего, указанным в задании.
Голос говорящего.
Список последовательностей символов, которые прекратят взаимодействие с выводом.
thinking_level ThinkingLevel (необязательно)
Уровень мыслительных токенов, которые должна генерировать модель.
Возможные значения
-
minimalПрактически никакого размышления.
-
lowНизкий уровень мышления.
-
mediumСредний уровень сложности мышления.
-
highВысокий уровень мыслительных способностей.
thinking_summaries ThinkingSummaries (необязательно)
Стоит ли включать в ответ краткое изложение мыслей?
Возможные значения
-
autoКраткие обзоры автоматического мышления.
-
noneНикаких кратких изложений мысли.
Конфигурация выбора инструмента.
Возможные значения:
-
autoАвтоматический выбор инструмента.
-
anyЛюбой выбор инструмента.
-
noneВыбор инструментов отсутствует.
-
validatedВыбор инструмента подтвержден.
transcription_config TranscriptionConfig (необязательно)
Необязательно. Настройки для распознавания речи (транскрипции). Если присутствует, функция автоматического распознавания речи (ASR) включена.
Поля
Необязательно. Список пользовательских лексических фраз, которые помогут модели распознавания речи сместить акцент в сторону распознавания конкретных терминов.
Необязательно. Коды языков BCP-47, указывающие на языки, присутствующие в аудиозаписи. Если поле опущено или пустое, по умолчанию используется автоматическое определение языка.
режим TranscriptionMode или перечисление (строка) (необязательно)
Параметры или перечисление режима дифференцированной транскрипции.
Возможные типы
SmartTranscriptionMode
Настройки для режима интеллектуальной транскрипции.
Описание отсутствует.
Всегда устанавливать режим "smart" .
Режим дословной транскрипции
Настройки для режима дословной транскрипции.
Необязательный параметр. Настраивает диаризацию говорящих. Поддерживаемые значения: "speaker".
Необязательный параметр. Укажите степень детализации временных меток, которые будут включены в выходные данные транскрипции. Поддерживаемые значения: "word". Если поле пустое, временные метки не генерируются.
Описание отсутствует.
Всегда устанавливайте значение "verbatim" .
video_config VideoConfig (необязательно)
Настройки для генерации видео.
Поля
Дополнительный режим работы для генерации видео. Если не указан, модель автоматически определяет соответствующий режим на основе предоставленной текстовой подсказки и входных данных.
Возможные значения:
-
text_to_videoСоздает видео исключительно на основе текстовой подсказки.
-
image_to_videoСоздает видео из одного или двух исходных изображений. Первое изображение определяет начальный кадр, а дополнительное второе изображение определяет конечный кадр.
-
reference_to_videoСоздает видео, используя исходные медиафайлы (такие как изображения, аудио или видео).
-
editИзменяет существующее входное видео.
-
extendРасширяет возможности существующего входного видео.
объект agent_config (необязательно)
Конфигурация агента
Настройки агента.
Альтернатива `generation_config`. Применимо только при заданном `agent`.
Возможные типы
Полиморфный дискриминатор: type
AntigravityAgentConfig
Настройки среды выполнения агента Antigravity. Обеспечивают управление средой выполнения агента и конфигурацией инструментов на стороне сервера.
Максимальное общее количество токенов для выполнения задания агентом.
Модель, используемая для рассуждений агента.
Описание отсутствует.
Всегда устанавливайте режим "antigravity" .
CodeMenderAgentConfig
Настройки агента CodeMender.
find_request FindRequest (необязательно)
Параметры для поиска уязвимостей.
Поля
Дополнительный контекст или пользовательские инструкции, предоставленные пользователем для проведения анализа уязвимостей.
Идентификатор конкретной уязвимости, подлежащей проверке. В основном используется в режиме ПРОВЕРКИ (VERIFY) для того, чтобы сосредоточить проверку агента на выполнении на одной конкретной уязвимости.
Режим работы поисковой сессии.
Возможные значения:
-
scanБыстрое сканирование с использованием только исходного классификатора.
-
verifyПроводит классификацию с последующим детальным исследованием.
массив source_files (FileContent) (необязательно)
Список исходных файлов, которые необходимо предоставить в качестве контекста для сканирования.
Поля
Содержимое файла, закодированное в UTF-8.
Относительный путь к файлу относительно корневого каталога проекта.
fix_request FixRequest (необязательно)
Параметры для устранения уязвимостей.
Поля
Дополнительный контекст или пользовательские инструкции, предоставленные пользователем для управления процессом создания патча.
Идентификатор конкретной уязвимости, подлежащей устранению. Этот идентификатор соответствует ранее обнаруженной уязвимости.
массив source_files (FileContent) (необязательно)
Список исходных файлов, предоставляющих контекст для устранения проблемы. Как правило, это файлы, содержащие выявленную уязвимость.
Поля
Содержимое файла, закодированное в UTF-8.
Относительный путь к файлу относительно корневого каталога проекта.
Название модели, используемой для агента CodeMender. Одна сессия CodeMender будет использовать только одну модель.
session_config SessionConfig (необязательно)
Дополнительные параметры конфигурации, специфичные для каждой сессии, позволяют переопределить поведение агента по умолчанию.
Поля
Максимальное количество раундов взаимодействия, которое агент может выполнить до истечения тайм-аута.
Параметр для группировки нескольких взаимодействий, относящихся к одной и той же сессии CodeMender.
Описание отсутствует.
Всегда устанавливайте значение "code-mender" .
DeepResearchAgentConfig
Настройки агента Deep Research.
Включает планирование с участием человека для агента Deep Research. Если установлено значение true, агент Deep Research предоставит план исследования в своем ответе. Затем агент продолжит работу только в том случае, если пользователь подтвердит план на следующем ходу.
Включает инструмент BigQuery для агента Deep Research.
thinking_summaries ThinkingSummaries (необязательно)
Стоит ли включать в ответ краткое изложение мыслей?
Возможные значения
-
autoКраткие обзоры автоматического мышления.
-
noneНикаких кратких изложений мысли.
Описание отсутствует.
Всегда устанавливайте значение "deep-research" .
Стоит ли включать визуализации в ответ.
Возможные значения:
-
offНе включайте визуализации.
-
autoАвтоматическое добавление визуализаций.
DynamicAgentConfig
Настройка для динамических агентов.
Описание отсутствует.
Всегда устанавливайте значение "dynamic" .
Конфигурация среды для взаимодействия. Может представлять собой объект, указывающий на удаленные источники среды, или строку, ссылающуюся на существующий идентификатор среды.
Метки с заданными пользователем метаданными для запроса.
Идентификатор предыдущего взаимодействия, если таковое имелось.
массив safety_settings (SafetySetting) (необязательно)
Настройки безопасности для взаимодействия.
Поля
Необязательный параметр. Способ блокировки контента. Если не указан, по умолчанию используется оценка вероятности.
Возможные значения:
-
severityМетод блокировки вреда использует как вероятностные оценки, так и оценки тяжести последствий.
-
probabilityМетод блокировки вреда использует показатель вероятности.
Обязательно. Пороговое значение для блокировки контента. Если вероятность причинения вреда превысит этот порог, контент будет заблокирован.
Возможные значения:
-
block_low_and_aboveБлокируйте контент с низкой или высокой вероятностью причинения вреда.
-
block_medium_and_aboveБлокируйте контент со средней или высокой вероятностью причинения вреда.
-
block_only_highБлокируйте контент с высокой вероятностью причинения вреда.
-
block_noneНе блокируйте никакой контент, независимо от вероятности его нанесения вреда.
-
offПолностью отключите защитный фильтр.
тип HarmCategory (необязательно)
Обязательно. Категория вреда, подлежащая блокировке.
Возможные значения
-
hate_speechКонтент, пропагандирующий насилие или разжигающий ненависть к отдельным лицам или группам на основе определенных признаков.
-
dangerous_contentКонтент, который пропагандирует, способствует или поощряет опасные действия.
-
harassmentОскорбительный, угрожающий контент, направленный на запугивание, мучение или высмеивание.
-
sexually_explicitКонтент, содержащий материалы сексуального характера.
-
civic_integrityУстарело: фильтр выборов больше не поддерживается. Категория причинения вреда — гражданская неприкосновенность.
-
image_hateИзображения, содержащие разжигающие ненависть высказывания.
-
image_dangerous_contentИзображения, содержащие опасный контент.
-
image_harassmentИзображения, содержащие элементы домогательств.
-
image_sexually_explicitИзображения, содержащие материалы сексуального характера.
-
jailbreakПодсказки, предназначенные для обхода защитных фильтров.
service_tier ServiceTier (необязательно)
Уровень обслуживания для данного взаимодействия.
Возможные значения
-
flexГибкий уровень обслуживания.
-
standardСтандартный уровень обслуживания.
-
priorityПриоритетный уровень обслуживания.
-
deferredОтложенный уровень обслуживания.
webhook_config WebhookConfig (необязательно)
Необязательно. Настройка веб-перехватчика для получения уведомлений по завершении взаимодействия.
Поля
Необязательно. Если задано, эти URI веб-перехватчиков будут использоваться для событий веб-перехватчиков вместо зарегистрированных веб-перехватчиков.
Необязательно. Метаданные пользователя, которые будут возвращаться веб-хукам при каждом срабатывании события.
Ответ
Возвращает ресурс " Взаимодействие" .
Простая просьба
Пример ответа
{ "created": "2025-11-26T12:25:15Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "Hello! I'm functioning perfectly and ready to assist you.\n\nHow are you doing today?" } ] } ], "updated": "2025-11-26T12:25:15Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 7 } ], "total_cached_tokens": 0, "total_input_tokens": 7, "total_output_tokens": 20, "total_thought_tokens": 22, "total_tokens": 49, "total_tool_use_tokens": 0 } }
Многооборотный
Пример ответа
{ "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "The capital of France is Paris." } ] } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 50 } ], "total_cached_tokens": 0, "total_input_tokens": 50, "total_output_tokens": 10, "total_thought_tokens": 0, "total_tokens": 60, "total_tool_use_tokens": 0 } }
Ввод изображения
Пример ответа
{ "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "A white humanoid robot with glowing blue eyes stands holding a red skateboard." } ] } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 10 }, { "modality": "image", "tokens": 258 } ], "total_cached_tokens": 0, "total_input_tokens": 268, "total_output_tokens": 20, "total_thought_tokens": 0, "total_tokens": 288, "total_tool_use_tokens": 0 } }
Вызов функции
Пример ответа
{ "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "requires_action", "steps": [ { "name": "get_weather", "type": "function_call", "arguments": { "location": "Boston, MA" }, "id": "gth23981" } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 100 } ], "total_cached_tokens": 0, "total_input_tokens": 100, "total_output_tokens": 25, "total_thought_tokens": 0, "total_tokens": 125, "total_tool_use_tokens": 50 } }
Глубокое исследование
Пример ответа
{ "agent": "deep-research-pro-preview-12-2025", "created": "2025-11-26T12:22:47Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "Here is a comprehensive research report on the current state of cancer research..." } ] } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 20 } ], "total_cached_tokens": 0, "total_input_tokens": 20, "total_output_tokens": 1000, "total_thought_tokens": 500, "total_tokens": 1520, "total_tool_use_tokens": 0 } }
Антигравитационный агент
Пример ответа
{ "agent": "antigravity-preview-05-2026", "created": "2025-11-26T12:22:47Z", "environment_id": "env_abc123", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "I've summarized the top 5 Hacker News stories and saved the results to /workspace/summary.md." } ] } ], "updated": "2025-11-26T12:22:47Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 50 } ], "total_cached_tokens": 0, "total_input_tokens": 50, "total_output_tokens": 500, "total_thought_tokens": 200, "total_tokens": 750, "total_tool_use_tokens": 0 } }
Среда повторного использования
Пример ответа
{ "agent": "antigravity-preview-05-2026", "created": "2025-11-26T12:23:00Z", "environment_id": "env_abc123", "id": "v1_Chd2ZTJhYmNkZWZnaGlqa2xtbm9wcXJzdHV2d3h5ejAxMjM0NTY3ODkwMTIzNDU2Nzg", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "I've updated /workspace/hello.py to accept a name argument and greet the user." } ] } ], "updated": "2025-11-26T12:23:00Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 80 } ], "total_cached_tokens": 0, "total_input_tokens": 80, "total_output_tokens": 200, "total_thought_tokens": 100, "total_tokens": 380, "total_tool_use_tokens": 0 } }
С использованием источников.
Агент по работе с клиентами
Отмена взаимодействия
Отменяет взаимодействие по идентификатору. Это относится только к фоновым взаимодействиям, которые все еще выполняются.
Путь / Параметры запроса
Какую версию API использовать?
Уникальный идентификатор взаимодействия, которое необходимо отменить.
Ответ
Возвращает ресурс " Взаимодействие" .
Отменить взаимодействие
Пример ответа
{ "agent": "deep-research-pro-preview-12-2025", "created": "2026-06-22T04:55:47Z", "id": "v1_ChdVc0E0YXJTYk1zYlV6N0lQcXRXVG1BYxIXVXNBNGFyU2JNc2JVejdJUHF0V1RtQWM", "status": "cancelled", "steps": [ { "type": "user_input", "content": [ { "type": "text", "text": "Research the history of the Google TPUs with a focus on 2025 specs." } ] } ], "updated": "2026-06-22T04:55:47Z" }
Получение информации о взаимодействии
Получает полную информацию об одном взаимодействии на основе его `Interaction.id`.
Путь / Параметры запроса
Какую версию API использовать?
Уникальный идентификатор взаимодействия, который необходимо получить.
Необязательный параметр. Если задан, возобновляет поток взаимодействия со следующего фрагмента после события, отмеченного идентификатором события. Может использоваться только в том случае, если `stream` имеет значение true.
Если установить значение true, сгенерированный контент будет передаваться потоком инкрементально.
Значение по умолчанию: False
Ответ
Возвращает ресурс " Взаимодействие" .
Получить взаимодействие
Пример ответа
{ "created": "2025-11-26T12:25:15Z", "id": "v1_ChdPU0F4YWFtNkFwS2kxZThQZ05lbXdROBIXT1NBeGFhbTZBcEtpMWU4UGdOZW13UTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "I'm doing great, thank you for asking! How can I help you today?" } ] } ], "updated": "2025-11-26T12:25:15Z" }
Удаление взаимодействия
Удаляет взаимодействие по идентификатору.
Путь / Параметры запроса
Какую версию API использовать?
Уникальный идентификатор взаимодействия, которое необходимо удалить.
Ответ
В случае успеха ответ будет пустым.
Удалить
Ресурсы
Взаимодействие
Ресурс "Взаимодействие".
Поля
агент AgentOption (необязательно)
Имя агента, использованного для генерации взаимодействия.
Возможные значения
-
deep-research-pro-preview-12-2025Агент по глубоким исследованиям компании Gemini
-
deep-research-preview-04-2026Агент по глубоким исследованиям компании Gemini
-
deep-research-max-preview-04-2026Gemini Deep Research Max Agent
-
antigravity-preview-05-2026Используйте управляемый агент Antigravity для выполнения многоэтапных задач, требующих логического мышления, работы с файлами и использования инструментов.
объект agent_config (необязательно)
Параметры конфигурации для взаимодействия с агентом.
Возможные типы
Полиморфный дискриминатор: type
AntigravityAgentConfig
Настройки среды выполнения агента Antigravity. Обеспечивают управление средой выполнения агента и конфигурацией инструментов на стороне сервера.
Максимальное общее количество токенов для выполнения задания агентом.
Модель, используемая для рассуждений агента.
Описание отсутствует.
Всегда устанавливайте режим "antigravity" .
CodeMenderAgentConfig
Настройки агента CodeMender.
find_request FindRequest (необязательно)
Параметры для поиска уязвимостей.
Поля
Дополнительный контекст или пользовательские инструкции, предоставленные пользователем для проведения анализа уязвимостей.
Идентификатор конкретной уязвимости, подлежащей проверке. В основном используется в режиме ПРОВЕРКИ (VERIFY) для того, чтобы сосредоточить проверку агента на выполнении на одной конкретной уязвимости.
Режим работы поисковой сессии.
Возможные значения:
-
scanБыстрое сканирование с использованием только исходного классификатора.
-
verifyПроводит классификацию с последующим детальным исследованием.
массив source_files (FileContent) (необязательно)
Список исходных файлов, которые необходимо предоставить в качестве контекста для сканирования.
Поля
Содержимое файла, закодированное в UTF-8.
Относительный путь к файлу относительно корневого каталога проекта.
fix_request FixRequest (необязательно)
Параметры для устранения уязвимостей.
Поля
Дополнительный контекст или пользовательские инструкции, предоставленные пользователем для управления процессом создания патча.
Идентификатор конкретной уязвимости, подлежащей устранению. Этот идентификатор соответствует ранее обнаруженной уязвимости.
массив source_files (FileContent) (необязательно)
Список исходных файлов, предоставляющих контекст для устранения проблемы. Как правило, это файлы, содержащие выявленную уязвимость.
Поля
Содержимое файла, закодированное в UTF-8.
Относительный путь к файлу относительно корневого каталога проекта.
Название модели, используемой для агента CodeMender. Одна сессия CodeMender будет использовать только одну модель.
session_config SessionConfig (необязательно)
Дополнительные параметры конфигурации, специфичные для каждой сессии, позволяют переопределить поведение агента по умолчанию.
Поля
Максимальное количество раундов взаимодействия, которое агент может выполнить до истечения тайм-аута.
Параметр для группировки нескольких взаимодействий, относящихся к одной и той же сессии CodeMender.
Описание отсутствует.
Всегда устанавливайте значение "code-mender" .
DeepResearchAgentConfig
Настройки агента Deep Research.
Включает планирование с участием человека для агента Deep Research. Если установлено значение true, агент Deep Research предоставит план исследования в своем ответе. Затем агент продолжит работу только в том случае, если пользователь подтвердит план на следующем ходу.
Включает инструмент BigQuery для агента Deep Research.
thinking_summaries ThinkingSummaries (необязательно)
Стоит ли включать в ответ краткое изложение мыслей?
Возможные значения
-
autoКраткие обзоры автоматического мышления.
-
noneНикаких кратких изложений мысли.
Описание отсутствует.
Всегда устанавливайте значение "deep-research" .
Стоит ли включать визуализации в ответ.
Возможные значения:
-
offНе включайте визуализации.
-
autoАвтоматическое добавление визуализаций.
DynamicAgentConfig
Настройка для динамических агентов.
Описание отсутствует.
Всегда устанавливайте значение "dynamic" .
Только вывод. Время создания ответа в формате ISO 8601 (ГГГГ-ММ-ДДЧч:мм:ссЗ).
Конфигурация среды для взаимодействия. Может представлять собой объект, указывающий на удаленные источники среды, или строку, ссылающуюся на существующий идентификатор среды.
Только для вывода. Идентификатор среды для взаимодействия. Заполняется только в том случае, если в запросе задана конфигурация среды.
массив ошибок (Ошибка) (необязательно)
Только вывод. Диагностические ошибки / ошибки платформы, зафиксированные во время взаимодействия.
Поля
URI, определяющий тип ошибки.
Удобочитаемое сообщение об ошибке.
Обязательно. Только для вывода. Уникальный идентификатор завершения взаимодействия.
По умолчанию:
Входные данные для взаимодействия.
Метки с заданными пользователем метаданными для запроса.
модель ModelOption (необязательно)
Название модели, использованной для генерации взаимодействия.
Возможные значения
-
gemini-2.5-flashНаша первая гибридная модель рассуждений, поддерживающая контекстное окно в 1 миллион токенов и имеющая бюджеты мышления.
-
gemini-2.5-proНаша передовая многоцелевая модель, превосходно справляющаяся с задачами программирования и сложным логическим мышлением.
-
gemma-4-26b-a4b-itДжемма 4 26B A4B IT
-
gemma-4-31b-itДжемма 4 31B IT
-
gemini-flash-latestПоследняя версия Gemini Flash
-
gemini-flash-lite-latestНовейшая версия фонарика Gemini Flash-Lite
-
gemini-pro-latestПоследняя версия Gemini Pro
-
gemini-2.5-flash-liteНаша самая компактная и экономичная модель, предназначенная для масштабного использования.
-
gemini-2.5-flash-imageНаша собственная модель генерации изображений, оптимизированная для скорости, гибкости и контекстного понимания. Стоимость ввода и вывода текста такая же, как у 2,5-дюймовой версии Flash.
-
gemini-3-flash-previewНаша самая интеллектуальная модель, созданная для скорости, сочетает в себе передовые методы разведки с превосходными возможностями поиска и посадки на землю.
-
gemini-3.1-pro-previewНаша новейшая, передовая модель логического мышления с беспрецедентной глубиной и детализацией, а также мощными возможностями многомодального понимания и кодирования.
-
gemini-3.1-pro-preview-customtoolsGemini 3.1 Pro Preview оптимизирован для использования пользовательских инструментов.
-
gemini-3.1-flash-liteНаша наиболее экономичная модель, оптимизированная для выполнения больших объемов агентских задач, перевода и простой обработки данных.
-
gemini-3-pro-imageИзображение Gemini 3 Pro
-
nano-banana-pro-previewПредварительный просмотр изображения Gemini 3 Pro
-
gemini-3.1-flash-imageИзображение Gemini 3.1 Flash.
-
gemini-3.5-flashНаша наиболее интеллектуальная модель для достижения устойчиво высоких результатов в задачах, связанных с агентным программированием и кодированием.
-
gemini-3.6-flashНаша наиболее интеллектуальная модель для достижения устойчиво высоких результатов в задачах, связанных с агентным программированием и кодированием.
-
gemini-3.7-flashНаша наиболее интеллектуальная модель для достижения устойчиво высоких результатов в задачах, связанных с агентным программированием и кодированием.
-
lyria-3-clip-previewНаша модель генерации музыки с низкой задержкой оптимизирована для высококачественных аудиоклипов и точного контроля ритма.
-
lyria-3-pro-previewНаша передовая генеративная модель, способная обрабатывать целые композиции и обладающая глубоким пониманием композиции, оптимизирована для точного структурного контроля и сложных переходов между различными музыкальными стилями.
-
gemini-robotics-er-1.6-previewGemini Robotics-ER 1.6 Preview
-
gemini-robotics-er-2-previewПредварительный обзор Gemini Robotics Embodied Reasoning 2
Идентификатор предыдущего взаимодействия, если таковое имелось.
Обеспечивает, чтобы сгенерированный ответ представлял собой объект JSON, соответствующий схеме JSON, указанной в этом поле.
массив safety_settings (SafetySetting) (необязательно)
Настройки безопасности для взаимодействия.
Поля
Необязательный параметр. Способ блокировки контента. Если не указан, по умолчанию используется оценка вероятности.
Возможные значения:
-
severityМетод блокировки вреда использует как вероятностные оценки, так и оценки тяжести последствий.
-
probabilityМетод блокировки вреда использует показатель вероятности.
Обязательно. Пороговое значение для блокировки контента. Если вероятность причинения вреда превысит этот порог, контент будет заблокирован.
Возможные значения:
-
block_low_and_aboveБлокируйте контент с низкой или высокой вероятностью причинения вреда.
-
block_medium_and_aboveБлокируйте контент со средней или высокой вероятностью причинения вреда.
-
block_only_highБлокируйте контент с высокой вероятностью причинения вреда.
-
block_noneНе блокируйте никакой контент, независимо от вероятности его нанесения вреда.
-
offПолностью отключите защитный фильтр.
тип HarmCategory (необязательно)
Обязательно. Категория вреда, подлежащая блокировке.
Возможные значения
-
hate_speechКонтент, пропагандирующий насилие или разжигающий ненависть к отдельным лицам или группам на основе определенных признаков.
-
dangerous_contentКонтент, который пропагандирует, способствует или поощряет опасные действия.
-
harassmentОскорбительный, угрожающий контент, направленный на запугивание, мучение или высмеивание.
-
sexually_explicitКонтент, содержащий материалы сексуального характера.
-
civic_integrityУстарело: фильтр выборов больше не поддерживается. Категория причинения вреда — гражданская неприкосновенность.
-
image_hateИзображения, содержащие разжигающие ненависть высказывания.
-
image_dangerous_contentИзображения, содержащие опасный контент.
-
image_harassmentИзображения, содержащие элементы домогательств.
-
image_sexually_explicitИзображения, содержащие материалы сексуального характера.
-
jailbreakПодсказки, предназначенные для обхода защитных фильтров.
service_tier ServiceTier (необязательно)
Уровень обслуживания для данного взаимодействия.
Возможные значения
-
flexГибкий уровень обслуживания.
-
standardСтандартный уровень обслуживания.
-
priorityПриоритетный уровень обслуживания.
-
deferredОтложенный уровень обслуживания.
Обязательный параметр. Только вывод. Статус взаимодействия.
Возможные значения:
-
in_progressВзаимодействие продолжается.
-
requires_actionДля взаимодействия требуется действие/ввод данных от пользователя.
-
completedВзаимодействие завершено.
-
failedВзаимодействие не удалось.
-
cancelledВстреча была отменена.
-
incompleteВзаимодействие завершено, но результаты неполные (например, достигнуто значение max_tokens).
-
budget_exceededВзаимодействие было прервано из-за превышения лимита токенов.
-
queuedВзаимодействие поставлено в очередь и ожидает обработки.
Только вывод. Этапы взаимодействия, если они включены в ответ.
Системная инструкция для взаимодействия.
Список объявлений инструментов, которые модель может вызывать во время взаимодействия.
Только вывод. Время последнего обновления ответа в формате ISO 8601 (ГГГГ-ММ-ДДТч:мм:ссЗ).
Использование (необязательно )
Только вывод. Статистика использования токенов в запросе на взаимодействие.
Поля
массив cached_tokens_by_modality (ModalityTokens) (необязательно)
Анализ использования кэшированных токенов по способам доступа.
Поля
модальность ResponseModality (необязательно)
Способ отображения количества токенов.
Возможные значения
-
textУказывает, что модель должна возвращать текст.
-
imageУказывает, что модель должна возвращать изображения.
-
audioУказывает, что модель должна возвращать аудиоданные.
-
videoУказывает, что модель должна возвращать видео.
-
documentУказывает, что модель должна возвращать документы.
Количество токенов для данного режима.
массив grounding_tool_count (GroundingToolCount) (необязательно)
Количество инструментов для заземления.
Поля
Количество заземляющих инструментов подсчитывается.
Тип заземляющего инструмента, связанный с подсчетом.
Возможные значения:
-
google_searchИнтеграция веб-поиска Google и поиска изображений, а также интеграция веб-поиска с корпоративными приложениями.
-
google_mapsОпределить местоположение с помощью Google Maps.
-
retrievalИспользование данных клиента, например, VertexAISearch.
input_tokens_by_modality array (ModalityTokens) (optional)
Анализ использования входных токенов в зависимости от модальности ввода.
Поля
модальность ResponseModality (необязательно)
Способ отображения количества токенов.
Возможные значения
-
textУказывает, что модель должна возвращать текст.
-
imageУказывает, что модель должна возвращать изображения.
-
audioУказывает, что модель должна возвращать аудиоданные.
-
videoУказывает, что модель должна возвращать видео.
-
documentУказывает, что модель должна возвращать документы.
Количество токенов для данного режима.
output_tokens_by_modality array (ModalityTokens) (optional)
Анализ использования выходных токенов по видам модальностей.
Поля
модальность ResponseModality (необязательно)
Способ отображения количества токенов.
Возможные значения
-
textУказывает, что модель должна возвращать текст.
-
imageУказывает, что модель должна возвращать изображения.
-
audioУказывает, что модель должна возвращать аудиоданные.
-
videoУказывает, что модель должна возвращать видео.
-
documentУказывает, что модель должна возвращать документы.
Количество токенов для данного режима.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
Анализ использования токенов инструментов в зависимости от модальности.
Поля
модальность ResponseModality (необязательно)
Способ отображения количества токенов.
Возможные значения
-
textУказывает, что модель должна возвращать текст.
-
imageУказывает, что модель должна возвращать изображения.
-
audioУказывает, что модель должна возвращать аудиоданные.
-
videoУказывает, что модель должна возвращать видео.
-
documentУказывает, что модель должна возвращать документы.
Количество токенов для данного режима.
Количество токенов в кэшированной части запроса (кэшированное содержимое).
Количество токенов в подсказке (контексте).
Общее количество токенов во всех сгенерированных ответах.
Количество токенов мыслей для моделей мышления.
Общее количество токенов для запроса на взаимодействие (запрос + ответы + другие внутренние токены).
Количество токенов, присутствующих в подсказках использования инструмента.
webhook_config WebhookConfig (необязательно)
Необязательно. Настройка веб-перехватчика для получения уведомлений по завершении взаимодействия.
Поля
Необязательно. Если задано, эти URI веб-перехватчиков будут использоваться для событий веб-перехватчиков вместо зарегистрированных веб-перехватчиков.
Необязательно. Метаданные пользователя, которые будут возвращаться веб-хукам при каждом срабатывании события.
Примеры
Пример
{ "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3.6-flash", "object": "interaction", "status": "completed", "steps": [ { "type": "model_output", "content": [ { "type": "text", "text": "Hello! I'm doing well, functioning as expected. Thank you for asking! How are you doing today?" } ] } ], "updated": "2025-12-04T15:01:45Z", "usage": { "input_tokens_by_modality": [ { "modality": "text", "tokens": 7 } ], "total_cached_tokens": 0, "total_input_tokens": 7, "total_output_tokens": 23, "total_thought_tokens": 49, "total_tokens": 79, "total_tool_use_tokens": 0 } }
Модели данных
Содержание
Содержание ответа.
Возможные типы
Аудиоконтент
Блок аудиоконтента.
Количество аудиоканалов.
Аудиоконтент.
MIME-тип аудиофайла.
Возможные значения:
-
audio/wavаудиоформат WAV
-
audio/mp3аудиоформат MP3
-
audio/aiffаудиоформат AIFF
-
audio/aacаудиоформат AAC
-
audio/oggАудиоформат OGG
-
audio/flacаудиоформат FLAC
-
audio/mpegаудиоформат MPEG
-
audio/m4aаудиоформат M4A
-
audio/l16аудиоформат L16
-
audio/opusАудиоформат OPUS
-
audio/alawАудиоформат ALAW
-
audio/mulawАудиоформат MULAW
Частота дискретизации аудиосигнала.
Описание отсутствует.
Всегда устанавливайте значение "audio" .
URI аудиофайла.
Содержимое документа
Блок содержимого документа.
Содержание документа.
MIME-тип документа.
Возможные значения:
-
application/pdfPDF-документ
-
text/csvформат документа CSV
Описание отсутствует.
Всегда устанавливайте значение "document" .
URI документа.
ImageContent
Блок с графическим содержимым.
Содержание изображения.
MIME-тип изображения.
Возможные значения:
-
image/pngформат изображения PNG
-
image/jpegформат изображения JPEG
-
image/webpформат изображений WebP
-
image/heicформат изображения HEIC
-
image/heifформат изображения HEIF
-
image/gifформат изображения GIF
-
image/bmpформат изображения BMP
-
image/tiffформат изображения TIFF
разрешение MediaResolution (необязательно)
Разрешение средств массовой информации.
Возможные значения
-
lowНизкое разрешение.
-
mediumСреднее разрешение.
-
highВысокое разрешение.
-
ultra_highСверхвысокое разрешение.
Описание отсутствует.
Всегда устанавливайте значение "image" .
URI изображения.
Текстовое содержимое
Блок текстового содержимого.
массив аннотаций (Аннотация) (необязательно)
Информация об источниках для контента, сгенерированного моделью.
Возможные типы
FileCitation
Аннотация к файлу.
Пользователь предоставил метаданные о полученном контексте.
URI файла.
Конец выделенного сегмента, без учета каких-либо ограничений.
Название файла.
В случае цитирования изображений, пожалуйста, укажите идентификатор медиафайла (Media ID), если таковой имеется.
Номер страницы цитируемого документа, если таковой имеется.
Источник указан для части текста.
Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.
Описание отсутствует.
Всегда устанавливайте значение "file_citation" .
PlaceCitation
Аннотация к географическому местоположению.
Конец выделенного сегмента, без учета каких-либо ограничений.
Название места.
Идентификатор места в формате `places/{place_id}`.
массив review_snippets (ReviewSnippet) (необязательно)
Фрагменты отзывов, используемые для генерации ответов об особенностях того или иного места в Google Maps.
Поля
Идентификатор фрагмента отзыва.
Заголовок рецензии.
Ссылка, соответствующая отзыву пользователя на Google Maps.
Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.
Описание отсутствует.
Всегда устанавливайте значение "place_citation" .
URI-ссылка на это место.
URLCitation
Аннотация URL-адреса.
Конец выделенного сегмента, без учета каких-либо ограничений.
Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.
Заголовок URL-адреса.
Описание отсутствует.
Всегда устанавливайте значение "url_citation" .
URL.
WordInfo
Аннотации автоматического распознавания речи на уровне слов для вывода транскрипции. Содержат текст слова, необязательное время и необязательное указание говорящего.
Конец выделенного сегмента, без учета каких-либо ограничений.
Смещение в конце слова относительно начала аудиозаписи. Присутствует, если timestamp_granularities содержит "word".
Необязательно. Метка говорящего для этого слова (например, "spk_1", "spk_2"). Присутствует, если в TranscriptionConfig установлен параметр diarization_mode.
Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.
Начальное смещение слова относительно начала аудиозаписи. Присутствует, если timestamp_granularities содержит "word".
Записанное слово.
Описание отсутствует.
Всегда устанавливайте значение "word_info" .
Обязательно. Текстовое содержимое.
Описание отсутствует.
Всегда устанавливайте значение "text" .
Видеоконтент
A video content block.
The video content.
The mime type of the video.
Возможные значения:
-
video/mp4MP4 video format
-
video/mpegMPEG video format
-
video/mpgMPG video format
-
video/movMOV video format
-
video/aviAVI video format
-
video/x-flvFLV video format
-
video/webmWebM video format
-
video/wmvWMV video format
-
video/3gpp3GPP video format
A user-defined name for this content block. Can be referenced by the model in the final response.
processing MediaProcessing or enum (string) (optional)
How the model processes this video for understanding.
resolution MediaResolution (optional)
The resolution of the media.
Возможные значения
-
lowНизкое разрешение.
-
mediumMedium resolution.
-
highВысокое разрешение.
-
ultra_highUltra high resolution.
Описание отсутствует.
Always set to "video" .
The URI of the video.
Примеры
Аудио
{ "type": "audio", "data": "BASE64_ENCODED_AUDIO", "mime_type": "audio/wav" }
Документ
{ "type": "document", "data": "BASE64_ENCODED_DOCUMENT", "mime_type": "application/pdf" }
Изображение
{ "type": "image", "data": "BASE64_ENCODED_IMAGE", "mime_type": "image/png" }
Текст
{ "type": "text", "text": "Hello, how are you?" }
Видео
{ "type": "video", "uri": "https://www.youtube.com/watch?v=9hE5-98ZeCg" }
Инструмент
Инструмент, который может быть использован моделью.
Возможные типы
Выполнение кода
Инструмент, который может использоваться моделью для выполнения кода.
Описание отсутствует.
Always set to "code_execution" .
ComputerUse
A tool that can be used by the model to interact with the computer.
Optional. Disabled safety policies for computer use.
Возможные значения:
-
financial_transactionsSafety policy for financial transactions.
-
sensitive_data_modificationSafety policy for sensitive data modification.
-
communication_toolSafety policy for communication tools (eg Gmail, Chat, Meet).
-
account_creationSafety policy for account creation.
-
data_modificationSafety policy for data modification.
-
user_consent_managementSafety policy for user consent management.
-
legal_terms_and_agreementsSafety policy for legal terms and agreements.
Whether enable the prompt injection detection check on computer-use request.
The environment being operated.
Возможные значения:
-
browserOperates in a web browser.
-
mobileOperates in a mobile environment.
-
desktopOperates in a desktop environment.
The list of predefined functions that are excluded from the model call.
Описание отсутствует.
Always set to "computer_use" .
FileSearch
A tool that can be used by the model to search files.
The file search store names to search.
Metadata filter to apply to the semantic retrieval documents and chunks.
The number of semantic retrieval chunks to retrieve.
Описание отсутствует.
Always set to "file_search" .
Функция
Инструмент, который может быть использован моделью.
Описание функции.
Название функции.
JSON-схема для параметров функции.
Описание отсутствует.
Always set to "function" .
Google Карты
A tool that can be used by the model to call Google Maps.
Whether to return a widget context token in the tool call result of the response.
The latitude of the user's location.
The longitude of the user's location.
Описание отсутствует.
Always set to "google_maps" .
GoogleПоиск
Инструмент, который модель может использовать для поиска в Google.
Типы поиска, которые необходимо включить.
Возможные значения:
-
web_searchВключение этого поля активирует веб-поиск. Возвращаются только текстовые результаты.
-
image_searchУстановив это поле, можно включить поиск изображений. Возвращаются байты изображения.
-
enterprise_web_searchВключение корпоративного веб-поиска.
Описание отсутствует.
Always set to "google_search" .
McpServer
MCPServer — это сервер, который может быть вызван моделью для выполнения действий.
allowed_tools array (AllowedTools) (optional)
Разрешенные инструменты.
Поля
Способ выбора инструмента.
Возможные значения:
-
autoАвтоматический выбор инструмента.
-
anyЛюбой выбор инструмента.
-
noneВыбор инструментов отсутствует.
-
validatedВыбор инструмента подтвержден.
Названия разрешенных инструментов.
Необязательно: поля для заголовков аутентификации, тайм-аутов и т. д., если необходимо.
Имя MCPServer.
Описание отсутствует.
Always set to "mcp_server" .
Полный URL-адрес конечной точки MCPServer. Пример: "https://api.example.com/mcp"
Извлечение
A tool that can be used by the model to retrieve files.
exa_ai_search_config ExaAISearchConfig (optional)
Used to specify configuration for ExaAISearch.
Поля
Required. The API key for ExaAiSearch.
Optional. This field can be used to pass any parameter from the Exa.ai Search API.
parallel_ai_search_config ParallelAISearchConfig (optional)
Used to specify configuration for ParallelAISearch.
Поля
Optional. The API key for ParallelAiSearch.
Optional. Custom configs for ParallelAiSearch.
rag_store_config RagStoreConfig (optional)
Used to specify configuration for RagStore.
Поля
rag_resources array (RagResource) (optional)
Optional. The representation of the rag source.
Поля
Optional. RagCorpora resource name.
Optional. rag_file_id. The files should be in the same rag_corpus set in rag_corpus field.
rag_retrieval_config RagRetrievalConfig (optional)
Optional. The retrieval config for the Rag query.
Поля
filter Filter (optional)
Optional. Config for filters.
Поля
Optional. String for metadata filtering.
Optional. Only returns contexts with vector distance smaller than the threshold.
Optional. Only returns contexts with vector similarity larger than the threshold.
hybrid_search HybridSearch (optional)
Optional. Config for Hybrid Search.
Поля
Optional. Alpha value controls the weight between dense and sparse vector search results.
ranking Ranking (optional)
Optional. Config for ranking and reranking.
Optional. The number of contexts to retrieve.
The types of file retrieval to enable.
Возможные значения:
-
rag_store -
exa_ai_search -
parallel_ai_search
Описание отсутствует.
Always set to "retrieval" .
UrlContext
Инструмент, который может использоваться моделью для получения контекста URL-адреса.
Описание отсутствует.
Always set to "url_context" .
Примеры
Выполнение кода
ComputerUse
FileSearch
Функция
Google Карты
GoogleПоиск
McpServer
Извлечение
No examples available for this type.
UrlContext
InteractionSseEvent
Возможные типы
Polymorphic discriminator: event_type
ErrorEvent
error Error (optional)
Описание отсутствует.
Поля
A URI that identifies the error type.
Удобочитаемое сообщение об ошибке.
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "error" .
InteractionCompletedEvent
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "interaction.completed" .
interaction InteractionSseEventInteraction (required)
Partial completed interaction resource emitted at the end of the stream.
Поля
The agent to interact with.
Output only. The time at which the response was created in ISO 8601 format.
Required. Output only. A unique identifier for the interaction completion.
The model that will complete your prompt.
Output only. The resource type.
service_tier ServiceTier (optional)
The service tier for the interaction.
Возможные значения
-
flexFlex service tier.
-
standardStandard service tier.
-
priorityPriority service tier.
-
deferredDeferred service tier.
Required. Output only. The status of the interaction.
Возможные значения:
-
in_progressThe interaction is in progress.
-
requires_actionThe interaction requires action/input from the user.
-
completedThe interaction is completed.
-
failedThe interaction failed.
-
cancelledThe interaction was cancelled.
-
incompleteThe interaction is completed, but contains incomplete results (eg hitting max_tokens).
Output only. The steps that make up the interaction, if included in this event.
Output only. The time at which the response was last updated in ISO 8601 format.
usage Usage (optional)
Output only. Statistics on the interaction request's token usage.
Поля
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Поля
The number of grounding tool counts.
The grounding tool type associated with the count.
Возможные значения:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
-
retrievalGrounding with customer's data, for example, VertexAISearch.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
InteractionCreatedEvent
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "interaction.created" .
interaction InteractionSseEventInteraction (required)
Partial interaction resource emitted when the stream is created.
Поля
The agent to interact with.
Output only. The time at which the response was created in ISO 8601 format.
Required. Output only. A unique identifier for the interaction completion.
The model that will complete your prompt.
Output only. The resource type.
service_tier ServiceTier (optional)
The service tier for the interaction.
Возможные значения
-
flexFlex service tier.
-
standardStandard service tier.
-
priorityPriority service tier.
-
deferredDeferred service tier.
Required. Output only. The status of the interaction.
Возможные значения:
-
in_progressThe interaction is in progress.
-
requires_actionThe interaction requires action/input from the user.
-
completedThe interaction is completed.
-
failedThe interaction failed.
-
cancelledThe interaction was cancelled.
-
incompleteThe interaction is completed, but contains incomplete results (eg hitting max_tokens).
Output only. The steps that make up the interaction, if included in this event.
Output only. The time at which the response was last updated in ISO 8601 format.
usage Usage (optional)
Output only. Statistics on the interaction request's token usage.
Поля
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Поля
The number of grounding tool counts.
The grounding tool type associated with the count.
Возможные значения:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
-
retrievalGrounding with customer's data, for example, VertexAISearch.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
InteractionStatusUpdate
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "interaction.status_update" .
Описание отсутствует.
Описание отсутствует.
Возможные значения:
-
in_progressThe interaction is in progress.
-
requires_actionThe interaction requires action/input from the user.
-
completedThe interaction is completed.
-
failedThe interaction failed.
-
cancelledThe interaction was cancelled.
-
incompleteThe interaction is completed, but contains incomplete results (eg hitting max_tokens).
-
budget_exceededThe interaction was halted because the token budget was exceeded.
-
queuedThe interaction is queued, waiting for processing (eg waiting for off-peak capacity).
StepDelta
delta StepDeltaData (required)
Описание отсутствует.
Возможные типы
ArgumentsDelta
Описание отсутствует.
Описание отсутствует.
Always set to "arguments_delta" .
AudioDelta
The number of audio channels.
Описание отсутствует.
Описание отсутствует.
Возможные значения:
-
audio/wavаудиоформат WAV
-
audio/mp3MP3 audio format
-
audio/aiffAIFF audio format
-
audio/aacAAC audio format
-
audio/oggOGG audio format
-
audio/flacFLAC audio format
-
audio/mpegMPEG audio format
-
audio/m4aM4A audio format
-
audio/l16L16 audio format
-
audio/opusOPUS audio format
-
audio/alawALAW audio format
-
audio/mulawMULAW audio format
The sample rate of the audio.
Описание отсутствует.
Always set to "audio" .
Описание отсутствует.
CodeExecutionCallDelta
arguments CodeExecutionCallArguments (required)
Описание отсутствует.
Поля
Код, который необходимо выполнить.
Programming language of the `code`.
Возможные значения:
-
pythonPython >= 3.10, with numpy and simpy available.
A signature hash for backend validation.
Описание отсутствует.
Always set to "code_execution_call" .
CodeExecutionResultDelta
Описание отсутствует.
Описание отсутствует.
A signature hash for backend validation.
Описание отсутствует.
Always set to "code_execution_result" .
DocumentDelta
Описание отсутствует.
Описание отсутствует.
Возможные значения:
-
application/pdfPDF document format
-
text/csvCSV document format
Описание отсутствует.
Always set to "document" .
Описание отсутствует.
FileSearchCallDelta
A signature hash for backend validation.
Описание отсутствует.
Always set to "file_search_call" .
FileSearchResultDelta
result array (FileSearchResult) (required)
Описание отсутствует.
A signature hash for backend validation.
Описание отсутствует.
Always set to "file_search_result" .
FunctionResultDelta
Required. ID to match the ID from the function call block.
Описание отсутствует.
Описание отсутствует.
Описание отсутствует.
Описание отсутствует.
Always set to "function_result" .
GoogleMapsCallDelta
arguments GoogleMapsCallArguments (optional)
The arguments to pass to the Google Maps tool.
Поля
The queries to be executed.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_maps_call" .
GoogleMapsResultDelta
result array (GoogleMapsResult) (optional)
The results of the Google Maps.
Поля
places array (Places) (optional)
The places that were found.
Поля
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Поля
The ID of the review snippet.
Заголовок рецензии.
A link that corresponds to the user review on Google Maps.
URI reference of the place.
Resource name of the Google Maps widget context token.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_maps_result" .
GoogleSearchCallDelta
arguments GoogleSearchCallArguments (required)
Описание отсутствует.
Поля
Web search queries for the following-up web search.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_search_call" .
GoogleSearchResultDelta
Описание отсутствует.
result array (GoogleSearchResult) (required)
Описание отсутствует.
Поля
Web content snippet that can be embedded in a web page or an app webview.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_search_result" .
ImageDelta
Описание отсутствует.
Описание отсутствует.
Возможные значения:
-
image/pngPNG image format
-
image/jpegформат изображения JPEG
-
image/webpWebP image format
-
image/heicHEIC image format
-
image/heifHEIF image format
-
image/gifGIF image format
-
image/bmpBMP image format
-
image/tiffTIFF image format
resolution MediaResolution (optional)
The resolution of the media.
Возможные значения
-
lowНизкое разрешение.
-
mediumMedium resolution.
-
highВысокое разрешение.
-
ultra_highUltra high resolution.
Описание отсутствует.
Always set to "image" .
Описание отсутствует.
McpServerToolCallDelta
Описание отсутствует.
Описание отсутствует.
Описание отсутствует.
Описание отсутствует.
Always set to "mcp_server_tool_call" .
McpServerToolResultDelta
Описание отсутствует.
Описание отсутствует.
Описание отсутствует.
Описание отсутствует.
Always set to "mcp_server_tool_result" .
ProcessingCallDelta
Streaming delta for a server-initiated media processing step.
A signature hash for backend validation.
Описание отсутствует.
Always set to "processing_call" .
ProcessingResultDelta
Streaming delta for the result of a server-initiated media processing step.
A signature hash for backend validation.
Описание отсутствует.
Always set to "processing_result" .
RetrievalCallDelta
Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search, etc. RetrievalType decides which tool is used.
arguments RetrievalStepArguments (required)
Required. The arguments to pass to the Retrieval tool.
Поля
Queries for Retrieval information.
The type of retrieval tools.
Возможные значения:
-
rag_storeThe type of retrieval tools.
-
exa_ai_searchThe type of retrieval tools.
-
parallel_ai_searchThe type of retrieval tools.
A signature hash for backend validation.
Описание отсутствует.
Always set to "retrieval_call" .
RetrievalResultDelta
Used by Vertex Retrieval tools such as Parallel AI, Exa AI, Vertex AI Search, etc. ToolResultDelta.type
Whether the retrieval resulted in an error.
A signature hash for backend validation.
Описание отсутствует.
Always set to "retrieval_result" .
TextAnnotationDelta
annotations array (Annotation) (optional)
Citation information for model-generated content.
Возможные типы
FileCitation
A file citation annotation.
User provided metadata about the retrieved context.
The URI of the file.
End of the attributed segment, exclusive.
Название файла.
Media ID in-case of image citations, if applicable.
Page number of the cited document, if applicable.
Source attributed for a portion of the text.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Описание отсутствует.
Always set to "file_citation" .
PlaceCitation
A place citation annotation.
End of the attributed segment, exclusive.
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Поля
The ID of the review snippet.
Заголовок рецензии.
A link that corresponds to the user review on Google Maps.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Описание отсутствует.
Always set to "place_citation" .
URI reference of the place.
UrlCitation
A URL citation annotation.
End of the attributed segment, exclusive.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
The title of the URL.
Описание отсутствует.
Always set to "url_citation" .
The URL.
WordInfo
Word-level ASR annotation for transcription output. Carries the word text, optional timing, and optional speaker attribution.
End of the attributed segment, exclusive.
End offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word".
Optional. Speaker label for this word (eg "spk_1", "spk_2"). Present when diarization_mode is set in TranscriptionConfig.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Start offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word".
The transcribed word.
Описание отсутствует.
Always set to "word_info" .
Описание отсутствует.
Always set to "text_annotation_delta" .
TextDelta
Описание отсутствует.
Описание отсутствует.
Always set to "text" .
ThoughtSignatureDelta
Signature to match the backend source to be part of the generation.
Описание отсутствует.
Always set to "thought_signature" .
ThoughtSummaryDelta
A new summary item to be added to the thought.
Описание отсутствует.
Always set to "thought_summary" .
UrlContextCallDelta
arguments UrlContextCallArguments (required)
Описание отсутствует.
Поля
The URLs to fetch.
A signature hash for backend validation.
Описание отсутствует.
Always set to "url_context_call" .
UrlContextResultDelta
Описание отсутствует.
result array (UrlContextResult) (required)
Описание отсутствует.
Поля
The status of the URL retrieval.
Возможные значения:
-
successUrl retrieval is successful.
-
errorUrl retrieval is failed due to error.
-
paywallUrl retrieval is failed because the content is behind paywall.
-
unsafeUrl retrieval is failed because the content is unsafe.
The URL that was fetched.
A signature hash for backend validation.
Описание отсутствует.
Always set to "url_context_result" .
VideoDelta
Описание отсутствует.
Описание отсутствует.
Возможные значения:
-
video/mp4MP4 video format
-
video/mpegMPEG video format
-
video/mpgMPG video format
-
video/movMOV video format
-
video/aviAVI video format
-
video/x-flvFLV video format
-
video/webmWebM video format
-
video/wmvWMV video format
-
video/3gpp3GPP video format
-
video/jpeg2000JPEG 2000 video format
resolution MediaResolution (optional)
The resolution of the media.
Возможные значения
-
lowНизкое разрешение.
-
mediumMedium resolution.
-
highВысокое разрешение.
-
ultra_highUltra high resolution.
Описание отсутствует.
Always set to "video" .
Описание отсутствует.
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "step.delta" .
Описание отсутствует.
metadata StepDeltaMetadata (optional)
Описание отсутствует.
Поля
total_usage Usage (optional)
Statistics on the interaction request's token usage.
Поля
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Поля
The number of grounding tool counts.
The grounding tool type associated with the count.
Возможные значения:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
-
retrievalGrounding with customer's data, for example, VertexAISearch.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
StepStart
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "step.start" .
Описание отсутствует.
Описание отсутствует.
StepStop
The event_id token to be used to resume the interaction stream, from this event.
Описание отсутствует.
Always set to "step.stop" .
Описание отсутствует.
step_usage Usage (optional)
Model usage stats for this specific step.
Поля
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Поля
The number of grounding tool counts.
The grounding tool type associated with the count.
Возможные значения:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
-
retrievalGrounding with customer's data, for example, VertexAISearch.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
usage Usage (optional)
Cumulative model usage stats from the start of the session.
Поля
cached_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of cached token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
grounding_tool_count array (GroundingToolCount) (optional)
Grounding tool count.
Поля
The number of grounding tool counts.
The grounding tool type associated with the count.
Возможные значения:
-
google_searchGrounding with Google Web Search and Image Search, & Web Grounding for Enterprise.
-
google_mapsGrounding with Google Maps.
-
retrievalGrounding with customer's data, for example, VertexAISearch.
input_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of input token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
output_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of output token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
tool_use_tokens_by_modality array (ModalityTokens) (optional)
A breakdown of tool-use token usage by modality.
Поля
modality ResponseModality (optional)
The modality associated with the token count.
Возможные значения
-
textIndicates the model should return text.
-
imageIndicates the model should return images.
-
audioIndicates the model should return audio.
-
videoIndicates the model should return video.
-
documentIndicates the model should return documents.
Number of tokens for the modality.
Number of tokens in the cached part of the prompt (the cached content).
Number of tokens in the prompt (context).
Total number of tokens across all the generated responses.
Number of tokens of thoughts for thinking models.
Total token count for the interaction request (prompt + responses + other internal tokens).
Number of tokens present in tool-use prompt(s).
Примеры
Error Event
{ "error": { "code": "not_found", "message": "Failed to get completed interaction: Result not found." }, "event_type": "error" }
Interaction Completed
{ "event_id": "evt_123", "event_type": "interaction.completed", "interaction": { "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3.6-flash", "status": "completed", "updated": "2025-12-04T15:01:45Z" } }
Interaction Completed
{ "event_id": "evt_123", "event_type": "interaction.completed", "interaction": { "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3-flash-preview", "object": "interaction", "status": "completed", "updated": "2025-12-04T15:01:45Z" } }
Interaction Created
{ "event_id": "evt_123", "event_type": "interaction.created", "interaction": { "created": "2025-12-04T15:01:45Z", "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3.6-flash", "status": "in_progress", "updated": "2025-12-04T15:01:45Z" } }
Interaction Created
{ "event_id": "evt_123", "event_type": "interaction.created", "interaction": { "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg", "model": "gemini-3-flash-preview", "object": "interaction", "status": "in_progress" } }
Interaction Status Update
{ "event_type": "interaction.status_update", "interaction_id": "v1_ChdTMjQ0YWJ5TUF1TzcxZThQdjRpcnFRcxIXUzI0NGFieU1BdU83MWU4UHY0aXJxUXM", "status": "in_progress" }
Step Delta
{ "delta": { "type": "text", "text": "Hello" }, "event_type": "step.delta", "index": 0 }
Step Start
{ "event_type": "step.start", "index": 0, "step": { "type": "model_output" } }
Step Stop
{ "event_type": "step.stop", "index": 0 }
ResponseFormat
Возможные типы
AudioResponseFormat
Configuration for audio output format.
Bit rate in bits per second (bps). Only applicable for compressed formats (MP3, Opus).
The delivery mode for the audio output.
Возможные значения:
-
inlineAudio data is returned inline in the response.
-
uriAudio data is returned as a URI.
The MIME type of the audio output.
Возможные значения:
-
audio/mp3MP3 audio format.
-
audio/ogg_opusOGG Opus audio format.
-
audio/l16Raw PCM (L16) audio format.
-
audio/wavWAV audio format.
-
audio/alawA-law audio format.
-
audio/mulawMu-law audio format.
Sample rate in Hz.
Описание отсутствует.
Always set to "audio" .
ImageResponseFormat
Configuration for image output format.
The aspect ratio for the image output.
Возможные значения:
-
1:11:1 aspect ratio.
-
2:32:3 aspect ratio.
-
3:2Соотношение сторон 3:2.
-
3:43:4 aspect ratio.
-
4:3Соотношение сторон 4:3.
-
4:5Соотношение сторон 4:5.
-
5:45:4 aspect ratio.
-
9:169:16 aspect ratio.
-
16:916:9 aspect ratio.
-
21:921:9 aspect ratio.
-
1:81:8 aspect ratio.
-
8:18:1 aspect ratio.
-
1:41:4 aspect ratio.
-
4:14:1 aspect ratio.
The delivery mode for the image output.
Возможные значения:
-
inlineImage data is returned inline in the response.
-
uriImage data is returned as a URI.
The size of the image output.
Возможные значения:
-
512512px image size.
-
1K1K image size.
-
2K2K image size.
-
4K4K image size.
The MIME type of the image output.
Возможные значения:
-
image/jpegJPEG image format.
Описание отсутствует.
Always set to "image" .
TextResponseFormat
Configuration for text output format.
The MIME type of the text output.
Возможные значения:
-
application/jsonJSON output format.
-
text/plainPlain text output format.
The JSON schema that the output should conform to. Only applicable when mime_type is application/json.
Описание отсутствует.
Always set to "text" .
VideoResponseFormat
Configuration for video output format.
The aspect ratio for the video output.
Возможные значения:
-
16:916:9 aspect ratio.
-
9:169:16 aspect ratio.
The delivery mode for the video output.
Возможные значения:
-
inlineVideo data is returned inline in the response.
-
uriVideo data is returned as a URI.
The duration for the video output.
The Cloud Storage URI to store the video output. Required for Vertex if delivery mode is URI.
The video output resolution. Defaults to 720p.
Возможные значения:
-
360p360p resolution.
-
720p720p resolution.
-
1080p1080p resolution.
-
4kРазрешение 4K.
Описание отсутствует.
Always set to "video" .
Примеры
Аудиовыход
{ "type": "audio", "sample_rate": 24000 }
Вывод изображения
{ "type": "image", "aspect_ratio": "16:9", "image_size": "1K", "mime_type": "image/jpeg" }
Text Output (JSON Schema)
{ "type": "text", "mime_type": "application/json", "schema": { "type": "object", "properties": { "ingredients": { "type": "array", "items": { "type": "string" } }, "recipe_name": { "type": "string" } }, "required": [ "ingredients", "recipe_name" ] } }
Видеовыход
{ "type": "video", "aspect_ratio": "16:9", "delivery": "inline" }
Шаг
A step in the interaction.
Возможные типы
CodeExecutionCallStep
Code execution call step.
arguments CodeExecutionCallStepArguments (required)
Required. The arguments to pass to the code execution.
Поля
Код, который необходимо выполнить.
Programming language of the `code`.
Возможные значения:
-
pythonPython >= 3.10, with numpy and simpy available.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
Описание отсутствует.
Always set to "code_execution_call" .
CodeExecutionResultStep
Code execution result step.
Required. ID to match the ID from the function call block.
Whether the code execution resulted in an error.
Required. The output of the code execution.
A signature hash for backend validation.
Описание отсутствует.
Always set to "code_execution_result" .
FileSearchCallStep
File Search call step.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
Описание отсутствует.
Always set to "file_search_call" .
FileSearchResultStep
File Search result step.
Required. ID to match the ID from the function call block.
A signature hash for backend validation.
Описание отсутствует.
Always set to "file_search_result" .
FunctionCallStep
A function tool call step.
Required. The arguments to pass to the function.
Required. A unique ID for this specific tool call.
Required. The name of the tool to call.
Описание отсутствует.
Always set to "function_call" .
FunctionResultStep
Result of a function tool call.
Required. ID to match the ID from the function call block.
Whether the tool call resulted in an error.
The name of the tool that was called.
Required. The result of the tool call.
Описание отсутствует.
Always set to "function_result" .
GoogleMapsCallStep
Google Maps call step.
arguments GoogleMapsCallStepArguments (optional)
The arguments to pass to the Google Maps tool.
Поля
The queries to be executed.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_maps_call" .
GoogleMapsResultStep
Google Maps result step.
Required. ID to match the ID from the function call block.
result array (GoogleMapsResultItem) (required)
Описание отсутствует.
Поля
places array (GoogleMapsResultPlaces) (optional)
Описание отсутствует.
Поля
Описание отсутствует.
Описание отсутствует.
review_snippets array (ReviewSnippet) (optional)
Описание отсутствует.
Поля
The ID of the review snippet.
Заголовок рецензии.
A link that corresponds to the user review on Google Maps.
Описание отсутствует.
Описание отсутствует.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_maps_result" .
GoogleSearchCallStep
Google Search call step.
arguments GoogleSearchCallStepArguments (required)
Required. The arguments to pass to Google Search.
Поля
Web search queries for the following-up web search.
Required. A unique ID for this specific tool call.
The type of search grounding enabled.
Возможные значения:
-
web_searchВключение этого поля активирует веб-поиск. Возвращаются только текстовые результаты.
-
image_searchУстановив это поле, можно включить поиск изображений. Возвращаются байты изображения.
-
enterprise_web_searchВключение корпоративного веб-поиска.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_search_call" .
GoogleSearchResultStep
Google Search result step.
Required. ID to match the ID from the function call block.
Whether the Google Search resulted in an error.
result array (GoogleSearchResultItem) (required)
Required. The results of the Google Search.
Поля
Web content snippet that can be embedded in a web page or an app webview.
A signature hash for backend validation.
Описание отсутствует.
Always set to "google_search_result" .
McpServerToolCallStep
MCPServer tool call step.
Required. The JSON object of arguments for the function.
Required. A unique ID for this specific tool call.
Required. The name of the tool which was called.
Required. The name of the used MCP server.
Описание отсутствует.
Always set to "mcp_server_tool_call" .
McpServerToolResultStep
MCPServer tool result step.
Required. ID to match the ID from the function call block.
Name of the tool which is called for this specific tool call.
Required. The output from the MCP server call. Can be simple text or rich content.
The name of the used MCP server.
Описание отсутствует.
Always set to "mcp_server_tool_result" .
ModelOutputStep
Output generated by the model.
Описание отсутствует.
Описание отсутствует.
Always set to "model_output" .
ThoughtStep
A thought step.
A signature hash for backend validation.
summary array (ThoughtSummaryContent) (optional)
A summary of the thought.
Возможные типы
ImageContent
An image content block.
The image content.
The mime type of the image.
Возможные значения:
-
image/pngPNG image format
-
image/jpegформат изображения JPEG
-
image/webpWebP image format
-
image/heicHEIC image format
-
image/heifHEIF image format
-
image/gifGIF image format
-
image/bmpBMP image format
-
image/tiffTIFF image format
resolution MediaResolution (optional)
The resolution of the media.
Возможные значения
-
lowНизкое разрешение.
-
mediumMedium resolution.
-
highВысокое разрешение.
-
ultra_highUltra high resolution.
Описание отсутствует.
Always set to "image" .
The URI of the image.
Текстовое содержимое
A text content block.
annotations array (Annotation) (optional)
Citation information for model-generated content.
Возможные типы
FileCitation
A file citation annotation.
User provided metadata about the retrieved context.
The URI of the file.
End of the attributed segment, exclusive.
Название файла.
Media ID in-case of image citations, if applicable.
Page number of the cited document, if applicable.
Source attributed for a portion of the text.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Описание отсутствует.
Always set to "file_citation" .
PlaceCitation
A place citation annotation.
End of the attributed segment, exclusive.
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Поля
The ID of the review snippet.
Заголовок рецензии.
A link that corresponds to the user review on Google Maps.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Описание отсутствует.
Always set to "place_citation" .
URI reference of the place.
UrlCitation
A URL citation annotation.
End of the attributed segment, exclusive.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
The title of the URL.
Описание отсутствует.
Always set to "url_citation" .
The URL.
WordInfo
Word-level ASR annotation for transcription output. Carries the word text, optional timing, and optional speaker attribution.
End of the attributed segment, exclusive.
End offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word".
Optional. Speaker label for this word (eg "spk_1", "spk_2"). Present when diarization_mode is set in TranscriptionConfig.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Start offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word".
The transcribed word.
Описание отсутствует.
Always set to "word_info" .
Required. The text content.
Описание отсутствует.
Always set to "text" .
Описание отсутствует.
Always set to "thought" .
UrlContextCallStep
URL context call step.
arguments UrlContextCallArguments (required)
Required. The arguments to pass to the URL context.
Поля
The URLs to fetch.
Required. A unique ID for this specific tool call.
A signature hash for backend validation.
Описание отсутствует.
Always set to "url_context_call" .
UrlContextResultStep
URL context result step.
Required. ID to match the ID from the function call block.
Whether the URL context resulted in an error.
result array (UrlContextResult) (required)
Required. The results of the URL context.
Поля
The status of the URL retrieval.
Возможные значения:
-
successUrl retrieval is successful.
-
errorUrl retrieval is failed due to error.
-
paywallUrl retrieval is failed because the content is behind paywall.
-
unsafeUrl retrieval is failed because the content is unsafe.
The URL that was fetched.
A signature hash for backend validation.
Описание отсутствует.
Always set to "url_context_result" .
UserInputStep
Input provided by the user.
Описание отсутствует.
Описание отсутствует.
Always set to "user_input" .
Примеры
CodeExecutionCallStep
{ "type": "code_execution_call", "arguments": { "code": "print(sum(range(1, 11)))" }, "id": "code_call_71021" }
CodeExecutionResultStep
{ "type": "code_execution_result", "call_id": "code_call_71021", "result": "55\n" }
FileSearchCallStep
{ "type": "file_search_call", "id": "file_call_88192" }
FileSearchResultStep
{ "type": "file_search_result", "call_id": "file_call_88192" }
FunctionCallStep
{ "name": "get_weather", "type": "function_call", "arguments": { "location": "Boston, MA" }, "id": "call_98231" }
FunctionResultStep
{ "name": "get_weather", "type": "function_result", "call_id": "call_98231", "result": [ { "type": "text", "text": "{\"weather\":\"sunny\"}" } ] }
GoogleMapsCallStep
{ "type": "google_maps_call", "arguments": { "latitude": 37.7749, "longitude": -122.4194 }, "id": "maps_call_39201" }
GoogleMapsResultStep
{ "type": "google_maps_result", "call_id": "maps_call_39201", "result": [ { "name": "Golden Gate Park", "place_id": "ChIJIQBpAG2ahYAR9R7bNdTLg8M", "rating": 4.8 } ] }
GoogleSearchCallStep
{ "type": "google_search_call", "arguments": { "query": "Who won the men's 100m in Paris 2024?" }, "id": "search_call_19201" }
GoogleSearchResultStep
{ "type": "google_search_result", "call_id": "search_call_19201", "result": [ { "title": "Paris 2024 Olympics: Noah Lyles wins men's 100m gold", "url": "https://olympics.com/en/news/paris-2024-noah-lyles-wins-mens-100m-gold", "snippet": "American Noah Lyles won the Olympic men's 100m gold medal in a photo finish." } ] }
McpServerToolCallStep
{ "name": "calculate_tax", "type": "mcp_server_tool_call", "arguments": { "income": 120000, "state": "CA" }, "id": "mcp_call_29012", "server_name": "financial_mcp_server" }
McpServerToolResultStep
{ "type": "mcp_server_tool_result", "call_id": "mcp_call_29012", "result": { "tax_due": 32400 } }
ModelOutputStep
{ "type": "model_output", "content": [ { "type": "text", "text": "The capital of France is Paris." } ] }
ThoughtStep
{ "type": "thought", "signature": "thought_sig_abcd1234", "summary": [ { "type": "text", "text": "The model is searching Google for the capital of France." } ] }
UrlContextCallStep
{ "type": "url_context_call", "arguments": { "urls": [ "https://www.example.com" ] }, "id": "url_call_10219" }
UrlContextResultStep
{ "type": "url_context_result", "call_id": "url_call_10219", "result": [ { "title": "Example Domain", "url": "https://www.example.com", "snippet": "This domain is for use in illustrative examples in documents." } ] }
UserInputStep
{ "type": "user_input", "content": [ { "type": "text", "text": "What is the capital of France?" } ] }
EnvironmentConfig
Configuration for a custom environment.
Поля
Необязательный параметр. Идентификатор среды для взаимодействия. Если указан, запрос обновит существующую среду вместо создания новой.
Network configuration for the environment.
Возможные значения:
-
disabledОтключает всю сеть.
sources array (Source) (optional)
Описание отсутствует.
Поля
Встроенное содержимое, если `type` имеет значение `INLINE`.
Дополнительная кодировка для встроенного контента (например, `base64`).
Источник среды. Для Cloud Storage это путь к Cloud Storage. Для GitHub это путь к GitHub.
Где в среде должен отображаться исходный код.
Описание отсутствует.
Возможные значения:
-
gcsСегмент облачного хранилища.
-
inlineВстроенный контент.
-
repositoryУниверсальный репозиторий. Префикс протокола в URL-адресе источника идентифицирует поставщика (например, github://, gcs://).
-
skill_registryРесурс навыков из службы регистрации навыков. Навык: projects/{project}/locations/{location}/skills/{skill} Ревизия навыка: projects/{project}/locations/{location}/skills/{skill}/revisions/{revision} Поддерживается подключение всех навыков в рамках проекта: projects/{project}/locations/{location}/skills.
Описание отсутствует.
Always set to "remote" .
Примеры
Inline Sources
{ "type": "remote", "sources": [ { "type": "inline", "content": "You are a data analyst. Always include visualizations and export results as PDF.", "target": ".agents/AGENTS.md" }, { "type": "inline", "content": "---\nname: slide-maker\ndescription: Create HTML slide decks\n---\n# Slide Maker\n\nWhen asked to create a presentation:\n1. Analyze the input data\n2. Create an HTML slide deck with reveal.js\n3. Save to /workspace/output/slides.html", "target": ".agents/skills/slide-maker/SKILL.md" } ] }
Внешние источники
{ "type": "remote", "sources": [ { "type": "repository", "source": "https://github.com/my-org/my-skills.git", "target": ".agents/skills" }, { "type": "gcs", "source": "gs://my-bucket/my-folder", "target": "/workspace/data" } ] }
Network Allowlist
{ "type": "remote", "network": { "allowlist": [ { "domain": "pypi.org" }, { "domain": "*.github.com" } ] } }
Proxy Credentials
{ "type": "remote", "network": { "allowlist": [ { "domain": "api.github.com", "transform": { "Authorization": "Bearer YOUR_GITHUB_TOKEN" } } ] } }
EnvironmentNetworkEgressAllowlist
Outbound networking configuration for the sandbox. Accepts an object with an 'allowlist' array to restrict traffic, or the string 'disabled' to turn off all network access. Omit entirely to allow all outbound traffic with no header injection.
Возможные типы
объект
Настройки исходящей сети для песочницы. При указании ограничивает доступ песочницы к внешним доменам. Полное исключение позволяет разрешить весь исходящий трафик без внедрения заголовков.
allowlist array (AllowlistEntry) (optional)
Список разрешенных исходящих доменов. Разрешены только запросы к перечисленным доменам. Используйте [{'domain': '*'}], чтобы разрешить все домены, но при этом добавить заголовки только к определенным.
Поля
Домен, разрешающий исходящие запросы. Поддерживаются подстановочные знаки (например, '*.googleapis.com'). Используйте '*' для разрешения всех доменов.
Заголовки для добавления во все исходящие запросы, соответствующие этому домену. Принимает один словарь или список словарей. Исходящий прокси добавляет их автоматически.
нить
Отключает всю сеть.
Возможные значения
-
disabledОтключает всю сеть.
Примеры
Пример
{ "allowlist": [ { "domain": "github.com", "transform": [ { "Authorization": "Bearer your-token" } ] }, { "domain": "*.googleapis.com" } ] }
ToolChoiceConfig
The tool choice configuration containing allowed tools.
Поля
allowed_tools AllowedTools (optional)
Разрешенные инструменты.
Поля
Способ выбора инструмента.
Возможные значения:
-
autoАвтоматический выбор инструмента.
-
anyЛюбой выбор инструмента.
-
noneВыбор инструментов отсутствует.
-
validatedВыбор инструмента подтвержден.
Названия разрешенных инструментов.
Примеры
Пример
{ "allowed_tools": { "mode": "any", "tools": [ "my_tool" ] } }
ImageContent
An image content block.
Поля
The image content.
The mime type of the image.
Возможные значения:
-
image/pngPNG image format
-
image/jpegформат изображения JPEG
-
image/webpWebP image format
-
image/heicHEIC image format
-
image/heifHEIF image format
-
image/gifGIF image format
-
image/bmpBMP image format
-
image/tiffTIFF image format
resolution MediaResolution (optional)
The resolution of the media.
Возможные значения
-
lowНизкое разрешение.
-
mediumMedium resolution.
-
highВысокое разрешение.
-
ultra_highUltra high resolution.
Описание отсутствует.
Always set to "image" .
The URI of the image.
Примеры
Изображение
{ "type": "image", "data": "BASE64_ENCODED_IMAGE", "mime_type": "image/png" }
Текстовое содержимое
A text content block.
Поля
annotations array (Annotation) (optional)
Citation information for model-generated content.
Возможные типы
FileCitation
A file citation annotation.
User provided metadata about the retrieved context.
The URI of the file.
End of the attributed segment, exclusive.
Название файла.
Media ID in-case of image citations, if applicable.
Page number of the cited document, if applicable.
Source attributed for a portion of the text.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Описание отсутствует.
Always set to "file_citation" .
PlaceCitation
A place citation annotation.
End of the attributed segment, exclusive.
Title of the place.
The ID of the place, in `places/{place_id}` format.
review_snippets array (ReviewSnippet) (optional)
Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.
Поля
The ID of the review snippet.
Заголовок рецензии.
A link that corresponds to the user review on Google Maps.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Описание отсутствует.
Always set to "place_citation" .
URI reference of the place.
UrlCitation
A URL citation annotation.
End of the attributed segment, exclusive.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
The title of the URL.
Описание отсутствует.
Always set to "url_citation" .
The URL.
WordInfo
Word-level ASR annotation for transcription output. Carries the word text, optional timing, and optional speaker attribution.
End of the attributed segment, exclusive.
End offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word".
Optional. Speaker label for this word (eg "spk_1", "spk_2"). Present when diarization_mode is set in TranscriptionConfig.
Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.
Start offset in time of the word relative to the start of the audio. Present when timestamp_granularities contains "word".
The transcribed word.
Описание отсутствует.
Always set to "word_info" .
Required. The text content.
Описание отсутствует.
Always set to "text" .
Примеры
Текст
{ "type": "text", "text": "Hello, how are you?" }