Per-Client AI Billing for Agencies: Complete Guide
Without per-client tracking, you can't answer the most important question: Which clients are profitable?
Many agencies discover too late that 30-40% of their clients are unprofitable—consuming more in AI costs than they're paying in retainers. Per-client billing visibility solves this problem by showing exactly where your money goes.
The Problem: Invisible AI Costs
Scenario: You're an agency serving 8 clients. Monthly AI bill from OpenAI: $847. Question: How much of that $847 is Client A vs Client B?
Without per-client tracking, you have no idea. You might be:
- Losing money on 3 clients (undercharging for their usage)
- Overcharging 2 clients (they're subsidizing the unprofitable ones)
- Wasting 2-3 hours per month manually tracking costs in spreadsheets
Two Pricing Models for Agencies
Model 1: Retainer with Included Tokens
Charge a flat monthly retainer that includes X tokens. If client exceeds, they pay overages or upgrade.
Pros of Retainer Model
- Predictable revenue: You know exactly what you'll earn each month
- Easy to explain: Clients understand flat-rate pricing
- Encourages upgrades: Clients naturally move up tiers as usage grows
Cons of Retainer Model
- "Wasteful" usage: Clients may overuse if tokens aren't scarce
- Complex tier management: Need to monitor who's approaching limits
Model 2: Cost-Plus Markup
Charge actual cost + markup percentage. Client pays exactly what they use.
Pros of Cost-Plus Model
- Fair pricing: Clients pay for what they use, nothing more
- No tier management: Usage scales automatically
- Higher margins on heavy users: 30% of $500 > 30% of $100
Cons of Cost-Plus Model
- Variable revenue: Harder to forecast monthly income
- Client education: Must explain why bill varies month-to-month
How to Implement Per-Client Tracking
Step 1: Tag Every Request
Add a client identifier header to all LLM API requests:
Step 2: Export Monthly Usage
At month-end, export usage by client from your LLM gateway:
| Client | Requests | Tokens | Cost |
|---|---|---|---|
| acme-corp | 12,430 | 3.2M | $8.47 |
| techstartup | 8,120 | 1.9M | $5.23 |
| bigco-inc | 45,890 | 12.7M | $31.42 |
Step 3: Apply Markup and Invoice
For cost-plus model, apply your markup percentage:
Total time: 30 seconds per client instead of 2-3 hours of manual tracking.
What Markup Percentage Should You Charge?
Industry standard markup ranges from 20-50% depending on value-add:
| Service Level | Markup | Why |
|---|---|---|
| Pass-through only | 20-25% | Minimal management, just routing requests |
| Basic management | 30-35% | Cost monitoring, basic optimization |
| Full optimization | 40-50% | Intelligent routing, custom prompts, A/B testing |
Pricing tip: Position markup as "AI Infrastructure Management Fee" instead of "Markup." Clients understand they're paying for expertise, not just pass-through costs.
Handling Unprofitable Clients
What do you do when per-client tracking reveals a client is costing more than they're paying?
Option 1: Optimize Their Usage
Before raising prices, try optimization:
- Are they using GPT-4o when GPT-4o-mini would work? (16x cost reduction)
- Are prompts verbose? Trim unnecessary context (can reduce tokens 30-50%)
- Can you cache repeated requests? (reduces duplicate API calls)
Real example: Client was using 2,400-token prompts that included entire conversation history. Optimized to only include last 3 exchanges. Result: 67% token reduction, client became profitable without price increase.
Option 2: Raise Retainer
If optimization isn't enough, raise the retainer:
Option 3: Switch to Cost-Plus
Move unprofitable retainer clients to cost-plus pricing:
Advanced: Multi-Project Tracking
Some clients have multiple projects. Track costs per project with nested tags:
Then invoice with project-level breakdown:
Automating Client Billing
For agencies with 10+ clients, manual invoicing becomes tedious. Automate it:
Automation Flow
- On 1st of month, export previous month's usage via API
- Calculate markup for each client
- Generate invoice in QuickBooks/Xero/Stripe
- Send invoice automatically
Time saved: 2-3 hours per month for a 10-client agency.
Per-Client Tracking Built-In
AI Gateway tracks costs per client automatically. Export monthly reports in 1 click. No tagging setup required.
Try Free for 14 Days →