The forkd controller daemon exposes a JSON/HTTP REST API that lets clients create and manage snapshots, fork sandbox child VMs, execute code inside them, and branch running sandboxes into new snapshots. Every operation that mutates state — forking, branching, deleting — goes through this single endpoint, so all lifecycle events are captured in the daemon’s structured audit log.Documentation Index
Fetch the complete documentation index at: https://mintlify.com/deeplethe/forkd/llms.txt
Use this file to discover all available pages before exploring further.
Base URL
The controller listens onhttp://127.0.0.1:8889 by default. Pass --listen to the daemon to bind a different address or port:
--tls-cert and --tls-key to the daemon. The server switches from plain HTTP to HTTPS; no other change is needed on the client side.
Authentication
All routes except/healthz require a bearer token when the daemon is started with --token-file. Include the token in every request:
--token-file /etc/forkd/token.
Routes that bypass authentication
| Route | Reason |
|---|---|
GET /healthz | Liveness probe — load balancers and Kubernetes readiness probes must reach it without credentials. |
The bypass accepts both
/healthz and /healthz/ (trailing slash). URI
paths are case-sensitive per RFC 3986, so /Healthz and /HEALTHZ still
require a valid token.--token-file is absent, the daemon accepts requests unauthenticated. This is intentional for local development on a loopback-only bind.
Client environment variables
The official Python and TypeScript SDKs, as well as the forkd CLI, read these variables automatically:
| Variable | Purpose |
|---|---|
FORKD_URL | Base URL of the controller, e.g. http://127.0.0.1:8889 |
FORKD_TOKEN | Bearer token value (the file contents, not the file path) |
API versioning
Every URL-breaking change moves to a new/vN prefix. The controller supports the previous major version in parallel for one minor release after the new one ships, giving callers a migration window.
The current version is /v1. All snapshot and sandbox endpoints are rooted at /v1/.
Status endpoints
GET /healthz
Liveness probe. Always returns HTTP 200 and bypasses authentication, so load balancers and Kubernetes probes can check the daemon is up without a credential.
Response
GET /version
Returns the daemon’s build version and active API version string.
Response
GET /metrics
Prometheus text exposition format. Scrape this endpoint with any standard Prometheus-compatible collector.
Stable metric names
| Metric | Type | Description |
|---|---|---|
forkd_snapshots_total | gauge | Number of registered snapshots. |
forkd_sandboxes_active | gauge | Number of currently-alive child VMs. |
forkd_build_info{version="X.Y.Z"} | gauge (always 1) | Build version label; use for alert routing and dashboards. |
Error format
Every4xx and 5xx response carries a JSON body with a single error key:
409 from DELETE /v1/snapshots/:tag names every blocking dependent snapshot by tag so the caller knows exactly what needs to be resolved.
Next steps
Snapshots
Create, inspect, delete, and compact parent VM snapshots.
Sandboxes
Fork children, execute code, eval expressions, and branch live VMs.