Billable Usage API Launches: Programmatically Check Cloudflare Costs
Key point
Cloudflare has launched the Billable Usage API, which lets you look up per-product usage and costs by account.
Details
Cloudflare has launched the Billable Usage API, which lets you look up per-product usage and costs for self-service accounts all at once. It is provided so that automation programs or FinOps tools can check account spending via API instead of the dashboard.
The /accounts/$ACCOUNT_ID/billable-usage endpoint returns usage data by product and billing period. It supports all usage-based Cloudflare products within an account, including Workers, R2, D1, Workers AI, Vectorize, Images, and Stream, and the query period can be specified using the from and to parameters.
The response includes the following information:
- Product name and service product family
- Billing period and usage measurement unit
PricingQuantity,ConsumedUnit,ContractedCost- Cumulative usage and cost for the billing period
- Zone ID and Zone name, where applicable
Most of the data fields correspond directly to column names in the FinOps Open Cost and Usage Specification (FOCUS). ServiceFamilyName is similar to FOCUS's ServiceCategory, the cumulative cost field is provided for convenience, and current usage and cost data are updated daily.
The response follows the Cloudflare API standard format, consisting of a result array and success, errors, and messages fields.
This summary was generated automatically by AI. Check the original for the author's claims and context. Copyright belongs to the original author.
Our guide explains how the AI works. Report summary errors, attribution issues, or removal requests via Contact.