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

Boosters

A booster is a specialist model that reads your request's images before the decision and hands its reading to the model as evidence. Name up to 4 in boosters: age, ai_generated, face_detection, face_recognition, ocr, bynn_depth, bynn_segment and knowledge. The readings come back in evidence, and each booster is priced per picture it reads: Human Age $0.024, AI-generated $0.006, Face detection $0.001, Face recognition from $0.001, OCR $0.0015, Depth Vision free, Segment Vision $0.001 and Knowledge $0.001 a request.

on this page14 sections
  1. Add a booster to a request
  2. Options
  3. Settings
  4. What comes back
  5. Boxes
  6. Steering OCR with its prompt
  7. Document parsing
  8. Information extraction
  9. Controlling the output
  10. Distances with Depth Vision
  11. Finding things with Segment Vision
  12. Writing the prompt
  13. Segment Vision's refusals
  14. Your own documents with Knowledge
  15. How the model uses a reading
  16. When a booster cannot read
  17. Room for readings
  18. Time
  19. What a booster costs
  20. Turning a booster off
  21. Where boosters work
  22. Errors
  23. What a booster never does

Some facts in a picture are hard for a general model, such as how old a person looks or whether an image generator made the photo. A booster is a model trained for exactly one such reading. It reads the request's images first, and its reading is added to what DecisionNode reads. DecisionNode still answers every question itself, in the shapes you asked for.

  • Human Age (age). Estimates a person's age from a face in the picture, using the agemin.com age estimation model, ranked #1 by NIST for Child Online Safety (ages 13 to 16) on true positive rate. View the NIST report card · NIST results.
  • AI-generated (ai_generated). Whether a picture was made by an image generator, and which kind, using Trinity, the state-of-the-art AI image detection model from detector24.ai.
  • Face detection (face_detection). Finds the faces in a picture: how many it shows and where each one is, with a box and a confidence per face, from Bynn's face detection model.
  • Face recognition (face_recognition). Matches the faces in a picture against a collection: one of your own, enrolled through the API or the console, or the public celebrities collection. Each match carries a score and the item's reference, with your label or the public figure's name, and never a picture.
  • OCR (ocr). The text a picture shows, read by Bynn OCR: all of it by default, or what a prompt asks for, such as a formula in LaTeX, a table in HTML or Markdown, or the fields of a JSON schema. Full support for English and Chinese; other languages need a prompt that names them.
  • Depth Vision (bynn_depth). Distance in meters to what's in the picture: the nearest obstacle straight ahead, seven directions from left to right, and a grid of up to 16 by 16 cells.
  • Segment Vision (bynn_segment). Finds what you name in words in the picture: each match's outline, box and centre, and with depth on, its distance and size in meters.
  • Knowledge (knowledge). Applies your own documents: the passages of one of your knowledge bases that fit the request are read with it as facts and rules, and cited in the answer's evidence.
  • age

    Reads
    A picture of a person
    Adds to the decision
    How old the person is, with a range and a confidence. The largest face in the picture is read.
    Per picture
    $0.024
    Time budget
    2 s, up to 5 s
  • ai_generated

    Reads
    Any picture
    Adds to the decision
    How likely the picture was made by an image generator, which generator most likely when it reads as generated, and whether the file carries trusted Content Credentials (C2PA) and who signed them.
    Per picture
    $0.006
    Time budget
    5 s, up to 6 s
  • face_detection

    Reads
    Any picture
    Adds to the decision
    How many faces the picture shows and where, a box and a confidence for each. A picture with no face reads 0 faces.
    Per picture
    $0.001
    Time budget
    2 s, up to 5 s
  • face_recognition

    Reads
    A picture of a person
    Adds to the decision
    Which faces in the picture match the collection the request names: for each, a box, a score and the matched item's reference, with your label or the public figure's name. A match is evidence, never an answer.
    Per picture
    $0.001 for your own collection and $0.001 for celebrities
    Time budget
    2 s, up to 5 s
  • ocr

    Reads
    Any picture
    Adds to the decision
    The picture's text, whole, in the format the prompt asks for.
    Per picture
    $0.0015
    Time budget
    12 s, up to 12 s
  • bynn_depth

    Reads
    Any picture
    Adds to the decision
    How far away things are, in meters: straight ahead, in seven directions and cell by cell.
    Per picture
    free
    Time budget
    800 ms, up to 5 s
  • bynn_segment

    Reads
    Any picture
    Adds to the decision
    Where the things you name are: each one's outline, box and centre, and with depth on, how far away and how large it is.
    Per picture
    $0.001
    Time budget
    1.5 s, up to 5 s
  • knowledge

    Reads
    One of your knowledge bases, no picture
    Adds to the decision
    The passages of your policies, manuals and instructions that apply to this request, pinned ones always, each cited by its document and position.
    Per picture
    $0.001 a request
    Time budget
    800 ms, up to 5 s
