Skip to content
System One

Clef

Clef is Cloudflare's own decision model, in two sizes: Clef at 27B and Clef-flash at 9B. Both run on Workers AI, take the same state and typed questions as Jev, read images as well as text, and have a 65,536-token context. The weights are open under Apache 2.0. Cloudflare launched them on 1 October 2026.

Updated

What Clef is

Clef is a System One model trained by Cloudflare. You send a state and a set of typed questions, and it returns a probability for every allowed option of every question, with no generated text. It comes in two sizes. Clef is 27B parameters and Clef-flash is 9B. Both run on Cloudflare Workers AI as @cf/cloudflare/clef and @cf/cloudflare/clef-flash.

Cloudflare calls the request format “fully Jev-API compatible”. It uses the same state and questions fields and the same Noul, Choice and Score question types as Jev, so the request body moves between the two with the model field changed.

What it adds to the Jev request

Two differences are Cloudflare’s own list. Clef reads images, where Jev reads text only. The docs add an optional images array of up to four images, which they call a Clef extension to the System One API. Its context window is 65,536 tokens, against 32,000 for Jev per Cloudflare’s post. The docs also say the state can be text, JSON, images or video.

How it was built

Cloudflare says each model keeps a frozen Qwen backbone, Qwen3.8-27B for Clef and Qwen3.5-9B for Clef-flash. A routing head and rank-256 adapters are trained on top. Inference runs one forward pass over the input, then scores every valid answer in parallel, so no text is generated token by token. Training used label-smoothed cross-entropy with a Brier loss for calibration, synthetic data, and a second stage Cloudflare calls Reinforcement Learning for Calibrated Decisions. It builds on Cloudflare’s earlier DiffusionGemma experiment, which drew on Matt Mastracci’s djev. See how Jev is built for the comparison.

What Cloudflare reports

Every figure here is vendor-run: Cloudflare ran the evals and published the tables. On 10 tasks it picked from the Decision Index, Clef scores higher than Jev on eight and lower on two: When2Call, 72.37 against 80.97, and BRIGHT, 45.91 against 47.52. Clef-flash scores 66.77 on CLINC150+OOS against Jev’s 89.27. On TypeSafe’s workflow evals Clef beats Jev on invoice processing (64.7 against 61.8), customer service (76.3 against 76.0) and security incidents (62.9 against 61.7), and trails it on agent trace observability (68.5 against 71.6). Cloudflare also says Clef is currently the leader when evaluated against the Jev Decision Index. We have not seen an outside run.

What it’s good at

Short typed calls where you want a probability to act on: routing a support request, picking a team, scoring severity, or sending a call to a human when confidence is low. Cloudflare’s example classifies a website’s category from a fetched page. Because it reads images, it can also classify a screenshot or photo.

What it’s not for

It writes no text. Clef-flash scores well below Clef on some tasks, such as CLINC150+OOS (66.77 against 97.43, Cloudflare’s numbers). The latency figures are Cloudflare’s own and do not say how they were measured.

Access today

Both models are live on Workers AI, billed per input token. The weights are on Hugging Face under Apache 2.0, and Cloudflare also announced a fine-tuning service, hands-on at first and self-serve later. Cloudflare says it does not read, store or train on requests or responses unless you opt into fine-tuning.

Specifications

Question typesChoiceScoreNoul
Max Choice optionsNot documented
Score levelsNot documented
Questions per call64
Total context65,536 tokens
State budgetNot documented
Rate limitNot published on the Workers AI model pages as of 2026-10-02.
EndpointPOST https://api.cloudflare.com/client/v4/accounts/{account_id}/ai/run/@cf/cloudflare/clef, or env.AI.run("@cf/cloudflare/clef", {...}) from a Worker
SDKs

Workers AI lists a 65,536-token context window for both models and says long text state is truncated to fit the token limit. A request takes 1 to 64 questions. The optional images array holds up to 4 PNG, JPEG or WebP images, each up to 4 MiB and 16 megapixels, 8 MiB in total, inside a 13 MiB request body. Remote image URLs are not accepted. The docs publish no cap on options per Choice or levels per Score.

Versions

  • @cf/cloudflare/clef, 1 Oct 2026, The 27B model, built on a frozen Qwen3.8-27B backbone. About 27.4B parameters per Hugging Face. Apache 2.0 weights as Cloudflare/clef. Release notes
  • @cf/cloudflare/clef-flash, 1 Oct 2026, The 9B model for latency-sensitive calls, built on a frozen Qwen3.5-9B backbone. About 9.4B parameters per Hugging Face. Apache 2.0 weights as Cloudflare/clef-flash. Release notes

Use cases

What people use Clef for, one page per pattern.

Workflow controlStarter

Support inbox triage with System One models

Send a support ticket to Jev once with every question attached. Category comes back as a selected label, severity and frustration as numbers on scales you wrote, refund intent as a probability. Your code reads those values and decides what happens to the ticket.

ChoiceScoreNoul
Workflow controlIntermediate

Intent and model routing with System One models

One Jev call reads an incoming request and returns its intent as a label plus a difficulty rating on a scale you wrote. Your router reads both numbers and picks the handler: deterministic code, a cheap model, an expensive one, or a human queue.

ChoiceScore
Workflow controlIntermediate

Confidence-gated actions with System One models

Jev returns a confidence value from 0 to 1 alongside every Choice and Score answer. Your code treats it as a separate axis: act automatically when it's high, confirm or flag when it's middling, hand the decision to a person when it's low. Riskier actions get higher bars.

ChoiceScore
Real-time and agentsIntermediate

Agent routing and skill selection with System One models

An agent choosing from a long skill roster reads one truncated line per entry and often loads the wrong thing. Jev ranks every entry in one request and separately answers whether any skill applies at all, so the agent gets a short hint instead of a guess.

ChoiceNoul

Examples built with Clef

The most-starred and most-viewed entries in the directory. Browse all examples.

Introducing Clef: our open-source decision models, and new RL fine-tuning platform

Cloudflare's launch post for Clef and Clef-flash, two decision models on Workers AI that accept the Jev request format and open weights under Apache 2.0. It covers the architecture, Cloudflare's own benchmark tables against Jev, Kev and Laya, and a new reinforcement learning service.