Skip to main content

RunOcrParse

Parses essay images using OCR

Try it out

You can call this operation in OpenAPI Explorer without calculating a signature. After a successful call, OpenAPI Explorer can automatically generate SDK code examples. Try it out

Authorization information

The following table describes the authorization information for this API operation. You can use the information in the Action element of a RAM policy statement to grant a RAM user or RAM role permission to call the operation. The columns are described as follows:
  • Action: a specific permission.
  • Access level: the access level of an action. Valid values: Write, Read, and List.
  • Resource type: the types of resources for which the action supports authorization:
    • Required resource types are marked with an asterisk (*).
    • Actions that do not support resource-level authorization use All resources.
  • Condition key: a condition key defined by the cloud service.
  • Dependent action: an additional permission required to perform the action. The caller must also have permission to perform the dependent action.
ActionAccess levelResource typeCondition keyDependent action
quanmiaolightapp:RunOcrParsecreate
*All resources
*
    None
None

Request syntax

POST /{workspaceId}/quanmiao/lightapp/runOcrParse HTTP/1.1

Request parameters

NameTypeRequiredDescriptionExample
workspaceIdstringYesllm-xxx
urlstringNo

Image URL (specify either url or fileKey)

http://www.example.com/xxxx.txt
fileKeystringNo

Image URL (specify either url or fileKey)

oss://default/aimiaobi-service-prod/aimiaobi/temp/public/government_service_experience_feedback_summary.txt
modelIdstringNo

Model ID

qwen3.7-plus

Response parameters

NameTypeDescriptionExample
object

Response

headerobject

Message header

errorCodestring

Error code

AccessForbidden
errorMessagestring

Error description

Error message
eventstring

Event

task-finished
sessionIdstring

The unique session ID

xxxx
taskIdstring

The unique task ID

xxxx
traceIdstring

The full-link unique ID

xxxxx
payloadobject

Message body

outputobject

Output

textstring

OCR text output

OCR text output
usageobject

Token usage

inputTokenslong

Input tokens

100
outputTokenslong

Output tokens

100
totalTokenslong

Total tokens

200
requestIdstring

Id of the request

117F5ABE-CF02-5502-9A3F-E56BC9081A64

Examples

Success response JSON format
{
  "header": {
    "errorCode": "AccessForbidden",
    "errorMessage": "错误信息",
    "event": "task-finished",
    "sessionId": "xxxx",
    "taskId": "xxxx",
    "traceId": "xxxxx"
  },
  "payload": {
    "output": {
      "text": "OCR文本输出\n\n"
    },
    "usage": {
      "inputTokens": 100,
      "outputTokens": 100,
      "totalTokens": 200
    }
  },
  "requestId": "117F5ABE-CF02-5502-9A3F-E56BC9081A64"
}

Error codes

HTTP status codeError codeError messageDescription
403NoPermissionYou are not authorized to perform this action , Please check the assignment of the workspaceId.Check the assignment of the workspaceId.
Visit the Error Center to view more error codes.