Skip to main content
POST
/
v1
/
tools
/
perform-web-task
Perform Web Task
curl --request POST \
  --url https://api.anchorbrowser.io/v1/tools/perform-web-task \
  --header 'Content-Type: application/json' \
  --header 'anchor-api-key: <api-key>' \
  --data '{
  "prompt": "<string>"
}'
{
  "data": {
    "result": "<string>"
  }
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Query Parameters

sessionId
string

An optional browser session identifier to reference an existing running browser sessions. When passed, the tool will be executed on the provided browser session.

Body

application/json
prompt
string
required

The task to be autonomously completed.

url
string

The URL of the webpage. If not provided, the tool will use the current page in the session.

agent
enum<string>

The AI agent to use for task completion. Defaults to browser-use.

Available options:
browser-use,
openai-cua
provider
enum<string>

The AI provider to use for task completion.

Available options:
openai,
gemini,
groq,
azure,
xai
model
string

The specific model to use for task completion. see our models page for more information.

detect_elements
boolean

Enable element detection for better interaction accuracy. Improves the agent's ability to identify and interact with UI elements.

human_intervention
boolean

Allow human intervention during task execution. When enabled, the agent can request human input for ambiguous situations.

max_steps
integer

Maximum number of steps the agent can take to complete the task. Defaults to 200.

secret_values
object

Secret values to pass to the agent for secure credential handling. Keys and values are passed as environment variables to the agent.

highlight_elements
boolean

Whether to highlight elements during task execution for better visibility.

output_schema
object

JSON Schema defining the expected structure of the output data.

Response

The result of the autonomous task.

data
object