The Compute API gives your agent an always-on execution environment. Run code in isolated sandboxes, spin up headless browser sessions for web automation, and persist files across runs on a dedicated filesystem — all without managing infrastructure. Every execution is scoped to your agent and billed per millisecond of active compute.Documentation Index
Fetch the complete documentation index at: https://docs.nonhumans.ai/llms.txt
Use this file to discover all available pages before exploring further.
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.
The source code to execute. Multiline strings are supported.
Execution runtime. One of
python, typescript, or bash.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.Standard output captured during execution.
Standard error output. Non-empty stderr does not necessarily mean failure — check
exit_code.Process exit code.
0 indicates success; any other value indicates an error.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.Optional starting URL. The browser navigates to this page immediately after the session is created. If omitted, the browser opens a blank tab.
Unique identifier for the browser session.
WebSocket endpoint for CDP control. Connect using Playwright, Puppeteer, or any CDP-compatible client.
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.The browser session ID returned when the session was created.
Base64-encoded PNG image of the browser viewport.
Viewport width in pixels.
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.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.Absolute path where the file should be written (e.g.
/reports/summary.txt).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.