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

# Aider

> Run aider, the terminal pair programmer, through the AI Reserve gateway with two environment variables.

<Card title="Create your API key →" icon="key" href="https://portal.aireserve.com/profile#api-keys" horizontal>
  Mint an `aireserve_api_…` key in the portal — every aider request is then
  metered and billed through your organization.
</Card>

Aider speaks the OpenAI chat-completions format and takes a custom endpoint
entirely through environment variables
([aider's OpenAI-compatible guide](https://aider.chat/docs/llms/openai-compat.html)).
Set the base to the gateway's `/v1` surface and prefix model names with
`openai/`:

```bash theme={"dark"}
export OPENAI_API_BASE="https://api.aireserve.com/v1"   # /v1 suffix
export OPENAI_API_KEY="$AIRESERVE_API_KEY"              # your aireserve_api_… key

aider --model openai/gpt-5.4-mini
```

The `openai/` prefix is aider's routing convention for "OpenAI-compatible
endpoint", not a vendor claim — Claude models ride the same surface, so
`aider --model openai/claude-sonnet-4-6` routes through the gateway too.

<Note>
  **Expect a one-time "unknown model" warning.** Aider keeps its own metadata
  catalog and doesn't recognize gateway model ids, so it warns that the
  context window and costs are unknown. The warning is cosmetic — requests
  work regardless. Accept it, pass `--no-show-model-warnings`, or pin
  metadata in [`.aider.model.metadata.json`](https://aider.chat/docs/config/adv-model-settings.html).
</Note>

## Verify

Run a one-shot edit from any git repository:

```bash theme={"dark"}
aider --model openai/gpt-5.4-mini --yes-always \
  --message "add a docstring to the top of the main module"
```

Aider prints the model's reply and its token/cost line. The request appears on
your [usage page](https://portal.aireserve.com/profile) seconds later —
metered against the key you exported.
