API documentationIntegrationsAider

Aider

Terminal pair programmer · Chat Completions

Aider routes through LiteLLM, so KoRouter connects as a generic OpenAI-compatible endpoint: two exports and a model prefix.

Base URL · OpenAI-compatible

https://korouter.ai/v1

Plus an API key from Keys and a bare model ID from Models. Every price on the catalog sits below the provider's official rate — pay as you go.

Setup

Aider talks to models through LiteLLM, so KoRouter connects as a generic OpenAI-compatible endpoint: export the two variables and prefix the model with openai/.

Terminal
export OPENAI_API_BASE="https://korouter.ai/v1"
export OPENAI_API_KEY="sk-your-key"
aider --model openai/model-name

Verify

Aider prints the connected model and endpoint on startup. Ask it anything, then check Usage for the call.

If it fails

  • wrong-looking model namethe openai/ prefix is local routing for LiteLLM; the request body carries the bare ID after the slash.
  • unknown-model cost warningscosmetic — aider does not know custom catalogs. Silence them with --no-show-model-warnings.
  • 401 despite a correct keyexport the variables in the same shell that launches aider, or add them to your shell profile.

Troubleshooting

The failures below account for nearly every unsuccessful first connection, whatever the tool.

StatusSymptomFix
401Key missing, mistyped, or deletedRe-copy the key from Keys and confirm which header your tool sends — Authorization: Bearer or x-api-key.
403No credits on the account (INSUFFICIENT_BALANCE)Add credits first. Verify buttons and test prompts inside tools fire real requests.
404Model not foundSend the bare model ID exactly as listed on Models — no provider/ prefix in the request body.
429Concurrency or key spend limit reachedLower parallel requests, or raise the key's spend limit, then retry with backoff.

The full status-code table, retry guidance, and error envelopes are in Errors & limits. Still stuck? Email support@korouter.ai with the tool name, the model ID, and the exact error text.

Other tools

Free to sign up, no monthly fee — pay as you go with credits.