YarakuZen Translate API
API version: 2.0.0
Document last modified: Oct 24, 2023

Table of Contents
Translation Entry Point
Request URL
Request Parameters
Request Responses
Detailed Error Responses
Response Formats
Language Codes
Default Usage Limits
Troubleshooting
Integrating with Python

344556
78882

​Translation Entry Point
Get translations for multiple texts. The machine translation engine and categories definedin the user's settings page will be used while translating and matching.
POST api/translate/v2
EXAMPLE IMPLEMENTATION

curl https://app.yarakuzen.com/api/translate/v2 \-d 'authKey=xxxxx' \-d 'textLanguage=ja' \-d 'translationLanguage=en' \-d 'texts[0]="こんにちは。"' \-d 'texts[1]="テストです。"'EXAMPLE REQUEST{"authKey": "xxxxx","textLanguage": "ja","translationLanguage": "en","texts": ["こんにちは。","テストです。"]}
EXAMPLE RESPONSE{"translations": ["hello.","It's a test."]}3Request URL
The URL for the API consists of a “Base URL” which depends on your YarakuZen orequivalent OEM application, plus the “/api/translate/v2” section.
You can find the “Base URL” in the URL bar if you open your YarakuZen or equivalent
OEM application, as seen in the image below.

In this example the “Base URL” will be “https://app.yarakuzen.com”, so the full URL for the
API will be “https://app.yarakuzen.com/api/translate/v2”.

Request Parameters
Parameter

InTypeDescription

authKey

bodystring

Your auth key obtained from the user
settings, integration page.

body

array (string)

Array of strings you want to translate.
The maximum amount ofcharacters per request is 3000.

bodystring

Language code of the input text.
Supported languages depend on
the selected engine.

translationLanguage bodystring

Language code to use for thetranslation. Supported languages
depend on the selected engine.

required

texts
requiredtextLanguage
required

required​4​Request Responses
Response

Type

StatusDescription

Success

Success 200

Translation responses. Contains thesame number of entries as the supplied`texts`.

Bad request

Error

400

Check the `code` property of theresponse for details.

Not authorized

Error

403

Make sure you are providing the correct
API key in the URL.

Content too large

Error

413

You have reached the character perrequest limit.

Too many requests

Error

429

You have reached a character orrequest limit.

Detailed Error Responses
CodeStatus Message

authKeyMissing

400

The "authKey" parameter is missing
from the request.

machineTranslationEngineNotConfigured 400

A machine translation engine has notbeen configured yet. Please select anengine on the Integration page.

authKeyInvalid403

The supplied authKey is not valid.

authKeyMissing

403

The "authKey" parameter is missing
from the request.

apiAccessDenied

403

Your account does not have access touse the API.

requestCharacterLimitExceeded413

The limit for translation characters per
request (LIMIT) has been reached.

minuteCharacterLimitExceeded429

The limit for translation characters per
minute (LIMIT) has been reached.

dailyCharacterLimitExceeded429

The limit for translation characters perday (LIMIT) has been reached.

minuteRequestLimitExceeded429

The limit for translation requests per
minute (LIMIT) has been reached.

​5​Response Formats
Success
EXAMPLE RESPONSE{
translations: string array}

Error
EXAMPLE RESPONSE{error: {code: string
message: string}}

6​Language Codes
The text language and target language needs to be provided in the translation request.
The supported languages depend on which engine you have configured from the user
settings, integration page. An engine’s language pair support can be checked on thetranslation page in the app by selecting an engine and opening the language drop-downlist.

Language

CodeLanguage

CodeArabicarBengalibn

GermandeEnglishen

Spanishes

Finnishfi

Frenchfr

Hindi

hi

IndonesianidItalianitJapaneseja

KoreankoMongolian

mnMalaymsMyanmar

myNepalineDutchnl

PolishplPortuguese

pt

RomanianroRussianru

Swedishsv

ThaithTagalogtlTurkishtr

UkrainianukVietnamesevi

Simplified Chinesezh

Traditional Chinese zh_Hant

7​Default Usage Limits
Type

PeriodLimit

Description

Requests

Per minute60

The amount of translation requests
that can be sent per minute.

Per day

300,000

The amount of characters that can betranslated per day.

Per minute10,000

The amount of characters that can betranslated per minute.

Per request

3,000

The amount of characters that can betranslated per request.

Characters​​Troubleshooting
Integrating with Python
If you are integrating with Python you will need to manually add a `User-Agent` header toyour request as well, otherwise the request will result in a 403 error.

8