How to Bill Clients for Aider Usage
Short answer: Aider is free, open-source software, so the only cost to pass on is the LLM API bill. That makes it one of the easiest AI coding tools to bill per client: create one API key per client (an Anthropic workspace key, an OpenAI project key or an OpenRouter key), put it in that client's repository .env, and the provider's usage report shows exactly what that client's work cost. Bill from the provider's figure, not Aider's on-screen estimate, at cost or with a stated markup, as its own invoice line next to the hours.
Why Aider is different: you pay the model provider, not Aider
Aider is open source under the Apache 2.0 licence. It has no plans or seats; it connects to almost any LLM, including local models, using an API key you supply. So the cost question is simply "which API key did the work, and what did the provider charge for it?" That makes per-client billing far cleaner than with seat-based tools such as Copilot or Cursor, where one subscription covers every client.
| How you pay | What you can bill |
|---|---|
| Your own Anthropic, OpenAI or OpenRouter API key | The provider's charges for that key, at cost or with a markup |
| A local model on your own hardware | No API charge; cover hardware in your day rate |
| The client's own API key | Nothing to pass on: the client pays the provider directly |
Step 1: one API key per client, kept in the client's repo
Aider can take keys from the command line (--anthropic-api-key, --openai-api-key, or --api-key provider=<key> for others), from environment variables, from a .env file or from the api-key entry in .aider.conf.yml (Aider's API key docs). The useful part for agencies: Aider loads .env and .aider.conf.yml from your home folder, then the git root, then the current folder, and the file loaded last wins (.env docs, config file docs).
- Create a key for the client at the provider (see step 2).
- Put it in a
.envfile in the root of that client's repository, for exampleANTHROPIC_API_KEY=…, and make sure.envis in.gitignore. - Keep only a fallback (or no key at all) in your home folder, so work in a repo without its own key doesn't land silently on another client's bill.
Step 2: read the real cost per client from the provider
- Anthropic: create a workspace per client; API keys can be scoped to a single workspace, and each workspace can have a monthly spend limit. The Usage and Cost API groups costs by workspace and lists chargebacks as a use (it needs an Admin API key, which individual Console accounts get once they set up an organization).
- OpenAI: create a project per client. Each project has its own API keys, usage can be broken down by project, and projects can have their own monthly spend limit.
- OpenRouter: create a key per client, optionally with a credit limit; usage is listed per key.
Why not bill Aider's own cost figure?
Aider shows token use (/tokens reports the current chat context) and has reported cost since version 0.46. But its docs say the token counts are estimates, its prices come from litellm's model price list, and caching costs aren't available while streaming. Fine for keeping an eye on a session; for an invoice, use the provider's report for the client's key.
For evidence of what the work was, Aider keeps a chat history in the repo (.aider.chat.history.md by default) and can log the full LLM conversation with --llm-history-file. Keep those files out of git if they could contain client secrets.
Step 3: put it on the invoice with eBRBe
On Pro and above, eBRBe's Anthropic and OpenAI usage sync reads your organisation's usage and cost reports with an admin key, grouped by API key and by workspace or project. You map each client's key or workspace to that client once; from then on the usage arrives as agent runs on the client's project, and re-syncs update rather than duplicate. eBRBe also compares the provider's total with what has been attributed, so unmapped spend shows up. For OpenRouter or other providers, add the month's cost per client with the CSV import (you map the columns) or the REST API (POST /api/v1/agent-runs with cost_usd). The runs then sit on the client's invoice next to the hours, with your markup.
At cost, or with a markup?
Both are common. At cost is the most transparent; cost plus a stated percentage pays for choosing, running and reviewing the agent's work. Compare pricing models in our guide to billing AI agent costs, work out your numbers with the AI agent cost & markup calculator, and see what each Claude model costs per coding-agent run. Using other tools too? See how to bill clients for Claude Code, Cursor, OpenAI Codex, GitHub Copilot, Windsurf (Devin Desktop) and Cline usage.
A contract clause you can adapt
Agree the rule in the statement of work before the first invoice. A starting point (have it checked for your jurisdiction; this is not legal advice):
"We use AI development tools, including Aider, with a model provider API key dedicated to your project. The provider's charges for that key are invoiced monthly as a separate 'AI usage' line at cost plus [X]%, with the provider's usage report available on request. We will not exceed [amount] of AI usage in a month without your written approval. If you prefer, you may supply your own API key, in which case the provider bills you directly."
Frequently Asked Questions
Does Aider cost anything?
Aider itself is open source under the Apache 2.0 licence. What you pay for is the language model it calls: you bring your own API key for Anthropic, OpenAI, OpenRouter or another provider (or run a local model), and that provider bills you for the tokens Aider uses.
How do I keep Aider costs separate per client?
Give each client its own API key and keep it in that client's repository. Aider reads a .env file and an .aider.conf.yml file from the git root (as well as your home folder and the current folder, with the last one loaded taking priority), so a key in the client repo's .env is the one Aider uses when you work there. Create the key inside a per-client Anthropic workspace, OpenAI project or OpenRouter key, and the provider's usage report then shows that client's cost on its own. Keep .env out of git.
Can I use Aider's own cost figure on an invoice?
Use it as a guide, not as the invoice amount. Aider's docs say its token counts are estimates, its prices come from litellm's model price list, and caching costs aren't shown while responses are streaming. The provider's usage and cost report for the client's key is the figure to bill from.
Can I cap how much Aider spends for one client?
Yes, at the provider. Anthropic workspaces and OpenAI projects can each have a monthly spend limit, and an OpenRouter key can have a credit limit. Set the cap to match what the contract allows.
Does eBRBe work with Aider?
Yes, through the provider rather than through Aider. On Pro and above, eBRBe's usage sync reads your Anthropic and OpenAI usage reports with an admin key, grouped by API key and workspace or project; you map each client's key to that client once, and the costs arrive as agent runs ready for the invoice. For OpenRouter or anything else, add the month's cost per client by CSV import or the REST API.
Next step on eBRBe
eBRBe puts Aider, Claude Code, Copilot and other AI agent costs on the same client invoice as human hours, with your markup, and the client pays online. Free for up to 3 people; paid plans from $9 per member a month, with a 14-day trial. Want to see it first? Explore the demo: a read-only workspace with made-up data, no account needed.
Explore the demo or sign up free →