# 查询异步生图任务状态

按 `task_id` 查询异步生图任务。`status` 取值：

- **queued**：已入队待处理
- **processing**：worker 正在调上游
- **succeeded**：完成，`result` 字段为 OpenAI 形态 `{data:[{url}]}` 响应；图片同时进入画廊
- **failed**：失败，`error` 字段为错误描述，已冻结金额自动退还

建议轮询间隔 3-5 秒。

## GET /v1/images/async/{taskId}

> Get async image task

Look up an async image task by id. `status` is one of:

- **queued**: pending
- **processing**: worker is calling upstream
- **succeeded**: complete; `result` carries the OpenAI-shape `{data:[{url}]}` response and the image is also in the gallery
- **failed**: `error` describes the cause; the freeze is automatically released

Recommended polling interval: 3-5 seconds.

### Authentication

`Authorization: Bearer tr-xxx`

### Path Parameters

- **taskId** `string` **(required)**  
  Task ID (the `id` returned by `POST /v1/images/async`)

### Response

- **id** `string` **(required)**  
  
- **status** ``queued` | `processing` | `succeeded` | `failed`` **(required)**  
  
- **model** `string`  
  
- **created_at** `integer`  
  
- **error** `string`  
  Failure reason; present only when `status=failed`
- **result** `object`  
  
- **result.created** `integer`  
  Creation time (Unix timestamp in seconds)
- **result.data** `object[]`  
  List of generated images
- **result.usage** `object`  
  Token usage (returned by token-billed models such as `gpt-image-2`)

### Error Codes

- `401`: 
- `404`: Task not found or does not belong to the current user
- `429`:
