v1

latestOpenAPI 3.1.02026-07-175096.6 KB
Desktop

Perform an action on the desktop

Executes a computer action such as mouse clicks, keyboard input, or screenshots on the desktop

post/v1/desktop/{id}/computer-action

Path parameters

idstring required

Desktop instance ID to perform the action on

Example:desktop_12345

Headers

x-api-keystring required

API key for authentication

Example:api_12345

Request body

OR
OR
OR
OR
OR
OR
OR
OR

Example request

{
  "type": "click_mouse",
  "x": 500,
  "y": 300,
  "button": "left",
  "num_of_clicks": 1,
  "click_type": "click"
}

Response

Action executed successfully. Response may contain output or image data depending on the action.

outputstring

Raw string output from the executed command (if any)

errorstring

Error message if the operation failed (also indicated by non-2xx HTTP status)

base64_imagestring

Base64 encoded JPEG image data (only returned for screenshot actions)

Example response

{
  "output": "X=500 Y=300",
  "error": "Command failed with code 1: xdotool: command not found",
  "base64_image": "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAEBAQEBAQEBAQEBAQEBAQ..."
}