Skip to main content
POST
Start a command

Authorizations

Authorization
string
header
required

An API key (fb_live_…)

Path Parameters

id
string
required

The sandbox's ID (sbx-…).

Body

application/json
command
string[]
required

The program and its arguments.

Minimum array length: 1
cwd
string

The directory it runs in.

env
object

Environment variables for this command only, on top of the sandbox's.

stdin
boolean

true to write to its standard input later.

timeout_sec
integer

Stop it after this many seconds.

keep
boolean

true to run it on its own, across sleep and wake (detached).

secrets
string[]

Stored secrets this command alone gets as environment variables, by name

Response

Success

command_id
string
required

The command's ID.

command
string[]
required

The program and its arguments.

status
enum<string>
required

Its current state.

Available options:
running,
exited,
killed,
lost,
detached
exit_code
integer | null
required

Its exit code, once it has ended.

started_at
string
required

When it started.

ended_at
string | null
required

When it ended.

stdout_bytes
integer
required

Bytes written to standard output so far.

stderr_bytes
integer
required

Bytes written to standard error so far.

keep
boolean

true to run it on its own, across sleep and wake (detached).

pid
integer | null

A kept command's process ID in the sandbox.

log
string | null

A kept command's output file in the sandbox.