GETTING STARTED

API REFERENCE

Text-Based Translation


Supported Languages

The Bering API supports text translations using the following languages:

Language

API Argument

English

 en

Korean

 ko

Japanese

 ja

Chinese (Simplified)

 zh

Chinese (Traditional)

 zh-hant

French

 fr

German

 de

Spanish

 es

Indonesian

 id

Arabic

 ar

The table below shows the supported translation language pairs:

Translate From

Translate To

 en

 ko,  jp,  zh,  zh-hant,  fr,  de,  es,  id

 ko

 en

 jp

 en

 zh

 en

 zh-hant

 en

 fr

 en

 de

 en

 es

 en

 id

 en

 ar

 en


HTTP Request

The total request body size for text translation requests must not exceed 1MB.

We recommend splitting up your text if you want to translate in excess of this limit.

Host: https://api.beringlab.com
POST Endpoint: /v1/text-translate

Request Body Description

Body parameter

Description

source_language (required)

Language of the text to be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant

target_language (required)

The language into which the text should be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant

source_content (required)

Text to be translated. Defaults to interpreting argument as plain text. For XML, set the kind parameter to ‘xml_docx’.

Type: string (UTF-8 encoded)

domain (required)

The domain of the text to be translated.
Type: string (enum)
legal patent business

subscription_id (required)

Found on the Settings page under ‘API plan Subscription ID’. See Access and Authentication for more details.

Type: string

api_key (required)

Your API Key generated in Access and Authentication.

Type: string

kind (optional)

Used when passing XML to the source_content parameter. 

Type: string
xml_docx

glossary_id (optional)

Used when specifying a glossary to apply to the translation

Type: string

Response Body Description

Body parameter

Description

job_id

ID used to get the translated text. 

Type: string

status_code

Status of the API request

Type: integer

Text with Box Layout
0
Success
Text with Box Layout
1
Pending
Text with Box Layout
2
Error
POST Endpoint: /v1/glossaries/{glossary-id}

Request Body Description

Body parameter

Description

subscription_id (required)

Found on the Settings page under ‘API plan Subscription ID’. See Access and Authentication for more details.

Type: string

api_key (required)

Your API Key generated in Access and Authentication.

Type: string

Response Body Description

Body parameter

Description

id

ID of the glossary. It can be found using GET method for glossaries listed below.

Type: string

name

Name of the glossary

Type: string

owner_id

Glossary owner’s ID which is the same as subscription_id.

Type: string

owner_type

Glossary owner’s account type. Either corporate or individual

Type: string

mappings

Glossary entries shown as a Hashmap

Type: Hashmap

source_language (required)

Language of the text to be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant

target_language (required)

The language into which the text should be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant
POST Endpoint: /v1/glossaries

Request Body Description

glossary_name (required)

Name of glossary

Type: string

source_language (required)

Language of the text to be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant

target_language (required)

The language into which the text should be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant

mappings (required)

Glossary entries shown as a Hashmap

Type: Hashmap

subscription_id (required)

Found on the Settings page under ‘API plan Subscription ID’. See Access and Authentication for more details.

Type: string

api_key (required)

Your API Key generated in Access and Authentication.

Type: string

Response Body Description

Body parameter

Description

status_code

Status of the API request

Type: string

Text with Box Layout
"succeeded": true
Success
Text with Box Layout
"error": "BadRequest"
Error
PUT Endpoint: /v1/glossaries/{glossary-id}

Request Body Description

mappings (required)

Glossary entries shown as a Hashmap

Type: Hashmap

subscription_id (required)

Found on the Settings page under ‘API plan Subscription ID’. See Access and Authentication for more details.

Type: string

api_key (required)

Your API Key generated in Access and Authentication.

Type: string

Response Body Description

Body parameter

Description

status_code

Status of the API request

Type: string

Text with Box Layout
"succeeded": true
Success
Text with Box Layout
"error": "BadRequest"
Error
DELETE Endpoint: /v1/glossaries/{glossary-id}

Request Body Description

subscription_id (required)

Found on the Settings page under ‘API plan Subscription ID’. See Access and Authentication for more details.

Type: string

api_key (required)

Your API Key generated in Access and Authentication.

Type: string

Response Body Description

Body parameter

Description

status_code

Status of the API request

Type: string

Text with Box Layout
"succeeded": true
Success
Text with Box Layout
"error": "BadRequest"
Error
GET Endpoint: /v1/glossaries?subscription_id={subscription_id}&api_key={api_key}

Response Body Description

Body parameter

Description

id 

ID of the glossary. 

Type: string

name 

Name of the glossary

Type: string

source_language 

Language of the text to be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant

target_language 

The language into which the text should be translated.
Type: string (enum)
en ko zh jp de fr es id zh-hant
POST Endpoint: /v1/text-translate/status/{job_id}

Request Body Description

Body parameter

Description

subscription_id (required)

Found on the Settings page under ‘API plan Subscription ID’. See Access and Authentication for more details.

Type: string

api_key (required)

Your API Key generated in Access and Authentication.

Type: string

Response Body Description

Body parameter

Description

text

The translated text.

Type: string

status_code

Status of the API request

Type: integer

Text with Box Layout
0
Success
Text with Box Layout
1
Pending
Text with Box Layout
2
Error

Published