The boosters
BoosterReadsAdds to the decisionPer pictureTime budget
ageA picture of a personHow old the person is, with a range and a confidence. The largest face in the picture is read.$0.0242 s, up to 5 s
ai_generatedAny pictureHow likely the picture was made by an image generator, which generator most likely when it reads as generated, and whether the file carries trusted Content Credentials (C2PA) and who signed them.$0.0065 s, up to 6 s
face_detectionAny pictureHow many faces the picture shows and where, a box and a confidence for each. A picture with no face reads 0 faces.$0.0012 s, up to 5 s
face_recognitionA picture of a personWhich faces in the picture match the collection the request names: for each, a box, a score and the matched item's reference, with your label or the public figure's name. A match is evidence, never an answer.$0.001 for your own collection and $0.001 for celebrities2 s, up to 5 s
ocrAny pictureThe picture's text, whole, in the format the prompt asks for.$0.001512 s, up to 12 s
bynn_depthAny pictureHow far away things are, in meters: straight ahead, in seven directions and cell by cell.free800 ms, up to 5 s
bynn_segmentAny pictureWhere the things you name are: each one's outline, box and centre, and with depth on, how far away and how large it is.$0.0011.5 s, up to 5 s
knowledgeOne of your knowledge bases, no pictureThe passages of your policies, manuals and instructions that apply to this request, pinned ones always, each cited by its document and position.$0.001 a request800 ms, up to 5 s

Add a booster to a request#

List the boosters by name in a top-level boosters array, beside images and questions: "boosters": ["age", "ai_generated"]. Each one reads every image of the request.

curl https://api.decisionnode.com/v1/decide \
  -H "Authorization: Bearer $DECISIONNODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "decisionnode",
    "state": {
      "account": {
        "id": "acc_8812",
        "product": "wine delivery",
        "country": "SE"
      }
    },
    "images": [
      {
        "id": "selfie",
        "url": "https://files.example.com/signups/8812/selfie.jpg"
      }
    ],
    "boosters": ["age", "ai_generated"],
    "questions": {
      "adult": {
        "type": "truth",
        "instructions": "Is the person in `selfie` 18 or older?"
      },
      "real_photo": {
        "type": "truth",
        "instructions": "Is `selfie` a real photograph, not an AI-generated picture?"
      }
    }
  }'
  • Up to 4 boosters a request, each named once. null and [] mean no boosters.
  • Boosters belong to the request, not to a question. Every question sees every reading, so say in each question which image it is about, by its id.
  • Every image form works: data, url and upload_id. A booster reads exactly the bytes the decision reads.
  • A request without boosters is answered exactly as before: nothing is added to it and nothing extra is billed.

Options#

Write a booster as an object instead of its name when it should read only some images, or when the request must not run without it. Below, age reads only the selfie and ai_generated reads both pictures and must answer: 3 booster calls, $0.036.

JSON
{
  "images": [
    {
      "id": "selfie",
      "url": "https://files.example.com/signups/8812/selfie.jpg"
    },
    {
      "id": "document",
      "url": "https://files.example.com/signups/8812/document.jpg"
    }
  ],
  "boosters": [
    {
      "name": "age",
      "images": ["selfie"]
    },
    { "name": "ai_generated", "require": true }
  ]
}

A booster object

namestringrequired
The booster's name: age, ai_generated, face_detection, face_recognition, ocr, bynn_depth, bynn_segment or knowledge. A bare string such as "age" is the same as {"name": "age"}.
imagesarray of image idsdefault every image
The ids of the request's images this booster reads. Leave it out to read them all. Naming fewer images costs fewer booster calls.
timeout_msintegerdefault the booster's budget
This booster's time budget for this request, in milliseconds, from 100 to its ceiling in the table above. Longer lets a slow picture finish; shorter keeps a fast request fast. Outside that range, or not an integer, the request is a 422 and nothing runs. See Time.
requirebooleandefault false
true: if this booster fails or runs out of time, the request fails with 529 booster_unavailable, which you retry. false: the decision runs without that reading, and evidence says why.
optionsobject
Settings of a booster that takes any, listed under Settings. Another key, or a key on a booster that takes none, is a 400.

Settings#

Some boosters take settings, in the booster object's options:

  • ocr prompt: what to read and how to write it, at most 2,000 characters; left out, "Text Recognition:". See Steering OCR with its prompt.
  • face_recognition collection: required, the collection to search: celebrities, or the id of one of your own collections.
  • face_recognition threshold: a number from 0 to 1; a face scored below it is no match. Left out, 0.5.
  • bynn_depth grid_size: the grid's cells per side, a whole number from 2 to 16; left out, 8. See Distances with Depth Vision.
  • bynn_segment prompt: required, what to find in words: a phrase, or a list of 1 to 4 phrases of at most 120 characters each; and max_instances, min_score, polygon_points and depth. See Finding things with Segment Vision.
Settings in a request
{
  "boosters": [
    {
      "name": "ocr",
      "options": { "prompt": "Table Recognition:" }
    }
  ]
}

What comes back#

The answers keep their shapes. The body gains evidence, one entry per booster you named, in your order, and usage gains two counts. The response also carries the x-decisionnode-boosters header.

{
  "model": "decisionnode-main-0.9.1-rc1",
  "answers": {
    "adult": { "type": "truth", "truth": 0.97 },
    "real_photo": { "type": "truth", "truth": 0.96 }
  },
  "evidence": {
    "age": {
      "version": "age-v3",
      "status": "ok",
      "latency_ms": 188,
      "billed_calls": 1,
      "results": [
        {
          "image": "selfie",
          "age_years": 34,
          "low": 29,
          "high": 39,
          "confidence": 0.88,
          "faces": 1
        }
      ]
    },
    "ai_generated": {
      "version": "ai_generated-v2",
      "status": "ok",
      "latency_ms": 342,
      "billed_calls": 1,
      "results": [
        {
          "image": "selfie",
          "generated": 0.03,
          "confidence": 0.94,
          "method": "inference",
          "top_generator": null,
          "c2pa_signer": null
        }
      ]
    }
  },
  "usage": {
    "input_tokens": 1121,
    "output_tokens": 0,
    "booster_tokens": 46,
    "boosters": 2,
    "cost": {
      "usd": 0.03009633,
      "model_usd": 0.00009633,
      "boosters_usd": 0.03,
      "free_tier": false
    }
  }
}

