POST
/
v1
/
ai
/
image_translate
import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.translate.image({
  "url": "https://images.unsplash.com/photo-1566657817181-c69e4a8eeb1e?q=80&w=3087&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
  "target_language": "hi"
})

Request Parameters

Body

url
string

The URL of the image containing text to translate. If provided, the image will be downloaded from this URL. Must be a valid URL. Either url or file_store_key must be provided.

file_store_key
string

The file store key of a previously uploaded image. Either url or file_store_key must be provided.

target_language
string
required

The language code of the target language to translate to. All supported language codes can be found here.

Response Structure

success
boolean

Indicates whether the call was successful.

translated_text
string

The translated text content extracted from the image.

import { JigsawStack } from "jigsawstack";

const jigsaw = JigsawStack({ apiKey: "your-api-key" });

const response = await jigsaw.translate.image({
  "url": "https://images.unsplash.com/photo-1566657817181-c69e4a8eeb1e?q=80&w=3087&auto=format&fit=crop&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxwaG90by1wYWdlfHx8fGVufDB8fHx8fA%3D%3D",
  "target_language": "hi"
})