Create a decision
Use this endpoint to quickly answer classification or scoring questions about some input. You can ask multiple questions in one request.
Body ParametersJSON
input: string or array of DecisionInputMessage or object { content, role, type } or object { content, role, type } or 2 moreThe input to evaluate for every question. Provide a text string or an ordered array of messages, function calls and outputs, or custom tool calls and outputs. Each tool output must identify a matching call by call ID.
The input to evaluate for every question. Provide a text string or an ordered array of messages, function calls and outputs, or custom tool calls and outputs. Each tool output must identify a matching call by call ID.
array of DecisionInputUserMessage { content, role, type } or DecisionInputDeveloperMessage { content, role, type } or DecisionInputSystemMessage { content, role, type } or 5 more
DecisionInputUserMessage object { content, role, type } A user message containing input text, images, or JSON.
A user message containing input text, images, or JSON.
A text string or an ordered list of text, image, and JSON parts.
A text string or an ordered list of text, image, and JSON parts.
DecisionInputImage object { image_url, type, detail, prompt_cache_breakpoint } An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
DecisionInputDeveloperMessage object { content, role, type } A developer message containing input text.
A developer message containing input text.
DecisionInputSystemMessage object { content, role, type } A system message containing input text.
A system message containing input text.
DecisionInputAssistantMessage object { content, role, phase, type } An assistant message containing output text or refusals.
An assistant message containing output text or refusals.
FunctionCallOutput object { call_id, output, type, 2 more }
output: string or array of DecisionInputText { text, type, prompt_cache_breakpoint } or DecisionInputImage { image_url, type, detail, prompt_cache_breakpoint } Text evidence or an ordered list of text and image parts.
Text evidence or an ordered list of text and image parts.
Parts = array of DecisionInputText { text, type, prompt_cache_breakpoint } or DecisionInputImage { image_url, type, detail, prompt_cache_breakpoint }
DecisionInputImage object { image_url, type, detail, prompt_cache_breakpoint } An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
CustomToolCallOutput object { call_id, output, type, 2 more }
output: string or array of DecisionInputText { text, type, prompt_cache_breakpoint } or DecisionInputImage { image_url, type, detail, prompt_cache_breakpoint } Text evidence or an ordered list of text and image parts.
Text evidence or an ordered list of text and image parts.
Parts = array of DecisionInputText { text, type, prompt_cache_breakpoint } or DecisionInputImage { image_url, type, detail, prompt_cache_breakpoint }
DecisionInputImage object { image_url, type, detail, prompt_cache_breakpoint } An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
questions: array of Predicate { instructions, type, name } or Choice { choices, instructions, type, name } or Score { instructions, levels, type, name } Ask 1–400 questions about the input. Each question can be a predicate, choice, or score. Answers come back in the same order.
Ask 1–400 questions about the input. Each question can be a predicate, choice, or score. Answers come back in the same order.
Predicate object { instructions, type, name } Estimate how likely it is that a statement about the input is true.
Estimate how likely it is that a statement about the input is true.
array of DecisionQuestionInputPart
DecisionQuestionInputImage object { image_url, type, detail } An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
Choice object { choices, instructions, type, name } Choose from the supplied options based on the input.
Choose from the supplied options based on the input.
choices: array of object { value, description } Provide between 2 and 255 choices. Each choice must be unique.
Provide between 2 and 255 choices. Each choice must be unique.
array of DecisionQuestionInputPart
DecisionQuestionInputImage object { image_url, type, detail } An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
Score object { instructions, levels, type, name } Rate the input against the supplied ordered levels.
Rate the input against the supplied ordered levels.
array of DecisionQuestionInputPart
DecisionQuestionInputImage object { image_url, type, detail } An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported.
Partition prompt cache reuse by caller-provided key.
prompt_cache_options: optional object { mode, ttl } or nullOptions for prompt caching. Supported for gpt-5.6 and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with prompt_cache_breakpoint. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set mode to explicit to disable the implicit breakpoint. The ttl defaults to 30m, which is currently the only supported value. See the prompt caching guide for current details.
Options for prompt caching. Supported for gpt-5.6 and later models. By default, OpenAI automatically chooses one implicit cache breakpoint. You can add explicit breakpoints to content blocks with prompt_cache_breakpoint. Each request can write up to four breakpoints. For cache matching, OpenAI considers up to the latest 80 breakpoints in the conversation, without a content-block lookback limit. Set mode to explicit to disable the implicit breakpoint. The ttl defaults to 30m, which is currently the only supported value. See the prompt caching guide for current details.
mode: optional "implicit" or "explicit" or nullControls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to implicit. With implicit, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With explicit, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.
Controls whether OpenAI automatically creates an implicit cache breakpoint. Defaults to implicit. With implicit, OpenAI creates one implicit breakpoint and writes up to the latest three explicit breakpoints in the request. With explicit, OpenAI does not create an implicit breakpoint and writes up to the latest four explicit breakpoints. If there are no explicit breakpoints, the request does not use prompt caching.
Returns
Decision object { answers, model, usage }
answers: array of Predicate { name, probability, type } or Choice { choice, confidence, name, 2 more } or Score { confidence, name, probabilities, 2 more } or Refusal { name, type } Answers in question order. Any question can return a refusal instead of an answer; other questions can still receive answers. A refusal has type: "refusal" and the question’s name, or null if it was unnamed.
Answers in question order. Any question can return a refusal instead of an answer; other questions can still receive answers. A refusal has type: "refusal" and the question’s name, or null if it was unnamed.
Choice object { choice, confidence, name, 2 more }
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
}
}