- Print
- PDF
Translate document
- Print
- PDF
The latest service changes have not yet been reflected in this content. We will update the content as soon as possible. Please refer to the Korean version for information on the latest updates.
Available in Classic and VPC
Translate and output a document file. It issues a request ID on a successful call, and the issued ID is used to Check document translation status and Download document translation result.
Please note the following before use:
- Text with images cannot be translated.
- Some styles applied to text may not match or may be omitted.
- Some links or actions applied to the text may not work or may be omitted.
- Password protected files not supported.
- Read-only files are not supported.
- If a document is already in the translation process, simultaneous API calls are restricted.
Notes for each supported document
Doc Translation supports translation of Microsoft Office documents, PDF documents, and Hangul documents. When using the API, check the notes for each supported document.
Document type | Note |
---|---|
Microsoft Office document |
|
PDF document |
|
Hangul document |
|
Request
This section describes the request format. The method and URI are as follows:
Method | URI |
---|---|
POST | /translate |
Request headers
For information about the headers common to all Papago Translation APIs, see Common Papago Translation headers.
Request body
You can include the following data in the body of your request:
Field | Type | Required | Description |
---|---|---|---|
source | String | Required | Language code of the source text (source)
|
target | String | Required | Language code of the target text
|
file | File | Required | Document file to translate
|
Languages supported for translation
The following describes the supported languages for translation.
Source language | Translation direction | Languages supported (compatible) for translation |
---|---|---|
Korean | ⇔ | English, Japanese, Chinese (Simplified) |
English | ⇔ | Korean, Japanese |
Chinese (Simplified) | ⇔ | Korean |
Request example
The request example is as follows:
curl --location --request POST 'https://naveropenapi.apigw.ntruss.com/doc-trans/v1/translate' \
--header 'X-NCP-APIGW-API-KEY-ID: {Client ID issued when registering the app}' \
--header 'X-NCP-APIGW-API-KEY: {Client secret issued when registering the app}' \
--header 'Content-Type: multipart/form-data' \
--form 'source="auto"' \
--form 'target="ko"' \
--form 'file=@"{file}"'
Response
This section describes the response format.
Response body
The response body includes the following data:
Field | Type | Required | Description |
---|---|---|---|
data | Object | - | Response result |
data.requestId | String | - | ID issued with the translation request (Request ID)
|
Response status codes
For information about the HTTP status codes common to all Papago Translation APIs, see Common Papago Translation response status codes.
Response example
The response example is as follows:
{
"data": {
"requestId": "20240823_1724375809035_033"
}
}