Introduction

Sandbox Platform provides isolated Linux environments for AI agents to execute code, run commands, and interact with systems autonomously.

New to Sandbox Platform?

Start with our Quickstart Guide to create your first sandbox in minutes.

Quickstart

Get up and running with Sandbox Platform in just a few steps.

1. Get your API Key

Navigate to the Dashboard and copy your API key from the settings page.

2. Create a Sandbox

Use the API to create a new sandbox environment:

bash
curl -X POST https://sandbox.dev.ab0t.com/api/sandboxes \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "my-first-sandbox",
    "instance_type": "ab0t.medium",
    "docker_image": "ubuntu:latest"
  }'

3. Execute Commands

Once your sandbox is running, execute commands via the API:

bash
curl -X POST https://sandbox.dev.ab0t.com/api/sandboxes/{sandbox_id}/execute \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"command": "echo Hello, World!"}'
You're ready!

Your sandbox is now running. Explore the API reference below for more operations.

Authentication

All API requests require authentication using a Bearer token. Include your API key in the Authorization header:

http
Authorization: Bearer YOUR_API_KEY
Keep your API key secure

Never expose your API key in client-side code or public repositories.

API Reference

The Sandbox Platform API is organized around REST. Our API accepts JSON-encoded request bodies and returns JSON-encoded responses. Sandbox create requests accept either branded tiers like ab0t.medium or canonical runtime types like t3.medium. Responses return both instance_type (canonical runtime value) and instance_tier (branded product value).

Base URL

url
https://sandbox.dev.ab0t.com

Sandbox Endpoints

Sandbox API
Method Endpoint Description
POST /api/sandboxes Create a new sandbox
GET /api/sandboxes List all sandboxes
GET /api/sandboxes/{id} Get sandbox details
POST /api/sandboxes/{id}/start Start a stopped sandbox
POST /api/sandboxes/{id}/stop Stop a running sandbox
POST /api/sandboxes/{id}/reboot Reboot a running sandbox
DELETE /api/sandboxes/{id} Delete a sandbox permanently

POST /api/sandboxes — Request Body

namestringrequiredSandbox name
instance_typestringab0t.microSandbox instance selection. Accepts branded tiers like ab0t.micro or canonical runtime types like t3.micro.
docker_imagestringubuntu:latestDocker image to run
auto_stop_minutesintegerAuto-stop after N minutes idle. Null = never.
environmentobjectEnvironment variables as key-value pairs
metadataobjectArbitrary metadata

Response (201)

sandbox_idstringalwaysUnique sandbox identifier
allocation_idstringalwaysResource allocation ID
statusstringalwayspending | running | stopped | terminated
instance_typestringalwaysCanonical provider/runtime instance type used for execution (for example t3.micro)
instance_tierstringalwaysBranded sandbox tier for product display (for example ab0t.micro)
instance_ipstringSandbox public IP address
api_endpointstringManager API endpoint URL
connection_tokenstringBearer token for manager API auth
hourly_coststringHourly cost in USD
created_atstringISO 8601 timestamp

Command Execution

Execution API
Method Endpoint Description
POST /api/sandboxes/{id}/execute Execute a command in sandbox
GET /api/sandboxes/{id}/metrics Get sandbox metrics (CPU, memory)

POST /api/sandboxes/{id}/execute — Request

commandstringrequiredShell command to execute

Response

stdoutstringStandard output
stderrstringStandard error
exit_codeinteger0Process exit code
execution_time_msintegerWall-clock execution time in ms

File Operations

Files API
Method Endpoint Description
POST /api/sandboxes/{id}/files Save a file to sandbox
POST /api/sandboxes/{id}/upload Upload file to sandbox
GET /api/sandboxes/{id}/download Download workspace archive

POST /api/sandboxes/{id}/files — Request

filenamestringrequiredRelative path under /workspace
contentstringrequiredUTF-8 file content (max 1 MB)

POST /api/sandboxes/{id}/upload

filebinaryrequiredMultipart file upload (max 1 MB)

Cost Management

