Core concept

The unified sandbox interface

ArenAPI separates portable operations from optional provider capabilities. The core remains predictable while the request can still express richer infrastructure.

Portable operations

OperationRouteGuarantee
CreatePOST /api/v1/sandboxes Returns one ArenAPI identifier
InspectGET /api/v1/sandboxes/:id Normalized lifecycle state
DestroyDELETE /api/v1/sandboxes/:id Idempotent resource release
ExecutePOST /api/v1/sandboxes/:id/exec Output, error output, and exit code
FilesGET or PUT /api/v1/sandboxes/:id/files/*path Binary-safe reads and writes
ArchivePOST /api/v1/sandboxes/:id/archive Gzip-compressed tar archive

Normalized sandbox request

{
  "provider": "auto",
  "image": "python:3.13-slim",
  "template": null,
  "snapshot_id": null,
  "region": "eu-central",
  "resources": {"cpu": 2, "memory_mb": 4096},
  "environment": {"MODE": "preview"},
  "secrets": ["github-token"],
  "network": {"outbound": "deny"},
  "ports": [3000],
  "required_capabilities": ["ports", "network_policy"]
}

Adapters translate supported fields to provider-native concepts. The original request is retained in spec for auditing and portable retries.

Routing semantics

  1. Load enabled provider configurations in ascending priority order.
  2. Filter candidates against every required capability.
  3. Try each eligible adapter until creation succeeds.
  4. Return a clear failure if no configured provider satisfies the request.