Laptop on a developer desk at night showing code and a yes-no branching diagram, illustrating the Gemini Decisions API

How to Use the Gemini Decisions API (With Code Examples)

Most Gemini calls write text. This one answers questions with numbers — and learning how to use Gemini Decisions API means learning to ask for a probability instead of a paragraph. Launched on 11 November 2026, the Decisions API takes one shared input — text, an image, audio, video or a PDF — plus up to 1,000 questions about it, and returns a probability and a confidence score for each one. Your code can then branch on the answer. It costs $0.10 per million input tokens, and output tokens are always zero. Every step in this guide follows Google’s published documentation and launch post, not a hands-on test.

The model is gemini-decision-1, and the endpoint is POST /v1beta/decisions on the Gemini Developer API — a different shape from generateContent, so a model-ID swap in existing code will not work.

What the Gemini Decisions API is — and what it is not

A normal Gemini call generates text one token at a time. The Decisions API scores candidate answers in a single forward pass, with no token-by-token decoding, and returns numbers. That keeps it fast — Google reports 150–250 ms end to end in its own tests — and output tokens are always zero, which keeps it cheap.

Three kinds of question are supported:

Question typeUse it forReturns
noul (yes/no)Is this true of the input?noul — probability of yes, from 0.01 to 0.99 — plus confidence
choice (pick one)Which of these options fits best?Winning choice, probabilities for every option, confidence
score (rate on a scale)How strong is this, on an ordered rubric?Continuous weighted score, per-level probabilities, legend, confidence
Three panels showing a yes-no split, pick-one options and a rating scale
The Decisions API answers three kinds of question: yes/no, pick one, and rate on a scale. Illustration, not a screenshot.

One input can carry 1 to 1,000 questions, up to 262,144 tokens in total including the questions. Questions run independently and cannot see one another, and the shared input is billed once per request.

What it is not: a chat model, a text generator, or a judge that explains itself. There is no reasoning trace and no written justification — just the probabilities.

Before you start

Before the first call you need a Google account, an API key from Google AI Studio, and version 3.2 or later of the google-genai SDK — pip install -U google-genai for Python, npm install @google/genai@latest for JavaScript. The endpoint is v1beta only, on the Developer API; Vertex AI support is “coming soon” with no date.

Pricing is $0.10 per million input tokens, $0 output, all modalities. A no-cost tier in AI Studio covers prototyping, limited to 200 requests per minute, 50,000 input tokens per minute and 10,000 requests per day, per Google’s rate-limit page as reported on 12 November. One caution, reported by third-party tutorials rather than as a Google quote: free-tier data may be used by Google to improve its products, while paid-tier data is not.

If you would rather click than code first, start in the Decisions Playground in AI Studio: it runs all three question types on custom text and media, and exports runnable code for the call you built.

How to use Gemini Decisions API: your first request

The docs quickstart uses a cracked mug: the input is “The blue mug I ordered on Monday arrived cracked on Wednesday.” and the question is “Did the item arrive damaged?” Here is that call in Python, from Google’s documentation:

from google import genai

client = genai.Client()  # key from the environment

response = client.decisions.create(
    model="gemini-decision-1",
    input="The blue mug I ordered on Monday arrived cracked on Wednesday.",
    questions={
        "damaged": {
            "type": "noul",
            "question": "Did the item arrive damaged?",
        }
    },
    http_options={"api_version": "v1beta"},
)

Three details matter: gemini-decision-1 is the only model that works here; questions are a named set, each with a type and a question; and http_options pins the API version to v1beta.

The same call in JavaScript, from the same docs:

import { GoogleGenAI } from "@google/genai";

const ai = new GoogleGenAI({ apiVersion: "v1beta" });

const response = await ai.decisions.create({
  model: "gemini-decision-1",
  input: "The blue mug I ordered on Monday arrived cracked on Wednesday.",
  questions: {
    damaged: { type: "noul", question: "Did the item arrive damaged?" },
  },
});

And as a plain REST call, for any language with an HTTP client:

curl -X POST "https://generativelanguage.googleapis.com/v1beta/decisions" \
  -H "x-goog-api-key: $GEMINI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-decision-1",
    "input": "The blue mug I ordered on Monday arrived cracked on Wednesday.",
    "questions": {
      "damaged": {"type": "noul", "question": "Did the item arrive damaged?"}
    }
  }'

Note the header: the key goes in x-goog-api-key, not in an Authorization: Bearer header.

Per the docs, the response is {"type": "noul", "noul": 0.99, "confidence": 0.99}, with total_output_tokens: 0. In plain words: a 99% chance the item arrived damaged, and 99% confidence the top answer is right.

The three question types, with examples

A yes/no question is the simplest check. The docs let you add descriptions of what yes and no mean — “damaged” could mean a scratch or a shattered mug, and spelling out the difference keeps the model honest. Here is a defect check for a support inbox:

"defect": {
    "type": "noul",
    "question": "Is this message about an item that arrived damaged?",
}

A choice question picks one option from a list of 2 to 255. Options are sorted alphabetically, in UTF-8 byte order, before evaluation, and ties break to the alphabetically first key — so include a catch-all such as “other”, or a case that fits none of the options still gets a probability spread across them. Here is a support-routing question:

