Skip to main content

Overview

Localize images and PDFs into any language while keeping the original design. It works on posters, signage, screenshots, menus, comics, and multi-page documents, and can translate into several languages in a single job. If a line of text needs different wording or a different look, fine-tune just that region with a short prompt. Image translation is asynchronous: you submit a job, poll until it completes, then retrieve the result.

Prerequisites

1

Create an account

Sign up at CAMB.AI Studio if you haven’t already.
2

Get your API key

Go to Settings β†’ API Keys in Studio and copy your key. See Authentication for details.
3

Install the SDK

Skip this step if you’re using the direct API.
4

Set your API key to use in your code


Code


Parameters

Required

On the raw HTTP API, target_languages is a comma-separated string (es-es or es-es,pt-br). The SDKs take an array and join it.

Optional

Result shape

get_image_translation_result / getImageTranslationResult returns { "download_url": "..." } β€” a presigned URL to a ZIP. That ZIP contains page images (export_format="ZIP", the default) or one PDF per target language (export_format="PDF"). Request a fresh URL if the previous one has expired.

Language Enum

Use the Languages enum (Python) or CambApi.Languages (TypeScript) to specify languages:

Inspect the project

Fetch the project to get region IDs, source text, and per-page previews, for example before a fine-tune. The response looks like this:
This route 404s until the export ZIP exists. Poll the create task_id to SUCCESS first.

Fine-tune a region

Send a short written instruction for one region_id from the project payload, such as Change the text color to white, Use a bolder font, or Add a soft drop shadow. Poll the returned task_id the same way as create, then export so the change appears in your download.
TypeScript request bodies use snake_case keys (run_id, target_language_id), matching the HTTP API.

Export

Creating a job exports your translated pages automatically. A fine-tune does not: it updates the project, but your download stays the same until you export again. Run an export after every fine-tune, or whenever you want to switch export_format. It’s also the fix if the result route returns a 404. export_image_translation / exportImageTranslation returns { task_id, cached }. Poll task_id only when it is present; if cached is true and there is no task_id, skip polling and fetch the result.

Tips

  • Public URL: media_url must be reachable without authentication.
  • Formats: PNG, JPG, JPEG, WEBP, and PDF. For multi-page sources, you can also pass a ZIP of page images.
  • export_format: The download is always a ZIP. ZIP (default) puts page images inside it; PDF puts one PDF per target language inside it. Pass it on create or on a later export.
  • task_id vs run_id: task_id is the async job (create, export, or fine-tune). run_id is the project; use it for result, project, export, and fine-tune.
  • Multiple targets: target_languages accepts several languages in one job, which is more efficient than submitting separate jobs.
  • Expired URLs: download_url and preview URLs are presigned. Call the result or project route again when they expire.

Next Steps

End-to-End Image Translation API

Full API reference for the create endpoint.

Get Image Translation Status

Status polling endpoint reference.

Get Image Translation Result

Retrieve the translated ZIP.

Fine-Tune Image Translation

Re-render one region with a prompt.
Last modified on November 11, 2026