🌍 Translation API

Translate Video Content with AI Precision

Translate speech, generate subtitles, and localize video content for global audiences. Context-aware AI translation that preserves meaning and tone.

POST /api/v1/dubbing/translate
{
  "video_url": "https://example.com/video.mp4",
  "source_language": "en",
  "target_language": "ja",
  "output_format": "subtitles",
  "include_transcript": true
}

// Response
{
  "success": true,
  "data": {
    "task_id": "trans_abc123",
    "status": "processing",
    "estimated_time": 120
  }
}

How It Works

Automated translation pipeline from audio extraction to final output.

1

Submit Video

Provide a video URL with source and target languages.

2

Transcribe

AI transcribes all speech with timestamps and speaker detection.

3

Translate

Context-aware translation preserves meaning, idioms, and cultural nuance.

4

Export

Download translated subtitles, transcripts, or fully dubbed video.

Code Samples

Python
import requests, time

API_KEY = "ak_your_key_here"
BASE = "https://mobileapi.aienvoy.dev/api/v1"
headers = {"X-API-Key": API_KEY}

# 1. Start translation
resp = requests.post(f"{BASE}/dubbing/translate",
    headers=headers,
    json={
        "video_url": "https://example.com/video.mp4",
        "source_language": "en",
        "target_language": "ja",
        "output_format": "subtitles",
        "include_transcript": True
    }
)
task_id = resp.json()["data"]["task_id"]

# 2. Poll until done
while True:
    status = requests.get(
        f"{BASE}/dubbing/{task_id}/status",
        headers=headers
    ).json()
    if status["data"]["status"] == "completed":
        print(status["data"]["subtitles_url"])
        print(status["data"]["transcript"])
        break
    time.sleep(10)
JavaScript (Node.js)
const API_KEY = "ak_your_key_here";
const BASE = "https://mobileapi.aienvoy.dev/api/v1";
const headers = {
  "X-API-Key": API_KEY,
  "Content-Type": "application/json"
};

// 1. Start translation
const res = await fetch(`${BASE}/dubbing/translate`, {
  method: "POST",
  headers,
  body: JSON.stringify({
    video_url: "https://example.com/video.mp4",
    source_language: "en",
    target_language: "ja",
    output_format: "subtitles",
    include_transcript: true
  })
});
const { data } = await res.json();

// 2. Poll until done
const poll = setInterval(async () => {
  const s = await fetch(
    `${BASE}/dubbing/${data.task_id}/status`,
    { headers }
  ).then(r => r.json());
  if (s.data.status === "completed") {
    clearInterval(poll);
    console.log(s.data.subtitles_url);
  }
}, 10000);

Output Formats

Choose the output that fits your workflow.

Subtitles

SRT and VTT subtitle files with precise timestamp alignment.

SRT / VTT

Transcript

Full text transcript in the target language with speaker labels.

JSON / TXT

Dubbed Video

Combine with the Dubbing API for a fully dubbed video output.

MP4

API Features

Context-Aware Translation

AI understands context, idioms, and domain-specific terminology for accurate translations.

Speaker Attribution

Each translated segment is attributed to the correct speaker for multi-person content.

Timestamp Precision

Word-level timestamps for perfect subtitle synchronization with video.

50+ Languages

Translate between any pair of supported languages, including right-to-left scripts.

Batch Processing

Translate multiple videos in parallel for large-scale localization pipelines.

Combine with Dubbing

Chain with the Dubbing API for end-to-end video localization.

Use Cases

📹

YouTube Creators

Add multilingual subtitles to grow global audience

📚

Course Platforms

Localize educational courses for international learners

⚖️

Legal & Compliance

Translate depositions, hearings, and legal proceedings

🏥

Healthcare

Translate medical training and patient education videos

Translate Your Content for the World

Get your free API key and start translating video content today.