Overview
CallPOST /v2/tasks/{taskId}/run with input_params matching the task’s input schema. The response includes run_id and status. By default runs are async — poll for the result, or set sync: true to block until completion.
Basic usage
Request parameters
| Field | Required | Default | Description |
|---|---|---|---|
input_params | Yes | — | Values matching the task’s input schema |
identity_id | No | — | Identity to authenticate before the run. See Identities. |
session_id | No | — | Run inside an existing browser session instead of creating a new one |
cleanup_sessions | No | true | End the browser session when the run finishes |
sync | No | false | Wait for completion; response includes result or error |
version / version_id | No | latest | Task version to run. List versions with GET /v2/tasks/{taskId}/versions. |
identity_skip_validation | No | — | Skip identity validation before the run |
input_params keys must match names from the task’s input schema. Pass cleanup_sessions: false with session_id to keep the session open for follow-up work.
Task config vs session config
Browser settings — proxy, viewport, profile, timeouts, CAPTCHA solver — live in a session config: asession block and a browser block, same schema as starting a browser session.
A task stores its own copy of that schema as task_default_browser_configuration. This is not sent on each run request. It tells Anchor how to configure the browser when it creates a session for you.
| How the run gets a browser | Which config applies |
|---|---|
Omit session_id (default) | Anchor creates a session using the task’s task_default_browser_configuration |
Pass session_id | The existing session’s config — created earlier via POST /v1/sessions or another run |
PATCH /v1/tools/{toolId} (or task_browser_default_configuration on POST /v2/tasks/generate):
task_default_browser_configuration to null to clear it. Per-run, the only session-related fields on /run are session_id (use an existing session) and identity_id (authenticate that session). Everything else comes from the task default or the session you created.
See Proxy, Session timeout, and CAPTCHA solving for common session and browser options.
Get results
Sync — add"sync": true to the run request. The response includes result on success or error on failure.
Async (default) — poll GET /v2/tasks/runs/{runId}/status until status is success, failure, timeout, or cancelled.
node.js
python
sync: true instead of JSON.
Next steps
- Creating a Task — create tasks from a demonstration or prompt
- Automation Tasks Overview — UI walkthrough of workflows, runs, and self-healing
- API Reference — full endpoint schemas

