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.
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
}
}