Decision APIs: Millisecond-Scale Judgments at Scale
This article explains the emerging category of decision APIs, which return probability distributions and confidence scores over a developer-supplied set of options instead of generating text. It covers the three core primitives (condition checks, option selection, and rubric-based scoring), why evaluating hundreds of questions in a single request is an architectural change rather than just a throughput gain, how multimodal inputs and long context remove preprocessing pipelines, and how pricing shifts from output tokens to input tokens. It closes with practical use cases such as model routing and safety governance, an engineering checklist of common pitfalls, and guidance on choosing between decision APIs and generative calls.
1. From Generating Answers to Returning Judgments: A New Interface Shape
For the past two years, the default pattern for building AI applications has been “assemble a prompt, wait for a generation”: pack context into the context window, let the model emit natural language token by token, then parse that text into something executable with regex, structured output, or a second model. This pipeline performs well for open-ended writing, question answering, and summarization. In many business scenarios, though, it is overkill. What the business actually needs is often not a paragraph but a boolean, a category label, or a score.
That gap is why a category of interfaces known as decision APIs has appeared. The core difference: instead of generating a text reply, they take a candidate set of options defined by the developer and return a probability distribution plus confidence scores for each option. The caller receives structured results that can go straight into branching logic, not sentences. A comparable capability recently released by a cloud vendor raised the number of questions evaluable per request to the thousand-item range and pushed end-to-end latency into the low hundreds of milliseconds, moving this shape from “usable” to “embeddable in production pipelines at scale.”
This is not meant to replace generative models. It splits AI calls into two kinds: use generation when you need content, use decision when you need a judgment. The engineering payoff is clear: you drop the fragile text-parsing step, drop the wait for output tokens, and drop the cost of repeatedly tuning parameters just to make a model “say only JSON.”
2. Three Decision Primitives and What They Mean for Engineering
These interfaces typically offer three basic capabilities. Understanding their semantic boundaries is a prerequisite for designing the system correctly.
- Condition check (does it hold): given an input and a criterion description, return whether the condition is met and the associated probability. Suited to gating, admission, and compliance pre-screening.
- Option selection (pick one from a set): given a predefined set of mutually exclusive options, return a probability distribution across them. Suited to intent classification, ticket routing, and model routing.
- Rubric scoring (evaluate against a scale): given scoring dimensions and level definitions, return the probability of the input falling into each level, or a weighted score. Suited to quality evaluation, risk tiering, and content rating.
An illustrative call skeleton (pseudocode, expressing semantics only and not pointing at any specific API):
request = {"input": {"text": user_message, "image": screenshot}, # supports multimodal input"questions": [{"type": "condition", "criterion": "contains contact information"},{"type": "choice", "options": ["refund", "exchange", "inquiry", "other"]},{"type": "score", "rubric": {"1": "no risk", "5": "high risk"}}]}resp = decision_api.evaluate(request)if resp["questions"][2]["score"] >= 4:route_to_human_review(user_message) # escalate uncertain/high-risk caseselse:handle_automatically(resp["questions"][1]["choice"])
The most notable design habit here: base the “escalate to a human” threshold on confidence, not on whether text parsing succeeded. In the traditional pipeline, a parse failure usually means retry or degrade. In a decision pipeline, low confidence is itself a valuable signal that can directly drive a human-in-the-loop flow.
3. Batching: Why a Thousand Judgments per Request Is a Qualitative Change
Supporting a large number of questions in a single request delivers more than throughput. It simplifies the architecture.
- Shared context cost is amortized: in most business scenarios, hundreds or thousands of judgments share the same input (the same email, the same ticket, the same transcribed recording). Calling one by one bills and transmits that context repeatedly; batch evaluation charges for the shared input once, with each question adding only the tokens for its own instruction and rubric.
- Better consistency: the whole batch completes in a single forward pass, avoiding the conclusion drift that sampling randomness introduces across multiple calls. For fraud control and moderation, where “same input, same conclusion” is required, this matters more than latency.
- Shorter pipeline: one network round trip replaces multiple serial calls, removing a batching queue layer and a set of retry and idempotency designs.
Latency data supports the same conclusion: at a context scale of tens of thousands of tokens, end-to-end latency stays in the low hundreds of milliseconds, and performance remains relatively stable as the number of questions grows from single digits to over a hundred. The marginal cost of batching is therefore low, and developers do not have to make a painful tradeoff between question count and response speed.
4. Multimodal Inputs and Long Context: Turning Unstructured Data Straight into Decisions
The traditional approach handles images, audio, and video by first running a separate transcription or recognition step that converts unstructured data into text, then handing it to the judgment stage. Every stage added to that pipeline adds latency and another source of error.
Combining multimodal input with a long context window (up to the hundreds-of-thousands-of-tokens range) lets judgments rest directly on the raw input: whether a support call needs escalation to a complaint, whether a screenshot of a document matches the declared category, whether a video contains violating frames, all can return a probabilistic conclusion in one call. For long-document compliance review and intent detection across long conversations, long context also removes the complex engineering of chunking, retrieval, and re-aggregation.
5. Cost Model: From Billing per Output to Billing per Judgment
Pricing structure materially affects architecture choices. These interfaces generally bill a per-million-input-token unit price and charge nothing extra for output tokens. Because no text is generated, output-side cost is naturally zero and cost predictability improves significantly.
For capacity planning, watch three variables: the length of the shared input, the number of questions, and the length of the instruction and rubric each question carries. The first two set the baseline cost; the third is often underestimated, and if you write lengthy rubrics for every question, total token consumption can exceed the shared input itself. The practical advice is to keep rubrics short, mutually exclusive, and decidable, and to avoid synonymous repetition.
If the workload involves a lot of repeated context, check whether a cached-input discount is available, which noticeably changes the cost structure of “evaluating the same long document over and over.”
6. Use Cases: From Model Routing to Safety Governance
- Model routing and tiered service: splitting requests between lightweight and heavyweight models based on complexity is the most direct payoff. Publicly reported industry practice shows this kind of splitting can cut latency for routine queries severalfold while controlling the share of calls to expensive models.
- Adversarial behavior detection: in pipelines that call external tools, use a decision API to flag anomalies such as prompt injection and unauthorized tool calls, turning a safety judgment from “generate an explanation” into “output a risk score.”
- Fraud control and credit assessment: produce tiered conclusions for unstructured, constantly changing information (application materials, transaction descriptions, behavioral traces), with low-confidence samples routed automatically into a manual review queue.
- Content moderation and quality gates: rate content against a scoring scale instead of brittle keyword and regex rules.
- Ticket and intent routing: compute a multi-class problem in one pass, avoiding the error accumulation of cascaded classifiers.
7. Implementation Checklist and Common Pitfalls
- The option set must be mutually exclusive and complete. The quality of the probability distribution depends heavily on option design; overlap or gaps dilute probabilities and distort confidence.
- Rubrics must be decidable. Avoid subjective phrasing like “handled fairly well” in favor of observable, verifiable conditions.
- Set confidence thresholds and a human-in-the-loop path. Continuously feed low-confidence samples back as labeled data to close the iteration loop.
- Keep fallback and degradation paths. Any model judgment should be overridable by rules or a human, especially in compliance- and money-related pipelines.
- Invest in observability. Log input summaries, per-option probabilities, and threshold hits for traceability and tuning; combine logging services with monitoring and alerting to build dashboards.
- Watch for sensitive data in context. Long context means more data enters a single request, so redaction, minimization, and access control must happen before the call.
- Beware of over-batching. Batching amortizes cost, but an oversized single request also stretches tail latency; split batches according to the business latency budget.
8. Choosing Between Decision APIs and Generative Calls
The main differences between comparable offerings across vendors come down to three points: the maximum number of questions evaluable per request, whether a cached-input discount is offered, and how far integration with existing development frameworks and cloud hosting services has progressed. For evaluation, run a small-scale benchmark on real business samples and focus on three metrics: judgment accuracy, P95 latency, and the all-in cost per judgment.
A practical rule of thumb: when the output space of the task is finite and enumerable and downstream only needs an executable conclusion, prefer a decision API; when the task requires generating open-ended content, explanatory text, or creative output, still use a generative model. Combining the two is often the best answer: use the decision API for splitting and risk control first, then use the generative model for the parts that need to be produced.
9. Conclusion
The significance of decision APIs is that they move AI from “a tool that talks” to “a component that makes judgments.” Probabilistic reasoning gains, for the first time, the engineering conditions to be embedded in high-concurrency business pipelines: millisecond latency, predictable billing, structured output, and a natural fit for human-in-the-loop workflows. What developers really need to change is how they frame the problem: decompose the business question into enumerable judgments first, then decide what goes to the model, what goes to rules, and what goes to people. That decomposition skill is becoming a core competency in AI application architecture.
