Amux

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.

GEThttps://gateway.amux.ai/v1/tasks/{id}

Authorization

header
AuthorizationstringRequired

Bearer <your Amux key> An Amux key created in the console. If you lose it, you can view it again on the keys page.

Request

idstringRequired

The task ID returned at submit time.

Response

200response

The task as it stands. Terminal states carry output.

404response

No 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:

StatusMeaningCharged
succeededDone; output carries the resultYes, on actual usage
failedThe upstream refused or erroredNo, the reserve is released
expiredThe task did not complete and its result can no longer be retrievedNo, the reserve is released
canceledCanceledNo, the reserve is released

Poll every 2-5 seconds. Images usually finish in 15-120 seconds.

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
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>"
  }
}