← Use cases

What is Clef?

Clef is Cloudflare's family of open-weight decision models, launched on Workers AI on 1 October 2026. There are two: Clef, a 27B model tuned for accuracy, and Clef-flash, a 9B model tuned for speed. Both do the same job — take application state plus a schema of typed questions and return a calibrated probability for each option in a single pass, no prose. They're Cloudflare's answer to Jev, the hosted model that opened the category. Here's what Clef is, how to run it, and where it sits next to Jev.

A decision model doesn't write text — it decides. You hand it some state (a ticket, a message, a row) plus a finite set of answers, and it returns which one, with a probability attached, in one forward pass. Clef is Cloudflare's open-weight take on that idea; Jev is TypeSafe AI's hosted, purpose-built one. Same call shape, different route to the answer.

your decide call state + questions Jev — available now OpenAI Luna — preview local / open — Laya
One decide call, several providers: open-weight models like Clef and hosted models like Jev answer the same typed question — state plus a finite answer space in, a calibrated decision out.

The two Clef models

Cloudflare describes Clef as its first in-house open-weight decision models. Rather than generating free-form text, each returns strictly typed output — a probability for every allowed option of every question you send — in a single forward pass. Both are multimodal (text, JSON, and up to four images per request) and both ship as open weights on Hugging Face under Apache-2.0, so you can self-host them or call them on Workers AI as @cf/cloudflare/clef and @cf/cloudflare/clef-flash. Per Cloudflare's post, they freeze a Qwen backbone and add a vision encoder.

ClefClef-flash
Size~27B~9B
BackboneQwen3.8-27B (frozen)Qwen3.5-9B (frozen)
Tuned forHighest accuracyLowest latency
MultimodalText + up to 4 imagesText + up to 4 images
Context (vendor)64k64k
Input price (vendor)$0.24 / M$0.09 / M
Workers AI id@cf/cloudflare/clef@cf/cloudflare/clef-flash
WeightsOpen · Apache-2.0Open · Apache-2.0

Question types are the familiar three: yes/no, multiple-choice, and rankings. Cloudflare also ships an RL fine-tuning service so you can post-train Clef on your own labelled decisions — the open-weight counterpart to Jev's pinned, hosted versions.

How you run Clef

Clef vs Jev, in one line

Clef is open-weight and self-managed (or edge-hosted on Workers); Jev is a hosted, RLCD-calibrated model with pinned versions and a free browser playground. The call shape is nearly identical, so the real choice is open-weight-and-self-managed vs hosted-and-calibrated. We break the head-to-head down on the Clef vs Jev page, and the Clef-flash page covers the smaller model specifically.

Try the hosted side in one call

The fastest way to feel the category is to make one real decision. Jev's browser playground does it with no signup, and a jv_live_ key points your own code at the hosted endpoint — the same state-plus-typed-questions shape Clef expects:

// A typed decision from the hosted model — the same shape an
// open-weight decision model like Clef expects.
const res = await fetch("https://jevtypesafeai.com/api/v1/decide", {
  method: "POST",
  headers: {
    "Content-Type": "application/json",
    Authorization: `Bearer ${process.env.JEV_KEY}`, // jv_live_...
  },
  body: JSON.stringify({
    state: { ticket: ticket.body },
    questions: {
      queue: { type: "choice", instructions: "Route this ticket.",
               criteria: { billing: "payments", bug: "something broken", sales: "pricing" } },
      urgent: { type: "noul", instructions: "Is it urgent?" },
    },
  }),
});
const { answers } = await res.json();
route(answers.queue.choice, answers.urgent.noul > 0.8); // calibrated, sub-cent

FAQ

What is Clef?

Clef is Cloudflare's family of open-weight decision models, launched on Workers AI on 1 October 2026. It comes in two sizes — Clef (~27B) for accuracy and Clef-flash (~9B) for speed. Each returns a calibrated probability for every option of a typed question in a single pass instead of generating text, so it's the open-weight counterpart to a hosted decision model like Jev.

What's the difference between Clef and Clef-flash?

Same job, different size. Clef is the larger ~27B model (frozen Qwen3.8-27B) tuned for the most accurate answers; Clef-flash is a ~9B model (frozen Qwen3.5-9B) tuned for answers in a few tens of milliseconds. Both are multimodal and both ship as open weights on Hugging Face.

Is Clef open source?

The weights are open under Apache-2.0 on Hugging Face, so you can self-host or fine-tune them, and Cloudflare also serves them on Workers AI as @cf/cloudflare/clef and @cf/cloudflare/clef-flash. That's the main contrast with Jev, whose weights are hosted-only.

How does Clef compare to Jev?

Both are decision models with nearly the same call shape — state plus typed questions in, calibrated probabilities out. Clef is open-weight and self-managed (or edge-hosted on Workers); Jev is hosted, RLCD-calibrated, with pinned versions and a free playground. See the Clef vs Jev page for the benchmark read and when to pick which.

How much does Clef cost?

On Workers AI, Cloudflare lists Clef-flash at $0.09 per million input tokens and Clef at $0.24, with output not billed. If you self-host the open weights instead, you carry your own inference and ops cost.

See also: Clef vs Jev · Clef-flash specifically · What is a decision model · Jev on Cloudflare Workers · Playground

Open weights, or hosted and calibrated

Clef gives you open weights; Jev gives you a hosted, calibrated decision in one call. Try Jev free in the browser, then grab a jv_live_ key.

▶ Try Jev freeGet an API key →
What is Clef? Cloudflare's open-weight decision models (2026) · Jev by TypeSafe AI