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 & PathCapabilityCreditsDescription
POST /api/v1/translate/imageFull Visual Translation1–2 creditsFull translation with clean background, editable textBlocks & nsfwMode support
POST /api/v1/translate/batchMulti-Page Batch + Webhook1–2 / imageBatch translate up to 20 pages per request with signed webhook callback
POST /api/v1/translate/retranslate-bubbleSingle-Bubble RetranslateFreeInstantly re-translate one bubble with selectable style tone without re-running the full page
POST /api/v1/glossaries/extractAuto Term ExtractionFreeScan dialogue across pages to extract character names, skills, and brand SKUs for glossaries
POST /api/v1/ocrText & Bubble OCR1 creditDetect speech bubbles and extract raw source text & coordinates only
POST /api/v1/inpaintSeamless Text Removal1 creditClean text from manga bubbles or posters and return text-free background
GET /api/v1/tasks/:taskIdTask ManagementFreeRetrieve task status, PATCH updated canvas layers, or DELETE to purge (Zero-Retention)
GET /api/v1/worker/statusService Status & LanguagesFreeCheck 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.