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 billingYou pay for input tokens only. Output is free because the model generates no text.
↑↓ 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 MoE
  • 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
  • GET/v1/models
  • POST/v1/uploads
  • /v1/keys
  • GET/v1/keys/{key_id}/usage
  • GET/v1/usage
  • 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 MoE
  • 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
  • GET/v1/models
  • POST/v1/uploads
  • /v1/keys
  • GET/v1/keys/{key_id}/usage
  • GET/v1/usage
  • 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. Collections API

Search a knowledge base

Run a knowledge base's retrieval without a decision: the passages a request with this query would read, with their text. Billed as one knowledge call.

on this page5 sections
  1. Headers
  2. Path parameters
  3. Request body
  4. Response
  5. Errors
POSThttps://api.decisionnode.com/v1/collections/{id}/search
curl -X POST https://api.decisionnode.com/v1/collections/col_3f6c1a9e0b2d4c7f8a1e5d9b2c4f6a80/search \
  -H "Authorization: Bearer $DECISIONNODE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"query":"claim without a receipt","scope":"M-42","top_k":4}'

Headers#

Authorizationheaderrequired
Bearer dn_live_.... A Full access key: every call acts for that key's workspace only, and a Decisions-only key gets 403 key_scope_denied, "This key may only make decisions."
Content-Typeheader
application/json. Not checked: the body is read as JSON whatever its type.

Path parameters#

idstringrequired
The collection: col_ and 32 hex digits for your own, or a public collection's name, celebrities.

Request body#

querystringrequired
What to search for, 1 to 2,000 characters.
scope, match, filter, top_k, pinnedas the booster's
As the booster's options.
max_tokensinteger or "auto"default "auto"
auto is 1,024 tokens here, there being no request to fit; or 128 to 8,192.

Response#

200 OK with the result a decision's evidence.knowledge carries (What comes back), each passage's text and the query's included. Needs a Full access key, and is billed as one knowledge call; it counts against the free tier's booster calls.

200 OK
{
  "collection": "col_3f6c1a9e0b2d4c7f8a1e5d9b2c4f6a80",
  "collection_name": "Claims policy",
  "corpus": { "version": 41 },
  "query": { "source": "auto", "tokens": 212 },
  "budget": {
    "mode": "auto",
    "tokens": 840,
    "entry": "short",
    "cause": null
  },
  "scope": { "key": "mission", "value": "M-42" },
  "warnings": [],
  "passages": [
    {
      "n": 1,
      "pinned": true,
      "item": "itm_9a1c4e7b2d5f8a0c3e6b9d2f5a8c1e4b",
      "reference": "policy-2026",
      "title": "Claims policy 2026",
      "heading": "Receipts",
      "chunk": 0,
      "byte_start": 22,
      "byte_end": 83,
      "tokens": 14,
      "score": null,
      "lexical": false,
      "rendered": true
    },
    {
      "n": 2,
      "pinned": false,
      "item": "itm_4b7e0a3d6c9f2b5e8a1d4c7f0b3e6a9d",
      "reference": "m-42-brief",
      "title": "Mission M-42 brief",
      "heading": "Special instructions",
      "chunk": 0,
      "byte_start": 0,
      "byte_end": 83,
      "tokens": 19,
      "score": 0.7713,
      "lexical": true,
      "rendered": true
    }
  ],
  "omitted": {
    "below_min_score": 0,
    "per_item_cap": 0,
    "over_budget": 0,
    "pinned_filtered": 0,
    "short_entry": 0,
    "context_limit": 0
  },
  "pending_items": 0,
  "search": { "plan": "exact", "candidates": 50, "fallback": false },
  "truncated": false
}

