How To Use 
Start with Console
API Document 

Try Free Now

Dark

Light

TEXT TRANSLATION
Async Post
Translation may take a period of time to complete, so the translation can be performed in synchronized and asynchronized manner.
Endpoint
Request details
POST
https://translate.classiii.info/api/v1/translate/async
Header
Header
Description
Content-Type
application/json
accessKey, nonce, signature
Please refer to the authentication section.
Body
Key
Require
Description
fieldId
O
Professional field ID. Select a professional field to improve the translation accuracy. Please refer to the Specialized Fields section.
text
O
Original text. Specify an array of the texts to be translated; each array element is up to 200 words. The total array size of the texts should be less than 270KB.(about 90 thousands Japanese characters)
sourceLang
O
The language of the original text. Except for languages such as zh-CN and zh-TW, please use the ISO 639-1 code. Specify "auto" for automatic language detection. To get the list of supported languages, please refer to Languages section.
targetLang
O
The language of the translated text. Except for languages such as zh-CN and zh-TW, please use the ISO 639-1 code. To get the list of supported languages, please refer to Languages section.
contractId
Contract ID. For user who has one contract, the field can be omitted. For user who has two or more contracts, it's required to specify the contractId. (e.g. User who has a Text translation contract and a File translation contract, has to specify the contract ID)
autoSplit
Specify true for splitting long text(s)(more than 1000 words) into sentences automatically. Original text(s) in English, Japanese, and Chinese (zh-CN, zh-HK, and zh-TW) can be splitted automatically.
type
(This field will be invalidated) Specify the translation engine. If you're using Regular plan, please omit this field or specify it as 't4oo'. If you're using Lite plan, please specify this field as 'lite'. Also, when using the Lite plan, specify the professional field as 'talk', 'med', or completely omit the field.
removeFakeLineBreak
When set to true (default), the translation engine will try to combine the original texts before translation. When set to false, the translation engine will not combine the original texts, and the texts will be translated as-is.
Request Sample
{
    "fieldId": "1",
    "text": [
    "This is a pen.",
    "I like apple."
    ],
    "targetLang": "ja",
    "sourceLang": "en",
}
Response
Key
Description
status
For successful request, success will be specified for this field, otherwise failure will be specified.
queueId
Queue ID. The translated text can be obtained with the queue ID.
Response Sample
{
  "status": "success",
  "data": {
    "queueId": "ae914ccc-8866-43bc-8a26-0a652c4f1819"
  }
}
Limitation
Limitation
Each key can only send 60 requests in 1 minute, or it will return error.

api/v1/translate/async
Submit the original text by HTTP POST request and receive the queue ID.
// Define struct of request json body
type TranslateJson struct {
  FieldId string `json:"fieldId"`
  Text []string `json:"text"`
  TargetLang string `json:"targetLang"`
  SourceLang string `json:"sourceLang"`
}

// Post translate request and get queue ID
func PostApiExample(accessKey, secretKey, basePath, nonce string) {
  translatePath := "/api/v1/translate/async"
    
  signTranslate := MakeHMAC(nonce, translatePath, secretKey)

  testJson := &TranslateJson{
    FieldId: "1",
    Text: []string{"This is a pen.", "I have an apple."},
    TargetLang: "ja", 
    SourceLang: "en",
    ContractId: "your contractId"}
  jsonValue, _ := json.Marshal(testJson)

  client := &http.Client{}
  req, err := http.NewRequest(
    "POST",
    GetFullUrl(basePath, translatePath),
    bytes.NewBuffer([]byte(jsonValue)),
  )
  req.Header.Set("Content-Type", "application/json")
  req.Header.Set("nonce", nonce)
  req.Header.Set("accessKey", accessKey)
  req.Header.Set("signature", signTranslate)
  res, err := client.Do(req)
    
  if err != nil {
    fmt.Printf("The HTTP request failed with error %s\n", err)
  } else {
    data, _ := ioutil.ReadAll(res.Body)
    fmt.Println(string(data))
  }
}
About the authentication, please refer to the authentication section.
About full sample code of each languages, please refer tohere