文書目次

翻訳タスク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-

全体翻訳に必要なクレジット数

-
usedCreditsInteger-

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

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