background: true on the exec endpoint — continue running inside the capsule until they exit or you stop them. The processes endpoints let you inspect what is running, send signals to terminate processes, and attach a streaming WebSocket to a process that is already underway.
List processes
Authentication
string
required
Your team’s API key.
Path parameters
string
required
The capsule ID.
Response (200)
object[]
Array of process objects.
Python SDK
Kill a process
Path parameters
string
required
The capsule ID.
string
required
A numeric PID (e.g.
42) or a string tag (e.g. bg-a1b2c3d4).Query parameters
string
default:"SIGKILL"
Signal to send to the process. Accepted values:
SIGKILL (immediate termination) or SIGTERM (graceful shutdown request).Response
Returns HTTP 204 with no body on success.Examples
Kill by PID with the default signal (SIGKILL):Python SDK
kill() accepts a PID. To send SIGTERM instead of the default SIGKILL, use the REST API directly with the ?signal=SIGTERM query parameter — the SDK always sends SIGKILL.
Stream a running process
exit message when the process terminates.
This endpoint attaches to an existing process. To start a new process and stream it from the beginning, use the exec/stream endpoint instead.
Path parameters
string
required
The capsule ID.
string
required
A numeric PID or string tag identifying the process to attach to.