Reserve a version
templateID and buildID. The API is POST /v3/templates; it also accepts runtime cpuCount and memoryMB.
Start the build
Save this asbuild.json:
TEMPLATE_ID and BUILD_ID with the reservation values:
fromImage or dockerfile. Dockerfile inputs use Dockerfile text plus context, a byte array containing a tar archive. Context is bounded to 32 MiB compressed and 256 MiB expanded; entries must be regular files or directories with relative paths.
Custom images require a Debian bookworm-compatible userland. Private registry credentials and fromTemplate are rejected. Build secrets are unsupported: keep credentials out of Dockerfiles, context, and startup commands.
Configure startup
OptionalstartCmd and readyCmd are shell commands. The app starts before the prepared checkpoint; readiness must succeed within 60 seconds. Use these fields for your application rather than relying on OCI ENTRYPOINT to replace the machine’s init.
defaultKind selects the default machine kind. Optional buildResources selects builder CPU and memory independently of the published runtime shape. timeoutSeconds accepts 1–3600 seconds; omission defaults to 720.
Wait for readiness
Status iswaiting, building, ready, or error. Continue logs with --offset. A ready template can be used for new machines:

