Skip to main content
Google Decisions API
Evaluate shared input with Gemini Decision 1 and receive a typed answer for each named question. This page describes Google’s Decisions protocol, which differs from OpenAI Decisions and Jev System One. POST https://api.mixroute.ai/v1beta/decisions Send Authorization: Bearer $MIXROUTE_API_KEY and Content-Type: application/json. Use your MixRoute key and keep it server-side; do not send it to Google’s API host.
Google uses a questions object keyed by question ID and an answers object with matching keys. Use noul for yes/no and criteria for options or levels. Do not copy OpenAI’s questions array, predicate, choices or levels fields, or Jev’s state field.

Request parameters

Each question is evaluated independently against the shared input and cannot see another answer. Put the complete question in instructions, then combine answers in application code. Option IDs: 1-128 characters and at most 512 UTF-8 bytes. Internal ASCII spaces are allowed; non-ASCII whitespace is not.

Request examples

Set MIXROUTE_API_KEY. The Python example uses requests; the JavaScript example uses Node.js fetch.

Answers and usage

Probabilities are not guarantees of correctness. Calibrate action thresholds on representative labeled data, and allow review when confidence is low or none of the supplied choices fits.
Zero output tokens are expected: this model returns typed decisions without generating text tokens. Input is still billed. Read usage.total_input_tokens, usage.total_output_tokens and usage.total_tokens; use the console usage records for actual charges.

Limits and input formats

Shared input and all questions together must fit within 262,144 tokens. JSON nesting is limited to 100 levels. Text blocks use {"type":"text","text":"..."}. Image, audio, video and PDF document blocks use type, mime_type and either inline Base64 data or uri. Serialize application JSON as a text string; do not send an arbitrary application object as a content block. Google documents an inline limit of 100 MB per request (50 MB for PDFs) and 15 MB per external HTTPS URL. Files API URIs, public URLs and signed HTTPS URLs are provider formats; upload access and media retrieval through MixRoute depend on the route. YouTube URLs and direct gs:// URIs are not supported by Decisions. Adjacent text blocks are concatenated without a separator, so include spaces or newlines. Do not send conversation-message, thought or tool-call blocks; serialize that context as text. Context caching, Batch API, Flex and Priority inference are not part of this API. Route-specific limits may be lower than the provider limits.

Error handling

Check HTTP status and the JSON error object before reading answers. Invalid fields or limits can return HTTP 400. Google safety blocks return an error instead of answers; do not reuse OpenAI’s per-question refusal handling. Also reject missing answers or unexpected answer types. A timeout does not prove the request was not executed. Avoid blind POST retries. For rate limits or temporary service errors, retain the request ID and use controlled retry/backoff appropriate to your application. Gemini Decision 1 · OpenAI Decisions · Jev System One