API documentation
Get Task Status
Check the current status of a specific task to see if it’s in progress, completed, or what status it has. This is a lightweight endpoint perfect for polling task progress.
GET
This endpoint allows you to check the current status of a task without retrieving the full task object. It’s optimized for frequent polling and returns only essential status information including progress percentage, completion state, and any errors.Documentation Index
Fetch the complete documentation index at: https://docs.blackbox.ai/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
Required - You need a BLACKBOX API Key to use this API. Follow these steps to get your API key:- Click on your Profile Image in the top right corner at cloud.blackbox.ai
- Click on “BLACKBOX API Token” from the dropdown menu
- Copy the existing token or click “Generate” if you don’t have one yet
bb_xxxxxxxxxxxxxxxxxxxxxx
Headers
API Key of the form
Bearer <api_key>.Example: Bearer bb_b41b647ffbfed27f61656049d3eaeef3d903cc503345d9eb80080d98bc0Path Parameters
The unique identifier of the task you want to check the status for.Example:
9qQe2F8Z_nXx9-eJA0BD6Response Fields
Task identifier.
Current status of the task.Possible values:
pending- Task is queued and waiting to startprocessing- Task is currently being executedsaving- Task is saving changescompleted- Task finished successfullyerror- Task failed with an errorstopped- Task was manually stopped by usertimeout- Task exceeded maximum duration
Progress percentage (0-100).
Whether task is currently running (pending/processing/saving).
Whether task has finished (completed/error/stopped/timeout).
Error message if task failed, null otherwise.
ISO 8601 timestamp when task was created.
ISO 8601 timestamp of last update.
ISO 8601 timestamp when task completed, null if still running.
Task duration in seconds (e.g., “900s”) if completed, null otherwise.
Use Cases
Polling for Task Completion
Poll task status until completion with simple logic:Polling with Exponential Backoff
Implement exponential backoff to reduce server load:Python Polling Example
Monitoring Multiple Tasks
Monitor multiple tasks simultaneously:Polling Best Practices
- Use Exponential Backoff: Start with short intervals (1-2 seconds) and increase gradually to reduce server load
- Set Maximum Attempts: Prevent infinite loops by setting a maximum number of polling attempts
- Handle Network Errors: Implement retry logic for failed requests
- Consider Webhooks: For production applications, webhooks are more efficient than polling
- Check
isDoneFlag: Use theisDoneboolean for simple completion checks instead of checking multiple status values - Respect Rate Limits: Avoid polling too frequently; 2-5 second intervals are generally appropriate
Status Values Reference
| Status | Description | inProgress | isDone |
|---|---|---|---|
pending | Task is queued and waiting to start | true | false |
processing | Task is currently being executed | true | false |
saving | Task is saving changes | true | false |
completed | Task finished successfully | false | true |
error | Task failed with an error | false | true |
stopped | Task was manually stopped by user | false | true |
timeout | Task exceeded maximum duration | false | true |
Error Codes
| Status Code | Error | Description |
|---|---|---|
| 200 | Success | Task status retrieved successfully |
| 401 | Unauthorized | Invalid or missing API key |
| 404 | Not Found | Task not found or user does not have access to the task |
| 500 | Internal Server Error | Database error occurred while fetching task status |