Free plan
Image OCR
Turn the words in a photo or scan into text you can copy
About this tool
Reads the text inside a picture, such as a photographed page, a sign or a receipt, and gives it to you as normal text. This is called OCR, which means a computer reading the letters in a picture. You choose the language and can get plain text, a searchable PDF or a table file. It takes one picture at a time, and results can have mistakes.
For example, you copy the text from a photographed restaurant menu.
How to use it
- Choose this tool.
- Add one picture with Upload or drag and drop.
- Choose the language of the text.
- Choose what you want back, such as plain text, then press Generate.
- Copy the text or download the file.
What you get back
You get the text on screen that you can copy, or a file such as a searchable PDF that you can download.
GOOD TO KNOW
Requires the tesseract binary on the server (runtime capability; see GET /v1/capabilities). Images above 40,000,000 pixels are rejected.
TEST IT LIVE
Try Image OCR in the Studio
One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Family
Images
Plan
Free
Method
POST
Endpoint
/v1/images/ocr
Tool ID
images.ocr
Authentication
API key
Accepts
JPEG, PNG, WEBP, GIF, AVIF, TIFF +15 more
Background jobs
Yes
Usage group
Image
For developers
Use it from your code
cURL
curl -X POST "https://app.h2i.davixlabs.io/v1/images/ocr" \
-H "X-Api-Key: $DAVIX_H2I_API_KEY" \
-F 'images=@photo.jpg' \
-F 'output=text' \
-F 'psm=3' \
-F 'output_bundle=zip'Node.js
const { DavixH2I } = require('@davixlabs/h2i-sdk');
const h2i = new DavixH2I({ apiKey: process.env.DAVIX_H2I_API_KEY, baseUrl: process.env.DAVIX_H2I_URL });
const result = await h2i.images.ocr({
"images": 'photo.jpg',
"output": "text",
"psm": 3,
"output_bundle": "zip"
});
console.log(result.data, result.requestId);PHP
<?php
require 'vendor/autoload.php';
$h2i = new \Davix\H2I\Client(['apiKey' => getenv('DAVIX_H2I_API_KEY'), 'baseUrl' => getenv('DAVIX_H2I_URL')]);
$result = $h2i->images()->ocr([
'images' => 'photo.jpg',
'output' => 'text',
'psm' => 3,
'output_bundle' => 'zip',
]);
echo $result->requestId;Documentation
Guides that use this tool
More in Images
