指尖文字识别 API
开发环境
开发环境
POST
http[s]: //tyocr.xfyun.cn/v2/ocr
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location -g --request POST 'http://dev-cn.your-api-server.comhttp[s]: //tyocr.xfyun.cn/v2/ocr' \
--header 'Content-Type: application/json' \
--data-raw '{
"common":{
"app_id":"xxxxxxxx"
},
"business":{
"ent":"fingerocr",
"mode" :"finger+ocr",
"method" :"dynamic",
"resize_w" :1080,
"resize_h" :1080
},
"data":{
"image":"/9j/4AAQSkZJRgABAQAAAQABAAD/2..."
}
}'
响应示例响应示例
200 - 成功(mode=finger+ocr) - 示例 1
{
"code": 0,
"data": {
"finger_ocr": {
"char": {
"id": 0,
"list": [
{
"content": "string",
"coord": [
{
"x": 0,
"y": 0
}
],
"score": 0
}
]
},
"sent": {
"content": "string",
"coord": [
{
"x": 0,
"y": 0
}
]
},
"word": {
"id": 0,
"list": [
{
"content": "string",
"coord": [
{
"x": 0,
"y": 0
}
],
"score": 0
}
]
}
},
"finger_pos": {
"angle": 0,
"dir_x": 0,
"dir_y": 0,
"pos_x": 0,
"pos_y": 0,
"thickness": 0
},
"height": 0,
"mode": "string",
"version_engine": "string",
"version_json": "string",
"width": 0
},
"message": "string",
"sid": "string"
}
请求参数
Body 参数application/json
返回响应
修改于 2023-12-21 02:22:45