evidence.<booster>

versionstring
The version of the booster that read, such as age-v3. Log it with the decision.
statusstring
ok, timeout, error, skipped. See When a booster cannot read.
latency_msinteger
How long the booster took.
billed_callsinteger
The calls of this booster billed on this request: one per image it read with status ok, every time a request uses it; 0 only for a booster that timed out, failed or was skipped, a picture it could not decode, and a refused request. Times the booster's price, it is what the booster cost.
resultsarray
One entry per picture, named by image. On ok, each carries the booster's fields, or "readable": false for a picture it could not decode. On timeout or error, one bare {"image": id} per picture it was meant to read. On skipped, empty.
Reading evidence
body = response.json()
for name, entry in body.get("evidence", {}).items():
    if entry["status"] != "ok":
        log.warning("booster %s: %s", name, entry["status"])  # decided without it
    for reading in entry["results"]:
        save_reading(decision_id, name, entry["version"], reading)
  • age

    Fields
    age_years, low, high, confidence, faces
  • ai_generated

    Fields
    generated, confidence, method, top_generator, c2pa_signer, c2pa
  • face_detection

    Fields
    faces, detections
  • face_recognition

    Fields
    faces, collection_name, matches
  • ocr

    Fields
    text, truncated
  • bynn_depth

    Fields
    ahead, directions, ground, grid_rows, grid_cols, grid, depth_min, depth_max, depth_median, width, height
  • bynn_segment

    Fields
    prompts, instances, depth_source, assumed_hfov_deg, width, height
  • knowledge

    Fields
    collection, collection_name, corpus, query, budget, scope, warnings, passages, omitted, pending_items, search, truncated
What each booster reports per image (knowledge: once a request)
BoosterFields
ageage_years, low, high, confidence, faces
ai_generatedgenerated, confidence, method, top_generator, c2pa_signer, c2pa
face_detectionfaces, detections
face_recognitionfaces, collection_name, matches
ocrtext, truncated
bynn_depthahead, directions, ground, grid_rows, grid_cols, grid, depth_min, depth_max, depth_median, width, height
bynn_segmentprompts, instances, depth_source, assumed_hfov_deg, width, height
knowledgecollection, collection_name, corpus, query, budget, scope, warnings, passages, omitted, pending_items, search, truncated

age reads the largest face in a picture: age_years with a likely range from low to high, a confidence, and faces, how many faces it found. A picture with no face comes back with faces 0 and no age. ai_generated gives generated, the probability that an image generator made the picture, and method: inference when it read the pixels, c2pa when the file's trusted Content Credentials declare it generated or edited by AI, which overrides the pixels and names the signer in c2pa_signer. top_generator names the likeliest generator only when a reading from the pixels says likely generated; a photograph like the selfie above reads null. Credentials that validate but are not trusted add "c2pa": "untrusted" and change nothing else. Every field and value is on the API reference.

face_detection gives faces, how many faces it found, and detections, one box and confidence per face, most confident first, at most 64; faces still counts them all. The list is always there, [] when it is empty.

face_recognition searches up to 64 faces a picture, the most certain first, each one the detector is at least 0.7 sure of and at least 1,000 square pixels in size. It gives faces, the faces it searched, and matches, one box, score, collection, collection_name and reference per face that matches an item of the collection, best first, at most 64, with label for your own item that has one and name for a public figure. A match's collection_name is your collection's name (its col_ id when it has none) or a public collection's id, and a search of your own collection carries it on the picture's result too. The model reads it, so a question can name the collection: "Is this person in our staff collection?" works on a collection named staff. It is present only on a reading from a worker on the dn-evidence-4 format, so read it as optional. matches is always there, [] when nothing matched. How collections are made and searched is on Collections.

  • More than 1,024 faces in one picture fail a face_recognition search: the booster's status is error and nothing is billed.
  • A search that cannot finish in its time, such as one of a very large collection whose search index is not ready yet, is the booster's timeout or error, unbilled. With require: true either is a 529.
  • A face_recognition reading is never reused: it is not kept in the cache of readings, and a request that names it is never answered from the cache of repeated requests.

ocr gives text, the picture's text in the format the prompt asks for, and truncated. The whole reading goes to the model as evidence, so a dense page adds many input tokens. When the readings would not fit the request's context, the model reads them cut at their end and truncated is true; text in the response stays whole. ocr reads pictures (JPEG, PNG or WebP), not PDF files: send a document's pages as images. The model answers no open question such as "what is the total?": when you need the words themselves, read text from evidence, and ask the model the decision.

Readings of the other boosters
{
  "image": "lobby",
  "faces": 2,
  "detections": [
    {
      "box": { "x1": 412, "y1": 188, "x2": 538, "y2": 352 },
      "confidence": 0.98
    },
    {
      "box": { "x1": 901, "y1": 240, "x2": 987, "y2": 351 },
      "confidence": 0.91
    }
  ]
}

Boxes#

