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, nothing to install.
  • POST /v1/decideAPI referenceAnswer typed questions about a state, optional images and video frames. 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 on the data we measure.
  • ImagesConceptsSend up to 16 images and text in the same request. The model reads printed and handwritten text, amounts, dates, objects and layout, and…
  • Batch jobsPatternsSend up to 10,000 requests in one file and collect the answers later, at a lower price than live calls.
  • Pricing and billingEvery workspace runs on a plan: Starter, Pro, Business or Dedicated.
↑↓ moveopen7 suggestions
Get API keyGet API key
DecisionNodeDecisionNde

Get started

  • Introduction
  • Quickstart
  • CLI
  • Playground
  • Console and keys
  • With coding agents
  • MCP server
  • Examples

Concepts

  • State
  • Questions
  • Choice
  • Score
  • Truth
  • Number
  • Points and boxes
  • Images
  • Video
  • Boosters
  • Collections
  • Confidence
  • Determinism
  • API keys

Knowledge

  • Overview
  • Documents
  • In a decision
  • Pricing and your data
  • When a rule does not appear

Models

  • DecisionNode
  • DecisionNode Flash
  • DecisionNode Edge
  • Limits
  • Versions
  • Dedicated capacity

Fine-tuning

  • Overview
  • Prepare your dataset
  • Upload and validation
  • Start a training run
  • Watch a run
  • The quality gate
  • Use your model
  • Limits and pricing

Patterns

  • Confidence-gated routing
  • Form router
  • Fan-out
  • Guardrails
  • Control loops
  • Batch jobs
  • Keys on devices
  • Bill your customers per device
  • Publishable keys

Integrations

  • Home Assistant
  • MQTT bridge
  • ROS 2

API reference

  • Overview
  • POST/v1/decide
  • POST/v1/systemone
  • GET/v1/models
  • POST/v1/uploads
  • /v1/keys
  • GET/v1/keys/{key_id}/usage
  • GET/v1/usage
  • POST/v1/credit
  • Errors
  • Safety check
  • Rate limits

Sessions API

  • Sessions overview
  • POSTOpen a session
  • WSStream frames
  • DELEnd a session

Collections API

  • Overview
  • POSTCreate a collection
  • GETList collections
  • GETRetrieve a collection
  • DELDelete a collection
  • POSTEnroll a face
  • GETList items
  • PATCHUpdate an item
  • DELDelete an item
  • POSTAdd a document
  • PUTReplace a document
  • GETRetrieve an item
  • GETList passages
  • DELDelete failed documents
  • POSTSearch a knowledge base

Batch API

  • The batch object
  • POSTCreate a batch
  • POSTAdd requests
  • POSTFinalize a batch
  • GETRetrieve a batch
  • GETGet batch results
  • POSTCancel a batch
  • GETList batches

Pricing and billing

  • Pricing and billing
  • Refer & earn

Policies

  • Responsible use
  • Data and privacy
  • Benchmarks
  • Pricing
  • Playground
Get API key
  • Guides
  • API reference
  • Examples
  • Playground

Get started

  • Introduction
  • Quickstart
  • CLI
  • Playground
  • Console and keys
  • With coding agents
  • MCP server
  • Examples

Concepts

  • State
  • Questions
  • Choice
  • Score
  • Truth
  • Number
  • Points and boxes
  • Images
  • Video
  • Boosters
  • Collections
  • Confidence
  • Determinism
  • API keys

Knowledge

  • Overview
  • Documents
  • In a decision
  • Pricing and your data
  • When a rule does not appear

Models

  • DecisionNode
  • DecisionNode Flash
  • DecisionNode Edge
  • Limits
  • Versions
  • Dedicated capacity

Fine-tuning

  • Overview
  • Prepare your dataset
  • Upload and validation
  • Start a training run
  • Watch a run
  • The quality gate
  • Use your model
  • Limits and pricing

Patterns

  • Confidence-gated routing
  • Form router
  • Fan-out
  • Guardrails
  • Control loops
  • Batch jobs
  • Keys on devices
  • Bill your customers per device
  • Publishable keys

Integrations

  • Home Assistant
  • MQTT bridge
  • ROS 2

API reference

  • Overview
  • POST/v1/decide
  • POST/v1/systemone
  • GET/v1/models
  • POST/v1/uploads
  • /v1/keys
  • GET/v1/keys/{key_id}/usage
  • GET/v1/usage
  • POST/v1/credit
  • Errors
  • Safety check
  • Rate limits

Sessions API

  • Sessions overview
  • POSTOpen a session
  • WSStream frames
  • DELEnd a session

Collections API

  • Overview
  • POSTCreate a collection
  • GETList collections
  • GETRetrieve a collection
  • DELDelete a collection
  • POSTEnroll a face
  • GETList items
  • PATCHUpdate an item
  • DELDelete an item
  • POSTAdd a document
  • PUTReplace a document
  • GETRetrieve an item
  • GETList passages
  • DELDelete failed documents
  • POSTSearch a knowledge base

Batch API

  • The batch object
  • POSTCreate a batch
  • POSTAdd requests
  • POSTFinalize a batch
  • GETRetrieve a batch
  • GETGet batch results
  • POSTCancel a batch
  • GETList batches

Pricing and billing

  • Pricing and billing
  • Refer & earn

