Classify text with typed questions and get each answer's confidence
Answer typed questions about a text with OpenAI's Decisions API, which picks
answers instead of writing them: faster and cheaper than ai_gateway for
classifying, routing, flagging or scoring, and every answer comes with how
sure the model is. Use ai_gateway when something has to be written.
The text to judge goes in user_prompt. The questions go in
structured_output_json_schema, one per field, with the field's description as
its question, and system_prompt holds framing shared by every question. A
field name cannot contain a dot. Put a description on every field: a field
without one is asked by its name.
Each field must be one of: boolean (yes/no); enum of strings or whole numbers (pick one, up to 255 options); array of an enum (yes/no per option); number with minimum 0 and maximum 1 (the probability itself); integer levels 0..N with a description per level in anyOf/const (a score, up to 10 levels); or an object of these. At most 200 questions per text, counting one per
option of an array field.
structured_output mirrors the schema, with each field replaced by
{"value": ..., "confidence": ..., "probabilities": ..., "score": ...}, so it
does not validate against the schema itself. confidence runs from 0 to 1; a
probability field has none, being a probability already. A score's value is
its continuous score rounded to the nearest level, which can land between two
likely levels on one the model gave no weight to: read probabilities for the
likeliest level.
Playground
Log inLog in to try this tool. The request uses your session.
POST
item
prefeed
List of agent pre-calls whose results are injected into the user prompt before the LLM runs.
user_promptrequired
The text to judge. Put the questions in structured_output_json_schema and system_prompt: a question written here is judged as text, not asked.
config
prefeed
List of agent pre-calls whose results are injected into the user prompt before the LLM runs.
system_prompt
Framing shared by every question: what the texts are and what they are judged for.
structured_output_json_schemarequired
A JSON Schema of "type": "object" whose properties are the questions: each property is one question, its description is the question asked, and its type is the kind of answer. Each field must be one of: boolean (yes/no); enum of strings or whole numbers (pick one, up to 255 options); array of an enum (yes/no per option); number with minimum 0 and maximum 1 (the probability itself); integer levels 0..N with a description per level in anyOf/const (a score, up to 10 levels); or an object of these. See the example for one field of each kind.
Credits
Fixed cost per call plus input tokens only -- no output tokens. Prefeed agents are billed on top, at their own rates.
These usage SKUs can be charged on a call.
SKU
Credits
Description
Tool call
1 per request
Charged once per successful item, on top of any usage below.
GPT-6 Luna (Decisions) (standard), input
100 per million tokens
Tokens the model reads from the prompt you send.
Schemas
item is what you send, config how the tool behaves,
and the response is what you get back.
Item
object
Properties
prefeedarray
List of agent pre-calls whose results are injected into the user prompt before the LLM runs.
Framing shared by every question: what the texts are and what they are judged for.
Default: ""
structured_output_json_schemaobjectrequired
A JSON Schema of "type": "object" whose properties are the questions: each property is one question, its description is the question asked, and its type is the kind of answer. Each field must be one of: boolean (yes/no); enum of strings or whole numbers (pick one, up to 255 options); array of an enum (yes/no per option); number with minimum 0 and maximum 1 (the probability itself); integer levels 0..N with a description per level in anyOf/const (a score, up to 10 levels); or an object of these. See the example for one field of each kind.
Example: {"properties": {"team": {"description": "Which team should handle this ticket?", "enum": ["billing", "logistics", "tech"]}, "angry": {"description": "Is the customer angry?", "type": "boolean"}, "topics": {"description": "Which topics does the ticket raise?", "items": {"enum": ["refund", "delay", "damage"]}, "type": "array"}, "refund_likelihood": {"description": "How likely is the customer to ask for a refund?", "maximum": 1, "minimum": 0, "type": "number"}, "severity": {"anyOf": [{"const": 0, "description": "cosmetic"}, {"const": 1, "description": "annoying"}, {"const": 2, "description": "blocking"}, {"const": 3, "description": "data loss"}], "description": "How severe is the issue?", "type": "integer"}}, "required": ["team", "angry", "topics", "refund_likelihood", "severity"], "type": "object"}
model_settingsOpenAIDecisionsSettings
The decision model and how it turns probabilities into answers