OCR API 集成指南

2026/06/13

OCR API 适合不打开网页界面、直接在产品流程中完成文字提取的场景。完整接口说明可以查看 OCR API

最小请求

curl -X POST https://your-domain.com/api/v1/ocr \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "[email protected]" \
  -F "mode=formatted"

使用图片 URL 的 JSON 请求

{
  "image_url": "https://example.com/scan.png",
  "mode": "simple"
}

响应结构

{
  "success": true,
  "data": {
    "markdown": "...",
    "text": "...",
    "pages": [],
    "usage": { "credits": 10 }
  }
}

运营注意事项

API 调用使用与网页产品一致的积分规则。有效 key 的请求会记录状态、耗时、来源类型和消耗积分。发送大批量任务前,建议先查看 Pricing

相关页面

接入 API 前,可以先用 Invoice OCRReceipt OCR 测试真实文档。

Image to Text Team

Image to Text Team

OCR API 集成指南 | 博客