Google's Decisions API answers typed questions with probabilities instead of text
The API returns calibrated probabilities with zero output tokens, so code can branch without parsing text.
The Decisions API documentation on Google AI Studio swaps text generation for typed answers. Each call sends one shared input plus a map of questions. The gemini-decision-1 model sends back calibrated probabilities and spends zero output tokens. The page surfaced on Hacker News on November 11; the documentation carries no publication date of its own.
There are three question types:
noulhandles yes/no and returns the probability of yes, always between0.01and0.99. A threshold above0.99never fires.choicepicks from a fixed option list and spreads probability across all of them. Keys are sorted alphabetically by UTF-8 bytes, sonone_of_the_abovewon't land last.scorerates input on 2 to 255 ordered levels, with 2 to 10 recommended. The result is a weighted average, so it can sit between two levels.
The quickstart needs SDK 3.2 or later (pip install -U google-genai):
from google import genai
client = genai.Client(http_options={"api_version": "v1beta"})
result = client.decisions.create(
model="gemini-decision-1",
input="The blue mug I ordered on Monday arrived cracked on Wednesday.",
questions={
"is_damaged": {
"type": "noul",
"instructions": "Did the item arrive damaged?",
},
},
)
answer = result.answers["is_damaged"]
print(f"P(yes)={answer.noul:.2f} confidence={answer.confidence:.2f}")
Every question runs in a single forward pass, isolated from the others. Any dependency between answers has to live in your own code, as if statements and weights.