Introducing the Billable Usage API: programmatic cost visibility for Cloudflare (opens in new tab)
Cloudflare is launching a Billable Usage API to make account spending accessible to automation, not just human-facing dashboards. The single endpoint reports usage and costs across products such as Workers, R2, D1, Workers AI, Vectorize, Images, and Stream. Its FOCUS-inspired schema is designed to integrate with FinOps tools, although full FOCUS conformance is still planned.
Billable Usage API
- Endpoint:
GET /accounts/{account_id}/billable-usage
- Optional date filters:
from=YYYY-MM-DDto=YYYY-MM-DD
- Requires a Cloudflare API token with appropriate billing access.
- Returns HTTP 200 with a standard Cloudflare JSON envelope:
resultsuccesserrorsmessages
- Usage and cost data currently refresh daily, with more real-time reporting planned.
Usage and Cost Data
Each result row represents one product and charge period.
ServiceNameandServiceFamilyNameidentify the product and product family.ChargePeriodStartandChargePeriodEnddefine the covered period.PricingQuantityandConsumedUnitshow billable usage, such as requests, GB-months, or GB-seconds.ContractedCostreports the charge inBillingCurrency.CumulatedPricingQuantityandCumulatedContractedCostprovide running billing-period totals.ZoneIdandZoneNameidentify the relevant zone when usage is zone-specific.- Results can be filtered by date and include billing-period metadata such as
BillingPeriodStart.
FOCUS-Compatible Schema
Cloudflare adopted naming that closely follows the FinOps Open Cost and Usage Specification (FOCUS).
- Exact or near matches include:
BillingCurrencyChargePeriodStartandChargePeriodEndServiceNameConsumedQuantityandConsumedUnitPricingQuantityContractedCost
ServiceFamilyNameis similar to FOCUS’sServiceCategory, but uses Cloudflare’s native grouping.ZoneIdandZoneNameserve a role similar toResourceIdandResourceName.CumulatedContractedCostis a convenience field; FOCUS generally treats cumulative calculations as query-time operations.- The API is not yet fully FOCUS-compliant because some required columns are missing.
Vantage Integration
Cloudflare partnered with Vantage to bring Cloudflare costs into multi-provider FinOps workflows.
- Vantage connects with a read-only Cloudflare API token granting Billing Read access.
- It retrieves Billable Usage data daily and breaks spending down by:
- Product
- Zone
- Account
- Cloudflare costs appear alongside AWS, Azure, AI, and SaaS provider costs in:
- Cost Reports
- Budgets
- Cost Alerts
- Supported workflows include cross-provider allocation, anomaly detection, and FinOps-agent or MCP queries.
Motivation for Programmatic Cost Visibility
As agents increasingly deploy Workers, provision R2 buckets, and manage D1 databases, they can also create unexpected spending. Cloudflare argues that programmatic infrastructure management requires programmatic cost visibility, enabling automated monitoring, allocation, alerts, and optimization.
The API is intended as a foundation for agent-driven and FinOps tooling, while Cloudflare works toward more real-time data and complete FOCUS conformance.