CostCompass An Almanac Beta
Cloudflare cost tracking

Turn Cloudflare requests, tokens, and gigabytes into real cost

Each Cloudflare product meters on its own unit. Workers count requests, Workers AI counts Neurons, R2 counts gigabyte-months and operations — and none of them is money until you price it. Here's how the billing works, and how to keep a running cost and a next-month forecast in front of you while there's still time to act.

By Joubert Berger Published June 8, 2026

Cloudflare doesn't hand you a single cost as you go. It meters you in four different units at once. A Worker bills by the request, Workers AI by the Neuron — which Cloudflare also prices per token — R2 by the gigabyte-month and again by the operation. Each meter runs on its own, with its own free allowance and reset, so no one number tells you where you stand.

The usage is all in Cloudflare's analytics as you use it. The work left is turning those four meters into one running cost, plus a forecast for next month, before the bill lands.

An antique almanac engraving: three different measuring instruments — a fast-spinning revolution counter, a token-counting wheel, and a graduated storage cistern — each turning at its own rate, their motions carried by fine engraved linkages into a single summing dial at the foot of the plate, picked out in copper, that reads them all as one running figure.
Four meters, each on its own unit — and one dial at the foot that reads them as a single running figure.

How does Cloudflare bill for Workers, Workers AI, and R2?

Cloudflare’s developer platform is usage-based, and each product is metered on the unit that fits it. Three of them carry most of a working developer’s bill, and they don’t share a yardstick.

Workers is billed by the request — each inbound request that actually runs your code, tallied across your whole account. Requests served straight from static assets, subrequests your Worker makes, and calls between your own Workers don’t add to it. (Workers also meters CPU time, the milliseconds your code actually spends running; that’s a second axis, and one CostCompass doesn’t yet track — more on that below.) The Paid plan includes the first 10 million requests each month before metering starts.

Workers AI is billed in Neurons, Cloudflare’s underlying compute unit — but Cloudflare also publishes an equivalent per-token price for each text model, input and output counted separately, and the rates are anything but flat. They sit far apart: a small Llama model and a large one can differ by an order of magnitude on the same token count. So the model a request lands on can move its cost more than its length does.

R2, the object store, meters on two axes of its own. Storage is billed per gigabyte-month: how much you keep, for how long. And operations are billed per request against the store, split into two classes. Class A covers the heavier calls — writes, copies, and list operations — priced higher; Class B covers the cheaper reads. Deletes are free. Egress, the bandwidth out, is the part R2 famously doesn’t charge for. Each axis carries its own monthly free allowance before the meter starts: on the Paid plan, the first 10 GB-month of storage, 1 million Class A operations, and 10 million Class B operations.

What you’re paying forHow Cloudflare meters it
Workers runtimePer request invocation (plus CPU time, a separate axis)
Workers AI inferenceInput and output tokens, priced per model
R2 storagePer gigabyte-month of data kept
R2 Class A operationsPer write/list call (the pricier class)
R2 Class B operationsPer read call (the cheaper class)

Cloudflare meters more than these — KV, D1, Durable Objects, Queues, Vectorize, and the rest each have their own unit and allowance — but Workers, Workers AI, and R2 are the three most likely to dominate a solo developer’s compute bill, and the three CostCompass reads today. (The current rates and free allowances live on Cloudflare’s own Workers, Workers AI, and R2 pricing pages — treat any figure you’ve memorized as provisional.)

Why is Cloudflare spend hard to keep ahead of?

The per-product metering is what makes the platform flexible, and it’s also what makes the spend resist a quick glance. Most of the difficulty is in the gap between using and being charged:

  • Usage isn’t money until you price it. Cloudflare’s usage view shows requests, Neurons, gigabyte-months, and operations — the raw meters. Turning those into a running cost means applying each product’s rate and netting its free allowance every time you want to know where you stand.
  • Free allowances hide the cliff. Each product runs free up to its own allowance — monthly for Workers and R2, daily for Workers AI — so spend reads as nothing right until you cross the line and every further request, token, or gigabyte-month is billed. The move from free to metered isn’t something the raw usage view announces.
  • A small change moves the bill quietly. Point a Workers AI call at a larger model, let a Worker fire more often, or change an R2 access pattern from reads to writes, and the cost moves even though your app looks the same. Because the rates within a product sit far apart, which model or which operation class you use can matter as much as how much.
  • It’s spread across four units. One bill, four yardsticks: requests, tokens, gigabyte-months, operations. Reading whether this month is heavy means converting all four into money in your head.
  • Cloudflare is rarely your only provider. Alongside it you’re likely calling Anthropic for Claude, building on OpenAI or Gemini, maybe routing through OpenRouter, and paying for inference hosts and serving — so Cloudflare is one slice of a bill you otherwise stitch together by hand from a stack of dashboards.
