Execute command with auto-spawned sandbox

View as Markdown

Run a command over HTTP by automatically provisioning (or reusing) a sandbox session. Use ephemeral=true for stateless execution. Use workspace (name or UUID) for an explicit persistent target. When workspace is omitted, free-tier accounts execute ephemerally and paid accounts resolve or auto-create the account default sandbox workspace.

Authentication

AuthorizationBearer

Bearer authentication of the form Bearer <token>, where token is your auth token.

Request

This endpoint expects an object.
SandboxExecPersistentRequestDocobjectRequired

OpenAPI documentation schema for workspace-backed POST /v1/exec.

OR
SandboxExecEphemeralRequestDocobjectRequired

OpenAPI documentation schema for ephemeral POST /v1/exec.

Response

Command executed
backgroundboolean
commandstring
ephemeralboolean
kindstring
session_idstring
statusstring
command_idstring or null
exit_codeinteger or null>=0
outputstring or null
output_truncatedboolean or null
pidlong or null
workspacestring or null
workspace_idstring or null

Errors

400
Bad Request Error
404
Not Found Error