Skip to main content
POST /v1/evaluate answers structured questions about a piece of application state. Instead of prose you have to parse, each answer comes back typed — a chosen option with a probability for every option, a score against a scale you define, or a single probability.
Use it for the decisions an application makes over and over: which queue a ticket belongs in, how urgent a message is, whether something needs a human. One request can ask several questions about the same state.
An ordinary API key calls this endpoint. If you have restricted a key to a specific set of scopes, that set has to include evaluate:write — a key with no scope restrictions already has it.

How it differs from structured output

Structured output makes a chat model return JSON in a shape you specify. It is the right tool when you want the model to produce content in a fixed format. Evaluate is for decisions. You give it the options, and it returns how likely each one is — a calibrated number you can threshold, route on, or log. You never write a prompt asking for JSON, and there is nothing to parse or repair.

Models

Question types

Every question declares a type, and that decides which criteria shape is legal.

Making a request

state is whatever your application looks like — a string, an object, or an array. Every question is answered against that same state.
You name the questions yourself, and those names come back as the keys of answers.

The response

noul is a probability, not a true/false. It is a number between 0 and 1, and 0.8 means “probably” — not “yes”. Compare it against a threshold you choose; treating it as a boolean makes every non-zero answer true.
A score legend is keyed by position in the array you sent. "1" means the second entry of criteria. Reordering that array therefore changes what a score means, silently and for every past comparison — treat the order as part of your schema.

Request rules

Anything the endpoint cannot make sense of is rejected with a 422 before the model is called, so you are never billed for a question that could not be answered. Two options is the floor because a single-option choice is not a decision — the model can only pick the one you gave it, and you would pay input tokens for an answer that was never in doubt. Blank criteria are refused for the same reason: a scale with no labels produces a number with no meaning. Fields this endpoint does not define are rejected rather than ignored, so a misspelled criteria fails loudly instead of quietly changing the question.

Attribution and limits

Two optional fields let you attribute the request in your own usage reports. Neither is ever forwarded to the model provider. Rate limits, spend caps, and credit balance apply exactly as they do on /v1/chat/completions. There is no streaming on this endpoint: an evaluation returns one small JSON body, so there is nothing to stream.

Errors