A booster's box has the corners x1, y1 (top left) and x2, y2 (bottom right), as a box answer writes them. They are whole pixels of the picture as you sent it, after its EXIF orientation, clamped to its edges. When every point and box question of the request asks for units: "normalized", they are fractions of the width and the height with 4 decimals. A request with no point or box question gets pixels, and so does one where any of them asks for pixels, so a booster's box and the model's own always share units. See Points and boxes.

  • usage.boosters

    What it counts
    The booster calls billed for this request: one per booster and image read
  • usage.booster_tokens

    What it counts
    The part of input_tokens the readings take, counted once per request
The usage counts a boosted request adds
FieldWhat it counts
usage.boostersThe booster calls billed for this request: one per booster and image read
usage.booster_tokensThe part of input_tokens the readings take, counted once per request

Steering OCR with its prompt#

ocr, Bynn OCR, has one control: its prompt. There is no separate format option. The prompt says what to read and how to write it, and the reading's text comes back in that form. A prompt is at most 2,000 characters, and a request without one reads with "Text Recognition:": all the visible text, plain.

Document parsing#

  • "Text Recognition:" (the default)

    Output
    Plain text
    For
    General OCR: all the visible text, with no formatting
  • "Formula Recognition:"

    Output
    LaTeX
    For
    Formulas and equations
  • "Table Recognition:"

    Output
    HTML or Markdown
    For
    Tables, keeping their rows, columns and structure
The built-in task prompts
PromptOutputFor
"Text Recognition:" (the default)Plain textGeneral OCR: all the visible text, with no formatting
"Formula Recognition:"LaTeXFormulas and equations
"Table Recognition:"HTML or MarkdownTables, keeping their rows, columns and structure
A table read with Table Recognition:
{
  "boosters": [
    {
      "name": "ocr",
      "options": { "prompt": "Table Recognition:" }
    }
  ]
}

Information extraction#

Put a JSON schema in the prompt, the fields you want with empty values, and the reading's text is that JSON with the fields filled in from the picture; a field it cannot find is left out. A plain instruction that names the fields works the same way. In the request the schema is a string, so its quotes are escaped.

An ID card
{
  "id_number": "",
  "last_name": "",
  "first_name": "",
  "date_of_birth": "",
  "address": { "street": "", "city": "", "postal_code": "", "country": "" },
  "dates": { "issue": "", "expiry": "" },
  "sex": ""
}
A receipt
{
  "boosters": [
    {
      "name": "ocr",
      "options": {
        "prompt": "Extract as JSON with fields: store, date, items, total"
      }
    }
  ]
}
  • Name exactly the fields you need. Every field asked for is read and written into the evidence, so a short list keeps the reading small and the decision's input with it.
  • The reading is evidence text, not a typed answer. The decision reads it as text. A client that parses text itself should validate it as it would any outside input: it may not be valid JSON, and a field may be missing or empty. For a decision about the document, ask the model a question; for the values themselves, read text from evidence.

Controlling the output#

  • The prompt is the only control. There is no option for a format, a language or a length: say what you want in the prompt.
  • The built-in task prompts are the most predictable. A prompt of your own is more flexible, but may add formatting of its own, such as Markdown around a table or a code fence around JSON. When it does, switch to the built-in prompt that matches the content.
  • Languages. English and Chinese are read in full; for another language, name the language in the prompt.
  • Limits. A prompt is at most 2,000 characters, longer is a 400 api_usage_error. A reading holds at most 128 KiB of text, and a request's readings at most 1 MiB; past either, the booster's error (see Room for readings). Bynn OCR has a time budget of 12 s, so give a request naming it a client timeout of 30 seconds per attempt and do not retry it after a timeout.

Distances with Depth Vision#

bynn_depth reads how far away things are in a picture, in meters, for robots, drones and other machines that move: the nearest obstacle straight ahead, the same in seven directions, and a grid of the whole picture. Name it like the other boosters, with grid_size in options for a grid other than 8 by 8. It is free (a picture it cannot decode is never billed). Its time budget is 800 ms, up to 5 s with timeout_ms.

  • Straight ahead. ahead is the nearest obstacle in the middle third of the picture's width, read at a low percentile so one noisy pixel does not count; null when there is none, such as open space or sky.
  • Seven directions. directions is the same reading in seven equal vertical strips of the picture, left to right, each meters or null.
  • The floor is left out. The floor or ground in front of a forward camera is always the nearest surface, so when one is found it is left out of ahead and directions, and ground is true. With ground false, none was found and they include everything.
  • The grid. grid is grid_size rows of grid_size cells, row by row from the top left of the picture turned upright, each cell the median distance of its part of the picture. depth_min, depth_max and depth_median sum up the whole picture.
  • Meters to two decimals. Every distance is in meters, from 0 to 1,000. The model reads the reading as evidence; a larger grid gives it more to read, about 300 input tokens at 8 by 8 and over 1,000 at 16 by 16.

Estimates, never a safety stop

Depth Vision's distances are estimates from one picture, meant for decisions and planning, never as a safety stop: a robot or drone uses stereo cameras or LiDAR for that. How often the models answer drone distance questions right with it, and without it, is on the Benchmarks page; real photos taken from high up are the hardest case.

Finding things with Segment Vision#

bynn_segment finds what you name in words in a picture, such as a landing pad, a gate or a person, and for each match gives its outline, box and centre, and with depth on, how far away it is and how large, in meters. Name it with prompt in options. It costs $0.001 a picture read, one call per picture read with depth on or off (a picture it cannot decode is never billed). Its time budget is 1.5 s, up to 5 s with timeout_ms.

