Claude API Billing Passthrough for Resellers
If you're building a product on top of Claude and want to resell that access to clients or end users, "billing passthrough" means one specific thing: you need a way to attribute every API call to the right customer, track their usage in real time, and bill them (with or without markup) without exposing your own Anthropic credentials or eating the cost difference blind. This is a common problem for agencies, SaaS wrappers, and consultancies that have Claude access but no clean way to meter it per client.
The short answer is that you don't do this by proxying raw Anthropic keys to clients — that's a security and billing nightmare. Instead, you issue scoped application keys, one per client or per project, route all traffic through a layer that logs usage against that key, and either bill clients directly for their consumption or roll it into your own invoicing. This is exactly the gap a tool like SubToAPI is built to fill: it turns your Claude access into an HTTPS API with per-key usage metadata, so you can issue a sub_live_... key per client and see exactly what each one costs you.
Why "just share the Anthropic key" doesn't work
The naive approach is to give every client the same Anthropic API key, or hand out a handful of keys and reconcile usage manually at the end of the month. This breaks down fast for a few reasons:
- No per-client attribution. Anthropic's billing dashboard shows your total spend, not a breakdown by customer. You'd need to log every request yourself to know who used what.
- No isolation. If one client sends a malformed loop or a runaway agent, it can blow through budget that affects everyone else on the same key.
- Security exposure. Distributing your primary API key to multiple clients means any one of them can leak it, and you have no way to revoke access to just that client without rotating for everyone.
- No markup mechanism. If you're reselling at a margin, you need usage numbers you can trust enough to invoice against.
A proper passthrough setup solves all four by giving each client (or each internal project) its own key, scoped to your account, with independent usage tracking.
What a working passthrough setup looks like
The practical architecture is simple:
- One Claude access point, many application keys. You keep a single relationship with Claude underneath, but issue a distinct application key per client.
- Per-key usage logging. Every request against a key is tagged with token counts, model used, and timestamp, so you have a ledger per client, not just a company-wide total.
- Revocation without disruption. If a client churns or a key leaks, you kill that one key — everyone else keeps working.
- A dashboard or export you can bill from. Whether you invoice manually or push usage into Stripe metered billing, you need numbers you can defend.
With SubToAPI, this maps directly onto the product: each client gets their own sub_live_... key from your dashboard, requests go through the same Claude API shape you already know, and usage metadata comes back with each response so you can track consumption per key without building a logging layer yourself.
Example: issuing a scoped key per client
Once you've created a key for a client in your dashboard, requests look like standard Claude Messages API calls:
curl https://api.subtoapi.app/v1/messages \
-H "Authorization: Bearer $SUBTOAPI_KEY" \
-H "content-type: application/json" \
-d '{
"model": "claude-sonnet-4.5",
"max_tokens": 1024,
"messages": [
{"role": "user", "content": "Summarize this client ticket."}
]
}'
Because $SUBTOAPI_KEY is specific to that client's integration, every token consumed on this call rolls up to their usage record, not a shared pool. See the quickstart and messages docs for the full request shape.
Pricing the passthrough
Once usage is attributable per client, pricing is a business decision, not a technical one. Common models:
- Flat seat/subscription fee + usage pass-through. You charge a base fee for the integration and pass raw token costs through at cost or near-cost.
- Margin on tokens. You mark up usage by a fixed percentage and bill monthly based on logged consumption.
- Tiered bundles. Clients get an included usage allowance, and overages are billed at a per-token rate.
Whichever model you pick, you need the underlying usage numbers to be accurate and timely — this is the part that's easy to underestimate when building it from scratch (webhook handling, token counting across streaming responses, retry deduplication, etc.) and is the core reason teams move to a managed layer instead of rolling their own logging on top of raw Anthropic calls.
Keeping team and client access separate
If you have multiple people on your side working across several client integrations, don't conflate "who can use the API" with "who can manage billing or keys." Separate your internal team seats from client-facing application keys:
- Team members get dashboard access to create/revoke client keys, scoped by role.
- Each client integration gets its own key, tied to a specific usage record, independent of who on your team manages it.
This separation matters most when your team grows — you want to onboard or offboard staff without touching any client's live integration. SubToAPI's Team and Scale plans are built around this: per-seat access for your staff, with application keys issued independently underneath.
Streaming and tool use still need attribution
If your resold product involves streaming responses or tool calls — common in chat products and agents — make sure your billing layer still attributes tokens correctly across the full response lifecycle, not just the initial request. Streaming responses accumulate tokens over time, and tool-calling turns can involve multiple round trips. A passthrough layer that only counts the first request will undercount real cost. Check the streaming and tools docs for how usage is reported across these patterns before you build pricing assumptions on top of them.
Getting started
If you're currently reselling Claude access with spreadsheets and manual reconciliation, the fastest fix is moving to per-client application keys with built-in usage metadata rather than building a logging and billing layer yourself. You can start a trial and issue your first client key at signup, or review plan details on the pricing page if you're estimating costs for multiple client integrations.
FAQ
Can I resell Claude API access without Anthropic's direct involvement in billing each client? Yes — you maintain one underlying Claude relationship and issue separate scoped keys per client through a layer like SubToAPI, handling client billing yourself using the per-key usage data.
Do I need to rebuild my app if I switch from a raw Anthropic key to a passthrough service? No, if the service mirrors the Claude Messages API shape. Requests, models, and response formats stay the same — you just point at a different base URL and key.
How do I stop one client's usage from affecting another's budget? Issue a unique application key per client so usage, rate limits, and revocation are isolated. Shared keys make isolation impossible regardless of how careful your logging is.