Skip to main content
Clef is a decision model. You give it a state and a set of typed questions, and it scores every allowed option of every question in a single pass. It returns probabilities, not prose. There is no text to parse and no output that can drift from the schema you sent. The distribution is the answer: you get every option with its probability, not just the winner, so you can threshold on confidence instead of guessing whether a generated label is trustworthy.

The endpoint

Decision models are not served on /v1/openai/chat/completions. Send them to /v1/decisions:
Two other paths accept the same body and return the same reply:

Quickstart

The reply mirrors the question keys you chose:

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:
Passing the record as JSON rather than as prose helps: the model sees the same field boundaries your code does, and questions about a specific field (“is 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 a data: URI or an object with content_type and base64. Remote URLs are not fetched; download the image and embed it.
Clef reads the images before the state, so a question can refer to both. The whole request body must stay under 13 MiB. This is how document review, screenshot triage and scanned-form classification work without a separate OCR step.

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:
The margin matters as much as the threshold. A 0.5/0.45 split never looks confident under a healthy margin, but it would pass a bare 0.4 threshold while being effectively a coin flip.

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 of probabilities is straightforward; building one on top of a generated explanation invites confabulation.

Clef on the model page

Try a request in the browser without writing code.

Clef-Flash

The smaller, faster variant of the same model.