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:
| Parameter | Type | Required | Description |
|---|---|---|---|
| image | string | Yes | Base64 encoded image data |
| source | string | Yes | Source language code (ja/zh/en) |
| target | string | Yes | Target language code (ja/zh/en) |
Response:
{
"success": true,
"result": {
"image": "base64_encoded_translated_image...",
"credits_used": 1
}
}Language Codes
| Code | Language |
|---|---|
| ja | Japanese |
| zh | Chinese |
| en | English |
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);