> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeroruntime.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Gemini

> Python API reference for the gemini realtime models plugin.

<Card title="Usage guide" icon="book" href="/plugins/realtime/gemini" horizontal>
  Setup, environment variables, and Python/JavaScript/Go usage examples.
</Card>

## GeminiRealtime

Realtime speech-to-speech integration for the Gemini Live API.

Wraps the Gemini Live model so it can be used as a full speech-to-speech
provider within the runtime, with support for both the Google AI and
Vertex AI backends. Configuration is supplied through a
`GeminiLiveConfig` instance and resolved into a flat parameter map
for the runtime.

### Constructor

```python theme={null}
GeminiRealtime(*, api_key: 'str | None' = None, config: 'GeminiLiveConfig | None' = None, **kwargs)
```

<ParamField path="api_key" type="str | None">
  Google API key. When omitted, the value of the `GOOGLE_API_KEY` environment variable is used.
</ParamField>

<ParamField path="config" type="GeminiLiveConfig | None">
  Provider configuration. When omitted, a default `GeminiLiveConfig` is used.
</ParamField>

### aclose

```python theme={null}
def aclose(self) -> 'None'
```

Release any resources held by the integration.

This implementation performs no work and exists so the integration
can be used interchangeably with providers that require teardown.

### cleanup

```python theme={null}
def cleanup(self) -> 'None'
```

Clean up the integration by delegating to `aclose`.

***

## GeminiLiveConfig

### Fields

<ParamField path="model" type="str" default="gemini-3.1-flash-live-preview" />

<ParamField path="voice" type="str" default="Puck" />

<ParamField path="response_modalities" type="List[str]" default="…" />

<ParamField path="top_p" type="Optional[float]" />

<ParamField path="top_k" type="Optional[int]" />

<ParamField path="max_output_tokens" type="Optional[int]" />

<ParamField path="presence_penalty" type="Optional[float]" />

<ParamField path="frequency_penalty" type="Optional[float]" />

<ParamField path="candidate_count" type="Optional[int]" />

<ParamField path="language_code" type="Optional[str]" />

<ParamField path="thinking_budget" type="Optional[int]" />

<ParamField path="include_thoughts" type="bool" default="False" />

<ParamField path="vad_start_sensitivity" type="Optional[str]" />

<ParamField path="vad_end_sensitivity" type="Optional[str]" />

<ParamField path="vad_prefix_padding_ms" type="Optional[int]" />

<ParamField path="vad_silence_duration_ms" type="Optional[int]" />

<ParamField path="context_compression_trigger_tokens" type="Optional[int]" />

<ParamField path="session_resumption_handle" type="Optional[str]" />

<ParamField path="enable_input_transcription" type="bool" default="True" />

<ParamField path="enable_output_transcription" type="bool" default="True" />

<ParamField path="vertexai" type="bool" default="False" />

<ParamField path="vertex_project_id" type="Optional[str]" />

<ParamField path="vertex_location" type="str" default="us-central1" />

<ParamField path="vertex_service_account_json" type="Optional[Union[str, Dict]]" />

<ParamField path="vertex_service_account_path" type="Optional[str]" />
