The endpoint
Decision models are not served on/v1/openai/chat/completions. Send them to /v1/decisions:
Quickstart
Question types
Every question is one of three shapes. The shape decides the reply.
Give
choice at least two options and score at least two levels. The score is the probability-weighted average of the level indices, so 1.67 on a three-level scale means the model leans strongly toward the last level.
State
state does not have to be a string. Pass any JSON object and Clef reads it as structured input:
total above the approval threshold”) become unambiguous.
Images
When the answer depends on something Clef has to look at rather than read, attach images. Up to 4 per request, each adata: URI or an object with content_type and base64. Remote URLs are not fetched; download the image and embed it.
Python
The request is plain JSON over HTTP, so anything that posts JSON works:Acting on confidence
The distribution is the point, so use it. The usual production pattern is to act automatically above a confidence threshold and route everything else to a human or a stronger model:One request, many questions
Every question is scored against the same state in a single call. Prefer one request with many questions over many requests with one question each: it is one round trip, and the answers come back together.Pricing
Clef bills on input tokens at $0.24 per 1M tokens. Output tokens are free.usage.input_tokens in the reply is what you are billed for.
What Clef is not for
Clef does not generate text. If you need prose — a summary, a reply draft, a rationale — use a chat model. A common and effective pairing is to let Clef make the decision and let a chat model explain it, rather than asking a chat model to do both and hoping the decision is well-formed. Clef also does not explain itself. It gives you the distribution, not a reason. Building an audit trail on top ofprobabilities is straightforward; building one on top of a generated explanation invites confabulation.
Related
Clef on the model page
Try a request in the browser without writing code.
Clef-Flash
The smaller, faster variant of the same model.