Skip to main content
All MuleRouter asynchronous tasks follow the same usage pattern: Create a task via a POST request, then use GET requests to retrieve its latest status and result.

Task response structure

All asynchronous task responses follow the structure below:

Task Information Object

task_info
object
required
Task Information object

Task Result

The corresponding JSON structure is as follows:
{
  "task_info": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "status": "pending",
    "created_at": "2025-09-16T10:00:00Z",
    "updated_at": "2025-09-16T10:00:00Z"
  },
}
When querying, use the task ID to fetch the execution status and result.

Create a task

MuleRouter integrates multiple model vendors. Some requests are synchronous or streaming, while others involve longer inference cycles. To improve the developer experience, we expose these as asynchronous tasks. Create an asynchronous task via POST /vendors/dummy/v1/videos/generation. You will receive a response similar to the following:
{
  "task_info": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "status": "pending",
    "created_at": "2025-09-16T10:00:00Z",
    "updated_at": "2025-09-16T10:00:00Z"
  },
  ...
}

Retrieve task status and result

In the above example, the task ID is 123e4567-e89b-12d3-a456-426614174000. To retrieve the latest status and result for the task ID. Use GET /vendors/dummy/v1/videos/generation/123e4567-e89b-12d3-a456-426614174000. For example, when the task status is completed, you may receive a response like the following:
{
  "task_info": {
    "id": "123e4567-e89b-12d3-a456-426614174000",
    "status": "completed",
    "created_at": "2025-09-16T10:00:00Z",
    "updated_at": "2025-09-16T10:00:00Z"
  },
  "videos": [
    "https://mulerouter.muleusercontent.com/public/079c5ad5-3b81-4eee-af06-4d85029899d0/result_000.mp4"
  ]
}
The exact result payload varies by endpoint, refer to the model documentation. The task info response envelope remains consistent.