RunDocWashing
Rewrites an article in a specified style.
Debug
You can run this API directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After a successful run, OpenAPI Explorer can automatically generate SDK code examples.
Authorization information
The following table describes the authorization information for this API. You can use the Action element in RAM permission policy statements to grant RAM users or RAM roles the permission to call this API. For more information:
-
Operation: the specific permission.
-
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. For more information:
- Required resource types are marked with a leading asterisk (*).
- 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: other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Operation | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunDocWashing | get | *All Resources * |
| None |
Request syntax
POST /quanmiao/aimiaobi/runDocWashing HTTP/1.1
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Unique identifier of the Alibaba Cloud Model Studio workspace: Get Workspace ID | llm-2setzb9x4ewsd |
| SessionId | string | No | Channel ID | 3f7045e099474ba28ceca1b4eb6d6e21 |
| WritingTypeName | string | No | Writing style type name | Xiaohongshu style, WeChat Moments style, Professional news style, Government official document style, Newspaper article style, Opinion letter style |
| WritingTypeRefDoc | string | No | Example article for the writing style | If not empty, this value takes precedence |
| ReferenceContent | string | Yes | The article to rewrite | Article content |
| Topic | string | No | Topic of the rewritten article | Yunnan tourism topic |
| WordNumber | integer | No | Required word count after rewriting | 500 |
| Prompt | string | No | Additional prompt requirements | Output in English |
| ModelId | string | No | Model ID | quanmiao-max, quanmiao-plus |
Response parameters
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 1813ceee-7fe5-41b4-87e5-982a4d18cca5 |
| End | boolean | Whether the response package has ended | false |
| Header | object | Response header | |
| Event | string | Event type | task-finished |
| EventInfo | string | Event description | Model generation event |
| RequestId | string | Request RequestId | 3f7045e099474ba28ceca1b4eb6d6e21 |
| SessionId | string | Session ID | 20247a52-23e2-46fb-943d-309cdee2bc6d |
| TaskId | string | Task ID | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TraceId | string | Full link ID | 2150451a17191950923411783e2927 |
| Payload | object | Response body | |
| Output | object | Output | |
| Text | string | Output content | Text generation result |
| Usage | object | Token consumption | |
| InputTokens | long | Number of input tokens | 100 |
| OutputTokens | long | Number of output tokens | 100 |
| TotalTokens | long | Total number of tokens | 200 |
Examples
Success response
JSON format
{
"RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
"End": false,
"Header": {
"Event": "task-finished",
"EventInfo": "模型生成事件",
"RequestId": "3f7045e099474ba28ceca1b4eb6d6e21",
"SessionId": "20247a52-23e2-46fb-943d-309cdee2bc6d",
"TaskId": "3f7045e099474ba28ceca1b4eb6d6e21",
"TraceId": "2150451a17191950923411783e2927"
},
"Payload": {
"Output": {
"Text": "文本生成结果"
},
"Usage": {
"InputTokens": 100,
"OutputTokens": 100,
"TotalTokens": 200
}
}
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Check the workspaceId assignment |
Visit the Error Center to view more error codes.