Annotation

Translate page spatial data

Get translation for all lines on a page, including position coordinates. Source language of the page can be either specified by a user or automatically detected by the service. Translated text of a page in a particular language is cached for 60 days.

Requirements:

  • Document translations feature must be enabled for the organization
  • User must have translate permissions
  • Page must have OCR data available

Supported languages:

KeyDescription
afAfrikaans
sqAlbanian
amAmharic
arArabic
hyArmenian
azAzerbaijani
bnBengali
bsBosnian
bgBulgarian
caCatalan
zhChinese (Simplified)
zh-TWChinese (Traditional)
hrCroatian
csCzech
daDanish
fa-AFDari
nlDutch
enEnglish
etEstonian
faFarsi (Persian)
tlFilipino, Tagalog
fiFinnish
frFrench
fr-CAFrench (Canada)
kaGeorgian
deGerman
elGreek
guGujarati
htHaitian Creole
haHausa
heHebrew
hiHindi
huHungarian
isIcelandic
idIndonesian
gaIrish
itItalian
jaJapanese
knKannada
kkKazakh
koKorean
lvLatvian
ltLithuanian
mkMacedonian
msMalay
mlMalayalam
mtMaltese
mrMarathi
mnMongolian
noNorwegian (Bokmål)
psPashto
plPolish
ptPortuguese (Brazil)
pt-PTPortuguese (Portugal)
paPunjabi
roRomanian
ruRussian
srSerbian
siSinhala
skSlovak
slSlovenian
soSomali
esSpanish
es-MXSpanish (Mexico)
swSwahili
svSwedish
taTamil
teTelugu
thThai
trTurkish
ukUkrainian
urUrdu
uzUzbek
viVietnamese
cyWelsh
post/api/v1/annotations/{annotationID}/page_data/translate

Path parameters

annotationIDinteger required

Annotation ID

Request body

page_numbersinteger[] required

Single page number to translate (currently only one page at a time is supported)

target_language'af' | 'sq' | 'am' | 'ar' | 'hy' | 'az' | 'bn' | 'bs' | 'bg' | 'ca' | 'zh' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'fa-AF' | 'nl' | 'en' | 'et' | 'fa' | 'tl' | 'fi' | 'fr' | 'fr-CA' | 'ka' | 'de' | 'el' | 'gu' | 'ht' | 'ha' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'lv' | 'lt' | 'mk' | 'ms' | 'ml' | 'mt' | 'mr' | 'mn' | 'no' | 'ps' | 'pl' | 'pt' | 'pt-PT' | 'pa' | 'ro' | 'ru' | 'sr' | 'si' | 'sk' | 'sl' | 'so' | 'es' | 'es-MX' | 'sw' | 'sv' | 'ta' | 'te' | 'th' | 'tr' | 'uk' | 'ur' | 'uz' | 'vi' | 'cy' required

Target language code. Either ISO 639-1 format or a combination of ISO 639-1 two-digit language code followed by an underscore followed by an ISO 3166 2-digit country code.

source_language'auto' | 'af' | 'sq' | 'am' | 'ar' | 'hy' | 'az' | 'bn' | 'bs' | 'bg' | 'ca' | 'zh' | 'zh-TW' | 'hr' | 'cs' | 'da' | 'fa-AF' | 'nl' | 'en' | 'et' | 'fa' | 'tl' | 'fi' | 'fr' | 'fr-CA' | 'ka' | 'de' | 'el' | 'gu' | 'ht' | 'ha' | 'he' | 'hi' | 'hu' | 'is' | 'id' | 'ga' | 'it' | 'ja' | 'kn' | 'kk' | 'ko' | 'lv' | 'lt' | 'mk' | 'ms' | 'ml' | 'mt' | 'mr' | 'mn' | 'no' | 'ps' | 'pl' | 'pt' | 'pt-PT' | 'pa' | 'ro' | 'ru' | 'sr' | 'si' | 'sk' | 'sl' | 'so' | 'es' | 'es-MX' | 'sw' | 'sv' | 'ta' | 'te' | 'th' | 'tr' | 'uk' | 'ur' | 'uz' | 'vi' | 'cy'

Source language code. When not specified, the value auto is used which indicates the service will automatically detect the source language.

granularity'lines' required

Level of text granularity

Example request

{
  "page_numbers": [
    1
  ],
  "target_language": "es",
  "source_language": "auto",
  "granularity": "lines"
}

Response

Translation completed successfully (or retrieved from cache)

Example response

{
  "results": [
    {
      "page_number": 1,
      "granularity": "lines",
      "source_language": "en",
      "items": [
        {
          "text": "Factura",
          "position": [
            100,
            50,
            150,
            20
          ]
        }
      ]
    }
  ]
}

Changes

No recorded changes to this endpoint across all 1 revision of this API.