These endpoints cover the full container lifecycle managed byDocumentation 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. All examples use curl with an Authorization header — omit the header if MINIBOX_API_TOKEN is not set on the daemon.
GET /ping
Check that the daemon is alive and responding.200 OK with body Daemon is running
POST /containers/build
Build an OCI image from a MiniBox file content and a context directory path. The request body is limited to 64 MB.Request Body
The name (tag) to assign to the built image. Must be a valid image name (alphanumeric, hyphens, underscores).
Full content of the
MiniBox file as a string. The daemon parses and executes this content.Absolute path on the daemon host to the build context directory. Must fall under a path allowed by
MINIBOX_BUILD_PREFIXES.Response
200 OK — streamed plain text build log using Transfer-Encoding: chunked. Each line is prefixed with the build stage (e.g. [build], [dag], [block], [finalize]).
POST /containers/run
Create and run a new container from a locally built image. The request body is limited to 4 MB.Request Body
Name of the image to run. Must exist in the local
index.json.Command and arguments to execute. If omitted, the image’s default
Entrypoint + CMD is used. If the image has an Entrypoint, the provided command is appended to it.Run in detached mode. Returns the container ID immediately without streaming output.
Memory limit in megabytes. Written to the cgroup
memory.max.CPU quota in cgroup v2
cpu.max units (microseconds per 100ms period).CPU cores the container may use (e.g.
"0,1"). Written to the cgroup cpuset.cpus.I/O weight for the container’s cgroup. Valid range: 1–1000.
OOM killer score adjustment for the container process. Valid range: -1000 to 1000.
Kernel parameters to set inside the container’s network namespace, as a JSON object mapping sysctl key to value (e.g.
{"net.core.somaxconn": "1024"}).Port mappings as a JSON object mapping host port strings to container port strings. Example:
{"8080": "80"}.Environment variables in
KEY=VALUE format.Bind mounts as a JSON object mapping host paths to container paths.
Named volumes as a JSON object mapping volume names to container paths. The daemon creates
DataRoot/volumes/<name> on the host automatically.Allocate a PTY and stream stdin. The daemon hijacks the HTTP connection for raw TCP interaction.
Enable database mode: skips capability drop, mounts devpts and tmpfs, sets high IO weight, and sets OOM score adjustment to -900.
Size of
/dev/shm in megabytes (used when db_mode is true or explicitly requested).Username or UID to run the container process as (e.g.
"nobody" or "1000").Human-readable name for the container. Used for service discovery in compose projects.
Compose project name. Used to group containers for compose operations.
Response
200 OK — In detached mode, the response body is the 8-character hex container ID followed by a newline (plain text). In foreground mode, the response body is the streamed container output as plain text.
POST /containers/exec
Run a command inside a running container by entering its namespaces. The request body is limited to 4 MB.Request Body
The 8-character hex ID of a running container.
Command and arguments to execute inside the container.
Attach stdin/stdout/stderr for interactive use. The daemon hijacks the HTTP connection for raw TCP streaming.
Response
200 OK — command output as plain text (non-interactive), or raw TCP stream (interactive).
GET /containers
List all containers known to the daemon.Response
JSON object mapping container IDs to
ContainerInfo objects.GET /containers/logs
Fetch the stdout/stderr log for a container.The 8-character hex container ID.
Set to
1 to tail the log file and stream new output as it arrives. The response is kept open until the client disconnects.Response
200 OK — plain text log content served directly from DataRoot/containers/<id>/container.log. In follow mode (follow=1), uses Transfer-Encoding: chunked and streams continuously.
GET /containers/stats
Get live cgroup resource stats for a running container.The 8-character hex container ID.
Response
200 OK — JSON object with memory, CPU, PID count, I/O, and network statistics read from cgroup v2 and host veth counters.
POST /containers/stop
Stop a running container with SIGTERM, falling back to SIGKILL after a timeout.The 8-character hex container ID.
Timeout in seconds before SIGKILL is sent. Range: 0–600.
Response
200 OK — Container <id> stopped\n or Container <id> killed (timeout)\n
POST /containers/start
Restart a stopped container using its saved configuration.The 8-character hex container ID of a stopped container.
Response
200 OK — container ID or status message.
POST /containers/kill
Force-kill a container immediately with SIGKILL.The 8-character hex container ID.
Response
200 OK — Container <id> killed\n. Exit code is recorded as 137.
POST /containers/remove
Remove a container record and delete its directory from disk.The 8-character hex container ID.
Response
200 OK — Container <id> removed\n