Amux

Retrieve task

最近更新:2026年9月7日

按站内统一形状查 qwen/qwen-image-3.0-pro 的任务结果,带用量与费用。

按提交时返回的 ID 查询一个 qwen/qwen-image-3.0-pro 的任务。无论是否完成均返回 200, 状态在 status 中,轮询只需判断该字段。

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

鉴权

header
Authorizationstring必填

Bearer <你的 Amux 密钥> 站内 API Key。

请求

idstring必填

提交时返回的任务 ID。

响应

200response

任务的当前状态。succeeded 时附带 output

404response

没有该任务,或该任务不属于当前工作区。两种情况返回同一响应,以避免通过跨工作区试探任务 ID 判断其是否存在。

轮询节奏

实测 35–70 秒出图。建议提交后 20 秒内不查询,之后每 5–10 秒一次。

产物读 output.images

产物按类型分组,图像模型的产物在 images 下。videos 字段仍然存在且恒为空数组, 不能用它判断任务模态。

三个 token 字段恒为 0

这个模型按张计价,不产生 token。这次花了多少看 cost

两条取回方式

取回端点响应形状适用场景
GET /api/v1/tasks/{id}百炼原生DashScope 客户端会自行拼接该地址
GET /v1/tasks/{id}站内统一新接入建议使用,附带 usagecost

两者查的是同一个任务,不是两套存储。百炼形状里没有承载用量与费用的字段, 所以那两项只在站内统一端点上给。

错误

错误体形状与 OpenAI 一致,type 取值与重试语义见错误与重试

cURL
curl https://gateway.amux.ai/v1/tasks/{id} \
  -H "Authorization: Bearer $AMUX_API_KEY"
{
  "id": "task_01M1CG35C16CJ790D00BV1RBVM",
  "status": "queued",
  "model": "qwen/qwen-image-3.0-pro",
  "created_at": "2026-09-07T11:25:44Z",
  "output": {
    "images": [
      {
        "index": 0,
        "url": "https://cdn.amux.ai/gen/20260907/task_01M1CG35C16CJ790D00BV1RBVM-0.png"
      }
    ],
    "videos": [
      {}
    ]
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "cost": "0.043",
  "error": {
    "message": "<string>",
    "code": "<string>"
  }
}