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
- 200
- 400
- 401
- 402
- 422
- 429
- 500
- 503
Task created successfully
Invalid Request Format - check API documentation for proper syntax.
Unauthorized - missing or invalid API key.
Payment Required - you have run out of trial credits or your payment method has expired. Please add payment details to your account.
Unprocessable Entity - cannot find requested asset associated with your API key.
Too Many Requests - you have exceeded the rate limit for your account. Please wait before making additional requests.
Internal Server Error - please retry your request.
Service Unavailable - our servers have dropped the request due to high load - please retry.