Skip to content
For the complete documentation index, see llms.txt. Markdown versions of documentation pages are available by appending .md to the page URL.
Primary navigation

Create a decision

POST/decisions

Evaluate ordered classification and scoring questions against shared input. Answers are returned in question order.

Supply input as a string or user messages containing text and inline images. Only user messages with input_text and input_image parts are supported; non-user roles, function calls, files, audio, and item references are not supported. Images require a data URL, not an external URL or file ID. At most 128 images are allowed across the request.

Each question can return a refusal instead of a scored answer. A refusal has type refusal and the corresponding question name, or null if unnamed.

Body ParametersJSONExpand Collapse
input: string or array of DecisionInputMessage { content, role, type }

Shared evidence, as a string or an array of user messages containing text and inline images. Non-user roles, function calls, function-call outputs, files, audio, and item references are not supported. At most 128 image parts are allowed across all messages in one request.

One of the following:
string
array of DecisionInputMessage { content, role, type }
content: string or array of DecisionInputPart

Text evidence or an ordered list of text and inline image parts.

One of the following:
string
Parts = array of DecisionInputPart
One of the following:
DecisionInputText object { text, type }
text: string
minLength0
maxLength10485760
type: "input_text"
DecisionInputImage object { image_url, type, detail }

An inline image. External URLs and file IDs are not supported.

image_url: string

A base64-encoded image in a data URL.

minLength0
maxLength1073741824
type: "input_image"
detail: optional "low" or "high" or "auto" or "original" or null

The image detail level, using the selected model’s image profile. Defaults to auto.

One of the following:
"low"
"high"
"auto"
"original"
role: "user"
type: optional "message"
model: string
minLength0
maxLength1048576
questions: array of object { instructions, type, name } or object { choices, instructions, type, name } or object { instructions, levels, type, name }
One of the following:
Predicate object { instructions, type, name }
instructions: string
minLength0
maxLength1048576
type: "predicate"

The type of the object. Always predicate.

name: optional string
minLength0
maxLength1048576
Choice object { choices, instructions, type, name }
choices: array of object { value, description }
value: string or boolean

Choice values are typed: a string and a boolean with the same text are distinct.

One of the following:
string
boolean
description: optional string
minLength0
maxLength1048576
instructions: string
minLength0
maxLength1048576
type: "choice"

The type of the object. Always choice.

name: optional string
minLength0
maxLength1048576
Score object { instructions, levels, type, name }
instructions: string
minLength0
maxLength1048576
levels: array of object { label, description }
label: string
minLength0
maxLength1048576
description: optional string
minLength0
maxLength1048576
type: "score"

The type of the object. Always score.

name: optional string
minLength0
maxLength1048576
safety_identifier: optional string or null

Opaque caller-provided end-user identifier, scoped by the verified org. Match Responses’ limit; this is never the authenticated user identity.

minLength0
maxLength128
ReturnsExpand Collapse
Decision object { answers, model, usage }
answers: array of object { name, probability, type } or object { choice, confidence, name, 2 more } or object { confidence, name, probabilities, 2 more } or object { name, type }
One of the following:
Predicate object { name, probability, type }
name: string or null
minLength0
probability: number
type: "predicate"

The type of the object. Always predicate.

Choice object { choice, confidence, name, 2 more }
choice: string or boolean

Choice values are typed: a string and a boolean with the same text are distinct.

One of the following:
string
boolean
confidence: number
name: string or null
minLength0
probabilities: array of object { probability, value }
probability: number
value: string or boolean

Choice values are typed: a string and a boolean with the same text are distinct.

One of the following:
string
boolean
type: "choice"

The type of the object. Always choice.

Score object { confidence, name, probabilities, 2 more }
confidence: number
name: string or null
minLength0
probabilities: array of object { label, probability, value }
label: string
minLength0
probability: number
value: number
formatint64
score: number
type: "score"

The type of the object. Always score.

Refusal object { name, type }

The host may decline one question without disclosing its refusal score.

name: string or null
minLength0
type: "refusal"

The type of the object. Always refusal.

model: string
minLength0
usage: object { input_tokens, input_tokens_details, output_tokens, 2 more }
input_tokens: number
formatint64
minimum-2147483648
maximum2147483647
input_tokens_details: object { cache_write_tokens, cached_tokens }
cache_write_tokens: number
formatint64
minimum-2147483648
maximum2147483647
cached_tokens: number
formatint64
minimum-2147483648
maximum2147483647
output_tokens: number
formatint64
minimum-2147483648
maximum2147483647
output_tokens_details: object { reasoning_tokens }
reasoning_tokens: number
formatint64
minimum-2147483648
maximum2147483647
total_tokens: number
formatint64
minimum-2147483648
maximum2147483647

Create a decision

curl https://api.openai.com/v1/decisions \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer $OPENAI_API_KEY" \
  -d '{
    "model": "gpt-6-luna",
    "input": "The package arrived with a broken screen.",
    "questions": [
      {
        "type": "predicate",
        "name": "damaged",
        "instructions": "Does the customer report a damaged item?"
      }
    ]
  }'
{
  "model": "gpt-6-luna",
  "answers": [
    {"type": "predicate", "name": "damaged", "probability": 0.95}
  ],
  "usage": {
    "input_tokens": 42,
    "input_tokens_details": {"cached_tokens": 0, "cache_write_tokens": 0},
    "output_tokens": 0,
    "output_tokens_details": {"reasoning_tokens": 0},
    "total_tokens": 42
  }
}
Returns Examples
{
  "model": "gpt-6-luna",
  "answers": [
    {"type": "predicate", "name": "damaged", "probability": 0.95}
  ],
  "usage": {
    "input_tokens": 42,
    "input_tokens_details": {"cached_tokens": 0, "cache_write_tokens": 0},
    "output_tokens": 0,
    "output_tokens_details": {"reasoning_tokens": 0},
    "total_tokens": 42
  }
}