数脉API 手写文字识别接口调用

2026-01-12

数脉API

数脉API 手写文字识别接口调用

一、接口名称

手写文字识别接口

 

二、接口介绍

可检测并识别包括中文、英文、日文、韩文、法文等20余种语言的手写文字,并可按照单字粒度输出置信度及候选字信息。针对手写作文场景,还支持涂改痕迹检测。

 

三、API接口文档

1. 请求地址

url:https://api.shumaidata.com/v4/handwriting/ocr

请求方式 method:post

参数:

 

2. 签名算法说明

服务商分配的appid、当前时间毫秒数timestamp、商户分配的app_security、 三者通过&符号拼接成字符串进行md5加密得到。

 如:appid=xyzxyzxyz,timestamp=1555378976238,app_security=efcefcefcefcefc ;

 拼接后的字符串:str=xyzxyzxyz&1555378976238&efcefcefcefcefc ;

 加密后得到sign = md5(str) = 4e7e1974b79f3656aeaf03f1158f5d5d ;

 

3. 正确返回示例

{

    "msg": "成功",

    "success": true,

    "code": 200,

    "data": {

        "order_no": "gqszsj3bgx7t9stmof",

        "result": [

            {

                "words": "人生的烦恼",

                "location": {

                    "top": 143,

                    "left": 147,

                    "width": 473,

                    "height": 101

                }

            },

            {

                "words": "无非就口个字",

                "location": {

                    "top": 306,

                    "left": 49,

                    "width": 580,

                    "height": 138

                }

            },

            {

                "words": "放不下",

                "location": {

                    "top": 485,

                    "left": 148,

                    "width": 325,

                    "height": 128

                }

            },

            {

                "words": "想不开",

                "location": {

                    "top": 657,

                    "left": 174,

                    "width": 317,

                    "height": 134

                }

            },

            {

                "words": "看不透",

                "location": {

                    "top": 843,

                    "left": 156,

                    "width": 346,

                    "height": 121

                }

            },

            {

                "words": "忘不了",

                "location": {

                    "top": 1046,

                    "left": 164,

                    "width": 308,

                    "height": 111

                }

            }

        ],

        "words_result_num": 6

    }

}

 

4. 错误返回示例

{

    "msg": "入参错误",

    "success": false,

    "code": 400,

    "data": { }

}

 

5. 返回字段说明

 

6. Result 结构

 

7. Code错误码说明

 

四、相关接口推荐

通用文字OCR识别

题目文字OCR识别

 

 

更多API接口调用:https://www.shumaiapi.com/product