A request and its reading
{
  "boosters": [
    {
      "name": "bynn_segment",
      "options": {
        "prompt": ["landing pad", "person"],
        "max_instances": 8,
        "min_score": 0.25,
        "polygon_points": 24,
        "depth": true
      }
    }
  ]
}
  • prompt

    Values
    Required. A phrase, or a list of 1 to 4 phrases of at most 120 characters each. | and control characters become spaces, white space folds to one space, the ends are trimmed, and empty phrases and repeats (whatever their case) are dropped
    Default
    None, it is required
  • max_instances

    Values
    At most this many found in a picture, 1 to 16
    Default
    8
  • min_score

    Values
    A match scored below it is left out, 0 to 1
    Default
    0.25
  • polygon_points

    Values
    Points in each outline, 3 to 64
    Default
    24
  • depth

    Values
    true or false: distances and sizes in meters
    Default
    true
Segment Vision's options
OptionValuesDefault
promptRequired. A phrase, or a list of 1 to 4 phrases of at most 120 characters each. | and control characters become spaces, white space folds to one space, the ends are trimmed, and empty phrases and repeats (whatever their case) are droppedNone, it is required
max_instancesAt most this many found in a picture, 1 to 168
min_scoreA match scored below it is left out, 0 to 10.25
polygon_pointsPoints in each outline, 3 to 6424
depthtrue or false: distances and sizes in meterstrue

Its reading, per picture

width, heightinteger
The picture's size in pixels, turned upright.
promptsarray
The phrases searched for, cleaned as above.
instancesarray
What was found, best score first, at most max_instances; [] when nothing is.
labelstring
The phrase it matched.
scorenumber
How well it matches, 0 to 1.
boxarray
[x1, y1, x2, y2], from its top left to its bottom right.
polygonarray
Its outline, [[x, y], ...], at most polygon_points points.
areanumber
Its share of the picture, 0 to 1.
centroidarray
[x, y], the middle of its outline.
openingobject or null
The largest hole it encloses, such as a gate's, a doorway's or a ring's: polygon, centroid, width, height, offset ([dx, dy] from the box's centre, -1 to 1) and area; null when it has none.
depthobject or null
Meters along the camera's axis: median inside the outline, opening_median inside the opening and opening_rim_median on its rim, each null when there is none; null with depth off.
size_mobject or null
Meters: width, height, and opening (null or its width and height), sizes that assume the field of view in assumed_hfov_deg; null with depth off.
depth_sourcestring or null
"bynn_depth" when the distances were read; null with depth off or unavailable.
assumed_hfov_degnumber
The horizontal field of view the sizes in meters assume, in degrees: 65.
  • Fractions of the picture. Every coordinate, box and outline is a fraction from 0 to 1 of the picture's width (x) and height (y), measured from its top left after its EXIF orientation, so it holds at any resolution.
  • Distances and sizes in meters. depth is meters along the camera's axis, from 0 to 1,000; size_m turns the outline into meters at that distance, assuming a 65-degree horizontal field of view, so a wider or narrower lens reads larger or smaller.
  • One call per picture, depth or not, and a picture with nothing found is a reading like any other. An undecodable picture is {"image", "readable": false}, never billed.
  • Room for readings. Outlines take room, so a request that names bynn_segment may carry up to 1 MiB of readings together; see Room for readings.

Writing the prompt#

  • Describe what it looks like. A descriptive phrase matches better than a short one: "purple octagonal frame on a pole" finds what "purple gate" misses. Name its colour, its shape and what it stands on.
  • Up to four things at once. Each phrase is searched for on its own, and each match's label says which phrase it matched; a phrase with no match simply has none.
  • Gates and doorways for now. They often come back as one filled shape, frame and inside together, so opening is null and depth reads what lies beyond. The outline's centre still marks the middle of the gate.
  • Raise min_score to be strict, lower it to find more. Below it a match is left out; start from the default, 0.25, and a better phrase usually helps more than a lower score.

Segment Vision's refusals#

  • 400 api_usage_error

    When
    No prompt (no options at all included)
    x-decisionnode-error, after boosters[<i>]:
    "options": 'prompt' is required
  • 400 api_usage_error

    When
    A prompt left empty once cleaned
    x-decisionnode-error, after boosters[<i>]:
    "options": 'prompt' must name something to find
  • 400 api_usage_error

    When
    A prompt that is not a string or a list of 1 to 4 strings of at most 120 characters
    x-decisionnode-error, after boosters[<i>]:
    "options": 'prompt' must be a string, or an array of 1 to 4 strings, each of at most 120 characters
  • 400 api_usage_error

    When
    A max_instances out of its range
    x-decisionnode-error, after boosters[<i>]:
    "options": 'max_instances' must be an integer from 1 to 16
  • 400 api_usage_error

    When
    A min_score out of its range
    x-decisionnode-error, after boosters[<i>]:
    "options": 'min_score' must be a number from 0 to 1
  • 400 api_usage_error

    When
    A polygon_points out of its range
    x-decisionnode-error, after boosters[<i>]:
    "options": 'polygon_points' must be an integer from 3 to 64
  • 400 api_usage_error

    When
    A depth that is not true or false
    x-decisionnode-error, after boosters[<i>]:
    "options": 'depth' must be true or false
  • 400 api_usage_error

    When
    Any other key in options
    x-decisionnode-error, after boosters[<i>]:
    "options": '<key>' is not an option
  • 529 booster_unavailable

    When
    No server that reads it is ready right now; with Retry-After
    x-decisionnode-error, after boosters[<i>]:
    The body's message: "The booster 'bynn_segment' failed."