Costs API
Method Endpoint Description
GET /api/costs/user/{id} Get user cost report
GET /api/costs/organization Get organization cost report
POST /api/costs/limits/user/{id} Set user cost limit

POST /api/costs/limits/user/{id} — Request

monthly_limitnumberrequiredMonthly cost limit in USD

GET /api/costs/user/{id} — Response

entity_idstringUser or org ID
entity_typestring"user" or "organization"
periodstring"daily", "weekly", or "monthly"
total_coststringTotal cost for the period in USD
active_sandboxesintegerCurrently running sandboxes
stopped_sandboxesintegerStopped (but not deleted) sandboxes
breakdownarrayPer-sandbox cost breakdown

Sandboxes

A sandbox is a persistent Linux environment running on dedicated cloud compute. Unlike ephemeral containers, sandboxes survive reboots and have full root access, persistent storage, and dedicated networking.

Lifecycle

Sandboxes move through these states:

StateDescriptionBilling
pendingSandbox provisioningStarts on launch
runningReady for commandsActive
stoppedInstance stopped, storage preservedStorage only
terminatedPermanently deletedNone

Auto-stop

Sandboxes with auto_stop_minutes set will automatically stop after the specified idle time. Idle = no API calls or SSH sessions. Set to 0 to disable.

Instance Types

Choose the right instance type based on your workload:

TypevCPURAMUse CaseCost/hr
ab0t.micro21 GBLight scripts, testing$0.02
ab0t.small22 GBWeb scraping, agents$0.04
ab0t.medium24 GBGeneral development$0.08
ab0t.large28 GBData processing$0.16
ab0t.xlarge416 GBML inference, builds$0.34
ab0t.gpu416 GB + GPUGPU workloads$1.06

Networking

Each sandbox gets a public IP and a DNS entry under your org's domain. Access is controlled via:

  • SSH — Direct SSH access using your uploaded keys or short-lived certificates
  • Manager API — HTTP API on port 1337 for command execution, file operations, and status
  • Proxy — Web-accessible ports routed through the platform proxy with auth

Persistent Storage

Sandbox storage persists across stop/start cycles. The root EBS volume is preserved when you stop a sandbox. Files are only deleted when the sandbox is terminated.

Use POST /api/sandboxes/{id}/upload to upload files and GET /api/sandboxes/{id}/download to download the workspace as an archive.

Containers

Containers are lightweight, ephemeral environments running in the cloud. They start in seconds and are ideal for short-lived tasks. Three types are available:

Browsers

Headless or visible browsers for web automation, scraping, and testing.

bash
curl -X POST https://sandbox.dev.ab0t.com/api/browsers \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"browser_type": "chrome"}'

Available types: firefox, chrome, chromium-headless, selenium-chrome, headless-shell, lightpanda

Desktops

Full Linux desktops with GUI access via the browser. Useful for visual tasks, testing, and demonstrations.

bash
curl -X POST https://sandbox.dev.ab0t.com/api/desktops \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"desktop_type": "alpine-xfce"}'

Available types: alpine-xfce, alpine-kde, ubuntu-xfce, windows

Ephemeral

Lightweight containers for code execution, scripts, and AI agent workloads. The fastest option for short-lived compute.

bash
curl -X POST https://sandbox.dev.ab0t.com/api/ephemeral \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"type": "python", "command": "python -c \"print(42)\""}'

Available types: ubuntu, python, node, go, rust, agent-python, agent-node, alpine, debian, custom

Container Endpoints

Containers API
MethodEndpointDescription
POST /api/browsers Launch a browser container
POST /api/desktops Launch a desktop container
POST /api/ephemeral Launch an ephemeral container
GET /api/containers List all your containers
GET /api/containers/{id} Get container details
DELETE /api/containers/{id} Terminate a container

POST /api/browsers — Request

browser_typeenumfirefoxfirefox | chrome | chromium-headless | selenium-chrome | headless-shell | lightpanda
idle_timeout_minutesinteger30Auto-stop after idle
enable_debug_portbooleantrueEnable CDP debug port for AI agent access
homepage_urlstringDefault homepage URL on launch
cpustringCPU units (e.g. "1024")
memorystringMemory in MB (e.g. "2048")

