Tasks
List Tasks
Retrieve a paginated list of your agent task runs with optional status filtering.
GET
This endpoint returns a paginated list of all agent runs belonging to the authenticated user. You can filter by status and control pagination using
page and limit.
Authentication
To use this API, you need a BLACKBOX API Key. Follow these steps to get your API key:- Go to app.blackbox.ai/agent-api and click Get an API Key (requires a Pro subscription)
- Once provisioning completes, you will be redirected to your Dashboard
- From the Dashboard, create an API key to use with all Agent API requests
sk-xxxxxxxxxxxxxxxxxxxxxx
Headers
API Key of the form
Bearer <api_key>.Example: Bearer sk_b41b647ffbfed27f616560Query Parameters
Page number for pagination.Default:
1Example: page=2Number of tasks to return per page.Range:
1 – 100. Default: 20.Example: limit=50Filter tasks by status. If omitted, all statuses are returned.Available values:
queued— Task is waiting to startrunning— Task is actively executingcompleted— Task finished successfullyfailed— Task encountered an errorcancelled— Task was cancelled by userinterrupted— Task was interrupted
status=runningResponse Fields
Array of task run objects.
Current page number.
Number of items per page used for this request.
Whether there are more tasks beyond the current page.
Use Cases
Paginate Through All Tasks
Monitor Active Tasks
Error Codes
| Status Code | Error | Description |
|---|---|---|
| 200 | Success | Tasks retrieved successfully |
| 401 | Unauthorized | Invalid or missing API key |
| 500 | Internal Server Error | Database error |