Free plan

Image to Text

Copy the words from a photo or scan as normal text
POST
/v1/ai/ocr/text

About this tool

This tool reads the words in a picture or scanned page and gives them to you as text you can copy. OCR means a computer reading the letters in a picture. It tells you how sure it is, and uses an AI model only when the text is too hard to read normally. You can straighten a tilted photo or clean up a noisy one first.
For example, you took a photo of a page in a book and you want to copy its words into a document.

How to use it

  1. Choose this tool.
  2. Add your photo or scan with Upload, or drag and drop it.
  3. If the photo is tilted or noisy, turn on the straighten or clean up switches.
  4. Press Generate.
  5. Copy the text from the result.

What you get back

You get the text on screen with a confidence score, and you can copy or download it.
TEST IT LIVE

Try Image to Text in the Studio

One click opens the Studio with this tool already selected. Add your file and see the result in seconds.
Open in the Studio
Family
AI
Plan
Free
Method
POST
Endpoint
/v1/ai/ocr/text
Tool ID
ai.ocr.text
Authentication
API key
Accepts
Text and settings
Background jobs
Yes
Usage group
Ai
For developers

Use it from your code

cURL

curl -X POST "https://app.h2i.davixlabs.io/v1/ai/ocr/text" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'files=@document.pdf' \
  -F 'on_unsupported=error' \
  -F 'quality=standard' \
  -F 'strategy=auto'

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.ai.ocr.text({
    "files": 'document.pdf',
    "on_unsupported": "error",
    "quality": "standard",
    "strategy": "auto"
  });
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->ai()->ocr()->text([
    'files' => 'document.pdf',
    'on_unsupported' => 'error',
    'quality' => 'standard',
    'strategy' => 'auto',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Local Tesseract OCR with confidence; a vision model is used only when OCR is unreadable and strategy allows. Readiness: unbenchmarked (see GET /v1/ai/capabilities/ocr.text).

Classification: hybrid. Deterministic stages: file type detection from content, native PDF text extraction (Poppler), Tesseract OCR with per-page confidence, image normalisation (Sharp).

Image to Text works from text and settings, so no file is needed. Every input is optional.

Image to Text is included in every plan, including Free. Each run uses credits from your monthly allowance.

Send a POST request to /v1/ai/ocr/text with your API key in the X-Api-Key header. Official SDKs for Node.js, Python, PHP, Go, Java, .NET and Ruby do the same for you, and the code box on this page shows ready-to-copy examples. For large work it can also run as a background job, so your request returns straight away.