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. Concepts

Number

How many, or what value? One value on a grid you set (min, max and an optional step), with a calibrated probability for every value: the most probable value, the expected value and the confidence. A count in a photo, a year in a contract, the overdue invoices in a statement: one call, no text to parse.

on this page9 sections
  1. What it answers
  2. Request
  3. Response
  4. On text
  5. On an image
  6. The grid
  7. Reading the answer
  8. Beyond counting
  9. Billing
Number“How many invoices on this statement are overdue on the statement date?”

4(0.00)

the most probable value on a grid of 0 to 30with the probability of every value

  1. 0.84
0430
  • 2 0.01
  • 3 0.07
  • 4 0.84
  • 5 0.07
  • 6 0.01

number 4expected 3.99confidence 0.84your code sends the reminder for 4

A number question asks for one value on a grid you set. Above, a customer statement goes in as text and overdue comes back as 4 with probability 0.84, the full distribution over 0 to 30 beside it. It is the fourth type, next to Choice, Score and Truth, and it is read the same way: a typed answer with probabilities you can threshold.

Supported grids

The first release serves whole-number grids of up to 256 values; halves, decimals and wider grids follow.

What it answers#

  • Counts: cars in a drone frame, items on a shelf, pallets in a bay, overdue invoices in a statement, open findings in a report, steps in a plan another model wrote.
  • Values read off the input: the year a contract was signed, the days until a deadline, the percentage of a page that is tables, a price in a stated range.
  • Ratings and brackets: a review's rating out of ten (in halves once they follow the first release), an age bracket from a form, a severity from 1 to 5 when the levels are plain numbers.

Use a Score when each level has a meaning in words (routine, urgent, critical). Use a number when the answer is a quantity, and the values in between mean what they say.

Request#

JSON
{
  "cars": {
    "type": "number",
    "instructions": "How many cars are visible in the image?",
    "min": 0,
    "max": 50
  }
}
type"number"required
The question type.
instructionsstring
What to count or read, in one sentence. The same field as on every type.
minnumber
The lowest value the answer can take. Default 0.
maxnumber
The highest value, at least min. Default 255.
stepnumber
The spacing of the grid, above 0. Default 1: whole numbers, what the first release serves. 0.5 (halves) and 0.1 (one decimal) follow.

A number question uses no criteria: the grid is the set of answers. Keep min at or below max, and use a supported grid.

Response#

JSON
{
  "cars": {
    "type": "number",
    "number": 7,
    "expected": 6.97,
    "confidence": 0.77,
    "probabilities": {
      "5": 0.01,
      "6": 0.12,
      "7": 0.77,
      "8": 0.09,
      "9": 0.01
    }
  }
}
numbernumber
The most probable value of the grid. Always a value your grid allows.
expectednumber
The probability-weighted mean: a fractional estimate, even on a whole-number grid.
confidencenumber
The probability of number, from 0 to 1.
probabilitiesobject
Every grid value with a probability above 0.001, keyed by the value as a string ("7", "3.5"). They sum to 1, up to rounding.

expected = sum(v · p_v)

confidence = p_number

v
a value of the grid
p_v
the probability of v
p_number
the probability of the most probable value

Keys are written the shortest way: "7", never "7.0"; "3.5", never "3.50". Parse them as numbers before you sort: in most languages an object keeps "10" ahead of "2.5".

On text#

A statement as an accounting system exports it, with two number questions and a Choice in one request. overdue counts the invoices past due on the statement date (4); oldest_days reads how late the oldest one is (78, expected 78.08); reminder picks what to send. Every answer comes from one read of the statement.

POSThttps://api.decisionnode.com/v1/decide
Open playground
statement.txt
Customer statement
Account: Norrvik Supply AB (30-4471)
Statement date: 2026-10-01
Terms: net 30, amounts in EUR

