Total unique visitors
Browse by category Chatbots Image Generation Video Generation Audio & Voice Coding Writing Productivity Research AI Agents Free Tier Table
Home page 問問貓說 AI

Ask CatAI Tool Summaryaider

Aider + OpenRouter Free Models: Full 2026 Setup Guide (Install, API Key, and Living on 50 Requests a Day)

Article last updated:2026-09-06

Aider is an AI pair-programmer that lives in your terminal: you describe a change, it edits the files on your machine, and it commits the result for you. The tool itself is Apache 2.0 open source and free — the bill comes from the model you feed it (that is also what our own 2026-09-05 verification record says).

Which raises the obvious question: can the model be free too? Yes — point it at OpenRouter’s :free model variants. On 2026-09-06 we queried OpenRouter’s model list API directly: out of 430 models, 18 have a :free variant, several of them coding-oriented.

This is not a pricing article. It is the whole wiring job, step by step, from the official aider and OpenRouter documentation.

Step 1: Install aider

The shortest path in the official docs is two lines (you need Python 3.8–3.13):

python -m pip install aider-install
aider-install

That installs aider into its own isolated Python environment, and will pull down a separate Python 3.12 if it needs one, so nothing pollutes your existing setup.

If you would rather not touch Python at all, there are one-liners:

  • Mac / Linux: curl -LsSf https://aider.chat/install.sh | sh
  • Windows: powershell -ExecutionPolicy ByPass -c "irm https://aider.chat/install.ps1 | iex"

There are also uv tool install --force --python python3.12 --with pip aider-chat@latest and pipx install aider-chat. One thing the docs say explicitly: do not install aider from a system package manager — those builds often carry the wrong dependencies.

Step 2: Where the API key goes (pick one of three)

Aider has dedicated switches for OpenAI and Anthropic; every other provider, OpenRouter included, uses the generic mechanisms. All three below are straight from the docs:

1. Environment variable

export OPENROUTER_API_KEY=<key>      # Mac / Linux
setx OPENROUTER_API_KEY <key>        # Windows

On Windows you must close and reopen the shell after setx. That is the number one cause of “I set the key and it still says there is no key”.

2. A .env file in the project

OPENROUTER_API_KEY=<key>

3. The .aider.conf.yml config file

api-key:
  - openrouter=<key>

The third form simply sets OPENROUTER_API_KEY for you. For a one-off test, --api-key openrouter=<key> on the command line does the same thing.

Step 3: Pick a model — list them first

Start aider from inside your project directory. This matters: aider works against the git repo in the current folder.

cd /to/your/project
aider --list-models openrouter/
aider --model openrouter/<provider>/<model>

--list-models openrouter/ prints every model your key can reach. Spotting the free ones is easy: the ID ends in :free.

Among the 18 free variants we captured on 2026-09-06, the coding-leaning ones included cohere/north-mini-code:free, poolside/laguna-s-2.1:free, minimax/minimax-m3:free and nvidia/nemotron-3-super-120b-a12b:free, with context windows ranging from 65K to 1M tokens. That roster changes fast — trust your own --list-models output, not our snapshot.

Step 4: The trap the docs warn about — privacy settings

This one comes from aider’s own OpenRouter page: if you hit errors, check your OpenRouter privacy settings and enable providers that may train on inputs, so that all models are available to you.

In other words, part of the price of “free” is looser data terms. That is a trade-off, not a bug:

  • Practising, or working on a personal project? Turn it on; usually fine.
  • Company or client source code? That single setting is enough to rule the free route out. Use paid models.

If you would rather not flip it globally, aider reads a .aider.model.settings.yml from your home directory or repo root, where you can steer providers per model:

- name: openrouter/anthropic/claude-3.7-sonnet
  extra_params:
    extra_body:
      provider:
        order: ["Anthropic", "Together"]
        allow_fallbacks: false
        data_collection: "deny"
        require_parameters: true

Note that data_collection: "deny" and “enable providers that may train on inputs” are two knobs pointing in opposite directions: one protects your data, the other buys you free capacity. Decide which you actually want. The full provider-routing syntax is in our guide on choosing cheaper OpenRouter providers.

