文書目次

翻訳タスク API

翻訳テキスト

/v1/translation/translateTexts

テキストを翻訳し、翻訳結果を同期して返します。

curl
1curl -X POST 'https://otranslator.com/api/v1/translation/translateTexts' \
2--header 'Authorization: [yourSecretKey]' \
3--header 'Content-Type: application/json' \
4--data '{
5  "texts": "[value]",
6  "fromLang": "[string]",
7  "toLang": "[string]"
8}'

リクエストパラメータ

パラメータタイプデフォルト説明
*textsString[]-

翻訳が必要なテキスト

-
*fromLangString-
  • 原言語、原言語は対象言語と同じであってはなりません
  • サポート言語:照会
-
*toLangString-
  • 対象言語、対象言語は元の言語と同じにすることはできません
  • サポート言語:照会
-
modelString-
  • 翻訳のAIモデル
  • サポートモデル:照会
-
fileDescriptionString-

文書の説明。追加情報を提供することで翻訳品質を向上させます。例えば、追加の文書背景情報やその他の翻訳要件などを追加

-

レスポンス

パラメータタイプデフォルト説明
taskIdString-

タスクID

-
translatedTextsString[]-

翻訳後のテキスト

-
priceInteger-

全体翻訳に必要なCredits数

-
usedCreditsInteger-

翻訳タスクで使用済みのCredits数

-
翻訳タスク API
翻訳タスクを再開