Translate (request for document translation)
- Print
- PDF
Translate (request for document translation)
- Print
- PDF
Article summary
Did you find this summary helpful?
Thank you for your feedback
Overview
- API for requesting to translate document files (POST)
- For normal uploads, it is used to issue request ID and → call Status/Download API.
- Concurrent requests are limited (limits API calls when a document is already in the translation process).
Header
Name | Description |
---|---|
Content-Type | Need to send in multipart/form-data format |
X-NCP-APIGW-API-KEY-ID | Client ID issued when registering the NAVER Cloud Platform app |
X-NCP-APIGW-API-KEY | Secret key issued when registering the NAVER Cloud Platform app |
Parameter
Name | Type | Required | Description |
---|---|---|---|
source | String{ko,ja,en,zh-CN} | true | Source language code * If set to auto, the source language is automatically detected |
target | String{ko,ja,en,zh-CN} | true | Target language code |
file | File | true | File to be translated |
Response
Return in JSON format
Field Name | Type | Description |
---|---|---|
data | JSON Object | |
data requestid | String | Issue request ID for the requested file translation |
Example on successful request
{
"data": {
"requestId": "20201007_2522985202669_001"
}
}
Errors
{
"error": {
"errorCode": "25001",
"message": "API call failed"
}
}
HTTP Status Code | Code | Message | Description |
---|---|---|---|
400 | 00006 | API call failed | Request to unsupported language pairs, file extensions |
500 | 25001 | API call failed | Internal server error |
413 | 25004 | Request Entity Too Large | Exceeded the limited file size (100 MB) |
429 | 25005 | Too many requests | If you have a file currently 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?