Decision API: The Typed Answer Layer Between Raw Context and Automated Action

Most teams that try to put “intelligence” into a product end up fighting the same two failure modes. Either they hand-write rule engines that grow into thousands of brittle conditionals nobody dares touch, or they prompt a chat model, ask it to “reply in JSON,” and then spend the next quarter building validators, retry loops, and hallucination guards around output that changes shape every other week. Both approaches push the hard part — deciding what the input actually means — into your codebase instead of behind an interface designed for it.

A decision API takes a different position. Rather than generating prose you have to interpret, it accepts structured state plus a question you define in code, and returns a typed, calibrated answer in a single pass. The response is something your application can branch on immediately: a label you supplied, a score on an ordered scale, a probability you can compare to a threshold, or a coordinate in an image. This article breaks down how the interface works, how to design contracts around it, and where the model earns its keep in production systems.

What a Decision API Is — and How It Differs From an LLM Endpoint

The core idea is narrowness by design. A generative endpoint is optimized for producing language; a decision endpoint is optimized for producing answer types with known semantics. You send state — plain text, JSON, or up to sixteen images and video frames — along with questions you have already defined, and the service returns schema-valid results whose shape is fixed by the question, not by the model’s mood. If your question is “which queue does this belong to?” the answer is one of the labels you enumerated. If it is “how confident are we that this return is fraudulent?” the answer is a number between 0.00 and 1.00 that behaves like a probability rather than a vibe.

The vocabulary of answer types matters because each one maps to a different piece of application logic. Choice answers drive routing and dispatch. Score answers drive ranking and tiering on an ordered scale. Truth answers are calibrated probabilities you can threshold. Number answers resolve to a value on a grid — useful for quantities, counts, and bucketed estimates. Point and box answers describe locations inside an image, which is what you need for inspection, spatial gating, and visual quality checks without building a bespoke detection pipeline. Together these cover most of the branching logic that today lives in sprawling rule files.

Two properties separate this from a wrapper around a chat model. The first is determinism: the same request returns the same answer, which means decision logic becomes unit-testable, replayable, and auditable. The second is calibration: every answer ships with a confidence value that reflects how often answers like it are correct in aggregate, which is precisely what you need to set a business threshold instead of a gut feeling. DecisionNode exposes this as a single HTTPS endpoint — decisionnode.com — with one request/response shape across all decision types, so the integration surface stays small even as the decisions get more interesting.

Designing the Contract: State, Questions, and Typed Answers

Working with a decision API is closer to designing a function signature than writing a prompt. The call is a POST to a single endpoint — /v1/decide in DecisionNode’s case — and the payload has two conceptual halves. The first is state: everything the decision depends on, packaged as text, as JSON, or as up to sixteen images or video frames. The second is the question set: the specific decisions you want resolved, defined in code so they can live in version control alongside the call site.

Because answers come back schema-valid on the first pass, the plumbing is minimal. There is no parse-and-retry loop, no regex extraction, no defensive check that the model returned a plausible label. Your handler receives the decision, reads the typed field, and moves on. For a support platform, that might mean sending the ticket body plus customer metadata and receiving a choice among your existing queue labels — billing, onboarding, incident, abuse — with a confidence attached. The handler routes above 0.90, and hands off to a human reviewer below it. The label list is yours; the endpoint never invents a queue you did not define.

Images work the same way, which is where the design starts to pay off for operations teams. A warehouse camera frame or a production line still can be submitted with a question like “is this pallet damaged?” and a truth answer comes back as a probability, or a box answer localizes the area of interest for a downstream crop or a human glance. Video frames follow the same contract, so short sequences can be evaluated without building a separate temporal pipeline.

Tooling is deliberately boring. SDKs exist for TypeScript, Python, Go, Ruby, and raw curl, alongside MCP tools, webhooks, and integrations aimed at AI agents that need to decide before acting rather than narrate their intentions. For agents in particular, a typed answer with a confidence score is a far better control signal than free-form reasoning, because the agent’s planner can gate its next action on a number instead of parsing its own prose.

Confidence-Gated Automation: Turning Calibrated Probabilities Into Control Flow

The most useful pattern with a decision API is not “replace the human.” It is threshold gating with a graceful fallback. Every answer carries a calibrated confidence, so your code has three options instead of two: act immediately above a threshold, escalate to a person below it, or take a cheap safe path in the middle — flag for re-check, request an extra frame, or route to a slower but more thorough pipeline. This is the difference between automation that fails loudly and automation that quietly absorbs the easy 80 percent while keeping the hard 20 percent in human hands.

Because the endpoint is deterministic, that gate is testable. You can capture real production requests, replay them against a candidate threshold change, and measure the shift in escalate-versus-automate volume before shipping. You can run a new question set in shadow mode next to the incumbent rules and diff the answers. Debugging stops being archaeology: the request, the answer, and the confidence are all recorded facts.

Performance and cost shape the threshold design too. DecisionNode offers two models — Flash at roughly 5 ms server-side and 19 ms end to end, priced at $0.035 per million input tokens, and MoE at about 9 ms and $0.042 per million input tokens. Output tokens are always free, batch discounts exist for offline scoring, and there is a free daily tier for development. Sub-20-millisecond end-to-end latency means the decision can sit inside a synchronous request path rather than behind an async job queue. For loops exceeding ten decisions per second — drones, robots, simulators, continuous machine monitoring — WebSocket sessions replace per-request HTTP overhead so the decision rate can scale with the control loop.

Where Decision APIs Pay Off: Routing, Fraud, Operations, and Agents

The patterns repeat across surprisingly different domains. In ticket routing and triage, a choice answer plus a score answer separates queue assignment from priority in a single call. In fraud and promo abuse, a truth answer gives risk a calibrated probability that plugs straight into existing risk tiers, and the determinism means an appeal or audit can be reconstructed exactly. In order and shipping decisions, choice and number answers resolve holds, splits, carrier selection, and exception handling without a rule tree per region.

Operations is where the visual answer types earn their place. Quality control on production lines can ask whether a unit passes and where the defect sits, with the box answer feeding a cropper or an operator review queue. Warehouse and traffic monitoring can evaluate frames on a schedule or a control loop and act on confidence above threshold. Moderation and gating follow the same shape: score the item, gate above a cutoff, escalate below it.

Where the base model needs a sharper read on a specific signal, boosters can be layered in — human age estimation, AI-generated image detection, face detection and recognition, OCR, depth, and segmentation. That keeps the request contract stable while adding precision in exactly the places regulatory or business requirements demand it. A KYC flow can combine an OCR booster for document fields with a face booster for presence checks, and still return one typed answer object to the application.

For teams building agents, the value is anti-fragility. An agent that calls a decision API before acting gets a label, a probability, and a confidence — three things its planner can reason about deterministically. The failure mode becomes “confidence was low, so we escalated” rather than “the model wrote something creative and we shipped it.” That is the real argument for the pattern: not that decisions become magical, but that they become ordinary, testable, typed values flowing through code that already knows how to handle them.