Who it is forA developer or writer who needs a quick translation while working in a terminal and has no local GPU.
The problemSetting up a local translation model needs GPUs and model downloads, which is too much for a single short sentence.
The outcomeA translated sentence printed in the terminal, produced by the free hosted model.
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 "Hello, world!" --target zhto translate a sentence to Chinese. - Replace the sentence and the
--targetvalue with the text and language you need. - Check the output for the meaning and for any terminology that must stay fixed.
Prompt for your agent
Use the repo at https://github.com/bilibili/Index-Translate. Run `python inference/llm/call_api.py "<text>" --target <language_code>` and return the translated output. Verify that the output is in the requested language and keeps the meaning of the source text.
Caveat. The free API is a hosted service, so text you send leaves your machine, which may not suit confidential material.
Use this in your AI agent
Ask your agent
Using the Deduped MCP, get the setup steps for bilibili/Index-Translate and "Translate a text string from the command line"
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