Gemini API

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

Создать веб-перехватчик

ссылка: https://generativelanguage.googleapis.com/v1beta/webhooks

Создает новый веб-перехватчик.

Текст запроса

Тело запроса содержит данные следующей структуры:

строковое имя (необязательно)

Необязательно. Имя веб-перехватчика, указанное пользователем.

строка URI (обязательно)

Обязательно. URI, на который будут отправляться события веб-перехватчика.

массив subscribed_events (объект или строка) (обязательно)

Обязательно. События, на которые подписан веб-хук. Доступные события: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated

Ответ

В случае успеха тело ответа будет содержать данные следующей структуры:

строковое имя (необязательно)

Необязательно. Имя веб-перехватчика, указанное пользователем.

строка URI (необязательно)

Обязательно. URI, на который будут отправляться события веб-перехватчика.

массив subscribed_events (объект или строка) (необязательно)

Обязательно. События, на которые подписан веб-хук. Доступные события: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated

create_time string (необязательно)

Только вывод. Отметка времени создания веб-перехватчика.

строка update_time (необязательно)

Только вывод. Отметка времени последнего обновления веб-перехватчика.

signing_secrets SigningSecret (необязательно)

Только вывод. Секретные данные для подписи, связанные с этим веб-хуком.

Представляет собой секретный ключ, используемый для проверки полезной нагрузки веб-перехватчика.

Поля

усеченная секретная строка (необязательно)

Только вывод. Сокращенная версия секретного ключа подписи.

expire_time строка (необязательно)

Только для вывода. Срок действия секретного ключа подписи.

перечисление состояний (строка) (необязательно)

Только вывод. Состояние веб-хука.

Возможные значения:

  • enabled
  • disabled
  • disabled_due_to_failed_deliveries
new_signing_secret string (необязательно)

Только для вывода. Новый секретный ключ для веб-перехватчика. Заполняется только при создании.

строка идентификатора (необязательно)

Только вывод. Идентификатор веб-перехватчика.

Пример

Пример ответа

{
  "name": "string",
  "uri": "string",
  "subscribed_events": [
    "string"
  ],
  "create_time": "string",
  "update_time": "string",
  "signing_secrets": [
    {
      "truncated_secret": "string",
      "expire_time": "string"
    }
  ],
  "state": "enabled",
  "new_signing_secret": "string",
  "id": "string"
}

ListWebhooks

получить https://generativelanguage.googleapis.com/v1beta/webhooks

Отображает список всех веб-хуков.

Путь / Параметры запроса

page_size — целое число (необязательно)

Необязательный параметр. Максимальное количество возвращаемых веб-хуков. Сервис может вернуть меньше этого значения. Если параметр не указан, будет возвращено не более 50 веб-хуков. Максимальное значение — 1000.

строка page_token (необязательно)

Необязательный параметр. Токен страницы, полученный из предыдущего вызова `ListWebhooks`. Укажите его, чтобы получить следующую страницу.

Ответ

В случае успеха тело ответа будет содержать данные следующей структуры:

массив веб-хуков ( Webhook ) (необязательно)

Веб-хуки.

строка next_page_token (необязательно)

Токен, который можно отправить в качестве `page_token` для получения следующей страницы. Если это поле опущено, последующих страниц не будет.

Пример

Пример ответа

{
  "webhooks": [
    {
      "name": "string",
      "uri": "string",
      "subscribed_events": [
        "string"
      ],
      "create_time": "string",
      "update_time": "string",
      "signing_secrets": [
        {
          "truncated_secret": "string",
          "expire_time": "string"
        }
      ],
      "state": "enabled",
      "new_signing_secret": "string",
      "id": "string"
    }
  ],
  "next_page_token": "string"
}

GetWebhook

получить https://generativelanguage.googleapis.com/v1beta/webhooks/{id}

Получает конкретный веб-хук.

Путь / Параметры запроса

строковый идентификатор (обязательно)

Обязательно. Идентификатор веб-перехватчика для получения данных.

Ответ

В случае успеха тело ответа будет содержать данные следующей структуры:

строковое имя (необязательно)

Необязательно. Имя веб-перехватчика, указанное пользователем.

строка URI (необязательно)

Обязательно. URI, на который будут отправляться события веб-перехватчика.

массив subscribed_events (объект или строка) (необязательно)

Обязательно. События, на которые подписан веб-хук. Доступные события: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated

create_time string (необязательно)

Только вывод. Отметка времени создания веб-перехватчика.

строка update_time (необязательно)

Только вывод. Отметка времени последнего обновления веб-перехватчика.

signing_secrets SigningSecret (необязательно)

Только вывод. Секретные данные для подписи, связанные с этим веб-хуком.

Представляет собой секретный ключ, используемый для проверки полезной нагрузки веб-перехватчика.

Поля

усеченная секретная строка (необязательно)

Только вывод. Сокращенная версия секретного ключа подписи.

expire_time строка (необязательно)

Только для вывода. Срок действия секретного ключа подписи.

перечисление состояний (строка) (необязательно)

Только вывод. Состояние веб-хука.

Возможные значения:

  • enabled
  • disabled
  • disabled_due_to_failed_deliveries
new_signing_secret string (необязательно)

Только для вывода. Новый секретный ключ для веб-перехватчика. Заполняется только при создании.

строка идентификатора (необязательно)

Только вывод. Идентификатор веб-перехватчика.

Пример

Пример ответа

{
  "name": "string",
  "uri": "string",
  "subscribed_events": [
    "string"
  ],
  "create_time": "string",
  "update_time": "string",
  "signing_secrets": [
    {
      "truncated_secret": "string",
      "expire_time": "string"
    }
  ],
  "state": "enabled",
  "new_signing_secret": "string",
  "id": "string"
}

UpdateWebhook

патч https://generativelanguage.googleapis.com/v1beta/webhooks/{id}

Обновляет существующий веб-перехватчик.

Путь / Параметры запроса

строковый идентификатор (обязательно)

Обязательно. Идентификатор веб-перехватчика для обновления.

update_mask string (необязательно)

Необязательный параметр. Список полей для обновления.

Текст запроса

Тело запроса содержит данные следующей структуры:

строковое имя (необязательно)

Необязательно. Имя веб-перехватчика, указанное пользователем.

строка URI (необязательно)

Необязательный параметр. URI, на который будут отправляться события веб-перехватчика.

массив subscribed_events (объект или строка) (необязательно)

Необязательно. События, на которые подписан веб-хук. Доступные события: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated

перечисление состояний (строка) (необязательно)

Необязательно. Состояние веб-хука.

Возможные значения:

  • enabled
  • disabled
  • disabled_due_to_failed_deliveries

Ответ

В случае успеха тело ответа будет содержать данные следующей структуры:

строковое имя (необязательно)

Необязательно. Имя веб-перехватчика, указанное пользователем.

строка URI (необязательно)

Обязательно. URI, на который будут отправляться события веб-перехватчика.

массив subscribed_events (объект или строка) (необязательно)

Обязательно. События, на которые подписан веб-хук. Доступные события: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated

create_time string (необязательно)

Только вывод. Отметка времени создания веб-перехватчика.

строка update_time (необязательно)

Только вывод. Отметка времени последнего обновления веб-перехватчика.

signing_secrets SigningSecret (необязательно)

Только вывод. Секретные данные для подписи, связанные с этим веб-хуком.

Представляет собой секретный ключ, используемый для проверки полезной нагрузки веб-перехватчика.

Поля

усеченная секретная строка (необязательно)

Только вывод. Сокращенная версия секретного ключа подписи.

expire_time строка (необязательно)

Только для вывода. Срок действия секретного ключа подписи.

перечисление состояний (строка) (необязательно)

Только вывод. Состояние веб-хука.

Возможные значения:

  • enabled
  • disabled
  • disabled_due_to_failed_deliveries
new_signing_secret string (необязательно)

Только для вывода. Новый секретный ключ для веб-перехватчика. Заполняется только при создании.

строка идентификатора (необязательно)

Только вывод. Идентификатор веб-перехватчика.

Пример

Пример ответа

{
  "name": "string",
  "uri": "string",
  "subscribed_events": [
    "string"
  ],
  "create_time": "string",
  "update_time": "string",
  "signing_secrets": [
    {
      "truncated_secret": "string",
      "expire_time": "string"
    }
  ],
  "state": "enabled",
  "new_signing_secret": "string",
  "id": "string"
}

DeleteWebhook

удалить https://generativelanguage.googleapis.com/v1beta/webhooks/{id}

Удаляет веб-перехватчик.

Путь / Параметры запроса

строковый идентификатор (обязательно)

Обязательно. Идентификатор веб-хука для удаления. Формат: `{webhook_id}`

Ответ

В случае успеха ответ будет пустым.

Пример

RotateSigningSecret

post https://generativelanguage.googleapis.com/v1beta/webhooks/{id}:rotateSigningSecret

Генерирует новый секретный ключ для подписи веб-перехватчика.

Путь / Параметры запроса

строковый идентификатор (обязательно)

