Skip to content
Tech News
← Back to articles

The Billable Usage API: programmatic cost visibility for Cloudflare

read original more articles
Why This Matters

The new Billable Usage API from Cloudflare provides developers and organizations with programmatic access to detailed, usage-based cost data across all Cloudflare products. This enables better automation, transparency, and cost management, especially as agents and automated systems take on more infrastructure responsibilities. It marks a significant step toward more integrated and real-time financial visibility in cloud operations.

Key Takeaways

Agents Week is about the shift already underway: agents write code, deploy Workers, and provision infrastructure on your behalf. That shift changes what you need to see. If a program is spending money in your Cloudflare account, you need to know what it's spending; throughout the day, per product, in a shape another program can consume. The dashboard is the right answer for humans. It's not the right answer for automation.

So we're launching a new Billable Usage API for self-serve accounts: a single endpoint that returns your account's usage and cost, broken down by product and by service period. It covers every usage-based Cloudflare product on the account, including Workers, R2, D1, Workers AI, Vectorize, Images, and Stream, all with one call. And if you already work in a FinOps toolchain, the column names should look familiar.

curl https : //api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/billable-usage \ - H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

curl "https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/billable-usage?from=2026-02-01&to=2026-02-15" \ - H "Authorization: Bearer $CLOUDFLARE_API_TOKEN"

You'll get back an HTTP 200 OK with Content-Type: application / json and the usage rows in the response body. Today, usage and cost data are updated daily while we work towards providing more real time data.

What comes back

Each row in the response is one charge period for one product on your account.

ServiceName and ServiceFamilyName — which product ("Workers Standard" under the "Workers" family, "R2 Storage" under "R2", etc.).

and — which product ("Workers Standard" under the "Workers" family, "R2 Storage" under "R2", etc.). ChargePeriodStart / ChargePeriodEnd — the window this row covers.

/ — the window this row covers. PricingQuantity and ConsumedUnit — how much you used, in the unit of measure we bill on (GB-months, GB-seconds, requests, etc.).

... continue reading