All MuleRouter asynchronous tasks follow the same usage pattern: Create a task via aDocumentation Index
Fetch the complete documentation index at: https://mulerouter.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
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 Information object
Task Result
The corresponding JSON structure is as follows: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 viaPOST /vendors/dummy/v1/videos/generation.
You will receive a response similar to the following:
Retrieve task status and result
In the above example, the task ID is123e4567-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 succeeded, you may receive a response like the following:
Failed tasks
If a task finishes withstatus: "failed", the response includes an error object describing what went wrong. The HTTP status of the GET itself is still 200 — the lookup succeeded, the task it describes did not.
error_code is the authoritative signal for what went wrong. The most common codes for failed async tasks are:
3001–3005: the upstream model provider could not complete the task.4002,4008: a MuleRouter-side error occurred while running the task.
Task lifecycle
| Status | Meaning |
|---|---|
queued | Task accepted and waiting to be picked up by a worker. |
running | A worker has claimed the task and is executing it. |
succeeded | Task finished successfully. The result payload (endpoint-specific) is present. |
failed | Task ended with an error. An error object is present. |
queued / running once — once it is succeeded or failed, it stays in that state.
Common errors
| Situation | Where it surfaces | Code |
|---|---|---|
POST body fails validation | POST returns 400 synchronously | 2001–2004 |
| Required file too large or wrong format | POST returns 400 synchronously | 2101–2103 |
task_id in GET does not exist | GET returns 404 synchronously | 2005 |
| Caller has no balance / over quota | POST returns 402 / 429 synchronously | 1003–1005 |
| Upstream provider could not complete the task | GET returns 200 with status: failed | 3001–3005 |
| Server-side error while running the task | GET returns 200 with status: failed | 4002, 4008 |

