Decision API: The Typed, Calibrated Alternative to Asking an LLM for JSON

Every engineering team that has shipped a model-backed feature has lived the same failure mode: the model returns a beautifully written paragraph when the downstream service needed a boolean. You add “respond only with JSON,” then a schema validator, then a retry loop, then a fallback prompt — and a decision path that should take milliseconds becomes a multi-second pipeline whose behavior shifts every time the provider ships a new checkpoint.

A decision API exists to delete that entire class of work. Rather than generating language and hoping the format survives, it accepts structured state plus a question defined in code, and returns a typed answer in a single pass. For developers, product teams, and ops engineers who need a system to commit to an answer rather than describe one, the difference is architectural, not cosmetic.

This article explains what a decision API is, how its request and response contract works, what changes at the latency and cost layer, and which production patterns it unlocks in triage, gating, machine monitoring, and agent control loops.

What a Decision API Is — and How It Differs From a Chat Completion

A chat model is a general-purpose text generator with a schema bolted on afterward. A decision API inverts that relationship: the answer shape is the product, and the state is the input. You send state — plain text, a JSON object, or up to 16 images and video frames — together with questions defined in code**, and you receive schema-valid, typed answers in one pass. Nothing is phrased. Nothing has to be parsed out of prose.

The answer types are deliberately small and boring, which is exactly why they compose: choice (one of your labels), score (a level on an ordered scale), truth (a calibrated probability from 0.00 to 1.00), number (a value on a grid), and point or box (a location inside an image). A single call can carry several of these at once, so “is this ticket a billing issue, how urgent is it, and how sure are you?” becomes one request instead of three chained prompts plus a router.

The property that changes how you build around it is calibrated confidence on every answer. A score of 0.85 is not a vibe; across a well-formed workload, answers scored near 0.85 are right roughly 85% of the time. That turns thresholds into defensible policy. Code can act instantly above a cutoff, and re-check with richer context, escalate to a human, or take a safe path below it. This is the mechanism that lets automation replace brittle hand-written rule trees without replacing them with unaccountable guesses.

DecisionNode is built squarely on this model: a “System One” decision engine that returns typed, calibrated decisions rather than generated text, with every response carrying the confidence needed to make threshold logic explicit. The engine is designed for the questions that already exist in your codebase — is this fraud, which queue does this belong in, does this frame pass inspection — rather than for questions that need an essay in return. The practical consequence is that the integration surface shrinks: no prompt engineering for format, no output post-processing, no defensive retry budget consuming your p95 latency.

The Anatomy of a Decision Request: Schema In, Schema Out

The contract is intentionally narrow. A typical call is a single HTTPS POST to /v1/decide containing the state under evaluation and the questions you want answered, with the questions written once in code as typed definitions rather than re-specified in a prompt string on every request. DecisionNode documents that contract, along with SDKs for TypeScript, Python, Go, Ruby, and raw curl, at decisionnode.com, and the shape is stable enough to treat as any other internal service dependency.

In practice, a request for ticket routing might carry the ticket subject and body as text, a small JSON block with customer tier and prior contact count, and five label options for the routing question plus an urgency question on a three-level ordered scale. The response returns the chosen label, the urgency level, and a confidence value for each — already valid against the schema you declared. There is no “sometimes it returns an extra field” class of bug, because the answer set is bounded by construction.

Multimodal decisions follow the same pattern. Because the state can include up to 16 images or video frames, a warehouse check can ask whether a pallet is correctly wrapped and where the damage is located, returning a choice alongside a box in image coordinates. A quality-control station can score a part against an ordered defect scale and return a point for the seam. Ops teams get a machine-readable verdict; the vision pipeline stays behind the endpoint instead of becoming a second system to maintain.

Two contract details matter for reliability planning. First, the engine is deterministic: the same request returns the same answer, which makes replaying production traffic in a staging environment meaningful and makes regressions reproducible. Second, integrations extend beyond synchronous HTTP — Model Context Protocol tools, webhooks, and agent integrations are all supported, so a decision can be a step inside a larger orchestration rather than a hard dependency in the hot path. Both details remove the usual reasons teams keep a chat-LLM JSON shim in production long after it has stopped being trustworthy.

Latency, Cost, and Determinism in Production

Most “decision” workloads are not research problems; they are throughput problems. A routing decision on the 40th percentile of tickets does not need a reasoning trace, and a gating check on a signup form cannot spend two seconds in inference. DecisionNode publishes two models aimed at that reality: DecisionNode Flash at roughly 5 ms server-side and 19 ms end to end, priced at $0.035 per 1M input tokens, and DecisionNode MoE at roughly 9 ms server-side, priced at $0.042 per 1M input tokens. Output tokens are free, batch discounts are available, and there is a free daily tier for evaluation and low-volume paths.

Those numbers change where the decision can sit in your architecture. At single-digit milliseconds, a decision call can live inside a synchronous API request, a checkout flow, or a per-frame loop rather than in an asynchronous queue with a webhook callback. Teams replacing hand-written rule engines find the migration is often closer to a swap than a redesign: the branch that used to call isPromoAbuseRisk now calls the endpoint and compares the returned probability to the same threshold the rules approximated.

For high-frequency loops, HTTP request-per-decision is the wrong shape. Sessions over WebSocket exist precisely for workloads above roughly 10 decisions per second — drone and robot control, simulators, and continuous machine monitoring — where the per-request overhead dominates the inference time. A production-line camera evaluating several frames per second, or a warehouse robot re-deciding a grasp every few hundred milliseconds, needs a persistent session and a decision budget it can reason about, not a new TLS handshake per frame.

Cost modeling also gets simpler. Because pricing is input-token-based and output tokens are free, a multi-question call costs essentially the same as a single-question one, which quietly encourages the better design: ask everything you need in one pass instead of fanning out to five endpoints and reconciling their answers.

Decision API Patterns: Triage, Gating, and Agents That Decide Before Acting

The highest-volume pattern is triage. Ticket routing, moderation queues, and support escalation all reduce to choosing a label with a confidence attached, and all currently absorb engineering time in rule maintenance. A decision API collapses the rules into typed questions plus thresholds, and the calibrated confidence gives you a clean human-in-the-loop boundary: above 0.9, auto-assign; between 0.7 and 0.9, assign but flag; below 0.7, queue for review. The same structure covers fraud and promo-abuse checks, order and shipping decisions, and content moderation, where the truth type maps directly onto a risk probability your existing policy engine already understands.

The second pattern is gating — decisions that allow or block an action before it happens. Pre-publish checks, paywall eligibility, refund approvals, and promotional credit issuance all benefit from a deterministic, auditable verdict, because “the model said so” is not an explanation an auditor accepts, while a logged typed answer with a confidence value and a versioned question definition is.

The third pattern is agent control. An LLM drafting a plan is useful; an LLM deciding whether to click the button is not. Decide before acting is the safer architecture: the agent’s proposed action becomes state, a decision call returns a typed verdict plus confidence, and the orchestrator proceeds, blocks, or escalates. This keeps the probabilistic part in the planner and the accountable part in the decision API.

Where the inputs are visual, boosters extend the same call rather than adding vendors — human age estimation, AI-generated image detection, face detection and recognition, OCR, and depth and segmentation are available as enhancements to the base decision. That matters for teams building identity-adjacent gating, verifying user-submitted photos, or reading a label on a returned package. And for ops teams running warehouse and traffic monitoring or production-line quality control, the combination of image input, box and point outputs, and a deterministic verdict turns a monitoring dashboard into an automated control loop with a measurable false-positive budget.