# AI providers

You manage your own provider keys, not Pane. Each pane gets its own shell, so agents read their own env vars and don't step on each other. Set the right key in the right pane and the agent handles the rest.

## Provider quick reference

| Provider | Env var | Agent docs |
|----------|---------|------------|
| Anthropic | `ANTHROPIC_API_KEY` | [docs.anthropic.com](https://docs.anthropic.com) |
| OpenRouter | `OPENROUTER_API_KEY` | [openrouter.ai/docs](https://openrouter.ai/docs) |
| AWS Bedrock | `AWS_REGION` + IAM role | [AWS Bedrock docs](https://docs.aws.amazon.com/bedrock) |
| Google Vertex AI | `GOOGLE_APPLICATION_CREDENTIALS` | [Vertex AI docs](https://cloud.google.com/vertex-ai/docs) |
| Vercel AI Gateway | gateway URL + key | [vercel.com/docs/ai](https://vercel.com/docs/ai) |
| Azure OpenAI | `AZURE_OPENAI_KEY` | [Azure OpenAI docs](https://learn.microsoft.com/azure/ai-services/openai) |
| GLM / Zhipu | `GLM_API_KEY` | [open.bigmodel.cn](https://open.bigmodel.cn) |

## Why Pane's isolated worktrees prevent env-var collision

Each pane runs in its own worktree directory with its own shell session. Setting `ANTHROPIC_API_KEY` in one pane's shell does not leak into another pane's shell. This lets you:

- Run two agents simultaneously with different provider keys (e.g. test Claude vs GPT-4o on the same task).
- Isolate customer credentials — one pane uses the customer's Bedrock role, another uses your personal Anthropic key.
- Keep dev and prod keys separate in the same editor session without juggling shell windows.

## Setting env vars per pane

Open a terminal with <KeyCombo keys={["⌘", "⌥", "1"]} /> and export your key directly:

<TerminalPreview lines={[
  { type: "command", text: "export ANTHROPIC_API_KEY=\"sk-ant-...\"" },
  { type: "command", text: "claude" },
  { type: "output",  text: "Welcome to Claude Code. Type / for commands." }
]} />

The export applies only to that pane's shell process and its children. Other panes are unaffected.

## Using `.envrc` or `.env`

Pane respects standard shell-level env loaders.

**direnv** — add a `.envrc` to the worktree root:

```bash
export ANTHROPIC_API_KEY="sk-ant-..."
```

Then run `direnv allow` once. direnv loads the vars automatically whenever you enter that directory.

**dotenv-cli** — prefix your command:

```bash
dotenv -- claude
```

Both approaches scope env vars to the worktree directory, so values never bleed across panes.

## Related

- [MCP servers](/docs/mcp) — configure MCP servers that agents use to call external tools
- [Environment variables](/docs/environment-variables) — full reference for Pane-injected vars
- [Security & permissions](/docs/security) — what leaves your machine and what does not
