Tasks API
Complete API reference for creating, managing, and executing ML tasks across the bridge network.
Overview
The Tasks API enables users to create, submit, and manage machine learning tasks that can be executed across different compute providers in the bridge network. Tasks represent computational work that needs to be performed using registered ML models.
Task Lifecycle
Created
Task submitted to network
Assigned
Matched with compute provider
Executing
Running on compute infrastructure
Completed
Results available for retrieval
Endpoints
GET /api/tasks
Retrieve a paginated list of tasks with optional filtering by status, model, or user.
POST /api/tasks
Create a new ML task with input data, model selection, and execution parameters.
GET /api/tasks/{id}
Get detailed information about a specific task including status, results, and execution logs.
POST /api/tasks/{id}/cancel
Cancel a pending or executing task. Only available for task creators.
GET /api/tasks/{id}/results
Download the results of a completed task in the specified format.
GET /api/tasks/{id}/logs
Retrieve execution logs and debugging information for a task.
POST /api/tasks/batch
Submit multiple tasks in a single request for batch processing.
Task Status Codes
Active States
Final States
Request Example
Example of creating a new task:
Response Example
Webhooks
Configure webhook URLs to receive real-time updates about task status changes:
- Task assignment notifications
- Execution start/completion events
- Error and failure alerts
- Result availability notifications
Rate Limits
Standard Tier
- 50 tasks per hour
- 10 concurrent executions
- 5 batch requests per hour
Premium Tier
- 500 tasks per hour
- 50 concurrent executions
- 25 batch requests per hour
Error Handling
Common error responses and their meanings: