Cloudflare's Billable Usage API puts your cloud spend in code
Cloudflare shipped a Billable Usage API for all self-serve accounts, FOCUS-aligned and live today. Why a queryable cloud bill beats a monthly PDF.
Most small businesses find out what their cloud cost last month by opening an invoice. That's a lagging indicator with a 30-day delay and no line item you can act on. On August 3, Cloudflare shipped the fix for its own platform: a Billable Usage API that returns cost and usage broken down by product and service period, live today for every self-serve account. If you run anything on Cloudflare, this cloud spend API is worth an hour of setup.
What actually happened
Per Cloudflare's announcement, there's one endpoint:
GET https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/billable-usage
It takes optional from and to parameters and returns service names, charge periods, pricing quantities, contracted costs, and running totals for the billing cycle, with zone-level attribution where it applies. Coverage spans the usage-based products: Workers, R2, D1, Workers AI, Vectorize, Images, and Stream. You need an API token with Billing Read permission. Data updates daily — Cloudflare says real-time is on the roadmap, alongside finer-grained time windows.
The detail we'd flag as the actually important one: the response is aligned to FOCUS, the FinOps Open Cost and Usage Specification. That's a vendor-neutral schema, which means the output drops into existing FinOps tooling — Cloudflare namechecks Vantage — without a custom parser per provider.
Why a queryable cloud bill matters for your business
Two reasons, and the second one is the one nobody talks about.
The obvious one: Workers AI and R2 are usage-metered, and usage-metered means a bug is a bill. A retry loop against an inference endpoint, an agent that re-reads the same object 40,000 times, a scraper someone pointed at your Images pipeline — none of those page anyone. They show up 26 days later as a number. A daily pull into your own table with a threshold alert turns a surprise into a Tuesday.
The less obvious one: FOCUS means this data leaves. A proprietary billing export locks your cost history inside one vendor's console, which is exactly when comparing providers becomes a research project instead of a query. When AWS, Azure, and Cloudflare all emit the same schema, "what does this workload cost on each" is a GROUP BY. Every vendor that adopts a shared cost format makes it marginally cheaper for you to leave them. Take the ones that do it seriously.
The practical build, and it's small: a nightly cron that hits the endpoint, writes rows into Postgres or SQLite, and alerts when a product line moves more than your tolerance week over week. That's an afternoon. It's also the difference between knowing your infrastructure costs and finding out.
Daily granularity is the real limitation. If your exposure is a runaway agent that can burn through real money in an hour, a once-a-day number is a postmortem, not a control. Keep your hard caps at the application layer — rate limits, token budgets, request quotas — and treat this API as the ledger, not the brake.
Key takeaways
- One endpoint,
/accounts/$ACCOUNT_ID/billable-usage, live today for all self-serve accounts; needs a token with Billing Read - Covers Workers, R2, D1, Workers AI, Vectorize, Images, and Stream, with zone-level attribution where applicable
- Responses follow the FOCUS FinOps spec — vendor-neutral, so your cost history is portable and comparable across providers
- Data refreshes daily, not real-time. Use it as a ledger and alerting source; keep hard spend caps in your application code
If you can't query what your infrastructure costs, you can't manage it. We instrument spend and outcomes into systems you own, not dashboards you rent — see how we build, or run the numbers on your own stack.
Sources: Cloudflare Blog, FinOps FOCUS specification.
- #cloudflare
- #cloud-costs
- #finops
- #api
- #vendor-pricing
Tommy Rush — Founder, Rush Commerce
Operator turned builder. 15+ years running operations — now shipping the systems businesses run on. More
Get The Rush Report weekly — one email, zero fluff.
Keep reading
Edge0 runs a 35B model in 3GB of RAM by streaming off SSD
A September 16 paper and an Apache 2.0 checkpoint run a 35B MoE from disk at ~15-20 tok/s on a 24GB Mac mini. What cheap local inference changes about your token bill.
Read itBrowserSkill: agents that use your logged-in browser
Tencent's MIT-licensed BrowserSkill lets Claude Code, Cursor and Codex drive your real browser session. No test accounts — and no account boundary either.
Read it