取消异步图片任务

POST/v1/async/images/tasks/{task_id}/cancel

尽力取消异步图片任务。响应始终反映任务当前的真实状态。

排队中的任务通常会变为 cancelled。已经提交给供应商的任务可能变为 cancel_requested,之后仍可能进入 completed 或 failed。

身份验证

Authorization Bearer

Path Parameters

task_idstringrequired

以 img_task_ 开头的任务 ID。

Response

idstring

任务 ID。

objectstring

image_generation.task

statusstring

cancelled、cancel_requested 或已有终态。

modelstring

对外模型名。

executionstring

请求或实际执行模式。

versioninteger

任务版本。

请求

Shell
1curl -X POST https://api.token360.ai/v1/async/images/tasks/img_task_01abc/cancel \
2  -H "Authorization: Bearer sk-your-api-key"
此页面对您有帮助吗?
取消异步图片任务 · Token360