Обязательно. Идентификатор веб-перехватчика, для которого необходимо сгенерировать секретный ключ для подписи. Формат: `{webhook_id}`

Текст запроса

Тело запроса содержит данные следующей структуры:

revocation_behavior enum (string) (optional)

Необязательно. Порядок отзыва ранее подписанных секретных ключей.

Возможные значения:

  • revoke_previous_secrets_after_h24
  • revoke_previous_secrets_immediately

Ответ

В случае успеха тело ответа будет содержать данные следующей структуры:

секретная строка (необязательно)

Только вывод. Вновь сгенерированный секретный ключ для подписи.

Пример

Пример ответа

{
  "secret": "string"
}

PingWebhook

post https://generativelanguage.googleapis.com/v1beta/webhooks/{id}:ping

Отправляет событие ping на веб-перехватчик.

Путь / Параметры запроса

строковый идентификатор (обязательно)

Обязательно. Идентификатор веб-хука для пинга. Формат: `{webhook_id}`

Текст запроса

Тело запроса содержит данные следующей структуры:

Ответ

В случае успеха ответ будет пустым.

Пример

Ресурсы

Вебхук

Ресурс веб-перехватчика.

Поля

строковое имя (необязательно)

Необязательно. Имя веб-перехватчика, указанное пользователем.

строка URI (необязательно)

Обязательно. URI, на который будут отправляться события веб-перехватчика.

массив subscribed_events (объект или строка) (необязательно)

Обязательно. События, на которые подписан веб-хук. Доступные события: - batch.succeeded - batch.expired - batch.failed - interaction.requires_action - interaction.completed - interaction.failed - video.generated

create_time string (необязательно)

Только вывод. Отметка времени создания веб-перехватчика.

строка update_time (необязательно)

Только вывод. Отметка времени последнего обновления веб-перехватчика.

signing_secrets SigningSecret (необязательно)

Только вывод. Секретные данные для подписи, связанные с этим веб-хуком.

Представляет собой секретный ключ, используемый для проверки полезной нагрузки веб-перехватчика.

Поля

усеченная секретная строка (необязательно)

Только вывод. Сокращенная версия секретного ключа подписи.

expire_time строка (необязательно)

Только для вывода. Срок действия секретного ключа подписи.

перечисление состояний (строка) (необязательно)

Только вывод. Состояние веб-хука.

Возможные значения:

  • enabled
  • disabled
  • disabled_due_to_failed_deliveries
new_signing_secret string (необязательно)

Только для вывода. Новый секретный ключ для веб-перехватчика. Заполняется только при создании.

строка идентификатора (необязательно)

Только вывод. Идентификатор веб-перехватчика.

Модели данных

InteractionSseEvent

Возможные типы

Полиморфный дискриминатор: event_type

InteractionCreatedEvent

