Clef
Clef is a 27B multimodal decision model from Cloudflare that turns a state and typed questions into per-option probabilities, hosted on Workers AI.
At a Glance
About Clef
Clef is a 27B multimodal decision model developed by Cloudflare and available on Workers AI as @cf/cloudflare/clef. Rather than generating free-form text, it reads a state and a schema of typed questions and returns a probability for every allowed option. The Cloudflare changelog dated October 1, 2026 describes it as the first model trained by the Cloudflare Workers AI team, with weights published on Hugging Face.
What It Is
Clef is a decision model in the same family as Typesafe's Jev, according to the changelog. It accepts a state as text, JSON, images, or video, plus up to 64 typed questions per request. The model page lists a 65,536-token context window and vision support. Output is structured, so an application can act on the result directly, for example by routing a ticket, blocking a request, or escalating to a human, without parsing free-form output.
How the Question Types Work
The changelog documents three question types:
- noul: a yes/no question that returns the probability of yes.
- choice: pick one option from a set you define, returning the chosen option, per-option probabilities, and a confidence value.
- score: rate against an ordered rubric, returning a probability-weighted score and a probability per level.
Images can be supplied with the state (up to four PNG, JPEG, or WebP files). Remote image URLs are not accepted.
Speed and Benchmarks
Cloudflare states that Clef is built for the hot path. In its 43 benchmark runs, the changelog reports median latency of 209.3 ms for Clef versus 524.1 ms for Jev, and says Clef is 2.5x faster at the median. Cloudflare also reports that across 10 decision benchmarks a Clef model scores highest on 7, and that Clef beats Jev in 3 of 4 areas on Typesafe's workflow evals. These are vendor-published results; the full figures are on the Hugging Face model card.
Use Cases and Compatibility
Cloudflare lists support triage, threat intelligence, trust and safety scoring, agent guardrails, and visual classification as example uses. Clef follows the System One API, so the changelog says an existing Jev integration can be switched by changing the endpoint and model. A smaller 9B sibling, clef-flash, targets latency-critical decisions.
Access and Setup Path
Clef is called through the Workers AI binding with env.AI.run() or the REST API at /ai/run, and AI Gateway can be used with these endpoints. Cloudflare says the weights are open-sourced under the Apache 2.0 license on Hugging Face, and that it is launching a reinforcement learning fine-tuning service with design partners.
Community Discussions
Be the first to start a conversation about Clef
Share your experience with Clef, ask questions, or help others learn from your insights.
Pricing
Clef
Cloudflare's 27B decision model on Workers AI, billed per input token. Open weights are also published under Apache 2.0 on Hugging Face.
- Input: $0.24 per M input tokens
- Context window: 65,536 tokens
- Vision: Yes
- Model ID: @cf/cloudflare/clef
- Up to 64 questions per request (noul, choice, score)
Capabilities
Key Features
- Typed decision questions: noul (yes/no), choice, and score
- Returns probabilities for every allowed option
- Up to 64 questions per request
- Multimodal input: text, JSON, images, or video
- Up to 4 embedded images per request
- 65,536-token context window
- System One API compatibility with Jev
- Available via Workers AI binding and REST API
- Open weights on Hugging Face under Apache 2.0
- Companion 9B clef-flash model for low-latency decisions
