稳定、快速、免费的 API 接口服务
共收录了 26 个接口
接口地址: https://collect.xmwxxc.com/collect/xc_ocr/
返回格式: JSON
请求方式: POST
请求示例: https://collect.xmwxxc.com/collect/xc_ocr/
请求参数说明:
| 名称 | 必填 | 类型 | 说明 |
|---|---|---|---|
| image | 是 | file | 请使用curl或表单提交image的图片文件,格式支持 jpg png gif(演示APP已经上线https://serve.xmwxxc.com/article-2-1.html) |
返回参数说明:
| 名称 | 类型 | 说明 |
|---|
返回示例:
{
"code": 1,
"msg": "ok",
"time": "1648019978",
"data": {
"str": {
"0": {
"words": "TRAPCODE SUITE"
},
"1": {
"words": "®"
},
"2": {
"words": "RRCG"
},
"4": {
"words": "人素材"
}
},
"raw": [
[
[
480.0552673339844,
238.40261840820312,
623.930419921875,
84.09107208251953,
-0.3370301127433777
],
"TRAPCODE SUITE",
0.9942803255149296
],
[
[
794,
424,
86,
79.14286041259766,
-0
],
"®",
0.7538480162620544
],
[
[
898.5,
409.5,
115,
40.57143020629883,
0
],
"RRCG",
0.9972164928913116
],
[
[
853.5,
434,
19,
10.571428298950195,
-0
],
"",
0
],
[
[
911,
437,
86,
24.85714340209961,
0
],
"人素材",
0.9804620544115702
]
],
"speed": 2.11
}
}
错误码格式说明:
| 名称 | 类型 | 说明 |
|---|
代码示例:
Linux:curl -F "image=@/root/image333.jpg" -X POST "https://collect.xmwxxc.com/collect/xc_ocr/"
PHP:
// 上传的地址
$url = "https://collect.xmwxxc.com/collect/xc_ocr/";
$ch = curl_init();
curl_setopt($ch , CURLOPT_URL , $url);
curl_setopt($ch , CURLOPT_RETURNTRANSFER, 1);
curl_setopt($ch , CURLOPT_POST, 1);
// 注意这里的'image'是上传地址指定的key名
curl_setopt($ch , CURLOPT_POSTFIELDS, array('image' => new \CURLFile(realpath('H:/上传图片.jpg'))));
$output = curl_exec($ch);
curl_close($ch);
echo $output;
友情连接