Retrieve task
Last updated September 1, 2026
Look up an asynchronous generation task by ID. Always returns 200; polling only needs status.
Look up an asynchronous generation task by the ID returned at submit time.
https://gateway.amux.ai/v1/tasks/{id}Authorization
headerAuthorizationstringRequiredBearer <your Amux key> An Amux key created in the console. If you lose it, you can view it again on the keys page.
Request
idstringRequiredThe task ID returned at submit time.
Response
200responseThe task as it stands. Terminal states carry output.
404responseNo such task, or it is outside the current workspace.
Both cases intentionally share the same response so task existence cannot be probed across workspaces by trying IDs.
How to poll
Always returns 200, finished or not — the state lives in status, so polling reads one field instead of handling two status codes.
Once status reaches one of the four below it will not change again; stop polling:
| Status | Meaning | Charged |
|---|---|---|
succeeded | Done; output carries the result | Yes, on actual usage |
failed | The upstream refused or errored | No, the reserve is released |
expired | The task did not complete and its result can no longer be retrieved | No, the reserve is released |
canceled | Canceled | No, the reserve is released |
Poll every 2-5 seconds. Images usually finish in 15-120 seconds.
Output links get cleaned up
output.images[].url is a directly usable address. Download anything you need to keep — we clear out old outputs periodically, and afterwards the address returns 404 rather than an "expired link" page.
Not found is a 404
No such task, or it is outside the current workspace — both return the same 404.
Keeping them indistinguishable is deliberate: separating them would let anyone confirm a task exists just by trying an ID from another workspace.
curl https://gateway.amux.ai/v1/tasks/{id} \
-H "Authorization: Bearer $AMUX_API_KEY"{
"id": "task_01M1CG35C16CJ790D00BV1RBVM",
"status": "queued",
"model": "openai/gpt-image-2",
"created_at": "<string>",
"output": {
"images": [
{
"index": 0,
"url": "<string>"
}
],
"videos": [
{
"index": 0,
"url": "<string>"
}
]
},
"usage": {
"input_tokens": 0,
"output_tokens": 0,
"total_tokens": 0,
"output_video_seconds": 0
},
"cost": "0.2108",
"notes": [
"dropped audio: this model decides the soundtrack itself"
],
"error": {
"message": "<string>",
"code": "<string>"
}
}