## 通用文字识别 ![](https://img.kancloud.cn/22/66/226643bb26a654e0f2c305379003723d_204x200.png) > 通用文字识别接口服务,支持识别网络上各种类型的文字图片,并根据图片中文字的不同位置返回数组,如果需要识别手写文字内容,建议使用[手写OCR识别](%E6%89%8B%E5%86%99OCR%E8%AF%86%E5%88%AB.md)。 ## 接口费用( [点击购买](https://market.topthink.com/product/215)) > 最低 0.005元/次 ## 接口调用([调用须知](https://docs.topthink.com/think-api/1835086)) ### 请求地址 ``` GET https://api.topthink.com/ocr/txt ``` ### 请求参数 | 名称 | 类型 | 必填 | 说明 | | --- | --- | --- | --- | | appCode| 是 |string| 用户授权码,参考[API调用](https://docs.topthink.com/think-api/1835086) | | imgurl| string | 是 | 图片URL地址 | ### 返回`data`参数 | 名称 | 类型 | 说明 | | --- | --- | --- | | texts | string | 识别到的文本内容 | ## SDK调用 ``` $client = new Client("YourAppCode"); $result = $client->ocrTxt() ->withImgurl('https://img.kancloud.cn/873d987890_400x400.png') ->request(); ``` 返回示例: ~~~ { "code":0, "message": "成功", "data": [ { "texts":"官方统一接口服务" }, { "texts":"ThinkAPI" } ] } ~~~