Free template

The AI usage pass-through clause

Agencies are now spending real money on AI coding agents, on specific clients' code, with no contractual basis for billing it. Here is a clause that creates one — and defines the measurement precisely enough that the client can check the number.

Updated

Not legal advice. This is a drafting starting point, not advice on your situation, and it has not been reviewed against the law of any particular jurisdiction. Fill in the bracketed values, and have your own lawyer review it before you rely on it. Use it freely, including commercially; no attribution needed.

The clause

Written for the common case: you bill the usage on with a stated handling charge. For billing it at cost, or as an allowance with overage, see the variants below.

AI Tooling Usage
  1. Use of AI tools. The Supplier may use AI coding assistants and agents ("AI Tools") in performing the Services.
  2. Charges. Usage of AI Tools attributable to the Client's work is chargeable to the Client in addition to the fees, calculated as set out in clause 3, plus a handling charge of [N]% of that amount, and invoiced monthly in arrears.
  3. How usage is measured. Attributable usage means the tokens consumed by AI Tool sessions run against the Client's repositories or materials, as recorded in the session logs those tools produce. Each session is valued at the AI Tool provider's published list price for the model and token type used, including input, output, and cache read and write tokens, at the time of the session. Where the Supplier accesses an AI Tool under a subscription or seat licence rather than per-use billing, the amount charged under clause 2 is this list-price equivalent, which the parties agree is a reasonable measure of the usage consumed for the Client and is not an amount separately invoiced to the Supplier by the provider.
  4. What each invoice shows. Each invoice states, for the billing period: total attributable usage, a breakdown by the Client's repositories or workstreams, the models used, the handling charge if any, and the rate basis applied.
  5. Estimate and notice. The Supplier estimates attributable usage of approximately [$X] per month. The Supplier will notify the Client before attributable usage exceeds [$Y] in any month, and will not exceed [$Y] in that month without the Client's written approval.
  6. Verification. On the Client's request, and not more often than once per quarter, the Supplier will provide the per-session records supporting any amount invoiced under this clause.
  7. Changes in provider pricing. Charges follow the AI Tool providers' published list prices, which those providers may change. The Supplier will notify the Client of any change that materially affects charges under this clause.

Why each part is there

A clause that just says "AI costs are billable" gets challenged the first month the number is larger than the client pictured. Each term above exists to remove one specific argument.

Clause 3 is the whole clause

Everything else is boilerplate; this is the part that decides whether the invoice survives scrutiny. It fixes four things that are otherwise each a dispute: what counts as the client's usage (sessions against their repositories, not your general overhead), where the number comes from (the session logs, which exist whether or not anyone planned to bill from them), what rate applies (the provider's published list price, not a rate you set), and which token types are included.

That last one is not pedantry. Cache reads and writes are separately priced and, on long agentic sessions, cache traffic routinely dominates the bill. A clause that says only "tokens" invites a client to argue the cache portion was not what they agreed to. The published per-model rates, including cache, are the reference.

The subscription sentence

This is the sentence most drafts are missing, and it addresses the obvious objection: if you pay a flat $200-a-month seat, the client can reasonably ask why they are being invoiced $900. The answer is that you are billing the measured value of what their work consumed, at public rates, not reselling an invoice you received. Saying so in the contract is what makes the line defensible instead of awkward. Not saying it is how a pass-through line reads as a markup on nothing.

Clause 5 turns the risk into the client's decision

Agent usage is lumpy. One refactor can cost more than the previous three weeks. A notice threshold means a surprising month gets raised while it is happening rather than discovered on an invoice, which is the difference between a conversation and a write-off. Set [$Y] somewhere a genuinely unusual month trips it, not every busy week.

Clause 6 costs you nothing and settles everything

You already have the per-session records. Offering them pre-emptively is close to free and removes the main reason a client disputes a usage line, which is suspecting there is nothing behind it. The quarterly limit keeps it from turning into an open-ended audit obligation.

The half most templates leave out

Billing permission and processing permission are different problems, and the second is the bigger one. If your master agreement has a confidentiality clause, a subcontractor restriction, or anything about where client data may be sent, then running a client's source code through a third-party model may already need consent you do not have — and no amount of billing wording fixes that. A clause that lets you charge for something you were not permitted to do is worse than no clause.