"route": {
    "type": "choice",
    "question": "Which team should handle this ticket: billing, shipping, technical or other?",
}

The response gives the winning choice, a probability for every option that sums to 1, and a confidence score. Your code sends the ticket to the winning team — or holds it for a human when the top probability is low.

A score question rates the input on an ordered rubric of 2 to 255 levels, with 2 to 10 recommended. Levels are indexed from 0, and the response is a continuous weighted score plus per-level probabilities, a legend and confidence. Here is a severity rubric:

"severity": {
    "type": "score",
    "question": "How severe is the damage described: none, minor, major or unusable?",
}

A weighted score of 2.7 on a four-level rubric carries the model’s uncertainty with it, so a case sitting between two levels does not get forced into one.

Setting confidence thresholds that actually work

Confidence, in the docs’ definition, is the estimated probability from 0 to 1 that the top answer is right. For choice and score it equals the top outcome’s probability; for yes/no it is the larger of noul and 1 − noul.

The practical pattern is a threshold with a fallback: above it, your code acts; below it, the case goes to a human, a second check, or a safer default. The threshold depends on the cost of being wrong.

Two traps catch first-time users. First, the 0.01–0.99 clamp: yes/no probabilities never reach 0 or 1, so a check such as noul > 0.99 never fires — set thresholds inside the range, for example 0.9 or 0.95. Second, the model cannot abstain: a choice question always spreads probability across the options you gave it, even when none fits. Add an “other” option, or pair the choice with a yes/no scope check first.

Keep questions atomic, then combine the answers with if statements in your code.

Road splitting into two paths at a signpost at dusk, one path glowing brighter
Confidence scores tell your code when to act and when to send a case to a human. Illustration, not a screenshot.

Three practical uses

Support-ticket triage is the clearest fit. One message goes in, and a batch of questions runs over it in a single request: is it about a defect, is it urgent, which team owns it. The input is billed once, and the low-confidence tickets land in a human queue with their scores attached.

Content and policy checks at scale work the same way. A single post, image or video can face hundreds of questions — is it spam, does it mention a brand, is the tone hostile — because the API allows up to 1,000 questions per request. Each answer is a number your moderation code can compare against a threshold, rather than a paragraph it has to parse.

Model routing and grading inside agents is the third use Google names. Gemini Notebook already uses the endpoint for dynamic model routing, with up to 40% lower latency on everyday queries, per Google. The same idea applies to grading an agent’s draft answer against a rubric before it reaches the user.

Limits to know before you build

The endpoint is v1beta on the Developer API only. Vertex AI support is “coming soon” with no date, and there is no published date for general availability, no regions list, and no data-residency terms. Batch API, caching and function calling are unsupported.

Latency figures are scoped to Google’s own tests: 150–250 ms end to end and 50–100 ms of model compute, measured on inputs up to 16,000 tokens with 1 to 100 questions. Do not promise that speed at the full 262,144-token context.

Benchmark claims need the same care. Google says the model “leads across the suite, with the lowest calibration error” and is “nearly 5x cheaper than Gemini 3.5 Flash-Lite with the Interactions API” — both are Google’s own claims. Independent analysis is more mixed: the model loses 2 of 9 benchmark rows to TypeSafe Jev 1.14 and scores 66 on the Decision Index, seven points behind the leaders, per ArtificialAnlys via ai-primer.com.

Google also names the wider ecosystem: OpenRouter, LangChain, the Vercel AI SDK, LiteLLM, Pydantic AI, Pipecat, LiveKit and OpenCode all support the endpoint. The launch post also names rapid canvas experiments in Stitch, emoji selection in CC (Google Labs), and a safety layer for MCP tools in Search. For the Gemini family context, see our Gemini 4 Hydrogen explainer.

What is the Gemini Decisions API?

It is a Google endpoint, launched 11 November 2026, that answers up to 1,000 typed yes/no, choice and rubric questions about one shared input in a single pass, using the model gemini-decision-1. It returns calibrated probabilities and a confidence score instead of generated text, and output tokens are always zero.

How much does the Gemini Decisions API cost?

Google charges $0.10 per million input tokens, with $0 output, and the shared input is billed once per request no matter how many questions ride on it. A no-cost tier in AI Studio covers prototyping, limited to 200 requests per minute, 50,000 input tokens per minute and 10,000 requests per day.

What is the difference between noul, choice and score?

Noul is a yes/no question returning the probability of yes, clamped to 0.01–0.99, plus a confidence score. Choice picks one option from 2 to 255 and returns the winner with a probability for every option. Score rates the input on an ordered rubric and returns a continuous weighted score with per-level probabilities and a legend.

Can I use the Decisions API without code?

Yes — the Decisions Playground in AI Studio runs all three question types on custom text and media with no code at all, and exports runnable code for the call you built.

Does the Decisions API work in Vertex AI?

Not yet. The endpoint is on the Gemini Developer API only, at POST /v1beta/decisions, and Google says Vertex AI support is “coming soon” with no date.

Open the Decisions Playground in AI Studio and run the cracked-mug yes/no check from this guide, then export the code, paste it into your project, and add one threshold with a human fallback. See our Nano Banana guide for another Gemini walkthrough.

More Guides for Manga Artists