RunKeywordsExtractionGeneration

Updated at:

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.

Debug

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 Resources is 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.

ActionAccess levelResource typeCondition keyDependent action
aimiaobi:RunKeywordsExtractionGenerationcreate
*All Resources
*
    None
None

Request syntax

POST /quanmiao/aimiaobi/runKeywordsExtractionGeneration HTTP/1.1

Request parameters

ParameterTypeRequiredDescriptionExample
WorkspaceIdstringYes

The unique identifier for the Alibaba Cloud Model Studio workspace. Obtain the Workspace ID

llm-xxx
ReferenceDataobjectYes

Data required for generation.

ContentsarrayYes

List of content.

stringYes

Content.

xxx
TaskIdstringNo

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
PromptstringNo

Custom prompt.

Response elements

ElementTypeDescriptionExample
object

Schema of Response

Headerobject

Response header.

ErrorCodestring

Error code.

AccessForbid
ErrorMessagestring

Error message.

xx
Eventstring

SSE event.

task-failed
SessionIdstring

Session ID.

1a3d7c9f-3a6d-4e49-b176-2d8721a27397
TaskIdstring

Task ID.

8d55b429d7c6d321fcff54823e8d317b
TraceIdstring

Trace ID.

210bc4e817219607963985396de8bd
Payloadobject

Response body.

Outputobject

Output.

Textstring

Text generation result.

xxx
Usageobject

Token usage.

InputTokenslong

Number of input tokens used.

1
OutputTokenslong

Number of output tokens used.

1
TotalTokenslong

Total number of tokens used in this call.

2
RequestIdstring

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 codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action.Please check the workspaceId assignment

Visit the Error Center to view more error codes.