Cloudflare Clef pricing: input tokens and API budgets
Cloudflare Clef costs $0.24 per million input tokens on Workers AI, with no output-token charge. At 1,000 billable input tokens per request, 100,000 decisions cost $24 in model usage. Images count toward that input bill.
This guide covers the hosted main Clef model. Prices are USD; examples are arithmetic scenarios, not paid inference tests.
What the published rate covers
| Hosted model | Input / 1M tokens | Output-token charge | Context window |
|---|---|---|---|
@cf/cloudflare/clef | $0.24 | $0 | 65,536 tokens |
The official Clef model page supplies both the unit price and the statement that Clef models do not charge for output tokens. Use the full model identifier when checking your deployment. Clef-flash and Clef-omni are separate variants; their rates and limits are outside this estimate.
Free output does not mean free requests. The state, questions and media that the model reads still consume input tokens. This calculator shows gross model usage at the published rate. Check your account terms separately for any allowances or credits, and budget other Cloudflare services on their own billing units.
Clef returns decisions, rather than chat replies
Cloudflare describes Clef as a 27B multimodal decision model. You provide a state and typed questions; it returns probabilities for the allowed options. A state can contain text, structured JSON or supported media. The result helps your application choose an action.
For example, a support workflow could ask whether a ticket is urgent, which team should receive it and how severe the problem is. The decision can route the ticket. It does not write the reply to the customer. If another model drafts that reply, add its usage to the workflow budget.
That is why a free-output decision endpoint and an input-plus-output chat endpoint need different calculations. Compare them against the job you need done: classifying a ticket and writing a response are separate tasks. A low token bill alone tells you nothing about how often the classification is right.
Calculate a request budget
Use requests × average billable input tokens × $0.24 ÷ 1,000,000. For one 1,000-token request, the charge is $0.00024. Multiplying by 100,000 requests gives $24. Use the complete input count, including your question definitions and media, rather than the state text alone.
Estimate Clef model usage
$24.00 for 100,000,000 total input tokens. Output-token charge: $0.
Include text, questions and media in billable input. Gross model usage only, before any account allowances, taxes or other Cloudflare services. This calculator does not call the model.
| Input tokens / request | Requests | Gross model usage |
|---|---|---|
| 1,000 | 100,000 | $24 |
| 1,000 | 1,000,000 | $240 |
| 10,000 | 100,000 | $240 |
| 1,259 | 100,000 | $30.216 |
The last row illustrates 1,000 text-and-question tokens plus a 259-token image. These examples assume every request uses the stated total and exclude additional attempts. Replace the average with measured usage from representative calls before using the estimate as a spending forecast.
How an image becomes billable input
Cloudflare's media billing explanation describes resizing while keeping the aspect ratio. Dimensions are rounded to multiples of 32 pixels. Very small images are scaled up to roughly 65,000 pixels, and images above roughly one megapixel are scaled down.
After resizing, each 32 × 32 patch counts as one token. Cloudflare adds three marker tokens and caps each image at 1,024 tokens. A 512 × 512 image that stays at those dimensions therefore uses 16 × 16 + 3 = 259 tokens. Its image-only charge is $0.00006216 at Clef's $0.24 rate.
At 100,000 requests with one such image each, images add $6.216. Add $24 for 1,000 text-and-question tokens per request, and the combined estimate is $30.216. The 1,024-token ceiling caps the image component at $0.00024576 per image; accompanying text and questions remain billable.
The current request schema allows up to four embedded PNG, JPEG or WebP images. It specifies 4 MiB and 16 megapixels per image, 8 MiB total decoded image data and a 13 MiB request-body limit. Remote image URLs are not accepted by that schema. Byte limits govern whether a request is accepted; they are not a price per megabyte.
Context limits can change what gets evaluated
Media and questions share the 65,536-token context window. Cloudflare says the request fails if those inputs exceed the window; otherwise, text state is truncated to the remaining space. A request that returns a result may therefore have evaluated less text than you intended. Keep important criteria and evidence within the supported input budget.
Check cost per useful decision
A community discussion about Clef raises questions about truncation, latency and classification quality. Those posts describe individual users' tests around launch. Check current behavior with your own inputs and the documented limits.
For your own evaluation, keep the full model version, billed input, accepted decisions, mistakes and downstream actions together. If 100,000 decisions cost $24 but 5% need a separate service at an assumed $0.01 each, that second stage adds $50. The combined example is $74. The escalation rate and downstream price here are assumptions, not measured Clef results.
The Perplexity Decider guide and Microsoft Decision-1 guide explain other decision endpoints. Check their current provider terms and task suitability separately. Clef's calculator above uses its own input-only billing; it does not substitute a chat model in the general LLM calculator.
AI API Prices editors checked Cloudflare's model documentation on October 12, 2026. Recheck that source before committing to volume, especially when changing model variants or adding media.