Clef is Cloudflare’s family of open-weight decision models (launched October 1, 2026). Instead of generating text, it reads a state (text, JSON or images) and up to 64 typed questions (noul yes/no, choice, score) and returns a probability for every allowed answer in one pass. Clef (27B, from Qwen3.8-27B, 65,536-token context) costs $0.24 per million input tokens on Workers AI; Clef-flash (9B, 24,576-token hosted context) costs $0.038; Clef-omni adds audio and video at $0.15. Weights are Apache-2.0 on Hugging Face, and the API is System One / Jev compatible.
What is the Clef model?
Clef is Cloudflare’s family of open-weight “decision models”, launched on October 1, 2026. Instead of writing text, a Clef model reads a state (text, JSON or images) plus a set of typed questions and returns a probability for every allowed answer in a single forward pass, so your code gets a structured decision it can act on: route a ticket, block a request or escalate to a human. The weights are released under Apache-2.0 on Hugging Face, and the models are hosted on Workers AI as @cf/cloudflare/clef and @cf/cloudflare/clef-flash. The API follows System One and is compatible with Typesafe’s Jev, so an existing Jev integration can switch by changing the endpoint and model.
Clef, Clef-flash and Clef-omni compared
| Clef | Clef-flash | Clef-omni | |
|---|---|---|---|
| Size / backbone | 27B, post-trained from Qwen3.8-27B | 9B, from Qwen3.5-9B | Qwen3-Omni-30B-A3B-Instruct (mixture of experts) |
| Inputs | Text, JSON, images, video frames | Text, JSON, images, video frames | Text, images, audio (wav, mp3), video (mp4, webm) |
| Hosted context window | 65,536 tokens | 24,576 tokens (cut from 64K on Oct 9, 2026; the open weights support 256K self-hosted) | See the Clef-omni model page |
| Workers AI price (checked Oct 13, 2026) | $0.24 per million input tokens | $0.038 per million input tokens (was $0.09) | $0.15 per million input tokens |
| Best for | Highest-precision decisions | Latency-critical, hot-path decisions | Decisions over audio and video in one call |
Clef models don’t charge for output tokens. Images are converted to input tokens: each 32 × 32-pixel block is one token, with a cap of 1,024 tokens per image.
The three question types
| Type | Use it for | What comes back |
|---|---|---|
noul | A yes/no question (optional descriptions for true and false) | The probability that the answer is yes |
choice | Pick one option from a set you define (option_id: description) | The chosen option, a probability per option and a confidence value |
score | Rate against an ordered rubric (level 0 = lowest) | A probability-weighted score and a probability per level |
One request can ask 1 to 64 questions. Question ids may use letters, digits, _, . and - (up to 100 characters), and answers come back under the same ids. On Workers AI you can add up to 4 embedded PNG, JPEG or WebP images (4 MiB each, 8 MiB total decoded); remote image URLs are not accepted, and the whole request body is limited to 13 MiB.
How to use this Clef request builder
- Pick clef or clef-flash and start from a preset or a blank request.
- Paste your state. If it is valid JSON and the box is ticked, it is sent as structured data.
- Add your questions. The builder checks the documented limits (1–64 questions, valid unique ids, at least two options or rubric levels) and warns when the state is probably longer than the model’s context.
- Copy the curl, Workers or Python code and set
CLOUDFLARE_ACCOUNT_IDandCLOUDFLARE_AUTH_TOKENin your environment. Nothing you type here is sent anywhere — the builder runs in your browser and never calls the API.
Ways to run Clef
- Workers AI binding:
env.AI.run("@cf/cloudflare/clef", {...})inside a Worker. - REST API:
POST https://api.cloudflare.com/client/v4/accounts/<account_id>/ai/run/@cf/cloudflare/clefwith a bearer token. Both endpoints also work through AI Gateway. - Self-hosted: download
Cloudflare/cleforCloudflare/clef-flashfrom Hugging Face. The model card tested it with torch 2.11 and transformers 5.10.2 on a single H200, and SGLang serves it in BF16 on one H200, B200 or B300 at/v1/systemone.
Clef vs Jev: what Cloudflare reports
In Cloudflare’s launch benchmarks, a Clef model scored highest on 7 of 10 decision benchmarks. Examples: BANKING77 macro-F1 94.20 (Clef) vs 79.74 (Jev), and CLINC150+OOS 97.43 vs 89.27. Median latency was 209.3 ms for Clef and 38.8 ms for Clef-flash, against 524.1 ms for Jev. Jev still led on some tests, such as When2Call (80.97 vs 72.37 for Clef). After serving changes on October 9, 2026, Cloudflare reported Clef’s median latency at about 152 ms for an ~800-token input. These are the vendor’s own numbers, so test on your own data before you rely on them.
When a decision model is the right tool
Use Clef when you need a bounded answer fast and cheaply: support triage, spam and phishing checks, policy scoring, “should the agent take this action?” guardrails, or classifying a screenshot. It is not a chat model: it can’t write replies or explain its reasoning, so pair it with an LLM when the next step needs generated text. Cloudflare also offers fine-tuning for Clef, starting as a hands-on service with its forward-deployed engineers.
Clef at a glance (as of October 27, 2026)
| Clef | Clef-flash | Clef-omni | |
|---|---|---|---|
| Model id | @cf/cloudflare/clef |
@cf/cloudflare/clef-flash |
@cf/cloudflare/clef-omni |
| Size / backbone | 27B · Qwen3.8-27B | 9B · Qwen3.5-9B | Qwen3-Omni-30B-A3B-Instruct (MoE) |
| Hosted context | 65,536 tokens | 24,576 tokens | 64,000 tokens |
| Price (input tokens; no output charge) | $0.24 / M | $0.038 / M | $0.15 / M |
| Inputs | text, JSON, images, video frames | text, JSON, images, video frames | text, images, audio, video |
Question types
noul— yes/no; returns the probability of yes.choice— pick one option you define; returns the choice, per-option probabilities and confidence.score— ordered rubric (level 0 = lowest); returns a probability-weighted score and per-level probabilities.
Limits: 1–64 questions per request; ids use letters, digits, _, ., - (max 100 chars); up to 4 embedded PNG/JPEG/WebP images (4 MiB and 16 megapixels each, 8 MiB total decoded, no remote URLs; each image costs at most 1,024 input tokens); request body max 13 MiB. Clef-omni also takes up to 4 audio clips (8 MiB and 300 seconds each) and 2 videos (16 MiB and 60 seconds each, sampled at 2 frames per second). If media and questions don't fit the context window the request fails; otherwise a long text state is truncated to fit.
How to call it
- Workers binding:
env.AI.run("@cf/cloudflare/clef", {...}) - REST API:
POSTto/ai/run/@cf/cloudflare/clefunder/client/v4/accounts/<account_id> - AI Gateway
- Self-host the Hugging Face weights (SGLang
/v1/systemone, BF16 on one H200/B200/B300)
Related: Clairic (October 19, 2026)
Cloudflare has added Clairic (@cf/cloudflare/clairic, in preview at $0.10 per million input tokens), the first System One extraction model. Clef picks among options you define; Clairic instead returns typed values (text spans, numbers, dates, durations, lists, estimates and forecasts) read, computed or predicted from the input. Cloudflare says open weights are coming soon. See the Cloudflare changelog. This builder covers Clef and Clef-flash only.
Changelog
- October 27, 2026 (evening ~18:20 UTC+8): Workers AI clef / clef-flash / clef-omni prices and context windows unchanged ($0.24 / $0.038 / $0.15; 65,536 / 24,576 / 64,000; max 64 questions). No new Clef release on CF blog; Clairic still preview. No clef-request.js change.
Frequently asked questions
What is the Clef model?
Clef is Cloudflare’s open-weight decision model, launched October 1, 2026. It reads a state (text, JSON or images) plus typed questions and returns a probability for every allowed answer in a single pass, instead of generating text. It runs on Workers AI as @cf/cloudflare/clef.
Is Clef open source?
Yes. Cloudflare released the Clef and Clef-flash weights under the Apache-2.0 license on Hugging Face (Cloudflare/clef and Cloudflare/clef-flash). Clef is post-trained from Qwen3.8-27B; Clef-flash from Qwen3.5-9B.
How much does Clef cost on Workers AI?
As of October 27, 2026: Clef $0.24 per million input tokens, Clef-flash $0.038 per million (cut from $0.09 on October 9) and Clef-omni $0.15 per million. Clef models don’t charge for output tokens; images are billed as input tokens.
What is the difference between Clef and Clef-flash?
Clef (27B) is the higher-precision model with a 65,536-token hosted context. Clef-flash (9B) is faster and cheaper for hot-path decisions, but its hosted context is 24,576 tokens. Cloudflare reported median latency of 209.3 ms for Clef and 38.8 ms for Clef-flash at launch.
Is Clef compatible with Jev?
Yes. Clef follows the System One API used by Typesafe’s Jev, so you can switch an existing Jev integration by changing the endpoint and model. Clef also accepts images, which Jev does not.
Can I run Clef locally?
Yes. Download Cloudflare/clef from Hugging Face. The model card was tested with torch 2.11 and transformers 5.10.2 on a single H200, and SGLang can serve it in BF16 on one H200, B200 or B300 at /v1/systemone.
Does this Clef request builder call the API?
No. It only assembles and validates the request in your browser and gives you curl, Workers or Python code. You run that code with your own Cloudflare account ID and API token.