API 参考
按请求键恢复图像任务
GET
/v1/image-task-requests/{idempotency_key}同 Key 原请求键恢复;未知提交先查询,禁止更换请求键重发。
鉴权与权限
使用当前 GloopAPI Key。模型、功能与权限以当前 Key 的目录及接口说明为准。
Authorization: Bearer $GLOOP_API_KEY鉴权方案: BearerAuth
请求
路径参数
idempotency_keystring必填原图像请求键,按单路径段编码;不能改为新的键。
响应与错误
HTTP 200
按请求键恢复图像任务成功
application/json
- 类型
- object
- 必填字段
modelpromptsizenreferencesidstatuscreated_atupdated_atreserved_quotafinal_quotabilling_statusresults
modelstring必填当前 Key 目录中的公开模型 ID。
promptstring必填生成提示词。
sizestring必填所选 image-models 返回的尺寸值;能力及尺寸按模型分别校验。
ninteger必填请求输出张数,仍受所选模型上限约束。
referencesarray必填生成引用图片列表。
source_task_idstring选填来源任务公开 ID,仅用于追溯。
quote_idstring选填报价公开 ID,创建时必须符合价格与请求绑定。
idstring必填该对象的公开标识符;用于对应详情路径。
statusstring必填unknown 不自动重发,预扣账务可能仍 pending。
- 枚举
["queued","dispatching","running","succeeded","partial_succeeded","failed","unknown","deleted"]
created_atinteger必填Unix 秒创建时间。
updated_atinteger必填Unix 秒最后更新时间。
reserved_quotainteger必填以平台 quota 单位表示的预留额度,不是美元数。
final_quotainteger必填以平台 quota 单位表示的最终费用;null 表示尚未确定。
billing_statusstring必填预留/结算/退回状态,与任务及归档状态分别检查。
error_codestring选填可用于分支处理的公开错误码。
error_messagestring选填经过公开错误分类的用户说明。
resultsarray必填生成输出项;各项归档状态独立。
results 子字段(1)
[]object选填[] 子字段(7)
file_idstring选填同账户同 Key 的托管文件公开 ID。
storage_statusstring选填文件归档状态,ready 后才保证托管下载可用。
storage_errorstring选填文件归档失败的公开分类。
expires_atinteger选填Unix 秒有效期,0 表示不按固定时间到期。
urlstring选填结果或引用的访问 URL;签名 URL 仅短时有效。
b64_jsonstring选填图片 Base64 字符串;不要当成 URL 请求。
revised_promptstring选填返回的修订提示词(若有)。
HTTP 400
请求字段或参数无效。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 401
Key 缺失、无效、过期或已撤销。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 403
IP、账户、模型或工具权限不足。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 404
对象/能力不可用,或功能开关关闭。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 409
幂等/报价冲突、对象未准备或仍被引用。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 429
请求/队列限流。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 500
鉴权或数据存储内部失败。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填
HTTP 503
服务、定价或存储不可用。
application/json
- 类型
- object
- 必填字段
error
errorobject必填error 子字段(4)
codestring选填messagestring选填typestring选填request_idstring选填