PandaStack

REST API

All PandaStack HTTP endpoints, indexed.

Base URL: https://api-dev.pandastack.ai/v1

All requests require either:

  • Authorization: Bearer <jwt-or-api-key> header, or
  • ?access_token=<jwt-or-api-key> query parameter (for SSE / WebSocket where headers can't be set)

All responses are JSON. Errors follow the error envelope.

Sandboxes

MethodPathDescription
POST/sandboxesCreate a sandbox
GET/sandboxesList sandboxes (filter by ?template=, ?status=)
GET/sandboxes/{id}Describe a sandbox
DELETE/sandboxes/{id}Delete a sandbox
POST/sandboxes/{id}/pausePause (state stays in RAM)
POST/sandboxes/{id}/resumeResume from pause
POST/sandboxes/{id}/hibernateSnapshot to disk, free RAM
POST/sandboxes/{id}/wakeRestore from hibernation
POST/sandboxes/{id}/forkFork into a new sandbox
POST/sandboxes/{id}/snapshotCreate a named snapshot
GET/sandboxes/{id}/logs?follow=1Stream serial console logs (SSE)
GET/sandboxes/{id}/events?follow=1&tail=200Stream lifecycle events (SSE)

Create sandbox

POST /v1/sandboxes
{
  "template": "code-interpreter",
  "cpu": 1,
  "memory_mb": 512,
  "metadata": {"user_id": "u_123"},
  "volumes": [{"id": "vol_xxx", "mount": "/mnt/data"}],
  "egress_allowlist": ["api.openai.com", "pypi.org"]
}

Response (201):

{
  "id": "sb_d288f706...",
  "status": "running",
  "template": "code-interpreter",
  "created_at": "2025-11-21T10:00:00Z",
  "boot_ms": 285
}

Exec & files

MethodPathDescription
POST/sandboxes/{id}/execRun a command, wait, return result
POST/sandboxes/{id}/exec/streamStream stdout/stderr via SSE
WS/sandboxes/{id}/exec/pty?rows=&cols=Interactive PTY
GET/sandboxes/{id}/files?path=Read file
PUT/sandboxes/{id}/files?path=Write file
DELETE/sandboxes/{id}/files?path=Delete file
GET/sandboxes/{id}/files/ls?path=List directory

Templates

MethodPathDescription
GET/templatesList templates
GET/templates/{name}Get template details
POST/templatesBuild a new template
DELETE/templates/{name}Delete a template

Volumes

MethodPathDescription
POST/volumesCreate volume
GET/volumesList volumes
GET/volumes/{id}Describe volume
DELETE/volumes/{id}Delete volume

LSP

MethodPathDescription
WS/sandboxes/{id}/lsp/{lang}LSP bridge (python, typescript, go, rust)

Auth

MethodPathDescription
GET/auth/whoamiIdentity + workspace
GET/auth/tokensList API tokens
POST/auth/tokensCreate token
DELETE/auth/tokens/{id}Revoke token

OpenAPI spec

Machine-readable: /openapi.json

On this page