Policies

  • Responsible use
  • Data and privacy
  1. docs
  2. /
  3. Get started

With coding agents

DecisionNode is one HTTPS call, so a coding agent can write the integration for you once it knows the shape. Paste the one-line prompt below and the agent fetches our setup guide, or give your own agents a decide tool.

on this page3 sections
  1. A prompt for your coding agent
  2. Give your agents a decide tool
  3. Ask before you act

A prompt for your coding agent#

Paste this one line into the agent that works in your repository, then tell it what to decide: "route new tickets in support/inbox.ts with DecisionNode". The agent fetches the setup guide and follows it: your key from the environment, the docs MCP server, the llms files, the SDK for your language or plain HTTPS, the endpoint and the request and response shapes, the rules that keep the integration acting on its own, and one call to check it all works.

Agent prompt
Set up DecisionNode for me: fetch and follow this guide https://decisionnode.com/agent-setup.md

Keep it in the repository

Save the line in the agent instructions file your tools read, so every session starts from the same guide. The guide is Markdown at /agent-setup.md, written from these docs, so it changes when they do. The key facts and a map of these docs are at /llms.txt, the whole documentation as Markdown at /llms-full.txt, and an agent that speaks MCP can search and read these pages through the MCP server.

Give your agents a decide tool#

Agents act on judgments: is this email a refund request, is this command safe to run, does this reply answer the question. Expose DecisionNode as a tool and the agent gets a typed, calibrated answer instead of its own guess. Most agent runtimes accept a tool described with JSON Schema, like this one.

Tool definition
{
  "name": "decide",
  "description": "Ask DecisionNode a typed question about some input, optionally with images. Returns a choice, a score, the probability that a statement is true, or a number on a grid, all calibrated. Use it before acting on a judgment.",
  "input_schema": {
    "type": "object",
    "properties": {
      "state": {
        "type": "string",
        "description": "The text or JSON to decide about"
      },
      "question": {
        "type": "string",
        "description": "What to decide, in one sentence"
      },
      "type": {
        "type": "string",
        "enum": ["choice", "score", "truth", "number"]
      },
      "options": {
        "type": "array",
        "items": { "type": "string" },
        "description": "Options for choice, levels low to high for score"
      },
      "min": {
        "type": "number",
        "description": "Number only: the lowest value"
      },
      "max": {
        "type": "number",
        "description": "Number only: the highest value"
      },
      "images": {
        "type": "array",
        "description": "Up to 16 images to read with the state, each as base64 data or an https url, with a short name as its id. The question names an image by its id in backticks, or by its number from 1 in this order",
        "items": {
          "type": "object",
          "properties": {
            "id": { "type": "string" },
            "media_type": {
              "type": "string",
              "enum": ["image/jpeg", "image/png", "image/webp"]
            },
            "data": {
              "type": "string",
              "description": "Base64 bytes, no data: prefix"
            },
            "url": {
              "type": "string",
              "description": "An https URL, instead of data"
            }
          },
          "required": ["id"]
        }
      }
    },
    "required": ["state", "question", "type"]
  }
}
Tool handler
type DecideInput = {
  state: string;
  question: string;
  type: "choice" | "score" | "truth" | "number";
  options?: string[];
  min?: number;
  max?: number;
  images?: { id: string; media_type?: string; data?: string; url?: string }[];
};

function questionOf(input: DecideInput) {
  const base = { type: input.type, instructions: input.question };
  switch (input.type) {
    case "choice":
      return { ...base, criteria: Object.fromEntries((input.options ?? []).map((o) => [o, o])) };
    case "score":
      return { ...base, criteria: input.options ?? [] };
    case "number":
      return { ...base, min: input.min, max: input.max };
    default:
      return base;
  }
}

export async function decide(input: DecideInput, apiKey: string) {
  const response = await fetch("https://api.decisionnode.com/v1/decide", {
    method: "POST",
    headers: { Authorization: `Bearer ${apiKey}`, "Content-Type": "application/json" },
    body: JSON.stringify({
      model: "decisionnode-flash",
      state: input.state,
      images: input.images,
      questions: { answer: questionOf(input) },
    }),
    signal: AbortSignal.timeout(10_000),
  });
  if (!response.ok) {
    // the agent sees why, and can fix its own call on a 400 or 422
    const reason = response.headers.get("x-decisionnode-error") ?? "";
    throw new Error(`decide failed: ${response.status} ${reason}`);
  }
  const { answers } = await response.json();
  return answers.answer; // the typed answer goes back to the agent as the tool result
}

Fields the agent leaves out reach the API as missing, which is the same as null: a number question without min and max uses the 0 to 255 grid, and a call without images is a text-only call. Run the handler on your server, where the key lives; retries belong in the code around it, as in Errors. For an MCP client, the DecisionNode MCP server already exposes these tools; an MCP server of your own exposes this one the same way: register decide with this schema and answer each call with the handler.

Ask before you act#

The most useful place for the tool is right before an agent does something it cannot undo. Pass the proposed action as the state and ask a Truth question; run it only when the probability clears your bar. Guardrails has the full recipe.

previousConsole, keys and membersnextMCP server

DecisionNode is built and run by Bynn Intelligence, Inc.

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

on this page

  1. A prompt for your coding agent
  2. Give your agents a decide tool
  3. Ask before you act