Skip to main content
POST
Execute a command on a disk

Authorizations

Authorization
string
header
required

Archil API key, including its key- prefix

Path Parameters

id
string
required

Disk ID (format dsk-{16 hex chars})

Pattern: ^dsk-[0-9a-f]{16}$
Example:

"dsk-0123456789abcdef"

Body

application/json
command
string
required

Shell command to execute inside the microVM

Example:

"ls -la /mnt/archil"

baseImage
string

Public Linux OCI image reference to run the command in, such as python:3.13. Docker Hub shorthand, tags, and digests are accepted. The first exec with an image waits while Archil prepares it; later execs reuse it. Defaults to Archil's exec image when neither this nor imageId is set. Mutually exclusive with imageId.

Example:

"python:3.13"

imageId
string

An image built with Build Image, for private images or to prepare a public image ahead of time. The exec runs the image's latest successful build. Mutually exclusive with baseImage.

Pattern: ^[0-9a-f]{64}$
vcpuCount
integer

vCPUs for the command's microVM. Defaults to 2. An exec larger than the default size (2 vCPU, 4096 MiB) bills as that many multiples of a call, by whichever of vCPU and memory is the larger multiple, rounded up. The Free plan allows only the default size.

Required range: 1 <= x <= 32
Example:

4

memSizeMib
integer

Memory in MiB for the command's microVM. Defaults to 4096. Billed as described for vcpuCount.

Required range: 256 <= x <= 65536
Example:

8192

network
object

Network policy for the command's microVM, using the sandbox firewall egress rules. Egress is unrestricted when omitted. The Free plan cannot set one; a request with one is rejected with 403 network_plan_required.

Response

Command completed

success
boolean
required
Example:

true

data
object
required