# Gemini

> You'll need a Gemini API key.

- 网址：https://funcoding.ai/agents/aider/llms/gemini/
- 来源：Aider 官方文档原文（英文），Apache-2.0 许可，同步于 2026-10-11
- 官方原文：https://aider.chat/docs/llms/gemini.html

---
You'll need a [Gemini API key](https://aistudio.google.com/app/u/2/apikey).

First, install aider:

```bash
python -m pip install aider-install
aider-install
```

Then configure your API keys:

```bash
export GEMINI_API_KEY=<key> # Mac/Linux
setx   GEMINI_API_KEY <key> # Windows, restart shell after setx
```

Start working with aider and Gemini on your codebase:

```bash
# Change directory into your codebase
cd /to/your/project

# You can run the Gemini 2.5 Pro model with this shortcut:
aider --model gemini

# You can run the Gemini 2.5 Pro Exp for free, with usage limits:
aider --model gemini-exp

# List models available from Gemini
aider --list-models gemini/
```
