MiaoRead calculates the word count for a document.
Debug
You can directly run this API in OpenAPI Explorer, saving you the trouble of 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 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 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: the condition keys defined by the cloud service itself.
- Dependent action: 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:GetFileContentLength | get | *All Resources * |
| None |
Request parameters
| Name | Type | Required | Description | Example value |
|---|---|---|---|---|
| WorkspaceId | string | Yes | The unique identifier of an Alibaba Cloud Model Studio workspace: Get the workspace ID (Workspace ID) | llm-2setzb9x4ewsd |
| DocName | string | No | Document name | test.pdf |
| FileUrl | string | No | File URL | https://xxx/test.pdf |
Response elements
| Name | Type | Description | Example value |
|---|---|---|---|
| object | Schema of Response | ||
| RequestId | string | Unique request identifier | DD656AF9-0839-521A-A3D2-F320009F9C87 |
| Code | string | Status code | successful |
| Data | object | Business data | |
| WordNum | long | File length | 1024 |
| HttpStatusCode | integer | HTTP status code | 200 |
| Message | string | Response message. | success |
| Success | boolean | Whether the operation succeeded: true means success, false means failure | True |
Examples
Normal response example
JSON format
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 |