A horizontal bar chart of month-to-date Cloudflare spend broken down by product line — Workers AI leading, then Workers requests, then R2 storage and R2 Class A and Class B operations — each with its own cost and share of the total, marked estimated.
Month-to-date Cloudflare spend priced into money and grouped by product line, so you can see which one is driving the bill.

Is the Cloudflare cost exact or estimated?

Estimated — because CostCompass never sees your Cloudflare invoice. Unlike a provider whose API hands back the money directly, Cloudflare’s billing system doesn’t expose a per-day cost figure, so there’s no number to read off. Instead CostCompass reads your usage from the GraphQL Analytics API — requests, tokens, gigabyte-months, operations — and prices it with Cloudflare’s own published rates: Workers and R2 from a rate card that mirrors Cloudflare’s per-unit prices, with the monthly free allowances netted out as the month builds, and Workers AI from a per-model token-pricing snapshot.

So it’s a reconstruction rather than a copy of the bill. Because it applies the same rates Cloudflare charges on, it lands close to the invoice when your account matches the assumptions below. Those assumptions are exactly where it can drift:

  • The rates assume the Workers Paid plan. That’s the tier most metered usage lives on. On a Free-plan account, usage stays within the allowances and reads as nothing. That’s correct, but it means the estimate is calibrated to Paid pricing.
  • R2 storage is priced at one standard rate. CostCompass doesn’t model R2’s Infrequent Access tier, which trades a lower storage rate for higher operation and retrieval fees and a 30-day minimum. If you use it, your real R2 cost can move either way from the estimate.
  • Workers AI is priced for the models in the snapshot. A model CostCompass already knows is priced from its per-token rates; a model outside the snapshot still shows its token usage, but at no cost, until the snapshot is refreshed to include it.
  • Workers AI’s daily free tier isn’t netted out. Cloudflare gives each account 10,000 Neurons free every day; CostCompass prices Workers AI from the first Neuron, so on light inference days the estimate can read a little above what Cloudflare actually charges.

Cloudflare itself notes that its analytics datasets aren’t the same system that generates your invoice, so the figure is a close running estimate you can act on while the month is still open.

How can you reduce your Cloudflare bill?

Tracking shows you where the units go. A few levers slow the burn:

  • Match the model to the task. Workers AI rates span an order of magnitude, so routing routine, high-volume calls to a smaller model and saving the large one for work that needs it is often the biggest lever on inference cost.
  • Cut what triggers a Worker. Cache aggressively, debounce noisy triggers, and skip invoking a Worker where a static response or a cache hit would do. Every request that actually runs your Worker is billable; a static-asset response or a cache hit isn’t.
  • Watch the R2 operation classes. Class A writes and lists cost more than Class B reads, so batching uploads and trimming needless list calls keeps the pricier class down.
  • Prune what R2 keeps. Storage bills per gigabyte-month, so lifecycle rules that expire stale objects stop you paying month after month for data you no longer read. (Cloudflare’s Infrequent Access tier can lower the storage rate, but it adds retrieval and per-operation fees and a 30-day minimum, so it pays off only for data you rarely touch — and CostCompass prices it at the standard rate either way.)
  • Watch the per-product split. A ranked, by-product view catches a Worker that started leaning on a pricier model within days — while you can still act on it, not after the bill lands.

How do you forecast next month’s Cloudflare bill?

Forecasting metered usage doesn’t need anything exotic, just a burn rate: take your spend over the last several days, turn it into a daily average, and project it across a full month.

CostCompass does exactly this. It scales your trailing seven-day burn rate to the number of days in next month and adds any fixed subscriptions you’ve entered. The result is one forward number for what next month costs if the current pace holds. Seven days is the window: long enough that one heavy inference day doesn’t throw the average, short enough to pick up a recent change like a Worker that started calling a larger model. It’s the same engine that runs across every provider you’ve connected, so Cloudflare folds into one whole-stack projection rather than a number you read in isolation.

How does CostCompass track your Cloudflare costs?

CostCompass reads your usage from Cloudflare’s GraphQL Analytics API — a handful of aggregate queries that cover the whole period rather than walking it day by day — and prices each product into money: Workers and R2 from its built-in rate card with the free allowances netted out, Workers AI from a per-model token-pricing snapshot. The result is a running cost, grouped by product line, that you can read as the month builds. When you first connect it starts from that point forward, and each refresh brings the running total current.

The CostCompass dashboard showing month-to-date spend across providers with a forecast and burn rate.
Month-to-date spend across every connected provider, with a forecast and burn rate, rolled up for you in a single view.

Two things make that practical for a solo developer. First, your token is encrypted in your browser before anything is stored. The token you paste is sealed with your vault password on your own device, and only the sealed version is ever saved, a blob CostCompass can’t open because the vault password stays with you. When it’s time to read your usage, your browser unseals the token and passes it to a relay that uses it for that one call to Cloudflare and is built not to log or keep it. What we hold at rest is locked ciphertext; the token your account runs on never reaches us in usable form.

