Fork a machine.
Changed onCreates a running copy-on-write clone of a forkable golden machine, inheriting its memory and filesystem state. Requires the machine:create scope.
Request
- Base URLhttps://api.smolmachines.com
- AuthHTTP bearer
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
Forkable golden machine id
Request body
Materialize the child as another checkpoint source so it can execute, reach a later decision point, and branch again. This pays one eager guest memory copy while the child boots; its descendants remain copy-on-write.
Keep the source paused as a reusable branch base instead of resuming it. Later branches restore the same checkpoint, and a frozen source no longer counts toward the concurrency cap. It cannot execute again; stop it, or work in its children.
Labels for the child. Omitted = copy the source's labels; supplied (even empty) = use exactly these.
Name for the new child machine.
Response
Clone created
The machine's actual CPU arch (arm64/amd64): the arch of the node it runs on, falling back to source.arch (a .smolmachine's pinned arch) when the machine is unplaced or its node is gone. None only when neither is known. Lets the console show an arch badge for every machine, including ones whose source pinned no arch. Populated by the server's machine_info.
Zero for a root branch source, one for its children, and so on.
User-visible state of a live-RAM checkpoint.
Whether this machine can produce live copy-on-write branches.
User-visible state of a live-RAM checkpoint.
The account id of whoever created the machine; null when nobody is.
When [Self::state] is "error", a human-readable reason the machine failed — the latest control-plane error event (e.g. "start failed: …", "auto-start failed: …", or "machine stuck in creating state"). null for machines that are not in an error state. Gives clients something actionable instead of a bare error with no explanation.
Legacy alias for branch_generation.
Legacy alias for branchable.
Labels set at create time (or inherited from a branch source).
Immediate live-RAM checkpoint this machine was branched from. null for ordinary machines and root checkpoints.
Whether the machine is READY to do work. state == "started" only means the VM process launched on the node — the guest OS and your in-VM workload still need a moment to boot. ready becomes true once the guest agent is reachable (an exec/connect will succeed) and, if the machine publishes a port, that port is accepting connections. Wait for ready (poll GET /v1/machines/:id) before expecting an in-guest worker to have started or before connecting to it — do NOT act on started alone.
When a probe first observed this machine serving (RFC3339), or null.
This is a readiness gate, not a boot timestamp: it is stamped when the published port accepts a connection (or, for a machine with no published ports, when its guest agent answers), and it is cleared on every stop so a restart must re-prove itself. A short-lived machine may finish its whole life as null here without anything being wrong. Use createdAt if you want when the machine came into existence.
Root source for this live branch lineage. A root points to itself; ordinary machines have no lineage.
Legacy alias for root_branch_id.
Public ingress URL for the machine's first published port, when the machine is started and the control plane has a public base URL configured. null for stopped machines, machines with no published port, or when the deployment exposes no public base URL.
Changes
- info
endpoint added
- info