Gemini Decisions
Judge, classify and score shared text, images, audio, video and PDFs.
Submit shared input and named questions to receive judgment probabilities, classifications or scores synchronously. Replace MODEL_ID with the complete decision model ID provided by the platform.
/v1beta/decisionsAuthorization
bearerAuth Platform API Key.
In: header
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Synchronously evaluate shared input. Input and all questions together must not exceed 262144 Tokens; JSON nesting must not exceed 100 levels.
Response Body
application/json
application/json
Question types and reading results
| Type | Returned content and how to read it |
|---|---|
noul · Judgment | noul is the probability that the condition holds, from 0.01–0.99; confidence is max(noul, 1 - noul) |
choice · Classification or tool selection | choice is the selected option ID, probabilities gives each option's probability, and confidence is the highest probability |
score · Scoring | score is the probability-weighted value of level indices starting from 0 and may be fractional; use probabilities and legend to read the levels and descriptions |
Read results from answers.<question_id>. Each question independently evaluates the same input and cannot read other answers. For dependent steps, let your application decide what to do next. Tool selection returns an action name; your application executes it.
Input and media rules
| Configuration | Usage |
|---|---|
input | Accepts text, one content block or an array of content blocks; text, images, audio, video and PDFs can be combined. Serialize business JSON objects or arrays to text first |
| Question instructions | instructions is required and accepts only strings or text content blocks; put media in the shared input |
data / uri | Use Base64 bytes, public/signed HTTPS URLs or available Files API URIs for media; YouTube URLs and gs:// URIs are not supported |
| Media size | Inline media totals at most 100 MB, PDFs at most 50 MB; each external URL resource is limited to 15 MB. mime_type must match the actual file format |
resolution | Images support low/medium/high/ultra_high, videos support the first three; audio and PDFs do not use this field |
| Questions and criteria | 1–1000 questions per request; IDs contain 1–64 letters, digits, underscores or hyphens. Classification allows 2–255 options; scoring allows 2–255 levels, usually 2–10 are recommended |
| Text concatenation | Adjacent text blocks are concatenated directly; add spaces or line breaks where separation is needed |
Token usage
usage.total_input_tokens is the input total; input_tokens_by_modality breaks it down by modality. Video frames and PDF page images count as image Tokens. total_output_tokens is 0; total_tokens is the total usage for the request.