Who it is forA reader who browses foreign-language pages and uses a browser extension such as Immersive Translate.
The problemBrowser extensions cannot always reach the API directly because of CORS and WAF headers, so the extension needs a local bridge.
The outcomeWeb pages translated in the browser, with requests routed through a local address on your machine.
What you need first
- 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
Steps
- Clone the repo with
git clone https://github.com/bilibili/Index-Translateand open a terminal in the folder. (inferred, check the README) - Run
python inference/llm/call_api.py --serveto 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.
Prompt for your agent
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.
Caveat. The bridge only runs while the script is running on your machine, so the extension stops working when you close the terminal.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for bilibili/Index-Translate and "Use the API inside a browser translation extension"
Add Deduped to Claude Code once
claude mcp add --transport http deduped https://dedupedai.com/mcp
Every Monday: the 5 hottest repos and exactly how to use them. Free, one email a week, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer