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

End a session

End a session before it expires. Its context is freed at once, an open socket closes with 1000, and nothing more is billed.

on this page6 sections
  1. Authentication
  2. Path parameters
  3. Request body
  4. Response
  5. Errors
  6. Notes
DELETEhttps://api.decisionnode.com/v1/sessions/{id}
curl -X DELETE \
  https://api.decisionnode.com/v1/sessions/ses_3f9a1c07b2e84d5f6a0c9e12 \
  -H "Authorization: Bearer $DECISIONNODE_API_KEY"

Ends the session, frees its context and closes its socket. Closing the socket yourself ends the session too, so a client that closes its socket need not call this.

Authentication#

Authorizationheaderrequired
Bearer dn_live_..., the same key as every call. A session belongs to the key that opened it: other keys, even in the same workspace, get 404 for it (close code 4404 on the stream).

Path parameters#

idstringrequired
The session_id that Open a session returned, for example ses_3f9a1c07b2e84d5f6a0c9e12.

Request body#

None.

Response#

200 OK with the session's final state. An open socket on the session closes with 1000.

200 OK
{
  "session_id": "ses_3f9a1c07b2e84d5f6a0c9e12",
  "model": "decisionnode-1.0",
  "status": "ended",
  "expires_at": "2026-10-06T09:35:00Z",
  "frames_answered": 412,
  "frames_dropped": 3,
  "frames_cut": 0,
  "last_seq": 415,
  "tokens_billed": 37656
}
session_idstring
The session that ended.
modelstring
The pinned version that answered its frames.
statusstring
"ended".
expires_atstring
When it would have expired.
frames_answeredinteger
Frames that got a reply.
frames_droppedinteger
Frames passed over because a newer one arrived (latest wins).
frames_cutinteger
Older frames that left the window early, so the recent frames fit window_tokens.
last_seqinteger
The seq of the last answered frame.
tokens_billedinteger
Every input token the session billed: the fixed part and each billed frame.
  1. Authentication
  2. Path parameters
  3. Request body
  4. Response
  5. Errors
  6. Notes
request
curl -X DELETE \  https://api.decisionnode.com/v1/sessions/ses_3f9a1c07b2e84d5f6a0c9e12 \  -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 open session with this id belongs to your key
    What to do
    Nothing: it has already ended
  • 429

    Type
    rate_limit_error
    When
    Over your key's request rate
    What to do
    Wait Retry-After seconds, then retry
  • 500

    Type
    api_error
    When
    A fault on our side
    What to do
    Retry with backoff and jitter; it is always safe
Errors this endpoint returns
StatusTypeWhenWhat to do
401authentication_errorThe key is missing, unknown or revokedCheck the Authorization header
404not_found_errorNo open session with this id belongs to your keyNothing: it has already ended
429rate_limit_errorOver your key's request rateWait Retry-After seconds, then retry
500api_errorA fault on our sideRetry with backoff and jitter; it is always safe

Every error body is {"detail": {"error_type": "...", "message": "..."}}, or a list of fields for a 422. Retry 408, 429, 529 and any 5xx, waiting at least what Retry-After says when it is set; fix the request for the other 4xx. All the bodies are on Errors.

Notes#

  • Safe to repeat: a second call gets 404, which means the session has ended. The samples treat it as success.
  • Ending a session bills nothing. What it billed before (the fixed part and each answered frame) stays billed.
  • A session ends on its own at expires_at; call this to free your open-session slot sooner.
previousStream framesnextThe 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