处理图片提交回执
未收到图片提交的响应时,使用原请求体和原 Idempotency-Key 确认提交结果。原请求已受理时返回该任务;未受理时返回一个未扣费的失败任务,并确保原请求之后不会再被受理。本接口不会生成图片。
认证
API Key:X-API-Key: <API Key> 或 Authorization: Bearer <API Key>。
示例中的凭证为占位值,请替换后在服务器端运行。
代码示例
curl -X POST 'https://shixux.com/api/v1/image/submissions/resolve' \ -H 'X-API-Key: yb_xxx_yyy' \ -H 'Content-Type: application/json' \ -H 'Idempotency-Key: your-unique-business-action-id' \ -d '{"request":{"mode":"text-to-image","model":"doubao-seedream-5-0-pro-260628","prompt":"A yellow ceramic cup on a plain table.","size":"1024x1024","rate_version":1}}'{ "id": "job_xxx", "type": "tts", "status": "queued", "reserved_credits": 1, "estimate_detail": {}}Idempotency-Key*string幂等键,最长 128 个字符。重试同一请求时使用相同的值;同一个键用于不同的请求时返回 409。
长度
length <= 128application/json- body
request*未收到响应的原始图片请求,须与原提交的请求体一致。
expected_job_id?stringJob ID returned earlier for this submission, or an empty string if none was returned.
返回原任务,或一个未扣费的失败任务
application/json- response
estimate_detail*id*Idreserved_credits*Reserved Creditsstatus*JobStatus可选值
"queued""processing""succeeded""failed""cancelled"type*JobType可选值
"tts""avatar""video""video_analysis""image""voice_design""audio_composition"