Translate (Request for document translation)
    • PDF

    Translate (Request for document translation)

    • PDF

    Article Summary

    Overview

    • API for requesting translation of document file (POST)
    • If upload is successful, a Request ID is issued → Used to call the Status/Download API
    • Request for concurrent translation is prohibited (API cannot be called when there is a document currently being translated)

    Header

    NameDescription
    Content-TypeNeed to be sent in the multipart/form-data format
    X-NCP-APIGW-API-KEY-IDClient ID issued during NCP app registration
    X-NCP-APIGW-API-KEYSecret Key issued during NCP app registration

    Parameter

    NameTypeRequiredDescription
    sourceString{ko,ja,en,zh-CN}trueSource language code
    * If this is set to auto, source language is detected automatically
    targetString{ko,ja,en,zh-CN}trueTarget language code
    fileFiletrueFile to be translated

    Response

    Returned in the json format

    Field NameTypeDescription
    dataJSON Object
    data requestidStringRequest ID is issued for translating the requested file

    Example of approved request

    {
      "data": {
        "requestId": "20201007_2522985202669_001"
      }
    }
    

    Error codes

    {
      "error": {
        "errorCode": "25001",
        "message": "API call failed"
      }
    }
    
    HTTP Status CodeCodeMessageDescription
    40000006API call failedLanguage pair not supported. Request made with file extension
    50025001API call failedInternal server error
    41325004Request Entity Too LargeFile size exceeded (100 MB)
    42925005Too many requestsThere is already a file being translated

    CURL Example

    $ curl -X POST -F file=@a.xlsx -F source=ko -F target=en 'https://naveropenapi.apigw.ntruss.com/doc-trans/v1/translate'
    {"data":{"requestId":"20201007_2522985202669"}}
    

    Was this article helpful?

    Changing your password will log you out immediately. Use the new password to log back in.
    First name must have atleast 2 characters. Numbers and special characters are not allowed.
    Last name must have atleast 1 characters. Numbers and special characters are not allowed.
    Enter a valid email
    Enter a valid password
    Your profile has been successfully updated.