Skip to main content
POST
/
runs
/
stream
Create Run, Stream Output
curl --request POST \
  --url https://api.b-bot.space/v2/runs/stream \
  --header 'Content-Type: application/json' \
  --data '{
  "assistant_id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "input": {},
  "command": {
    "update": {},
    "resume": {},
    "goto": {
      "node": "<string>",
      "input": {}
    }
  },
  "metadata": {},
  "config": {
    "tags": [
      "<string>"
    ],
    "recursion_limit": 123,
    "configurable": {}
  },
  "context": {},
  "webhook": "<string>",
  "interrupt_before": "*",
  "interrupt_after": "*",
  "stream_mode": [
    "values"
  ],
  "feedback_keys": [
    "<string>"
  ],
  "stream_subgraphs": false,
  "stream_resumable": false,
  "on_completion": "delete",
  "on_disconnect": "cancel",
  "after_seconds": 123,
  "checkpoint_during": false,
  "durability": "async"
}'
"<string>"

Body

application/json

Payload for creating a run.

assistant_id
required

The assistant ID or graph name to run. If using graph name, will default to first assistant created from that graph.

input

The input to the graph.

command
object | null

The input to the graph. The command to run.

metadata
object

Metadata to assign to the run.

config
object

The configuration for the assistant.

context
object

Static context added to the assistant.

webhook
string<uri-reference>

Webhook to call after LangGraph API call is done.

Required string length: 1 - 65536
interrupt_before

Nodes to interrupt immediately before they get executed.

Available options:
*
interrupt_after

Nodes to interrupt immediately after they get executed.

Available options:
*
stream_mode

The stream mode(s) to use.

feedback_keys
string[]

Feedback keys to assign to run.

stream_subgraphs
boolean
default:false

Whether to stream output from subgraphs.

stream_resumable
boolean
default:false

Whether to persist the stream chunks in order to resume the stream later.

on_completion
enum<string>
default:delete

Whether to delete or keep the thread created for a stateless run. Must be one of 'delete' or 'keep'.

Available options:
delete,
keep
on_disconnect
enum<string>
default:cancel

The disconnect mode to use. Must be one of 'cancel' or 'continue'.

Available options:
cancel,
continue
after_seconds
number

The number of seconds to wait before starting the run. Use to schedule future runs.

checkpoint_during
boolean
default:false

Whether to checkpoint during the run.

durability
enum<string>
default:async

Durability level for the run. Must be one of 'sync', 'async', or 'exit'.

Available options:
sync,
async,
exit

Response

Success

The server will send a stream of events in SSE format.

Example event:

id: 1

event: message

data: {}

I