Sandbox API

API overview

Sandbox Platform HTTP API — gateway intents, auth, and available surfaces.

The Sandbox API is a REST API at the gateway — one hostname per environment (http://localhost:8780 locally, https://sandbox.turing.com in production). L4 products call that host and pick routes by intent (Harbor benchmark, code execution, agent runtime, browser, CI).

New to Sandbox? Start with Get started, then Which API should I call?.

Prerequisites

  • A Sandbox API key (X-Api-Key) or KeyHive team token (Bearer)
  • For Harbor async jobs: GCS-backed artifacts (local: make up with a temp bucket)

Available APIs

APIStatusPrimary routes
Execution catalogGAGET /sandbox/v1/catalog
Harbor v2GA (recommended)POST /sandbox/harbor/v2/run/datapoint, job poll + SSE
Agent RuntimeGAPOST /sandbox/agent/v1/runs, GET /sandbox/agent/v1/agents
CodeEditGAPOST /sandbox/codeedit/v1/executions
BrowserBetaPOST /sandbox/browser/v1/sessions
CI RunnerBetaPOST /sandbox/cirunner/v1/runs
Credential plane adminGAPOST /sandbox/v1/admin/credential-plane/teams
harbor_extensionsBetaOptional on datapoint agents + Agent Runtime bodies

Harbor v1 and unversioned paths remain for compatibility; prefer v2.

Authentication

All /sandbox/* routes require credentials unless noted.

HeaderValueRequired
X-Api-KeyService or break-glass API keyOne of API key or Bearer
AuthorizationBearer <keyhive-team-token>One of API key or Bearer
AuthorizationBearer <keycloak-jwt>Service-to-service (optional)
Content-Typeapplication/jsonFor POST bodies
x-correlation-idStable id per eval run (optional)Gateway honors verbatim; echoed on response; see Observability

Local default API key: dev-local-key (see make setup).

Client SDK

Use SandboxClient from sandbox_core in Python — do not call harbor-worker URLs directly from L4 products.

from sandbox_core.clients.sandbox_client import SandboxClient

client = SandboxClient.from_env()
items = client.catalog(kind="agent")

See Python SandboxClient.

Rate limits

When SANDBOX_L2_SCHEDULER=quota and Redis is configured, concurrent runs are limited per project across gateway replicas. Excess requests may receive 429 with retry guidance.

Downloads

  • OpenAPI YAML
  • Postman: docs/postman/sandbox_platform.postman_collection.json in the repo

Architecture

See Architecture (integrator view) for gateway routing and job lifecycle. Platform HLD/LLD diagrams are maintained in GitHub.

Next steps