Skip to main content

Execute Command

POST /execute

Executes a command in an available microVM.

NOTE: The 'timeout' parameter is HTTP REQUEST TIMEOUT (how long to wait for response). VM lifetime is controlled by session's vm_lifetime_seconds (set during session creation).

Flow:

  1. First /execute call → spawns VM, schedules kill after vm_lifetime_seconds
  2. Subsequent /execute calls → reuse same VM (until lifetime expires)
  3. After lifetime expires → VM is killed, next /execute spawns new VM

Parameters

NameTypeRequiredDescription
X-API-KeystringNo

Request Body

{
"$ref": "#/components/schemas/CommandRequest"
}

Responses

200

Successful Response

{}

422

Validation Error

{
"$ref": "#/components/schemas/HTTPValidationError"
}