Image-to-text API for OCR and text extraction workflows

Turn photos, pictures, scans, and screenshots into clean, searchable text in one API call. OCR in more than 100 languages, with a confidence score on every block of text when you need to check the result. Read about 3,300 images a month on the free plan.

One API for images, PDFs, and Office files

PNG, JPEG, TIFF, BMP, GIF, WebP, SVG, HEIC, TGA, and EPS go to the same endpoint as PDFs and Word, Excel, and PowerPoint files. The API detects the file type from the content.

Confidence you can check

In spatial JSON, every block of text comes with its position on the page and a confidence score, so uncertain results can go to review.

Pay for the depth you need

Structure mode reads clean images for 1.5 credits per page (a single image is one page). Step up to understand (9) or agentic (18) only for forms, handwriting, and degraded scans.

Three steps

How to extract text from images with OCR

Read text from an image in a single call to Nutrient’s Data Extraction API, starting from the image file itself.

Get an API key

Create a free account for a Data Extraction API key. The free plan includes 5,000 credits each month, which is about 3,300 images in structure mode.


Post the image file in structure mode

An image has no text layer, so it needs OCR. Structure mode reads clean photos and scans for 1.5 credits per page, and a single image is one page.


Read the text

The text in the image comes back as one string in output.markdown.

Try it out

This example reads the text from an image with the Data Extraction API.


  1. Save an image as image.jpg and run the sample from the same folder. The text comes back in output.markdown; the JavaScript, Java, C#, and PHP samples write it to result.md. The Python sample prints it, and the shell samples print the full JSON response.
  2. The samples use structure mode. For forms, tables, and printed handwriting, set mode to understand. For cursive handwriting and degraded scans, set it to agentic, which adds AI visual reasoning.
  3. OCR detects the language automatically. To set it, add "options":{"language":"german"} to the instructions.
  4. For a bounding box and confidence score on every block of text, set "output":{"format":"spatial"}. The elements come back in output.elements.
curl -X POST https://api.nutrient.io/extraction/parse \
-H "Authorization: Bearer your_api_key_goes_here" \
-F "file=@image.jpg" \
-F 'instructions={"mode":"structure","output":{"format":"markdown"}}'

Example output

What the image-to-text API returns

An excerpt from a real response for a screenshot of release notes with fictitious names. Structure mode, 1.5 credits.

Response
{
"output": {
"markdown": "Example App 4.2 release notes\n\n\nFaster sync. Projects now open twice as fast on large accounts.\n\n\nOffline mode. Edits made without a connection upload automatically when the device reconnects.\n\n\nDark theme. Turn it on under Settings, then Appearance.\n\n\nFixed. Exported reports no longer drop the last page.\n\n\nReleased 14 October 2026. All names are fictitious.\n"
}
}

OCR built in

Choose a processing mode for each image

Images have no text layer, so each of these processing modes reads them with OCR.

Structure mode

Clean photos, screenshots, and simple scans. 1.5 credits per page (a single image is one page).

Understand mode

Forms, tables, multicolumn layouts, and printed handwriting. 9 credits per page.

Agentic mode

Adds AI visual reasoning for cursive handwriting, faxes, and degraded scans. 18 credits per page.

Use cases

What teams build with it

Receipt capture

Read merchant, date, and total lines from photos of receipts. For named fields with citations, see receipt data extraction.

Forms and applications

Turn scanned or photographed forms into text, with understand mode for printed handwriting and checkboxes.

Product labels

Read brand names, ingredients, and codes printed on product photos and package labels.

Screenshots

Make screenshots in support tickets, chats, and documentation searchable.

Handwritten notes

Use agentic mode for cursive handwriting on notes, letters, and annotated pages.

Data Extraction API

Read text from any image

Send an image and get Markdown back, or spatial JSON with a bounding box for every line.

Start free:

    • 5,000 Data Extraction credits per month
    • No credit card required
    • OCR in 100+ languages

Security is our top priority

SOC 2 Type 2 audited

Nutrient is SOC 2 Type 2 audited annually. See the security documentation and privacy documentation for details on data handling.

HTTPS encryption

All API communication uses HTTPS with TLS encryption. Unencrypted HTTP requests are rejected.

Frequently asked questions

What is an image-to-text API?

Nutrient’s image-to-text converter API reads the text in an image with OCR and returns it in a single call. To describe charts and pictures instead of reading their text, agentic mode adds a generated description to each chart and picture element in spatial JSON. The API returns the text from photos, scans, and screenshots as Markdown. Alternatively, it returns spatial JSON with a bounding box and confidence score for each block of text. Unlike self-hosted OCR libraries such as Tesseract, Nutrient’s Data Extraction API runs as a hosted API, so there’s no OCR engine to install or maintain.

How do I extract text from an image programmatically?

Nutrient’s Data Extraction API takes the image in one POST /extraction/parse request, with mode set to structure and output.format set to markdown. The text comes back in output.markdown.

What image formats does the image-to-text API support?

Nutrient’s Data Extraction API accepts PNG, JPEG, TIFF, BMP, GIF, WebP, SVG, HEIC, TGA, and EPS, plus PDFs and Office files. It detects the type from the file content. See the supported file types.

Is there a free image-to-text API?

Yes, Nutrient’s Data Extraction API free plan includes 5,000 credits each month, with no credit card required. Structure mode costs 1.5 credits per page, and a single image is one page, so that’s about 3,300 images a month on the free plan. See Data Extraction API pricing.

Which processing mode should I use for images?

Nutrient recommends structure mode for clean photos and screenshots. Use understand mode for forms, tables, and printed handwriting, and agentic mode for cursive handwriting and degraded scans.

Are there rate limits on the image-to-text API?

Nutrient’s Data Extraction API applies one rate limit per organization, shared by all its requests: It’s currently 100 requests per minute. A request over the limit returns 429 Too many requests; retry with exponential backoff. See the errors guide.

Can I extract text from multiple images in batch?

Yes, Nutrient’s Data Extraction API takes one file per request, so a batch is a loop over files. The document extraction pipeline tutorial shows a batch loop in Python.

Which programming languages are supported?

Nutrient’s image-to-text API works from any language that makes HTTP requests. Nutrient provides examples for JavaScript, Python, Java, C#, and PHP, plus REST and a Postman collection.

Ready to try it?

Create an account to get your Data Extraction API key and start making API calls.