Technology

Decision API: Turning State Into Typed Answers Your Code Can Trust

Most teams that ask a model for a decision are really asking for a JSON blob and hoping for the best. The request goes out as prose, the response comes back as a string that may or may not parse, and somewhere in between a retry loop, a regex, and a fallback branch quietly become load-bearing parts of your architecture. That is not a decision API — that is a chat completion wearing a costume.

A genuine decision API treats decisions as a first-class data type. You send the current state of something, you ask a question that you defined in code, and you get back a value with a declared type, a declared range, and a calibrated confidence attached to it. The calling service can branch on that value immediately, or escalate it when confidence is low. No parsing, no interpretation, no “please respond only with valid JSON” pleading in a system prompt.

What a Decision API Is, and Why Structured Prompting Isn’t One

There are two common ways teams get decisions out of software today, and both have a sharp edge. The first is hand-written business rules: fast and deterministic, but brittle the moment the world stops matching your assumptions. Rules for ticket routing work until a customer writes in three languages about two unrelated problems. Fraud heuristics work until a promo campaign changes normal behavior for a week. Every rule you add to patch a failure makes the next failure harder to diagnose.

The second is a generative model with a JSON schema attached. It’s flexible, but it inherits everything you don’t want in a control flow: variable latency, non-deterministic sampling, structural drift, and confidence you cannot quantify because the model never really produced one. Ask the same question twice and you can get two different answers. Ask it to return a number between 1 and 10 and you have no idea whether a 7 means “probably fine” or “seventh option alphabetically.”

A decision API occupies the third position. It’s a decision engine purpose-built to return a small, fixed set of typed primitives rather than free-form text: a choice from your own labels, a score on an ordered scale, a truth expressed as a probability between 0.00 and 1.00, a number on a defined grid, or a point and box locating something in an image. DecisionNode’s model is a compact “System One” decision model rather than a generative one; it does not write sentences, it classifies, scores, and localizes. That constraint is the feature. Because the output space is bounded, the response is schema-valid by construction, and every answer carries a confidence value that means the same thing across requests.

For platform teams, this changes the shape of the integration. A decision call is a plain HTTPS request with a typed contract, so it slots into the same observability, retry, and rate-limiting patterns you already apply to any other internal service. You can version the questions. You can log the confidence. You can write a unit test that asserts the contract holds. None of that is comfortable when the “API” is a language model improvising a response shape.

Anatomy of a Decision Call: State In, Questions Defined in Code

The request format is deliberately boring, which is exactly what you want from infrastructure. You send state — plain text, structured JSON, or up to 16 images or video frames — to a single endpoint, POST /v1/decide, alongside the questions you have declared in code. The questions are part of your application, not part of a prompt template: you name the decision, pick its answer type, and supply the labels, scale, or probability framing. Answer types are narrow and explicit. A routing decision returns one of your categories. An abuse check returns a truth value you can compare to a threshold. A quality-control check on a production line returns a box around a defect.

Everything resolves in a single pass. There is no tool-call round trip, no multi-step chain, no need to ask twice and reconcile the answers. With decisionnode.com, that single POST handles the whole cycle: state plus questions in, typed answers out, each one stamped with a calibrated confidence. Because the model is deterministic — the same request returns the same answer — you can reproduce an incident from a logged request body instead of reconstructing a prompt and hoping sampling lands the same way.

Concrete examples make the shape clearer. A support platform sends a ticket body and requests a choice decision over its routing labels plus a truth decision for “does this need a human today.” A payments team sends order metadata and asks for a truth decision on promo abuse. A warehouse ops team sends a frame and asks for a box decision on a misplaced pallet. In each case the downstream code is ordinary: if confidence exceeds the threshold, act; otherwise, queue for review.

The multimodal part matters more than it sounds. Sending up to 16 images or frames alongside text means visual checks don’t require a separate CV pipeline, a separate deployment, and a separate set of thresholds. Image-based decisions — defect detection, crowding estimation, damage assessment — become another typed call in the same request flow, with the same confidence semantics as the text decisions next to them.

Latency, Calibrated Confidence, and Production Thresholds

Decision APIs live or die on two numbers: how fast the answer arrives, and how much you can trust it. On the first, DecisionNode runs two models. Flash answers in roughly 5 ms server-side and about 19 ms end to end, priced at $0.035 per 1M input tokens. MoE answers in roughly 9 ms at $0.042 per 1M input tokens, trading a few milliseconds for additional capability. Output tokens are free, batch discounts exist, and there is a free daily tier — which matters when you want to benchmark decision quality against your existing rules before committing to a migration.

Those figures put decision calls in a different budget category than chat completions. You stop designing around per-request cost anxiety and start designing around correctness: adding a second decision to a flow, or a third, costs almost nothing. For loops that need more than 10 decisions per second — drone flight control, robot pick-and-place, simulator stepping, continuous machine monitoring — sessions over WebSocket keep the loop tight without HTTP overhead per tick.

The second number is confidence, and it deserves its own engineering discipline. Because every answer returns a probability, thresholding becomes an explicit policy rather than an implicit guess. A fraud check might auto-block above 0.95, auto-approve below 0.05, and route the middle band to manual review — a band you tune with production data rather than intuition. That same pattern applies to moderation queues, shipping exceptions, and agent gating. Product and ops teams get a dial they can turn; developers get a branch they can test.

This is also where decision APIs fit naturally into AI agent architectures. An agent about to take an irreversible action — issuing a refund, dismissing an alert, moving a robot — can call a decision endpoint first and receive a typed answer plus confidence before committing. SDKs for TypeScript, Python, Go, and Ruby, plus curl, MCP tools, and webhooks, mean the integration is a few lines rather than a project. Optional boosters for age estimation, AI-generated image detection, face detection and recognition, OCR, depth, and segmentation extend the same contract into specialized perception tasks without new infrastructure.

For teams currently maintaining a rule engine that grows faster than it documents, the migration path is incremental: pick one brittle decision, express it as a typed question, log the confidence, and compare against the rules it replaces. The value shows up as fewer edge-case patches and a control flow that reads like software instead of a negotiation with a text generator.

Federico Rinaldi

Rosario-raised astrophotographer now stationed in Reykjavík chasing Northern Lights data. Fede’s posts hop from exoplanet discoveries to Argentinian folk guitar breakdowns. He flies drones in gale force winds—insurance forms handy—and translates astronomy jargon into plain Spanish.