OCR API
开发者 API
将文字识别和表格提取接入你的应用,共用 API 密钥与账户余额,按识别用量计费。
选择接口
按成功识别付费 (USD)
每张成功图片 $0.002 起,分别包含 2,000 输入 token 和 2,000 输出 token。超量输入每百万 token $0.3,超量输出每百万 token $1.2,仅计算各自超出的部分。
新请求需要至少 $0.011288 可用余额,并冻结这笔金额。成功后按实际用量扣费,释放剩余部分。
由所有 API 密钥共享,与网站订阅独立。
调用示例
图片转文字
curl --silent --show-error --include --max-time 150 \
'https://freeaiocr.com/api/v1/image-to-text' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Idempotency-Key: example-request-0001' \
-F 'image=@document.png'图片转表格
curl --silent --show-error --include --max-time 150 \
'https://freeaiocr.com/api/v1/image-to-table?format=json' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Idempotency-Key: example-table-request-0001' \
-F 'image=@table.png'替换密钥和图片路径,每张新图片使用新的唯一业务编号。认证、上传限制和错误处理请查看 API 文档。