# Gemini 3.1 Flash live 预览版

Gemini 3.1 Flash Live Preview 是我们的传统预览音频到音频模型，适用于实时对话和语音优先的 AI 应用程序。

{% callout type="note" %}
对于新的应用程序和生产工作负载，我们建议迁移到 [Gemini 3.8 Live](/docs/models/gemini-3.8-live)
(`gemini-3.8-live`）或 [Gemini 3.8 Live Extended Thinking](/docs/models/gemini-3.8-live-extended-thinking)
(`gemini-3.8-live-extended-thinking`).
{% /callout %}

{% button
   href="https://aistudio.google.com/live?model=gemini-3.1-flash-live-preview"
   variant="ais" %}
在 Google AI Studio 中体验
{% /button %}

## 文档  {% #documentation %}

参观 [Live API](/docs/live-api) 全面涵盖特性和功能的指南。

## gemini-3.1-flash-live-preview  {% #gemini-31-flash-live-preview %}

{% doc-table variant="model" %}
{% doc-row header="true" %}
{% doc-cell %}
属性
{% /doc-cell %}

{% doc-cell %}
说明
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="id_card" /%}模型代码
{% /section %}
{% /doc-cell %}

{% doc-cell %}
`gemini-3.1-flash-live-preview`
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="save" /%}支持的数据类型
{% /section %}
{% /doc-cell %}

{% doc-cell %}
**输入** 文字、图像、音频

**输出** 文本和音频
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="token_auto" /%}token 限制{% sup %}[[*]](/docs/tokens){% /sup %}
{% /section %}
{% /doc-cell %}

{% doc-cell %}
**输入token限制** 131,072

**输出 token 限制** 65,536
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="handyman" /%}功能
{% /section %}
{% /doc-cell %}

{% doc-cell %}
{% section class="three-column-grid" %}
{% section %}
[**音频生成**](/docs/speech-generation)

{% badge type="supported" /%}
{% /section %}

{% section %}
[**代码执行**](/docs/code-execution)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**上下文缓存**](/docs/caching)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**文件搜索**](/docs/file-search)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**函数调用**](/docs/function-calling)

{% badge type="supported" /%}
{% /section %}

{% section %}
[**使用 Google 地图提供事实依据**](/docs/maps-grounding)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**使用 Google 搜索提供事实依据**](/docs/google-search)

{% badge type="supported" /%}
{% /section %}

{% section %}
[**图像生成**](/docs/image-generation)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**Live API**](/docs/live-api)

{% badge type="supported" /%}
{% /section %}

{% section %}
[**结构化输出**](/docs/structured-output)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**思考**](/docs/thinking)

{% badge type="supported" /%}
{% /section %}

{% section %}
[**URL 上下文**](/docs/url-context)

{% badge type="not-supported" /%}
{% /section %}
{% /section %}
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="speed" /%}消费选择
{% /section %}
{% /doc-cell %}

{% doc-cell %}
{% section class="three-column-grid" %}
{% section %}
[**Batch API**](/docs/batch-api)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**弹性推理**](/docs/flex-inference)

{% badge type="not-supported" /%}
{% /section %}

{% section %}
[**优先推理**](/docs/priority-inference)

{% badge type="not-supported" /%}
{% /section %}
{% /section %}
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="123" /%}版本
{% /section %}
{% /doc-cell %}

{% doc-cell %}
阅读 [模型版本模式](/docs/models#model-versions) 了解更多详情。

* 预览： `gemini-3.1-flash-live-preview`
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="calendar_month" /%}最新更新
{% /section %}
{% /doc-cell %}

{% doc-cell %}
三月 2026
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="id_card" /%}模型详情
{% /section %}
{% /doc-cell %}

{% doc-cell %}
[模型详情](https://deepmind.google/models/model-cards/gemini-3-1-flash-audio/)
{% /doc-cell %}
{% /doc-row %}

{% doc-row header="false" %}
{% doc-cell %}
{% section class="model-property" %}
{% icon name="paid" /%}价格
{% /section %}
{% /doc-cell %}

{% doc-cell %}
[价格](/docs/pricing#gemini-3.8-live)
{% /doc-cell %}
{% /doc-row %}
{% /doc-table %}

## 从 Gemini 2.5 Flash Live 迁移  {% #migrating %}

Gemini 3.1 Flash Live Preview 针对低延迟、实时对话进行了优化。当迁移自 `gemini-2.5-flash-native-audio-preview-12-2025`，考虑以下因素：

- **模型串**：更新您的模型字符串 `gemini-2.5-flash-native-audio-preview-12-2025` 到 `gemini-3.1-flash-live-preview`.

- **思维配置**: Gemini 3.1 使用 `thinkingLevel` （设置如下 `minimal`, `low`, `medium`, 和 `high`）而不是 `thinkingBudget`。默认为 `minimal` 以优化最低延迟。参见 [思维水平和预算](/docs/thinking?generate-content=true#levels-budgets).

- **服务器事件**: 单个 [`BidiGenerateContentServerContent`](/api-reference/live#BidiGenerateContentServerContent)
  事件现在可以同时包含多个内容部分（例如，音频块和脚本）。更新您的代码以处理每个事件中的所有部分，以避免丢失内容。

- **客户内容**: `send_client_content` 支持在会话中附加文本或结构化上下文以及播种初始历史记录（设置 [`initial_history_in_client_content`](/api-reference/live#HistoryConfig)
  在 [`history_config`](/api-reference/live#BidiGenerateContentSetup)）。您还可以使用 [`send_realtime_input`](/api-reference/live#BidiGenerateContentRealtimeInput)
  流式传输实时文本、音频或视频块。参见 [增量内容更新](/docs/live-api/capabilities#incremental-updates).

- **转弯覆盖范围**：默认为 [`TURN_INCLUDES_AUDIO_ACTIVITY_AND_ALL_VIDEO`](/api-reference/live#RealtimeInputConfig.TurnCoverage) 而不是 `TURN_INCLUDES_ONLY_ACTIVITY`。该模型现在包括检测到的音频活动和所有视频帧。如果您的应用程序当前发送持续的视频帧流，您可能需要更新应用程序以仅在存在音频活动时发送视频帧，以避免产生额外费用。

- **异步函数调用**: 尚不支持。 函数调用仅是同步的。在您发送工具响应之前，模型不会开始响应。参见 [异步函数调用](/docs/live-api/tools#async-function-calling).

- **主动音频和情感对话**：Gemini 3.1 Flash Live 尚不支持这些功能。从代码中删除这些功能的任何配置。参见 [主动音频](/docs/live-api/capabilities#proactive-audio) 和 [情感对话](/docs/live-api/capabilities#affective-dialog).

有关详细功能比较，请参阅 [型号对比](/docs/live-api/capabilities#model-comparison) 功能指南中的表。
