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
Theme

Create a decision

$ openai decisions create
POST
/decisions

Use this endpoint to quickly answer classification or scoring questions about some input. You can ask multiple questions in one request.

Parameters
--input: string or array of unknown

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.

--model: string

The model to use. Only gpt-6-luna is supported.

--question: array of object { instructions, type, name } or object { choices, instructions, type, name } or object { 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.

--prompt-cache-key: optional string

Partition prompt cache reuse by caller-provided key.

--prompt-cache-options: optional object { mode, ttl }

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.

--safety-identifier: optional string

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

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

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.

model: string

The model used.

usage: object { input_tokens, input_tokens_details, output_tokens, 2 more }

Token usage for the request.

Create a decision

openai decisions create \
  --api-key 'My API Key' \
  --input string \
  --model model \
  --question '{instructions: string, type: predicate}'
Response example
{
  "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
Response example
{
  "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
  }
}