API

1 回のリクエストで 1 枚のマンガ画像を送信し、翻訳済み PNG を base64 として含む JSON ペイロードを受け取ります。

API Keys
Credits--
読み込み中
curl -X POST https://translatemanga.net/api/v1/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image=@page.png" \
  -F "targetLanguage=English" \
  -F "model=default" \
  -o response.json
API Reference

Endpoint

フィールド
method
enum
意味
翻訳エンドポイントで使用する HTTP メソッド。
POST
フィールド
url
string
意味
単一画像翻訳用の本番エンドポイント。
https://translatemanga.net/api/v1/translate
フィールド
request body
format
意味
リクエストボディの形式。
multipart/form-data
フィールド
response body
format
意味
成功時もエラー時も JSON を返します。
application/json

Authentication

フィールド
Authorization
string
必須
はい
意味
このページで生成した API key を Bearer token として使用します。
Bearer YOUR_API_KEY

Request

フィールド
image
File
必須
はい
意味
翻訳する元のマンガ画像。1 リクエストにつき 1 枚です。
image/*

最大ファイルサイズ: 5MB。

フィールド
targetLanguage
string
必須
はい
意味
翻訳後テキストの対象言語。
English
Japanese
Chinese (simplified)
Chinese (traditional)
Korean
Spanish

フィールド
model
string
必須
いいえ
意味
翻訳モデル。デフォルトは default です。

フィールド
font
string
必須
いいえ
意味
翻訳テキストの描画に使用するフォント。デフォルトは CCWildWords.otf です。
CCWildWords.otf
Kalam.ttf
Bangers-Regular.ttf
KomikaJam.ttf
KomikaSlim.ttf
PatrickHand-Regular.ttf
VtcLettererPro.ttf

Response

フィールド
success
boolean
意味
常に含まれます。リクエストが成功したかどうかを示します。
false
true
フィールド
translated_image
string
意味
success が true の場合に含まれます。data URL プレフィックスなしの base64 PNG です。
base64 PNG
フィールド
mimeType
string
意味
success が true の場合に含まれます。翻訳済み画像の MIME タイプです。
image/png
フィールド
traceId
string
意味
デバッグ用のリクエスト trace ID。成功レスポンスとエラーレスポンスの両方に含まれます。
-
フィールド
creditCost
number
意味
success が true の場合に含まれます。このリクエストで消費された有料 credits。
-
フィールド
remainCredit
number
意味
success が true の場合に含まれます。リクエスト後に残っている有料 credits。
-
フィールド
error
string
意味
success が false の場合に含まれます。人が読めるエラーメッセージです。
-
フィールド
errorCode
enum
意味
success が false の場合に含まれます。安定した機械可読のエラーコードです。
UNAUTHORIZED
MISSING_IMAGE
INVALID_IMAGE_TYPE
IMAGE_TOO_LARGE
UNSUPPORTED_TARGET_LANGUAGE
UNSUPPORTED_MODEL
UNSUPPORTED_FONT
NO_CREDITS_LEFT
TRANSLATION_FAILED