status 为 SUCCESS 或 FAILURE。| 项目 | 说明 |
|---|---|
| 请求方式 | GET |
| 请求路径 | /mj/task/{id}/fetch |
| 认证方式 | Authorization: Bearer {API_KEY} |
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
id | string | 是 | 任务ID(提交类接口返回的 result) |
| 参数 | 类型 | 说明 |
|---|---|---|
id | string | 任务ID |
action | string | 任务类型:IMAGINE、UPSCALE、VARIATION、REROLL、DESCRIBE、BLEND、EDITS 等 |
prompt / promptEn | string | 提示词 / 英文提示词(Describe 任务完成后 promptEn 为反推的提示词) |
status | string | 任务状态:NOT_START、SUBMITTED、IN_PROGRESS、SUCCESS、FAILURE |
progress | string | 进度百分比,如 0%、50%、100% |
imageUrl | string | 生成图片的访问路径(建议使用 GET /mj/image/{id} 接口获取图片) |
failReason | string | 失败原因(仅失败时有值) |
buttons | array | 可执行操作列表,提交 Action 时使用其中的 customId |
buttons[].customId | string | 操作标识,提交 Action 时必须原样传入 |
buttons[].label | string | 按钮显示文本(U1、V2 等) |
submitTime / startTime / finishTime | int64 | 提交 / 开始 / 完成时间戳(毫秒) |
state | string | 提交时传入的自定义参数 |
{
"id": "1781524258075013",
"action": "IMAGINE",
"prompt": "a futuristic cityscape at sunset --v 6.1",
"promptEn": "a futuristic cityscape at sunset --v 6.1",
"description": "提交成功",
"status": "SUCCESS",
"progress": "100%",
"submitTime": 1781524258075,
"startTime": 1781524259689,
"finishTime": 1781524294590,
"imageUrl": "www.yourdomain.com/mj/image/1781524258075013",
"failReason": "",
"buttons": [
{
"customId": "MJ::JOB::upsample::1::675515df-961f-411e-8e9b-d81ac68427f5",
"emoji": "",
"label": "U1",
"type": 2,
"style": 2
}
]
}