Corretion
Homework Correction
Request Protocol
HTTP
Parameter Name |
Type |
Description |
Authorization |
string |
Authentication |
Request Path:
https://genaiapi.cloudsway.net/v1/ai/{endpoint}/education/correction
Parameter Name |
Type |
Required |
Description |
file |
file |
No |
Image file for correction, only supports jpg; size must be within 4MB. |
imageUrl |
string |
No |
Image URL for correction, only supports jpg; size must be within 4MB. |
One of file
or imageUrl
must be provided.
Request Example
curl --location 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/education/correction' \
--header 'Authorization: Bearer xxxxx' \
--form 'file=@"/a/b.jpg"'
Response Result
Response Parameter Definitions
Parameter Name |
Type |
Description |
image |
object[] |
Correction results |
total |
object |
Correction statistics |
total Parameter List
Parameter Name |
Type |
Description |
corrected |
number |
Number of corrected items |
all |
number |
Total number of records |
image Parameter List
Parameter Name |
Type |
Description |
image_id |
string |
Image ID |
processed_image_url |
string |
URL of the corrected image |
subject |
number |
0: Math, 1: Chinese, 2: English |
results |
object[] |
Correction results |
results Parameter List
Parameter Name |
Type |
Description |
Additional Information |
analysis |
string |
Analysis |
If there is a solution analysis for math problems, please contact staff to enable permissions. |
answer |
string |
Answers |
If there are multiple answers, separate with commas. |
bbox |
number[] |
Bounding box coordinates |
|
correct_result |
number |
Overall correction result |
0: Not corrected; 1: Correct; 2: Incorrect; 3: Not answered |
index |
number |
Question order ID |
|
is_finish |
number |
Whether correction is complete |
0: Not complete 1: Complete |
question |
string |
Question text |
|
text |
string |
OCR text of the question |
|
type |
number |
Question type |
0: Default, 1: Mental calculation, 2: Multiple choice, 3: True/False, 4: Fill in the blanks, 5: Application problems, 6: Matching, 7: Drawing, 8: Question stem, 9: Other, 10: Materials, 11: Selection, 17: Calculation problems, 18: Proof problems, 19: Answer questions, 401: Descriptive problems, 402: Sorting problems, 801: Graph problems, 902: Fill in the blanks with process |
step_answers |
object[] |
Answer steps |
|
answers Parameter List
Parameter Name |
Type |
Description |
Additional Information |
answer |
string |
Answer in the answer box |
|
bbox |
number[] |
User answer box coordinates |
|
bbox_id |
string |
Unique ID of the answer box |
|
correct_result |
number |
Correction result |
0: Not corrected; 1: Correct; 2: Incorrect; 3: Not answered |
correct_txt |
string |
Solution reasoning |
|
index |
number |
User answer question ID |
|
text |
string |
OCR text of the answer box |
|
step_answers Parameter List
Parameter Name |
Type |
Description |
Additional Information |
answer |
string |
Answer in the answer box |
|
bbox |
number[] |
User answer box coordinates |
|
correct_result |
number |
Correction result |
0: Not corrected; 1: Correct; 2: Incorrect; 3: Not answered |
correct_txt |
string |
Solution reasoning |
|
index |
number |
User answer question ID |
|
text |
string |
OCR text of the answer box |
|
Example
{
"image": [
{
"image_id": "1.jpg",
"processed_image_url": "http://ees-south-1.edgeray.cn:5085/education/1c9724cb-ab78-465b-95ba-52b88cf74bbb?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Date=20241220T070242Z&X-Amz-SignedHeaders=host&X-Amz-Expires=900&X-Amz-Credential=V468B4DDMQGXW8YSY2H9%2F20241220%2Fees-south-1%2Fs3%2Faws4_request&X-Amz-Signature=9ca0f28f8d97ca87c86dcdb67f60e7612fcf1dc4ff083a9737da18a2e232f88e",
"subject": 0,
"results": [
{
"analysis": "小问1:\n确定正方形的边长:根据题意,正方形的面积为$16$平方厘米。由面积公式$A = a^2$可得,$16 = a^2$,解得$a = 4$厘米。因此,正方形的边长为$4$厘米。\n画出正方形:在方格纸上,以$4$厘米为边长画出一个正方形。\n小问2:\n确定长方形的长和宽:根据题意,长方形的面积为$16$平方厘米。由面积公式$A = l \\times w$可得,$16 = l \\times w$。选择一组满足条件的长和宽,例如$l = 8$厘米,$w = 2$厘米。\n画出长方形:在方格纸上,以$8$厘米为长,$2$厘米为宽画出一个长方形。\n",
"answers": [
{
"answer": "",
"bbox": [
141,
216,
167,
216,
167,
229,
141,
229
],
"bbox_id": "sq-0-0",
"correct_result": 2,
"correct_txt": "",
"index": 0,
"text": "边长\\times边长\\\n16\\times1\n4\\times4\n\\underline{长\\times宽}\n\\underline{15\\times1}\n5\\times3\n"
},
...
],
"analysis_sds": null,
"bbox": [
95,
85,
563,
85,
563,
248,
95,
248
],
"correct_result": 2,
"index": 0,
"is_finish": 1,
"question": "画出面积为$16$平方厘米的正方形,画一个与正方形面积相等的长方形。\n<img h=\"152px\" src=\"https://static.tiku.100tal.com/extproduce/202405/16/bda5d066-0e6c-4007-8b9c-452571e198ca.jpg\" style=\"vertical-align:middle\" w=\"523px\"/>",
"text": "在下图中,先画一个面积为16平方厘米的正方形,再画一个面积为15平方厘米的长方形。",
"type": 0,
"steps_answers": [
{
"answer": "",
"bbox": [
141,
216,
167,
216,
167,
229,
141,
229
],
"correct_result": 2,
"correct_txt": "",
"index": 0,
"text": "边长\\times边长\\\n16\\times1\n4\\times4\n\\underline{长\\times宽}\n\\underline{15\\times1}\n5\\times3\n"
},
...
]
},
...
]
}
],
"total": {
"corrected": 5,
"all": 5
}
}