Skip to content
Router One

Run Aider against any model through one endpoint

Aider is the terminal-native AI pair programmer. It talks to any OpenAI-compatible endpoint through two environment variables, which makes switching to Router One a one-minute change — and unlocks the whole catalog instead of a single provider, with every edit session traced for cost.

Configure Aider to use the Router One base URL

Export the base URL and key, then launch aider with an openai/-prefixed model ID (the prefix tells Aider to use the OpenAI-compatible protocol):

aider-setup.sh
export OPENAI_API_BASE=https://api.router.one/v1
export OPENAI_API_KEY=sk-your-router-one-key

aider --model openai/<model-id-from-/models>

Which model ID should Aider send?

Copy the exact model ID from the /models page — IDs are case-sensitive, and the page lists each model's context window, capabilities, and current per-token rates. Create a dedicated API key per tool with its own maxSpend cap, so one runaway tool can't affect other workloads.

Verify the Aider call in your request trace

After your first request, open Dashboard → Logs to see its full trace: model, tokens, cost, latency, and status code. From here every Aider call has a ledger and a trail instead of being a black box.

FAQ

Why does the model need the openai/ prefix?

Aider routes requests by prefix: openai/<model-id> means "use the OpenAI-compatible protocol against OPENAI_API_BASE". Use the exact model ID from /models after the prefix.

Which models can Aider use through the gateway?

Any chat-capable model in the catalog — GPT, Claude, Gemini, Grok, DeepSeek, GLM, MiniMax, and Doubao families. The /models page is the source of truth for model IDs and per-token rates.

Does this work from Mainland China?

Yes. The gateway is reachable from Mainland China without a VPN, and the configuration is identical to the global setup.

How do I debug a 401/403/429?

Open Dashboard → Logs first to see whether requests reached the gateway and with what status, then walk the error-codes reference to check env vars, key status, and limits.