On November 18, Cloudflare published the weights for two extraction models, an updated 27-billion-parameter Clairic and a new 9-billion-parameter Clairic-flash, on Hugging Face under an Apache-2.0 licence. Both also run as hosted endpoints on Workers AI (Unite.AI).
If your team still retypes invoices, receipts or order PDFs into another system, pay attention. AI data extraction used to mean a per-page SaaS parser or a general LLM you coaxed into returning JSON. Now there's a purpose-built model you can call for cents or run on your own GPU, and that shifts the build-versus-buy math for a lot of back-office work.
TL;DR#
- Cloudflare's Clairic (27B) and Clairic-flash (9B) are open-weight extraction models: you hand them a document and a list of fields, and they return typed values with a confidence score per field.
- Hosted pricing is input-only ($0.10 per million tokens for flash, $0.24 for the larger model after December 1), and the weights are free to self-host.
- The model is the easy part. The value comes from the validation, routing and human review you build around it.
What Cloudflare actually released#
Clairic first appeared as a preview on Workers AI in October with a single model. The November release splits it into two sizes. The larger Clairic is built on Qwen3.8-27B and Clairic-flash on Qwen3.5-9B, and both repositories ship weights, typed-output components and Python helpers so you can run them with PyTorch and Transformers outside Cloudflare (Unite.AI).
The interface is the interesting bit. You send text plus optional images, along with a map of named fields, and the model answers every field in one parallel pass with no reasoning step and no free text (DEV Community). Each field comes back with a confidence score and a null probability (OpenRouter). The updated models also accept up to four images or PDF pages and return line items as grouped rows (StartupHub.ai).
One practical gotcha: during the preview, the 9B model lived at @cf/cloudflare/clairic. That endpoint now serves the 27B model, and the 9B moved to @cf/cloudflare/clairic-flash (DEV Community). If you built against the preview, your latency and bill are about to change.
Why a dedicated extraction model beats prompting for JSON#
Most teams doing structured data extraction today use a general chat model with a JSON schema. It works, but you pay for every output token, you get prose-shaped failure modes (invented fields, a total that's been "helpfully" recalculated), and you have no per-field signal telling you when to trust the answer.
Clairic is built around a different split. Cloudflare's framing is that extraction models turn raw input into values, decision models turn values into decisions, and LLMs turn decisions into words (Sanity glossary). In practice that means the extraction step is cheap, fast and boring, which is exactly what you want from it.
The numbers Cloudflare reports back that up. On its fresh-text test, Clairic answered at 358 ms median and 736 ms at p95, while Clairic-flash came in at 155 ms and 328 ms (Unite.AI). Workers AI also doesn't charge for output tokens on these models (Tbreak).
The honest caveat#
Every accuracy and latency figure here is Cloudflare's own internal evaluation, and no public extraction benchmark exists yet (Tbreak). Cloudflare itself says the preview handled receipts but missed complex tables (StartupHub.ai). Test on your own documents before you believe any of it.
AI data extraction options compared#
Here's how the realistic choices stack up for a business processing a few thousand documents a month.
| Option | How you pay | Data leaves your infra? | Ops effort | Best fit |
|---|---|---|---|---|
| Hosted Clairic-flash (Workers AI) | Per input token, no output charge | Yes, to Cloudflare | Low | High volume, standard documents |
| Self-hosted Clairic-flash | Your GPU and hosting | No | Medium to high | Regulated data, steady volume |
| General LLM with JSON mode | Input plus output tokens | Yes, to the provider | Low | Messy, one-off or reasoning-heavy docs |
| SaaS document parser | Per page or per document (varies) | Yes, to the vendor | Lowest | Teams that want a UI, not an API |
Sizing a self-hosted setup#
At two bytes per parameter, the weights take roughly 56 GB for Clairic and 19 GB for Clairic-flash, before memory for images and working tokens (Pasquale Pillitteri). For most small teams, flash is the only version worth self-hosting.
What this means for document-heavy businesses#
Think about where documents pile up in your operation: supplier invoices, purchase orders, packing slips, receipts for expense claims, carrier statements, onboarding forms. Invoice data extraction is the obvious first target, but the pattern is the same everywhere. Someone opens a PDF, reads six to twelve values and types them into an ERP, accounting tool or spreadsheet.
The cost of a model call is no longer what stops you automating that. A cheap, fast extractor removes the excuse, but it doesn't remove the real work, which sits on either side of the model:
- Before: getting documents into one place (email inboxes, upload forms, supplier portals) in a usable format.
- After: checking the values, matching them to records you already have, writing them to the right system and handling the ones that don't fit.
The per-field confidence score is what makes the "after" part buildable. Instead of trusting or distrusting a whole document, you can auto-post the fields the model is sure about and send only the doubtful ones to a person.
How to put structured data extraction into production#
Here's the flow we'd build for a first document type:
inbox / upload ─▶ normalise (PDF pages, images)
─▶ extract (typed fields + confidence)
─▶ validate (schema, totals, PO / order match)
─▶ confidence ≥ threshold ? write to ERP : review queue
─▶ log result + reviewer correction
And the checklist to get there:
- Pick one document type with real volume and a clear owner, such as supplier invoices.
- Write the field schema with types: supplier name, invoice number, dates, currency, line items, total.
- Build a test set from your own historical documents with known correct answers, including the ugly scans.
- Run both model sizes against it and measure accuracy per field, not per document.
- Set thresholds per field. A wrong total costs more than a wrong delivery note number.
- Add business validation: line items should sum to the total, the PO should exist, the supplier should be known.
- Build the review queue so a person sees the document, the extracted values and only the flagged fields.
- Pin the endpoint name in config, given the recent swap between
clairicandclairic-flash. - Log every correction and revisit thresholds monthly.
How MagicMakers Lab approaches this#
We treat extraction as one step inside a workflow, not the product. For Framico, the win came from connecting every step so 200+ orders ship a day with zero manual steps, and the same thinking applies when the input is a PDF instead of an API call. Our AI Integration & Automation work usually starts exactly here: one document type, a validation layer, a review queue, and writes into the CRM, ERP or billing system you already run.
Key takeaways#
- Cloudflare's Clairic and Clairic-flash give you open-weight, purpose-built extraction with per-field confidence, hosted or self-hosted.
- Input-only pricing and sub-second latency make high-volume document automation cheap to run.
- Cloudflare's benchmarks are its own, so validate against your real documents first.
- Confidence scores let you auto-post certain fields and send only doubtful ones to a human.
- If you used the preview, check which endpoint you're calling now.
FAQ#
What is AI data extraction?#
AI data extraction is using a machine learning model to pull specific values, such as invoice numbers, dates, totals and line items, out of documents, images or text and return them in a structured format. Modern extraction models return typed fields with confidence scores, so software can decide automatically which values to trust and which need a human check.
Is Cloudflare Clairic free to use?#
The weights for Clairic and Clairic-flash are free to download from Hugging Face under Apache-2.0, so you can run them on your own hardware. On Workers AI, Clairic-flash costs $0.10 per million input tokens and Clairic $0.24 after December 1, with no charge for output tokens. Self-hosting means paying for your own GPU instead.
Can AI extract data from invoices accurately?#
It can for most standard invoices, but accuracy depends on your documents. Clean digital PDFs are easy, while poor scans, handwritten notes and complex multi-page tables are harder. Measure accuracy per field on a test set of your own invoices, then add validation rules such as checking that line items add up to the total.
Should I self-host an extraction model or use an API?#
Use a hosted API if you want to move fast and your documents can leave your infrastructure. Self-host if you handle regulated or sensitive data, have steady volume, and can run a GPU server. With open weights you can start hosted and move in-house later without changing your field schema or downstream code.
If documents are still being retyped somewhere in your business, this is a good month to fix it. We'll look at your current workflow, pick the document type with the best payoff and tell you plainly whether a model like Clairic-flash fits. Book a free audit.
Sources#
- Cloudflare Releases Open-Weight Clairic Models for Data Extraction (Unite.AI)
- Cloudflare releases open-weight Clairic models for data extraction (Tbreak)
- Cloudflare Just Open-Weighted Its Document Extraction Models (DEV Community)
- Cloudflare previews Clairic, an extraction model on Workers AI (DEV Community)
- Cloudflare released open-weight Clairic extraction models (StartupHub.ai)
- Cloudflare: Clairic (OpenRouter)
- Clairic (Cloudflare model) definition (Sanity)
- Cloudflare releases open-weight Clairic, an AI that reads invoices (Pasquale Pillitteri)
- Cloudflare/clairic-flash model card (Hugging Face)