Translate (Request for document translation)
- Print
- PDF
Translate (Request for document translation)
- Print
- PDF
Article Summary
Share feedback
Thanks for sharing your feedback!
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
Name | Description |
---|---|
Content-Type | Need to be sent in the multipart/form-data format |
X-NCP-APIGW-API-KEY-ID | Client ID issued during NCP app registration |
X-NCP-APIGW-API-KEY | Secret Key issued during NCP app registration |
Parameter
Name | Type | Required | Description |
---|---|---|---|
source | String{ko,ja,en,zh-CN} | true | Source language code * If this is set to auto, source language is detected automatically |
target | String{ko,ja,en,zh-CN} | true | Target language code |
file | File | true | File to be translated |
Response
Returned in the json format
Field Name | Type | Description |
---|---|---|
data | JSON Object | |
data requestid | String | Request 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 Code | Code | Message | Description |
---|---|---|---|
400 | 00006 | API call failed | Language pair not supported. Request made with file extension |
500 | 25001 | API call failed | Internal server error |
413 | 25004 | Request Entity Too Large | File size exceeded (100 MB) |
429 | 25005 | Too many requests | There 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?