Skip to main content
POST
Execute a computer action
Execute actions like mouse movements, clicks, keyboard input, and screenshots in the Bytebot desktop environment.

Request

string
required
The type of computer action to perform. Must be one of: move_mouse, trace_mouse, click_mouse, press_mouse, drag_mouse, scroll, type_keys, press_keys, type_text, wait, screenshot, cursor_position.

Mouse Actions

object
required
The target coordinates to move to.
Example Request
array
required
Array of coordinate objects for the mouse path.
array
Keys to hold while moving the mouse along the path.
Example Request
object
The coordinates to click (uses current cursor position if omitted).
string
required
Mouse button to click. Must be one of: left, right, middle.
number
required
Number of clicks to perform.
array
Keys to hold while clicking (e.g., [‘ctrl’, ‘shift’])
Example Request
object
The coordinates to press/release (uses current cursor position if omitted).
string
required
Mouse button to press/release. Must be one of: left, right, middle.
string
required
Whether to press or release the button. Must be one of: up, down.
Example Request
array
required
Array of coordinate objects for the drag path.
string
required
Mouse button to use for dragging. Must be one of: left, right, middle.
array
Keys to hold while dragging.
Example Request
object
The coordinates to scroll at (uses current cursor position if omitted).
string
required
Scroll direction. Must be one of: up, down, left, right.
number
required
Number of scroll steps to perform.
array
Keys to hold while scrolling.
Example Request

Keyboard Actions

array
required
Array of keys to type in sequence.
number
Delay between key presses in milliseconds.
Example Request
array
required
Array of keys to press or release.
string
required
Whether to press or release the keys. Must be one of: up, down.
Example Request
string
required
The text string to type.
number
Delay between characters in milliseconds.
Example Request
string
required
The text to paste. Useful for special characters that aren’t on the standard keyboard.
Example Request

System Actions

number
required
Wait duration in milliseconds.
Example Request
No parameters required.Example Request
No parameters required.Example Request
string
required
The application to switch to. Available options: firefox, 1password, thunderbird, vscode, terminal, desktop, directory.
Example Request
Available Applications:
  • firefox - Mozilla Firefox web browser
  • 1password - Password manager
  • thunderbird - Email client
  • vscode - Visual Studio Code editor
  • terminal - Terminal/console application
  • desktop - Switch to desktop
  • directory - File manager/directory browser

Response

Responses vary based on the action performed:

Default Response

Most actions return a simple success response:

Screenshot Response

Returns the screenshot as a base64 encoded string:

Cursor Position Response

Returns the current cursor position:

Error Response

Code Examples

Body

application/json
action
enum<string>
required
Available options:
move_mouse
coordinates
object
required

Response

Successful response

success
boolean
required
data
object