Skip to main content

Boxer API (1.0)

Download OpenAPI specification:Download

License: MIT

Sandbox execution service: pull any container image, run arbitrary commands inside gVisor.

files

Download a file from the file store

Download any file by its relative path. To retrieve output files written by a container to /output/, use the path pattern output//.

query Parameters
path
required
string

Relative file path (e.g. output/boxer-abc123/result.json)

Responses

Upload a file to the file store

Multipart upload. The stored file can be referenced by its path in POST /run — it is bind-mounted read-only at / inside the container.

Request Body schema: multipart/form-data
required
file
required
string <binary>

File content

path
required
string

Relative destination path (e.g. workspace/script.py)

Responses

Response samples

Content type
application/json
{
  • "path": "workspace/script.py"
}

system

Health check

Returns {"ok": true} when the service is running

Responses

Response samples

Content type
application/json
{
  • "property1": true,
  • "property2": true
}

execution

Execute a command in a sandboxed container

Pulls the image if not cached, constructs a hardened OCI bundle, and runs the command inside a gVisor sandbox. Files listed in files must be uploaded first via POST /files; each is bind-mounted read-only at / inside the container. Output files written to /output/ inside the container are captured and retrievable via GET /files?path=output// only when persist=true is set; they are deleted by default.

Request Body schema: application/json
required

Execution parameters

cmd
required
Array of strings non-empty
cwd
string
env
Array of strings
files
Array of strings

Files lists relative paths of files previously uploaded via POST /files. Each file is bind-mounted read-only at / inside the container.

image
required
string
object (config.ResourceLimits)
network
string
Default: "none"
Enum: "none" "sandbox" "host"

Network sets the container network mode: none (default, no access), sandbox (isolated NAT namespace), or host (shared host network).

persist
boolean

Persist keeps uploaded input files and captured output files after the run. Default false: all files are deleted once the response is returned.

Responses

Request samples

Content type
application/json
{
  • "cmd": [
    ],
  • "cwd": "/app",
  • "env": [
    ],
  • "files": [
    ],
  • "image": "python:3.12-slim",
  • "limits": {
    },
  • "network": "none",
  • "persist": true
}

Response samples

Content type
application/json
{
  • "exec_id": "boxer-abc123",
  • "exit_code": 0,
  • "stderr": "",
  • "stdout": "hello world\n",
  • "wall_ms": 342
}