How to Translate Video Subtitles with AI Using Your Own API Key – Complete Chrome Setup Guide
How much better is AI subtitle translation than Google Translate?
Traditional machine translation (Google, Microsoft) translates subtitles line by line with no context — leading to inconsistent character names, missed idioms, and awkward phrasing. DualPiP lets you connect your own AI API key (BYOK) to DeepSeek, OpenAI, Claude, Gemini, and 30+ other AI providers to translate video subtitles, producing noticeably better results especially for Japanese, Korean, German, and other languages where context matters.
DualPiP also includes 4 free translation engines (Google, Microsoft, Yandex, Chrome Built-in AI) alongside its AI translation engines. It supports 200+ video websites including YouTube, Netflix, Disney+, Crunchyroll, TED, and more. AI translation costs are based on actual API usage with no markup. For a detailed comparison with other subtitle extensions, see Best Chrome Bilingual Subtitle Extensions in 2026.
What makes AI translation different from traditional machine translation for subtitles?
AI translation (GPT, DeepSeek, Claude, and other LLMs) differs from Google/Microsoft machine translation primarily in contextual understanding.
| Aspect | Traditional MT (Google/Microsoft) | AI Translation (DeepSeek/GPT/Claude) |
|---|---|---|
| Context | Line-by-line, no history | DualPiP sends recent N subtitles as context |
| Tone & nuance | Literal, mechanical | Recognizes dialogue tone and character dynamics |
| Proper nouns | Frequently mistranslates names and places | Uses film metadata to improve proper noun accuracy |
| Japanese/Korean | Honorifics and omitted subjects often wrong | Understands honorific systems, infers omitted subjects |
| Cost | Free | Pay-per-use (DeepSeek ≈ $0.0001/subtitle) |
| Speed | Instant | Slightly slower (typically 200–500ms) |
DualPiP also integrates film context recognition: it automatically extracts the video title and queries the TMDB database for film details (genre, synopsis, cast), injecting this information into the AI translation prompt for more accurate proper noun and plot-related translations. If you need both original and translated text displayed simultaneously for language learning, DualPiP also supports bilingual subtitle display.
Why does DualPiP use BYOK (Bring Your Own Key) instead of built-in AI translation?
DualPiP lets users configure their own AI API keys rather than routing requests through a platform proxy like some other tools do. This design choice serves several purposes:
| Aspect | BYOK (Your Own Key) | Platform Proxy |
|---|---|---|
| Cost | Pay the AI provider directly, no markup | Platform adds margin or bundles into subscription |
| Privacy | API key stays local, requests go directly to provider | Requests route through platform servers |
| Model choice | Switch freely between any provider and model | Limited to models the platform has integrated |
| Transparency | Clear API billing you can verify | Bundled into subscription, hard to calculate |
| Flexibility | Add custom or self-hosted providers anytime | Dependent on platform's integration schedule |
DualPiP sends translation requests directly from your browser to the AI provider you configured. Your API key is stored only in the browser's local chrome.storage and never transmitted to any intermediate server. You can add, remove, or switch providers at any time.
Which AI translation providers does DualPiP support?
DualPiP includes pre-built configuration templates for 30+ AI providers. Select a provider, enter your API key, and start translating.
Cloud AI Providers
| Provider | API Type | Highlights |
|---|---|---|
| OpenAI (GPT) | OpenAI | Consistent quality, supports GPT-4.1 mini and above |
| Anthropic (Claude) | Claude | Strong long-text understanding, natural translations |
| Google AI (Gemini) | Gemini | Google's multimodal LLM |
| DeepSeek | OpenAI-compatible | Extremely cost-effective, strong CJK translation |
| Groq | OpenAI-compatible | Ultra-fast inference, ideal for real-time subtitles |
| Mistral | OpenAI-compatible | European provider, strong multilingual capability |
| xAI (Grok) | OpenAI-compatible | Elon Musk's AI company |
| OpenRouter | OpenAI-compatible | Unified API for multiple models |
Asia-Pacific Cloud AI Providers
| Provider | API Type | Highlights |
|---|---|---|
| Alibaba Cloud (Qwen) | OpenAI-compatible | Leading Chinese AI, strong CJK translation |
| Volcengine (Doubao) | OpenAI-compatible | ByteDance's AI service, fast response |
| Zhipu (GLM) | OpenAI-compatible | Tsinghua-backed LLM |
| Moonshot (Kimi) | OpenAI-compatible | Strong long-context understanding |
| SiliconFlow | OpenAI-compatible | Multiple open-source models at low prices |
Local AI (Offline Translation)
| Tool | Description |
|---|---|
| Ollama | Run open-source models locally (Llama, Qwen, Gemma), completely free and private |
| LM Studio | Local model management with a graphical interface |
| vLLM | High-performance local inference framework |
| LLaMa.cpp / Llamafile | Lightweight local inference |
Local AI translation requires no API key and runs entirely on your machine — ideal for privacy-conscious users or restricted network environments.
How do you set up AI translation in DualPiP?
Setting up AI translation takes three steps: add a provider, add a model, and select it as your translation service.
Step 1: Add an AI Provider
- Open DualPiP's Settings page (click the extension icon → Settings)
- Go to the Translation Services tab
- Click the Add Provider button
- Select a provider from the preset list (e.g., DeepSeek) or choose Custom
- Enter your API Key (obtained from the provider's website)
- Click Save
Step 2: Add a Model
- Click Add Model under the provider you just added
- Enter the model ID (e.g.,
deepseek-v4-flash,gpt-4.1-mini,claude-haiku-4-5) - Recommended: disable Model Thinking (subtitle translation doesn't need reasoning — disabling it makes translation faster and cheaper)
- Click Save
Step 3: Select the Translation Service
In the picture-in-picture player or the in-page subtitle translation menu, select the AI model you just added as your translation service. If the video doesn't have built-in subtitles, you can use DualPiP's subtitle search feature to find and load subtitles from OpenSubtitles, then translate them with AI.
Which AI model is best for translating subtitles?
Choosing an AI model means balancing translation quality, response speed, and cost. Here are recommendations specifically for subtitle translation:
| Tier | Model | Cost per subtitle | Best for |
|---|---|---|---|
| Best value | DeepSeek V4 Flash | ≈ $0.0001 | Everyday viewing, CJK languages |
| Fastest | Groq Llama 4 Scout | Free tier | Real-time subtitles, low latency |
| Highest quality | Claude Sonnet 4.6 | ≈ $0.002 | Literary content, technical terminology |
| Free & local | Ollama + Llama 3.1 8B | Free | Privacy-first, requires local GPU |
| Balanced | GPT-4.1 mini | ≈ $0.0003 | General use, consistent quality |
Subtitles are short text segments (typically 10–50 words each), so AI translation costs are extremely low. With DeepSeek V4 Flash, translating a full 2-hour movie (1,500–2,000 subtitle lines) costs approximately $0.03–0.07. DualPiP's batch translation and prompt caching further reduce costs.
What advanced AI translation features does DualPiP offer?
Context-Aware Translation History
DualPiP uses a sliding window context mechanism that sends recently translated subtitles as conversation history to the AI. This helps the AI understand ongoing dialogue context and maintain consistency across scenes. The context window size is adjustable in provider settings (default 5, max 20).
Film Metadata Enhancement
DualPiP automatically extracts the current video title and queries the TMDB database for detailed film information (genre, synopsis, cast). This metadata is included in the translation prompt, helping the AI correctly translate character names, locations, and plot-specific terminology.
Custom API Parameters
Each provider supports custom request headers and body parameters (with dot-notation for nested keys), accommodating special API requirements. For example, configure thinking.type: disabled for DeepSeek to turn off reasoning mode.
Daily Usage Limits & Statistics
Set daily request and token limits per provider to prevent unexpected costs. The extension tracks usage locally and automatically pauses translation when limits are reached, displaying a notification in the picture-in-picture window.
Disable Model Thinking
Subtitle translation is a short text translation task that doesn't require deep reasoning. DualPiP lets you toggle "thinking" mode per model — disabling it means faster translations and lower token consumption.
What hardware do you need for local AI translation with Ollama?
Local AI translation runs entirely on your machine with no API key required — ideal for users who prioritize privacy or have limited internet access.
Minimum requirements:
- 8 GB RAM or more
- Dedicated GPU recommended (NVIDIA 6 GB+ VRAM) — CPU inference works but is slower
- Ollama installed with a downloaded translation model
Recommended models:
llama3.1:8b— Meta's Llama 3.1 8B, well-balanced multilingual translationqwen3:8b— Alibaba's Qwen3 8B, excellent for Chinese/Japanese/Koreangemma3:4b— Google's lightweight model, capable subtitle translation at just 4B parameters
Setup steps:
- Install and start Ollama (listens on
localhost:11434by default) - Run
ollama pull llama3.1:8bin your terminal to download a model - In DualPiP, add the Ollama provider (preset configuration auto-fills the address)
- Add the model ID (e.g.,
llama3.1:8b) - Select that model as your translation service
Frequently Asked Questions
Q: Is AI subtitle translation slow? Most cloud AI providers respond in 200–500ms. DualPiP supports subtitle preloading (batch-translating upcoming subtitles ahead of time), so you experience virtually no delay during playback.
Q: Is my API key safe? Does it get uploaded to a server?
Your API key is stored only in the browser's local storage (chrome.storage). Translation requests are sent directly from your browser to the AI provider — no data passes through any intermediate server.
Q: How much does it cost to translate a full movie with GPT-4.1 mini? GPT-4.1 mini costs $0.40/M input tokens and $1.60/M output tokens. A 2-hour movie has roughly 1,500–2,000 subtitles. Using DualPiP's batch translation mode, the total cost is approximately $0.05–0.15. With DeepSeek V4 Flash ($0.14/M input, $0.28/M output), the same movie costs just $0.03–0.07.
Q: Can I use free translation and AI translation together? Yes. DualPiP's 4 free translation engines and AI translation engines can be switched at any time. We recommend using free engines for daily viewing and switching to AI when you need higher quality. Combined with DualPiP's learning mode, you can also AB-loop individual subtitle lines for focused listening practice.
Q: Which video websites are supported? DualPiP supports 200+ video websites including YouTube, Netflix, Disney+, Crunchyroll, HiAnime, TED, Coursera, Udemy, and more. Sites built on common player frameworks (video.js, JW Player, Plyr) are also automatically supported.
Q: How does local Ollama translation compare to cloud AI in quality? 8B-parameter local models (like Llama 3.1 8B) approach GPT-4.1 mini quality and handle common language pairs well for subtitle translation. 70B+ parameter local models can match top-tier cloud models.
Start Translating Subtitles with AI
In-page bilingual subtitles on YouTube and basic picture-in-picture playback are free. Premium unlocks full-site subtitle support, AI translation engine configuration, and the complete learning mode.