Skip to main content

OCR API

Developer API

Integrate text recognition and table extraction into your applications. Share one API key and account balance, with usage-based billing.

Choose an API

Image to Text

Extract document content as Markdown JSON, plain-text JSON or editable Word.

POST /api/v1/image-to-textAPI documentation

Image to Table

Extract table structure as JSON, CSV or Excel.

POST /api/v1/image-to-tableAPI documentation

Text and table extraction

Extract document content as Markdown JSON, plain-text JSON or editable Word. Extract table structure as JSON, CSV or Excel.

Fit OCR into your workflow

Use text recognition for document processing and table extraction for spreadsheet workflows.

Retry without duplicate recognition charges

Reuse the same operation ID to retrieve a completed result within 24 hours, without generating or charging again.

Pay for successful recognition (USD)

Each successful image starts at $0.002, including 2,000 input tokens and 2,000 output tokens separately. Extra input costs $0.3 per million tokens; extra output costs $1.2 per million. Only usage above each allowance is added.

A new request requires $0.011288 in available balance and reserves that amount. After success, actual usage is charged and the rest is released.

Shared by your API keys; separate from website subscriptions.

Examples

Image to Text

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'

Image to Table

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'

Replace the key and image path, and use a new unique operation ID for each new image. See the documentation for authentication, upload limits and error handling.