Clef takes 1 to 64 questions per request: check a brief in one call

Cloudflare's Clef page allows 1 to 64 typed questions on one state. Put the brief checks in one request, then submit to Sume once.

5 min readSume
All posts

Clef accepts 1 to 64 questions in a single request, so a whole checklist for a brief can cost one call. Cloudflare's model page lists the request fields as model, state, questions and an optional images, and the response fields as model, answers and usage. Run the checklist once, then make exactly one Sume submit when every answer passes.

What the page fixes

Clef is described as a 27B multimodal decision model that turns a state and a schema of typed questions into decisions, returning a probability for every allowed option of every question.

Clef request facts, Cloudflare Workers AI read 2026-10-13
ItemValue on the model page
Model id@cf/cloudflare/clef (also @cf/cloudflare/clef-flash)
Context window65,536 tokens
Questions per request1 to 64
Question typesnoul (yes/no), choice, score
Price$0.24 per million input tokens; output tokens not charged

A brief checklist as questions

Each check becomes a named question, and you read the answers by name. Keep the names stable so your thresholds do not move when you add a check.

{
  "model": "@cf/cloudflare/clef",
  "state": {"brief": "8 s vertical teaser, ceramic mug, slow push-in", "ratio": "9:16"},
  "questions": {
    "has_subject": {"type": "noul", "instructions": "Does the brief name one clear subject?"},
    "has_length": {"type": "noul", "instructions": "Does the brief state a length in seconds?"},
    "has_ratio": {"type": "noul", "instructions": "Does the brief state an aspect ratio?"}
  }
}

What the checklist cannot settle

Whether the length and ratio are valid for a particular model is a catalog question. Sume's Videos API rejects a duration, resolution or ratio the model does not list with a 400, so check GET /v1/videos/models in code and let Clef cover only the soft judgments. Cloudflare's blog reports a median latency of 209.3 ms for Clef and 38.8 ms for Clef-flash.

Thresholds and failure

Choose a probability cut-off per question from labelled examples, not from the first run. A missing ratio is a harder failure than a vague subject, so give it a stricter cut-off. If the call fails or times out, return review; never fall through to a render.

Keep the question names and wording in version control. Changing the wording changes the probabilities, so a new wording needs new examples.

  • One state, many questions.
  • Names are your API; keep them stable.
  • Fail to review, not to render.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume