Execute a command and stream output via SSE
Runs a command and streams stdout/stderr chunks as Server-Sent Events.
Each event is a JSON payload. The final event includes exit_code and
finished: true. A paused sandbox is resumed automatically before the
command runs and stays active afterward.
Documentation Index
Fetch the complete documentation index at: https://docs.superserve.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authorizations
Path Parameters
The unique identifier of the sandbox.
Body
Command to execute. Wrapped in /bin/sh -c unless args is provided.
1If provided, command is used as the binary and args as arguments (no shell wrapping).
Environment variables for the command.
Working directory (default /home/user).
Timeout in seconds.
Response
SSE stream. Each line starting with data: contains a JSON ExecStreamEvent. The final event has finished: true.
A single SSE event payload emitted by the exec/stream endpoint.
stdout/stderr are JSON strings — see ExecResult for the UTF-8
caveat on binary output. The stream also emits SSE comment frames
(: keepalive\n\n) every 15s to keep proxies from closing idle
connections; parsers MUST ignore lines that don't start with data: .
Stdout chunk (present when the process wrote to stdout).
Stderr chunk (present when the process wrote to stderr).
Process exit code (present on the final event).
True on the final event.
Error message if the exec itself failed (present on the final event on error).