Step 5: What 50 requests a day actually feels like

Here are the free-tier numbers from OpenRouter’s own limits documentation — we read the constants in the document source rather than repeating a second-hand figure:

Credits purchased (all time)Requests per minuteRequests per day
Less than US$102050
At least US$10201,000

So a brand-new account that has never bought credits gets 50 requests a day. And aider does not spend those as “50 conversations”: every message you send costs at least one, and in architect mode — one model to plan, another to edit — a single message costs at least two. Fifty disappears quickly.

Ways to stretch it (all of these are in aider’s own tips, and they happen to save requests too):

  1. Only /add the files that actually need editing. The docs say plainly: don’t add lots of files. Irrelevant code distracts the model, and aider already has a map of the whole repo.
  2. /drop a file once it is done. Add the next one when you get to it; don’t drag dead weight through the conversation.
  3. /clear when it gets stuck. Wiping the chat history and starting fresh is cheaper than fighting a bad context.
  4. Plan with /ask, then execute with /code. Ask mode discusses without touching files; once the plan is agreed, “go ahead” in code mode is enough. Getting it right once beats three retries.
  5. Take bite-sized steps, one at a time.

When you hit the wall you get a 429, and the error response carries X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset telling you which limit you hit; a 402 means credits, not rate. To watch your remaining quota before it bites, call GET https://openrouter.ai/api/v1/key. The full breakdown of those limits is in our OpenRouter free-model daily limit guide.

Step 6: Git is your safety net — leave it on

Aider is tightly bound to git, and that matters more on free models, which get things wrong more often:

  • Every time it edits a file, it commits the change with a descriptive message.
  • If you had uncommitted work, it commits that first, so your edits and the AI’s edits stay cleanly separated.
  • Broke something? /undo discards the last change. /diff shows what changed this round, /commit tidies up dirty files, /git runs raw git commands.

There is --no-auto-commits and even --no-git if you insist, but the docs themselves call that not recommended — and on free models it is a particularly bad idea.

The short version

Aider is free, OpenRouter has 18 free models, and the combination really does give you zero-cost code editing. The two things you have to accept: looser data terms, and the discipline of 50 requests a day. Great for practice and personal projects; not the route for client code.

Steps and figures verified on 2026-09-06 against the aider installation docs, the aider OpenRouter page, the aider API keys docs, the OpenRouter limits documentation, and a same-day pull of the OpenRouter models API. Free-model rosters and limits change without notice; check the official pages. Our cost breakdown for the tool is on the aider tool page.

What Amo and Pimi think

AMO Amo Finding faults
皮米先別誇開源多棒,我先講會勸退一半人的事實:這東西沒有圖形介面,純終端機 CLI,連行動應用都沒有,不習慣打指令的人根本用不下去。而且它自己免費,LLM API 費用要自付——輕度約 US$10–30/月還好,重度用 Opus 或 GPT-4 可以飆到 US$50–200+,成本根本抓不準。中文支援也只是 partial,文件社群全英文。
PIMI Pimi Advantages
What you just said is the kind of thing that talks regular people out of it, but this tool was never made for regular people in the first place. Apache 2.0 fully open source, 44K stars on GitHub, 6.8 million downloads on PyPI, still actively developed in 2026 — those numbers don't lie. Git-first, so every AI edit becomes a reviewable commit, which engineers love. Architect mode pairs a planning model with a cheap editing model to cut costs, and it supports 150+ languages and 15+ LLM providers — hook it up to a local model like Ollama and it can even be zero-cost. Amo, that US$50–200+ figure you calculated isn't inevitable at all.
So, do you need to pay or not?

For engineers doing AI pair programming in the terminal, it's a free and stable choice — pair it with a local model and you save even the API cost. But you'll need to bring your own LLM key and manage costs yourself. For non-engineers or people who want a graphical interface, this tool's barrier is too high — don't force it.

Let's take a look at these

Go to the official website

Affiliate Links Notice