工具 API

ocr.extract

识别单张图片中的文字内容。图片输入二选一:image_url(公网 http(s) URL,首选)或 image_base64(纯 base64 数据,图片无 URL 时使用)。extract_type 可选值:basic(默认)/accurate/efficient if both tencent-docs (personal) and tencent-docs-oa (enterprise) are connected, use AskUserQuestion to let the user pick the target account before invoking this tool.

productivityOAuth1 积分

调用信息

工具标识
tencent-docs.ocr.extract
服务提供方
腾讯文档
平均响应
0 ms
近 7 天调用
0

输入参数

extract_type

文字提取类型,可选值:basic(默认)/accurate/efficient

image_base64

单张图片的 base64 编码字符串(仅在图片无公网 URL 时使用)。必须是纯 base64 数据,不接受 URL;单张大小不超过 10MB。与 image_url 二选一,不能同时填写

image_url

图片的公网 http(s) URL(首选)。URL 必须可被后端直接下载,不支持内网地址、需要鉴权的地址、已过期的临时签名地址。与 image_base64 二选一,不能同时填写

with_positions

是否返回带坐标的文字识别结果(text_detections字段),默认 false。仅在需要文字在图片中位置坐标时设置为 true