RunBookSmartCard
A smart card interface for books.
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 describes the authorization information for this API. You can use it in the Action element of a RAM policy statement 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 prefixed.
- For operations that do not support resource-level authorization,
全部资源is used.
-
Condition key: refers to the condition keys defined by the cloud service itself.
-
Dependent action: refers to the 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:RunBookSmartCard | get | *All resources * |
| None |
Request syntax
POST /miaodu/stream/runBookSmartCard HTTP/1.1
Request parameters
| Parameter | Type | Required | Description | Example |
|---|---|---|---|---|
| WorkspaceId | string | Yes | Unique identifier for the Alibaba Cloud Model Studio workspace. Obtain theWorkspace ID. | llm-xxx |
| DocId | string | Yes | Document ID. | 84ufBYEeLMZOjRFo84HJ7ySL3Efr55 |
| SessionId | string | Yes | Session ID. | 3f7045e099474ba28ceca1b4eb6d6e21 |
Response elements
| Element | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Id of the request | 1813ceee-7fe5-41b4-87e5-982a4d18cca5 |
| Header | object | Response header. | |
| ErrorCode | string | Error code. | success |
| ErrorMessage | string | Error message. | success |
| Event | string | Event type. | finished |
| EventInfo | string | Event description. | Model generation event |
| SessionId | string | Session ID. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TaskId | string | Task ID. | 3f7045e099474ba28ceca1b4eb6d6e21 |
| TraceId | string | Trace ID. | 1a0e898717105546647125853d4f54 |
| Payload | object | Response body. | |
| Output | object | Output content object. | |
| Content | string | Card title. | Card title content |
| Tags | array | Card tag array. | |
| tags | string | Card tag. | Card tag content |
| Usage | object | Token usage. | |
| InputTokens | long | Number of input tokens. | 1 |
| OutputTokens | long | Number of output tokens used. | 100 |
| TotalTokens | long | Total number of tokens. | 101 |
Examples
Success response
JSON format
{
"RequestId": "1813ceee-7fe5-41b4-87e5-982a4d18cca5",
"Header": {
"ErrorCode": "success",
"ErrorMessage": "success",
"Event": "finished",
"EventInfo": "模型生成事件",
"SessionId": "3f7045e099474ba28ceca1b4eb6d6e21",
"TaskId": "3f7045e099474ba28ceca1b4eb6d6e21",
"TraceId": "1a0e898717105546647125853d4f54"
},
"Payload": {
"Output": {
"Content": "卡片标题内容",
"Tags": [
"卡片标签内容"
]
},
"Usage": {
"InputTokens": 1,
"OutputTokens": 100,
"TotalTokens": 101
}
}
}
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.