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

Finalize a batch

Lock a draft and queue it to run. Nothing runs before this call, and from it the expiry window counts.

on this page7 sections
  1. Authentication
  2. Path parameters
  3. Request body
  4. Response
  5. Errors
  6. Limits
  7. Notes
POSThttps://api.decisionnode.com/v1/batches/{id}/finalize
API=https://api.decisionnode.com/v1
BATCH=batch_01J9ZB8Q3T

curl -X POST "$API/batches/$BATCH/finalize" \
  -H "Authorization: Bearer $DECISIONNODE_API_KEY"

Authentication#

Authorizationheaderrequired
Bearer dn_live_..., a Full access key: a Decisions-only key gets 403 key_scope_denied, "This key may only make decisions." A batch belongs to the key that created it: other keys, even in the same workspace, get 404 for it.

Path parameters#

idstringrequired
The batch id that Create a batch returned, for example batch_01J9ZB8Q3T.

Request body#

None. A body of up to 1 MiB is read and ignored; over it, 413 request_too_large_error, "This call takes no body; send at most 1 MiB.", and one not all in within 10 seconds is a 408.

Response#

200 OK with the batch object in state queued, finalized_at set and expires_at 24 hours later. A batch whose every line was refused at upload is still queued in this answer, and ends completed right after.

200 OK
{
  "id": "batch_01J9ZB8Q3T",
  "state": "queued",
  "counters": {
    "requests": 3,
    "queued": 3,
    "in_progress": 0,
    "completed": 0,
    "failed": 0,
    "expired": 0,
    "cancelled": 0
  },
  "created_at": "2026-10-06T09:12:04Z",
  "finalized_at": "2026-10-06T09:12:31Z",
  "expires_at": "2026-10-07T09:12:31Z",
  "ended_at": null,
  "results_url": null,
  "results_expire_at": null,
  "usage": { "input_tokens": 0, "output_tokens": 0 },
  "error": null
}
  1. Authentication
  2. Path parameters
  3. Request body
  4. Response
  5. Errors
  6. Limits
  7. Notes
request
API=https://api.decisionnode.com/v1BATCH=batch_01J9ZB8Q3Tcurl -X POST "$API/batches/$BATCH/finalize" \  -H "Authorization: Bearer $DECISIONNODE_API_KEY"

Errors#

  • 400

    Type
    api_usage_error
    When
    The batch holds no requests
    What to do
    Add requests first
  • 400

    Type
    api_usage_error
    When
    A line names a pinned model id that has retired: "Unknown model: {model}", with x-decisionnode-error "line {n} names {model}, which has retired; use {alias} or a current pinned id"
    What to do
    Move those lines to the current pinned id (or its family id) and create a new batch. The draft stays as it is; cancel it
  • 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 workspace cannot pay: details.reason plan_required, trial_allowance_used or allowance_used on a workspace with members, balance_empty on an agent workspace (Plan required)
    What to do
    Add credit or fix the plan in the console, then call again
  • 403

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

    Type
    workspace_suspended
    When
    The workspace is suspended: "This workspace is suspended. Contact hello@bynn.com."
    What to do
    Write to us
  • 404

    Type
    not_found_error
    When
    No batch with this id belongs to your key
    What to do
    Check the id and that you call with the key that created the batch
  • 409

    Type
    invalid_batch_state
    When
    The batch is no longer a draft: it was finalized or cancelled
    What to do
    Create a new batch for more requests
  • 429

    Type
    batch_limit_exceeded
    When
    The draft already counts toward your limits, so this comes only when your key's or workspace's active counts are over a limit that was lowered since the draft was made
    What to do
    Wait for a batch to end, then finalize again; the draft stays as it is
  • 429

    Type
    rate_limit_error
    When
    Over your workspace's request rate (or your key's own lower limit): batch calls count against it
    What to do
    Wait Retry-After seconds, then send the same call again
  • 500

    Type
    api_error
    When
    A fault on our side
    What to do
    Retry with backoff and jitter. A 5xx can come after the call took effect: before you create again, cancel any draft the failed create left behind (see Batch errors)
  • 529

    Type
    overloaded_error
    When
    The API cannot take the call right now
    What to do
    Wait Retry-After seconds, then retry with backoff
Errors this endpoint returns
StatusTypeWhenWhat to do
400api_usage_errorThe batch holds no requestsAdd requests first
400api_usage_errorA line names a pinned model id that has retired: "Unknown model: {model}", with x-decisionnode-error "line {n} names {model}, which has retired; use {alias} or a current pinned id"Move those lines to the current pinned id (or its family id) and create a new batch. The draft stays as it is; cancel it
401authentication_errorThe key is missing, unknown or revokedCheck the Authorization header
402insufficient_creditThe workspace cannot pay: details.reason plan_required, trial_allowance_used or allowance_used on a workspace with members, balance_empty on an agent workspace (Plan required)Add credit or fix the plan in the console, then call again
403key_scope_deniedA Decisions-only key: "This key may only make decisions." Checked before the rateUse a Full access key on your server
403workspace_suspendedThe workspace is suspended: "This workspace is suspended. Contact hello@bynn.com."Write to us
404not_found_errorNo batch with this id belongs to your keyCheck the id and that you call with the key that created the batch
409invalid_batch_stateThe batch is no longer a draft: it was finalized or cancelledCreate a new batch for more requests
429batch_limit_exceededThe draft already counts toward your limits, so this comes only when your key's or workspace's active counts are over a limit that was lowered since the draft was madeWait for a batch to end, then finalize again; the draft stays as it is
429rate_limit_errorOver your workspace's request rate (or your key's own lower limit): batch calls count against itWait Retry-After seconds, then send the same call again
500api_errorA fault on our sideRetry with backoff and jitter. A 5xx can come after the call took effect: before you create again, cancel any draft the failed create left behind (see Batch errors)
529overloaded_errorThe API cannot take the call right nowWait Retry-After seconds, then retry with backoff

Every error body is {"detail": {"error_type": "...", "message": "..."}}. Retry 408, 429 (rate_limit_error), 529 and any 5xx, waiting at least what Retry-After says when it is set; fix the call for the other 4xx. A 429 batch_limit_exceeded clears only when a batch ends or you cancel one. All the bodies are on Errors.

Limits#

  • Requests in active batches per key

    Value
    100,000 across your drafts, queued and running batches
  • Unfinished requests

    Value
    Expire 24 hours after this call
Limits that apply to this call
LimitValue
Requests in active batches per key100,000 across your drafts, queued and running batches
Unfinished requestsExpire 24 hours after this call

Notes#

  • Results come with a multi-hour delay. There is no set time at which a batch runs or finishes, so poll for it.
  • Requests still unfinished 24 hours after a batch is finalized expire: they are not billed, and you can resubmit them.
  • Finalizing a batch that is no longer a draft answers 409 invalid_batch_state. If a finalize call timed out, retrieve the batch: queued means it went through.
  • A pinned model id that has retired is refused here, as on a live call: see Versions. A family id moves to the current version instead of retiring, so lines that name a family id are not refused for it.
previousAdd requestsnextRetrieve a batch

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