http://localhost:9090 (TCP) or http://boxrun (Unix socket)
All endpoints return JSON. Error responses use the format:
Boxes
| Method | Path | Description |
|---|---|---|
POST | /v1/boxes | Create a box |
GET | /v1/boxes | List boxes |
GET | /v1/boxes/{id} | Get box by ID or name |
POST | /v1/boxes/{id}:stop | Stop (preserves disk) |
POST | /v1/boxes/{id}:start | Restart a stopped box |
DELETE | /v1/boxes/{id} | Remove a box |
POST /v1/boxes
Create a new box.Request
image are optional. Image aliases (e.g. "ubuntu" for "ubuntu:24.04") are accepted.
Response (201)
GET /v1/boxes
List all boxes. Optional query parameter:?status=running or ?status=stopped.
DELETE /v1/boxes/
Remove a box. Use?force=true to remove a running box without stopping first.
Exec
| Method | Path | Description |
|---|---|---|
POST | /v1/boxes/{id}/exec | Start a command |
GET | /v1/boxes/{id}/execs | List executions for a box |
GET | /v1/boxes/{id}/exec/{eid} | Get exec status |
GET | /v1/boxes/{id}/exec/{eid}/events | SSE output stream |
POST | /v1/boxes/{id}/exec/{eid}:cancel | Cancel execution |
POST /v1/boxes//exec
Start a command in a box. Onlycmd is required.
Request
Response (201)
GET /v1/boxes//exec//events
Stream execution output in real time using Server-Sent Events (SSE). Event types:log — output from the command:
exit — command finished:
exit event.
Files
| Method | Path | Description |
|---|---|---|
POST | /v1/boxes/{id}/files/upload | Upload a file |
POST | /v1/boxes/{id}/files/download | Download a file |
POST /v1/boxes//files/upload
Upload a file to the box. Uses multipart form data. Form fields:file— the file content (multipart file)dest— destination path inside the box (string)
Response
POST /v1/boxes//files/download
Download a file from the box.Request
Content-Type: application/octet-stream.
Interactive terminal (WebSocket)
| Parameter | Default | Description |
|---|---|---|
shell | /bin/bash | Shell to run |
cols | 80 | Terminal columns |
rows | 24 | Terminal rows |
term | xterm-256color | TERM environment variable |
- Binary frames = raw terminal I/O (stdin/stdout)
- Text frames = JSON control messages
Convenience endpoints
| Method | Path | Description |
|---|---|---|
GET | /v1/info | Server info and resource limits |
POST | /v1/run | Ephemeral one-shot run |
POST | /v1/gc | Garbage collect stopped boxes |
POST /v1/run
Create a box, run a command, return output, destroy the box. Onlyimage and cmd are required.
Request
Response
GET /v1/info
Response
POST /v1/gc
Request
Response

