Skip to content
DecisionNodeDecisionNdedocs
  • Guides
  • API reference
  • Examples
  • Playground

start here

  • QuickstartGet startedGet an API key, send one request with three questions, and branch your code on the typed answers. Plain HTTPS, no SDK to install.
  • POST /v1/decideAPI referenceAnswer typed questions about a state and optional images. One request, one buffered JSON response, one answer per question.
  • QuestionsConceptsQuestions say what to decide. Each one has a type that fixes the shape of its answer: a choice from your options, a score on your scale, a…
  • ConfidenceConceptsProbabilities are calibrated per question type, so a threshold means what it says.
  • ImagesConceptsSend images and text in the same request. The model reads printed and handwritten text, amounts, dates, objects and layout, and answers…
  • Batch jobsPatternsSend up to 10,000 requests in one file and collect the answers later, at half the live price.
  • 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
  • Playground
  • Console and keys
  • With coding agents
  • Examples

Concepts

  • State
  • Questions
  • Choice
  • Score
  • Truth
  • Number
  • Images
  • Confidence
  • Determinism

Models

  • DecisionNode-1.0
  • DecisionNode-1.0 Flash
  • Limits
  • Versions
  • Dedicated capacity

Patterns

  • Confidence-gated routing
  • Fan-out
  • Guardrails
  • Control loops
  • Batch jobs

API reference

  • Overview
  • POST/v1/decide
  • GET/v1/models
  • Errors
  • Safety check
  • Rate limits

Sessions API

  • Sessions overview
  • POSTOpen a session
  • WSStream frames
  • DELEnd a session

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

Policies

  • Responsible use
  • Data and privacy

Migrate

  • Coming from a Jev-shaped API
  • Benchmarks
  • Pricing
  • Playground
Get API key
  • Guides
  • API reference
  • Examples
  • Playground

Get started

  • Introduction
  • Quickstart
  • Playground
  • Console and keys
  • With coding agents
  • Examples

Concepts

  • State
  • Questions
  • Choice
  • Score
  • Truth
  • Number
  • Images
  • Confidence
  • Determinism

Models

  • DecisionNode-1.0
  • DecisionNode-1.0 Flash
  • Limits
  • Versions
  • Dedicated capacity

Patterns

  • Confidence-gated routing
  • Fan-out
  • Guardrails
  • Control loops
  • Batch jobs

API reference

  • Overview
  • POST/v1/decide
  • GET/v1/models
  • Errors
  • Safety check
  • Rate limits

Sessions API

  • Sessions overview
  • POSTOpen a session
  • WSStream frames
  • DELEnd a session

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

Policies

  • Responsible use
  • Data and privacy

Migrate

  • Coming from a Jev-shaped API
  1. docs
  2. /
  3. Batch API

Cancel a batch

Stop a batch. Requests that have not started are cancelled and never billed; requests already running finish and are billed.

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

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

Authentication#

Authorizationheaderrequired
Bearer dn_live_..., the same key as every call. 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.

Response#

200 OK with the batch object. What it shows depends on where the batch was:

  • A draft, or queued with nothing started

    The answer shows
    cancelled, every request in counters.cancelled
    Then
    Results are ready at once: every line cancelled, nothing billed
  • queued or running with requests in progress

    The answer shows
    Still queued or running; requests not started already in counters.cancelled
    Then
    The running requests finish and are billed, then the batch ends cancelled and its results hold every answer that finished
  • Already cancelled

    The answer shows
    The batch, unchanged
    Then
    Nothing
What a cancel does
The batch wasThe answer showsThen
A draft, or queued with nothing startedcancelled, every request in counters.cancelledResults are ready at once: every line cancelled, nothing billed
queued or running with requests in progressStill queued or running; requests not started already in counters.cancelledThe running requests finish and are billed, then the batch ends cancelled and its results hold every answer that finished
Already cancelledThe batch, unchangedNothing
200 OK
{
  "id": "batch_01J9ZB8Q3T",
  "state": "cancelled",
  "counters": {
    "requests": 3,
    "queued": 0,
    "in_progress": 0,
    "completed": 0,
    "failed": 0,
    "expired": 0,
    "cancelled": 3
  },
  "created_at": "2026-10-06T09:12:04Z",
  "finalized_at": "2026-10-06T09:12:31Z",
  "expires_at": "2026-10-07T09:12:31Z",
  "ended_at": "2026-10-06T09:20:12Z",
  "results_url": "https://api.decisionnode.com/v1/batches/batch_01J9ZB8Q3T/results",
  "results_expire_at": "2026-10-13T09:20:12Z",
  "price_factor": 0.5,
  "usage": { "input_tokens": 0, "output_tokens": 0 },
  "error": null
}
  1. Authentication
  2. Path parameters
  3. Request body
  4. Response
  5. Errors
  6. Notes
request
API=https://api.decisionnode.com/v1BATCH=batch_01J9ZB8Q3Tcurl -X POST "$API/batches/$BATCH/cancel" \  -H "Authorization: Bearer $DECISIONNODE_API_KEY"

Errors#

  • 401

    Type
    authentication_error
    When
    The key is missing, unknown or revoked
    What to do
    Check the Authorization header
  • 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 has already ended completed, failed or expired
    What to do
    Nothing to cancel; download its results
  • 429

    Type
    rate_limit_error
    When
    Over your request rate: 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
401authentication_errorThe key is missing, unknown or revokedCheck the Authorization header
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 has already ended completed, failed or expiredNothing to cancel; download its results
429rate_limit_errorOver your request rate: 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.

Notes#

  • Cancelling is safe to repeat: a second cancel returns the batch as it is.
  • Poll the batch after a cancel to see it end. Its results_url is set once nothing is in progress.
  • A cancelled batch's lines that never ran have status "cancelled" and no body.
previousGet batch resultsnextList batches

DecisionNode is built and run by Bynn Intelligence, Inc.

  • Home
  • Playground
  • Examples
  • Console
  • Responsible use
  • Terms
  • Acceptable use
  • Privacy
  • Data processing
  • Defence addendum
  • Cookies