文書目次

はじめに

文書翻訳用のRESTful APIを提供し、自動翻訳タスク管理、用語集ベースの専門用語統一、対応形式・言語・モデルの照会機能をサポートすることで、シームレスな翻訳ワークフローの構築とユーザーアカウント管理を実現します。

はじめに

開始するには、開発者になるための申請が必要です。開発者として申し込む

承認されると、複数のAPIキーを作成し、必要に応じて各APIリクエストに適切なAPIキーを含めることができます。

クイックアクセス

Base URL

https://dltranslator.com/api

認証方式

Authorization: [yourSecretKey]

JSONリクエスト

ファイルアップロードAPI以外、APIはデフォルトでPOST JSONリクエストを使用し、Content-Typeはapplication/jsonです。

ファイルアップロード

ドキュメント翻訳タスクの作成はmultipart/form-dataを使用し、fileフィールドに翻訳するファイルを渡します。

汎用エラーレスポンス

リクエストが失敗した際、APIはJSONを返し、errorフィールドには固定の英語エラー情報が含まれます。HTTPステータスコードによるエラー処理を優先し、errorフィールドは表示またはログ記録に使用することを推奨します。

{
  "error": "Invalid API key."
}

エラーステータスコードルール

すべてのv1 APIエラーレスポンスは同じ構造を保ちますので、以下のHTTP status codeルールに従って処理してください。

400 Bad Request
Missing required parameters, invalid parameter formats or enum values, missing file upload, upload save failure, or task processing failure.
401 Unauthorized
Missing API key or invalid API key.
402 Payment Required
Insufficient credits balance for preview, full translation, or text translation.
404 Not Found
The task or glossary does not exist, has been deleted, does not belong to the current API account, or was not created through the API.
409 Conflict
The current task status does not allow the requested operation.
500 Internal Server Error
Unexpected server exception. The response error is fixed as "Internal server error.".

推奨導入フロー

リソース

翻訳タスクAPI
翻訳タスクの作成