拍照搜题
拍照搜索
请求协议
Http
Header
参数名 | 类型 | 描述 |
---|---|---|
Authorization | string | 鉴权 |
请求路径:
https://genaiapi.cloudsway.net/v1/ai/{endpoint}/education/search
请求FormData:
file、words、imageUrl三选一
参数名 | 类型 | 是否必填 | 描述 |
---|---|---|---|
file | file | 否 | 图片文件,目前仅支持JPG,JPEG、PNG格式,图片不超过2M 宽高必须大于30px,小于1080px |
words | string | 否 | 搜索文字。最大长度512字符 |
imageUrl | string | 否 | 图片url,目前仅支持JPG,JPEG、PNG格式,图片不超过2M宽高必须大于30px,小于1080px |
function | int | 否 | 是否过滤掉答案和解析混合的题目. 默认为0 0:不过滤1:过滤 |
请求示例
curl --location 'https://genaiapi.cloudsway.net/v1/ai/{endpoint}/education/search' \
--header 'Authorization: Bearer xxxx' \
--form 'file=@"/a/b.jpg"'
响应结果
响应参数定义
参数名称 | 参数类型 | 含义 |
---|---|---|
total | integer | 返回结果数 |
questionArr | array | 结果数组 |
txt | string | 图片输入时识别到的题干 |
questionArr参数说明
名称 | 类型 | 含义 |
---|---|---|
question | string | 题目html标签 |
hint | string | 解析html标签 |
answer | string | 答案html标签 |
score | float | 相似度得分 |
subject | string | 学科 |
示例
{
"questionArr": [
{
"answer": "<div class=\"answer-list-container\"><div class=\"item-major-answer\"><img alt=\"\" crossorigin=\"anonymous\" src=\"https://genaiapiedu.cloudsway.net/beijing/maliang/jf/label/question/202209/27/ues92q9n15g0.png\" /><br /><img alt=\"\" crossorigin=\"anonymous\" src=\"https://genaiapiedu.cloudsway.net/beijing/maliang/jf/label/question/202209/27/trnpf8q8fi80.png\" /></div></div>",
"hint": "<div class=\"answer-list-container\"><div class=\"item-major-answer\"><img alt=\"\" crossorigin=\"anonymous\" src=\"https://genaiapiedu.cloudsway.net/beijing/maliang/jf/label/question/202209/27/j7i906noth80.png\" /></div></div>",
"id": null,
"question": "<div style=\"margin-top: 10px\" class=\"qingzhou-tiku-jf-question\"><img style=\"width: 100%;height: auto;display: block;\" src=\"https://genaiapiedu.cloudsway.net/accelerate/maliang/jf/label/question/202402/01/844efeecb95a86941bb62c150e2f3748-157.png\" alt=\"\"/><p class=\"ocr_text_invisible\">8.8辆汽车4次能运大米640袋,照这样计算,现在有大米440袋,要求2次运完,需要这种汽车多少辆?</p></div>",
"score": 52.23586236466909,
"subject": "数学"
},
{
"answer": "<div class=\"choice-question-con\">\n <p><img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/20/1b765d4b-5b8a-449e-8ced-46fb67c646e6.jpg\" style=\"width: 69px;\"></p> \n <p><img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/08/5af2a598-fbaf-42e2-b7f6-0b65cd572609.jpg\" style=\"width: 54.5px;\"></p> \n <p><img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/20/3e51f19f-7cd8-4339-91f4-d8ec181873a1.jpg\" style=\"width: 60px;\"></p> \n <p><img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/20/65c7fef8-a908-4169-998c-a9ff682bce3d.jpg\" style=\"width: 76.5px;\"></p> \n <p><img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/20/24307911-ee88-48e8-9512-5ab5f3870b91.jpg\" style=\"width: 69px;\"></p> \n <p><img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/20/2e230275-15f0-46d8-9cd3-3c8068f4438d.jpg\" style=\"width: 57px;\"></p> \n <p>答:需要载重量相同的汽车<img class=\"kfformula\" src=\"http://103.216.252.17:7880/extproduce/202409/05/88622baf-bb2f-47c5-8e68-fe0dd9977ed6.jpg\" style=\"width: 15px;\">辆。</p>\n</div>",
"hint": "",
"id": null,
"question": "<div class=\"choice-question-con\">\n <p>8辆汽车4次运大米640袋,照这样计算,现在有大米440袋,要2次运完,需要载重量相同的汽车多少辆?</p>\n</div>",
"score": 51.245248012800964,
"subject": "数学"
},
{
"answer": "<div class=\"answer-list-container\"><div class=\"item-major-answer\"><img alt=\"\" answeruid=\"67a55a4c-e147-4412-9afa-a6bb0cb2624d\" crossorigin=\"anonymous\" src=\"https://genaiapiedu.cloudsway.net/beijing/maliang/jf/label/question/202410/13/qidhku1hp8s0.png\" /></div></div>",
"hint": "",
"id": null,
"question": "<div style=\"margin-top: 10px\" class=\"qingzhou-tiku-jf-question\"><img style=\"width: 100%;height: auto;display: block;\" src=\"https://genaiapiedu.cloudsway.net/accelerate/maliang/jf/label/question/202410/14/7c32e2c64fd611135da174607c595960-157.jpeg\" alt=\"\"/><p class=\"ocr_text_invisible\">4.8辆汽车4次运大米640袋,照这样计算,现在有大米440袋,要2次运完,需要载质量相同的汽车多少辆?</p></div>",
"score": 51.10517089594559,
"subject": "数学"
}
],
"total": 3,
"text": "6.8辆汽车4次能运大米640袋,照这样计算,现在有大米440袋,要求2次运完,需要这种汽车(||)辆。"
}