Providers
Pear is BYOK (Bring Your Own Key). You provide an API key from your preferred provider. Your code context is sent directly from your machine to the provider — pear never stores your code.
| Provider | Default Model | Env Variable |
|---|---|---|
| Anthropic | claude-sonnet-4-20250514 | ANTHROPIC_API_KEY |
| OpenAI | gpt-4o | OPENAI_API_KEY |
| OpenRouter | anthropic/claude-sonnet-4-20250514 | OPENROUTER_API_KEY |
Anthropic
- Go to console.anthropic.com/settings/keys
- Create a new API key
- Run
pear initand select Anthropic, then paste your key
Or set the ANTHROPIC_API_KEY environment variable and pear will detect it automatically.
OpenAI
- Go to platform.openai.com/api-keys
- Create a new secret key
- Run
pear initand select OpenAI, then paste your key
Or set the OPENAI_API_KEY environment variable.
OpenRouter
- Go to openrouter.ai/keys
- Create a new API key
- Run
pear initand select OpenRouter, then paste your key
OpenRouter gives you access to hundreds of models from multiple providers through a single API key. Change your model anytime in ~/.pear/config.toml.