Decisions
Ask typed questions about your app state and get calibrated probabilities back.
The Decisions API runs decision models. You send some state and one or more typed questions about it. Instead of generated text, you get back typed answers with calibrated probabilities that your code can branch on directly.
POST /v1/decisionsDecision models are not chat models. They never return prose, reasoning, or explanations. Use them anywhere a predictable, typed answer matters more than generated text.
What you can do
- Routing - send a ticket to the right team with a
choicequestion. - Classification and moderation - flag content with
noul(yes/no) questions. - Rubric grading - place a response on an ordered scale with
score. - Image understanding - send images in
stateto models with image input, and locate objects in them withbox. - Audio and video - ask about recordings and clips with models that take audio or video input.
- Verification - check that an agent's output matches what was asked before acting on it.
Ask several questions in one request. They are answered in parallel against the same state and cannot see each other's answers.
Browse available models at Models.
Endpoints
| Method | Endpoint | Description |
|---|---|---|
| POST | /v1/decisions | Create a decision |
Every endpoint expects a bearer token in the Authorization header.
Create keys at Manage API Keys.
Pricing
Decision models bill input tokens only. The state and the questions both
count toward input tokens, including any images, audio, or video in them. Output tokens are
reported in usage but priced at zero.
Errors
All errors share one shape:
{ "error": { "message": "...", "type": "invalid_request_error" } }| Status | error.type | Meaning |
|---|---|---|
400 | validation_error | The body failed schema validation. The message names the offending field. |
400 | invalid_request_error | Unknown model, or a model that is not a decision model. |
401 | authentication_error | Missing or invalid API key. |
402 | invalid_request_error | Not enough credit for the request, an unpaid balance, or a spend limit was reached. |
403 | permission_denied_error | The account is suspended, an Admin key was used, or the model isn't included in your organization's tier. |
404 | not_found_error | The model is deprecated. The message names its replacement. |
408 | timeout_error | The model did not finish before the request timed out. |
429 | rate_limit_error | Your organization hit its rate limit for this model. Back off and retry. |
500 | internal_server_error | Unexpected server error. |
502 / 503 | upstream_error | The model is temporarily unavailable. Safe to retry. |
When the model itself rejects a request, the response keeps the model's
4xx status with type upstream_error or invalid_request_error, and
error.code names the cause when it is known (context_length_exceeded,
content_filter, request_too_large).