Quick Start
Get your API key and start running tasks in minutes.Get your free API key
Unlock your free welcome credits. No credit card required.
Authentication
All API endpoints require authentication via theapikey header:
Two Ways to Use the API
1. Simple Tasks
Run one-shot tasks that execute and return results:2. Session Workflows
For multi-step workflows, create a session and send actions:Session Workflow
Learn how to create sessions, send actions, and poll for results
Polling Mechanism
Understand how to efficiently poll for task results and events
Core Endpoints
| Endpoint | Method | Description |
|---|---|---|
/task | POST | Submit a task or create a session (task=null) |
/task | GET | List all tasks |
/task/{id} | GET | Get task status and results |
/task/{id} | DELETE | Cancel a running task |
/task/{id}/event | POST | Send an event to a running task/session |
Session Actions
When using sessions, send actions viaPOST /task/{id}/event:
| Action | Event Type | Description |
|---|---|---|
| Navigate | browser_action | Go to a URL |
| Extract | browser_action | Extract structured data from the page |
| JavaScript | browser_action | Execute JavaScript in the browser |
| Run Task | session_action | Run an AI-powered task within the session |
| Close | session_action | Close the session |
Session Actions Reference
See complete examples of all session actions
Custom Tools
Extend agent capabilities by registering custom tools:tool_call event. Execute the tool locally and respond via the Event endpoint.
Custom Tools Guide
Complete guide to implementing custom tools with the API
Additional Features
Browser Profiles
Persist cookies and authentication across tasks:Structured Output
Get structured data matching a JSON schema:File Uploads
Pass files to tasks:Response Format
All responses are wrapped in anr field:
Task Status Values
| Status | Description |
|---|---|
waiting | Task is queued |
running | Task is executing |
done | Task completed successfully |
failed | Task failed |
cancelled | Task was cancelled |
Error Handling
| HTTP Code | Meaning |
|---|---|
| 400 | Invalid request parameters |
| 403 | Premium feature not available on your plan |
| 404 | Resource not found |
| 422 | Validation error |
| 429 | Rate limit exceeded or credits exhausted |