Gemini Decisions API Explained: Model Routing, Pricing and REST Integration
Google introduced the Gemini Decisions API on November 11, 2026. Gemini Decision 1 evaluates questions whose possible answers you define. This makes it useful for choosing a support queue, checking a document against a rubric or proposing an agent tool from an explicit allowlist.
How bounded decisions differ from text generation
| Task | Text generation | Decisions API |
|---|---|---|
| Create a support reply | Produces wording for a human to read | Chooses among specified reply categories |
| Route a ticket | Can emit a label using a prompt or schema | Scores developer-defined alternatives |
| Grade a screenshot | Can generate a critique | Selects a level from a defined scoring rubric |
The API accepts one shared input and up to 1,000 independent questions. Google describes text, image, audio, video and PDF inputs up to 256K tokens. A question can ask for a yes/no answer, a named choice or a score from an ordered rubric. One response may contain separate answers for routing, scope and severity. That is useful when every question refers to the same evidence. If one answer changes what the next question should see, perform the steps separately.
Send a documented REST request
Use synthetic text for the first request. Supply the API key through an environment variable and avoid shell tracing when using it.
curl --fail-with-body --max-time 20 \
https://generativelanguage.googleapis.com/v1beta/decisions \
-H "x-goog-api-key: $GEMINI_API_KEY" \
-H 'Content-Type: application/json' \
--data '{
"model":"gemini-decision-1",
"input":"The invoice export shows the same tax line twice.",
"questions":{
"queue":{
"type":"choice",
"instructions":"Pick the support queue for this issue.",
"criteria":{
"billing":"Payment, invoice or tax disputes",
"engineering":"Application defects or technical incidents",
"manual_review":"Evidence is insufficient or the issue spans multiple queues"
}
}
}
}'
The documented choice answer supplies the selected key, probability distribution and confidence under the named answer. A closed set still allocates probability among its alternatives when all are poor fits. Give uncertain cases an explicit destination. In ASP.NET Core, validate the response against the exact question key and an allowlist of choices. Route malformed responses, unknown categories and low-confidence cases to review.
Use confidence as a routing input
Choose a threshold from labeled cases that resemble your traffic. Include reports with multiple symptoms, missing context and unfamiliar vocabulary. Compare accuracy, the share routed automatically and the cost of mistakes at different thresholds. A confidence of 0.95 from one workload does not establish 95% accuracy on a different one. Keep deterministic checks for account permissions and business rules. A tool choice can propose an operation, while server policy decides whether it can run.
Google reported 150–250 ms end-to-end latency and $0.10 per million input tokens with no output token charge at launch. Treat latency as a vendor-reported range, not a service guarantee. Your endpoint adds networking, validation and possibly document uploads. Google says the shared input is billed once per request, with each question adding its own instruction or criteria tokens. Measure actual usage for representative files. Keep timeouts, cancellation and transient failure handling separate from the model’s confidence value.
Does this replace a policy engine? It can classify ambiguous evidence for review. Enforce access, mandatory rules and irreversible actions in application code.
Can I route media? The official guide documents media inputs. Send only approved material, with access and retention controls appropriate to the data.
Comments
Post a Comment