ProductsOCR API

OCR API

Extract printed and handwritten text from images, photos, scans and PDF documents.

1,000 images free every month for each OCR feature

Features

Turn images and documents into text

The OCR API detects and extracts text from images (text detection) and from dense documents such as scans, PDF and TIFF files (document text detection), returning the text together with its layout and bounding boxes. It is compatible with the Google Cloud Vision images:annotate and files:annotate REST interfaces.

Text detection

Read sparse text in photos, screenshots, signs and product labels with TEXT_DETECTION.

Document text detection

Read dense text in scans, receipts, invoices, forms and contracts with DOCUMENT_TEXT_DETECTION.

Printed and handwritten text

Recognize printed and handwritten text, such as notes, filled-in forms and annotations.

PDF, TIFF and GIF files

Send multi-page files directly and get text for up to 5 pages per synchronous request.

Bounding boxes and layout

Get word-level bounding boxes, plus the full text with its page structure, to rebuild the layout.

Dozens of languages

Read text in dozens of languages, including Chinese, Japanese and Korean. Add languageHints when you know the language.

Drop-in compatible with Google Cloud Vision: existing REST integrations, and client libraries that use the REST transport, only need a new endpoint and API key.

Read the quickstart

Use cases

Where teams use the OCR API

Receipts and invoices

Capture merchants, dates and line items for expense and accounting workflows.

Forms and contracts

Digitize applications, agreements and other paperwork for review and search.

Photos and screenshots

Read signs, labels and on-screen text captured by your users' cameras.

Searchable archives

Turn scanned documents and PDF archives into text you can index and search.

Need the text in another language? Send the extracted text to the Translation API.

Explore Translation API

Quickstart

Read your first image

Create an API key in the Vionex Console, then send an image or a document.

Base URL https://api.vionexlimited.com
Authentication X-Api-Key header, Authorization: Bearer or ?key=
Compatible with Google Cloud Vision images:annotate and files:annotate
  1. Detect text in an image

    Send the image as base64 in image.content and choose TEXT_DETECTION or DOCUMENT_TEXT_DETECTION. The full text is in fullTextAnnotation.text, and textAnnotations lists each word with its bounding box.

    • Up to 16 images per request
    • Base64 image.content up to 10 MB, or a public https:// URL in image.source.imageUri
    • Optional imageContext.languageHints, such as ["en", "zh"]
    # On macOS, replace base64 -w0 FILE with base64 -i FILE
    curl -X POST "https://api.vionexlimited.com/v1/images:annotate" \
      -H "X-Api-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "requests": [{
          "image": {"content": "'"$(base64 -w0 receipt.jpg)"'"},
          "features": [{"type": "DOCUMENT_TEXT_DETECTION"}],
          "imageContext": {"languageHints": ["en", "zh"]}
        }]
      }'
    
    Response
    {
      "responses": [
        {
          "textAnnotations": [
            {
              "locale": "en",
              "description": "MEETING NOTES\nRoom 4A · 10:00\n",
              "boundingPoly": {
                "vertices": [
                  {"x": 32, "y": 24}, {"x": 418, "y": 24},
                  {"x": 418, "y": 118}, {"x": 32, "y": 118}
                ]
              }
            },
            {
              "description": "MEETING",
              "boundingPoly": {
                "vertices": [
                  {"x": 32, "y": 24}, {"x": 196, "y": 24},
                  {"x": 196, "y": 62}, {"x": 32, "y": 62}
                ]
              }
            }
          ],
          "fullTextAnnotation": {
            "text": "MEETING NOTES\nRoom 4A · 10:00\n"
          }
        }
      ]
    }
    
  2. Read PDF, TIFF and GIF files

    Call files:annotate with the file in inputConfig.content and its mimeType. Each page comes back as its own response.

    • Up to 5 pages per file, chosen with pages (default: the first 5)
    • totalPages reports the length of the whole file
    # On macOS, replace base64 -w0 FILE with base64 -i FILE
    curl -X POST "https://api.vionexlimited.com/v1/files:annotate" \
      -H "X-Api-Key: YOUR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "requests": [{
          "inputConfig": {
            "content": "'"$(base64 -w0 contract.pdf)"'",
            "mimeType": "application/pdf"
          },
          "features": [{"type": "DOCUMENT_TEXT_DETECTION"}],
          "pages": [1, 2, 3]
        }]
      }'
    

API endpoints

OCR API endpoints
MethodEndpointDescription
POST/v1/images:annotateDetect text in up to 16 images (Cloud Vision compatible)
POST/v1/files:annotateDetect text in PDF, TIFF and GIF files, up to 5 pages each

Pricing

Pay per image

Graduated monthly pricing in US dollars, billed separately for each OCR feature.

OCR API prices in USD
Monthly usage Price (USD)
OCR text detection (per image or page)First 1,000 units per month are free
0 – 1,000 images / month Free
1,000 – 5,000,000 images / month $1.50 per 1,000 images
Over 5,000,000 images / month $0.60 per 1,000 images
OCR document text detection (per image or page)First 1,000 units per month are free
0 – 1,000 images / month Free
1,000 – 5,000,000 images / month $1.50 per 1,000 images
Over 5,000,000 images / month $0.60 per 1,000 images
  • Each OCR feature applied to an image is one unit: running text detection and document text detection on the same image counts as two.
  • Each page of a PDF, TIFF or GIF file counts as one image.
  • Prices are quoted per 1,000 images, and the last block is prorated, so you pay for exactly the units you use.
  • Only images that are processed successfully are billed.

Example: 5,300 images with text detection in one month cost $6.45 (1,000 images free · 4,300 images × $1.50 per 1,000 images).

Start building with Vionex

Create an account in minutes and pay only for what you use.