So pair it with this, or confirm your existing agreement already covers it:

AI Tools and Client Materials
  1. The Client agrees that the Supplier may process Client materials, including source code, through AI Tools for the purpose of providing the Services.
  2. The Supplier will use AI Tools under commercial terms that do not permit the provider to train its models on Client materials, and will on request tell the Client which providers it uses.
  3. The Supplier remains responsible for the Services, including any work product produced with the assistance of AI Tools, to the same standard as work produced without them.

Before you sign anything containing term 2, check it against your providers' current terms for the plan you are actually on — consumer and business tiers differ on this, and the terms change. It is a promise about your vendors, so it is only as true as your last read of them.

Variants

Billing at cost, no margin

Delete plus a handling charge of [N]% of that amount from clause 2, and the handling charge if any from clause 4. Easiest to defend, and the right choice when the client is cost-sensitive or the relationship is new.

Included allowance, then overage

Replace clause 2 with:

Charges. The fees include attributable AI Tool usage of up to [$Z] per month, measured as set out in clause 3. Usage above that amount in any month is chargeable to the Client at the measured amount plus a handling charge of [N]%, invoiced monthly in arrears.

Predictable for the client, and it caps your exposure. Set [$Z] from a few months of real per-client numbers, not a guess.

A single line, where a full clause is overkill

For a short SOW or a freelance agreement, this carries most of the value:

We use AI coding tools in delivering the Services. Usage attributable to your work is measured per session, valued at the providers' published list rates plus [N]%, and invoiced monthly with a breakdown by workstream and model.

Keeps the measurement basis and the markup; drops the notice and verification terms.

You are not rebilling at all

Then you do not need any of this. What you need is the per-client number anyway, so the next fixed-fee quote is priced against what the work actually costs you. That is the same measurement without the contract wording — covered in the billing models guide.

Then the invoice has to match

A clause promising a breakdown by workstream, model and rate basis is a commitment to produce one every month. If clause 4 says the invoice shows those things and it does not, you have given the client a reason to query it. The invoice line format shows what satisfies it, and the tracking guide covers getting per-client numbers out of the logs in the first place.

Two ways to produce them. Free and local: npx tallyhook reads the Claude Code and Codex logs already on your machine, and npx tallyhook --by client groups repositories into the clients you bill and applies your markup. Nothing is uploaded and there is no account. When one machine stops being enough — several developers, history older than your logs, or a report link you can send the client instead of a screenshot — that is what Tallyhook does, and there is a demo with no signup.

Questions

Can I bill a client for Claude Code or Codex usage?

If your contract allows you to recover third-party or pass-through costs, and the usage is attributable to that client's work, this is ordinary cost recovery like hosting or stock licences. What makes it disputable is not the principle but the measurement, so agree the basis in writing before you invoice it rather than adding a line to an invoice the client is not expecting.

How do I bill AI usage when I pay a flat subscription, not per token?

Charge the list-price equivalent: the cost of the same tokens at the provider's published API rates, labelled as such. It is reproducible from the session logs, consistent across clients, and does not depend on how your seats are bundled. Clause 3 of the clause on this page defines it explicitly, which is what stops a client reading the line as a markup on nothing.

What markup is normal on AI usage?

There is no industry standard yet. Agencies generally treat it like other pass-through costs, either at cost or with a handling margin covering the tooling, review and administration around it. Whatever you choose, put the percentage in the contract and show it on the invoice; an unstated margin discovered later is what turns a line item into an argument.

Do I need a new contract, or can I add this to a statement of work?

It depends on where your pricing terms live. If the SOW sets the charges, a clause in the next SOW is usually enough. If your master agreement fixes fees or limits expenses, that is the document to amend, because an SOW cannot normally override it. Have your own counsel confirm which applies to your paperwork.

Is this legal advice?

No. It is a drafting starting point written for agencies and freelancers, not advice on your situation, and it has not been reviewed against the law of any particular jurisdiction. Have your own lawyer review it before you rely on it.