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.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
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 [email protected] and we will look at it promptly. Full disclaimer page