eBRBe
View eBRBe Pricing & Free Plan →

How to Bill Clients for OpenAI Codex Usage

Published 2026-11-25 · By the eBRBe team · Operated by MeWeBe Limited

Short answer: First find out how you pay for Codex. If Codex runs on your OpenAI API key, give each client its own OpenAI project (or API key): OpenAI then reports usage and cost per client, and you can invoice that at cost or with a stated markup. If Codex runs on a ChatGPT plan, there is no per-token bill to split, so recover the seat with a fixed AI tooling fee or treat it as overhead. Either way, put the rule in the contract and show AI usage as its own invoice line next to the hours.

Two ways Codex gets paid for, and why it matters

OpenAI's Codex coding agent can be used signed in with a ChatGPT plan, or with an OpenAI API key. The two produce very different bills:

How you run CodexWhat you payCan you split it by client?
OpenAI API keyPer token, on your OpenAI platform billYes: OpenAI reports usage and cost per project and per API key
ChatGPT planA monthly seat priceNo per-token bill; only a fixed or time-based split

Many teams use both. Settle which is which before you promise a client line-item AI costs.

Method 1: one OpenAI project per client (most accurate)

  1. In the OpenAI platform, create a project for each client (or each client engagement) and an API key inside it.
  2. Use that client's key when you run Codex on their repository, for example by setting it in the shell or the project's environment you open for that client.
  3. At month end, the platform's usage and cost reports show each project's spend. That figure is the client's AI usage for the month.

Method 2: log each run with its exact cost

If you cannot split keys (one shared key, a client who wants per-task detail, or work done on someone else's account), log runs against the client's project directly:

eBRBe's CLI includes a Codex hook that reads each session's token totals from ~/.codex/sessions after every turn. The @ebrbe/cli package is not on npm yet, so for now use the usage sync or the two routes above.

Method 3: ChatGPT-plan seats — a fixed AI tooling fee

A ChatGPT seat costs the same whether a developer runs Codex for one client or five. Metering it per client adds work without adding accuracy. Two honest options:

If you want a usage-based split anyway, divide the seat cost across clients by the hours each developer logged on each client that month. Hours are a key clients already understand.

Which method fits

Your situationUseWhat the client sees
Codex on your API key, clients who want detailMethod 1: OpenAI project per clientMonthly AI usage at cost, or cost plus your markup
One shared key, or per-task reportingMethod 2: log runs with costAI usage lines per task or per month
ChatGPT-plan seatsMethod 3: fixed fee or absorbA fixed "AI development tools" line, or nothing

On markup: pass-through at cost is the most transparent; cost plus a stated percentage pays for choosing, running and reviewing the agent's work. Our guide to billing AI agent costs compares the pricing models, and the AI agent cost & markup calculator works out the numbers. Using Cursor as well? See how to bill clients for Cursor usage. Running Claude models too? See what a run costs on each Claude model. Also see how to bill clients for Claude Code, GitHub Copilot, Windsurf (Devin Desktop), Aider 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 OpenAI Codex, in delivering the services. Usage-based charges for these tools incurred on the API key or project assigned to your work are invoiced monthly as a separate 'AI usage' line, at cost plus [X]%, as reported by the provider. Fixed subscription costs are [not charged separately / covered by a fixed AI tooling fee of [amount] per month]. We will not exceed [amount] of AI usage in a month without your written approval."

eBRBe's AI agent build project template is set up for this kind of engagement.

Frequently Asked Questions

Can I charge a client for my Codex usage?

Yes, if the contract says so. Agree before work starts whether AI usage is passed through at cost, charged with a stated markup, covered by a fixed fee or absorbed, and show it as its own invoice line.

How do I split OpenAI API usage by client?

Create one OpenAI project (or one API key) per client and use that key for the client's Codex work. OpenAI reports usage and cost per project and per key, so each client's share is already separated. eBRBe's provider usage sync reads those reports daily and maps each project or key to a client (Pro plan and above).

What if I use Codex through a ChatGPT plan?

A ChatGPT plan has no per-token bill to split. Treat the seat as overhead, or recover it with a fixed monthly AI tooling fee per client that the contract names.

Does eBRBe log Codex sessions automatically?

Through the OpenAI usage sync, yes, for usage billed to your API keys. eBRBe's CLI also has a Codex hook that reads each session's token totals, but the @ebrbe/cli package is not on npm yet. Until it is, use the usage sync, the MCP log_agent_run tool or the REST API.

Next step on eBRBe

eBRBe puts AI agent costs and human hours on the same client invoice, 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 eBRBe workspace with made-up clients, agent runs and invoices, no account needed.

Explore the demo or sign up free →