Why a Segment Vision request is refused
StatusWhenx-decisionnode-error, after boosters[<i>]:
400 api_usage_errorNo prompt (no options at all included)"options": 'prompt' is required
400 api_usage_errorA prompt left empty once cleaned"options": 'prompt' must name something to find
400 api_usage_errorA prompt that is not a string or a list of 1 to 4 strings of at most 120 characters"options": 'prompt' must be a string, or an array of 1 to 4 strings, each of at most 120 characters
400 api_usage_errorA max_instances out of its range"options": 'max_instances' must be an integer from 1 to 16
400 api_usage_errorA min_score out of its range"options": 'min_score' must be a number from 0 to 1
400 api_usage_errorA polygon_points out of its range"options": 'polygon_points' must be an integer from 3 to 64
400 api_usage_errorA depth that is not true or false"options": 'depth' must be true or false
400 api_usage_errorAny other key in options"options": '<key>' is not an option
529 booster_unavailableNo server that reads it is ready right now; with Retry-AfterThe body's message: "The booster 'bynn_segment' failed."

Every 400 body is "Invalid request.", the reason in x-decisionnode-error; nothing runs and nothing is billed. The other settings are judged in the order you send them, the prompt after them. Retry a 529 after Retry-After.

Estimates, never a safety stop

Segment Vision's distances and sizes are estimates from one picture, meant for decisions and planning, never as a safety stop: a robot or drone uses stereo cameras or LiDAR for that. No accuracy figures are given until they are measured.

Your own documents with Knowledge#

knowledge reads no picture: it finds the passages of your own documents that apply to the request (its questions and state) in one of your knowledge bases, and the model applies them as facts and rules. Pinned documents always come with it. It takes the object form, since options.collection is required; images or videos on it are 400 booster_input_mismatch. Its reading is one result, not one per picture, with every passage cited by document, heading and byte offsets. It costs $0.001 a request, whatever it reads. Options, citations, budget and require: Knowledge in a decision.

A knowledge booster
{
  "name": "knowledge",
  "require": true,
  "options": {
    "collection": "col_3f6c1a9e0b2d4c7f8a1e5d9b2c4f6a80",
    "scope": "M-42",
    "top_k": 4
  }
}

How the model uses a reading#

The readings are written after your state as short, fixed sentences, one per booster and image, each naming the picture by its number and id. The model reads them with the state, the images and the questions, as evidence. They are counted once per request, however many questions you ask, and their tokens are in usage.input_tokens and usage.booster_tokens.

  • A reading is evidence, not an answer. DecisionNode answers every question itself and may weigh a reading against what the picture and the state show.
  • Ask the question the reading informs. An age reading helps "Is the person in selfie 18 or older?" It does not answer it for you: your threshold on truth does.
  • Keep the reading for your records. evidence names the booster version that read, so a decision can be explained later.

When a booster cannot read#

  • ok

    What happened
    The booster read every picture; results has one reading per picture
    The decision
    Runs with the readings
    Billed
    Per picture read; not a picture it could not decode
  • timeout

    What happened
    No answer within the booster's time budget; results lists one {"image": id} per picture it was meant to read
    The decision
    Runs without it; with require: true the request is a 529
    Billed
    No: billed_calls 0
  • error

    What happened
    The booster failed, or its readings did not fit the request's room for readings; results lists the pictures as for a timeout
    The decision
    Runs without it; with require: true the request is a 529
    Billed
    No: billed_calls 0
  • skipped

    What happened
    None of the request's images is one this booster reads; results is empty
    The decision
    Runs without it
    Billed
    No
evidence.<booster>.status
StatusWhat happenedThe decisionBilled
okThe booster read every picture; results has one reading per pictureRuns with the readingsPer picture read; not a picture it could not decode
timeoutNo answer within the booster's time budget; results lists one {"image": id} per picture it was meant to readRuns without it; with require: true the request is a 529No: billed_calls 0
errorThe booster failed, or its readings did not fit the request's room for readings; results lists the pictures as for a timeoutRuns without it; with require: true the request is a 529No: billed_calls 0
skippedNone of the request's images is one this booster reads; results is emptyRuns without itNo

A booster that did not run still tells the model so, in its own line, so what the model read and what evidence says always agree. Within an ok booster, these readings say a picture gave nothing:

Pictures that gave no reading
{ "image": "selfie", "faces": 0 }
  • No face (Human Age): faces 0 and no age. It is billed like any reading: the booster looked.
  • No face (Face detection): faces 0 and detections [], a reading billed like any other.
  • No match (Face recognition): matches [], a reading billed like any other.
  • No text (OCR): an empty text, a reading billed like any other.
  • Nothing ahead (Depth Vision): ahead null, and null in each clear direction, a reading billed like any other.
  • Nothing found (Segment Vision): instances [], a reading counted like any other.
  • Not decodable: "readable": false, a picture the booster could not decode. It is not billed.
  • Timed out or failed: the booster's status says so, results names each picture it was meant to read with nothing else, and billed_calls is 0.

Room for readings#

A request's readings take at most 256 KiB together, or 1 MiB when the request names ocr, face_recognition or bynn_segment; one ocr reading takes at most 128 KiB of text. Boosters are fitted in the order you list them. A booster whose readings would not fit, or an ocr page that reads longer, is that booster's error for every picture it read: results names each picture with nothing else, billed_calls is 0, and the decision runs with the readings that fit. With require: true it is a 529. Send fewer or smaller pages per request when a page of dense text comes back this way.

Time#

