API

AI OCR API for Image to Text, Tables and Structured Data

Convert images to text, tables, and structured data with a single image OCR API. Pay-as-you-go at $1 per 500 calls — no subscription, your balance never expires. Sign up and get $0.01 in free API credit for debugging.

$1 = 500 API calls

$1 / 500

API calls per dollar

200

Requests per minute

5

API keys per account

100+

Languages

CAPABILITIES

Three APIs in one platform

One API key unlocks text extraction, table digitization, and structured field extraction — each returns ready-to-use JSON, CSV, XLSX, or DOCX.

01

Image to Text API

Extract every word from an image with layout preservation.

Input: Images (PNG, JPEG, WEBP)

Output: Markdown, plain text, or DOCX

02

Table OCR API

Detect and digitize tables from images into structured rows.

Input: Images with tables (PNG, JPEG, WEBP)

Output: JSON (title + HTML), CSV, or XLSX

03

Data Extraction API

Pull specific fields from invoices, receipts, and forms.

Input: Images + field names

Output: JSON (key + values), CSV, or XLSX

ENDPOINTS

OCR REST API Reference & Live Examples

Every example below is copy-ready and matches the current API. Authenticate once, then call any endpoint.

POST/api/v1/platform/ocr
Try Free Image to Text

Extract text from images with layout preservation. Output as Markdown (default), plain text, or DOCX.

Format:
curl -X POST "https://freeocr.ai/api/v1/platform/ocr" \
  -H "Authorization: Bearer focr_your_api_key" \
  -F "image=@document.png"
POST/api/v1/platform/table
Try Free Table Extraction

Detect and extract tables from images into structured JSON, CSV, or XLSX formats.

Format:
curl -X POST "https://freeocr.ai/api/v1/platform/table" \
  -H "Authorization: Bearer focr_your_api_key" \
  -F "image=@spreadsheet.png"
POST/api/v1/platform/extract
Try Free Data Extraction

Extract specific fields from images using AI. Perfect for invoices, receipts, and forms.

Format:
curl -X POST "https://freeocr.ai/api/v1/platform/extract?fields=Invoice%20Number&fields=Date&fields=Total" \
  -H "Authorization: Bearer focr_your_api_key" \
  -F "image=@invoice.png"

AUTH

Authenticate with one header

Pass your API key as a Bearer token in the Authorization header on every request.

Header
Authorization: Bearer focr_your_api_key_idCreate and revoke keys anytime from the API Keys page.

Up to 5 API keys per account.

FORMATS

Supported formats & limits

Send images as multipart/form-data with an image field. Each endpoint accepts the same input.

Accepted input

Image files — PNG, JPEG, WEBP (multipart image field)

Field name

image (required)

Rate limit

200 requests per minute per key by default (adjustable on request).

Image handling

Images are auto-resized to a maximum of 2048×2048 px before processing.

PDF is not supported by the REST API; use the web or desktop app for PDFs.

ERRORS

Error handling & billing

Only successful calls are billed. You never pay for a request that errors out.

$1 = 500 calls, deducted from your balance per successful call.

If processing fails, the charge is automatically refunded to your balance.

Authentication, validation, rate-limit, and insufficient-balance errors incur no charge.

Your balance is shown in dollars and updates in real time.

Error codes

401

Unauthorized — invalid or missing API key

400

Bad request — no image file (or no fields for /extract)

402

Insufficient balance — please top up

429

Rate limit exceeded — try again later

500

Internal error — processing failed (charge refunded)

PRICING

Pay-as-you-go, no subscription

No hidden fees. No subscriptions. Just pay for what you use.

$1

500 API calls per $1

$5

$5 minimum top-up

∞

Balance never expires

Balance is measured in dollars — top up from $5 and watch it go down only on success.

START

Quick start

Create account

Get API key

Add balance

Start building

USES

Built for real workloads

From document processing pipelines to mobile app integration, the OCR API fits anywhere images need to become data.

Turn scanned documents and screenshots into searchable Markdown or DOCX at scale.

Pull invoice numbers, dates, totals, and line items into structured fields automatically.

Convert photographed spreadsheets and printed tables into CSV or XLSX in one call.

Embed image-to-text and data extraction into your web, mobile, or desktop product.

PRIVACY

Your privacy matters

Privacy-first processing

API content is used only to provide OCR and data extraction. We minimize retention and do not use your content for advertising or unrelated purposes.

Necessary operational data

We process only the account and technical data needed for billing, security, and reliable API operation.

Secure transfer

All API requests are transmitted over secure HTTPS connections to ensure your data is protected during transit.

FAQ

Frequently asked questions

Is the OCR API free, and how much does it cost?

New accounts receive $0.01 in free API credit for 5 successful calls. After that, the OCR API costs $1 per 500 successful calls. There is no subscription, the balance never expires, and the minimum top-up is $5.

What file formats are supported?

The API accepts image files (PNG, JPEG, WEBP) sent as a multipart image field. Images are auto-resized to a maximum of 2048×2048 px before processing. PDF is not supported by the REST API — use the web or desktop app for PDFs.

What is the difference between OCR, Table and Extraction APIs?

The OCR API returns all text from an image as Markdown, plain text, or DOCX. The Table Extraction API detects tables and returns them as JSON (title + HTML), CSV, or XLSX. The Data Extraction API takes field names you specify and returns the matching values as JSON, CSV, or XLSX — ideal for invoices and forms.

Are failed requests charged?

No. You're billed only for successful calls. If processing fails, the charge is automatically refunded to your balance. Authentication, validation, rate-limit, and insufficient-balance errors incur no charge at all.

Does the API balance expire?

No. Your API balance never expires. It is shown in dollars and remains available until you use it.

Can the API process PDFs?

No. The REST API processes image files only (PNG, JPEG, WEBP). For PDF to text or PDF to Word, use the FreeOCR.AI web or desktop app, which handles PDF pages directly.

Is there a request size or rate limit?

The default rate limit is 200 requests per minute per API key, and can be raised for high-volume users on request. The total request body must not exceed 4.5 MB due to Vercel's request size limit. Images are automatically resized to a maximum of 2048×2048 px before processing.

Ready to build with the OCR API?

Create your account, grab an API key, and start debugging with 5 free successful calls. Top up from $5 when you're ready.

OCR API: Image to Text, Tables & Data Extraction | FreeOCR.AI