Skip to content
atom®technologiesBook a call
Production AI

What to measure before you approve a Workers AI cost-per-task estimate

Published Cloudflare token prices are a starting default, not a release gate. Before approving a model switch, require measured tokens per task, request rate against the applicable limit, and cf-aig-step fallback counts.

The decision and what settles it

A cost-per-task estimate built from Cloudflare's published token prices is a draft, not a release gate. Before you approve a Workers AI model switch, require three measured inputs: actual input and output tokens per task, requests per minute against the applicable limit, and the cf-aig-step distribution showing whether the primary model or a fallback served each request. The published prices are defaults; your team's measurements are the evidence.

The decision is whether to approve the release. The failure mode is approving a switch on vendor list prices, then finding in production that cached-token billing changes the effective input price, that a per-model rate cap makes requests fail outright, or that a fallback provider served a share of requests at a different price. The test that settles it is a short measurement pass over production-like traffic, owned by the engineer proposing the switch and checked by whoever approves the release.

What the published prices actually give you

Cloudflare's Workers AI pricing page states that Workers AI is priced at $0.011 per 1,000 Neurons, with a free allocation of 10,000 Neurons per day; usage above that on the Workers Paid plan is charged at the same rate, and all limits reset daily at 00:00 UTC. The page also warns that if you exceed any of the limits, further operations fail with an error, so the free tier is a hard stop rather than a soft throttle.

The same page lists per-model prices in both tokens and Neurons. For example, @cf/meta/llama-3.1-8b-instruct-fp8-fast is listed at $0.045 per million input tokens and $0.384 per million output tokens, which converts to 4,119 Neurons per million input tokens and 34,868 Neurons per million output tokens. At the larger end, @cf/meta/llama-3.3-70b-instruct-fp8-fast is listed at $0.293 per million input tokens and $2.253 per million output tokens. These are the numbers your team multiplies by token counts to get a cost-per-task figure, and they are the correct published inputs for that arithmetic.

Two details on the pricing page show why the billing path matters before you accept any per-task number. First, some models price cached input tokens separately: @cf/deepseek-ai/deepseek-v4-flash-0731 is listed at $0.440 per million input tokens but $0.014 per million cached input tokens. If your workflow repeats prompt prefixes, the effective input price is not the headline number. Second, the page states you can pay with prepaid AI Gateway credits by setting the gateway's Workers AI billing setting to Unified billing, and that requests to frontier models using prepaid credits receive higher rate limits. The billing path changes both price mechanics and limits, so the worksheet should record it explicitly.

Which published numbers are only defaults

Cloudflare's Workers AI limits page states that rate limits are default per task type, with some per-model limits, and that Text Generation is 300 requests per minute unless the model requires the Workers Paid plan. The page also notes that beta models may have lower limits while performance and scale work continues.

The more consequential default is on paid models. The limits page states that models requiring the Workers Paid plan are limited per account, per model, to 20 requests per minute under standard Workers AI billing, and 50 requests per minute when paid with prepaid AI Gateway credits under the Unified billing setting. The page says these limits are designed for typical agentic and coding workloads, where requests to frontier models can take longer to complete.

This is where a token-price estimate alone can mislead, though not through the price. A model that looks cheaper per token than your current one is not a safe switch if your traffic pattern pushes against a 20-request-per-minute per-model cap and requests start failing; the pricing page already told you what happens at the limit, which is that operations fail with an error. Rate-limit headroom is a feasibility and safety check, not a cost input. Your team's measured requests per minute, against the specific limit for the specific model and billing path, is the number that settles whether the switch is safe to approve.

Fallbacks change the cost attribution

Cloudflare's AI Gateway fallbacks documentation states that Cloudflare can trigger a fallback provider in response to request errors or predetermined request timeouts, and that you can add as many fallbacks as you need. The documentation also states that the response header cf-aig-step indicates which step successfully processed the request: 0 means the primary model was used, 1 means the request fell back to the second model, and each further fallback increments the step number.

Here is the inference, labeled as such: if a share of production requests fall back, the cost per task your team measured against the primary model's published price is not the cost you pay for those requests. The fallback path may be a different provider with a different price, and the estimate approved on the primary model's token rates silently stops describing reality. The cf-aig-step distribution over production-like traffic is the cheap test that catches this before the release, not after.

A proposed pre-approval worksheet

This worksheet is a proposed diligence step, not a validated benchmark, and the Cloudflare documentation describes Cloudflare's product, not your workload. Before approving the switch, require the proposing engineer to record: measured input and output tokens per task for the exact model, including any cached-input share; measured requests per minute against the applicable limit, which is the task-type limit for models that receive the default, or the 20 or 50 requests-per-minute figure for paid models, since the limits page states paid models are the only models that do not receive the default limit; the billing path itself, standard billing or prepaid credits with Unified billing; and the cf-aig-step counts from a production-like run, if any fallback is configured. The approver's job is to check that each row is a measurement, not an assumption carried over from the pricing page.

What would change the recommendation

If no fallback is configured, the cf-aig-step check is moot and the worksheet shrinks to tokens and request rate. If measured traffic sits far below the applicable limit, the rate-limit row is a confirmation rather than a blocker. If the billing path is prepaid AI Gateway credits with the gateway's Workers AI billing setting set to Unified billing, use the 50 requests-per-minute paid-model figure; the limits page states the elevated limit requires both the prepaid credits and the Unified billing setting, so confirm each condition rather than assuming it. And if cached input tokens are a significant share of your prompt volume, the cached-input price, not the headline input price, should drive the estimate. What should not change the recommendation is the token price alone: it is the starting default, and the release decision belongs to the measured numbers.