What it does
Clef is a multimodal decision model with 27B parameters, offered by Cloudflare on Workers AI under the name @cf/cloudflare/clef. Each request carries a state to evaluate, which can be text, structured data such as records or chat logs, or media, plus a map of questions. Instead of free text, the answer to each question is a probability attached to every option that question permits. Questions are one of three types, called noul, choice and score, and a request can hold 1 to 64 of them. The page's example asks whether a support request is urgent, which team should handle it, and how severe the customer impact is. The API also accepts up to four embedded PNG, JPEG or WebP images, and the context window is 65,536 tokens, with long text truncated to fit. You can call it from a Worker binding, the REST API or curl, and the model parameter takes either clef or clef-flash. Media inputs are converted to input tokens, with each 32x32-pixel block of an image counting as one token and a cap of 1,024 tokens per image.
Capabilities
- Returns a probability for every allowed option of every question
- Reads text, JSON, images or video as the state to judge
- Three question types: noul, choice and score
- Up to 64 questions per request and a 65,536-token context window
- Callable from a Worker binding, the REST API or curl
- No charge for output tokens
When to use it
- You want to triage or route items, such as deciding whether a support request is urgent and which team takes it
- You want severity or quality scored on a fixed scale with probabilities instead of free text
- You need to classify images together with text in one request