Each booster has a time budget: 2 s for age, 5 s for ai_generated, 2 s for face_detection, 2 s for face_recognition, 12 s for ocr, 800 ms for bynn_depth, 1.5 s for bynn_segment and 800 ms for knowledge. The boosters of a request run side by side, before the model. They add their longest budget to the request, plus up to 2.2 s for reading the pictures, within the request's own deadline: a request without ocr gives its boosters 6 s of its 8 s, and a request naming ocr starts the model's 8 s once the readings are ready. A budget holds for uploads and inline pictures; a picture sent by url spends its download time from the 6 s. latency_ms and the x-decisionnode-boosters header say what each one took.

Set a budget per request with timeout_ms on the booster object, from 100 ms to the booster's ceiling: 2 s up to 5 s for age, 5 s up to 6 s for ai_generated, 2 s up to 5 s for face_detection, 2 s up to 5 s for face_recognition, 12 s up to 12 s for ocr, 800 ms up to 5 s for bynn_depth, 1.5 s up to 5 s for bynn_segment and 800 ms up to 5 s for knowledge. A booster that runs out of its budget is a timeout, not billed, and with require: true the request is a 529 booster_unavailable. Batch lines take timeout_ms too.

A longer budget for Human Age
{
  "boosters": [
    { "name": "age", "timeout_ms": 4000 },
    "ai_generated"
  ]
}

Give a request with `ocr` 30 seconds

ocr is a generative model that takes 2 to 10 seconds a picture, so a request naming it can take up to 12 s longer. Set a client timeout of 30 seconds per attempt for it, as the SDKs do unless you set your own, and do not retry it after a timeout: the attempt you gave up on may still be answered and billed. See Retrying.

The x-decisionnode-boosters header
x-decisionnode-boosters: age=ok:212,ai_generated=timeout:800

One entry per booster, in your order: its name, its status and its time in milliseconds. The header is on every response of a request that named boosters, errors included, so a 529 tells you which booster failed.

What a booster costs#

cost = input tokens × model price

+ sum of billed_calls × booster price

input tokens
usage.input_tokens, the readings included
billed_calls
evidence.<name>.billed_calls: one per image that booster read with status ok
booster price
that booster's price per call: age (Human Age) $0.024, ai_generated (AI-generated) $0.006, face_detection (Face detection) $0.001, face_recognition (Face recognition) $0.001 on your own collection and $0.001 on celebrities, ocr (OCR) $0.0015, bynn_depth (Depth Vision) free, bynn_segment (Segment Vision) $0.001 and knowledge (Knowledge) $0.001 a request
  • Priced per call, by booster: age (Human Age) $0.024, ai_generated (AI-generated) $0.006, face_detection (Face detection) $0.001, face_recognition (Face recognition) $0.001 on your own collection and $0.001 on celebrities, ocr (OCR) $0.0015, bynn_depth (Depth Vision) free, bynn_segment (Segment Vision) $0.001 and knowledge (Knowledge) $0.001 a request, drawn from your prepaid balance with the request's tokens. The first sample makes 2 calls, one of each booster on the one picture: $0.030.
  • A booster that timed out or failed is free, and so is a picture a booster could not decode ("readable": false). A reading that finds nothing, such as a picture with no face, is billed.
  • A reading's tokens are input tokens at the model's price, in usage.booster_tokens. An OCR reading of a dense page is many of them.
  • Billed every time a request uses a reading, the same picture in a later request included: there is no discount for a picture read before. A picture your workspace sent within the last hour (or, for an upload, while the upload lives) may be answered from your workspace's cache of readings, faster and billed the same. The cache is never shared with another workspace and is not used under zero retention, and face_recognition readings never enter it.
  • A request the safety check refuses bills no booster call and carries no evidence. The check reads the request as you sent it, an ocr prompt included.
  • A 529 after boosters ran bills the calls that read, since they happened, and your retry's readings are billed again. A 402 comes before any booster runs.

Booster spend shows under its own heading on the console's Usage page. Every price is on Pricing and billing.

Turning a booster off#

Every booster is on for a new workspace. An Owner or Admin can turn one off, or back on, on the console's Boosters page; other roles see the switches. A request that names a booster that is off gets 403 booster_not_enabled. A booster DecisionNode has turned off for your workspace shows as locked; write to us to change it.

Where boosters work#

  • POST /v1/decide

    Boosters
    Yes
  • Batch jobs

    Boosters
    Yes: each line takes boosters as a live request does, billed the same way
  • Fine-tuned models

    Boosters
    Yes, as on their base model
  • Sessions

    Boosters
    No: boosters on a session's open is 400 api_usage_error "boosters are not available on sessions"
Boosters by endpoint
WhereBoosters
POST /v1/decideYes
Batch jobsYes: each line takes boosters as a live request does, billed the same way
Fine-tuned modelsYes, as on their base model
SessionsNo: boosters on a session's open is 400 api_usage_error "boosters are not available on sessions"

Errors#

