Skip to main content
POST
Run a command and stream its output

Authorizations

Authorization
string
header
required

A Cool Computers API key, user access token, or claimed agent access token in the Authorization header. Follow https://www.cool.computer/auth.md for agent registration and https://www.cool.computer/authentication.md for direct user credentials.

Path Parameters

id
string
required

Stable public computer identifier.

Minimum string length: 1
Example:

"cmp_123"

Body

application/json
command
string
required
Minimum string length: 1
execution_id
string

Optional caller identity bound to the target computer. Omit it and the server mints one, returned in the first frame.

Pattern: ^cmp_[0-9a-f]{24}\.exec\.[0-9a-f]{32}$
after_id
integer
Required range: x >= 0
cwd
string

Existing absolute directory without symlinks.

uid
integer
Required range: x >= 0
gid
integer
Required range: x >= 0
shell
string | null
stdin_base64
string

Standard input, base64-encoded.

env
object

Response

Newline-delimited output frames and one final result.

type
enum<string>
required
Available options:
pid,
stdout,
stderr,
drop,
exit,
error
Allowed value: "pid"
status
enum<string>
required
Available options:
running,
succeeded,
failed,
cancelled,
owner_lost
Allowed value: "running"
execution_id
string
required
Pattern: ^cmp_[0-9a-f]{24}\.exec\.[0-9a-f]{32}$
pid
integer
required
Required range: x >= 1
id
integer

Monotonic replay cursor present only on stdout, stderr, and drop frames.

Required range: x >= 1
timestamp
string<date-time>
stdout
string
stderr
string
dropped_bytes
integer
Required range: x >= 0
dropped_frames
integer
Required range: x >= 0
exit_code
integer
signal
string
code
string
error
string