Skip to main content
Clef is Cloudflare’s open-weights evaluation model. Instead of generating text, it answers typed questions about the content you send: yes/no probabilities, a choice among options, or a score on a scale. Use it for classification, moderation, routing, and grading agent traces. Prime Inference serves both Clef models on Prime infrastructure as hosted models. Clef Flash is the smaller, lower-cost variant. The context window covers the whole request: the state, the questions, and any images. A state too long to fit is truncated rather than rejected. See the model catalog or the Models API for current pricing and availability.

Use Prime Inference

Clef models are not available through the Chat Completions API. Create a Prime API key with Inference permission in the API keys guide, then call the Evaluations API:
The response returns {"type": "boolean", "probability": ...} under answers.reward_hack. See the Evaluations API for choice and score questions, images, and the full request format. To charge a team instead of your personal account, add -H "X-Prime-Team-ID: your-team-id". Keep API keys server-side.