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

# Google Gemini

> Use Google Gemini models.

## Setup

```bash theme={null}
export GOOGLE_API_KEY="..."
```

```bash theme={null}
pip install google-genai
```

## Basic Usage

```python theme={null}
from definable.model.google import Gemini
from definable.model.message import Message

model = Gemini(id="gemini-2.0-flash-001")
response = model.invoke(
    messages=[Message(role="user", content="Hello!")],
    assistant_message=Message(role="assistant", content=""),
)
print(response.content)
```

## String Shorthand

```python theme={null}
agent = Agent(model="google/gemini-2.0-flash-001")
```

## Parameters

<ParamField path="id" type="str" default="gemini-2.0-flash-001">
  Model identifier.
</ParamField>

<ParamField path="api_key" type="str">
  Google API key. Defaults to `GOOGLE_API_KEY`.
</ParamField>

<ParamField path="temperature" type="float">
  Sampling temperature.
</ParamField>

<ParamField path="max_tokens" type="int">
  Maximum output tokens.
</ParamField>

## Imports

```python theme={null}
from definable.model.google import Gemini
```
