Extracts questions and structured question information. Given an exam paper or a full-page question image, the algorithm returns the position and structured information for each question, including its stem, options, and answers.
Usage notes
Activate EduTutor. During the public preview, each account can call this operation 1,000 times per day free of charge.
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 this 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.
| Action | Access level | Resource type | Condition key | Dependent action |
|---|---|---|---|---|
| edututor:CutQuestions | none | *All resources * |
| None |
Request syntax
Request parameters
| Name | Type | Required | Description | Example |
|---|---|---|---|---|
| workspaceId | string | Yes | The Alibaba Cloud Model Studio workspace ID for this request. | llm-1ijrzuv3v0ivvls7 |
| body | object | No | The request body. | |
| image | string | Yes | The URL of the exam paper or question image. | https://oss.xxx.com/xx.png |
| parameters | object | Yes | The parameter configuration. | |
| struct | boolean | Yes | Specifies whether to return structured information. | true |
| extract_images | boolean | Yes | Specifies whether to return temporary OSS URLs for subquestion images so that they can be used directly for subsequent question answering. | true |
Response parameters
| Name | Type | Description | Example |
|---|---|---|---|
| object | Schema of Response | ||
| requestId | string | The unique request ID, used for troubleshooting. | 1CE2851D-96D6-51D0-8ADA-EB7ACAF374BB |
| success | boolean | Indicates whether the call succeeded. | True |
| code | string | The response status code. | SUCCESS |
| httpStatusCode | integer | The HTTP status code. | 200 |
| message | string | The description of the response code. | success |
| data | string | The algorithm results. | '{ "questions": [ { "pos_list": [ [ 21, 0, 364, 0, 364, 82, 21, 82 ] ], "sub_images": [ "http://duguang-mld.oss-accelerate.aliyuncs.com/ocr_edu/1CE2851D-96D6-51D0-8ADA-EB7ACAF374BB_0_0.png?OSSAccessKeyId=YOUR_ACCESS_KEY_ID****&Expires=1755593474&Signature=YOUR_SIGNATURE" ], "merged_image": "http://duguang-mld.oss-accelerate.aliyuncs.com/ocr_edu/1CE2851D-96D6-51D0-8ADA-EB7ACAF374BB_0_0.png?OSSAccessKeyId=YOUR_ACCESS_KEY_ID****&Expires=1755593474&Signature=YOUR_SIGNATURE", "info": { "stem": { "text": "8. 若 \\\\(a + b = -1\\\\), \\\\(ab = 4\\\\), 则 \\\\((4a - 5b - 3ab) - (3a - 6b + ab)\\\\) 的值为 _ 。", "pos_list": [ [ 21, 4, 364, 4, 364, 78, 21, 78 ] ] }, "option": [], "figure": [], "answer": [ { "text": "-17", "pos_list": [ [ 225, 51, 262, 51, 262, 70, 225, 70 ] ] } ], "type": "填空题", "subquestion": [] } } ] }' |
| input_tokens | integer | The number of input tokens consumed by this call. | 80 |
| output_tokens | integer | The number of output tokens consumed by this call. | 38 |
Algorithm result field: data
- Serialization is required. The fields are described as follows:
| Field | Type | Description | Example |
|---|---|---|---|
| questions | array | The questions extracted by the model. | |
| questions[i].pos_list | array | The bounding boxes of the ith question. A question may have multiple bounding boxes. | [[21,0,364,0,364,82,21,82]] |
| questions[i].sub_images | array | The URLs of subimages extracted from the bounding boxes. Valid for 7 days. | |
| questions[i].merged_image | string | The URL of the complete question image formed by merging all subimages. Valid for 7 days. | |
| questions[i].info | object | The structured question information. | |
| questions[i].info.type | string | The question type: multiple choice, fill in the blank, true or false, short answer, essay, or other. | Fill in the blank |
| questions[i].info.stem | array | The question stem information. | |
| questions[i].info.stem.text | string | The question stem text. | |
| questions[i].info.stem.pos_list | array | The bounding boxes of the question stem. | |
| questions[i].info.option | array | The answer option information. | |
| questions[i].info.option[j].text | string | The answer option text. | |
| questions[i].info.option[j].pos_list | array | The answer option positions. | |
| questions[i].info.figure | array | The illustration information. | |
| questions[i].info.figure[k].pos_list | array | The illustration positions. | |
| questions[i].info.answer | array | The answer information. | |
| questions[i].info.answer[m].pos_list | array | The answer positions. | "-17" |
| questions[i].info.answer[m].text | string | The answer text. | |
| questions[i].info.subquestion | array | The subquestion information. Uses the same structure as info. |
Examples
Sample success response
JSON format
Error codes
For more error codes, see Error Center.
Change history
| Change date | Change summary | Action |
|---|