POST /v1/sandbox/{chatId}/exec
Run a shell command — Runs a shell command in your chat's isolated code sandbox and returns its output.
ivy_ API key (Authorization: Bearer ivy_… or X-Ivy-Api-Key), a Clerk session JWT (Authorization: Bearer …) or the Clerk __session cookie (browser sessions). See Authentication.Runs a shell command in your chat's isolated code sandbox and returns its output. The working directory defaults to /workspace and the timeout defaults to 30 seconds; requested timeouts above 120 seconds are clamped to 120.
Returns 503 SANDBOX_NOT_READY while the sandbox is still starting; retry after the Retry-After interval.
Request
Path parameters
ID of the chat that owns the sandbox
Request body
Shell command to run
Time budget in seconds. Defaults to 30; values above 120 are clamped to 120.
Working directory. Defaults to /workspace.
Responses
200 OK
exitCode is still HTTP 200)Response shape:
Process exit code; 0 means success
Run time in milliseconds
400 Bad Request
Response shape: object
401 Unauthorized
Response shape: object
403 Forbidden
Response shape: object
404 Not Found
Response shape: object
429 Too Many Requests
Response shape: object
502 Bad Gateway
Response shape: object
503 Service Unavailable
Response shape: object
504 Gateway Timeout
Response shape: object
Was this page helpful?
POST /v1/sandbox/create
Create a sandbox for a chat — Starts your chat's isolated code sandbox. You must own the chat, and campaignId must be that chat's campaign.
POST /v1/sandbox/{chatId}/tool/{toolName}
Run a sandbox tool — Runs a named tool in your chat's isolated code sandbox, for example sandbox_exec, sandbox_python, sandbox_rscript, sandbox_notebook…