查询异步图片任务

GET/v1/async/images/tasks/{task_id}

查询异步图片任务。请轮询至任务进入终态。

身份验证

Authorization Bearer

Path Parameters

task_idstringrequired

以 img_task_ 开头的任务 ID。

Response

idstring

任务 ID。

objectstring

image_generation.task

modelstring

对外模型名。

statusenum<string>
executionenum<string>

请求或实际执行模式。

versioninteger

任务版本。

resultobject

status=completed 时的标准图片响应。

errorobject

status=failed 或 needs_attention 时的错误详情。

error.messagestring

Human-readable error message.

error.codestring

Machine-readable error code.

error.typestring

Error category when returned.

error.stagestring

Processing stage where the error occurred.

error.upstream_http_statusinteger

Provider HTTP status when the error came from upstream.

error.upstream_messagestring

Provider error message when available.

created_atstring

ISO-8601 创建时间。

updated_atstring

ISO-8601 最近更新时间。

completed_atstring

完成时的 ISO-8601 时间。

needs_attention 是终态,表示供应商提交结果不明确。不要使用新幂等 key 创建替代任务;请携带任务 ID 联系 Token360 支持。

请求

Shell
1curl https://api.token360.ai/v1/async/images/tasks/img_task_01abc \
2  -H "Authorization: Bearer sk-your-api-key"

完成响应

JSON
1{
2  "id": "img_task_01abc",
3  "object": "image_generation.task",
4  "model": "gpt-image-2.5-flare",
5  "status": "completed",
6  "execution": "provider",
7  "version": 9,
8  "result": {
9    "data": [{"url": "https://example.invalid/generated/image.png"}]
10  },
11  "created_at": "2026-09-21T12:00:00Z",
12  "updated_at": "2026-09-21T12:00:09Z",
13  "completed_at": "2026-09-21T12:00:09Z"
14}
此页面对您有帮助吗?
查询异步图片任务 · Token360