openapi: 3.1.0
info:
title: AnchorBrowser Agentic capabilities Tasks API
version: 1.0.0
description: APIs to manage all browser-related actions and configuration.
servers:
- url: https://api.anchorbrowser.io
description: API server
tags:
- name: Tasks
paths:
/v2/tasks/{taskId}/run:
post:
summary: Run a Task
description: 'Triggers execution of a task by ID using the non-deprecated Tasks endpoints.
'
security:
- api_key_header: []
tags:
- Tasks
parameters:
- name: taskId
in: path
required: true
description: The ID of the task to run
schema:
type: string
requestBody:
required: true
content:
application/json:
schema:
$ref: '#/components/schemas/RunTaskV2Request'
examples:
runTaskV2:
summary: Run a task with input parameters
value:
input_params:
File Name: invoice-2026-02.pdf
Operation: extract_text
responses:
'200':
description: Task run started successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskRunStatusV2Response'
'404':
description: Task not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to run task
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
/v2/tasks/runs/{runId}/status:
get:
summary: Get Task Run Status
description: 'Retrieves the current status and result of a task run in the non-deprecated Tasks endpoints.
'
security:
- api_key_header: []
tags:
- Tasks
parameters:
- name: runId
in: path
required: true
description: The ID of the task run
schema:
type: string
responses:
'200':
description: Task run status retrieved successfully
content:
application/json:
schema:
$ref: '#/components/schemas/TaskRunStatusV2Response'
'404':
description: Task run not found
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
'500':
description: Failed to retrieve task run status
content:
application/json:
schema:
$ref: '#/components/schemas/ErrorResponse'
components:
schemas:
TaskRunStatusV2Response:
type: object
properties:
run_id:
type: string
description: The ID of the task run
status:
type: string
enum:
- queued
- running
- success
- failure
- timeout
- cancelled
description: Current task run status
result:
type: object
additionalProperties: true
description: Task output when available
error:
type: string
description: Error message when the run fails
session_id:
type: string
description: Session ID used for this task run
required:
- run_id
- status
RunTaskV2Request:
type: object
properties:
input_params:
type: object
additionalProperties:
type: string
description: Key-value pairs of input parameters for the task
identity_id:
type: string
description: Optional identity ID to use for the task
session_id:
type: string
description: Optional session ID to run the task in
cleanup_sessions:
type: boolean
description: 'Whether to clean up sessions after execution (default: true)'
default: true
required:
- input_params
ErrorResponse:
type: object
properties:
error:
type: object
properties:
code:
type: integer
message:
type: string
securitySchemes:
api_key_header:
type: apiKey
in: header
name: anchor-api-key
description: API key passed in the header