Errors#

  • 400

    Type
    api_usage_error
    When
    A bad option, scope on a knowledge base without a scope key, the scope key in match or filter, a malformed filter
    What to do
    Fix the body
  • 401

    Type
    authentication_error
    When
    The key is missing, unknown or revoked
    What to do
    Check the Authorization header
  • 402

    Type
    insufficient_credit
    When
    The prepaid balance is empty. Reads, edits and deletes stay open
    What to do
    Add credit, then retry
  • 403

    Type
    key_scope_denied
    When
    A Decisions-only key: "This key may only make decisions."
    What to do
    Use a Full access key on your server
  • 403

    Type
    booster_not_enabled
    When
    Knowledge is turned off for your workspace
    What to do
    Write to us
  • 404

    Type
    collection_not_found
    When
    No such collection for your workspace; another workspace's reads the same. "Collection not found: <id>.", the id repeated only when it has the form of one
    What to do
    Check the id
  • 400

    Type
    collection_type_mismatch
    When
    The collection is a face collection: a face body to a knowledge base, or a document to a face collection
    What to do
    Use a knowledge base's id
  • 409

    Type
    knowledge_collection_empty
    When
    No document is ready and none is processing
    What to do
    Add a document
  • 529

    Type
    booster_unavailable
    When
    No document is ready yet, some are processing: Retry-After: 5, or 60 with details.reason ingestion_delayed; an unpriced search is the 529 too
    What to do
    Retry after Retry-After
  • 422

    Type
    a detail list
    When
    The body is not JSON (json_invalid)
    What to do
    Send a JSON object
  • 429

    Type
    rate_limit_error
    When
    Over your request rate
    What to do
    Wait Retry-After, then send the same call again
  • 500

    Type
    api_error
    When
    A fault on our side
    What to do
    Retry with backoff
  • 529

    Type
    overloaded_error
    When
    The collections cannot take the call right now
    What to do
    Wait Retry-After (1 s, or 1 to 2 s when the key store is busy), then retry
Errors this call returns
StatusTypeWhenWhat to do
400api_usage_errorA bad option, scope on a knowledge base without a scope key, the scope key in match or filter, a malformed filterFix the body
401authentication_errorThe key is missing, unknown or revokedCheck the Authorization header
402insufficient_creditThe prepaid balance is empty. Reads, edits and deletes stay openAdd credit, then retry
403key_scope_deniedA Decisions-only key: "This key may only make decisions."Use a Full access key on your server
403booster_not_enabledKnowledge is turned off for your workspaceWrite to us
404collection_not_foundNo such collection for your workspace; another workspace's reads the same. "Collection not found: <id>.", the id repeated only when it has the form of oneCheck the id
400collection_type_mismatchThe collection is a face collection: a face body to a knowledge base, or a document to a face collectionUse a knowledge base's id
409knowledge_collection_emptyNo document is ready and none is processingAdd a document
529booster_unavailableNo document is ready yet, some are processing: Retry-After: 5, or 60 with details.reason ingestion_delayed; an unpriced search is the 529 tooRetry after Retry-After
422a detail listThe body is not JSON (json_invalid)Send a JSON object
429rate_limit_errorOver your request rateWait Retry-After, then send the same call again
500api_errorA fault on our sideRetry with backoff
529overloaded_errorThe collections cannot take the call right nowWait Retry-After (1 s, or 1 to 2 s when the key store is busy), then retry

A refusal is {"detail": {"error_type": "...", "message": "..."}}; a 422 is {"detail": [...]}, one entry per field, each with type, loc, msg and input (a string cut to 64 characters, an object or array never echoed). Every 429 and 529 and the 409 idempotency_in_progress carry Retry-After (seconds) and retry-after-ms (milliseconds); enrollment_unpriced carries neither. The Collections API's own refusals (api_usage_error, collection_read_only, item_not_found, collections_region_unavailable, the limits, the idempotency 409s and image_url_refused) also carry x-decisionnode-error, the message in ASCII. Retry 408, 429, 529 and any 5xx after Retry-After; fix the call for the other 4xx.

previousDelete failed documentsnextThe batch object

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. Headers
  2. Path parameters
  3. Request body
  4. Response
  5. Errors