Independent, documentation-based guides to AI tools and smart home tech. How we research

Home › AI Coding & APIs › Aider Explained: What It Costs and How to Set It Up

Aider Explained: What It Costs and How to Set It Up

📚 Part of our AI coding tools guide · all coding guides

Checked November 12, 2026 against aider.chat (docs, FAQ and install pages). This is a documentation-based explainer, not a hands-on test.

Quick verdict

The tool is free. Aider is open source under the Apache 2.0 license. There is no Aider subscription.

You pay for the model. Aider connects to an LLM with your own API key, so your bill comes from OpenAI, Anthropic, Google, DeepSeek or another provider.

Who it suits: developers who live in the terminal, use git, and want to choose and switch models freely.

Flat illustration of a terminal window with colored code lines, a small robot pair programmer and a stack of coins beside a key

Illustration: AI Tool Audit, created with Google Gemini

On this page
  1. What Aider is
  2. What Aider costs
  3. How to install Aider
  4. Setting your API key
  5. Choosing a model
  6. Daily use: modes, git and commands
  7. Keeping costs down
  8. Is Aider right for you?
  9. FAQ

What Aider is

Aider is an AI pair programmer that runs in your terminal. You start it inside a project folder, tell it which files to work on, and describe the change you want in plain English. It edits the files for you and commits each change to git.

Its home page lists the main features:

  • Works with cloud LLMs and local models.
  • Builds a map of your whole codebase to help on larger projects.
  • Supports 100+ programming languages.
  • Commits changes automatically with descriptive messages.
  • Runs linters and tests after changes and can fix what they find.
  • Accepts images and web pages as context, plus voice input.
  • Can be driven from your editor through code comments.

What Aider costs

Aider's FAQ says it is open source and released under an Apache 2.0 license. You don't pay Aider anything. The cost is the model you connect.

Cost itemWho chargesNotes
Aider itselfNo oneOpen source, Apache 2.0
Cloud model usageYour LLM providerBilled per token on your own API account
Free model tiersProvider-dependentAider's docs note OpenRouter offers some free models with daily limits
Local modelsYour hardwareVia Ollama or OpenAI-compatible local servers

Because you pay per token, how you use Aider matters. Aider's usage docs warn that adding too many files can confuse the model and costs more tokens. The in-chat /tokens command shows how many tokens your current context is using. For per-token rates, see our OpenAI API pricing and Anthropic API pricing explainers. Our subscription vs API cost guide helps you estimate monthly spend.

How to install Aider

The install page lists several methods. The simplest, if you already have Python 3.8 to 3.13:

python -m pip install aider-install
aider-install

This installs Aider in its own Python environment and can add Python 3.12 if needed. There are also one-line installers:

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

You can also use uv, pipx or pip. Aider's docs advise against system package managers, which may install the wrong dependencies.

Setting your API key

Aider reads keys from four places: command-line flags, environment variables, a .env file, or the .aider.conf.yml config file. Two quick examples from the docs:

cd /to/your/project
aider --model sonnet --api-key anthropic=<key>
aider --model o3-mini --api-key openai=<key>

For other providers, --api-key gemini=<key> sets GEMINI_API_KEY, and the same pattern works for others such as OpenRouter. Putting keys in .env or your shell profile saves typing them each time. Keep that file out of version control.

Choosing a model

Aider's model docs list many providers: OpenAI, Anthropic, Gemini, DeepSeek, xAI, Groq, Azure, Cohere, OpenRouter, Vertex AI, Amazon Bedrock, GitHub Copilot, LM Studio, Ollama and any OpenAI-compatible API. The docs name Gemini 2.5 Pro, DeepSeek R1 and V3, Claude 3.7 Sonnet, and OpenAI o3, o4-mini and GPT-4.1 as strong at code editing. The model docs also warn that models weaker than GPT-3.5 may struggle. Aider keeps public leaderboards to help you compare.

Daily use: modes, git and commands

Aider has four chat modes. Code (the default) edits files. Ask answers questions without changing code. Architect uses two models: one plans the solution and an editor model turns it into file edits. Help answers questions about Aider itself. Switch with /ask, /code or /architect.

Git is central. Each edit gets its own commit, and Aider commits any uncommitted work first so your changes stay separate. /undo reverses Aider's last commit, and /diff shows what changed. You can turn auto-commits off with --no-auto-commits, but the docs don't recommend disabling git.

Other useful commands: /add and /drop manage files in the chat, /read-only adds reference files, /run and /test run shell commands, and /web pulls a web page into the chat.

Keeping costs down

  • Add only the files that need editing. Aider pulls related context in from its repo map.
  • Use /drop to remove files you're done with.
  • Use /ask mode to plan before editing.
  • Check /tokens when a session feels slow or expensive.
  • Set a spending cap with your provider. Our API spending limits guide shows how.

Is Aider right for you?

Choose Aider if you want an open tool, full control over the model and a git-first workflow. If you'd rather pay a flat monthly fee, a subscription tool may be easier to budget. Our Claude Code vs Codex CLI vs Gemini CLI comparison covers other terminal agents, and our best AI coding tools guide covers editors like Cursor and Copilot. Current tool prices are on our AI tool prices page.

FAQ

Is Aider free?

Aider itself is free and open source under Apache 2.0. You pay your LLM provider for the tokens you use, unless you run a local model or use a free model tier.

Can Aider use local models?

Yes. Aider's docs cover Ollama, LM Studio and other OpenAI-compatible local servers.

How do I undo a change Aider made?

Type /undo in the chat. It reverses Aider's last git commit. You can also use normal git tools, since every edit is its own commit.

Which model works best with Aider?

The docs name Gemini 2.5 Pro, DeepSeek R1 and V3, Claude 3.7 Sonnet, and OpenAI o3, o4-mini and GPT-4.1 as strong options. Check Aider's leaderboards for current results.

Sources