Retrieve a task

Look up a task by ID. 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 succeeded / failed / expired / canceled it will not change again; stop polling. Poll every 2-5 seconds; images usually finish in 15-120 seconds.

get/v1/tasks/{id}

Request

  • Base URL: https://gateway.amux.ai
  • URL: https://gateway.amux.ai/v1/tasks/{id}
  • Auth: HTTP bearer

Path parameters

idstring required

The task ID returned at submit time.

Response

The task as it stands. Terminal states carry output.

idstring

The task ID. Use it to retrieve the result and to find the call in your logs.

status'queued' | 'running' | 'succeeded' | 'failed' | 'canceled' | 'expired'

The last four are terminal and will not change again.

expired means the task did not complete and its result can no longer be retrieved. Those are not charged and the reserve has been released.

modelstring

The model this task ran on.

created_atstring date-time

When the task was submitted.

coststring

What was actually charged, in USD. Failed and expired are 0.

notesstring[]

What we did to your request. Present only when something was done — no key means it went upstream unchanged.

Two kinds: parameters this upstream does not have were dropped, and a value was filled in for you. There is one case of the latter today: MiniMax text-only generation requires a concrete ratio (adaptive has no material to follow), so 16:9 is sent and noted here.

Example response

{
  "id": "task_01M1CG35C16CJ790D00BV1RBVM",
  "model": "openai/gpt-image-2",
  "cost": "0.2108",
  "notes": [
    "dropped audio: this model decides the soundtrack itself"
  ]
}

Changes

No recorded changes to this operation across all 1 revision of this API.