---
title: Aider
---


[Aider](https://aider.chat) is an open-source AI pair-programming tool for the terminal, with deep git integration. It can point at any OpenAI-compatible endpoint via environment variables, so once it's aimed at CrossModel you can use the entire catalog.

## Quickstart

### 1. Install Aider

```bash
python -m pip install aider-install
aider-install
```

Or with pipx:

```bash
pipx install aider-chat
```

### 2. Create an API key

Sign in to the [Console](/console/api-keys) and create a key that starts with `cm-` on the **API Keys** page. The key is shown only once, so copy it somewhere safe.

### 3. Set the environment variables

**macOS / Linux:**

```bash
export OPENAI_API_BASE=https://api.crossmodel.ai/v1
export OPENAI_API_KEY=cm-YOUR_KEY
```

**Windows (PowerShell):**

```powershell
$env:OPENAI_API_BASE = "https://api.crossmodel.ai/v1"
$env:OPENAI_API_KEY  = "cm-YOUR_KEY"
```

To make them permanent, add the two lines to `~/.zshrc`, `~/.bashrc`, or your system environment variables, then reopen the terminal.

### 4. Launch Aider

From your project directory, pick a model using the `openai/<model-id>` form:

```bash
aider --model openai/deepseek/deepseek-v4-pro
```

<Callout type="info">
  The `openai/` prefix tells Aider to use the OpenAI-compatible protocol; everything after it is the CrossModel model ID (e.g. `deepseek/deepseek-v4-pro`).
</Callout>

## Lock it in with a config file

Create `.aider.conf.yml` in your project root so you don't have to pass flags every time:

```yaml
openai-api-base: https://api.crossmodel.ai/v1
openai-api-key: cm-YOUR_KEY
model: openai/deepseek/deepseek-v4-pro
```

After that, just run `aider` with no extra arguments.

## Common model examples

```bash
# DeepSeek V4 Pro (recommended — great price/performance)
aider --model openai/deepseek/deepseek-v4-pro

# Claude Sonnet 4.6
aider --model openai/anthropic/claude-sonnet-4.6

# GPT-5.5
aider --model openai/openai/gpt-5.5
```

See the full list of model IDs in the [model catalog](/models).

## Troubleshooting

| Symptom | What to check |
|---------|---------------|
| Auth failure (401) | Confirm `OPENAI_API_KEY` holds a valid `cm-` key. |
| "Unknown model" | Verify the model ID appears in the `/v1/models` response. |
| Env vars not taking effect | On Windows, restart the terminal after `setx`; on macOS/Linux, re-`source` your profile. |
| Insufficient balance | Top up in the [Console](/console/billing). |