Browser Response

container_idstringalwaysUnique container ID
browser_typestringBrowser type
statusstringContainer status
statestringprovisioningState machine state
public_urlstringBrowser access URL
access_urlstringFull URL with embedded session token
cdp_urlstringChrome DevTools Protocol URL for AI agents
debug_portintegerCDP debug port number
session_tokenstringAuth token for session
from_poolbooleanfalseWhether assigned from warm pool

POST /api/desktops — Request

desktop_typeenumalpine-xfcealpine-xfce | alpine-kde | ubuntu-xfce | windows
idle_timeout_minutesinteger30Auto-stop after idle
cpustringCPU units (e.g. "2048")
memorystringMemory in MB (e.g. "4096")

POST /api/ephemeral — Request

ephemeral_typeenumubuntuubuntu | alpine | debian | python | node | go | rust | agent-python | agent-node | custom
custom_imagestringDocker image URL (only when type=custom)
commandstringStartup command to run
namestringOptional container name
max_runtime_minutesinteger60Auto-terminate after N minutes
idle_timeout_minutesinteger30Auto-stop after idle
cpustringCPU units (256, 512, 1024, 2048, 4096)
memorystringMemory in MB
volumesarrayVolume mount definitions

SSH Access

New to this? Read SSH Into Your Sandbox — a step-by-step walkthrough from Generate Key in the dashboard to landing in a shell, plus the security model, cert path, and troubleshooting.

Each user manages their own SSH keys, scoped to their current organization. When you create a sandbox, your active public keys are provisioned to ~/.ssh/authorized_keys at first boot. Connect with ssh -i your.pem sandbox@<sandbox-ip>. The full lifecycle (generate, list, rename, delete, plus short-lived certs for power users) is below.

SSH Keys & Certificates API
MethodEndpointDescription
GET /api/ssh-keys List your SSH keys
POST /api/ssh-keys Upload an SSH public key
POST /api/ssh-keys/generate Generate a new SSH key pair
POST /api/ssh/certificates Issue a short-lived SSH certificate

POST /api/ssh-keys — Request

namestringrequiredHuman-readable key name
public_keystringrequiredSSH public key (ssh-rsa, ssh-ed25519, etc.)

POST /api/ssh/certificates — Request

allocation_idstringrequiredSandbox allocation ID
public_keystringrequiredYour SSH public key to certify
requested_usernamestringSSH username (default: sandbox)
ttl_secondsintegerCertificate lifetime (default: 600, max: 1800)

AI Agent Integration

Sandbox Platform is designed for AI agents that need to execute code, browse the web, or interact with desktop applications autonomously.

Recommended Pattern

  1. Create a sandbox or ephemeral container at the start of an agent session
  2. Use /execute for shell commands and /files for reading/writing files
  3. Use browser containers for web research and data extraction
  4. Set auto_stop_minutes to prevent runaway costs
  5. Terminate the environment when the agent session ends

Cost Control

Use POST /api/costs/limits/user/{id} to set per-user spend limits. When billing enforcement is enabled, the platform returns 402 Payment Required when limits are exceeded.

Custom Docker Images

Sandboxes support any Docker image via the docker_image parameter. The image must be publicly accessible or from an authorized registry.

json
{
  "name": "ml-workspace",
  "instance_type": "ab0t.gpu",
  "docker_image": "pytorch/pytorch:2.1.0-cuda12.1-cudnn8-runtime"
}

Ephemeral containers also accept a custom type with your own image URL.

GPU Workloads

For GPU workloads, use ab0t.gpu or ab0t.gpu-pro instance types. These include NVIDIA Tesla T4 GPUs with CUDA drivers pre-installed.

GPU instances are expensive

GPU instances cost $0.53–$0.75/hr. Always set auto_stop_minutes and monitor costs via the dashboard.

Changelog

See the full changelog for version history and release notes.

System Status

Check live platform status at status.ab0t.com. Subscribe to updates for maintenance windows and incident notifications.