Read and translate text in images and screenshots
Turn text inside an image into JSON, as full text or with paragraphs, lines and words and their positions, and translate it in the same call.
A lot of useful text never exists as text: promo banners, screenshots, scanned pages, packaging photos and menus in another language. Copying it by hand is slow, and you cannot search or translate a picture. Lovely Router reads the image for you using Google Lens. Send an image link, get the text back as JSON, pay per image from a prepaid balance, and ask for a translation in the same call. Use it from a script, a data pipeline or an AI agent with one API key.
Hand it to your AI agent
Copy this prompt into Claude Code, Cursor, Codex or any coding agent. It tells the agent where the docs are and how to use your API key.
Read and translate text in images and screenshots. Use the Lovely Router data tools: each returns JSON and is billed per result.
- Docs (read first): https://lovelyrouter.com/docs/tools/find.md and https://lovelyrouter.com/docs/tools/run.md
- Plan first: POST https://lovelyrouter.com/v1/tools/suggest with `{"task": "<my task in plain words>"}` (free). It returns the tools to run in order, each with an example `input`, the `input_required` fields, an estimated cost and a ready-made `run` request. Replace the example values with my task's; if a field is unclear, read the tool with GET https://lovelyrouter.com/v1/tools/<id>. To browse instead, POST https://lovelyrouter.com/v1/tools/discover searches the catalog.
- Show me the plan and its estimated cost (`total_est_cost_usd`) before running anything large.
- Run: POST https://lovelyrouter.com/v1/tools/<id>/run with `{"input": {...}, "max_results": N}`. A 200 has the finished run with `items`; a 202 means it is still running, so poll the `poll` path until `status` is `succeeded`, `failed`, `timed_out` or `stopped`.
- Only delivered results are billed. Keep max_results small on the first run, check the output, then scale up.
- If you support MCP, connect https://lovelyrouter.com/mcp instead (Streamable HTTP, same key; https://lovelyrouter.com/docs/tools/mcp.md) and use suggest_tools, get_tool and run_tool.
- Auth: read my API key from the LOVELY_API_KEY environment variable and send it as `Authorization: Bearer $LOVELY_API_KEY`. Never print or commit the key. If it is not set, ask me to create one at https://lovelyrouter.com/app/keys.
- Billing is prepaid: every call is charged to my balance, so test with a small request before running anything large.
- Every docs page is plain Markdown; the full index is https://lovelyrouter.com/llms.txt.
My task: <the inputs (links, keywords or accounts) and how many results you need>How it works
Host or find the image
The tool reads a public image link. JPEG, PNG, WebP, BMP, TIFF and HEIC are supported.
Choose how much detail you need
Set
outputDetailtotext_onlyfor the plain text, or toparagraphs,lines,wordsorfullwhen you also need the structure and positions. Addlanguageas a hint andtranslateToif you want a translation.Use the text
Search it, store it, feed it to a model, or compare it with the previous version of the same image.
Read the text of an image with one request
Read text from an image (OCR) takes one image link in imageUrl. One image is one result:
curl https://lovelyrouter.com/v1/tools/image-ocr/run \
-H "Authorization: Bearer $LOVELY_API_KEY" \
-H "content-type: application/json" \
-d '{
"input": {
"imageUrl": "https://tesseract.projectnaptha.com/img/eng_bw.png",
"outputDetail": "text_only"
},
"max_results": 1
}'A run still going after 60 seconds returns 202; Run a tool shows how to poll. To process many images, send one run per image.
What each image returns
| Field group | What you get |
|---|---|
| Text | The full text found in the image |
| Structure | Paragraphs, lines or words, depending on outputDetail |
| Positions | Where the paragraphs, lines or words sit in the image |
| Translation | The text in the language you set in translateTo |
With text_only you get just the text. Choose full when you need everything the tool can return.
Recipes
Collect banner images from a foreign-language site, run each with translateTo set to en, and give the merchandising team a table of offers in English.
Run support screenshots through the tool, store the text next to the ticket, and search error messages that only appeared inside images.
Use paragraphs to keep the reading order, then pass the text to a model to summarize or extract the fields you need.
Read your own creative with text_only and diff it against the approved copy to catch typos and outdated prices.
Give an AI agent the tool so that, when a page returns an image instead of text, it reads the image rather than giving up.
Prefer plain words? Connect the MCP server and tell Claude Code or Cursor: "Read the text in this image URL, translate it to English, and tell me what the offer is. Set max_results to 1."
Pair it with other tools
Images come from somewhere. These tools find or capture them:
Text in an image, read with Google Lens: the full text, or paragraphs, lines and words with positions; optional translation.
Full-page screenshot (PNG or PDF) of web pages; returns a link to the image.
Crawl a whole website (or a section of it) and return each page as clean, LLM-ready markdown. Good for RAG and documentation sites.
An advertiser's ads from the Google Ads Transparency Center: format, text, dates shown, regions.
website-screenshotcaptures a page as PNG or PDF and returns a link to the image, ready to feed into OCR.website-crawlturns a whole site into markdown, one page per result.google-ads-transparencylists a competitor's ads when you want the copy of those ads as well.
For more on pulling data from the open web, see web data extraction.
What you pay
You pay per image: starting a run holds its maximum cost, the per-call fee plus the per-image fee times max_results, and the run settles to what it returned. The rest of the hold goes back to your balance. A run that fails or times out pays only for the images it delivered, and a run refused at the start costs nothing.
Reading 500 images is billed as 500 images. There is no subscription and no monthly minimum: top up from $5, and one balance pays for tools and models. The card above shows today's price; pricing lists every tool.
Frequently asked questions
Which image formats can it read?+
JPEG, PNG, WebP, BMP, TIFF and HEIC, from a public link.
Can it read a private or local file?+
The input is a public image link. Upload the file somewhere it can be fetched and pass that link.
Can it translate the text?+
Yes. Set translateTo to an ISO 639-1 code such as en, de or es, and the text is translated as well. Use language to hint at the language in the image.
How do I get word positions?+
Set outputDetail to words, lines or paragraphs for text with positions, or full. text_only returns the text alone.
Do I need a subscription?+
No. You add credit to a prepaid balance and each run draws it down. Failed runs pay only for the results they delivered, and nothing renews automatically.
Working with pages as well as pictures? See web data extraction, and the rest of the tool catalog.