CreateGeneratedContent
Saves an article created in Miaobi. This operation supports rich 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.
RAM authorization
The following table lists the authorization information of this API. You can use it in the Action element of RAM policy statements to grant RAM users or RAM roles the permission to call this API. Details are as follows:
-
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 for the operation. Details:
- For required resource types, an asterisk (*) is prefixed.
- 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 also have the permissions of the dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:CreateGeneratedContent | create | *All Resources * |
| None |
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| AgentKey | string | Yes | Unique identifier of the workspace: AgentKey | xxx_efm |
| Prompt | string | No | The last generated prompt | Create xxx article |
| TaskId | string | Yes | Unique identifier of the task Note You do not need to specify TaskId. The system automatically generates it. When the same TaskId is specified for subsequent tasks, these tasks belong to the same conversation group. | xxx |
| Title | string | Yes | The title | Hangzhou Asian Games |
| Content | string | Yes | The body of the content, in rich text format | Hangzhou Asian Games |
| ContentDomain | string | No | The domain for content generation | government |
| ContentText | string | No | The body of the content, in plain text format | Hangzhou Asian Games |
| Uuid | string | No | The traceability UUID | xxxx |
| Keywords | array | No | The keywords | |
| Keyword | string | No | A keyword | keyword |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Response result | ||
| Code | string | Status code | success |
| Data | long | Business data | 42 |
| HttpStatusCode | integer | HTTP status code | 200 |
| Message | string | Error message | successful |
| RequestId | string | Unique request identifier | 3f7045e099474ba28ceca1b4eb6d6e21 |
| Success | boolean | Indicates whether the request is successful: true for success, false for failure | false |
Examples
Success response
JSON format
{
"Code": "success",
"Data": 42,
"HttpStatusCode": 200,
"Message": "successful",
"RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
"Success": false
}
Error codes
Visit the Error Center to view more error codes.