任务信息
请求URL:
/getTaskInfo
请求方式:
- GET
参数:
请求头
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| Authorization | 否 | string | 登录成功后的通讯令牌 |
| 参数名 | 必选 | 类型 | 说明 |
|---|---|---|---|
| custom_task_id | 是 | string | 自定义任务ID |
返回示例
{
"code": 200,
"msg": "",
"data": {
"imageList": [
{
"id": 2,
"taskId": 7,
"path": "https://muyuhan.s3.us-east-1.amazonaws.com/webUI/test/original/thumbnail-image-20250415113249-534103.jpeg",
"origin": "https://muyuhan.s3.us-east-1.amazonaws.com/webUI/test/original/image-20250415113249-534103.jpeg",
"state": 0,
"width": 992,
"height": 992,
"isPublish": 0,
"userId": 1,
"styleId": 1,
"aspectRatio": 3,
"content": "a young girl wearing a bikini, lying in the bedroom",
"seed": 213534645646,
"taskType": 1,
"styleName": "",
"aspectRatioTxt": "",
"favorite": false,
"createdAt": 1744659173
},
{
"id": 3,
"taskId": 7,
"path": "https://muyuhan.s3.us-east-1.amazonaws.com/webUI/test/original/thumbnail-image-20250415113251-431818.jpeg",
"origin": "https://muyuhan.s3.us-east-1.amazonaws.com/webUI/test/original/image-20250415113251-431818.jpeg",
"state": 0,
"width": 992,
"height": 992,
"isPublish": 1,
"userId": 1,
"styleId": 1,
"aspectRatio": 3,
"content": "a young girl wearing a bikini, lying in the bedroom",
"seed": 213534645646,
"taskType": 1,
"styleName": "",
"aspectRatioTxt": "",
"favorite": false,
"createdAt": 1744659173
}
],
"taskInfo": {
"id": 7,
"customTaskId": "f895e1439e35d471d550e54f84a4ba7a",
"userId": 1,
"styleId": 1,
"taskType": 1,
"seed": 213534645646,
"content": "a young girl wearing a bikini, lying in the bedroom",
"covering": "https://muyuhan.s3.us-east-1.amazonaws.com/webUI/test/original/thumbnail-image-20250415113249-534103.jpeg",
"state": 30,
"aspectRatio": 3,
"reason": "",
"cost": 20,
"returnState": 0,
"fileName": "",
"createdAt": 1744687923,
"updatedAt": 1744687972
}
}
}
返回参数说明
| 参数名 | 类型 | 说明 |
|---|---|---|
| code | int | 状态码 |
| msg | string | 提示信息 |
| data | struct | 数据结构体 |
| -imageList | array | 数据列表 |
| --id | int | 图片ID |
| --taskId | int | 任务ID |
| --path | string | 缩略图地址 |
| --origin | string | 原图地址 |
| --state | int | 状态 |
| --width | int | 宽度 |
| --height | int | 高度 |
| --isPublish | int | 是否已发布:1-是;0-否 |
| --userId | int | 用户ID |
| --styleId | int | 风格ID |
| --aspectRatio | int | 宽高比ID |
| --content | string | 提示词 |
| --styleName | string | 风格 |
| --aspectRatioTxt | string | 宽高比 |
| --seed | int | 种子 |
| --favorite | bool | 是否已点赞 |
| --createdAt | int | 生成时间 |
| -taskInfo | struct | 任务信息 |
| --id | int | 任务ID |
| --customTaskId | string | 自定义任务ID |
| --userId | int | 用户ID |
| --styleId | int | 风格ID |
| --taskType | int | 任务类型:1-文生图;2-图生图 |
| --seed | int | 种子 |
| --content | string | 提示词 |
| --covering | string | 任务成功后的封面 |
| --state | int | 任务状态:30-成功;2-失败;10-排队中;20-执行中 |
| --aspectRatio | int | 宽高比ID |
| --reason | string | 失败原因 |
| --cost | float32 | 消耗金币数 |
| --returnState | int | 退款状态:0-未退款;1-已退款 |
| --fileName | string | 图生图时指定的图片名称 |
| --createdAt | int64 | 任务提交时间戳 |
| --updatedAt | int64 | 任务变动时间戳 |
备注 state:5-社区不能展示 6-社区和个人中心都不能展示 30-所有地方都可以展示