{"command":{"effect":"write","timeoutSeconds":120,"inputSchema":{"type":"object","description":"Use this endpoint to quickly answer classification or scoring questions about some input. You can ask multiple questions in one request.","properties":{"body":{"$ref":"#/definitions/DecisionRequest"}},"required":["body"],"additionalProperties":false,"definitions":{"DecisionRequest":{"type":"object","properties":{"model":{"type":"string","minLength":0,"maxLength":1048576,"description":"The model to use. Only `gpt-6-luna` is supported."},"input":{"$ref":"#/definitions/DecisionInput"},"questions":{"type":"array","items":{"$ref":"#/definitions/QuestionParam"},"minItems":1,"maxItems":400,"description":"Ask 1–400 questions about the input. Each question can be a predicate, choice, or score. Answers come back in the same order."},"safety_identifier":{"type":["string","null"],"minLength":0,"maxLength":128,"description":"Opaque caller-provided end-user identifier, scoped by the verified org. Match Responses' limit; this is never the authenticated user identity."},"prompt_cache_key":{"type":["string","null"],"minLength":0,"maxLength":64,"description":"Partition prompt cache reuse by caller-provided key."},"prompt_cache_options":{"type":["object","null"],"properties":{"ttl":{"type":"string","enum":["30m"],"default":"30m","description":"The minimum lifetime applied to every implicit and explicit cache breakpoint written by the request. Defaults to `30m`, which is currently the only supported value. The backend may retain cache entries for longer."},"mode":{"type":["string","null"],"enum":["implicit","explicit",null],"description":"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."}},"additionalProperties":false,"title":"Prompt cache options","description":"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](https://developers.openai.com/api/docs/guides/prompt-caching) for current details."}},"required":["model","input","questions"],"additionalProperties":false},"DecisionInput":{"oneOf":[{"type":"string","minLength":0,"maxLength":10485760},{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/DecisionInputMessage"},{"$ref":"#/definitions/DecisionInputFunctionCall"},{"$ref":"#/definitions/DecisionInputFunctionCallOutput"},{"$ref":"#/definitions/DecisionInputCustomToolCall"},{"$ref":"#/definitions/DecisionInputCustomToolCallOutput"}]},"minItems":0,"maxItems":131072}],"description":"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."},"QuestionParam":{"oneOf":[{"$ref":"#/definitions/QuestionParamPredicate"},{"$ref":"#/definitions/QuestionParamChoice"},{"$ref":"#/definitions/QuestionParamScore"}],"description":"A question about the request's input, with an optional correlation name."},"DecisionInputMessage":{"oneOf":[{"$ref":"#/definitions/DecisionInputUserMessage"},{"$ref":"#/definitions/DecisionInputDeveloperMessage"},{"$ref":"#/definitions/DecisionInputSystemMessage"},{"$ref":"#/definitions/DecisionInputAssistantMessage"}],"type":"object"},"DecisionInputFunctionCall":{"type":"object","properties":{"id":{"type":["string","null"],"minLength":0,"maxLength":1048576},"call_id":{"type":"string","minLength":1,"maxLength":64},"namespace":{"type":["string","null"],"minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":128,"pattern":"^[a-zA-Z0-9_.-]+$"},"arguments":{"type":"string","minLength":0,"maxLength":1048576},"status":{"anyOf":[{"$ref":"#/definitions/FunctionCallStatusParam"},{"type":"null"}]},"type":{"type":"string","enum":["function_call"],"default":"function_call"}},"required":["call_id","name","arguments","type"],"additionalProperties":false},"DecisionInputFunctionCallOutput":{"type":"object","properties":{"id":{"type":["string","null"],"minLength":0,"maxLength":1048576},"call_id":{"type":"string","minLength":1,"maxLength":64},"output":{"$ref":"#/definitions/DecisionInputToolOutputContent"},"status":{"anyOf":[{"$ref":"#/definitions/FunctionCallStatusParam"},{"type":"null"}]},"type":{"type":"string","enum":["function_call_output"],"default":"function_call_output"}},"required":["call_id","output","type"],"additionalProperties":false},"DecisionInputCustomToolCall":{"type":"object","properties":{"id":{"type":["string","null"],"minLength":0,"maxLength":1048576},"call_id":{"type":"string","minLength":1,"maxLength":64},"namespace":{"type":["string","null"],"minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"name":{"type":"string","minLength":1,"maxLength":64,"pattern":"^[a-zA-Z0-9_-]+$"},"input":{"type":"string","minLength":0,"maxLength":1048576},"status":{"anyOf":[{"$ref":"#/definitions/FunctionCallStatusParam"},{"type":"null"}]},"type":{"type":"string","enum":["custom_tool_call"],"default":"custom_tool_call"}},"required":["call_id","name","input","type"],"additionalProperties":false},"DecisionInputCustomToolCallOutput":{"type":"object","properties":{"id":{"type":["string","null"],"minLength":0,"maxLength":1048576},"call_id":{"type":"string","minLength":1,"maxLength":64},"output":{"$ref":"#/definitions/DecisionInputToolOutputContent"},"status":{"anyOf":[{"$ref":"#/definitions/FunctionCallStatusParam"},{"type":"null"}]},"type":{"type":"string","enum":["custom_tool_call_output"],"default":"custom_tool_call_output"}},"required":["call_id","output","type"],"additionalProperties":false},"QuestionParamPredicate":{"type":"object","properties":{"type":{"type":"string","enum":["predicate"],"default":"predicate","description":"The type of the object. Always `predicate`."},"name":{"type":"string","minLength":0,"maxLength":1048576},"instructions":{"oneOf":[{"type":"string","minLength":0,"maxLength":1048576},{"type":"array","items":{"$ref":"#/definitions/DecisionQuestionInputPart"},"minItems":1,"maxItems":16384}]}},"required":["type","instructions"],"additionalProperties":false,"description":"Estimate how likely it is that a statement about the input is true."},"QuestionParamChoice":{"type":"object","properties":{"type":{"type":"string","enum":["choice"],"default":"choice","description":"The type of the object. Always `choice`."},"name":{"type":"string","minLength":0,"maxLength":1048576},"instructions":{"oneOf":[{"type":"string","minLength":0,"maxLength":1048576},{"type":"array","items":{"$ref":"#/definitions/DecisionQuestionInputPart"},"minItems":1,"maxItems":16384}]},"choices":{"type":"array","items":{"$ref":"#/definitions/ChoiceOptionParam"},"minItems":2,"maxItems":255,"description":"Provide between 2 and 255 choices. Each choice must be unique."}},"required":["type","instructions","choices"],"additionalProperties":false,"description":"Choose from the supplied options based on the input."},"QuestionParamScore":{"type":"object","properties":{"type":{"type":"string","enum":["score"],"default":"score","description":"The type of the object. Always `score`."},"name":{"type":"string","minLength":0,"maxLength":1048576},"instructions":{"oneOf":[{"type":"string","minLength":0,"maxLength":1048576},{"type":"array","items":{"$ref":"#/definitions/DecisionQuestionInputPart"},"minItems":1,"maxItems":16384}]},"levels":{"type":"array","items":{"$ref":"#/definitions/ScoreLevelParam"},"minItems":2,"maxItems":10}},"required":["type","instructions","levels"],"additionalProperties":false,"description":"Rate the input against the supplied ordered levels."},"DecisionInputUserMessage":{"type":"object","properties":{"role":{"type":"string","enum":["user"],"default":"user"},"content":{"$ref":"#/definitions/DecisionInputContent"},"type":{"type":"string","enum":["message"],"default":"message"}},"required":["role","content"],"additionalProperties":false,"description":"A user message containing input text, images, or JSON."},"DecisionInputDeveloperMessage":{"type":"object","properties":{"role":{"type":"string","enum":["developer"],"default":"developer"},"content":{"$ref":"#/definitions/DecisionInputDeveloperContent"},"type":{"type":"string","enum":["message"],"default":"message"}},"required":["role","content"],"additionalProperties":false,"description":"A developer message containing input text."},"DecisionInputSystemMessage":{"type":"object","properties":{"role":{"type":"string","enum":["system"],"default":"system"},"content":{"$ref":"#/definitions/DecisionInputDeveloperContent"},"type":{"type":"string","enum":["message"],"default":"message"}},"required":["role","content"],"additionalProperties":false,"description":"A system message containing input text."},"DecisionInputAssistantMessage":{"type":"object","properties":{"role":{"type":"string","enum":["assistant"],"default":"assistant"},"content":{"$ref":"#/definitions/DecisionInputAssistantContent"},"phase":{"anyOf":[{"$ref":"#/definitions/MessagePhaseParam"},{"type":"null"}],"description":"The phase of an assistant message."},"type":{"type":"string","enum":["message"],"default":"message"}},"required":["role","content"],"additionalProperties":false,"description":"An assistant message containing output text or refusals."},"FunctionCallStatusParam":{"type":"string","enum":["in_progress","completed","incomplete"]},"DecisionInputToolOutputContent":{"oneOf":[{"type":"string","minLength":0,"maxLength":10485760},{"allOf":[{"$ref":"#/definitions/DecisionInputToolOutputContentParts"},{"title":"Parts"}]}],"description":"Text evidence or an ordered list of text and image parts."},"DecisionQuestionInputPart":{"oneOf":[{"$ref":"#/definitions/DecisionQuestionInputText"},{"$ref":"#/definitions/DecisionQuestionInputImage"},{"$ref":"#/definitions/DecisionInputJson"}],"description":"A text, image, or JSON content part in a question instruction."},"ChoiceOptionParam":{"type":"object","properties":{"value":{"$ref":"#/definitions/ChoiceValueParam"},"description":{"type":"string","minLength":0,"maxLength":1048576}},"required":["value"],"additionalProperties":false},"ScoreLevelParam":{"type":"object","properties":{"label":{"type":"string","minLength":0,"maxLength":1048576},"description":{"type":"string","minLength":0,"maxLength":1048576}},"required":["label"],"additionalProperties":false},"DecisionInputContent":{"oneOf":[{"type":"string","minLength":0,"maxLength":10485760},{"allOf":[{"$ref":"#/definitions/DecisionInputContentParts"},{"title":"Parts"}]}],"description":"A text string or an ordered list of text, image, and JSON parts."},"DecisionInputDeveloperContent":{"oneOf":[{"type":"string","minLength":0,"maxLength":10485760},{"allOf":[{"$ref":"#/definitions/DecisionInputDeveloperContentParts"},{"title":"Parts"}]}],"description":"A text string or an ordered list of input text parts."},"DecisionInputAssistantContent":{"oneOf":[{"type":"string","minLength":0,"maxLength":10485760},{"allOf":[{"$ref":"#/definitions/DecisionInputAssistantContentParts"},{"title":"Parts"}]}],"description":"A text string or an ordered list of output text and refusal parts."},"MessagePhaseParam":{"type":"string","enum":["commentary","final_answer"]},"DecisionInputToolOutputContentParts":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/DecisionInputText"},{"$ref":"#/definitions/DecisionInputImage"}]},"minItems":0,"maxItems":16384},"DecisionQuestionInputText":{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","minLength":0,"maxLength":10485760}},"required":["type","text"],"additionalProperties":false},"DecisionQuestionInputImage":{"type":"object","properties":{"image_url":{"type":"string","minLength":0,"maxLength":1073741824,"pattern":"^(data:|https?://)","description":"A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL."},"detail":{"anyOf":[{"$ref":"#/definitions/ImageDetailParam"},{"type":"null"}],"description":"The image detail level, using the selected model's image profile. Defaults to auto.","default":"auto"},"type":{"type":"string","enum":["input_image"],"default":"input_image"}},"required":["image_url","type"],"additionalProperties":false,"description":"An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported."},"DecisionInputJson":{"type":"object","properties":{"type":{"type":"string","enum":["input_json"],"default":"input_json"},"data":{"oneOf":[{"type":"object","additionalProperties":{"anyOf":[{},{"type":"null"}]},"propertyNames":{"type":"string","minLength":0},"minProperties":0},{"type":"array","items":{"type":"object","additionalProperties":{"anyOf":[{},{"type":"null"}]},"propertyNames":{"type":"string","minLength":0},"minProperties":0},"minItems":0}]}},"required":["type","data"],"additionalProperties":false,"description":"A JSON object or an array of objects rendered as text. Nested values may be any JSON value. Limited to 32 container levels, 10,000 values, and 256 KiB of compact UTF-8 JSON."},"ChoiceValueParam":{"oneOf":[{"type":"string","minLength":0,"maxLength":1048576},{"type":"boolean"}],"description":"Choice values are typed: a string and a boolean with the same text are distinct."},"DecisionInputContentParts":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/DecisionInputText"},{"$ref":"#/definitions/DecisionInputImage"},{"$ref":"#/definitions/DecisionInputJson"}]},"minItems":0,"maxItems":16384},"DecisionInputDeveloperContentParts":{"type":"array","items":{"$ref":"#/definitions/DecisionInputText"},"minItems":0,"maxItems":16384},"DecisionInputAssistantContentParts":{"type":"array","items":{"oneOf":[{"$ref":"#/definitions/DecisionInputOutputText"},{"$ref":"#/definitions/DecisionInputRefusal"}]},"minItems":0,"maxItems":16384},"DecisionInputText":{"type":"object","properties":{"type":{"type":"string","enum":["input_text"],"default":"input_text"},"text":{"type":"string","minLength":0,"maxLength":10485760},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit","description":"The breakpoint mode. Always `explicit`."}},"required":["mode"],"additionalProperties":false,"title":"Prompt cache breakpoint","description":"Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block."}},"required":["type","text"],"additionalProperties":false},"DecisionInputImage":{"type":"object","properties":{"image_url":{"type":"string","minLength":0,"maxLength":1073741824,"pattern":"^(data:|https?://)","description":"A base64-encoded image in a data URL or a publicly accessible HTTP(S) image URL."},"detail":{"anyOf":[{"$ref":"#/definitions/ImageDetailParam"},{"type":"null"}],"description":"The image detail level, using the selected model's image profile. Defaults to auto.","default":"auto"},"prompt_cache_breakpoint":{"type":["object","null"],"properties":{"mode":{"type":"string","enum":["explicit"],"default":"explicit","description":"The breakpoint mode. Always `explicit`."}},"required":["mode"],"additionalProperties":false,"title":"Prompt cache breakpoint","description":"Marks the exact end of a reusable prompt prefix. The breakpoint inherits its TTL from the request's `prompt_cache_options.ttl`; the boundary is not rounded to a token block."},"type":{"type":"string","enum":["input_image"],"default":"input_image"}},"required":["image_url","type"],"additionalProperties":false,"description":"An image provided as a base64 data URL or a publicly accessible HTTP(S) URL. File IDs are not supported."},"ImageDetailParam":{"type":"string","enum":["low","high","auto","original"]},"DecisionInputOutputText":{"type":"object","properties":{"type":{"type":"string","enum":["output_text"],"default":"output_text"},"text":{"type":"string","minLength":0,"maxLength":10485760}},"required":["type","text"],"additionalProperties":false},"DecisionInputRefusal":{"type":"object","properties":{"type":{"type":"string","enum":["refusal"],"default":"refusal"},"refusal":{"type":"string","minLength":0,"maxLength":10485760}},"required":["type","refusal"],"additionalProperties":false}}},"name":"Create a decision","id":"openai.createdecision","example":{"body":{"model":"example","input":"example","questions":[{"type":"predicate","instructions":"example"}]}},"maxRequests":1,"summary":false}}