Papago Translationの概要

Prev Next

Classic/VPC環境で利用できます。

Papago Translationは、ニューラルネットワーク基盤の機械翻訳(Neural Machine Translation)アルゴリズムで多言語(ソース)をターゲット言語に自動翻訳する NAVERクラウドプラットフォームのサービスです。テキスト翻訳、文書翻訳、ウェブ翻訳、言語検出、用語集機能関連の APIを RESTful形式で提供します。APIを呼び出すには、API Gatewayの IAM認証が必要です。

参考

Papago Translation APIはユーザーの原文データを保存したり、学習データとして活用することは致しません。

Papago Translationの共通設定

Papago Translation APIで共通して使用されるリクエスト形式とレスポンス形式を説明します。

リクエスト

共通リクエスト形式を説明します。

API URL

リクエスト API URLは次の通りです。

Text Translation: https://papago.apigw.ntruss.com/nmt/v1
Doc Translation: https://papago.apigw.ntruss.com/doc-trans/v1
Website Translation: https://papago.apigw.ntruss.com/web-trans/v1
Language Detection: https://papago.apigw.ntruss.com/langs/v1
Glossary: https://papago.apigw.ntruss.com/glossary

リクエストヘッダ

ヘッダの説明は次の通りです。

フィールド 必須の有無 説明
x-ncp-apigw-api-key-id Required NAVERクラウドプラットフォームコンソールで Application登録後に発行された Client ID
x-ncp-apigw-api-key Required NAVERクラウドプラットフォームコンソールで Application登録後に発行された Client Secret
Content-Type Conditional クライアントが処理可能なデータタイプ
  • application/json | multipart/form-data | application/x-www-form-urlencoded
    • Text Translation: application/jsonapplication/x-www-form-urlencoded
    • Doc Translation: multipart/form-data
    • Website Translation: application/x-www-form-urlencoded
参考

NAVERクラウドプラットフォームコンソールで Applicationを登録して APIの使用に必要な認証情報(Client ID、Client Secret)を発行する方法はの詳細は、Papago Translationご利用ガイドのAPIsをご参照ください。
コンソールで Applicationを登録した後に Papago Translation APIを選択しないと、429(Quota Exceed)エラーが発生します。

レスポンス

共通レスポンス形式を説明します。

レスポンスステータスコード

レスポンスステータスコードの説明は次の通りです。

参考

NAVERクラウドプラットフォームで共通して使用されるレスポンスステータスコードの詳細は、Ncloud APIのレスポンスステータスコードをご参照ください。

Text Translation
Text Translationで使用されるレスポンスステータスコードの説明は次の通りです。

HTTPステータスコード コード メッセージ 説明
400 N2MT01 source parameter is needed sourceパラメータ漏れ
400 N2MT02 Unsupported source language sourceをサポートしない
400 N2MT03 target parameter is needed targetパラメータ漏れ
400 N2MT04 Unsupported target language targetをサポートしない
400 N2MT05 source and target must be different sourcetargetが同じ
400 N2MT06 There is no source-to-target translator sourcetarget翻訳機がない
400 N2MT07 text parameter is needed textパラメータ漏れ
400 N2MT08 text parameter exceeds max length textパラメータが最大サイズを超過
400 N2MT09 language detection failed 言語検出失敗
400 N2MT10 invalid glossary key 無効なglossayKey
500 N2MT99 Internal server errors サーバ内部エラー

Doc Translation
Doc Translationで使用されるレスポンスステータスコードの説明は次の通りです。

HTTPステータスコード コード メッセージ 説明
400 00001 Request is invalid 無効なパラメータが存在
400 00006 API call failed サポートしない言語ペアまたはファイル拡張子でリクエスト
401 25003 requestId is invalid -
404 25006 Not Found -
413 25004 Request Entity Too Large 有効なファイルサイズ超過(最大100MB)
429 25005 Too many requests 同時翻訳リクエスト数超過
500 00000 API call failed サーバ内部エラー
500 25001 API call failed サーバ内部エラー
- 01 Error upload file to server ファイルアップロードに失敗
- 10 Translated Doc is empty 文書に文字がない
- 11 Translated Docs length exceeded max-len 文書ファイルが翻訳可能な文字数を超過
- 15 Parsing is not possible パースライブラリ失敗(翻訳不可ファイル)
- 16 Unsupported source language サポートしないソース言語
- 17 Detected langcode is the same as target langcode ソース言語とターゲット言語が同じ
- 18 Language detection failed 言語検出失敗
- 36 PDF Resolution Error サポートする解像度を超過
- 37 the target language is the same as the source language ソース言語とターゲット言語が同じ
- 38 invalid glossary key 無効なglossayKey
- 50 internal parser error 内部パーサーエラー
- 60 internal server error サーバ内部エラー

Website Translation
Website Translationで使用されるレスポンスステータスコードの説明は次の通りです。

HTTPステータスコード コード メッセージ 説明
400 00001 Request is invalid sourcetargethtmlパラメータ漏れ
500 20001 Source and target are equal sourcetarget言語が同じ
400 20006 Exceed max requests size allowed htmlパラメータが最大サイズを超過
400 N2MT02 Unsupported source language sourceをサポートしない
400 N2MT04 Unsupported target language targetをサポートしない
400 N2MT05 invalid glossary key 無効な用語集キー
500 00000 API call failed サーバ内部エラー

Language Detection
Language Detectionで使用されるレスポンスステータスコードの説明は次の通りです。

HTTPステータスコード コード メッセージ 説明
400 LD01 Empty text 言語検出対象のtextがない
400 LD01 Empty query parameter 言語検出対象のtextがない
400 LD03 Query parameter exceeds max length 言語検出対象のtextが長さ制限を超えている(最大5,000文字)
500 LD99 Internal server errors サーバ内部エラー

Glossary
Glossaryで使用されるレスポンスステータスコードの説明は次の通りです。

HTTPステータスコード コード メッセージ 説明
204 - - 用語集削除完了
400 - - Bad Request
400 30009 Invalid Character 入力できない記号の,を含む

Papago Translation API

Papago Translationサービスで提供する APIの説明は次の通りです。

API 説明
Text Translation > translation テキストを翻訳
Doc Translation > translation 文書を翻訳
Doc Translation > status 文書の翻訳状態を確認
Doc Translation > download 文書翻訳の結果をダウンロード
Website Translation > website translation ウェブ翻訳
Language Detection > detect 言語検出
Glossary > create 用語集を作成
Glossary > upload 用語集ファイルをアップロード
Glossary > download 用語集ファイルをダウンロード
Glossary > get 用語集リストを照会
Glossary > delete 用語集を削除

Papago Translation関連リソース

Papago Translation APIについてユーザーの理解に役立つよう、さまざまな関連リソースを提供しています。