Article summary — original

Cloudflare Introduces Billable Usage API for Programmatic Cost Visibility Cloudflare has launched the Billable Usage API for self-serve accounts, offering a single endpoint to programmatically monitor costs and usage across all usage-based products. The Billable Usage API provides daily-updated cost and usage data per product and service period for self-serve Cloudflare accounts via a single endpoint. Field naming largely mirrors the FinOps Open Cost and Usage Specification (FOCUS), with full specification conformance planned on the roadmap. Cloudflare partnered with Vantage for a native integration that ingests usage data directly using a read-only token with Billing Read permissions. API Features and Payload Structure The Billable Usage API covers all usage-based services on an account, such as Workers, R2, D1, Workers AI, Vectorize, Images, and Stream, through a single HTTP GET request returning JSON. Each row details charge periods, billed metrics, contracted costs, cumulative totals, and zone attribution. While usage and cost metrics currently update daily, Cloudflare is working toward delivering real-time data. FOCUS Alignment and Vantage Integration Cloudflare deliberately structured the response columns to align with the FinOps Open Cost and Usage Specification (FOCUS) used across major cloud and SaaS providers. Although the API does not yet achieve full FOCUS conformance, Cloudflare plans to bridge remaining column gaps. Concurrently, Cloudflare partnered with cost management platform Vantage, enabling users to import daily spend metrics into centralized budgets, alerts, and cost reports using a read-only API token with Billing Read access.

Article summary — zh

Cloudflare推出计费使用量API,提供程序化成本可见性 Cloudflare面向自助服务账户推出了全新的Billable Usage API,旨在通过单一端点提供基于产品的用量与成本数据,以满足自动化程序和FinOps工具链对成本可见性的需求。 该API支持所有按用量计费的Cloudflare产品(如Workers、R2、D1、Workers AI等),目前数据按天更新并计划向更实时演进。 字段设计参考FinOps开放成本与使用规范(FOCUS),尽管目前尚未完全符合规范的所有列要求,但后续已将其纳入路线图。 Cloudflare与基础设施成本管理平台Vantage达成原生集成合作,用户可通过配置只读权限实现自动成本汇总与告警。 API功能与FOCUS规范设计 随着AI代理自动部署资源的情况增多,传统仪表板已无法满足自动化监控需求。Billable Usage API通过标准JSON格式返回包含计费周期、产品名称、消耗量、计量单位及对应成本等字段的数据。其字段命名直接映射FOCUS规范,以便与主流云服务商格式及FinOps工具无缝对接。 第三方集成与实际应用 Cloudflare已与成本管理平台Vantage实现集成,用户通过分配Billing Read权限的API令牌即可将Cloudflare费用纳入统一视图,支持生成成本报表、设定预算及触发预警。该端点目前已正式向自助服务账户开放,替代了以往财务和开发人员依赖手动导出或截屏追踪成本的繁琐流程。

Saved original article

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. 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. 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.).`ChargePeriodStart` / `ChargePeriodEnd` — 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.).`ContractedCost` — what that period cost, in `BillingCurrency`.`CumulatedPricingQuantity` and `CumulatedContractedCost` — running totals for the billing period.`ZoneId` / `ZoneName` — when the usage is attributed to a specific zone. Most of these map directly to columns in the [FinOps Open Cost and Usage Specification (FOCUS)](https://focus.finops.org/), so if your team is already ingesting FOCUS data from another provider, the names and semantics should be familiar: Responses use the standard Cloudflare API envelope — `result` is an array of rows, one per product per charge period, alongside `success`, `errors`, and `messages`. Matching FOCUS naming was a deliberate choice. AWS, Azure, Google Cloud, Oracle, and a growing list of SaaS providers already publish FOCUS formatted exports, and every serious cost-management tool speaks to it. That said, we're not yet claiming full conformance: a handful of columns the spec requires aren't in the payload today. Getting there is on our roadmap. Consider this the first step: familiar shape now, full conformance next. We've partnered with [Vantage](https://www.vantage.sh/) on a native Cloudflare integration. Vantage is an infrastructure cost management platform that ingests cost and usage data from more than 30 providers, across AI, Cloud and SaaS providers, and brings it into a single view for reporting, allocation, and optimization. With this integration, your usage flows into the same Cost Reports, Budgets, and Cost Alerts you already use for the rest of your infrastructure. Vantage connects to Cloudflare using a read-only API token with Billing Read access. Once connected, Vantage pulls your Billable Usage data daily and breaks it down by product (such as Workers and R2), zone, and account, so you can see which products drive your spend and attribute it to the teams and services behind it. A few of the workflows this integration supports: Connect your Cloudflare account in the [Vantage console](https://console.vantage.sh/), and your costs appear next to everything else you run. There are no manual exports, no invoice uploads, and no separate dashboard to maintain. This FOCUS standardized API also works with other Fintech tooling. Agents do more than write code. They deploy Workers, provision R2 buckets, and manage D1 databases. When you grant programmatic access to your Cloudflare account, you need programmatic visibility into what it's costing you. Not at the end of the month, but throughout the day, by product, in a shape a program can actually consume. The Billable Usage API is that shape. And customers have been asking us for programmatic usage for years. Finance teams want to pull spend into their own systems and attribute cost back to internal projects, teams, and even their end customers. Developers want a curl they can drop in a script. Every one of those workflows used to involve a screenshot or a manual export. Now it's an HTTP call, or a configuration in Vantage. The endpoint is live today for all self-serve accounts. Grab an API token with the *Billing Read* permission, point your curl at it, and you'll get back your current billing period broken down by product. Full reference is available on the Cloudflare API docs. To see it alongside the rest of your cloud spend, connect your Cloudflare account in the [Vantage console](https://console.vantage.sh/). Cloudflare has spent years making it easy to run more of your stack on our network. It's time we made it just as easy to see what that's costing you — on Cloudflare, and everywhere else.