RunKeywordsExtractionGeneration
Extracts and generates keywords using AMB.
Try it now
You can call this API directly in OpenAPI Explorer without calculating signatures. After a successful call, OpenAPI Explorer can automatically generate SDK code examples.
RAM authorization
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. Details are as follows:
-
Action: refers to the specific permission point.
-
Access level: refers to the access level of each operation. Valid values: Write, Read, or List.
-
Resource type: refers to the resource types that support authorization in the operation. Details are as follows:
- For required resource types, an asterisk (*) is added before them.
- For operations that do not support resource-level authorization,
All Resourcesis used.
-
Condition key: refers to the condition keys defined by the cloud service itself.
-
Dependent action: refers to other permissions required to successfully perform the operation. The caller must have the permissions of all dependent actions for the operation to succeed.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| aimiaobi:RunKeywordsExtractionGeneration | create | *All Resources * |
| None |
Request syntax
POST /quanmiao/aimiaobi/runKeywordsExtractionGeneration HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The unique identifier for the Alibaba Cloud Model Studio workspace. Obtain the Workspace ID | llm-xxx |
| ReferenceData | object | Yes | Data required for generation. | |
| Contents | array | Yes | List of content. | |
| string | Yes | Content. | xxx | |
| TaskId | string | No | The unique identifier for the associated creation article. Note TaskId is not required by default; the system automatically generates it. When subsequent tasks use the same TaskId, they belong to the same conversation group. | xxx |
| Prompt | string | No | Custom prompt. |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| Header | object | Response header. | |
| ErrorCode | string | Error code. | AccessForbid |
| ErrorMessage | string | Error message. | xx |
| Event | string | SSE event. | task-failed |
| SessionId | string | Session ID. | 1a3d7c9f-3a6d-4e49-b176-2d8721a27397 |
| TaskId | string | Task ID. | 8d55b429d7c6d321fcff54823e8d317b |
| TraceId | string | Trace ID. | 210bc4e817219607963985396de8bd |
| Payload | object | Response body. | |
| Output | object | Output. | |
| Text | string | Text generation result. | xxx |
| Usage | object | Token usage. | |
| InputTokens | long | Number of input tokens used. | 1 |
| OutputTokens | long | Number of output tokens used. | 1 |
| TotalTokens | long | Total number of tokens used in this call. | 2 |
| RequestId | string | Unique request identifier. | 419F3FBE-5C8D-5949-AC29-E9615235D15A |
Examples
Success response
JSON format
{
"Header": {
"ErrorCode": "AccessForbid",
"ErrorMessage": "xx",
"Event": "task-failed",
"SessionId": "1a3d7c9f-3a6d-4e49-b176-2d8721a27397",
"TaskId": "8d55b429d7c6d321fcff54823e8d317b",
"TraceId": "210bc4e817219607963985396de8bd"
},
"Payload": {
"Output": {
"Text": "xxx"
},
"Usage": {
"InputTokens": 1,
"OutputTokens": 1,
"TotalTokens": 2
}
},
"RequestId": "419F3FBE-5C8D-5949-AC29-E9615235D15A"
}
Error codes
| HTTP status code | Error code | Error message | Description |
|---|---|---|---|
| 403 | NoPermission | You are not authorized to perform this action. | Please check the workspaceId assignment |
Visit the Error Center to view more error codes.