Skip to main content
A call to POST /v1/decide answers with a probability for every outcome of every decision. This is the answer to the quickstart’s request, rounded to three places:
An answer also has timing_ms and usage.tokenizer, and a call made with an API key has charge. These are left out above.

Each decision’s answer

decisions holds one answer for each decision you sent, keyed by its id. Each answer has these fields:
object
required
Every outcome you allowed, with its probability from 0 to 1. They add up to 1. A binary decision’s outcomes are yes and no.
string
required
The outcome with the highest probability.
number
required
The probability of top.
number
Ordinal decisions only. The average level, weighted by the probabilities, counted from 0.
object
Present when the decision had a policy. action is what to do, and expected_costs gives each action’s expected cost when you priced actions (act on the answer).
string
required
binary, single or ordinal, as you sent it.

The rest of the answer

string
required
What answered: the base model, family or model you called. After a fallback, the model that answered in its place.
string
When you called a family, the exact model that answered, such as support-router@3.
object
Present only when another model answered in place of the one you asked for. from is the model you asked for, to the model that answered, and reason why (models and fallback).
object
required
input_tokens is what you are billed for. decisions is how many decisions the request asked. tokenizer names the tokenizer that counted the tokens. A request with images adds images and image_tokens (images).
object
What the call cost. amount_usd is the charge, reserved_usd the credit held while it ran, and operation_id names the operation in your request history. Amounts are exact decimal strings (USD amounts).
object
required
Time the request spent in our servers’ stages, in milliseconds. load appears when the call waited for a fine-tuned model to load. It leaves out the network, and it is not a latency guarantee.
object
Present when any decision’s probabilities were sharpened or softened. It names those decisions and the temperature each was given (temperature).
string
required
The answer’s ID.

What a probability means

A decision’s probabilities share 1 between the outcomes you listed. They say how the model weighs those outcomes against each other, not whether the top one is correct.
  • A high probability can still be wrong. This happens most when the right answer is missing from your outcomes, or when the text is unlike anything the question expects.
  • The probabilities depend on your wording. Change a description and they can move.
  • The example pages show how well some decisions were calibrated, each with its dataset and model. Measure yours on cases whose answers you know before you set a threshold (compare models).

Temperature

Send temperature, from 0.2 to 5, to sharpen or soften every probability in a request. Below 1 the probabilities move towards 0 and 1. Above 1 they move towards each other. The top outcome never changes.
Send temperature: 1 for the model’s own probabilities.

Which model answered

Read model, version and fallback before you credit an answer to the model you asked for. A fallback answer comes from another model, which makes different mistakes. The same request to the same model gives the same probabilities, or very nearly. So when an answer changes, look at what changed in the request, and at the model, version and fallback that answered. For an evaluation, record the whole request, model and version, any fallback, your labels and your policy. Measure how often the top outcome is right, and also what your application did with it, such as wrong actions and how many cases went to review. To stop another model answering during a comparison, send fallback: "none".