OpenAPI 3.1RESTful JSONNSFW Uncensored Support
MangaTrans AI Developer Open API v1
Programmatically integrate automated manga translation, e-commerce poster localization, seamless text removal, and editable bubble layers into your apps or workflows.
POST /api/v1/translate/image
Single image translation returning composite image, clean text-free background layer, and editable textBlocks array. Credits auto-refund on error.
curl -X POST "http://localhost:3000/api/v1/translate/image" \
-H "Authorization: Bearer sk_your_api_key" \
-H "Content-Type: application/json" \
-d '{
"imageUrl": "https://example.com/raw-manga-page-01.png",
"preset": "manga",
"sourceLang": "JA",
"targetLang": "CHS",
"nsfwMode": true,
"ephemeralMode": false,
"glossary": {
"魔王城": "魔王城",
"勇者アレン": "勇者艾伦"
}
}'POST /api/v1/translate/batch (Python)
Batch translate up to 20 pages per call with glossary binding and HMAC-SHA256 signed webhook delivery.
import requests
resp = requests.post(
"http://localhost:3000/api/v1/translate/batch",
headers={"Authorization": "Bearer sk_your_api_key"},
json={
"images": [
"https://example.com/ch01-p01.jpg",
"https://example.com/ch01-p02.jpg"
],
"preset": "uncensored_manga",
"sourceLang": "JA",
"targetLang": "EN",
"nsfwMode": True,
"webhookUrl": "https://your-app.com/webhooks/mangatrans"
},
timeout=120,
)
print(resp.json())Core Open API v1 Endpoints
| Method & Path | Capability | Credits | Description |
|---|---|---|---|
| POST /api/v1/translate/image | Full Visual Translation | 1–2 credits | Full translation with clean background, editable textBlocks & nsfwMode support |
| POST /api/v1/translate/batch | Multi-Page Batch + Webhook | 1–2 / image | Batch translate up to 20 pages per request with signed webhook callback |
| POST /api/v1/translate/retranslate-bubble | Single-Bubble Retranslate | Free | Instantly re-translate one bubble with selectable style tone without re-running the full page |
| POST /api/v1/glossaries/extract | Auto Term Extraction | Free | Scan dialogue across pages to extract character names, skills, and brand SKUs for glossaries |
| POST /api/v1/ocr | Text & Bubble OCR | 1 credit | Detect speech bubbles and extract raw source text & coordinates only |
| POST /api/v1/inpaint | Seamless Text Removal | 1 credit | Clean text from manga bubbles or posters and return text-free background |
| GET /api/v1/tasks/:taskId | Task Management | Free | Retrieve task status, PATCH updated canvas layers, or DELETE to purge (Zero-Retention) |
| GET /api/v1/worker/status | Service Status & Languages | Free | Check service readiness, available scene presets, and all 16 supported languages |
Authentication, Privacy & Automatic Refund Guarantees
Production-ready integration rules for secure authentication, zero-retention privacy, and fair billing.
1. Bearer API Key Auth: Create a key (sk_...) under /settings/apikeys and send Authorization: Bearer sk_... on every request.
2. Zero-Retention Privacy: Pass "ephemeralMode": true to ensure source and translated image payloads are never persisted on the server.
3. Auto-Refund & Signed Webhooks: Failed tasks automatically refund deducted credits, and batch webhook callbacks include an HMAC-SHA256 X-MangaTrans-Signature header.