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. Collections API

Collections API

Create face collections, enroll faces, list, edit and delete them. Every route takes a Full access key and acts for its workspace only.

on this page5 sections
  1. The collection object
  2. A knowledge base
  3. The item object
  4. Who may call what
  5. Retrying a write
  6. Errors

Collections hold the faces the face_recognition booster matches a request against. What they are, what they cost and how a search reads is on Collections. Every route is at https://api.decisionnode.com/v1/collectionshttps://api.decisionnode.com/v1/collections and takes a Full access key; a Decisions-only key gets 403 key_scope_denied.

  • POST /v1/collections

    What it does
    Create a collection
  • GET /v1/collections

    What it does
    List collections: yours, newest first, then the public ones
  • GET /v1/collections/{id}

    What it does
    Retrieve a collection
  • DELETE /v1/collections/{id}

    What it does
    Delete a collection and every item in it
  • POST /v1/collections/{id}/items

    What it does
    Enroll a face: one face, with your reference, label and metadata
  • GET /v1/collections/{id}/items

    What it does
    List items, all or by reference
  • PATCH /v1/collections/{id}/items/{item_id}

    What it does
    Update an item: its reference, label or metadata
  • DELETE /v1/collections/{id}/items/{item_id}

    What it does
    Delete an item
  • POST /v1/collections/{id}/items

    What it does
    Add a document to a knowledge base: Markdown or text, indexed in the background
  • PUT /v1/collections/{id}/items/{item_id}

    What it does
    Replace a document, the old version answering until the new one is ready
  • GET /v1/collections/{id}/items/{item_id}

    What it does
    Retrieve an item; a document's stored text with ?include=text
  • GET /v1/collections/{id}/items/{item_id}/chunks

    What it does
    List a document's passages
  • POST /v1/collections/{id}/search

    What it does
    Search a knowledge base without a decision
Routes
Method and pathWhat it does
POST /v1/collectionsCreate a collection
GET /v1/collectionsList collections: yours, newest first, then the public ones
GET /v1/collections/{id}Retrieve a collection
DELETE /v1/collections/{id}Delete a collection and every item in it
POST /v1/collections/{id}/itemsEnroll a face: one face, with your reference, label and metadata
GET /v1/collections/{id}/itemsList items, all or by reference
PATCH /v1/collections/{id}/items/{item_id}Update an item: its reference, label or metadata
DELETE /v1/collections/{id}/items/{item_id}Delete an item
POST /v1/collections/{id}/itemsAdd a document to a knowledge base: Markdown or text, indexed in the background
PUT /v1/collections/{id}/items/{item_id}Replace a document, the old version answering until the new one is ready
GET /v1/collections/{id}/items/{item_id}Retrieve an item; a document's stored text with ?include=text
GET /v1/collections/{id}/items/{item_id}/chunksList a document's passages
POST /v1/collections/{id}/searchSearch a knowledge base without a decision

The collection object#

JSON
{
  "id": "col_3f6c1a9e0b2d4c7f8a1e5d9b2c4f6a80",
  "type": "face",
  "name": "Staff, Stockholm office",
  "public": false,
  "items": 412,
  "created_at": "2026-10-12T09:00:00Z",
  "deletion": null
}
idstring
col_ and 32 hex digits for your own; the public collection's id is its name, celebrities.
typestring
face.
namestring
1 to 80 characters, unique among your collections, with no control or invisible characters.
publicboolean
true on a public collection.
itemsinteger
How many items it holds now.
created_atstring
When it was created, RFC 3339.
deletionnull
On your own collections only, and always null. When an unpaid storage charge marks your items for deletion, the date reaches your owner and admins by email. A public collection has no deletion.

A knowledge base#

A collection of type text holds documents for the knowledge booster (Knowledge) and carries these fields besides; it is never public.

JSON
{
  "id": "col_3f6c1a9e0b2d4c7f8a1e5d9b2c4f6a80",
  "type": "text",
  "name": "Claims policy",
  "public": false,
  "items": 12,
  "created_at": "2026-10-20T10:00:00Z",
  "deletion": null,
  "scope_key": "mission",
  "chunks": 412,
  "tokens": 81230,
  "version": 41,
  "status_counts": { "queued": 1, "processing": 1, "ready": 9, "failed": 1 },
  "pinned": {
    "tokens": 230,
    "cap": 512,
    "largest_scope": { "value": "M-42", "tokens": 96 }
  }
}
typestring
text.
scope_keystring or null
The metadata key that scopes a document, 1 to 40 characters of a-z, 0-9 and _; fixed for the knowledge base's life. See Scope.
chunksinteger
Passages a request can read now.
tokensinteger
Their tokens.
versioninteger
Rises with every change a search can see: a document ready, edited or deleted.
status_countsobject
Documents by the status of their newest version: queued, processing, ready, failed.
pinnedobject
What pinned documents take of their cap: tokens (the global pins and, with them, those of the largest scope value), cap (512 unless we set it otherwise, up to 4,096) and largest_scope (that scope value and its tokens, or null).

The item object#

JSON
{
  "id": "itm_9a0b1c2d3e4f5a6b7c8d9e0f1a2b3c4d",
  "reference": "emp-1042",
  "label": "Anna, reception",
  "metadata": { "department": "reception", "badge": 1042, "visitor": false },
  "created_at": "2026-10-12T09:00:00Z"
}
idstring
itm_ and 32 hex digits.
referencestring
Your key for the item, 1 to 64 characters of A-Z, a-z, 0-9 and _ . : -. It may repeat within a collection.
labelstring or null
Up to 128 characters, shown in a match; null on an item without one.
metadataobject
Your flat metadata for the item, {} when it has none. See metadata on Enroll a face.
created_atstring
When it was enrolled, RFC 3339.

