Run a command
Run one command inside the running instance’s workload container, as root,
and receive its output. Each call starts a fresh /bin/sh, so chain steps
with && or run a script. Stdout and stderr are returned up to 1 MiB each;
stdout_truncated or stderr_truncated is set when output was cut.
A command stops after timeout_seconds (default 60, up to 300). Up to 2
commands run at once per instance and 4 per account. Running commands has
no separate charge.
Authentication
AuthorizationBearer
Pass your EmpirioLabs API key as a bearer token. The Anthropic-style
x-api-key header is also accepted on every endpoint.
Path parameters
instance_id
GPU instance id.
Request
This endpoint expects an object.
command
The shell command to run, up to 16384 bytes.
timeout_seconds
Seconds before the command is stopped.
Response
The command ran. A non-zero exit_code is the command’s own result.
exit_code
The command's exit status, or null when it was stopped at the deadline.
stdout
stderr
stdout_truncated
stderr_truncated
timed_out
duration_ms
Errors
400
Bad Request Error
404
Not Found Error
409
Conflict Error
413
Content Too Large Error
429
Too Many Requests Error
503
Service Unavailable Error