event_type object (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "interaction.created" .

Взаимодействие (обязательно )

Описание отсутствует.

Ресурс "Взаимодействие".

Поля

модель ModelOption (необязательно)

Название модели, использованной для генерации взаимодействия.

Возможные значения:

  • gemini-2.5-computer-use-preview-10-2025

    Модель агентных возможностей, разработанная для прямого взаимодействия через интерфейс, позволяющая Gemini воспринимать цифровую среду и перемещаться в ней.

  • gemini-2.5-flash

    Наша первая гибридная модель рассуждений, поддерживающая контекстное окно в 1 миллион токенов и имеющая бюджеты мышления.

  • gemini-2.5-flash-image

    Наша собственная модель генерации изображений, оптимизированная для скорости, гибкости и контекстного понимания. Стоимость ввода и вывода текста такая же, как у 2,5-дюймовой версии Flash.

  • gemini-2.5-flash-lite

    Наша самая компактная и экономичная модель, предназначенная для масштабного использования.

  • gemini-2.5-flash-lite-preview-09-2025

    Новейшая модель на базе Gemini 2.5 Flash lite, оптимизированная для экономичности, высокой производительности и высокого качества.

  • gemini-2.5-flash-native-audio-preview-12-2025

    Наши собственные аудиомодели оптимизированы для более высокого качества звука с улучшенным темпом, естественностью голоса, детализацией и передачей настроения.

  • gemini-2.5-flash-preview-09-2025

    Новейшая модель, основанная на версии 2.5 Flash. Версия 2.5 Flash Preview лучше всего подходит для крупномасштабной обработки, задач с низкой задержкой и большим объемом данных, требующих аналитического мышления, а также для сценариев использования агентных вычислений.

  • gemini-2.5-flash-preview-tts

    Наша модель преобразования текста в речь 2.5 Flash оптимизирована для мощной, управляемой генерации речи с низкой задержкой.

  • gemini-2.5-pro

    Наша передовая многоцелевая модель, превосходно справляющаяся с задачами программирования и сложным логическим мышлением.

  • gemini-2.5-pro-preview-tts

    Наша аудиомодель преобразования текста в речь 2.5 Pro оптимизирована для мощного генерирования речи с низкой задержкой, что обеспечивает более естественный результат и упрощает управление голосовыми подсказками.

  • gemini-3-flash-preview

    Наша самая интеллектуальная модель, созданная для скорости, сочетает в себе передовые методы разведки с превосходными возможностями поиска и посадки на землю.

  • gemini-3-pro-image-preview

    Современная модель генерации и редактирования изображений.

  • gemini-3-pro-preview

    Наша самая интеллектуальная модель с передовыми методами рассуждения и многомодальным пониманием, а также мощными возможностями агентного и эмоциональных кодирований.

  • gemini-3.1-pro-preview

    Наша новейшая, передовая модель логического мышления с беспрецедентной глубиной и детализацией, а также мощными возможностями многомодального понимания и кодирования.

  • gemini-3.1-flash-image-preview

    Профессиональный уровень визуального интеллекта с эффективностью, сравнимой со скоростью Flash, и возможностями генерации, основанной на реальных данных.

  • gemini-3.1-flash-lite-preview

    Наша наиболее экономичная модель, оптимизированная для выполнения больших объемов агентских задач, перевода и простой обработки данных.

  • gemini-3.1-flash-tts-preview

    Gemini 3.1 Flash TTS: Мощная система генерации речи с низкой задержкой. Наслаждайтесь естественным звучанием, управляемыми подсказками и новыми выразительными аудиотегами для точного управления озвучиванием.

  • lyria-3-clip-preview

    Наша модель генерации музыки с низкой задержкой оптимизирована для высококачественных аудиоклипов и точного контроля ритма.

  • lyria-3-pro-preview

    Наша передовая генеративная модель, способная обрабатывать целые композиции и обладающая глубоким пониманием композиции, оптимизирована для точного структурного контроля и сложных переходов между различными музыкальными стилями.

Модель, которая выполнит ваш запрос.\n\nДополнительную информацию см. в разделе [модели](https://ai.google.dev/gemini-api/docs/models).

агент AgentOption (необязательно)

Имя агента, использованного для генерации взаимодействия.

Возможные значения:

  • deep-research-pro-preview-12-2025

    Агент по глубоким исследованиям компании Gemini

  • deep-research-preview-04-2026

    Агент по глубоким исследованиям компании Gemini

  • deep-research-max-preview-04-2026

    Gemini Deep Research Max Agent

Агент, с которым необходимо взаимодействовать.

строка идентификатора (необязательно)

Обязательно. Только для вывода. Уникальный идентификатор завершения взаимодействия.

перечисление статуса (строка) (необязательно)

Обязательный параметр. Только вывод. Статус взаимодействия.

Возможные значения:

  • in_progress
  • requires_action
  • completed
  • failed
  • cancelled
  • incomplete
созданная строка (необязательно)

Обязательно. Только для вывода. Время создания ответа в формате ISO 8601 (ГГГГ-ММ-ДДЧч:мм:ссЗ).

обновленная строка (необязательно)

Обязательно. Только для вывода. Время последнего обновления ответа в формате ISO 8601 (ГГГГ-ММ-ДДТЧ:мм:ссЗ).

строка роли (необязательно)

Только вывод. Роль взаимодействия.

строка системной инструкции (необязательно)

Системная инструкция для взаимодействия.

Инструменты (необязательно )

Список объявлений инструментов, которые модель может вызывать во время взаимодействия.

Инструмент, который может быть использован моделью.

Возможные типы

Полиморфный дискриминатор: type

Функция

Инструмент, который может быть использован моделью.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "function" .

строковое имя (необязательно)

Название функции.

строка описания (необязательно)

Описание функции.

объект параметров (необязательно)

JSON-схема для параметров функции.

Выполнение кода

Инструмент, который может использоваться моделью для выполнения кода.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "code_execution" .

UrlContext

Инструмент, который может использоваться моделью для получения контекста URL-адреса.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "url_context" .

Использование компьютера

Инструмент, который модель может использовать для взаимодействия с компьютером.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "computer_use" .

Перечисление переменных окружения (строка) (необязательно)

Рабочая среда.

Возможные значения:

  • browser
массив excluded_predefined_functions (строка) (необязательно)

Список предопределенных функций, исключенных из вызова модели.

McpServer

MCPServer — это сервер, который может быть вызван моделью для выполнения действий.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "mcp_server" .

строковое имя (необязательно)

Имя MCPServer.

строка URL (необязательно)

Полный URL-адрес конечной точки MCPServer. Пример: "https://api.example.com/mcp"

объект заголовков (необязательно)

Необязательно: поля для заголовков аутентификации, тайм-аутов и т. д., если необходимо.

allowed_tools AllowedTools (необязательно)

Разрешенные инструменты.

Настройки для разрешенных инструментов.

Поля

режим ToolChoiceType (необязательно)

Способ выбора инструмента.

Возможные значения:

  • auto
  • any
  • none
  • validated

массив инструментов (строка) (необязательно)

Названия разрешенных инструментов.

GoogleПоиск

Инструмент, который модель может использовать для поиска в Google.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "google_search" .

массив search_types (перечисление (строка)) (необязательно)

Типы поиска, которые необходимо включить.

Возможные значения:

  • web_search
  • image_search
  • enterprise_web_search
Поиск файлов

Инструмент, который может использоваться моделью для поиска файлов.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "file_search" .

массив file_search_store_names (строка) (необязательно)

Названия хранилищ файлов для поиска.

top_k целое число (необязательно)

Количество фрагментов семантического поиска, которые необходимо извлечь.

metadata_filter строка (необязательно)

Фильтр метаданных, применяемый к документам и фрагментам, полученным в результате семантического поиска.

Google Карты

Инструмент, который модель может использовать для вызова Google Maps.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "google_maps" .

enable_widget boolean (необязательно)

Следует ли возвращать токен контекста виджета в результате вызова инструмента в ответе.

широта ( необязательно )

Широта местоположения пользователя.

Номер долготы (необязательно)

Долгота местоположения пользователя.

Извлечение

Инструмент, который может использоваться моделью для извлечения файлов.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "retrieval" .

массив retrieval_types (перечисление (строка)) (необязательно)

Типы извлечения файлов, которые необходимо включить.

Возможные значения:

  • vertex_ai_search
vertex_ai_search_config VertexAISearchConfig (необязательно)

Используется для указания конфигурации VertexAISearch.

Используется для указания конфигурации VertexAISearch.

Поля

двигательный блок (опционально)

Необязательный параметр. Используется для указания поисковой системы Vertex AI.

массив хранилищ данных (строка) (необязательно)

Необязательный параметр. Используется для указания хранилищ данных Vertex AI Search.

Использование (необязательно )

Только вывод. Статистика использования токенов в запросе на взаимодействие.

Статистика использования токенов в запросах на взаимодействие.

Поля

total_input_tokens целое число (необязательно)

Количество токенов в подсказке (контексте).

input_tokens_by_modality ModalityTokens (необязательно)

Анализ использования входных токенов в зависимости от модальности ввода.

Количество токенов для одного варианта ответа.

Поля

модальность ResponseModality (необязательно)

Способ отображения количества токенов.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

токены целое число (необязательно)

Количество токенов для данного режима.

total_cached_tokens — целое число (необязательно)

Количество токенов в кэшированной части запроса (кэшированное содержимое).

cached_tokens_by_modality ModalityTokens (необязательно)

Анализ использования кэшированных токенов по способам доступа.

Количество токенов для одного варианта ответа.

Поля

модальность ResponseModality (необязательно)

Способ отображения количества токенов.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

токены целое число (необязательно)

Количество токенов для данного режима.

total_output_tokens целое число (необязательно)

Общее количество токенов во всех сгенерированных ответах.

output_tokens_by_modality ModalityTokens (необязательно)

Анализ использования выходных токенов по видам модальностей.

Количество токенов для одного варианта ответа.

Поля

модальность ResponseModality (необязательно)

Способ отображения количества токенов.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

токены целое число (необязательно)

Количество токенов для данного режима.

total_tool_use_tokens целое число (необязательно)

Количество токенов, присутствующих в подсказках использования инструмента.

tool_use_tokens_by_modality ModalityTokens (необязательно)

Анализ использования токенов инструментов в зависимости от модальности.

Количество токенов для одного варианта ответа.

Поля

модальность ResponseModality (необязательно)

Способ отображения количества токенов.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

токены целое число (необязательно)

Количество токенов для данного режима.

total_thought_tokens целое число (необязательно)

Количество токенов мыслей для моделей мышления.

total_tokens целое число (необязательно)

Общее количество токенов для запроса на взаимодействие (запрос + ответы + другие внутренние токены).

grounding_tool_count GroundingToolCount (необязательно)

Количество инструментов для заземления.

Количество заземляющих инструментов подсчитывается.

Поля

тип перечисления (строка) (необязательно)

Тип заземляющего инструмента, связанный с подсчетом.

Возможные значения:

  • google_search
  • google_maps
  • retrieval
count целое число (необязательно)

Количество заземляющих инструментов подсчитывается.

response_modalities ResponseModality (необязательно)

Требуемые форматы ответа (ТЕКСТ, ИЗОБРАЖЕНИЕ, АУДИО).

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

response_mime_type строка (необязательно)

MIME-тип ответа. Это необходимо, если задан параметр response_format.

previous_interaction_id строка (необязательно)

Идентификатор предыдущего взаимодействия, если таковое имелось.

service_tier ServiceTier (необязательно)

Уровень обслуживания для данного взаимодействия.

Возможные значения:

  • flex
  • standard
  • priority

webhook_config WebhookConfig (необязательно)

Необязательно. Настройка веб-перехватчика для получения уведомлений по завершении взаимодействия.

Сообщение для настройки событий веб-перехватчика для запроса.

Поля

Массив URIS (строка) (необязательно)

Необязательно. Если задано, эти URI веб-перехватчиков будут использоваться для событий веб-перехватчиков вместо зарегистрированных веб-перехватчиков.

Объект user_metadata (необязательно)

Необязательно. Метаданные пользователя, которые будут возвращаться веб-хукам при каждом срабатывании события.

Шаги Шаг (необязательно)

Только выходные данные. Этапы взаимодействия.

Один из этапов взаимодействия.

Возможные типы

Полиморфный дискриминатор: type

Шаг ввода пользователя

Ввод данных осуществляется пользователем.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "user_input" .

Содержание ( необязательно )

Описание отсутствует.

Содержание ответа.

Возможные типы

Полиморфный дискриминатор: type

Текстовое содержимое

Блок текстового содержимого.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "text" .

текстовая строка (обязательно)

Обязательно. Текстовое содержимое.

Аннотации (необязательно )

Информация об источниках для контента, сгенерированного моделью.

Информация об источниках для контента, сгенерированного моделью.

Возможные типы

Полиморфный дискриминатор: type

URLCitation

Аннотация URL-адреса.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "url_citation" .

строка URL (необязательно)

URL.

заголовок (необязательно )

Заголовок URL-адреса.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

FileCitation

Аннотация к файлу.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "file_citation" .

document_uri строка (необязательно)

URI файла.

file_name string (необязательно)

Название файла.

исходная строка (необязательно)

Источник указан для части текста.

объект custom_metadata (необязательно)

Пользователь предоставил метаданные о полученном контексте.

page_number целое число (необязательно)

Номер страницы цитируемого документа, если таковой имеется.

media_id строка (необязательно)

В случае цитирования изображений, пожалуйста, укажите идентификатор медиафайла (Media ID), если таковой имеется.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

PlaceCitation

Аннотация к географическому местоположению.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "place_citation" .

place_id строка (необязательно)

Идентификатор места в формате `places/{place_id}`.

строковое имя (необязательно)

Название места.

строка URL (необязательно)

URI-ссылка на это место.

review_snippets ReviewSnippet (необязательно)

Фрагменты отзывов, используемые для генерации ответов об особенностях того или иного места в Google Maps.

Представляет собой фрагмент отзыва пользователя, отвечающего на вопрос об особенностях конкретного места на Google Maps.

Поля

заголовок (необязательно )

Заголовок рецензии.

строка URL (необязательно)

Ссылка, соответствующая отзыву пользователя на Google Maps.

review_id строка (необязательно)

Идентификатор фрагмента отзыва.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

ImageContent

Блок с графическим содержимым.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "image" .

строка данных (необязательно)

Содержание изображения.

строка URI (необязательно)

URI изображения.

перечисление mime_type (строка) (необязательно)

MIME-тип изображения.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
разрешение MediaResolution (необязательно)

Разрешение средств массовой информации.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

Аудиоконтент

Блок аудиоконтента.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "audio" .

строка данных (необязательно)

Аудиоконтент.

строка URI (необязательно)

URI аудиофайла.

перечисление mime_type (строка) (необязательно)

MIME-тип аудиофайла.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
каналы целое число (необязательно)

Количество аудиоканалов.

sample_rate — целое число (необязательно)

Частота дискретизации аудиосигнала.

Содержимое документа

Блок содержимого документа.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "document" .

строка данных (необязательно)

Содержание документа.

строка URI (необязательно)

URI документа.

перечисление mime_type (строка) (необязательно)

MIME-тип документа.

Возможные значения:

  • application/pdf
Видеоконтент

Блок видеоконтента.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "video" .

строка данных (необязательно)

Видеоконтент.

строка URI (необязательно)

URI видео.

перечисление mime_type (строка) (необязательно)

Тип MIME видео.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
разрешение MediaResolution (необязательно)

Разрешение средств массовой информации.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ModelOutputStep

Результаты, сгенерированные моделью.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "model_output" .

Содержание ( необязательно )

Описание отсутствует.

Содержание ответа.

Возможные типы

Полиморфный дискриминатор: type

Текстовое содержимое

Блок текстового содержимого.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "text" .

текстовая строка (обязательно)

Обязательно. Текстовое содержимое.

Аннотации (необязательно )

Информация об источниках для контента, сгенерированного моделью.

Информация об источниках для контента, сгенерированного моделью.

Возможные типы

Полиморфный дискриминатор: type

URLCitation

Аннотация URL-адреса.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "url_citation" .

строка URL (необязательно)

URL.

заголовок (необязательно )

Заголовок URL-адреса.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

FileCitation

Аннотация к файлу.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "file_citation" .

document_uri строка (необязательно)

URI файла.

file_name string (необязательно)

Название файла.

исходная строка (необязательно)

Источник указан для части текста.

объект custom_metadata (необязательно)

Пользователь предоставил метаданные о полученном контексте.

page_number целое число (необязательно)

Номер страницы цитируемого документа, если таковой имеется.

media_id строка (необязательно)

В случае цитирования изображений, пожалуйста, укажите идентификатор медиафайла (Media ID), если таковой имеется.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

PlaceCitation

Аннотация к географическому местоположению.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "place_citation" .

place_id строка (необязательно)

Идентификатор места в формате `places/{place_id}`.

строковое имя (необязательно)

Название места.

строка URL (необязательно)

URI-ссылка на это место.

review_snippets ReviewSnippet (необязательно)

Фрагменты отзывов, используемые для генерации ответов об особенностях того или иного места в Google Maps.

Представляет собой фрагмент отзыва пользователя, отвечающего на вопрос об особенностях конкретного места на Google Maps.

Поля

заголовок (необязательно )

Заголовок рецензии.

строка URL (необязательно)

Ссылка, соответствующая отзыву пользователя на Google Maps.

review_id строка (необязательно)

Идентификатор фрагмента отзыва.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

ImageContent

Блок с графическим содержимым.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "image" .

строка данных (необязательно)

Содержание изображения.

строка URI (необязательно)

URI изображения.

перечисление mime_type (строка) (необязательно)

MIME-тип изображения.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
разрешение MediaResolution (необязательно)

Разрешение средств массовой информации.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

Аудиоконтент

Блок аудиоконтента.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "audio" .

строка данных (необязательно)

Аудиоконтент.

строка URI (необязательно)

URI аудиофайла.

перечисление mime_type (строка) (необязательно)

MIME-тип аудиофайла.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
каналы целое число (необязательно)

Количество аудиоканалов.

sample_rate — целое число (необязательно)

Частота дискретизации аудиосигнала.

Содержимое документа

Блок содержимого документа.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "document" .

строка данных (необязательно)

Содержание документа.

строка URI (необязательно)

URI документа.

перечисление mime_type (строка) (необязательно)

MIME-тип документа.

Возможные значения:

  • application/pdf
Видеоконтент

Блок видеоконтента.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "video" .

строка данных (необязательно)

Видеоконтент.

строка URI (необязательно)

URI видео.

перечисление mime_type (строка) (необязательно)

Тип MIME видео.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
разрешение MediaResolution (необязательно)

Разрешение средств массовой информации.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ThoughtStep

Шаг для размышления.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливать значение "thought" .

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

Краткое содержание Мысли Краткое содержание Содержание (необязательно)

Краткое изложение мысли.

Возможные типы

Полиморфный дискриминатор: type

Текстовое содержимое

Блок текстового содержимого.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "text" .

текстовая строка (обязательно)

Обязательно. Текстовое содержимое.

Аннотации (необязательно )

Информация об источниках для контента, сгенерированного моделью.

Информация об источниках для контента, сгенерированного моделью.

Возможные типы

Полиморфный дискриминатор: type

URLCitation

Аннотация URL-адреса.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "url_citation" .

строка URL (необязательно)

URL.

заголовок (необязательно )

Заголовок URL-адреса.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

FileCitation

Аннотация к файлу.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "file_citation" .

document_uri строка (необязательно)

URI файла.

file_name string (необязательно)

Название файла.

исходная строка (необязательно)

Источник указан для части текста.

объект custom_metadata (необязательно)

Пользователь предоставил метаданные о полученном контексте.

page_number целое число (необязательно)

Номер страницы цитируемого документа, если таковой имеется.

media_id строка (необязательно)

В случае цитирования изображений, пожалуйста, укажите идентификатор медиафайла (Media ID), если таковой имеется.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

PlaceCitation

Аннотация к географическому местоположению.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "place_citation" .

place_id строка (необязательно)

Идентификатор места в формате `places/{place_id}`.

строковое имя (необязательно)

Название места.

строка URL (необязательно)

URI-ссылка на это место.

review_snippets ReviewSnippet (необязательно)

Фрагменты отзывов, используемые для генерации ответов об особенностях того или иного места в Google Maps.

Представляет собой фрагмент отзыва пользователя, отвечающего на вопрос об особенностях конкретного места на Google Maps.

Поля

заголовок (необязательно )

Заголовок рецензии.

строка URL (необязательно)

Ссылка, соответствующая отзыву пользователя на Google Maps.

review_id строка (необязательно)

Идентификатор фрагмента отзыва.

start_index — целое число (необязательно)

Начало сегмента ответа, который относится к данному источнику. Индекс указывает начало сегмента, измеряемое в байтах.

end_index целое число (необязательно)

Конец выделенного сегмента, без учета каких-либо ограничений.

ImageContent

Блок с графическим содержимым.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "image" .

строка данных (необязательно)

Содержание изображения.

строка URI (необязательно)

URI изображения.

перечисление mime_type (строка) (необязательно)

MIME-тип изображения.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
разрешение MediaResolution (необязательно)

Разрешение средств массовой информации.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

FunctionCallStep

Шаг вызова функции инструмента.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "function_call" .

имя строка (обязательно)

Обязательно. Название вызываемого инструмента.

Объект аргументов (обязательный)

Обязательный параметр. Аргументы, передаваемые функции.

строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

CodeExecutionCallStep

Шаг вызова выполнения кода.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "code_execution_call" .

аргументы CodeExecutionCallStepArguments (обязательно)

Обязательный параметр. Аргументы, передаваемые для выполнения кода.

Аргументы, передаваемые для выполнения кода.

Поля

языковой перечисление (строка) (необязательно)

Язык программирования кода.

Возможные значения:

  • python
строка кода (необязательно)

Код, который необходимо выполнить.

строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

UrlContextCallStep

Шаг вызова контекста URL.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "url_context_call" .

arguments UrlContextCallStepArguments (required)

Обязательный параметр. Аргументы, передаваемые в контекст URL.

Аргументы, передаваемые в контекст URL.

Поля

массив URL-адресов (строка) (необязательно)

URL-адреса для загрузки.

строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

McpServerToolCallStep

Шаг вызова инструмента MCPServer.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "mcp_server_tool_call" .

имя строка (обязательно)

Обязательно. Название вызванного инструмента.

server_name — строка (обязательно)

Обязательно. Имя используемого MCP-сервера.

Объект аргументов (обязательный)

Обязательный параметр. JSON-объект с аргументами для функции.

строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

GoogleSearchCallStep

Шаг вызова поиска Google.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "google_search_call" .

arguments GoogleSearchCallStepArguments (required)

Обязательный параметр. Аргументы, которые будут переданы в поиск Google.

Аргументы, которые необходимо передать в поиск Google.

Поля

массив запросов (строка) (необязательно)

Поисковые запросы в интернете для последующего поиска.

search_type enum (string) (optional)

Тип включенной привязки поиска.

Возможные значения:

  • web_search
  • image_search
  • enterprise_web_search
строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

FileSearchCallStep

Шаг вызова поиска файла.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "file_search_call" .

строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

GoogleКартыCallStep

Шаг вызова Google Maps.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "google_maps_call" .

аргументы GoogleMapsCallStepArguments (необязательно)

Аргументы, передаваемые инструменту Google Maps.

Аргументы, передаваемые инструменту Google Maps.

Поля

массив запросов (строка) (необязательно)

Запросы, подлежащие выполнению.

строковый идентификатор (обязательно)

Обязательно. Уникальный идентификатор для данного вызова инструмента.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

FunctionResultStep

Результат вызова функции инструмента.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "function_result" .

строковое имя (необязательно)

Название вызванного инструмента.

is_error логическое значение (необязательно)

Вызвал ли вызов инструмента ошибку?

call_id — строка (обязательно)

Обязательно. Идентификатор, соответствующий идентификатору из блока вызова функции.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

массив результатов ( FunctionResultSubcontent ) или строка (обязательно)

Результат вызова инструмента.

CodeExecutionResultStep

Шаг, определяющий результат выполнения кода.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "code_execution_result" .

строка результата (обязательно)

Обязательно. Результат выполнения кода.

is_error логическое значение (необязательно)

Выполнился ли код с ошибкой?

call_id — строка (обязательно)

Обязательно. Идентификатор, соответствующий идентификатору из блока вызова функции.

строка подписи (необязательно)

Хэш подписи для проверки данных на стороне бэкэнда.

UrlContextResultStep

Шаг получения результата контекста URL.

тип объекта (обязательно)

Описание отсутствует.

Всегда устанавливайте значение "url_context_result" .

result UrlContextResultItem (required)

Required. The results of the URL context.

The result of the URL context.

Поля

url string (optional)

The URL that was fetched.

status enum (string) (optional)

The status of the URL retrieval.

Возможные значения:

  • success
  • error
  • paywall
  • unsafe
is_error boolean (optional)

Whether the URL context resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

GoogleSearchResultStep

Google Search result step.

type object (required)

Описание отсутствует.

Always set to "google_search_result" .

result GoogleSearchResultItem (required)

Required. The results of the Google Search.

The result of the Google Search.

Поля

search_suggestions string (optional)

Web content snippet that can be embedded in a web page or an app webview.

is_error boolean (optional)

Whether the Google Search resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

McpServerToolResultStep

MCPServer tool result step.

type object (required)

Описание отсутствует.

Always set to "mcp_server_tool_result" .

name string (optional)

Name of the tool which is called for this specific tool call.

server_name string (optional)

The name of the used MCP server.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

result array ( FunctionResultSubcontent ) or string (required)

The output from the MCP server call. Can be simple text or rich content.

FileSearchResultStep

File Search result step.

type object (required)

Описание отсутствует.

Always set to "file_search_result" .

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

GoogleMapsResultStep

Google Maps result step.

type object (required)

Описание отсутствует.

Always set to "google_maps_result" .

result GoogleMapsResultItem (required)

Описание отсутствует.

The result of the Google Maps.

Поля

places GoogleMapsResultPlaces (optional)

Описание отсутствует.

Поля

place_id string (optional)

Описание отсутствует.

name string (optional)

Описание отсутствует.

url string (optional)

Описание отсутствует.

review_snippets ReviewSnippet (optional)

Описание отсутствует.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

widget_context_token string (optional)

Описание отсутствует.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

input Content or array ( Content ) or array ( Step ) or string (optional)

The input for the interaction.

response_format ResponseFormat or ResponseFormatList (optional)

Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.

agent_config object (optional)

Configuration parameters for the agent interaction.

Possible Types

Polymorphic discriminator: type

DynamicAgentConfig

Configuration for dynamic agents.

type object (required)

Описание отсутствует.

Always set to "dynamic" .

DeepResearchAgentConfig

Configuration for the Deep Research agent.

type object (required)

Описание отсутствует.

Always set to "deep-research" .

thinking_summaries ThinkingSummaries (optional)

Whether to include thought summaries in the response.

Возможные значения:

  • auto
  • none

visualization enum (string) (optional)

Whether to include visualizations in the response.

Возможные значения:

  • off
  • auto
collaborative_planning boolean (optional)

Enables human-in-the-loop planning for the Deep Research agent. If set to true, the Deep Research agent will provide a research plan in its response. The agent will then proceed only if the user confirms the plan in the next turn.

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

InteractionCompletedEvent

event_type object (required)

Описание отсутствует.

Always set to "interaction.completed" .

interaction Interaction (required)

Required. The completed interaction with empty outputs to reduce the payload size. Use the preceding ContentDelta events for the actual output.

The Interaction resource.

Поля

model ModelOption (optional)

The name of the `Model` used for generating the interaction.

Возможные значения:

  • gemini-2.5-computer-use-preview-10-2025

    An agentic capability model designed for direct interface interaction, allowing Gemini to perceive and navigate digital environments.

  • gemini-2.5-flash

    Наша первая гибридная модель рассуждений, поддерживающая контекстное окно в 1 миллион токенов и имеющая бюджеты мышления.

  • gemini-2.5-flash-image

    Our native image generation model, optimized for speed, flexibility, and contextual understanding. Text input and output is priced the same as 2.5 Flash.

  • gemini-2.5-flash-lite

    Наша самая компактная и экономичная модель, предназначенная для масштабного использования.

  • gemini-2.5-flash-lite-preview-09-2025

    The latest model based on Gemini 2.5 Flash lite optimized for cost-efficiency, high throughput and high quality.

  • gemini-2.5-flash-native-audio-preview-12-2025

    Our native audio models optimized for higher quality audio outputs with better pacing, voice naturalness, verbosity, and mood.

  • gemini-2.5-flash-preview-09-2025

    The latest model based on the 2.5 Flash model. 2.5 Flash Preview is best for large scale processing, low-latency, high volume tasks that require thinking, and agentic use cases.

  • gemini-2.5-flash-preview-tts

    Our 2.5 Flash text-to-speech model optimized for powerful, low-latency controllable speech generation.

  • gemini-2.5-pro

    Our state-of-the-art multipurpose model, which excels at coding and complex reasoning tasks.

  • gemini-2.5-pro-preview-tts

    Наша аудиомодель преобразования текста в речь 2.5 Pro оптимизирована для мощного генерирования речи с низкой задержкой, что обеспечивает более естественный результат и упрощает управление голосовыми подсказками.

  • gemini-3-flash-preview

    Наша самая интеллектуальная модель, созданная для скорости, сочетает в себе передовые методы разведки с превосходными возможностями поиска и посадки на землю.

  • gemini-3-pro-image-preview

    Современная модель генерации и редактирования изображений.

  • gemini-3-pro-preview

    Our most intelligent model with SOTA reasoning and multimodal understanding, and powerful agentic and vibe coding capabilities.

  • gemini-3.1-pro-preview

    Our latest SOTA reasoning model with unprecedented depth and nuance, and powerful multimodal understanding and coding capabilities.

  • gemini-3.1-flash-image-preview

    Профессиональный уровень визуального интеллекта с эффективностью, сравнимой со скоростью Flash, и возможностями генерации, основанной на реальных данных.

  • gemini-3.1-flash-lite-preview

    Наша наиболее экономичная модель, оптимизированная для выполнения больших объемов агентских задач, перевода и простой обработки данных.

  • gemini-3.1-flash-tts-preview

    Gemini 3.1 Flash TTS: Мощная система генерации речи с низкой задержкой. Наслаждайтесь естественным звучанием, управляемыми подсказками и новыми выразительными аудиотегами для точного управления озвучиванием.

  • lyria-3-clip-preview

    Наша модель генерации музыки с низкой задержкой оптимизирована для высококачественных аудиоклипов и точного контроля ритма.

  • lyria-3-pro-preview

    Наша передовая генеративная модель, способная обрабатывать целые композиции и обладающая глубоким пониманием композиции, оптимизирована для точного структурного контроля и сложных переходов между различными музыкальными стилями.

The model that will complete your prompt.\n\nSee [models](https://ai.google.dev/gemini-api/docs/models) for additional details.

agent AgentOption (optional)

The name of the `Agent` used for generating the interaction.

Возможные значения:

  • deep-research-pro-preview-12-2025

    Gemini Deep Research Agent

  • deep-research-preview-04-2026

    Gemini Deep Research Agent

  • deep-research-max-preview-04-2026

    Gemini Deep Research Max Agent

The agent to interact with.

id string (optional)

Required. Output only. A unique identifier for the interaction completion.

status enum (string) (optional)

Required. Output only. The status of the interaction.

Возможные значения:

  • in_progress
  • requires_action
  • completed
  • failed
  • cancelled
  • incomplete
created string (optional)

Required. Output only. The time at which the response was created in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

updated string (optional)

Required. Output only. The time at which the response was last updated in ISO 8601 format (YYYY-MM-DDThh:mm:ssZ).

role string (optional)

Output only. The role of the interaction.

system_instruction string (optional)

System instruction for the interaction.

tools Tool (optional)

A list of tool declarations the model may call during interaction.

A tool that can be used by the model.

Possible Types

Polymorphic discriminator: type

Функция

A tool that can be used by the model.

type object (required)

Описание отсутствует.

Always set to "function" .

name string (optional)

Название функции.

description string (optional)

A description of the function.

parameters object (optional)

The JSON Schema for the function's parameters.

Выполнение кода

A tool that can be used by the model to execute code.

type object (required)

Описание отсутствует.

Always set to "code_execution" .

UrlContext

A tool that can be used by the model to fetch URL context.

type object (required)

Описание отсутствует.

Always set to "url_context" .

Использование компьютера

A tool that can be used by the model to interact with the computer.

type object (required)

Описание отсутствует.

Always set to "computer_use" .

environment enum (string) (optional)

The environment being operated.

Возможные значения:

  • browser
excluded_predefined_functions array (string) (optional)

The list of predefined functions that are excluded from the model call.

McpServer

A MCPServer is a server that can be called by the model to perform actions.

type object (required)

Описание отсутствует.

Always set to "mcp_server" .

name string (optional)

The name of the MCPServer.

url string (optional)

The full URL for the MCPServer endpoint. Example: "https://api.example.com/mcp"

headers object (optional)

Optional: Fields for authentication headers, timeouts, etc., if needed.

allowed_tools AllowedTools (optional)

The allowed tools.

The configuration for allowed tools.

Поля

mode ToolChoiceType (optional)

The mode of the tool choice.

Возможные значения:

  • auto
  • any
  • none
  • validated

tools array (string) (optional)

The names of the allowed tools.

GoogleSearch

A tool that can be used by the model to search Google.

type object (required)

Описание отсутствует.

Always set to "google_search" .

search_types array (enum (string)) (optional)

The types of search grounding to enable.

Возможные значения:

  • web_search
  • image_search
  • enterprise_web_search
Поиск файлов

A tool that can be used by the model to search files.

type object (required)

Описание отсутствует.

Always set to "file_search" .

file_search_store_names array (string) (optional)

The file search store names to search.

top_k integer (optional)

The number of semantic retrieval chunks to retrieve.

metadata_filter string (optional)

Metadata filter to apply to the semantic retrieval documents and chunks.

Google Карты

A tool that can be used by the model to call Google Maps.

type object (required)

Описание отсутствует.

Always set to "google_maps" .

enable_widget boolean (optional)

Whether to return a widget context token in the tool call result of the response.

latitude number (optional)

The latitude of the user's location.

longitude number (optional)

The longitude of the user's location.

Извлечение

A tool that can be used by the model to retrieve files.

type object (required)

Описание отсутствует.

Always set to "retrieval" .

retrieval_types array (enum (string)) (optional)

The types of file retrieval to enable.

Возможные значения:

  • vertex_ai_search
vertex_ai_search_config VertexAISearchConfig (optional)

Used to specify configuration for VertexAISearch.

Used to specify configuration for VertexAISearch.

Поля

engine string (optional)

Optional. Used to specify Vertex AI Search engine.

datastores array (string) (optional)

Optional. Used to specify Vertex AI Search datastores.

usage Usage (optional)

Output only. Statistics on the interaction request's token usage.

Statistics on the interaction request's token usage.

Поля

total_input_tokens integer (optional)

Number of tokens in the prompt (context).

input_tokens_by_modality ModalityTokens (optional)

A breakdown of input token usage by modality.

The token count for a single response modality.

Поля

modality ResponseModality (optional)

The modality associated with the token count.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

tokens integer (optional)

Number of tokens for the modality.

total_cached_tokens integer (optional)

Number of tokens in the cached part of the prompt (the cached content).

cached_tokens_by_modality ModalityTokens (optional)

A breakdown of cached token usage by modality.

The token count for a single response modality.

Поля

modality ResponseModality (optional)

The modality associated with the token count.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

tokens integer (optional)

Number of tokens for the modality.

total_output_tokens integer (optional)

Total number of tokens across all the generated responses.

output_tokens_by_modality ModalityTokens (optional)

A breakdown of output token usage by modality.

The token count for a single response modality.

Поля

modality ResponseModality (optional)

The modality associated with the token count.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

tokens integer (optional)

Number of tokens for the modality.

total_tool_use_tokens integer (optional)

Number of tokens present in tool-use prompt(s).

tool_use_tokens_by_modality ModalityTokens (optional)

A breakdown of tool-use token usage by modality.

The token count for a single response modality.

Поля

modality ResponseModality (optional)

The modality associated with the token count.

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

tokens integer (optional)

Number of tokens for the modality.

total_thought_tokens integer (optional)

Number of tokens of thoughts for thinking models.

total_tokens integer (optional)

Total token count for the interaction request (prompt + responses + other internal tokens).

grounding_tool_count GroundingToolCount (optional)

Grounding tool count.

The number of grounding tool counts.

Поля

type enum (string) (optional)

The grounding tool type associated with the count.

Возможные значения:

  • google_search
  • google_maps
  • retrieval
count integer (optional)

The number of grounding tool counts.

response_modalities ResponseModality (optional)

The requested modalities of the response (TEXT, IMAGE, AUDIO).

Возможные значения:

  • text
  • image
  • audio
  • video
  • document

response_mime_type string (optional)

The mime type of the response. This is required if response_format is set.

previous_interaction_id string (optional)

The ID of the previous interaction, if any.

service_tier ServiceTier (optional)

The service tier for the interaction.

Возможные значения:

  • flex
  • standard
  • priority

webhook_config WebhookConfig (optional)

Optional. Webhook configuration for receiving notifications when the interaction completes.

Message for configuring webhook events for a request.

Поля

uris array (string) (optional)

Optional. If set, these webhook URIs will be used for webhook events instead of the registered webhooks.

user_metadata object (optional)

Optional. The user metadata that will be returned on each event emission to the webhooks.

steps Step (optional)

Output only. The steps that make up the interaction.

A step in the interaction.

Possible Types

Polymorphic discriminator: type

UserInputStep

Input provided by the user.

type object (required)

Описание отсутствует.

Always set to "user_input" .

content Content (optional)

Описание отсутствует.

The content of the response.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

AudioContent

An audio content block.

type object (required)

Описание отсутствует.

Always set to "audio" .

data string (optional)

The audio content.

uri string (optional)

The URI of the audio.

mime_type enum (string) (optional)

The mime type of the audio.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
channels integer (optional)

The number of audio channels.

sample_rate integer (optional)

The sample rate of the audio.

DocumentContent

A document content block.

type object (required)

Описание отсутствует.

Always set to "document" .

data string (optional)

The document content.

uri string (optional)

The URI of the document.

mime_type enum (string) (optional)

The mime type of the document.

Возможные значения:

  • application/pdf
VideoContent

A video content block.

type object (required)

Описание отсутствует.

Always set to "video" .

data string (optional)

The video content.

uri string (optional)

The URI of the video.

mime_type enum (string) (optional)

The mime type of the video.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ModelOutputStep

Output generated by the model.

type object (required)

Описание отсутствует.

Always set to "model_output" .

content Content (optional)

Описание отсутствует.

The content of the response.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

AudioContent

An audio content block.

type object (required)

Описание отсутствует.

Always set to "audio" .

data string (optional)

The audio content.

uri string (optional)

The URI of the audio.

mime_type enum (string) (optional)

The mime type of the audio.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
channels integer (optional)

The number of audio channels.

sample_rate integer (optional)

The sample rate of the audio.

DocumentContent

A document content block.

type object (required)

Описание отсутствует.

Always set to "document" .

data string (optional)

The document content.

uri string (optional)

The URI of the document.

mime_type enum (string) (optional)

The mime type of the document.

Возможные значения:

  • application/pdf
VideoContent

A video content block.

type object (required)

Описание отсутствует.

Always set to "video" .

data string (optional)

The video content.

uri string (optional)

The URI of the video.

mime_type enum (string) (optional)

The mime type of the video.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ThoughtStep

A thought step.

type object (required)

Описание отсутствует.

Always set to "thought" .

signature string (optional)

A signature hash for backend validation.

summary ThoughtSummaryContent (optional)

A summary of the thought.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

FunctionCallStep

A function tool call step.

type object (required)

Описание отсутствует.

Always set to "function_call" .

name string (required)

Required. The name of the tool to call.

arguments object (required)

Required. The arguments to pass to the function.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

CodeExecutionCallStep

Code execution call step.

type object (required)

Описание отсутствует.

Always set to "code_execution_call" .

arguments CodeExecutionCallStepArguments (required)

Required. The arguments to pass to the code execution.

The arguments to pass to the code execution.

Поля

language enum (string) (optional)

Programming language of the `code`.

Возможные значения:

  • python
code string (optional)

Код, который необходимо выполнить.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

UrlContextCallStep

URL context call step.

type object (required)

Описание отсутствует.

Always set to "url_context_call" .

arguments UrlContextCallStepArguments (required)

Required. The arguments to pass to the URL context.

The arguments to pass to the URL context.

Поля

urls array (string) (optional)

The URLs to fetch.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

McpServerToolCallStep

MCPServer tool call step.

type object (required)

Описание отсутствует.

Always set to "mcp_server_tool_call" .

name string (required)

Required. The name of the tool which was called.

server_name string (required)

Required. The name of the used MCP server.

arguments object (required)

Required. The JSON object of arguments for the function.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

GoogleSearchCallStep

Google Search call step.

type object (required)

Описание отсутствует.

Always set to "google_search_call" .

arguments GoogleSearchCallStepArguments (required)

Required. The arguments to pass to Google Search.

The arguments to pass to Google Search.

Поля

queries array (string) (optional)

Поисковые запросы в интернете для последующего поиска.

search_type enum (string) (optional)

The type of search grounding enabled.

Возможные значения:

  • web_search
  • image_search
  • enterprise_web_search
id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

FileSearchCallStep

File Search call step.

type object (required)

Описание отсутствует.

Always set to "file_search_call" .

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

GoogleMapsCallStep

Google Maps call step.

type object (required)

Описание отсутствует.

Always set to "google_maps_call" .

arguments GoogleMapsCallStepArguments (optional)

The arguments to pass to the Google Maps tool.

The arguments to pass to the Google Maps tool.

Поля

queries array (string) (optional)

The queries to be executed.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

FunctionResultStep

Result of a function tool call.

type object (required)

Описание отсутствует.

Always set to "function_result" .

name string (optional)

The name of the tool that was called.

is_error boolean (optional)

Whether the tool call resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

result array ( FunctionResultSubcontent ) or string (required)

The result of the tool call.

CodeExecutionResultStep

Code execution result step.

type object (required)

Описание отсутствует.

Always set to "code_execution_result" .

result string (required)

Required. The output of the code execution.

is_error boolean (optional)

Whether the code execution resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

UrlContextResultStep

URL context result step.

type object (required)

Описание отсутствует.

Always set to "url_context_result" .

result UrlContextResultItem (required)

Required. The results of the URL context.

The result of the URL context.

Поля

url string (optional)

The URL that was fetched.

status enum (string) (optional)

The status of the URL retrieval.

Возможные значения:

  • success
  • error
  • paywall
  • unsafe
is_error boolean (optional)

Whether the URL context resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

GoogleSearchResultStep

Google Search result step.

type object (required)

Описание отсутствует.

Always set to "google_search_result" .

result GoogleSearchResultItem (required)

Required. The results of the Google Search.

The result of the Google Search.

Поля

search_suggestions string (optional)

Web content snippet that can be embedded in a web page or an app webview.

is_error boolean (optional)

Whether the Google Search resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

McpServerToolResultStep

MCPServer tool result step.

type object (required)

Описание отсутствует.

Always set to "mcp_server_tool_result" .

name string (optional)

Name of the tool which is called for this specific tool call.

server_name string (optional)

The name of the used MCP server.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

result array ( FunctionResultSubcontent ) or string (required)

The output from the MCP server call. Can be simple text or rich content.

FileSearchResultStep

File Search result step.

type object (required)

Описание отсутствует.

Always set to "file_search_result" .

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

GoogleMapsResultStep

Google Maps result step.

type object (required)

Описание отсутствует.

Always set to "google_maps_result" .

result GoogleMapsResultItem (required)

Описание отсутствует.

The result of the Google Maps.

Поля

places GoogleMapsResultPlaces (optional)

Описание отсутствует.

Поля

place_id string (optional)

Описание отсутствует.

name string (optional)

Описание отсутствует.

url string (optional)

Описание отсутствует.

review_snippets ReviewSnippet (optional)

Описание отсутствует.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

widget_context_token string (optional)

Описание отсутствует.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

input Content or array ( Content ) or array ( Step ) or string (optional)

The input for the interaction.

response_format ResponseFormat or ResponseFormatList (optional)

Enforces that the generated response is a JSON object that complies with the JSON schema specified in this field.

agent_config object (optional)

Configuration parameters for the agent interaction.

Possible Types

Polymorphic discriminator: type

DynamicAgentConfig

Configuration for dynamic agents.

type object (required)

Описание отсутствует.

Always set to "dynamic" .

DeepResearchAgentConfig

Configuration for the Deep Research agent.

type object (required)

Описание отсутствует.

Always set to "deep-research" .

thinking_summaries ThinkingSummaries (optional)

Whether to include thought summaries in the response.

Возможные значения:

  • auto
  • none

visualization enum (string) (optional)

Whether to include visualizations in the response.

Возможные значения:

  • off
  • auto
collaborative_planning boolean (optional)

Enables human-in-the-loop planning for the Deep Research agent. If set to true, the Deep Research agent will provide a research plan in its response. The agent will then proceed only if the user confirms the plan in the next turn.

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

InteractionStatusUpdate

event_type object (required)

Описание отсутствует.

Always set to "interaction.status_update" .

interaction_id string (required)

Описание отсутствует.

status enum (string) (required)

Описание отсутствует.

Возможные значения:

  • in_progress
  • requires_action
  • completed
  • failed
  • cancelled
  • incomplete
event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

ErrorEvent

event_type object (required)

Описание отсутствует.

Always set to "error" .

error Error (optional)

Описание отсутствует.

Error message from an interaction.

Поля

code string (optional)

A URI that identifies the error type.

message string (optional)

A human-readable error message.

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

StepStart

event_type object (required)

Описание отсутствует.

Always set to "step.start" .

index integer (required)

Описание отсутствует.

step Step (required)

Описание отсутствует.

A step in the interaction.

Possible Types

Polymorphic discriminator: type

UserInputStep

Input provided by the user.

type object (required)

Описание отсутствует.

Always set to "user_input" .

content Content (optional)

Описание отсутствует.

The content of the response.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

AudioContent

An audio content block.

type object (required)

Описание отсутствует.

Always set to "audio" .

data string (optional)

The audio content.

uri string (optional)

The URI of the audio.

mime_type enum (string) (optional)

The mime type of the audio.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
channels integer (optional)

The number of audio channels.

sample_rate integer (optional)

The sample rate of the audio.

DocumentContent

A document content block.

type object (required)

Описание отсутствует.

Always set to "document" .

data string (optional)

The document content.

uri string (optional)

The URI of the document.

mime_type enum (string) (optional)

The mime type of the document.

Возможные значения:

  • application/pdf
VideoContent

A video content block.

type object (required)

Описание отсутствует.

Always set to "video" .

data string (optional)

The video content.

uri string (optional)

The URI of the video.

mime_type enum (string) (optional)

The mime type of the video.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ModelOutputStep

Output generated by the model.

type object (required)

Описание отсутствует.

Always set to "model_output" .

content Content (optional)

Описание отсутствует.

The content of the response.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

AudioContent

An audio content block.

type object (required)

Описание отсутствует.

Always set to "audio" .

data string (optional)

The audio content.

uri string (optional)

The URI of the audio.

mime_type enum (string) (optional)

The mime type of the audio.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
channels integer (optional)

The number of audio channels.

sample_rate integer (optional)

The sample rate of the audio.

DocumentContent

A document content block.

type object (required)

Описание отсутствует.

Always set to "document" .

data string (optional)

The document content.

uri string (optional)

The URI of the document.

mime_type enum (string) (optional)

The mime type of the document.

Возможные значения:

  • application/pdf
VideoContent

A video content block.

type object (required)

Описание отсутствует.

Always set to "video" .

data string (optional)

The video content.

uri string (optional)

The URI of the video.

mime_type enum (string) (optional)

The mime type of the video.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ThoughtStep

A thought step.

type object (required)

Описание отсутствует.

Always set to "thought" .

signature string (optional)

A signature hash for backend validation.

summary ThoughtSummaryContent (optional)

A summary of the thought.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

FunctionCallStep

A function tool call step.

type object (required)

Описание отсутствует.

Always set to "function_call" .

name string (required)

Required. The name of the tool to call.

arguments object (required)

Required. The arguments to pass to the function.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

CodeExecutionCallStep

Code execution call step.

type object (required)

Описание отсутствует.

Always set to "code_execution_call" .

arguments CodeExecutionCallStepArguments (required)

Required. The arguments to pass to the code execution.

The arguments to pass to the code execution.

Поля

language enum (string) (optional)

Programming language of the `code`.

Возможные значения:

  • python
code string (optional)

Код, который необходимо выполнить.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

UrlContextCallStep

URL context call step.

type object (required)

Описание отсутствует.

Always set to "url_context_call" .

arguments UrlContextCallStepArguments (required)

Required. The arguments to pass to the URL context.

The arguments to pass to the URL context.

Поля

urls array (string) (optional)

The URLs to fetch.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

McpServerToolCallStep

MCPServer tool call step.

type object (required)

Описание отсутствует.

Always set to "mcp_server_tool_call" .

name string (required)

Required. The name of the tool which was called.

server_name string (required)

Required. The name of the used MCP server.

arguments object (required)

Required. The JSON object of arguments for the function.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

GoogleSearchCallStep

Google Search call step.

type object (required)

Описание отсутствует.

Always set to "google_search_call" .

arguments GoogleSearchCallStepArguments (required)

Required. The arguments to pass to Google Search.

The arguments to pass to Google Search.

Поля

queries array (string) (optional)

Поисковые запросы в интернете для последующего поиска.

search_type enum (string) (optional)

The type of search grounding enabled.

Возможные значения:

  • web_search
  • image_search
  • enterprise_web_search
id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

FileSearchCallStep

File Search call step.

type object (required)

Описание отсутствует.

Always set to "file_search_call" .

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

GoogleMapsCallStep

Google Maps call step.

type object (required)

Описание отсутствует.

Always set to "google_maps_call" .

arguments GoogleMapsCallStepArguments (optional)

The arguments to pass to the Google Maps tool.

The arguments to pass to the Google Maps tool.

Поля

queries array (string) (optional)

The queries to be executed.

id string (required)

Required. A unique ID for this specific tool call.

signature string (optional)

A signature hash for backend validation.

FunctionResultStep

Result of a function tool call.

type object (required)

Описание отсутствует.

Always set to "function_result" .

name string (optional)

The name of the tool that was called.

is_error boolean (optional)

Whether the tool call resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

result array ( FunctionResultSubcontent ) or string (required)

The result of the tool call.

CodeExecutionResultStep

Code execution result step.

type object (required)

Описание отсутствует.

Always set to "code_execution_result" .

result string (required)

Required. The output of the code execution.

is_error boolean (optional)

Whether the code execution resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

UrlContextResultStep

URL context result step.

type object (required)

Описание отсутствует.

Always set to "url_context_result" .

result UrlContextResultItem (required)

Required. The results of the URL context.

The result of the URL context.

Поля

url string (optional)

The URL that was fetched.

status enum (string) (optional)

The status of the URL retrieval.

Возможные значения:

  • success
  • error
  • paywall
  • unsafe
is_error boolean (optional)

Whether the URL context resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

GoogleSearchResultStep

Google Search result step.

type object (required)

Описание отсутствует.

Always set to "google_search_result" .

result GoogleSearchResultItem (required)

Required. The results of the Google Search.

The result of the Google Search.

Поля

search_suggestions string (optional)

Web content snippet that can be embedded in a web page or an app webview.

is_error boolean (optional)

Whether the Google Search resulted in an error.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

McpServerToolResultStep

MCPServer tool result step.

type object (required)

Описание отсутствует.

Always set to "mcp_server_tool_result" .

name string (optional)

Name of the tool which is called for this specific tool call.

server_name string (optional)

The name of the used MCP server.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

result array ( FunctionResultSubcontent ) or string (required)

The output from the MCP server call. Can be simple text or rich content.

FileSearchResultStep

File Search result step.

type object (required)

Описание отсутствует.

Always set to "file_search_result" .

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

GoogleMapsResultStep

Google Maps result step.

type object (required)

Описание отсутствует.

Always set to "google_maps_result" .

result GoogleMapsResultItem (required)

Описание отсутствует.

The result of the Google Maps.

Поля

places GoogleMapsResultPlaces (optional)

Описание отсутствует.

Поля

place_id string (optional)

Описание отсутствует.

name string (optional)

Описание отсутствует.

url string (optional)

Описание отсутствует.

review_snippets ReviewSnippet (optional)

Описание отсутствует.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

widget_context_token string (optional)

Описание отсутствует.

call_id string (required)

Required. ID to match the ID from the function call block.

signature string (optional)

A signature hash for backend validation.

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

StepDelta

event_type object (required)

Описание отсутствует.

Always set to "step.delta" .

index integer (required)

Описание отсутствует.

delta StepDeltaData (required)

Описание отсутствует.

Possible Types

Polymorphic discriminator: type

TextDelta

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Описание отсутствует.

ImageDelta

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

Описание отсутствует.

uri string (optional)

Описание отсутствует.

mime_type enum (string) (optional)

Описание отсутствует.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

AudioDelta

type object (required)

Описание отсутствует.

Always set to "audio" .

data string (optional)

Описание отсутствует.

uri string (optional)

Описание отсутствует.

mime_type enum (string) (optional)

Описание отсутствует.

Возможные значения:

  • audio/wav
  • audio/mp3
  • audio/aiff
  • audio/aac
  • audio/ogg
  • audio/flac
  • audio/mpeg
  • audio/m4a
  • audio/l16
  • audio/opus
  • audio/alaw
  • audio/mulaw
rate integer (optional)

Deprecated. Use sample_rate instead. The value is ignored.

sample_rate integer (optional)

The sample rate of the audio.

channels integer (optional)

The number of audio channels.

DocumentDelta

type object (required)

Описание отсутствует.

Always set to "document" .

data string (optional)

Описание отсутствует.

uri string (optional)

Описание отсутствует.

mime_type enum (string) (optional)

Описание отсутствует.

Возможные значения:

  • application/pdf
VideoDelta

type object (required)

Описание отсутствует.

Always set to "video" .

data string (optional)

Описание отсутствует.

uri string (optional)

Описание отсутствует.

mime_type enum (string) (optional)

Описание отсутствует.

Возможные значения:

  • video/mp4
  • video/mpeg
  • video/mpg
  • video/mov
  • video/avi
  • video/x-flv
  • video/webm
  • video/wmv
  • video/3gpp
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ThoughtSummaryDelta

type object (required)

Описание отсутствует.

Always set to "thought_summary" .

content ThoughtSummaryContent (optional)

A new summary item to be added to the thought.

Possible Types

Polymorphic discriminator: type

Текстовое содержимое

A text content block.

type object (required)

Описание отсутствует.

Always set to "text" .

text string (required)

Required. The text content.

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ImageContent

An image content block.

type object (required)

Описание отсутствует.

Always set to "image" .

data string (optional)

The image content.

uri string (optional)

The URI of the image.

mime_type enum (string) (optional)

The mime type of the image.

Возможные значения:

  • image/png
  • image/jpeg
  • image/webp
  • image/heic
  • image/heif
  • image/gif
  • image/bmp
  • image/tiff
resolution MediaResolution (optional)

The resolution of the media.

Возможные значения:

  • low
  • medium
  • high
  • ultra_high

ThoughtSignatureDelta

type object (required)

Описание отсутствует.

Always set to "thought_signature" .

signature string (optional)

Signature to match the backend source to be part of the generation.

TextAnnotationDelta

type object (required)

Описание отсутствует.

Always set to "text_annotation_delta" .

annotations Annotation (optional)

Citation information for model-generated content.

Citation information for model-generated content.

Possible Types

Polymorphic discriminator: type

UrlCitation

A URL citation annotation.

type object (required)

Описание отсутствует.

Always set to "url_citation" .

url string (optional)

The URL.

title string (optional)

The title of the URL.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

FileCitation

A file citation annotation.

type object (required)

Описание отсутствует.

Always set to "file_citation" .

document_uri string (optional)

The URI of the file.

file_name string (optional)

Название файла.

source string (optional)

Source attributed for a portion of the text.

custom_metadata object (optional)

User provided metadata about the retrieved context.

page_number integer (optional)

Page number of the cited document, if applicable.

media_id string (optional)

Media ID in-case of image citations, if applicable.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

PlaceCitation

A place citation annotation.

type object (required)

Описание отсутствует.

Always set to "place_citation" .

place_id string (optional)

The ID of the place, in `places/{place_id}` format.

name string (optional)

Title of the place.

url string (optional)

URI reference of the place.

review_snippets ReviewSnippet (optional)

Snippets of reviews that are used to generate answers about the features of a given place in Google Maps.

Encapsulates a snippet of a user review that answers a question about the features of a specific place in Google Maps.

Поля

title string (optional)

Заголовок рецензии.

url string (optional)

A link that corresponds to the user review on Google Maps.

review_id string (optional)

The ID of the review snippet.

start_index integer (optional)

Start of segment of the response that is attributed to this source. Index indicates the start of the segment, measured in bytes.

end_index integer (optional)

End of the attributed segment, exclusive.

ArgumentsDelta

type object (required)

Описание отсутствует.

Always set to "arguments_delta" .

partial_arguments string (optional)

Описание отсутствует.

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

StepStop

event_type object (required)

Описание отсутствует.

Always set to "step.stop" .

index integer (required)

Описание отсутствует.

event_id string (optional)

The event_id token to be used to resume the interaction stream, from this event.

Примеры

Взаимодействие создано

{
  "event_type": "interaction.created",
  "interaction": {
    "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
    "model": "gemini-3-flash-preview",
    "status": "in_progress",
    "created": "2025-12-04T15:01:45Z",
    "updated": "2025-12-04T15:01:45Z"
  },
  "event_id": "evt_123"
}

Взаимодействие завершено

{
  "event_type": "interaction.completed",
  "interaction": {
    "id": "v1_ChdXS0l4YWZXTk9xbk0xZThQczhEcmlROBIXV0tJeGFmV05PcW5NMWU4UHM4RHJpUTg",
    "model": "gemini-3-flash-preview",
    "status": "completed",
    "created": "2025-12-04T15:01:45Z",
    "updated": "2025-12-04T15:01:45Z"
  },
  "event_id": "evt_123"
}

Interaction Status Update

{
  "event_type": "interaction.status_update",
  "interaction_id": "v1_ChdTMjQ0YWJ5TUF1TzcxZThQdjRpcnFRcxIXUzI0NGFieU1BdU83MWU4UHY0aXJxUXM",
  "status": "in_progress"
}

Error Event

{
  "event_type": "error",
  "error": {
    "message": "Failed to get completed interaction: Result not found.",
    "code": "not_found"
  }
}

Шаг Начало

{
  "event_type": "step.start",
  "index": 0,
  "step": {
    "type": "model_output"
  }
}

Step Delta

{
  "event_type": "step.delta",
  "index": 0,
  "delta": {
    "type": "text",
    "text": "Hello"
  }
}

Шаг Стоп

{
  "event_type": "step.stop",
  "index": 0
}