---
title: "Perform Web Task"
method: POST
path: "/v1/tools/perform-web-task"
tags: ["AI Tools"]
---

# Perform Web Task

`POST /v1/tools/perform-web-task`

Start from a URL and perform the given task.

## Query parameters

- `sessionId` string

## Request body

- PerformWebTaskRequestSchema
  - `url` string — The URL of the webpage. If not provided, the tool will use the current page in the session.
  - `prompt` string, required — The task to be autonomously completed.
  - `agent` 'browser-use' | 'openai-cua' | 'yutori' — The AI agent to use for task completion. Defaults to browser-use.
  - `provider` 'openai' | 'gemini' | 'groq' | 'azure' | 'xai' — The AI provider to use for task completion.
  - `model` string — The specific model to use for task completion. see our [models](/agentic-browser-control/ai-task-completion#available-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 `200`

The result of the autonomous task.

- PerformWebTaskResponseSchema
  - `data` object
    - `result` string — The outcome or answer produced by the autonomous task.

## Other responses

- `400` — Invalid request.
- `500` — Internal server error.

## Changes

- **2026-03-22** `bf826dc5b3d3` — 1 info
  - added the new `yutori` enum value to the request property `agent`
- **2025-11-11** `209d6495e3ef` — 1 info
  - the `max_steps` request property default value `25` was removed
- **2025-10-28** `e1527756f842` — 4 info
  - added the new optional request property `detect_elements`
  - added the new optional request property `human_intervention`
  - added the new optional request property `max_steps`
  - added the new optional request property `secret_values`
- **2025-10-16** `b7fe7610c0ce` — 1 info
  - the `agent` request property default value `browser-use` was removed

[Change history](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/changes/v1/tools/perform-web-task/post.md)

---

[API](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api.md) · [All operations](https://skmtc.dev/anchorbrowser/apis/anchorbrowser-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/anchorbrowser/anchorbrowser-api/revisions/d0f5aa64f9f4/schema)
