Base URL
/api/v1/browser-tasks still works as an alias — no
action needed if you’re already integrated.
Authentication
All endpoints requireAuthorization: Bearer <PREDEV_API_KEY>. Your
API key is either your SuperTokens solo userId (solo accounts) or
your enterprise org API key (enterprise).
POST / — run a batch
Run one or more browser-agent tasks.
Request body
Response (sync, async=false, default)
Response (async=true)
GET /:id for progress.
Response (stream=true, SSE)
ReturnsContent-Type: text/event-stream. Frames:
:keepalive\n\n). Client disconnect stops the
stream but lets the batch finish server-side.
Error codes
| Status | Meaning |
|---|---|
| 400 | Missing tasks array, too many tasks (>1000), missing url on a task |
| 401 | Missing or invalid Authorization header |
| 402 | Insufficient credits for the batch |
| 429 | Per-user queue depth exceeded (>5000 in-flight) OR SSE pod capacity hit |
| 500 | Internal error |
Idempotency
SendIdempotency-Key: <your-key> header (or idempotencyKey in the
body). A second POST within 24h returns the existing batch instead of
creating a duplicate. Prevents double-charging on network retries.
GET /:id — fetch a batch
Get current state of a batch, including partial results for
still-running tasks.
Query params:
includeEvents=true— return the full per-task timeline (navigation, plans, screenshots, actions, validation, done)
GET / — list batches
List the caller’s batches, newest first.
Query params:
limit(1-100, default 20)skip(default 0)status(“processing” | “completed”)
GET /_system/capacity — live capacity
Real-time snapshot of the queue + sandbox pool. Useful for dashboards.
Task event types (in taskEvents / SSE stream)
type | When | Key data fields | |
|---|---|---|---|
sandbox | Sandbox state | `status: “starting" | "starting_local”` |
navigation | Page loaded | url, title | |
screenshot | Viewport capture | url (S3), mimeType, chunkIndex, chunkCount | |
plan | LLM decided next actions | actions[], notes, done, captchaDetected | |
action | Action executed | type (click/fill/..), selector, success, message | |
waiting | Waiting on something | reason (“cloudflare”, etc.) | |
validation | Schema check passed | ok | |
done | Task terminal state | status, data, durationMs | |
error | Task errored | status, error, durationMs |

