Skip to main content
POST
/
v2
/
tasks
/
{taskId}
/
run
Run a Task
curl --request POST \
  --url https://api.anchorbrowser.io/v2/tasks/{taskId}/run \
  --header 'Content-Type: application/json' \
  --header 'anchor-api-key: <api-key>' \
  --data '
{
  "input_params": {
    "File Name": "invoice-2026-02.pdf",
    "Operation": "extract_text"
  }
}
'
{
  "run_id": "<string>",
  "status": "queued",
  "result": {},
  "error": "<string>",
  "session_id": "<string>"
}

Authorizations

anchor-api-key
string
header
required

API key passed in the header

Path Parameters

taskId
string
required

The ID of the task to run

Body

application/json
input_params
object
required

Key-value pairs of input parameters for the task

identity_id
string

Optional identity ID to use for the task

session_id
string

Optional session ID to run the task in

cleanup_sessions
boolean

Whether to clean up sessions after execution

Response

Task run started successfully

run_id
string
required

The ID of the task run

status
enum<string>
required

Current task run status

Available options:
queued,
running,
success,
failure,
timeout,
cancelled
result
object

Task output when available

error
string

Error message when the run fails

session_id
string

Session ID used for this task run