Documentation Index
Fetch the complete documentation index at: https://mintlify.com/chaitu426/minibox/llms.txt
Use this file to discover all available pages before exploring further.
miniboxd exposes a plain HTTP API that the minibox CLI uses for all operations. Every CLI command is a thin wrapper over one of these endpoints. You can also call the API directly with curl or any HTTP client for scripting and integration.
Base URL
127.0.0.1 (loopback) by default so the API is not reachable from other hosts. Override with MINIBOX_HTTP_ADDR:
Authentication
Authentication is optional but strongly recommended. WhenMINIBOX_API_TOKEN is set on the daemon, every request must include the token. The daemon accepts it in either of two headers:
- X-API-Token
When
MINIBOX_API_TOKEN is not set on the daemon, all requests are accepted without authentication.Request Body Limits
The daemon enforces per-endpoint request body size limits to prevent resource exhaustion:| Endpoint | Body limit |
|---|---|
POST /containers/run | 4 MB |
POST /containers/exec | 4 MB |
POST /containers/build | 64 MB |
| All other endpoints | No enforced limit |
413 Request Entity Too Large.
Security Headers
Every response from the daemon includes:| Header | Value |
|---|---|
X-Content-Type-Options | nosniff |
secureHeaders middleware that wraps all routes.
All Routes
The following table lists all 17 routes registered ininternal/api/router.go:
| Method | Path | Description |
|---|---|---|
GET | /ping | Daemon health check |
POST | /containers/run | Create and run a container |
POST | /containers/build | Build an image from a MiniBox file |
POST | /containers/exec | Execute a command in a running container |
GET | /containers | List all containers |
GET | /containers/logs | Fetch container logs |
GET | /containers/stats | Get live container resource stats |
POST | /containers/stop | Stop a container (SIGTERM then SIGKILL) |
POST | /containers/start | Start a stopped container |
POST | /containers/kill | Force-kill a container (SIGKILL) |
POST | /containers/remove | Remove a container record and data |
GET | /images | List local images |
POST | /images/pull | Pull an OCI image from a registry |
POST | /images/save | Export an image to a tar archive |
POST | /images/load | Import an image from a tar archive |
POST | /images/remove | Remove an image from the index |
POST | /system/prune | Garbage-collect unused blobs and layers |
Response Format
Most endpoints return plain text for simple confirmations (e.g.Container a1b2c3d4 stopped\n) and JSON for structured data (e.g. GET /containers, GET /images). Endpoints that stream output (build, run foreground) use Transfer-Encoding: chunked with progressive newline-delimited text.
Error responses use standard HTTP status codes with a plain-text body:
| Status | Meaning |
|---|---|
200 OK | Success |
400 Bad Request | Invalid request parameters |
401 Unauthorized | Missing or invalid API token |
404 Not Found | Container or image not found |
500 Internal Server Error | Daemon-side failure |
API Reference Pages
Container Endpoints
/ping, /containers/run, /build, /exec, /logs, /stats, /stop, /start, /kill, /remove
Image Endpoints
/images, /images/pull, /save, /load, /remove, /system/prune