{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "bilibili-index-translate--translate-in-browser-with-local-bridge",
 "repo": "bilibili/Index-Translate",
 "repo_url": "https://github.com/bilibili/Index-Translate",
 "repo_slug": "bilibili-index-translate",
 "title": "Use the API inside a browser translation extension",
 "page_title": "How to use the API inside a browser translation extension with Index Translate",
 "summary": "Run a local bridge so Immersive Translate can translate web pages through the free API.",
 "who": "A reader who browses foreign-language pages and uses a browser extension such as Immersive Translate.",
 "problem": "Browser extensions cannot always reach the API directly because of CORS and WAF headers, so the extension needs a local bridge.",
 "outcome": "Web pages translated in the browser, with requests routed through a local address on your machine.",
 "steps": [
  "Clone the repo with `git clone https://github.com/bilibili/Index-Translate` and open a terminal in the folder. (inferred, check the README)",
  "Run `python inference/llm/call_api.py --serve` to start the local bridge proxy.",
  "In Immersive Translate, set Service to Custom / OpenAI and API URL to http://127.0.0.1:8080/v1.",
  "Set Model to Index-Translate-35B-A3B and API Key to any string, such as index, then translate a test page."
 ],
 "agent_prompt": "Use the repo at https://github.com/bilibili/Index-Translate. Start the local bridge with `python inference/llm/call_api.py --serve` and confirm it listens at http://127.0.0.1:8080/v1. Return the exact extension settings used. Verify that a test request to that address returns a translated response.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "caveat": "The bridge only runs while the script is running on your machine, so the extension stops working when you close the terminal.",
 "category": "Content",
 "tags": [
  "Content"
 ],
 "lang": "python",
 "requirements": [
  "Python installed to run inference/llm/call_api.py",
  "Internet access to call the free public API at index-translate.bilibili.com",
  "A local image file (PNG or JPG) or text you want translated"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [],
 "best": false,
 "score": 0.8,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/bilibili-index-translate/translate-in-browser-with-local-bridge/",
 "md": "https://dedupedai.com/use-cases/bilibili-index-translate/translate-in-browser-with-local-bridge/index.md",
 "disclaimer": "Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked \"Seen in the wild\", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/bilibili-index-translate--translate-in-browser-with-local-bridge.json",
 "api_version": "v1"
}
