FetchImageTask
Retrieve the results of image generation tasks.
Try it now
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After the call succeeds, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information of the API. You can use it in the Action element of a RAM permission policy statement to grant RAM users or RAM roles the permission to call this API. For more information, see the following:
-
Action: the specific permission point.
-
Access level: the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: the resource types that support authorization in the operation. For more information, see the following:
- Required resource types are marked with a leading *.
- For operations that do not support resource-level authorization,
All resourcesis used.
-
Condition key: the condition keys defined by the cloud service itself.
-
Dependent action: the other permissions required to successfully perform the operation. The caller must have the permissions of the dependent actions at the same time for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:FetchImageTask | get | *All resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| AgentKey | string | Yes | Unique identifier of the workspace: AgentKey | cd327c3d5d5e44159cc716e23bfa530e_p_beebot_public |
| TaskIdList | array | Yes | List of task IDs | |
| TaskIdList | string | Yes | TaskId, the unique identifier of a task Note You do not need to specify TaskId by default. The system generates it automatically. When the TaskId of subsequent tasks is the same, these tasks belong to the same conversation group. | 9c5ac65f-fcac-416c-81d0-4ab81e1373fd |
| ArticleTaskId | string | Yes | Article task ID | e1be065b-adc3-435e-bd01-1c18c5ed75d3 |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | PlainResult | ||
| Code | string | Status code | success |
| Data | object | Business data | |
| TaskInfoList | array<object> | Image information generated by smart illustration | |
| TaskInfoList | object | ||
| Id | long | Paragraph ID | 1 |
| ImageList | array<object> | Image information | |
| ImageList | object | ||
| Code | string | Error code returned if the image was not generated | NoData |
| Message | string | Error message returned if the image was not generated | Error |
| Url | string | Image URL | http://www.example.com/aaa.png |
| TaskId | string | Task ID, the unique identifier of a task | net-7eb32699000d4193a3c59fc64ae1e55f |
| TaskStatus | string | Current task status. Values: SUCCESSED = task succeeded, FAILED = task failed, CANCELED = task canceled, PENDIN = task queued, SUSPENDE = task suspended, RUNNIN = task in progress | SUCCESSED |
| HttpStatusCode | integer | HTTP status code | 200 |
| Message | string | Error description | success |
| RequestId | string | Unique request identifier | DD656AF9-0839-521A-A3D2-F320009F9C87 |
| Success | boolean | Indicates whether the request succeeded: true for success, false for failure | true |
Examples
Success response
JSON format
{
"Code": "success",
"Data": {
"TaskInfoList": [
{
"Id": 1,
"ImageList": [
{
"Code": "NoData",
"Message": "错误",
"Url": "http://www.example.com/aaa.png"
}
],
"TaskId": "net-7eb32699000d4193a3c59fc64ae1e55f",
"TaskStatus": "SUCCESSED"
}
]
},
"HttpStatusCode": 200,
"Message": "success",
"RequestId": "DD656AF9-0839-521A-A3D2-F320009F9C87",
"Success": true
}
Error codes
Visit the Error Center to view more error codes.