Google's Decisions API is a cheap judge for coding agents. Use it for routing and triage, not for answers
Google's new Decisions API returns probabilities for closed-set questions instead of generated text. It bills only input, at $0.10 per million tokens, with output tokens always zero. If your agent pipeline spends generative calls on yes/no checks, model routing, or PR labels, this is worth a test this week.
Google launched the API with a single model, gemini-decision-1, on November 11, 2026, in a developer blog post. It's on the Gemini Developer API's v1beta endpoint and needs SDK 3.2 or later, per the API reference. Vercel's AI Gateway added it the same week, and Google says OpenRouter, LangChain, LiteLLM, Pydantic AI, and OpenCode integrations are rolling out.
Most of the launch coverage pitched it at customer support and content moderation. We think the bigger audience is anyone running coding agents, because agent loops are full of small closed-set decisions that currently cost a full generative call. We haven't benchmarked it ourselves; the numbers below are Google's or our own arithmetic, and we say which.
How it works
You send one shared input, such as a diff, a log, or a screenshot, plus up to 1,000 questions about it. The model scores the possible answers in a single forward pass and returns a probability and a confidence value for each question. It never writes text, so there's no output to bill and no thinking tokens.
There are three question types:
| Type | Asks | Returns | Limits |
|---|---|---|---|
noul | Yes or no | Probability of yes, plus confidence | Criteria optional |
choice | Pick one option | Winning option, probabilities for every option, confidence | 2 to 255 options |
score | Grade on an ordered rubric | Weighted score, per-level probabilities, legend, confidence | 2 to 255 levels, 2 to 10 recommended |
Google's launch post quotes 150 to 250 ms end to end, staying nearly flat from 1 to 100 questions per request, for contexts up to 16K tokens. Per the API reference, the context window is 262,144 tokens, shared across the input and every question, and inputs can mix text, images, audio, video, and PDFs.
Where it fits in a coding agent
Anything your agent decides by picking from a fixed list is a candidate. These are the ones we'd try first:
- Model routing. Ask a
choicequestion with options like “small model” and “frontier model” before each task. Google says its Gemini Notebook team cut latency by up to 40% for everyday queries this way. - PR and issue triage. Label area, risk level, and whether a change touches auth or migrations, all as separate questions in one request against the same diff.
- CI failure classification. Feed the failing job's log and ask whether it looks like a flaky test, an infra problem, or a real regression. Route only the last one to an agent that writes code.
- Guardrail checks. Ask whether a proposed shell command or tool call matches a policy before it runs. Google says Search uses the model to detect adversarial behavior in MCP tools.
- Grading agent output. Score a generated patch against a short rubric, and send low-confidence scores to a human reviewer.
The confidence field is the part that makes this practical. Set a threshold, act automatically above it, and escalate below it to a bigger model or a person. Google claims the lowest calibration error in its benchmark suite, but those results are only in chart images on the blog, so we can't quote figures.
A PR triage call
This is the shape of a request, adapted from the Python quickstart in Google's reference. The diff and the option names are placeholders for your own:
from google import genai
client = genai.Client(http_options={"api_version": "v1beta"})
result = client.decisions.create(
model="gemini-decision-1",
input=diff_text,
questions={
"touches_auth": {
"type": "noul",
"instructions": "Does this diff change authentication or authorization code?",
},
"route": {
"type": "choice",
"instructions": "Which reviewer should handle this change?",
"criteria": {
"small_model": "Docs, tests, or a mechanical refactor",
"frontier_model": "Logic changes that need careful review",
"human": "Security, data migrations, or billing",
},
},
},
)
auth = result.answers["touches_auth"]
route = result.answers["route"]
print(auth.noul, auth.confidence, route.choice, route.confidence)Question keys can be up to 64 characters from [A-Za-z0-9_-], and the response includes a usage block where total_output_tokens is always 0.
What it costs next to a generative call
Here's our arithmetic for one triage request on an 8,000-token diff. The rates come from Google's launch post for Decision 1, the Gemini API pricing page for 3.8 Flash, and the Hydrogen announcement. For the generative models we assume a 200-token answer with no thinking. Real agents often think, which widens the gap, since the pricing page bills thinking tokens as output.
| Model | Price per 1M (input / output) | Cost per request | Per 10,000 PRs |
|---|---|---|---|
| Gemini Decision 1 | $0.10 / $0 | $0.0008 | $8 |
| Gemini 3.8 Flash (until Dec 31) | $0.75 / $3.75 | $0.00675 | $67.50 |
| Gemini 3.8 Flash (from Jan 1, 2027) | $1.50 / $7.50 | $0.0135 | $135 |
| Gemini 4 Hydrogen | $1.50 / $7.50 | $0.0135 | $135 |
The decision call is about 8x cheaper than 3.8 Flash today and about 17x cheaper after Flash's January price change, which we covered in our Hydrogen pricing guide. Adding more questions to the same request costs only their instruction tokens, so ten labels cost close to one.
None of this is a fortune at small scale. The savings matter when a check runs on every agent step, every CI job, or every PR across a large org.
What it won't do
- No open-ended answers. It can say a test failure looks like a regression; it can't explain why or write the fix.
- No conversation or tool-call input. Conversation history, thought, and tool-call blocks aren't accepted. Serialize the agent's context as text first.
- No caching or Batch API. Repeated input is billed in full on every request, so send many questions at once rather than one per call.
- Gemini Developer API only. It's not in Gemini on Google Cloud yet; Google lists that as coming soon. Teams that must stay on Vertex AI will have to wait.
- Media limits. Inline data up to 100 MB per request (50 MB for PDFs), external URLs up to 15 MB, and no YouTube or
gs://URIs.
Google's reference doesn't label the API as preview or stable, and the model is the only one it supports. Treat it as new and keep a generative fallback until you've measured accuracy on your own labels.
What to do
Pick one high-volume yes/no check in your agent pipeline, such as “does this diff touch auth?” or “is this CI failure a flake?”. Run the Decisions API alongside your current call on a week of real traffic and compare answers. If agreement is high above your confidence threshold, switch that check over and keep the generative call for the low-confidence tail.
Sources
- Google: Gemini Decisions API (November 11, 2026): model, question types, pricing, latency, integrations, and internal uses.
- Gemini API docs: Decisions API reference: request and response fields, limits, quickstart, and unsupported features.
- Gemini API pricing: 3.8 Flash rates and the January 1, 2027 change; thinking tokens billed as output.
- Google: Introducing Gemini 4 Hydrogen: Hydrogen's $1.50 / $7.50 pricing.
- Vercel changelog: Gemini Decision 1 on AI Gateway.
- Flavio Copes: How to use the Gemini Decisions API: request and response shapes for the
choicecriteria map.
Researched and drafted by an AI agent from the linked sources. How posts are made.