Run Immersive Translate on a custom OpenAI-compatible API.
Updated 2026-07-16
Immersive Translate's settings include an OpenAI-compatible custom service: paste an API endpoint, a key, and a model name. The endpoint wants the full path, https://api.apisrouter.com/v1/chat/completions, and after that every page, PDF, and subtitle translates through the gateway on any catalog model.
Quick answer: full endpoint URL, key, model name.
Open the extension's Settings, go to Translation Services, and add an OpenAI-compatible custom service. Three values wire it up: the API endpoint, the API key, and the model name. The endpoint is the part people get wrong. Unlike most tools that take a base URL ending in /v1, Immersive Translate wants the complete request path including the /chat/completions suffix. For APIsRouter that is https://api.apisrouter.com/v1/chat/completions, exactly as vendor integration guides for other OpenAI-compatible services show for their endpoints. Model name takes any id the endpoint serves, spelled exactly as the catalog lists it, and the test button in the service form confirms the wiring before you translate anything.
Settings -> Translation Services
-> add an OpenAI-compatible custom service
API Endpoint: https://api.apisrouter.com/v1/chat/completions
API Key: sk-YOUR-APISROUTER-KEY
Model Name: deepseek-v4-flash (any catalog id)
-> run the built-in test to verifyWhat Immersive Translate sends to the endpoint.
Immersive Translate is one of the most widely installed translation extensions, with millions of users across Chrome, Edge, Firefox, and Safari. Its signature mode is bilingual reading: the original paragraph stays put and the translation renders beneath it, across web pages, PDFs, EPUBs, and video subtitles. When an AI service is selected as the translator, each batch of paragraphs becomes a chat-completions request against the configured endpoint. That workload shape is extreme volume with small payloads. Browsing translates as you scroll; a reading session can fire hundreds of requests, each carrying a handful of paragraphs. Two consequences follow. First, per-token price is the entire economics, which is why fast ids like deepseek-v4-flash, glm-5.2, and gemini-3.5-flash fit this tool better than frontier reasoning models. Second, translation writes roughly as many tokens as it reads, so compare output prices too, not just input. The extension is GUI-configured but the surface is fully documented, and because the model name is forwarded as a plain string, the service you add once can be repointed to a different catalog id by editing one field. Multiple custom services can coexist in the picker, so a fast default and a premium service for difficult texts sit side by side.
Full setup, step by step.
From the extension icon, open Settings and find Translation Services. Scroll to the custom or OpenAI-compatible section and add a new service. Give it a recognizable name (the picker will show it), then fill the three fields: the full endpoint URL, your key, and the model name. Vendor guides consistently show this same three-field pattern with their own hosts, which is a useful sanity check that yours should look identical with the APIsRouter host swapped in. Run the service test before leaving the form. It sends a real request, so a passing test means endpoint, key, and model id are all valid together. Then select the new service as your translator, either globally or per site, and translate a page to confirm end to end. Where your version exposes advanced per-service options (request pacing, paragraphs per request), defaults are sensible to start; revisit them only if you translate very dense pages and want more throughput.
curl -s https://api.apisrouter.com/v1/chat/completions \
-H "Authorization: Bearer $APISROUTER_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash",
"messages":[{"role":"user",
"content":"Translate to Chinese: The quick brown fox."}]}'Choosing a translation model for browsing.
Because services sit side by side in the picker, the practical setup is two entries against the same endpoint: a fast default and a premium one. Switching per site takes two clicks, and the per-key usage log shows what each service actually costs your reading habits.
- deepseek-v4-flash is the volume king for everyday reading: quality holds on news, docs, and forums, and the per-session cost stays negligible even for heavy readers.
- glm-5.2 is natively strong for Chinese-target translation, the extension's largest use case, and sits behind the same endpoint by id.
- gemini-3.5-flash handles idiomatic and mixed-language pages well and is a natural second service to keep in the picker.
- claude-haiku-4-5-20251001 upgrades register and terminology for professional reading (papers, contracts) at a still-modest price; keep it as the premium service for sites where nuance matters.
- Frontier reasoning ids are rarely worth it here: translation batches are small and stateless, so the fast tier is where quality per token peaks for this workload.
Pay-as-you-go · transparent per-model pricing
Selected models are priced below official list prices. Exact input, output, cache, and per-request prices are shown for each model.
| Model | Official Price | Our Price |
|---|---|---|
| DeepSeek V4 Flash | $0.14 / $0.28 per M | $0.13 / $0.25 per M |
| GLM-5.2 | $1.14 / $4.00 per M | $1.03 / $3.60 per M |
| Gemini 3.5 Flash | $1.50 / $9.00 per M | $1.20 / $7.20 per M |
| Claude Haiku 4.5 20251001 | $1.00 / $5.00 per M | $0.80 / $4.00 per M |
| GPT-5.4 Mini | $0.75 / $4.50 per M | $0.60 / $3.60 per M |
Failure modes specific to Immersive Translate.
The missing suffix is failure mode number one. Pasting a bare base URL (ending in /v1) into the endpoint field makes every request hit a path that does not exist, which surfaces as the service test failing or translations silently not appearing. The field wants the complete /chat/completions path. The reverse mistake happens too: doubling the path because a guide said "base URL". If your endpoint ends in /chat/completions/chat/completions, requests 404 the same way. One full path, once. Model name typos fail the test with a model-not-found error; the gateway's /v1/models listing is the authoritative spelling, and ids are exact including version suffixes. Key scope confusion shows up as a passing curl but a failing extension test, which usually means the key was pasted with whitespace or into the wrong service entry. Re-paste and re-test inside the form. And remember the extension translates a lot in the background once enabled globally. If usage climbs faster than expected, check whether auto-translate is on for sites you did not intend; that is an extension setting, not an endpoint problem.
Who routes Immersive Translate through a gateway.
- Heavy bilingual readers who translate everything they browse and want volume-tier pricing with a real usage log instead of a vendor subscription.
- Readers whose best models span vendors: DeepSeek and GLM for Chinese, Gemini for idiomatic text, Claude for professional documents, all as picker entries on one key.
- Users in regions where paying individual model vendors is impractical; top-up access with no card requirement covers every family at once.
- Teams standardizing the extension for research or support staff, metering each person or team with its own key.
- PDF and EPUB readers doing long-form translation, where per-token economics compound fastest.
Verify and debug in the right order.
The form's own test button is the primary tool: it exercises endpoint, key, and model together. When it fails, fall back to the curl above with identical values; if curl passes and the form fails, the difference is what you typed into the form (whitespace, a truncated key, a wrong path). A test that passes but pages that do not translate points at service selection rather than wiring: confirm the new service is actually chosen as the active translator, globally or for the current site, and that the site is not on an exclusion list. Once translations flow, the APIsRouter console shows per-request model, token counts, and spend. Browsing translation is the purest volume workload in this catalog, and a week of real usage on the log tells you your true cost per reading day, which is the number that should pick your default model.
curl -s https://api.apisrouter.com/v1/models \
-H "Authorization: Bearer $APISROUTER_API_KEY" | head -50FAQ
What endpoint URL does Immersive Translate need for a custom OpenAI-compatible API?
The full request path including the suffix: https://api.apisrouter.com/v1/chat/completions. A bare base URL ending in /v1 fails, and a doubled path fails too; the field wants exactly one complete path.
Can Immersive Translate use DeepSeek, GLM, or Claude models?
Yes. The model name field forwards any id the endpoint serves, so deepseek-v4-flash, glm-5.2, claude-haiku-4-5-20251001, and gemini-3.5-flash all work through one custom service entry with one key.
How do I know the configuration works before translating pages?
Use the test button in the service form; it sends a real request through your endpoint, key, and model together. A passing test means the wiring is correct end to end.
Can I keep several models available at once?
Yes. Add multiple custom services against the same endpoint with different model names, and they appear side by side in the translator picker. A fast default plus a premium entry for difficult texts is the common setup.
How expensive is browsing translation through an API?
It is a high-volume, small-payload workload where fast-tier models fit best. Costs scale with how much you read and translate; the per-key usage log in the APIsRouter console shows tokens and spend per request, which beats estimating.
Does this replace the extension's built-in translation services?
No, it adds another service to the picker. Built-in options stay available, and you can switch the active translator globally or per site whenever you want.