by Cloudflare
Cloudflare's open-weight family of decision models, sold in a 27B precision size and a 9B low-latency size on Workers AI.
Cloudflare released Clef (27B) and Clef-flash (9B) on 1 October 2026 under Apache 2.0, with a 65,536-token context on hosted Clef. Teams that route tickets or gate agent steps with an LLM prompt can swap in the Jev-compatible API and get typed, scored answers.
| Job | Input | Output | Total |
|---|---|---|---|
| Summarise a 20-page PDF | $0.0072 | $0 | $0.0072 |
| Support reply | $0.0005 | $0 | $0.0005 |
| One coding agent run | $0.048 | $0 | $0.048 |
Budgets: 20-page PDF = 30k in / 1k out · Support reply = 2k in / 300 out · Coding agent run = 200k in / 20k out. Computed from the vendor's per-token prices at render time; cached-input discounts are not applied.
Workers AI bills Clef at $0.24 per 1M input tokens and Clef-flash at $0.038 per 1M input tokens; Output tokens are free. Image inputs count as input tokens. Self-hosting the open weights carries no per-token fee. The sibling Clef-omni is listed at $0.15 per 1M input tokens. Prices read from the Workers AI pricing page on 2026-10-16.
Cloudflare Clef is an open-weight decision model that returns a probability for every allowed answer instead of generating text. In Cloudflare's own run of the Decision Index, the 27B Clef scored 98.5 on BFCL and 94.2 on BANKING77, and it accepts images as well as text.
Reads
Writes
Typed decision outputs
Three question types (true/false, choice, score) return a probability for each allowed option in a single call.
Jev-compatible API
Cloudflare says Clef follows the Jev System One request and response format, so the swap is a model ID change.
Image and video input
Hosted Clef reads text, JSON and images within a 65,536-token window, and each image is capped at 1,024 tokens.
Open weights
Clef and Clef-flash ship under Apache 2.0 on Hugging Face, with vLLM and SGLang serving instructions on the model card.
RL fine-tuning service
Cloudflare offers hands-on fine-tuning through its forward-deployed engineers, with a self-serve platform planned.
Clef-flash median decision latency in Cloudflare's own launch run (Jev: 524.1 ms)
Source: Cloudflare launch post and Hugging Face card, 1 Oct 2026Cheaper than 86% of the 111 GA models with a published price, in the bottom third on GPQA Diamond (rank 63 of 64), and one of 93 whose vendor states it does not train on customer data.
| Measure | This model | Rank | Median |
|---|---|---|---|
| Blended price (3:1)$ per 1M tokens | $0.18/M | #16 / 111 | peer median $1.75/M |
| GPQA Diamond% correct | 48% | #63 / 64 | peer median 87.6% |
Ranks are against GA models on Hokai that publish the same figure; ties share a rank.
A benchmark is an exam, not the job. Scores transfer unevenly between tasks, so weigh the one closest to your workload and read every figure with its source.
The nearest AI models on Hokai for the same job.
| Model | Lab | Context | In / out per 1M | Reads and writes |
|---|---|---|---|---|
| Cloudflare | 66K | $0.24 / $0 | text, image, video → text | |
| Moonshot AI | 1M | -- | text, image, video → text, code | |
| Anthropic | 1M | $2 / $10 | text, image, pdf → text | |
| Baidu | 1M | Free | text → text |
Training data
Post-trained on Cloudflare's internal synthetic datasets that permute field orders, prompts and schema structures, with label-smoothed cross-entropy, a Brier loss and an RL stage (RLCD). Backbones are Qwen3.8-27B (Clef) and Qwen3.5-9B (Clef-flash).
| Name | Endpoint | Auth |
|---|---|---|
| Workers AI Clef | https://developers.cloudflare.com/workers-ai/models/clef/ | Cloudflare API token |
| Hugging Face weights | https://huggingface.co/Cloudflare/clef | None (Apache 2.0) |
One typed question per decision
{"urgent":{"type":"noul","instructions":"Is this support request urgent?"}}Each question returns its own probability, so thresholds can differ per question.
Describe choices in criteria
"criteria":{"billing":"Payments, invoices, and refunds"}The model scores against the criteria text, so clear descriptions move accuracy.
No generated text, only scores
Clef never writes an answer; it returns a probability for every allowed option of each question.
Workaround: Pair it with an LLM on Workers AI for any step that needs prose, and let Clef decide whether to call it.
Media tokens crowd out the text state
Each image costs up to 1,024 tokens and shares the context window with the questions; overflow truncates the text state.
Workaround: Resize or limit images before the call and keep the state short when sending several images.
Hosted Clef-flash has a shorter context
Hosted Clef-flash is listed at 24K tokens while hosted Clef and Clef-omni are listed at 64K.
Workaround: Route long inputs to Clef and keep Clef-flash for short, latency-bound decisions.
clef serving update · 09 Oct 2026
Hosted Clef up to 2x faster with unchanged weights; Clef-flash price cut; Clef-omni added.
clef and clef-flash · 01 Oct 2026
Initial release on Workers AI with Apache 2.0 weights on Hugging Face.
On Workers AI, Clef costs $0.24 per 1M input tokens and Clef-flash costs $0.038 per 1M input tokens, and output tokens are not billed on either. Clef-omni is listed at $0.15 and Jev at $0.042, so Clef-flash undercuts Jev on input price.
Pick Clef-flash when a gate sits in a hot path: Cloudflare measured a 38.8 ms median for it against 209.3 ms for Clef at launch. Pick Clef for harder or longer inputs, since it has the 65,536-token hosted context and higher scores on BANKING77, CLINC150+OOS and BPoMP in Cloudflare's table. Clef-flash leads on BFCL, API-Bank and the home appliance simulator in the same table.
Yes. Cloudflare publishes the Clef and Clef-flash weights on Hugging Face under the Apache 2.0 license, following the license of the Qwen base models. You can self-host with vLLM or SGLang, or call the hosted versions on Workers AI. Commercial use is allowed under Apache 2.0.
The Cloudflare launch post guarantees your prompts and outputs on hosted Clef are not read, stored or used for training. The exception is its fine-tuning service, where you choose to supply data. Self-hosting the open weights keeps the data in your own environment.
It suits teams that classify, route or gate with an LLM prompt today and want typed probabilities in milliseconds. Skip it for open-ended reasoning: the vendor benchmark table has Clef well behind Jev on GPQA Diamond and BBH. For a text task, use a general LLM and keep Clef as the router in front of it.
Clef is a family of open-weight decision models trained by Cloudflare and released on 1 October 2026. This record covers the two launch sizes: Clef, a 27B-parameter model post-trained on a frozen Qwen3.8-27B backbone (see Qwen3.8-27B), and Clef-flash, a 9B model on a frozen Qwen3.5-9B backbone. Qwen is built by Alibaba Cloud, and the weights are hosted on Hugging Face. A decision model does not write prose. You send a state (text, JSON, images or video) and a schema of typed questions, and it returns a probability for every allowed answer, which your code can use to route a ticket, trigger an escalation or hand off to a person. Cloudflare says Clef is fully compatible with the API of Jev, the System One model from TypeSafe AI, so an existing Jev integration can be pointed at Clef by changing the model ID (see Jev).
How it works, in Cloudflare's description (the team had first tried adapting DiffusionGemma for the same job): Clef runs one prefill pass on the Qwen backbone and then scores the valid schema choices in parallel. The decision step is non-autoregressive, so no intermediate text is generated token by token. Cloudflare trained a routing head together with rank-256 low-rank adapters, using label-smoothed cross-entropy plus a Brier loss for probability calibration, and a reinforcement learning stage it calls RLCD (Reinforcement Learning for Calibrated Decisions). There are three question types: noul (true or false), choice (named options) and score (ordered options).
The benchmark figures below come from internal Decision Index 0.2.1 runs published by the vendor and are vendor-reported. In that run Clef scored 98.5 on BFCL (case exact accuracy), 94.2 macro-F1 on BANKING77 and 97.4 macro-F1 on CLINC150+OOS. Clef-flash scored 98.8 on BFCL, 93.1 on API-Bank and 97.7 on a home appliance simulator. The same table shows where Jev wins: it scored 78.3 on GPQA Diamond against 48.0 for Clef and 51.0 for Clef-flash, and 82.7 on MMLU-Pro against 65.9 and 65.3. On four Typesafe workflow evals Clef scored 64.7 on invoice processing exact actions and 62.9 on security incidents, ahead of Jev on both, while Jev scored 71.6 against 68.5 for Clef on agent trace observability.
Speed is the other headline. In the launch run, median latency was 209.3 ms for Clef, 38.8 ms for Clef-flash and 524.1 ms for Jev. On 9 October 2026 Cloudflare said a new serving stack made hosted Clef up to 2x faster with unchanged weights: median 152 ms at about 800 input tokens, 305 ms at about 3,400 tokens and 1,635 ms at about 16,000 tokens. Cloudflare's internal Threat Intelligence group used Clef with Browser Run to classify website domains in 2.2 seconds, against 4.7 seconds for gpt-oss-120b in the same workflow, according to the launch post.
Access and limits: both models run on Workers AI as @cf/cloudflare/clef and @cf/cloudflare/clef-flash, and the weights are on Hugging Face under Apache 2.0. Hosted Clef has a 65,536-token context window and reads text, JSON and images, and the Hugging Face card also lists video frames. Hosted Clef-flash is listed at 24K tokens after the 9 October update. Images are tokenized in 32x32-pixel patches, capped at 1,024 tokens per image, and media tokens share the context window with the questions; if they overflow, the text state is truncated. A third family member, Clef-omni (30B mixture-of-experts, 3B active), adds audio and video input and is listed on Workers AI at $0.15 per million input tokens.
Who it suits: teams that currently call a general LLM to classify, route or gate, and want a typed answer with a probability in tens of milliseconds. Who should look elsewhere: anyone who needs open-ended reasoning or generated text. The model returns only scored answers, and the vendor table has weaker GPQA Diamond and BBH scores than Jev, so a decision model is a routing component, not a replacement for a reasoning model. Cloudflare also offers an RL fine-tuning service, starting with its forward-deployed engineers and planned to become self-serve, and promises that hosted requests stay unread, unstored and out of training data unless a customer opts into fine-tuning.
Specifications on this page (context window, token prices, benchmark scores, licence) are read from Cloudflare's own model card and documentation. The verdict is Hokai's reading of them, not the provider's claim.