The Billable Usage API: programmatic cost visibility for Cloudflare

Aug 04, 2026 12:18 AM - 2 hours ago 1

Agents Week is astir the displacement already underway: agents constitute code, deploy Workers, and proviso infrastructure connected your behalf. That displacement changes what you request to see. If a programme is spending money successful your Cloudflare account, you request to cognize what it's spending; passim the day, per product, successful a style different programme tin consume. The dashboard is the correct reply for humans. It's not the correct reply for automation.

So we're launching a caller Billable Usage API for self-serve accounts: a azygous endpoint that returns your account's usage and cost, surgery down by merchandise and by work period. It covers each usage-based Cloudflare merchandise connected the account, including Workers, R2, D1, Workers AI, Vectorize, Images, and Stream, each pinch 1 call. And if you already activity successful a FinOps toolchain, the file 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 backmost an HTTP 200 OK pinch Content-Type: application/json and the usage rows successful the consequence body. Today, usage and costs information are updated regular while we activity towards providing much existent clip data. 

What comes back

Each statement successful the consequence is 1 complaint play for 1 merchandise connected your account.

  • ServiceName and ServiceFamilyName — which merchandise ("Workers Standard" nether the "Workers" family, "R2 Storage" nether "R2", etc.).
  • ChargePeriodStart / ChargePeriodEnd — the model this statement covers.
  • PricingQuantity and ConsumedUnit — really overmuch you used, successful the portion of measurement we measure connected (GB-months, GB-seconds, requests, etc.).
  • ContractedCost — what that play cost, successful BillingCurrency.
  • CumulatedPricingQuantity and CumulatedContractedCost — moving totals for the billing period.
  • ZoneId / ZoneName — erstwhile the usage is attributed to a circumstantial zone.

Most of these representation straight to columns successful the FinOps Open Cost and Usage Specification (FOCUS), truthful if your squad is already ingesting FOCUS information from different provider, the names and semantics should beryllium familiar:

Cloudflare field

FOCUS column

Notes

BillingCurrency

BillingCurrency

Exact match.

BillingPeriodStart

BillingPeriodStart

Exact match.

ChargePeriodStart / ChargePeriodEnd

ChargePeriodStart / ChargePeriodEnd

Exact match.

ServiceName

ServiceName

Exact match.

ConsumedQuantity / ConsumedUnit

ConsumedQuantity / ConsumedUnit

Exact match.

PricingQuantity

PricingQuantity

Exact match.

ContractedCost

ContractedCost

Exact match.

ServiceFamilyName

(close to ServiceCategory)

Cloudflare-native grouping; FOCUS uses a controlled vocabulary.

CumulatedContractedCost

(derived)

Convenience section — FOCUS treats cumulation arsenic a query concern.

ZoneId / ZoneName

(close to ResourceId / ResourceName)

Zone-scoped identifier wherever applicable.

Responses usage the modular Cloudflare API letter cover — consequence is an array of rows, 1 per merchandise per complaint period, alongside success, errors, and messages.

{ "result": [ { "BillingCurrency": "USD", "BillingPeriodStart": "2025-02-01T00:00:00Z", "ChargePeriodStart": "2025-02-01T00:00:00Z", "ChargePeriodEnd": "2025-02-28T23:59:59Z", "ServiceName": "Workers Standard", "ServiceFamilyName": "Workers", "ConsumedQuantity": 150000, "ConsumedUnit": "GB-months", "ContractedCost": 0.75, "CumulatedContractedCost": 2.25 } ], "success": true, "errors": [], "messages": [] }

Where we are connected FOCUS

Matching FOCUS naming was a deliberate choice. AWS, Azure, Google Cloud, Oracle, and a increasing database of SaaS providers already people FOCUS formatted exports, and each superior cost-management instrumentality speaks to it. That said, we're not yet claiming afloat conformance: a fistful of columns the spec requires aren't successful the payload today. Getting location is connected our roadmap. Consider this the first step: acquainted style now, afloat conformance next.

Cloudflare spend, adjacent to the remainder of your unreality spend: our business pinch Vantage

We've collaborated pinch Vantage connected a autochthonal Cloudflare integration. Vantage is an infrastructure costs guidance level that ingests costs and usage information from much than 30 providers, crossed AI, Cloud and SaaS providers, and brings it into a azygous position for reporting, allocation, and optimization. With this integration, your usage flows into the aforesaid Cost Reports, Budgets, and Cost Alerts you already usage for the remainder of your infrastructure.

Vantage connects to Cloudflare utilizing a read-only API token pinch Billing Read access. Once connected, Vantage pulls your Billable Usage information regular and breaks it down by merchandise (such arsenic Workers and R2), zone, and account, truthful you tin spot which products thrust your walk and property it to the teams and services down it.

A fewer of the workflows this integration supports:

  • Cross-provider allocation. Group Cloudflare walk by product, zone, and account, past usage Virtual Tags to allocate by squad aliases merchandise statement alongside your AWS, Azure, and different supplier costs, each successful a azygous report.
  • Anomaly detection. Vantage Cost Alerts show each connected supplier and notify you via Slack aliases E-Mail erstwhile walk deviates from its baseline, truthful a alteration successful Workers aliases R2 walk surfaces the aforesaid measurement it does for immoderate different provider.
  • FinOps agents and MCP. Ask the in-console Vantage FinOps supplier a mobility specified arsenic "What was our biggest costs driver past week crossed each provider?", aliases query the aforesaid information from Claude aliases ChatGPT done Vantage's hosted MCP server. Cloudflare walk is included alongside your different connected providers.

Connect your Cloudflare relationship successful the Vantage console, and your costs look adjacent to everything other you run. There are nary manual exports, nary invoice uploads, and nary abstracted dashboard to maintain. 

This FOCUS standardized API besides useful pinch different Fintech tooling.

Why we built this

Agents do much than constitute code. They deploy Workers, proviso R2 buckets, and negociate D1 databases. When you assistance programmatic entree to your Cloudflare account, you request programmatic visibility into what it's costing you. Not astatine the extremity of the month, but passim the day, by product, successful a style a programme tin really consume.

The Billable Usage API is that shape. And customers person been asking america for programmatic usage for years. Finance teams want to propulsion walk into their ain systems and property costs backmost to soul projects, teams, and moreover their extremity customers. Developers want a curl they tin driblet successful a script. Every 1 of those workflows utilized to impact a screenshot aliases a manual export. Now it's an HTTP call, aliases a configuration successful Vantage.

What's next

  • Finer-grained clip windows. Today the API returns charge-period rows, which for astir products is daily. We're looking astatine much existent clip breakdowns for the products wherever it makes sense.
  • Forecasting. CumulatedContractedCost tells you wherever your walk is successful the existent billing cycle. We want to thief you foretell wherever you're going to extremity up. And not conscionable astatine the relationship level, but the merchandise level.
  • Enterprise coverage. This first merchandise is self-serve only. An balanced acquisition for Enterprise contracts is successful the works.

Try it

The endpoint is unrecorded coming for each self-serve accounts. Grab an API token pinch the Billing Read permission, constituent your curl astatine it, and you'll get backmost your existent billing play surgery down by product. Full reference is disposable connected the Cloudflare API docs. To spot it alongside the remainder of your unreality spend, link your Cloudflare relationship successful the Vantage console.

Cloudflare has spent years making it easy to tally much of your stack connected our network. It's clip we made it conscionable arsenic easy to spot what that's costing you — connected Cloudflare, and everyplace else.

More