跳转到主要内容
GET
/
v1
/
images
/
tasks
/
{task_id}
查询任务状态
curl --request GET \
  --url https://openapi.imini.ai/imini/router/v1/images/tasks/{task_id} \
  --header 'Authorization: Bearer <token>'
{
  "task_id": "task_8f3a2c1b9d4e",
  "status": "succeeded",
  "model": "google/nano-banana-2",
  "created_at": "2026-03-30T10:00:00Z",
  "completed_at": "2026-03-30T10:00:12Z",
  "images": [
    {
      "url": "https://file.iminicdn.com/file/2026/04/06/2041350421116751872.png",
      "width": 1920,
      "height": 1080
    }
  ],
  "error": null,
  "request_id": "req_abc123"
}

授权

Authorization
string
header
必填

在请求 Header 中传入 Authorization: Bearer <YOUR_API_KEY>。前往 API Keys 管理页 创建和管理 API Key。

路径参数

task_id
string
必填

任务唯一 ID,由图像生成接口返回。

示例:

"task_8f3a2c1b9d4e"

响应

查询成功

task_id
string

任务唯一 ID

示例:

"task_8f3a2c1b9d4e"

status
enum<string>

任务状态:

  • queued — 已提交,等待队列
  • processing — 模型生成中
  • succeeded — 生成成功
  • failed — 生成失败,见 error 字段
可用选项:
queued,
processing,
succeeded,
failed
示例:

"succeeded"

model
string

本次任务使用的模型 ID

示例:

"google/nano-banana-2"

created_at
string<date-time>

任务创建时间(ISO 8601)

示例:

"2026-03-30T10:00:00Z"

completed_at
string<date-time> | null

任务完成时间(ISO 8601),未完成时为 null

示例:

"2026-03-30T10:00:12Z"

images
object[] | null

生成结果列表,statussucceeded 时有值,否则为 null

error
object

错误信息,statusfailed 时有值,否则为 null

request_id
string

请求唯一 ID

示例:

"req_abc123"