Invoice   Issued      Due         Amount    Status
INV-2041  2026-06-15  2026-07-15  1,240.00  open
INV-2058  2026-07-03  2026-08-02    410.00  paid 2026-08-01
INV-2063  2026-07-21  2026-08-20    860.00  open
INV-2069  2026-07-29  2026-08-28    395.00  paid 2026-09-02
INV-2077  2026-08-06  2026-09-05  1,120.00  part paid, 300.00 open
INV-2081  2026-08-13  2026-09-12    640.00  open
INV-2090  2026-08-31  2026-09-30    780.00  paid 2026-09-29
INV-2094  2026-09-10  2026-10-10    520.00  open
INV-2102  2026-09-24  2026-10-24    915.00  open

The request carries that statement as its state, one JSON string. Below it reads as a placeholder so the questions stay in view; the copy button copies the full request, statement included, ready to run.

curl https://api.decisionnode.com/v1/decide \
  -H "Authorization: Bearer $DECISIONNODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "decisionnode-latest",
    "state": "<statement.txt, above>",
    "questions": {
      "overdue": {
        "type": "number",
        "instructions": "How many invoices on this statement are overdue on the statement date?",
        "min": 0,
        "max": 30
      },
      "oldest_days": {
        "type": "number",
        "instructions": "How many days past its due date is the oldest unpaid invoice?",
        "min": 0,
        "max": 180
      },
      "reminder": {
        "type": "choice",
        "instructions": "Which reminder should go out today?",
        "criteria": {
          "none": "nothing is overdue, send nothing",
          "friendly": "a friendly reminder for one recent invoice",
          "firm": "a firm reminder listing every overdue invoice",
          "final": "a final notice before the account is passed to collections"
        }
      }
    }
  }'
200 OK
{
  "model": "decisionnode-1.0",
  "answers": {
    "overdue": {
      "type": "number",
      "number": 4,
      "expected": 3.99,
      "confidence": 0.84,
      "probabilities": {
        "2": 0.01,
        "3": 0.07,
        "4": 0.84,
        "5": 0.07,
        "6": 0.01
      }
    },
    "oldest_days": {
      "type": "number",
      "number": 78,
      "expected": 78.08,
      "confidence": 0.61,
      "probabilities": {
        "75": 0.01,
        "76": 0.03,
        "77": 0.13,
        "78": 0.61,
        "79": 0.14,
        "80": 0.05,
        "81": 0.02,
        "82": 0.01
      }
    },
    "reminder": {
      "type": "choice",
      "choice": "firm",
      "confidence": 0.68,
      "probabilities": {
        "final": 0.19,
        "firm": 0.76,
        "friendly": 0.04,
        "none": 0.01
      }
    }
  },
  "usage": { "input_tokens": 445, "output_tokens": 0 }
}

On an image#

images[0] "frame"cars 7 (0.77)

Drone photo looking straight down on a parking row of ten marked bays: seven cars parked (white, black, silver, navy, red, graphite and champagne) and three empty bays, with a pavement, a lamp post and a grass verge below.

one read of the frame: the answer is the count and its distribution, not where each object is

state

Drone frame over row B4 of the north car park, camera pointing straight down.

question

cars How many cars are visible in the image?

input 328 tokensoutput 0, free

carsNumberexpected 6.97

7(0.00)

  1. 0.77
0750
  • 5 0.01
  • 6 0.12
  • 7 0.77
  • 8 0.09
  • 9 0.01

your code logs 7 cars at confidence 0.70 or more

How many cars are visible in the image? 7, probability 0.77, expected value 6.97.

The frame goes in images, the question asks for a count on a 0 to 50 grid, and the answer is a number your code can store, compare or act on. DecisionNode reads the image itself, in the same pass as the state and the question: there is no caption step in between.

POSThttps://api.decisionnode.com/v1/decide
Open playground
curl https://api.decisionnode.com/v1/decide \
  -H "Authorization: Bearer $DECISIONNODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "decisionnode-latest",
    "state": "Drone frame over row B4 of the north car park, camera pointing straight down.",
    "images": [
      { "id": "frame", "media_type": "image/jpeg", "data": "<base64>" }
    ],
    "questions": {
      "cars": {
        "type": "number",
        "instructions": "How many cars are visible in the image?",
        "min": 0,
        "max": 50
      }
    }
  }'

Give small objects the pixels they need

Count where every object is clearly visible. Many small objects need a sharper image, within the image limits on Limits (up to 10 MB each). Crop to the area that matters rather than sending the whole scene.

The grid#

min, max and step set every value the answer can take. Without them the grid is 0 to 255 in whole numbers. A grid of up to 256 values is answered as one question. A finer or wider grid is composed inside the same call (the whole part and the decimals, for example), and you still get one answer.

  • Cars in a frame

    Request
    "min": 0, "max": 50
    Values
    51
    First release
    Yes
  • Year a contract was signed

    Request
    "min": 1990, "max": 2026
    Values
    37
    First release
    Yes
  • Default range

    Request
    no min, max or step
    Values
    256
    First release
    Yes
  • Rating in halves

    Request
    "min": 0, "max": 5, "step": 0.5
    Values
    11
    First release
    Follows
  • Percentage, one decimal

    Request
    "min": 0, "max": 100, "step": 0.1
    Values
    1,001
    First release
    Follows
Grids and what they ask for
GridRequestValuesFirst release
Cars in a frame"min": 0, "max": 5051Yes
Year a contract was signed"min": 1990, "max": 202637Yes
Default rangeno min, max or step256Yes
Rating in halves"min": 0, "max": 5, "step": 0.511Follows
Percentage, one decimal"min": 0, "max": 100, "step": 0.11,001Follows

What the first release serves

The first release serves whole-number grids of up to 256 values; halves, decimals and wider grids follow. A grid this release does not serve (a step below 1, or more than 256 values) is refused with an api_usage_error that names the grid, and nothing is charged. See Errors.

Reading the answer#

  • Act on number when confidence clears the bar you set for this question. The frame above, 7 at 0.77, is a count your code can log, bill or route on.
  • Use expected where a fractional estimate is better than a whole one: averages across many frames, forecasts, sorting.
  • Read probabilities for the shape. A split answer, "probably 7, maybe 8", looks like {"6": 0.21, "7": 0.62, "8": 0.14}: number is 7 at 0.62, and adding its neighbours gives 0.97, the chance the true value is within one.

"Probably 7, maybe 8" never waits on anyone. Below your bar, your code escalates on its own: it re-checks with DecisionNode-⁠1.0 when the first call went to DecisionNode-⁠1.0 Flash, and if the answer is still split it takes the safe end of what is likely, such as planning for 8 cars rather than 7.

# decide(request) posts the request to /v1/decide and returns its answers
ACT_AT = 0.7   # per question, in config

def count_cars(request):
    cars = decide({**request, "model": "decisionnode-flash-latest"})["cars"]
    if cars["confidence"] < ACT_AT:     # probably 7, maybe 8: ask the full model
        cars = decide({**request, "model": "decisionnode-latest"})["cars"]
    if cars["confidence"] >= ACT_AT:
        return cars["number"]           # sure: act on it

    # still split: take the high end of the likely values, automatically
    likely = [float(v) for v, p in cars["probabilities"].items() if p >= 0.1]
    return int(max(likely))             # a whole-number grid: an int, like the sure path

Beyond counting#

  • Retail and logistics: items on a shelf, pallets in a bay, vehicles in a yard, from one camera frame.
  • Documents: overdue invoices in a statement, open findings in an audit report, mentions of a product in a thread.
  • Agriculture and inspection: fruit on a branch, defects on a surface, animals in a pen.
  • Checks on other models: how many steps a generated plan has, how many sources an answer cites.
  • Values, not counts: the year a document was issued, a percentage, a price in a stated range, and once finer grids follow, a rating in halves.

Billing#

A number question costs what a choice with as many options costs: its grid counts like one option per value. A 0 to 50 count is billed like a choice of 51 options. Images are priced as on every call, and batch jobs take number questions at half the price, like every other type. Output stays free. See Pricing and billing.

previousTruthnextImages

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. What it answers
  2. Request
  3. Response
  4. On text
  5. On an image
  6. The grid
  7. Reading the answer
  8. Beyond counting
  9. Billing