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.
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