---
title: "Draft Aider integration"
description: "Unverified draft settings for using Aider with minirouter."
canonical_url: "https://minirouter.sh/integrations/aider"
markdown_url: "https://minirouter.sh/integrations/aider.md"
last_updated: "2026-08-04"
---

# Aider + minirouter

Verification status: UNVERIFIED DRAFT
Confirm the current client fields and run the verification request before relying on this configuration.

Draft environment-variable and model-flag configuration for the Aider terminal client.

Base URL: https://api.minirouter.sh/v1
Get a key: https://minirouter.sh/key

## Settings

Environment variables + command line

1. OPENAI_API_BASE: https://api.minirouter.sh/v1
2. OPENAI_API_KEY: mr-live-… (your key)
3. --model: openai/meta/llama-3.3-70b
   The openai/ prefix tells Aider to use the OpenAI-compatible endpoint; everything after it is our model id.

## Draft configuration

Shell — unverified draft

```
export OPENAI_API_BASE=https://api.minirouter.sh/v1
export OPENAI_API_KEY=mr-live-YOUR-KEY-HERE
aider --model openai/meta/llama-3.3-70b
```

## Recommended models

Only use a model after confirming it appears in the live model catalog at https://minirouter.sh/api/v1/models.

- meta/llama-3.3-70b: General-purpose candidate for agent edits.
- deepseek/deepseek-v3: Reasoning-oriented candidate for multi-file work.
- mistral/devstral-small-2: Coding-oriented candidate for the weak-model role.
- meta/llama-4-maverick: Long-context candidate for larger repository maps.

## Troubleshooting

### Aider warns the model is unknown and guesses a context window

Expected for custom endpoints — Aider's local metadata does not know our ids. The warning is cosmetic; requests still work.

### 404, HTML, or a parse error on every request

Almost always the base URL. Use https://api.minirouter.sh/v1 — the bare host without /v1 also works, but never append /chat/completions to the base URL field; the client adds that path itself.

Error reference: https://minirouter.sh/docs/errors#invalid_request

### 401 on every request

Wrong or rotated key. Keys start with mr-live-; after a rotation the old key keeps working for 24 hours, then dies.

Error reference: https://minirouter.sh/docs/errors#invalid_api_key

### 402 before any tokens arrive

Balance below the estimated cost of the request. Top up ($5 minimum) — and watch the x-minirouter-balance-usd header, the low-balance signal every response carries.

Error reference: https://minirouter.sh/docs/errors#insufficient_credits