A boosted request has five errors of its own: booster_unavailable (529, retry it), booster_not_enabled (403), and booster_unknown, booster_input_mismatch and a malformed array's api_usage_error (400, fix the request).

  • 400

    Type
    api_usage_error
    When
    boosters is not an array, has more than 4 entries, names a booster twice, holds an entry that is neither a name nor an object with name, an object with a key other than name, images, timeout_ms, require and options, or has a key in options the booster does not take, a face_recognition entry without options.collection (the bare name included) or with one that is not a string, a threshold outside 0 to 1, a prompt that is not a string of at most 2,000 characters, a bynn_depth grid_size that is not a whole number from 2 to 16 ("options": 'grid_size' must be an integer from 2 to 16), a bynn_segment entry without options.prompt or with a prompt or setting out of its range (the sentences under Segment Vision's refusals). x-decisionnode-error says which
    What to do
    Fix the array
  • 400

    Type
    booster_unknown
    When
    A name that is not a booster
    What to do
    Use a name from the table above
  • 400

    Type
    booster_input_mismatch
    When
    A booster that reads images on a request without any, or an images entry that is not an image of the request
    What to do
    Add the image, or fix the id
  • 402

    Type
    insufficient_credit
    When
    The balance is empty; no booster ran
    What to do
    Add credit, then retry
  • 422

    Type
    a detail list
    When
    A timeout_ms that is not an integer from 100 to the booster's ceiling: int_type, greater_than_equal or less_than_equal at ["body", "boosters", <i>, "timeout_ms"], "Input should be an integer from 100 to <max>". Nothing runs and nothing is billed
    What to do
    Fix the budget
  • 403

    Type
    booster_not_enabled
    When
    The booster is off for your workspace
    What to do
    Turn it on under Boosters, or leave it out
  • 404

    Type
    collection_not_found
    When
    face_recognition names a collection that is not yours and not public
    What to do
    Fix the id
  • 400

    Type
    collection_type_mismatch
    When
    face_recognition names a collection that is not a face collection
    What to do
    Name a face collection
  • 400

    Type
    collection_type_mismatch
    When
    knowledge names a collection that is not a knowledge base
    What to do
    Name a knowledge base
  • 409

    Type
    knowledge_collection_empty
    When
    knowledge with require: true on a knowledge base with no document ready or processing
    What to do
    Add a document; see Knowledge in a decision
  • 529

    Type
    booster_unavailable
    When
    A booster with require: true failed or ran out of time
    What to do
    Wait Retry-After, then retry; the SDKs do
Errors of a boosted request
StatusTypeWhenWhat to do
400api_usage_errorboosters is not an array, has more than 4 entries, names a booster twice, holds an entry that is neither a name nor an object with name, an object with a key other than name, images, timeout_ms, require and options, or has a key in options the booster does not take, a face_recognition entry without options.collection (the bare name included) or with one that is not a string, a threshold outside 0 to 1, a prompt that is not a string of at most 2,000 characters, a bynn_depth grid_size that is not a whole number from 2 to 16 ("options": 'grid_size' must be an integer from 2 to 16), a bynn_segment entry without options.prompt or with a prompt or setting out of its range (the sentences under Segment Vision's refusals). x-decisionnode-error says whichFix the array
400booster_unknownA name that is not a boosterUse a name from the table above
400booster_input_mismatchA booster that reads images on a request without any, or an images entry that is not an image of the requestAdd the image, or fix the id
402insufficient_creditThe balance is empty; no booster ranAdd credit, then retry
422a detail listA timeout_ms that is not an integer from 100 to the booster's ceiling: int_type, greater_than_equal or less_than_equal at ["body", "boosters", <i>, "timeout_ms"], "Input should be an integer from 100 to <max>". Nothing runs and nothing is billedFix the budget
403booster_not_enabledThe booster is off for your workspaceTurn it on under Boosters, or leave it out
404collection_not_foundface_recognition names a collection that is not yours and not publicFix the id
400collection_type_mismatchface_recognition names a collection that is not a face collectionName a face collection
400collection_type_mismatchknowledge names a collection that is not a knowledge baseName a knowledge base
409knowledge_collection_emptyknowledge with require: true on a knowledge base with no document ready or processingAdd a document; see Knowledge in a decision
529booster_unavailableA booster with require: true failed or ran out of timeWait Retry-After, then retry; the SDKs do
Two of the bodies
{
  "detail": {
    "error_type": "booster_not_enabled",
    "message": "The booster 'age' is not enabled for this workspace."
  }
}

What a booster never does#

  • It never answers a question, however sure it is, and never adds a question or an answer.
  • It never changes a request without boosters: the same request gets the same answer it got before boosters existed.
  • It never decides what the safety check refuses. The safety check judges the request as you sent it, an ocr prompt included, never a reading, except the labels of your own items that a face_recognition search matched, which are your own text.
  • It never keeps your images. The bytes are read for the call and not stored or logged; the request log records which boosters ran, their status and their time, never their readings. A reading itself stays only in your workspace's cache of readings, for at most an hour, and not under zero retention.
  • It never reads more than the request's images: the same images, in the same workspace, under the same retention, at most 16 a request.

Readings about people

An age reading is an estimate from a picture, with a range and a confidence: one piece of evidence, not a document check. A Face recognition match is a measure of similarity, not an identification: the Terms forbid deciding about a person on a match alone. Decisions about people follow Responsible use.

previousVideonextCollections

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. Add a booster to a request
  2. Options
  3. Settings
  4. What comes back
  5. Boxes
  6. Steering OCR with its prompt
  7. Document parsing
  8. Information extraction
  9. Controlling the output
  10. Distances with Depth Vision
  11. Finding things with Segment Vision
  12. Writing the prompt
  13. Segment Vision's refusals
  14. Your own documents with Knowledge
  15. How the model uses a reading
  16. When a booster cannot read
  17. Room for readings
  18. Time
  19. What a booster costs
  20. Turning a booster off
  21. Where boosters work
  22. Errors
  23. What a booster never does