POST /v1/compute/run
Execute code in a sandboxed environment. The sandbox is ephemeral — it starts fresh for each request — but can read from and write to your agent’s persistent filesystem via/v1/compute/fs.
string
required
The source code to execute. Multiline strings are supported.
string
required
Execution runtime. One of
python, typescript, or bash.integer
Maximum execution time in seconds. Defaults to
30. Maximum 300 (5 minutes). Executions that exceed the timeout are terminated and return a non-zero exit_code.string
Standard output captured during execution.
string
Standard error output. Non-empty stderr does not necessarily mean failure — check
exit_code.integer
Process exit code.
0 indicates success; any other value indicates an error.integer
Wall-clock execution time in milliseconds.
POST /v1/compute/browser/sessions
Open a new headless Chromium browser session. Returns a WebSocket URL you can use to control the browser via the Chrome DevTools Protocol (CDP) or Playwright.string
Optional starting URL. The browser navigates to this page immediately after the session is created. If omitted, the browser opens a blank tab.
string
Unique identifier for the browser session.
string
WebSocket endpoint for CDP control. Connect using Playwright, Puppeteer, or any CDP-compatible client.
string (ISO 8601)
Sessions automatically terminate after 60 minutes of inactivity to avoid runaway billing.
GET /v1/compute/browser/sessions//screenshot
Capture a PNG screenshot of the current state of a browser session. Useful for visual verification and debugging.string
required
The browser session ID returned when the session was created.
string
Base64-encoded PNG image of the browser viewport.
integer
Viewport width in pixels.
integer
Viewport height in pixels.
GET /v1/compute/fs
List files and directories in your agent’s persistent filesystem. The filesystem persists across compute runs and browser sessions, making it ideal for storing intermediate results, downloaded files, and agent state.string
Directory path to list. Defaults to
/ (the root of the agent’s filesystem).PUT /v1/compute/fs
Write a file to your agent’s persistent filesystem. Creates the file if it doesn’t exist; overwrites it if it does. Intermediate directories are created automatically.string
required
Absolute path where the file should be written (e.g.
/reports/summary.txt).string
required
Base64-encoded file content. Maximum file size is 100 MB per write.
Files written to the persistent filesystem are accessible from subsequent
POST /v1/compute/run executions at the same path. Use this to share data between tasks without making network calls.