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

# Gemini

> 将 Gemini 配置为用于生成翻译的 LLM 提供程序。

## 提供者值

在 `llm.profiles.<name>.provider` 中使用 `gemini`。

## 示例个人资料

```json theme={null}
{
  "llm": {
    "profiles": {
      "default": {
        "provider": "gemini",
        "model": "gemini-2.5-flash",
        "prompt": "Translate from {{source}} to {{target}}:\n\n{{input}}"
      }
    }
  }
}
```

## 必需的环境变量

<CodeGroup>
  ```bash Export theme={null}
  export GEMINI_API_KEY="your-gemini-api-key"
  ```

  ```bash .env.local theme={null}
  GEMINI_API_KEY="your-gemini-api-key"
  ```
</CodeGroup>

## 可选环境变量

`GEMINI_BASE_URL` 默认为 `https://generativelanguage.googleapis.com/v1beta/openai`。
