Plus plan

Translate Image Text

Read the text in a picture and translate it into another language
POST
/v1/ai/images/translate

About this tool

This tool reads the words in a picture, such as a sign, a menu or a screenshot, and translates them into the language you choose. The translation is given piece by piece, matched to each block of text in the picture. If you leave out the original language, it works it out for you. It uses AI and a text reader, so check important translations.
For example, you took a photo of a menu in a foreign country and you want to understand what the dishes are.

How to use it

  1. Choose this tool.
  2. Add your picture with Upload, or drag and drop it.
  3. Type or choose the language in Translate into.
  4. Optionally choose the language the text is written in.
  5. Press Generate, then read or copy the translation.

What you get back

You get the original text blocks and their translations as text on screen, which you can copy.
TEST IT LIVE

Try Translate Image 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
Plus
Method
POST
Endpoint
/v1/ai/images/translate
Tool ID
ai.images.translate
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/images/translate" \
  -H "X-Api-Key: $DAVIX_H2I_API_KEY" \
  -F 'files=@document.pdf' \
  -F 'on_unsupported=error' \
  -F 'quality=standard' \
  -F 'target_language=xx'

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.images.translate({
    "files": 'document.pdf',
    "on_unsupported": "error",
    "quality": "standard",
    "target_language": "xx"
  });
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()->images()->translate([
    'files' => 'document.pdf',
    'on_unsupported' => 'error',
    'quality' => 'standard',
    'target_language' => 'xx',
]);
echo $result->requestId;
FAQ

Frequently asked questions

Reads the text in an image (OCR plus vision) and translates it, block by block. Readiness: unbenchmarked (see GET /v1/ai/capabilities/images.translate).

Classification: hybrid. Deterministic stages: upload content sniffing, image normalisation (Sharp: EXIF orientation, resize, metadata stripped), Tesseract OCR as a reading aid.

Translate Image Text works from text and settings, so no file is needed. The required inputs are target_language.

Not on the Free plan: Translate Image Text is available on the Plus plan and above. Free accounts can upgrade any time to use it. Each run uses credits from your monthly allowance.

Send a POST request to /v1/ai/images/translate 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.