Decision API: Turning Messy Inputs into Typed, Calibrated Answers Your Code Can Actually Act On

Most teams that try to bolt intelligence onto a backend start with a chat model and a prompt that says “reply only in JSON.” It works in a demo. Then it hits production, and the failure modes arrive in a queue: a missing brace, a label that isn’t in your enum, a “0.8” that means nothing, a retry loop that costs more than the feature is worth. The problem isn’t the model’s reasoning — it’s that the interface returns text, and text is not a contract.

A decision API inverts that. Instead of asking a language model to narrate an answer and hoping the shape survives, you send state plus questions defined in code and receive typed, schema-valid decisions in a single pass. This article looks at what that changes for developers, product teams, and ops engineers who need an inference call to behave like any other dependable dependency.

What a Decision API Returns — and Why Typed Output Changes the Architecture

The mechanical difference is small enough to describe in one line: you POST state and a set of typed questions to a single HTTPS endpoint and get answers back that already match the types you declared. The architectural difference is large. When the response is typed, the caller doesn’t need a parser, a validator, a repair prompt, or a fallback branch for malformed output. The decode step that normally lives in your application — “is this a valid label? is this number in range? did the model wrap it in prose?” — disappears from the critical path.

DecisionNode’s model returns five answer families, and each one maps to a data structure you were probably going to build anyway. Choice returns exactly one of your labels, which is the primitive behind routing, classification, and gating. Score returns a level on an ordered scale, useful for severity, priority, or quality tiers. Truth returns a calibrated probability between 0.00 and 1.00 — not a vibe, not a token logprob proxy, but a number that can be compared against a threshold with known consequences. Number returns a value on a grid, and point and box return locations inside an image, which is what makes the endpoint viable for visual inspection work rather than only text triage.

Inputs are equally unstructured on the way in. State can be plain text, structured JSON, or up to sixteen images or video frames in a single request. That matters more than it sounds: a support ticket plus a screenshot plus the customer’s order JSON is one decision, not three, and treating it as three separate calls reintroduces exactly the consistency problems you were trying to escape.

The other half of typed output is confidence. Every answer carries a calibrated confidence value alongside it, which means the response is self-describing about its own reliability. A pipeline using a decision api of this design doesn’t ask “did the model answer?” — it asks “did the model answer with enough confidence for this code path to proceed?” That single question replaces a surprising amount of bespoke heuristics code. For teams replacing brittle hand-written rule trees, the appeal is obvious: the rules still exist, but they move from `if` statements scattered across services into questions declared in code, with the evaluation handled by a consistent model instead of a growing pile of special cases that nobody wants to refactor.

Latency Budgets, Determinism, and the Real Cost of One Decision

Inference latency is usually quoted in a way that hides the number you actually care about: the time from your request leaving the service to a usable answer arriving. DecisionNode publishes both ends of that. DecisionNode Flash runs at roughly 5 ms server-side and about 19 ms end to end, which places the call in the same latency class as a database round trip or an internal RPC rather than a generation step that users wait on. DecisionNode MoE sits at roughly 9 ms server-side for cases that need more capacity. Neither figure invites the usual workarounds — no queue with a worker pool, no asynchronous “we’ll email you the result,” no client-side spinner.

Cost follows the same shape. Flash is priced at $0.035 per 1M input tokens and MoE at $0.042 per 1M input tokens, with output tokens always free, batch discounts available, and a free daily tier for evaluation. The free-output detail is more than a pricing quirk: in a decision workload, the output is the product, and metering it separately tends to push teams toward smaller, less useful answers. Flat output pricing keeps the design honest.

Then there’s the property that changes testing more than any other: determinism. The same request returns the same answer. For engineers accustomed to sampling temperature, seeded retries, and golden-test flakiness, this is the difference between a component you can unit test and a component you can only statistically monitor. Deterministic decisions can be replayed against recorded traffic, diffed across model versions, cached aggressively, and reasoned about in a postmortem. When an order was misrouted last Tuesday, you can re-run the exact state and see the exact answer.

Throughput has its own escape hatch. Most integrations are request/response, but loops that need more than about ten decisions per second — drone flight control, robot manipulation, simulator stepping, continuous machine monitoring — can hold a WebSocket session instead of paying per-request overhead. Client support is broad enough to meet teams where they are: SDKs for TypeScript, Python, Go, and Ruby, plus plain curl, MCP tools for agent frameworks, and webhooks for event-driven flows. AI agent builders in particular get a useful pattern out of this: decide before acting, so the agent’s next tool call is gated by a typed, calibrated answer rather than by the agent’s own narration of its intent.

Designing Confidence Thresholds into Real Ops and Product Workflows

The practical value of calibrated confidence shows up when you stop treating a decision as binary and start treating it as a three-way branch. Above your threshold, code acts instantly with no human in the loop. Below it, the request is re-checked with more state, escalated to a reviewer, or routed down a deliberately safe path. Between the two, you can sample and log. This is how human review capacity gets spent where it actually changes outcomes instead of being spread evenly across a queue.

Ticket routing and triage is the most common entry point: a choice answer picks the queue, a score answer sets priority, and the confidence determines whether the ticket auto-assigns or lands in a general inbox. Fraud and promo-abuse checks use the same structure against account and order state, where a high-confidence truth answer blocks automatically and a mid-range probability routes to manual review rather than silently approving. Order and shipping decisions — split shipments, address corrections, carrier selection, delivery-window promises — benefit from determinism most, because the same order state should never produce two different fulfillment paths on two different days.

Visual workflows lean on the same endpoint with a different answer type. Quality control on a production line sends frames and asks for a choice plus a box; warehouse monitoring asks whether a bay is occupied and where; traffic monitoring asks for a count tier and a region. The built-in boosters cover the preprocessing that would otherwise become its own service: human age estimation, AI-generated image detection, face detection and recognition, OCR, and depth and segmentation. Moderation queues combine text and image state in one call and get back a label with a confidence value that decides whether the item publishes, waits, or gets pulled.

For product and platform teams, the operational win is instrumentation. Because every response carries a confidence and the same input always yields the same output, you can chart the distribution of confidence per question over time, spot the questions where the model is chronically uncertain, and rewrite those questions or add state rather than guessing at prompt tweaks. Gating and scoring features — feature flags driven by behavioral signals, risk scores attached to accounts, eligibility checks at checkout — become ordinary typed calls with thresholds in config, reviewable in a pull request like any other business rule.