PARAS MADAN
All writing

Latest in AI

Cloudflare Clairic vs Clairic-flash: Check Your Endpoint Before December 1

The existing Clairic ID now points to a larger model. Compare the two extraction endpoints by accuracy, billable passes and cost per accepted document.

If you built against the original Clairic preview, your Worker can keep sending the exact same request and get a different model. Cloudflare's November 18 update puts a new 27B model at the existing ID, moves the 9B size class to Clairic-flash, and releases weights for both. The bigger endpoint costs the same during the promotion, but that changes December 1.

Decide which endpoint to keep

Workers AI endpointNow servesInput price from December 1
@cf/cloudflare/clairicUpdated 27B Clairic$0.24 per million tokens
@cf/cloudflare/clairic-flash9B Clairic-flash$0.10 per million tokens

Both cost $0.10 per million input tokens until the promotion ends. Cloudflare does not bill output tokens separately for these endpoints. The typed request format is unchanged, but don't assume that means your output or cost will be identical. If the goal is to keep the old rate, test Flash explicitly rather than leaving the old ID in place.

The most useful experiment is to route the same sample through both versions. Start with the cheaper endpoint as your baseline and keep the larger one for cases where it removes enough manual work to make a difference.

Count passes, not just requests

The Clairic API model page describes a billing detail that's easy to miss: free output doesn't mean every input is billed once. Text fields can get separate passes over the same state and images. Other fields can share a pass. If the model needs several passes, it bills the repeated input each time and reports the number in usage.passes.

Take one scanned invoice. Asking for an invoice ID, a supplier name and a text reference can cost more than asking for one of those fields, even though both requests carry the same image. Don't estimate throughput from document count alone. Compare the observed token usage and pass count on your typical request. Pay particular attention to cases with several text fields or images that fill much of the context.

Check typed values, not a blob of generated text

Use the Flash API schema to separate text that should be present on the page from quantities and dates that need a different result type. Keep the shape identical for both model IDs. For an invoice, start with an identifier, a due date and a total before expanding to line items.

Include examples where the field is missing. An empty purchase order number is different from a guessed one. When a text result carries a span into the source state, check whether it points at the right occurrence, not just whether its string looks plausible. Use a human-review threshold calibrated on your own labeled documents; model confidence alone doesn't tell you how often a proposed total is wrong.

Test long documents differently

Cloudflare's launch post describes PDF extraction by page. The hosted model reference specifies up to four images per request and limits of 4 MiB each and 8 MiB combined. If your integration renders PDF pages into images, test one and four pages separately. Don't design around handing it an arbitrary-length PDF in a single call.

For documents with a broken layout or a table crossing a page boundary, record where a wrong answer entered the pipeline. Resizing a page, choosing the wrong group of pages and extracting a bad value are three different failures. A costlier model cannot recover a total from a page the application never sent.

Run the price comparison on accepted documents

Cloudflare's benchmark is useful as a starting point, not proof that either model will win on your invoices. Build a holdout with clean scans, difficult scans and missing fields. Measure exact match on the fields you actually act on, record review time, and include reruns in cost.

If both endpoints had 20 million billed input tokens, the December list rates imply $4.80 for Clairic versus $2.00 for Flash. That's just inference under identical token use; the cheaper endpoint wins only if it still yields the fields you need without too much human cleanup. The trial before December 1 should tell you which documents actually merit the larger model, not simply which model leads an aggregate score.

I'm Paras Madan. I write about AI tools and how engineering teams use them.

If you're releasing something technical and need a clear guide that helps developers make the right tradeoff, I can help with the writing.

Book a 30-minute call.