Cloudflare推出了新的Billable Usage API,为自助服务账户提供可编程的成本可见性[1]。用户可通过该API端点查询账户使用情况和成本明细,数据按产品和服务周期分类[1]。该API支持Workers、R2、D1、Workers AI、Vectorize、Images和Stream等所有基于使用量计费的Cloudflare产品[1],目前成本数据每日更新,Cloudflare计划在后续提供更实时的数据[1]。
API响应包含ServiceName、ServiceFamilyName、ChargePeriodStart/End、ConsumedQuantity和ContractedCost等关键字段[1]。新API的设计与FinOps开放成本和使用规范(FOCUS)对齐,尽管Cloudflare目前尚未声称完全符合该规范,但已将其列入后续计划[1]。
为进一步扩展成本管理能力,Cloudflare与基础设施成本管理平台Vantage建立合作[1]。通过该集成,用户可在Vantage控制台中将Cloudflare成本与其他云服务成本统一查看和管理,并利用跨提供商成本分配、异常检测和FinOps代理支持等功能[1]。
Cloudflare has introduced a new Billable Usage API that gives self-service account holders programmatic access to their consumption and cost data [1]. The API endpoint at https://api.cloudflare.com/client/v4/accounts/$ACCOUNT_ID/billable-usage allows users to query detailed billing information organized by product and service period [1]. The offering covers all of Cloudflare's usage-based billing products, including Workers, R2, D1, Workers AI, Vectorize, Images, and Stream [1].
The API provides cost and usage visibility aligned with the FinOps Open Cost and Usage Specification (FOCUS) standard, though full compliance is currently planned rather than achieved [1]. Response data includes fields such as ServiceName, ServiceFamilyName, ChargePeriodStart and ChargePeriodEnd, ConsumedQuantity, and ContractedCost [1]. Currently, the API refreshes data on a daily basis, with plans to offer more real-time information in the future [1].
To enhance cost management capabilities, Cloudflare has partnered with infrastructure cost management platform Vantage [1]. This integration enables users to consolidate and manage Cloudflare costs alongside other cloud service expenses through the Vantage console [1]. The integration supports cross-provider cost allocation, anomaly detection, and FinOps practitioner support [1].