Amux AI

Retrieve task

最近更新:2026年10月21日

通过统一任务接口查询 bytedance/seedream-5.0-pro 任务状态、输出图像、图层元数据与实际扣费。

根据任务 ID 查询 bytedance/seedream-5.0-pro 任务状态与输出结果。无论任务是否完成均返回 HTTP 200,请通过 status 字段判断当前状态。

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

鉴权

header
Authorizationstring必填

Bearer <你的 Amux AI 密钥> Amux AI API 密钥。

请求

idstring必填

提交任务时返回的任务 ID。

响应

200response

返回任务当前状态;status 为 succeeded 时包含 output。

404response

任务不存在,或不属于当前工作区。

轮询建议

文生图与图生图通常在 15–60 秒内完成,图层拆分通常耗时 60–90 秒。建议在提交任务 10 秒后开始轮询,间隔 5–10 秒;亦可在提交时携带请求头 Prefer: wait=60 直接等待结果。

输出结果与图层结构

生成的图像位于 output.images;output.videos 字段恒为空数组,不可用于判断任务模态。

启用图层拆分时,output.images 第一项为底图,其后每项对应一个拆分图层,并各自附带驼峰命名的 layer 元数据对象(数据语义对应火山方舟原生格式的 z_index 与 bounding_box,其中 bboxNormalized 为 0–1000 的整数):

{
  "output": {
    "images": [
      { "index": 0, "url": "https://…/task_x-0.jpg", "layer": { "zIndex": 0, "role": "background" } },
      {
        "index": 1,
        "url": "https://…/task_x-1.png",
        "layer": {
          "zIndex": 1,
          "role": "layer",
          "bboxAbsolute": [223, 638, 685, 993],
          "bboxNormalized": [279, 448, 855, 697],
          "name": "咖啡杯",
          "description": "盛有浓缩咖啡的白色陶瓷咖啡杯"
        }
      }
    ],
    "videos": []
  }
}

图像文件访问地址 url 具有时效性,如需长期保存请及时下载。

用量与费用

本模型按图像张数计费,usage 中的三个 Token 字段恒为 0。本次任务的实际结算金额记录在 cost 字段中(图层拆分模式下包含底图与全部拆分图层费用)。

错误处理

错误响应结构与 OpenAI 格式一致,错误类型 type 与重试策略请参见错误与重试。

cURL
curl https://gateway.amux.ai/v1/tasks/{id} \
  -H "Authorization: Bearer $AMUX_API_KEY"
{
  "id": "task_01M5CWPZEAJ6FRGPDM1G7G1V29",
  "status": "queued",
  "model": "bytedance/seedream-5.0-pro",
  "created_at": "2026-10-21T08:25:44Z",
  "output": {
    "images": [
      {
        "index": 0,
        "url": "https://cdn.amux.ai/gen/20261021/task_01M5CWPZEAJ6FRGPDM1G7G1V29-0.jpg",
        "layer": {
          "zIndex": 0,
          "role": "background",
          "bboxAbsolute": [
            0
          ],
          "bboxNormalized": [
            0
          ],
          "name": "<string>",
          "description": "<string>"
        }
      }
    ],
    "videos": [
      {}
    ]
  },
  "usage": {
    "input_tokens": 0,
    "output_tokens": 0,
    "total_tokens": 0
  },
  "cost": "0.043",
  "notes": [
    "dropped seed: this model has no seed parameter"
  ],
  "error": {
    "message": "<string>",
    "code": "<string>"
  }
}