CostCompassAn AlmanacBeta
Cloudflare cost tracking

Turn Cloudflare requests, Neurons, 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 Workflows count steps — 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 BergerUpdated July 10, 2026

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.

Cloudflare doesn't hand you a single cost as you go. It meters you in several different units at once. A Worker bills by the request, Workers AI by the Neuron, R2 by the gigabyte-month and again by the operation, and Workflows by the step. 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 meters into one running cost, plus a forecast for next month, before the bill lands.

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

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 to another Worker over a service binding 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 carries a fixed monthly base charge and bundles in an allowance on each axis (the first 10 million requests, plus a block of CPU-time) before per-unit metering begins.

Workers AI is billed in Neurons, Cloudflare’s underlying compute unit — a single flat price per thousand Neurons, the same across every model. What differs is how many Neurons a model burns: a large model spends far more on the same request than a small one, often by an order of magnitude. So the model a request lands on can move its cost more than its length does. The first 10,000 Neurons each day are free, on every plan, and reset at midnight UTC.

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 R2’s Standard storage class, the first 10 GB-month of storage, 1 million Class A operations, and 10 million Class B operations. Those allowances belong to R2 Standard itself, not to any Workers plan tier, and the Infrequent Access class gets none.

What you’re paying forHow Cloudflare meters it
Workers runtimePer request invocation (plus CPU time, a separate axis)
Workers AI inferenceNeurons of compute, one flat rate across every 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)
Workers KV operationsPer read, write, delete, and list call
Workers KV storagePer gigabyte-month of data kept
Workflows stepsPer step executed by Workflow instances
Workflows storagePer gigabyte-month of persisted Workflow state

Workers KV reuses the same two yardsticks R2 does — operations and gigabyte-months — so it folds into the running cost without adding a fifth unit. Workflows adds two more meters: steps executed by Workflow instances, and stored Workflow state measured as GB-month. CostCompass reads step usage and the Workflows storage metric exposed by Cloudflare’s GraphQL schema, then prices both against the monthly Workflows allowances. Cloudflare meters still more — D1, Durable Objects, Queues, Vectorize, and the rest each have their own unit and allowance — but Workers, Workers AI, R2, KV, and Workflows are the surfaces CostCompass reads today. (The current rates and free allowances live on Cloudflare’s own Workers, Workers AI, R2, KV, and Workflows 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 up to the line. What happens at the line depends on your plan: on the Paid plan you spill into per-unit charges, while on the Free plan there’s no overage to spill into — Workers AI stops with an error at its daily cap, and Workers is held to its daily request limit rather than billing past it. Either way, the move off free 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 what a single call costs can sit far apart within a product — a heavy model burns far more Neurons, a Class A operation costs more than a Class B read — 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, Neurons, 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 Google, 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, Neurons, gigabyte-months, operations, Workflows steps, and Workflows storage — and prices it with Cloudflare’s own published rates: Workers, R2, KV, and Workflows 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 Cloudflare’s flat Neuron rate, with the daily free allowance subtracted each day before pricing.

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. Those are the per-unit rates the rate card mirrors. A Free-plan account behaves differently: Workers and Workers AI are held to their free allowances rather than billing past them; R2 Standard past its free tier is billed on any plan, Free included. So the estimate is calibrated to Paid pricing — closest when your account is on it.
  • 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.
  • The Neuron rate is a stored snapshot. Workers AI prices off Cloudflare’s flat per-Neuron rate, held as a dated rate that applies to every model — so a new model is priced the moment it appears, with no per-model gaps. If Cloudflare changes the rate, the estimate tracks it once the stored figure is refreshed.
  • KV storage is read account-wide. KV operations are summed exactly across your namespaces, but the stored-data figure is read as one account-wide number rather than added up namespace by namespace. For a single namespace — the usual case — that’s exact; if you spread data across several namespaces it can read low, so KV storage is marked as an approximate line until that aggregation is confirmed against a multi-namespace account.
  • Workflows storage is schema-derived. Cloudflare’s public Workflows pricing docs describe the GB-month storage charge, and live GraphQL schema introspection exposes a storageRate metric. That line is included, but marked approximate until Cloudflare documents the analytics field’s unit or it is checked against an invoice.

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. A large Workers AI model can burn an order of magnitude more Neurons than a small one on the same call, so routing routine, high-volume work to a smaller model and saving the large one for what needs it is often the biggest lever on inference cost.
  • Cut what triggers a Worker. A request only costs you when it actually runs your Worker, so the lever is keeping the Worker out of the path rather than caching inside it — a Worker still runs, and bills, even when it ends up returning a cached value. Serve what you can straight from static assets or a cached response on a route with no Worker, debounce noisy triggers, and reserve the Worker for requests that genuinely need code to run.
  • 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, R2, KV, and Workflows from its built-in rate card with the free allowances netted out, Workers AI from Cloudflare’s flat Neuron rate with the daily free allowance subtracted. 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?
For the OAuth path, just your Cloudflare login — CostCompass walks you through the Connect flow, then lists the Cloudflare accounts your login can reach so you choose which to track, one card per account, no token needed. For the API token path, your Account ID (the tag in the dashboard URL) and an API token scoped to Account Analytics (Read) — that single read scope is all CostCompass needs to pull usage from Cloudflare's analytics. 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?
Workers (request invocations), Workers AI (Neurons of compute, broken down by model), R2 (storage in gigabyte-months, plus Class A and Class B operations), Workers KV (reads, writes, deletes, and list operations, plus stored data), and Workflows steps plus storage. R2 shows three lines, KV breaks down into its four operation types plus storage, Workflows shows steps and stored state, and Workers AI breaks down further by model. It does not yet track Workers CPU time, D1, Durable Objects, Queues, Vectorize, Pages, or Stream — so the figure covers your Workers, Workers AI, R2, KV, and Workflows spend, not your entire Cloudflare invoice.
Does CostCompass track Workers CPU time?
Not yet. Workers meters two axes — the request count and CPU time, the milliseconds your code actually spends running — and CostCompass currently tracks requests, not CPU-ms. Cloudflare's analytics only exposes CPU time as percentiles, which can't be summed into an accurate billable total, so tracking it properly is a follow-up. Treat the Workers line as your request cost for now, with CPU time as a second axis it doesn't yet cover.
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, R2, KV, and Workflows from a built-in rate card with the monthly free allowances netted out, Workers AI from Cloudflare's Neuron rate with the daily free allowance subtracted. The main thing to watch is that the rates assume the Workers Paid plan. 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, the GPU work each request takes, and the unit your bill is actually computed from. The first 10,000 Neurons each day are free on every plan. CostCompass reads your Neuron usage per model from Cloudflare's analytics, subtracts that daily free allowance across the day's models, and prices what's left at Cloudflare's flat Neuron 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 thesecurity 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.