Quick Start

API Usage

Our API allows you to integrate manga translation capabilities into your applications.

Authentication

All API requests require an API key. You can generate an API key in your dashboard.

Include the API key in your request headers:

curl -X POST https://your-domain.com/api/translate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "image": "base64_encoded_image...",
    "source": "ja",
    "target": "zh"
  }'

API Endpoints

POST /api/translate

Translate a manga image.

Request Body:

ParameterTypeRequiredDescription
imagestringYesBase64 encoded image data
sourcestringYesSource language code (ja/zh/en)
targetstringYesTarget language code (ja/zh/en)

Response:

{
  "success": true,
  "result": {
    "image": "base64_encoded_translated_image...",
    "credits_used": 1
  }
}

Language Codes

CodeLanguage
jaJapanese
zhChinese
enEnglish

Example

const response = await fetch('/api/translate', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer YOUR_API_KEY',
    'Content-Type': 'application/json'
  },
  body: JSON.stringify({
    image: base64Image,
    source: 'ja',
    target: 'zh'
  })
});

const data = await response.json();
console.log(data.result.image);
Quick Start