Create a decision
Ask yes/no, multiple-choice and rating questions about a text or image and get probabilities back instead of generated text. Compatible with the OpenAI Decisions API.
POST /v2/decisions evaluates an input (text, images, or both) against one or more questions and answers each one with a number: a probability, a selected option, or a score. Use it to classify content, route requests or rank work, where a free-text answer would have to be parsed first.
The endpoint is compatible with the OpenAI Decisions API, so the OpenAI SDKs work unchanged once you point them at the base URL (client.decisions.create(...), openai-python 3.26+ or openai-node 7.30+).
Request
| Field | Required | Description |
|---|---|---|
model | yes | A decision model. Today that is gpt-6-luna-decisions. |
input | yes | The evidence every question evaluates: a string, or an array of messages. A user message's content can mix input_text, input_image (a base64 data URL or a public HTTPS URL) and input_json parts. |
questions | yes | 1 to 400 questions, each of type predicate, choice or score. Answers come back in the same order. |
prompt_cache_key | no | A stable id for requests that share a prefix. Namespaced to your workspace. |
safety_identifier | no | An opaque id of your end user (max. 128 characters). Never put personal data in it. |
The three question types:
| Type | Use it to | Fields | Answer |
|---|---|---|---|
predicate | check whether a statement is true | instructions | probability, 0 to 1 |
choice | pick one of 2 to 255 options | instructions, choices: [{ value, description? }] | choice, confidence, one probability per option |
score | rate against 2 to 10 ordered levels, lowest first | instructions, levels: [{ label, description? }] | score (probability-weighted level index, starting at 0), confidence, one probability per level |
Give each question a name; the answer carries it back.
To try questions before you write code, open Decisions in the playground of the dashboard. Its form builds every input the endpoint accepts: messages of every role with text, images (upload, paste or URL) and JSON, earlier assistant turns, and function and custom tool calls with their results. It sends real requests from your workspace, shows each answer with its probabilities, the tokens, how many of them came from the cache and the cost, and writes the matching cURL, Python and TypeScript code for you.
from openai import OpenAI
client = OpenAI(base_url="https://api.deutschlandgpt.de/v2", api_key="YOUR_API_KEY")
decision = client.decisions.create(
model="gpt-6-luna-decisions",
input="I was charged twice for my order. Please return the extra charge.",
questions=[
{"type": "predicate", "name": "refund_requested",
"instructions": "Does the customer ask for a refund?"},
{"type": "choice", "name": "department",
"instructions": "Which department should handle this?",
"choices": [{"value": "billing"}, {"value": "technical"}, {"value": "other"}]},
],
)
for answer in decision.answers:
print(answer)
Response
{
"model": "gpt-6-luna-decisions",
"answers": [
{ "type": "predicate", "name": "refund_requested", "probability": 0.95 },
{
"type": "choice",
"name": "department",
"choice": "billing",
"probabilities": [
{ "value": "billing", "probability": 0.95 },
{ "value": "technical", "probability": 0.02 },
{ "value": "other", "probability": 0.03 }
],
"confidence": 0.93
}
],
"usage": {
"input_tokens": 162,
"input_tokens_details": { "cached_tokens": 0, "cache_write_tokens": 0 },
"output_tokens": 0,
"output_tokens_details": { "reasoning_tokens": 0 },
"total_tokens": 162
}
}
The values above are illustrative. Any single question can come back as { "type": "refusal", "name": "…" } while the others are answered, so check each answer's type before you read it. A refusal is not the same as a low probability. Compare probabilities against thresholds you set from labelled examples of your own data.
Billing and data processing
A decision is billed per token at the decision model's own rates, separately for input tokens, cached input tokens and cache writes. Decisions produce no output tokens. Each request appears in the dashboard logs as a decision, with its cost.
Decisions run on Microsoft Azure in the EU. The model's API-key permissions, the GDPR-only setting on a key and your organisation's professional-secrecy (§ 203) setting apply exactly as they do for chat completions. If the host that would serve a request is unavailable, the request may move to another host only when that host passes the same checks; for an organisation subject to § 203, a request never leaves the hosts covered by it and fails instead. The request log shows which host answered.
Errors
| Status | Meaning |
|---|---|
400 | The request is invalid, the model does not support decisions, or the provider rejected the input (for example an image URL it could not download). |
402 | Your credit balance or a spending limit does not allow the request. |
403 | Your key or organisation may not use this model. |
404 | Unknown model, or decisions are not available for it right now. |
429 | Rate limited. Wait for the time in the Retry-After header. |
502, 504 | The provider failed or did not answer in time. Retry later. |