查询图片生成任务的状态和结果
Documentation Index
Fetch the complete documentation index at: https://docs.toapis.com/llms.txt
Use this file to discover all available pages before exploring further.
client_business_id。该字段用于保存您系统内的订单号、流水号或业务任务 ID,方便后续按业务 ID 查询生成结果。
metadata.client_business_id 中,但推荐使用顶层字段。
client_business_id,用于按客户侧业务 ID 查询任务状态和结果。client_business_id,可直接使用同一个状态查询接口:
GET /v1/images/generations/{client_business_id}。业务 ID 会限定在当前 API Key 所属用户下查询。client_business_id 时返回。generation.taskqueued - 排队等待处理in_progress - 处理中completed - 成功完成failed - 失败| 状态 | 说明 | 是否终态 | 建议操作 |
|---|---|---|---|
queued | 任务排队等待处理 | ❌ | 等待 2-3 秒后重试查询 |
in_progress | 任务正在处理中 | ❌ | 等待 3-5 秒后重试查询 |
completed | 任务成功完成 | ✅ | 从 result.data[0].url 获取图片 |
failed | 任务处理失败 | ✅ | 检查 error 信息 |
| 错误码 | 错误类型 | 说明 |
|---|---|---|
| 400 | invalid_request | 请求参数无效 |
| 401 | unauthorized | 认证失败,检查 API Key |
| 402 | insufficient_quota | 余额不足 |
| 404 | task_not_found | 任务不存在 |
| 422 | content_policy_violation | 内容违规 |
| 429 | rate_limit_exceeded | 请求频率超限 |
| 500 | internal_error | 服务器内部错误 |