본문으로 건너뛰기

Aider

Connect Aider to PleumRouter with the OPENAI_API_BASE environment variable and an openai/ model prefix. You do not need to run a separate LiteLLM proxy.

Configuration example. Menu and setting names can differ slightly between Aider versions.

Shared env vars live on Connect a Coding Agent #setup.

Install#

Install with python -m pip install aider-install && aider-install.

Setup#

Set the OPENAI_API_BASE and OPENAI_API_KEY environment variables. Then run aider --model openai/<model-id>.

  1. Create a key that starts with plm_ in the API keys menu, then copy it.
  2. In your terminal, run export PLEUM_API_KEY=plm_xxxxxxxxxxxxxxxx. Replace plm_xxxxxxxxxxxxxxxx with the key you copied.
  3. Set OPENAI_API_BASE to https://apirouter.pleum.ai/v1 and OPENAI_API_KEY to $PLEUM_API_KEY.
  4. Run aider --model openai/<model-id>. Put an ID from the model catalog in <model-id>.
aider
export PLEUM_API_KEY=plm_xxxxxxxxxxxxxxxx
export OPENAI_API_BASE=https://apirouter.pleum.ai/v1
export OPENAI_API_KEY=$PLEUM_API_KEY

aider --model openai/gpt-5.5

Verify#

Send a short question in the aider input. If a reply comes back, the connection works. Look up the cost with the X-Request-Id response header at GET /v1/generation?id=….

How it works#

This tool sends OpenAI Chat Completions requests (/v1/chat/completions). The base URL is https://apirouter.pleum.ai/v1 and auth sends your plm_ key as Authorization: Bearer.

Errors#

The table below lists the errors that appear when you connect aider, with the fix for each. The plm_xxxxxxxxxxxxxxxx in the snippet is a placeholder, so replace it with a real key from the API keys menu.

SymptomCauseFix
401 UnauthorizedThe key was copied incorrectly or is no longer valid.Copy the key again from the API keys menu and update the export PLEUM_API_KEY= line.
402 Payment RequiredThe credit balance is too low, or this key went over its daily, weekly or monthly budget or its monthly token limit.Top up credits, or adjust this key's budget and token limit in the API keys menu.
404 Not FoundOPENAI_API_BASE is missing /v1 or has an extra path appended. The chat endpoint is /v1/chat/completions.Set OPENAI_API_BASE to https://apirouter.pleum.ai/v1 and do not append a path to it.
429 Too Many RequestsThis key went over its request limit, or the model provider's request limit was reached.Wait a moment and run it again. If you need a higher limit, contact us as described in Usage limits.

Cost & security tips#

  • Set a budget on the key. A coding agent calls the model many times per task and resends long context. Daily, weekly or monthly budgets on your API key make costs easier to predict.
  • Keep the key out of git. Make sure a key in your shell profile or config file never gets committed, and if you suspect a leak, revoke it in the dashboard and issue a new one.
  • Check where sensitive code goes. Prompts and code are sent to the provider of the model you pick. Use Data residency and PII masking to control that.