Create a VM

Create a VM and boot it. Every field but name is optional.

POST /v1/tenants/{tenant}/vms

curl -X POST "https://api.shako.dev/v1/tenants/acme/vms" \
  -H "Authorization: Bearer $SHAKO_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"web1","size":"small"}'

201 (excerpt)

{
  "name": "web1",
  "tenant": "acme",
  "state": "awake",
  "ssh": "web1.acme.shako.dev",
  "vcpus": 1,
  "mem_mib": 2048,
  "disk_gb": 10
}

Authenticate with Authorization: Bearer <API key> on https://api.shako.dev. Role: contributor or owner.

Path parameters

tenantstringrequired
The tenant's name, from GET /v1/tenants.

Request body

namestringrequired
The new VM's name: a-z, 0-9 and single hyphens, starting with a letter, at most 31 characters. It is in the VM's SSH name and in the URLs of its public ports.
sizestring (small, mid, large, xl)default: small
The size: small (1 vCPU, 2 GB memory, 10 GB disk), mid (2 vCPU, 4 GB memory, 20 GB disk), large (4 vCPU, 8 GB memory, 40 GB disk), xl (4 vCPU, 16 GB memory, 80 GB disk).
cpusinteger, 1 to 256
Custom vCPUs: 1 or an even number. They replace the vCPUs of the size.
memorystring
Custom memory, for example "3G" or "2560M". The disk is 5 GB for each GB of memory. It replaces the memory of the size.
imagestringdefault: the current release
The image release, for example "2026.10.27.1".
sleepstring (auto, never)default: auto
When the VM sleeps. auto: when it is quiet. never: it stays on, and it restarts after a reboot or a crash. With both, the sleep and wake endpoints work at once.
idlestringdefault: 15m
The quiet time before the VM sleeps, for example "15m" or "2h".
agentsstring[] (claude, codex, opencode, pi, kiro, openclaw, hermes)default: []
The AI agents or coding agents to put in the VM: claude, codex, opencode, pi, kiro, openclaw, hermes.
desktopbooleandefault: false
true: a screen and a shared browser, for browser use and computer use by the agents. It needs an agent and 4 GB of memory or more (size mid or bigger).
rolestring (contributor, none)default: contributor
The VM's role in its tenant. contributor: from the VM, the shako commands and SSH to the other VMs of the tenant work. none: they do not. SSH into the VM, the internet and its URLs work with both.

Response

201 with the VM object.

Behavior

The answer comes at once, with the VM creating: the box makes its disk and boots it. Ask GET for the VM until its state is awake (its SSH works then), or failed, with the reason in last_error. A VM of the tenant may not have the name already (409 conflict). The VMs of a tenant have a limit (403 quota), and the tenant needs credit (402 no_credit).

The errors. All the endpoints of VMs.