Skip to Content

POST /api/v1/browsing/async

Creates a browsing task and returns task_id immediately.

Request body (JSON):

FieldTypeRequiredDescription
taskstringOne of task / scriptNatural-language instruction
scriptstringOne of task / scriptCustom Python snippet — requires API key permission; request access via chat in the dashboard 
filter.country_isostringNoRoute to nodes in a country (e.g. DE, US)
session_keystringNoGroup tasks into a shared session (max 128 chars)
timeoutuint32NoClient timeout in ms (max 3 hours)
fanoutuint32NoNodes to race (1–10, default 1)
screenshots.modestringIf screenshots setfinal_only, every_step, or on_navigation
screenshots.full_pageboolNoFull-page capture (default true)
country_iso_excludestring[]NoExclude countries; RU is added by default
uv_argsstringNoExtra Python packages for custom scripts (max 1024 chars)

Unknown JSON fields are rejected (400).

Response (200):

{ "task_id": "web:550e8400-e29b-41d4-a716-446655440000" }
curl -sS -X POST "https://llm.dat.ai/api/v1/browsing/async" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "task": "Open https://example.com and summarize the page", "filter": { "country_iso": "DE" }, "screenshots": { "mode": "final_only", "full_page": true }, "fanout": 1, "timeout": 600000 }'

POST /api/v1/browsing/sync

Same request body as async. Blocks until the task completes or times out.

Response (200):

{ "task_id": "web:...", "success": true, "payload": { "...": "..." }, "execution_time_ms": 12345 }

On failure, success is false and error contains a message. Timeout returns 504 with "Task timeout".


GET /api/v1/browsing/status

Poll task status and result.

Query: task_id (required)

curl -sS "https://llm.dat.ai/api/v1/browsing/status?task_id=web:YOUR_TASK_ID" \ -H "Authorization: Bearer YOUR_API_KEY"

Response (200):

{ "task_id": "web:...", "status": "completed", "created_at": "2026-01-13T12:34:56Z", "assigned_at": "2026-01-13T12:34:57Z", "started_at": "2026-01-13T12:35:00Z", "completed_at": "2026-01-13T12:35:42Z", "success": true, "payload": { "...": "..." }, "execution_time_ms": 42000 }
statusMeaning
queuedWaiting for a node
assignedNode selected
runningExecuting
completedFinished (includes success, payload, optional error)
failedFailed
cancelledCancelled

success, payload, and error are included only when status is completed.


GET /api/v1/browsing/screenshots/task_id/filename

Download a screenshot captured during a browsing task.

curl -sS "https://llm.dat.ai/api/v1/browsing/screenshots/web%3AYOUR_TASK_ID/step-001.png" \ -H "Authorization: Bearer YOUR_API_KEY" \ -o screenshot.png
  • task_id and filename must be URL-encoded in the path
  • Returns the image file on success (200)
  • 403 if the task belongs to another account
  • 404 if the task or screenshot does not exist

Screenshots are only available when screenshots was set in the create request. Files are kept for up to 3 days, then deleted automatically.