---
url: 'https://docs.byesu.com/en/clients/aider.md'
description: >-
  Configure Aider with byesu API via OPENAI_API_BASE or ANTHROPIC_BASE_URL: run
  Claude Opus 5.5, GPT-6.2, Gemini 4 Argon, and DeepSeek V4 in your terminal.
---

# Connect Aider to byesu API

**Aider** is a terminal AI pair-programming tool that edits git repositories directly. You can route Aider through **byesu** using either Anthropic-native or OpenAI-compatible environment variables.

::: tip Quick configuration

* **Anthropic models**: `ANTHROPIC_BASE_URL=https://byesu.com`, `ANTHROPIC_API_KEY=sk-...`
* **OpenAI / Gemini / DeepSeek models**: `OPENAI_API_BASE=https://byesu.com/v1`, `OPENAI_API_KEY=sk-...`
  :::

## Option 1: Use Claude Models (Anthropic Native)

```bash
export ANTHROPIC_BASE_URL="https://byesu.com"
export ANTHROPIC_API_KEY="sk-YOUR_BYESU_TOKEN"

aider --model anthropic/claude-sonnet-5-5
# Or flagship reasoning:
aider --model anthropic/claude-opus-5-5
```

## Option 2: Use OpenAI-Compatible Endpoint (GPT / Gemini / DeepSeek)

```bash
export OPENAI_API_BASE="https://byesu.com/v1"
export OPENAI_API_KEY="sk-YOUR_BYESU_TOKEN"

aider --model openai/gpt-6.2-sol
# Or Gemini / DeepSeek:
aider --model openai/gemini-4-argon
aider --model openai/deepseek-v4-pro
```

## Persist in `.aider.conf.yml`

To avoid exporting environment variables on every shell session, place a `.aider.conf.yml` in your home directory or repo root:

```yaml
model: anthropic/claude-sonnet-5-5
cache-prompts: true
```

Keep your API keys in `~/.zshrc` / `~/.bashrc` or a git-ignored `.env` file.

## Troubleshooting & Benchmarks

* **401 authentication error**: run `env | grep -iE 'OPENAI|ANTHROPIC'` to make sure no stale keys override your config ([OpenAI 401](/en/errors/openai-api-401-invalid-api-key), [Claude 401](/en/errors/claude-api-401-authentication-error)).
* **400 temperature / top\_p error**: see [Claude 400 temperature/top\_p not supported](/en/errors/claude-api-400-temperature-top-p-not-supported).
* **Model speed comparison**: see [weekly production benchmarks](https://byesu.com/benchmarks) and [31 code-level error guides](/en/errors).
