Execute code (streaming)
POST /execute/async
POST
/execute/async
Run code and stream stdout/stderr via Server-Sent Events.
Unlike /execute, this spawns a fresh subprocess per request.
Each SSE message is a JSON StreamEvent.
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”object
code
required
Source code to execute.
string
Example
print('hello') context_id
Link execution to an existing context.
string
language
Language runtime to use.
string
timeout_ms
Execution timeout in milliseconds.
integer
Responses
Section titled “ Responses ”SSE stream of execution events.
object
type
required
Event type: 0 = stdout, 1 = stderr, 2 = exit, 3 = error.
integer
data
Line of output text.
string
code
Process exit code (only present on exit events).
integer
Bad request – validation error.
object
message
required
Summary message.
string
Example
Invalid request errors
required
Array<object>
object
field
required
JSON field name that failed validation.
string
error
required
Human-readable validation failure.
string
Internal error.
object
message
required
Human-readable error message.
string