Cost visibility for automation: Cloudflare's Billable Usage API
Agents now write code, deploy Workers, and provision infrastructure on behalf of developers. That shift has a direct consequence for observability: 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 answers that for humans; it doesn't answer it for automation.
Cloudflare has introduced a Billable Usage API for self-serve accounts: a single endpoint that returns account usage and cost, broken down by product and service period. One call covers every usage-based Cloudflare product on the account, including Workers, R2, D1, Workers AI, Vectorize, Images, and Stream. The response format deliberately aligns with column names familiar to teams already working in FinOps toolchains.
What the response contains
The API returns an HTTP 200 OK with Content-Type: application/json and usage rows in the response body. Each row represents one charge period for one product on the account. Usage and cost data are currently updated daily; more real-time data is on the way.
Each row includes:
ServiceNameandServiceFamilyName— the product and its family ("Workers Standard" under "Workers", "R2 Storage" under "R2").ChargePeriodStart/ChargePeriodEnd— the window the row covers.PricingQuantityandConsumedUnit— usage in the billable unit (GB-months, GB-seconds, requests, etc.).ContractedCost— cost for that period inBillingCurrency.CumulatedPricingQuantityandCumulatedContractedCost— running totals for the billing period.ZoneId/ZoneName— attribution when usage maps to a specific zone.
Most columns map directly to the FinOps Open Cost and Usage Specification (FOCUS), so teams already ingesting FOCUS data from other providers will recognize the names and semantics.
Cloudflare field | FOCUS column | Notes |
|---|---|---|
|
| Exact match. |
|
| Exact match. |
|
| Exact match. |
|
| Exact match. |
|
| Exact match. |
|
| Exact match. |
|
| Exact match. |
| (close to | Cloudflare-native grouping; FOCUS uses a controlled vocabulary. |
| (derived) | Convenience field — FOCUS treats cumulation as a query concern. |
| (close to | Zone-scoped identifier where applicable. |
Responses use the standard Cloudflare API envelope: result is an array of rows, one per product per charge period, with 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": []
}
FOCUS: naming aligned, full conformance pending
Matching FOCUS naming was a deliberate design decision. AWS, Azure, Google Cloud, Oracle, and a growing list of SaaS providers already publish FOCUS-formatted exports, and cost-management tools understand that format. Cloudflare is not yet claiming full conformance—a handful of spec-required columns are absent from the payload. Full conformance is on the roadmap; the current release is a first step with a familiar shape.
Cloudflare spend beside the rest: partnership with Vantage
Cloudflare has partnered with Vantage, an infrastructure cost management platform ingesting cost and usage data from more than 30 providers across AI, cloud, and SaaS. With the native integration, Cloudflare usage flows into the same Cost Reports, Budgets, and Cost Alerts already in use for the rest of the infrastructure estate.
Vantage connects to Cloudflare using a read-only API token with Billing Read access. Once connected, it pulls Billable Usage data daily and breaks it down by product (Workers, R2), zone, and account—showing which products drive spend and enabling attribution to teams and services.
Specific workflows supported by the integration:
- Cross-provider allocation. Group Cloudflare spend by product, zone, and account, then use Virtual Tags to allocate by team or product line alongside AWS, Azure, and other provider costs in a single report.
- Anomaly detection. Vantage Cost Alerts monitor all connected providers and notify via Slack or email when spend deviates from baseline—a change in Workers or R2 spend surfaces the same way as for any other provider.
- FinOps agents and MCP. The in-console Vantage FinOps agent answers questions like "What was our biggest cost driver last week across every provider?" The same data is queryable from Claude or ChatGPT through Vantage's hosted MCP server, with Cloudflare spend included alongside other providers.
Connecting happens in the Vantage console; costs appear next to other infrastructure with no manual exports, invoice uploads, or separate dashboards to maintain.
Why programmatic usage visibility
Agents deploy Workers, provision R2 buckets, and manage D1 databases. Granting them programmatic access to an account requires programmatic visibility into cost—not at month-end, but intraday, per product, in a machine-consumable shape. Customers have requested this for years. Finance teams want to pull spend into internal systems and attribute cost to projects, teams, and end customers. Developers want a curl they can drop into a script. Those workflows previously meant screenshots or manual exports. Now they're an HTTP call or a Vantage configuration.
Roadmap
- Finer-grained time windows. The API currently returns charge-period rows, daily for most products. More real-time breakdowns are under consideration where they make sense.
- Forecasting.
CumulatedContractedCostshows current position in the billing cycle. Predicting the end-of-cycle position—at account and product level—is the goal. - Enterprise coverage. The initial release is self-serve only; an equivalent Enterprise experience is in development.
The endpoint is live for all self-serve accounts. An API token with the Billing Read permission is sufficient to call it and receive the current billing period broken down by product. Full reference is in the Cloudflare API documentation. To view it alongside remaining cloud spend, connect the account in the Vantage console.