Second, Cloudflare doesn’t sit alone. The same dashboard rolls its running cost up with every other AI and compute provider you’ve connected, Claude, OpenAI, your hosting, into one figure with a forecast. How you get to that cross-provider number, by hand, through tooling, or straight from each API, is its own decision. The ways to track AI costs across providers lay the options out side by side.

Cloudflare’s billing dashboardCostCompass
TimingUsage you read after the factRunning cost, current when you Refresh
ForecastUsage trends onlyNext-month projection from your burn rate
UnitsEach product metered in its own unitAll priced into one running cost
ScopeCloudflare onlyCloudflare beside every other provider

Getting started takes three steps:

  1. In Cloudflare, copy your Account ID (it’s in the dashboard URL) and create an API token with Account Analytics: Read — that single read scope is all CostCompass needs.
  2. Paste both into CostCompass. The token is encrypted in your browser before it’s stored, so the server only ever holds ciphertext.
  3. Click Refresh. CostCompass reads your usage, prices it, and from there your running cost and forecast roll up — broken down by product, with Cloudflare folded into the whole-stack number.

Frequently asked questions

What does CostCompass need to connect Cloudflare?
Your Account ID and a Cloudflare API token. The Account ID is the tag in your dashboard URL. The token needs read access to Account Analytics so it can pull usage from Cloudflare's analytics — that single scope is all CostCompass reads. Both kinds of token work, the user tokens that start cfut_ and the account-owned ones that start cfat_. CostCompass checks the token reaches your account when you connect, so an invalid or wrong-account token shows up at setup rather than on your first refresh.
Does CostCompass store my Cloudflare API token?
Not in any form it can use. Before the token leaves your device, your browser seals it with your vault password, and the only thing that reaches our servers is that sealed blob. We have no way to open it, because the vault password never leaves your browser. When it's time to read your usage, the token is unsealed in your browser and handed to a relay that forwards the request to Cloudflare and is built not to log or keep it. What sits in our database at rest is locked ciphertext, useless without your vault password.
Which Cloudflare products does CostCompass track?
Today it tracks the three most likely to dominate a developer's Cloudflare bill — Workers (request invocations), Workers AI (input and output tokens, per model), and R2 (storage in gigabyte-months, plus Class A and Class B operations). R2 alone shows three of those lines, storage and the two operation classes, and Workers AI breaks down further by model. It does not yet track Workers CPU time, KV, D1, Durable Objects, Queues, Vectorize, Pages, or Stream. So treat the figure as your Workers-plus-Workers-AI-plus-R2 spend, not your entire Cloudflare invoice.
Is the Cloudflare cost exact or estimated?
Estimated. Cloudflare's billing system doesn't hand back a per-day money figure through its API the way some providers do. So CostCompass reads your usage from the GraphQL Analytics API and prices it — Workers and R2 from a built-in rate card with the monthly free allowances netted out, Workers AI from a per-model token-pricing snapshot. Two things to watch. The rates assume the Workers Paid plan, and a Workers AI model that isn't in the pricing snapshot will show its usage but no cost until the snapshot is updated. It tracks the real invoice closely, but it's a running estimate, not the settled bill.
Does Cloudflare bill Workers AI in tokens or Neurons?
In Neurons — that's Cloudflare's underlying compute unit, where a set number of Neurons maps to a given amount of work on each model. For its text models Cloudflare also publishes an equivalent per-token price, so you can read Workers AI cost in input and output tokens the way you would any other LLM. CostCompass reads your per-model input and output token counts from Cloudflare's analytics and prices them from each model's published per-token rate. What you see is money, split by model.
Can it forecast next month's Cloudflare bill?
Yes. CostCompass scales your trailing seven-day burn rate to the length of next month, then adds any fixed subscriptions you've entered. The result is one forward number for what next month costs if the current pace holds. It's the same forecasting engine that runs across every provider you've connected, so Cloudflare folds into the whole-stack projection alongside everything else.
Why use CostCompass instead of Cloudflare's billing dashboard?
Cloudflare's own usage view is per-product and Cloudflare-only — requests in one place, Neurons in another, gigabyte-months and operations elsewhere, each in its own unit. CostCompass prices all of it into one running cost, forecasts next month from your recent burn rate, and rolls Cloudflare up with Claude, OpenAI, your GPU rentals and the rest into a single view, current the moment you click Refresh. The point isn't to replace Cloudflare's numbers; it's to turn four units into one cost and set Cloudflare beside every other provider you pay.

About the author

Joubert Berger builds CostCompass, a spend-intelligence dashboard that pulls usage from AI and compute providers into one month-to-date total, a forecast, and a per-provider breakdown. This guide reflects how CostCompass reads each provider's own usage API — see the security model for how your keys are handled.

Stop reading Cloudflare spend in four different units

Connect Cloudflare once and turn its metered usage into a running cost, a next-month forecast, and a breakdown by product, rolled up with every other provider in one click.