Skip to content
DecisionNodeDecisionNdedocs
  • Guides
  • API reference
  • Examples
  • Playground

start here

  • QuickstartGet startedGet an API key, send one request with three questions, and branch your code on the typed answers. Plain HTTPS, no SDK to install.
  • POST /v1/decideAPI referenceAnswer typed questions about a state and optional images. One request, one buffered JSON response, one answer per question.
  • QuestionsConceptsQuestions say what to decide. Each one has a type that fixes the shape of its answer: a choice from your options, a score on your scale, a…
  • ConfidenceConceptsProbabilities are calibrated per question type, so a threshold means what it says.
  • ImagesConceptsSend images and text in the same request. The model reads printed and handwritten text, amounts, dates, objects and layout, and answers…
  • Pricing and billingYou pay for input tokens only. Output is free because the model generates no text.
↑↓ moveopen6 suggestions
Get API keyGet API key
DecisionNodeDecisionNde

Get started

  • Introduction
  • Quickstart
  • With coding agents
  • Examples

Concepts

  • State
  • Questions
  • Choice
  • Score
  • Truth
  • Number
  • Images
  • Confidence
  • Determinism

Models

  • DecisionNode-1.0
  • DecisionNode-1.0 Flash
  • Limits

Patterns

  • Confidence-gated routing
  • Fan-out
  • Guardrails
  • Control loopscomingcoming soon

API reference

  • POST/v1/decide
  • POST/v1/sessionscomingcoming soon
  • GET/v1/models
  • Errors
  • Rate limits

Pricing and billing

  • Pricing and billing

Policies

  • Responsible use

Migrate

  • Coming from a Jev-shaped API
  • Benchmarks
  • Pricing
  • Playground
Get API key
  • Guides
  • API reference
  • Examples
  • Playground

Get started

  • Introduction
  • Quickstart
  • With coding agents
  • Examples

Concepts

  • State
  • Questions
  • Choice
  • Score
  • Truth
  • Number
  • Images
  • Confidence
  • Determinism

Models

  • DecisionNode-1.0
  • DecisionNode-1.0 Flash
  • Limits

Patterns

  • Confidence-gated routing
  • Fan-out
  • Guardrails
  • Control loopscomingcoming soon

API reference

  • POST/v1/decide
  • POST/v1/sessionscomingcoming soon
  • GET/v1/models
  • Errors
  • Rate limits

Pricing and billing

  • Pricing and billing

Policies

  • Responsible use

Migrate

  • Coming from a Jev-shaped API
  1. docs
  2. /
  3. Patterns

Fan-out

Ask many questions about one input in one request, and run many inputs in parallel within your rate limits.

Many questions, one request#

The state is read once and shared by every question, so put every question about an input into one request. Ten questions cost the state's tokens once, not ten times, and all ten answers come from the same read of the input.

JSON
{
  "model": "decisionnode-flash-latest",
  "state": "Refund my order 4471 or I will dispute the charge with my bank.",
  "questions": {
    "refund_request": {
      "type": "truth",
      "instructions": "Is the customer asking for a refund?"
    },
    "chargeback_threat": {
      "type": "truth",
      "instructions": "Does the customer threaten a chargeback?"
    },
    "order_id_present": {
      "type": "truth",
      "instructions": "Does the message include an order number?"
    },
    "sentiment": {
      "type": "score",
      "criteria": ["calm", "annoyed", "angry", "furious"]
    },
    "language": {
      "type": "choice",
      "criteria": {
        "en": "English",
        "de": "German",
        "es": "Spanish",
        "other": "another language"
      }
    }
  }
}

Many inputs, in parallel#

Each request is independent, so a backlog parallelises cleanly. Bound the concurrency so you stay under your limits (by default 40 requests per second, provisional) and retry 429s after Retry-After.

import asyncio, os, httpx

LIMIT = asyncio.Semaphore(16)

async def decide(client, state):
    async with LIMIT:
        r = await client.post("https://api.decisionnode.com/v1/decide", json={
            "model": "decisionnode-flash-latest",
            "state": state,
            "questions": QUESTIONS,
        })
        r.raise_for_status()
        return r.json()["answers"]

async def run(states):
    headers = {"Authorization": f"Bearer {os.environ['DECISIONNODE_API_KEY']}"}
    async with httpx.AsyncClient(headers=headers, timeout=10) as client:
        return await asyncio.gather(*(decide(client, s) for s in states))

Ask everything in one request

The state is read once and shared by every question in the request, so ten questions on the same document cost little more than one. Group questions about the same input into one call instead of sending the document again.

previousConfidence-gated routingnextGuardrails

DecisionNode is built and run by Bynn Intelligence, Inc.

  • Home
  • Playground
  • Examples
  • Console
  • Responsible use
  • Terms
  • Acceptable use
  • Privacy
  • Data processing
  • Defence addendum
  • Cookies

on this page

  1. Many questions, one request
  2. Many inputs, in parallel