Asynchronously generates an image from text.
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.
Try it now
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:GenerateImageTask | create | *All resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| AgentKey | string | Yes | Unique identifier of the workspace: AgentKey | e1be065b-adc3-435e-bd01-1c18c5ed75d3 |
| ParagraphList | array<object> | Yes | The content of the paragraphs. | |
| ParagraphList | object | Yes | ||
| Content | string | Yes | The content of the paragraph. | A perpetually sad cat |
| Id | long | Yes | The paragraph ID. | 1 |
| TaskId | string | No | The unique ID of the 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. | e1be065b-adc3-435e-bd01-1c18c5ed75d3 |
| TaskStatus | string | No | The current status of the task.
| SUCCEEDED |
| Style | string | Yes | The style. Valid values:
| '<auto>' |
| Size | string | Yes | The size of the image to generate. Valid values:
| 1024*1024 |
| ArticleTaskId | string | Yes | The task ID of the article. If you do not have one, you can assign a universally unique identifier (UUID). | e1be065b-adc3-435e-bd01-1c18c5ed75d3 |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | PlainResult | ||
| Code | string | The status code. | successful |
| Data | object | The business data. | |
| TaskList | array<object> | The information about the paragraph tasks, which are associated based on the input paragraph IDs. | |
| TaskList | object | The paragraph object. | |
| Content | string | The content of the paragraph. | A perpetually sad cat |
| Id | long | The paragraph ID. | 1 |
| TaskId | string | The task ID, the unique identifier of the task. | e1be065b-adc3-435e-bd01-1c18c5ed75d3 |
| TaskStatus | string | The current status of the task. SUCCESSED: The task was executed successfully. FAILED: The task failed to be executed. CANCELED: The task was canceled. PENDING: The task is in the queue. SUSPENDED: The task is suspended. RUNNING: The task is in progress. | SUCCEEDED |
| HttpStatusCode | integer | The HTTP status code. | 200 |
| Message | string | The error description. | successful |
| RequestId | string | The unique ID of the request. | F2F366D6-E9FE-1006-BB70-2C650896AAB5 |
| Success | boolean | Indicates whether the request is successful. true indicates success and false indicates failure. | true |
Examples
Success response
JSON format