Who may call what#

  • A Full access key only. A Decisions-only key gets 403 key_scope_denied on every route here, before anything else.
  • Creating and enrolling need a workspace in good standing: an empty balance is 402 insufficient_credit, a suspended workspace 403 workspace_suspended.
  • Listing, reading and deleting stay open whatever the balance. Editing an item is free and stays open on an empty balance, but not for a suspended workspace.
  • Public collections are read-only: an enrollment, an edit, a delete or a list of their items is 403 collection_read_only.
  • A workspace whose data is kept in a storage location other than the default cannot create a collection or enroll: 403 collections_region_unavailable, "Collections are not available yet for this workspace's storage location."
  • Limits: 100 collections and 1,000,000 items in all of them per workspace, unless we set yours otherwise; past them, 409 collections_limit_reached or items_limit_reached.

Retrying a write#

POST /v1/collections, POST /v1/collections/{id}/items and PATCH /v1/collections/{id}/items/{item_id} take an optional Idempotency-Key header: 1 to 255 printable ASCII characters, kept 24 hours. Send a fresh key with each new write and the same key with every retry of it.

  • The same key, route and body get the first answer again, its status and body, with x-decisionnode-idempotent-replay: true: nothing is done or billed twice.
  • Only an answer that changed something or was billed is kept: a create's 201, an enrollment's 201 and its billed 422 no_face, an edit's 200. Any other answer gives the key back, so a retry runs again. A 529 whose key could not be given back, and a request whose server went away mid-way, hold the key for its 60-second lease: a retry with it gets 409 idempotency_in_progress until then, and runs after.
  • A key is your workspace's: every API key of the workspace shares it, so two services must not reuse each other's keys.
  • The same key with another body or route is 409 idempotency_key_reused, "This Idempotency-Key was already used with a different request." Never retry it: use a new key.
  • While the first request still runs, a repeat is 409 idempotency_in_progress with Retry-After: 1.
  • A key sent twice, or not 1 to 255 printable ASCII characters, is 400 api_usage_error.
  • The SDKs send a key of their own on every create and enrollment: a new UUID per call, the same on each of its retries.

Errors#

  • 400

    Type
    api_usage_error
    When
    A bad query value on the items list, reference with reference_prefix, or a malformed Idempotency-Key
  • 400

    Type
    image_url_refused
    When
    An enrollment's url we do not fetch, as on a decision; not billed
  • 401

    Type
    authentication_error
    When
    The key is missing, unknown or revoked
  • 402

    Type
    insufficient_credit
    When
    A create or an enrollment the balance cannot pay
  • 403

    Type
    key_scope_denied
    When
    A Decisions-only key: "This key may only make decisions."
  • 403

    Type
    collection_read_only
    When
    A write to a public collection, or a list of its items
  • 403

    Type
    collections_region_unavailable
    When
    A create or an enrollment in a workspace whose storage location is not the default
  • 403

    Type
    workspace_suspended
    When
    A create, an enrollment or an edit in a suspended workspace
  • 404

    Type
    collection_not_found, item_not_found
    When
    No such collection or item for your workspace
  • 409

    Type
    collections_limit_reached, items_limit_reached
    When
    Past your workspace's limits
  • 409

    Type
    idempotency_key_reused, idempotency_in_progress
    When
    See Retrying
  • 413

    Type
    request_too_large_error
    When
    A create's or an edit's body over 4 KiB, or an enrollment over the request body limit
  • 422

    Type
    a detail list
    When
    A field out of bounds, a name already used (name_taken), a picture with no face (no_face, billed) or one that cannot be read (image_unreadable, not billed), bad metadata
  • 529

    Type
    overloaded_error
    When
    No room right now (retry after Retry-After); on an enrollment, details.reason enrollment_unpriced (never retried) or face_model_unavailable (retry later): see Enroll a face
Errors of the Collections API
StatusTypeWhen
400api_usage_errorA bad query value on the items list, reference with reference_prefix, or a malformed Idempotency-Key
400image_url_refusedAn enrollment's url we do not fetch, as on a decision; not billed
401authentication_errorThe key is missing, unknown or revoked
402insufficient_creditA create or an enrollment the balance cannot pay
403key_scope_deniedA Decisions-only key: "This key may only make decisions."
403collection_read_onlyA write to a public collection, or a list of its items
403collections_region_unavailableA create or an enrollment in a workspace whose storage location is not the default
403workspace_suspendedA create, an enrollment or an edit in a suspended workspace
404collection_not_found, item_not_foundNo such collection or item for your workspace
409collections_limit_reached, items_limit_reachedPast your workspace's limits
409idempotency_key_reused, idempotency_in_progressSee Retrying
413request_too_large_errorA create's or an edit's body over 4 KiB, or an enrollment over the request body limit
422a detail listA field out of bounds, a name already used (name_taken), a picture with no face (no_face, billed) or one that cannot be read (image_unreadable, not billed), bad metadata
529overloaded_errorNo room right now (retry after Retry-After); on an enrollment, details.reason enrollment_unpriced (never retried) or face_model_unavailable (retry later): see Enroll a face
previousEnd a sessionnextCreate a collection

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. The collection object
  2. A knowledge base
  3. The item object
  4. Who may call what
  5. Retrying a write
  6. Errors