Smol Machines

Create a new microVM. Minimal example: {"source":{"type":"image","reference":"alpine:3.20"},"resources":{"cpus":1,"memoryMb":512},"ttlSeconds":3600}. Poll GET /v1/machines/{id} until ready is true before running commands.

Changed on
post/smolmachines/v1/machines

Request

Request body

sourceobject required

Image source. Example: {"type":"image","reference":"alpine:3.20"}

resourcesobject required

CPU and memory allocation. Example: {"cpus":1,"memoryMb":512}

ttlSecondsnumber required

Max machine lifetime in seconds (e.g. 3600 for 1 hour)

namestring

Human-readable machine name

networkobject

Network policy. Example: {"mode":"open"} or {"mode":"blocked"}

envobject

Environment variables as key-value pairs

workdirstring

Working directory inside the VM

autoStopSecondsnumber

Seconds of inactivity before auto-stop

ephemeralboolean

If true, machine is automatically deleted when stopped. Machine boots into running state and is cleaned up after stop or TTL expiry.

mountsstring[]

Volume mounts for persistent storage

Response

Successful response

Changes