---
title: "Run a Browser Task"
method: POST
path: "/ai/evaluate"
tags: ["Browser Automation"]
---

# Run a Browser Task

`POST /ai/evaluate`

## Request

- Base URL: `https://api.anakin.io/v1`
- URL: `https://api.anakin.io/v1/ai/evaluate`
- Auth: API key in header `X-API-Key`

Run a natural-language task in a real cloud browser driven by an AI agent — it navigates, clicks, types, scrolls, and extracts ("find the cheapest 65-inch TV on this site and list its specs", "fill the contact form with …"). Submitted in async mode; returns a workflow ID — poll GET /ai/jobs/{workflow_id} (with a delay in between, this can take minutes; the server hard-caps a run at ~330s) for the result. For login-protected tasks pass session_id from List Browser Sessions. Does not execute payments or transfer funds; such tasks are refused.

## Request body

- BrowserTaskRequest
  - `prompt` string, required: The task in natural language. Be specific about the goal and what to return. Never include passwords or secrets — use session_id for authenticated sites.
  - `async` boolean: Run asynchronously and return a workflow_id to poll, instead of blocking the request until done (the synchronous mode can block for several minutes). Async is recommended for all clients.
  - `url` string: Navigate here before starting. Omit to let the agent follow URLs named in the prompt.
  - `session_id` string: Saved browser-session ID (from List Browser Sessions) so the task runs logged in.
  - `max_steps` integer: Cap on agent steps (navigation/click/type actions).
  - `timeout_ms` integer: Task timeout in milliseconds (server caps runs at ~330s regardless).
  - `output_schema` object: JSON Schema for the result — the agent returns structured data conforming to it.

## Response `202`

Task accepted

- BrowserTaskSubmitResponse
  - `workflow_id` string: The workflow ID — pass to Get Browser Task Result to poll for completion.
  - `status` string

## Other responses

- `400`: Bad request — missing or malformed body
- `401`: Missing or invalid API key

---

[API](https://skmtc.dev/anakin/apis/anakin-api.md) · [All operations](https://skmtc.dev/anakin/apis/anakin-api/llms.txt) · [OpenAPI document](https://skmtc.dev/anakin/apis/anakin-api/revisions/5eda91e679e5?raw)
