Skip to main content

Run Task

POST 

/workstations/:workstation_id/browser-use/v1/run-task

Execute a browser task using the browser-use operator. This endpoint starts a new browser automation task and returns a task ID that can be used to track progress or control the task.

Key Features

  • Asynchronous task execution
  • Task progress tracking
  • Screenshot capture during execution
  • Error handling and recovery
  • Multi-step automation workflows

Parameters

  • task: Action for the agent (required)
  • secrets: Dictionary of secrets for the task
  • allowed_domains: List of allowed domains
  • save_browser_data: If set to True, the browser cookies and other data will be saved
  • structured_output_json: JSON schema for structured output

Example Tasks

Basic Navigation and Screenshot:

{
"task": "Navigate to example.com and take a screenshot",
}

Search Engine Interaction:

{
"task": "Search for 'OpenAI' on Google and click the first result",
}

Form Filling with Data Persistence:

{
"task": "Fill out a contact form on a website",
"save_browser_data": true
}

Request

Responses

Task created successfully