by Cloudflare

Cloudflare Clef pricing, limits and verdict

Cloudflare's open-weight family of decision models, sold in a 27B precision size and a 9B low-latency size on Workers AI.

Best for
Support ticket routing and urgency checks
Not for
Open-ended reasoning or writing
  • Available
  • Open source

Should you use Cloudflare Clef?

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.

Best for

  • Support ticket routing and urgency checks Typed choice, score and true/false answers with probabilities drive routing code directly.
  • Intent and domain classification Cloudflare reports 94.2 macro-F1 on BANKING77 and 97.4 on CLINC150+OOS for Clef.
  • Latency-critical gates in agent loops Clef-flash recorded a 38.8 ms median in Cloudflare's launch run.

Not for

  • Open-ended reasoning or writing The model emits scored answers, not text.
  • Hard science question answering Clef scores below Jev on science question sets such as GPQA Diamond.

Cloudflare Clef pricing

Input, per 1M tokens
$0.24/1M
Output, per 1M tokens
$0.00/1M
Pricing model
per-token
Free tier
No

What a real job costs

JobInputOutputTotal
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.

Self-hosting requirements

Self-hosted
Yes

What Cloudflare Clef can do

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.

What goes in and what comes out

Reads

  • text
  • image
  • video

Writes

  • text

Capabilities

  • Structured outputSupported
  • Video inputSupported
  • VisionSupported
  • Audio inputNot supported
  • Audio outputNot supported
  • Code executionNot supported
  • Function callingNot supported
  • Tool useNot supported
  • Web browsingNot supported
Reasoning modes
non-autoregressive scoring

Key features

  • 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.

Known limitations

  • Returns probability-scored answers only, so it cannot draft text or explain its reasoning.
  • Clef trails Jev on GPQA Diamond and MMLU-Pro in the vendor table, so it is weak at hard science and broad exam questions.
  • Hosted Clef-flash is listed at a 24K-token context, well under hosted Clef.
  • All headline benchmark numbers come from one vendor-run suite; independent replication is thin.

Who it is for

  • Teams replacing LLM prompts that classify or route requests
  • Agent builders who need a fast gate before an expensive model call
  • Teams already on Cloudflare Workers AI
  • Self-hosters who want Apache 2.0 weights

Cloudflare Clef benchmarks

Standout result

38.8 ms

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 2026

Where it sits

Cheaper 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.

MeasureThis modelRankMedian
Blended price (3:1)$ per 1M tokens$0.18/M#16 / 111peer median $1.75/M
GPQA Diamond% correct48%#63 / 64peer median 87.6%

Ranks are against GA models on Hokai that publish the same figure; ties share a rank.

Benchmark scores

  • MMLU vendor-reported · 16 Oct 202690.3%General-knowledge exam across 57 subjects, % correct.
  • MMLU-Pro vendor-reported · 16 Oct 202665.9%A harder version of the 57-subject knowledge exam, % correct.
  • GPQA Diamond vendor-reported · 16 Oct 202648%PhD-level science questions that are hard to search for, % correct.

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.

Strengths and limits

Strengths

  • Cloudflare's own run puts Clef-flash at a 38.8 ms median decision latency, the main reason to pick the 9B size.
  • Weights and hosted API both exist, so teams can start on Workers AI and move to self-hosting later.
  • Output tokens are not billed on Workers AI, which keeps the cost tied to input size alone.
  • Cloudflare reports 98.5 on BFCL (Clef) and 98.8 (Clef-flash) in its own Decision Index run, against 95.8 for Jev.
Show 3 more
  • Clef-flash showed a 38.8 ms median decision latency in Cloudflare's launch run, against 524.1 ms for Jev.
  • Reads images and video frames as well as text, with a 65,536-token context on hosted Clef.
  • Apache 2.0 weights on Hugging Face, so the same model can be self-hosted with vLLM or SGLang.

Limits

  • Scores are vendor-reported from one internal benchmark run.
  • It cannot reason in text, and its GPQA Diamond and BBH scores trail Jev in the same table.
  • Hosted Clef-flash context is limited to 24K tokens.

Cloudflare Clef alternatives

The nearest AI models on Hokai for the same job.

ModelLabContextIn / out per 1MReads and writes
Cloudflare Clef This pageCloudflare66K$0.24 / $0text, image, video → text
Kimi K2.8 PreviewMoonshot AI's Kimi Code model at the kimi-for-coding route since September 2026, with a 1M-token context window, image and video input and no published benchmark; Kimi K3.1 Pro is now Moonshot's top model.Moonshot AI1M--text, image, video → text, code
Claude Sonnet 5.5Anthropic's fastest Sonnet-class model, launched in September 2026, with a 1M context and output more than 30% faster than Sonnet 5.Anthropic1M$2 / $10text, image, pdf → text
ERNIE-5.5-Flash-PreviewBaidu's text-only mixture-of-experts model with open weights, a 1M-token context and a free OpenRouter route; still a preview checkpoint.Baidu1MFreetext → text

Cloudflare Clef specs

Context window
66K tokens
Latency (P50)
152 ms
Mixture of experts
No
Parameters
27B (Clef), 9B (Clef-flash)
Architecture
Qwen backbone with routing head and low-rank adapters (non-autoregressive decision scoring)

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).

Weight formats

  • safetensors (BF16)

API endpoints

NameEndpointAuth
Workers AI Clefhttps://developers.cloudflare.com/workers-ai/models/clef/Cloudflare API token
Hugging Face weightshttps://huggingface.co/Cloudflare/clefNone (Apache 2.0)

SDKs

  • TypeScript
  • Python

Prompting patterns

Show 2 prompting patterns
  • 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.

Known quirks

Show 3 known quirks
  • 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.

Cloudflare Clef facts

Deployment
Workers AI · Self-hosted
Trains on your data
No
Licence
Apache 2.0 · Open source
Safety posture
Balanced
Released
01 Oct 2026
Current version
clef (2026-10-09 serving build)
Family
Clef
Variant
Multimodal
Data retention
The launch post guarantees that Clef requests and responses on Workers AI are not read, stored or used for training, unless the customer opts into its fine-tuning service. No zero-retention SLA wording was found on the model page.

Data governance

Trains on inputs
No

Version history

  • 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.

What changed

  • Pricing change Clef-flash price cut, Clef faster, Clef-omni added (clef serving update) source
  • Release Clef and Clef-flash released on Workers AI source

Questions about Cloudflare Clef

What does Cloudflare Clef actually cost?

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.

Clef or Clef-flash: which should you pick?

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.

Is Clef open source?

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.

Does Cloudflare train on what you send to Clef?

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.

Who is Clef best for, and who should skip it?

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.

About Cloudflare Clef

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).

Read the full background

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.

Sources and guides

More AI Models on Hokai

  • Gemini Decision 1Google DeepMind's decision model scores many questions over one multimodal input and bills zero output tokens.
  • JevTypeSafe's first System One Model, launched in 2026: skips text generation for typed, calibrated decisions software can act on directly.
  • Inkling 2 MiniOpen-weights multimodal MoE from Thinking Machines Lab that reaches 79.2% on SWE-bench Verified, with a checkpoint small enough for a laptop.
  • Qwen3.8-MaxReplaced by Qwen4 Max as Alibaba's lead model on 16 November 2026, yet still sold on Model Studio: a large sparse MoE model with a 1M-token context and native image and video input.
  • Solar Mini 4.5Upstage's compact mixture-of-experts model for fast agent loops, in preview since November 2026, with 35B total and 3B active parameters.
  • gpt-oss-20bOpenAI's open-weight reasoning model for local use, with adjustable effort, full chain of thought and tool calling on a single consumer machine.