ready state, you can run shell commands, read and write files, give a service an HTTPS URL, and open the machine’s desktop. Check GET /api/v1/machines/:id before these operations. A machine remains ready while commands run; there is no separate running state.
Run a command
POST /api/v1/machines/:id/commands executes a shell command on the machine and waits for it to complete. Requires compute:run.
Run a shell command
Request body
Response fields
Read a file
GET /api/v1/machines/:id/files?path=<PATH> reads a file from the machine’s filesystem as text or base64. Requires compute:read.
Pass encoding=utf8 or encoding=base64 in the query. The JSON response contains path, encoding, size, and content.
The equivalent MCP tool is read_machine_file.
Write a file
PUT /api/v1/machines/:id/files creates or replaces a file under /home/user or /tmp. Requires compute:run. Send a JSON body with path, content, and optional encoding (utf8 or base64). The response contains path and size.
Write a file
write_machine_file.
Expose a port
POST /api/v1/machines/:id/ports gives a service running on the machine a stable HTTPS URL. URLs require an access token by default. Set public: true to allow anyone with the URL to open it. Requires compute:run.
The equivalent MCP tool is host_machine_port.
Request body
Response fields
Open the desktop
POST /api/v1/machines/:id/desktop returns a short-lived URL for browser-based desktop access to the machine. Requires compute:admin.
The equivalent MCP tool is get_machine_desktop.