Overview
Skylight instances are designed for programmatic control, meaning you don’t need a physical mouse or keyboard to operate the desktop. To enable this, the Interactions API provides a variety of endpoints for performing actions on the virtual machine. The API can be used for manual Robotic Process Automation (RPA) or integrated into computer-use agents (for more information, see Agents).Available Operations
- screenshot - Take a screenshot
- click - Perform a mouse click
- move - Move the mouse cursor
- drag - Perform a drag operation
- scroll - Scroll the screen
- type - Type text
- keypress - Press keys simultaneously
- get_file - Download a file from the VM
- install - Install applications
screenshot
Take a screenshot of the virtual desktop.screenshot returns a JSON with an ‘image’ key. The value is a Base64-encoded JPEG image of the instance screenshot (1366x768).
click
Perform a click operation at specified coordinates or current position.click returns a JSON with two keys: ‘status’ (e.g. “Success”) and ‘message’.
move
Move the mouse to the specified coordinates.move returns a JSON with two keys: ‘status’ (e.g. “Success”) and ‘message’.
drag
Perform a drag operation along a path of coordinates.drag returns a JSON with two keys: ‘status’ (e.g. “Success”) and ‘message’.
scroll
Scroll at the specified coordinates.scroll returns a JSON with two keys: ‘status’ (e.g. “Success”) and ‘message’.
type
Type the specified text with optional delay between keystrokes.type returns a JSON with two keys: ‘status’ (e.g. “Success”) and ‘message’.
keypress
Press the specified keys simultaneously.keypress returns a JSON with two keys: ‘status’ (e.g. “Success”) and ‘message’.
get_file
Get a URL to download the file.get_file returns a JSON with two keys: ‘download_url’ and ‘expires_in’.
install
Install additional software packages using the Chocolatey package manager.install takes in a list of Chocolatey package names to install. A complete list of available packages can be found at https://community.chocolatey.org/packages.
install endpoint returns a JSON with these properties: