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

# Anthropic

> 将 Anthropic 配置为用于生成翻译的 LLM 提供商。

## 提供者值

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

## 示例个人资料

```json theme={null}
{
  "llm": {
    "profiles": {
      "default": {
        "provider": "anthropic",
        "model": "claude-sonnet-4-5",
        "prompt": "Translate from {{source}} to {{target}}:\n\n{{input}}"
      }
    }
  }
}
```

## 必需的环境变量

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

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

## 可选环境变量

`ANTHROPIC_BASE_URL` 默认为 `https://api.anthropic.com/v1`。
