Developers
The same endpoint the SubLingo page uses is open to scripts, bots and apps. Calls from outside the browser page use credits: 10,000 subtitle lines for $5, about 30 episodes of a 24-minute anime. No account, no subscription, credits never expire. Translating by hand on sublingo.cc stays free.
x-sublingo-key header with every request.POST https://sublingo.cc/api/translate with a JSON body: texts (array of subtitle lines, text only), from and to (language names, below; from may be "Auto"). The response has the translations in the same order and count. Timing is yours to keep: send only the text of each cue and put the translations back on your own timestamps.
curl -X POST https://sublingo.cc/api/translate \
-H "Content-Type: application/json" \
-H "x-sublingo-key: YOUR_LICENSE_KEY" \
-d '{"texts":["Where are you going?","Wait for me!"],"from":"English","to":"Indonesian"}'{"translated":["Kamu mau ke mana?","Tunggu aku!"]}import requests
API = "https://sublingo.cc/api/translate"
KEY = "YOUR_LICENSE_KEY"
def translate(lines, src="English", dst="Indonesian"):
out = []
for i in range(0, len(lines), 30): # 30 lines per request
r = requests.post(API, json={"texts": lines[i:i+30], "from": src, "to": dst},
headers={"x-sublingo-key": KEY}, timeout=90)
r.raise_for_status()
out += r.json()["translated"]
return out<i> or ASS override blocks are kept in place.| HTTP | code | Meaning |
|---|---|---|
| 401 | API_KEY_REQUIRED | Request didn't come from the sublingo.cc page and has no x-sublingo-key header. |
| 429 | CREDITS_EMPTY | The key has no lines left (or was never redeemed). Buy and redeem another pack, then switch to the new key. |
| 413 | PAYLOAD_LIMIT | Over 2,000 lines or 200,000 characters in one request. Split it; 30 lines per request is the sweet spot. |
| 503 | DAILY_CAP | Translation is paused for everyone for the rest of the UTC day (service-wide cost limit). Retry tomorrow. |
| 500 | — | Upstream model error. Lines are refunded automatically; retry the same request. |
Use the names exactly as written:
English · Spanish · Portuguese · French · German · Italian · Japanese · Korean · Chinese (Simplified) · Chinese (Traditional) · Arabic · Hindi · Russian · Vietnamese · Indonesian · Thai · Turkish · Dutch · Polish · Swedish · Greek · Czech · Romanian · Hungarian · Hebrew · Persian · Ukrainian · Tamil · Filipino · Malay
Each key keeps its own balance, so for a bigger job buy several packs and move to the next key when one runs out. Creem, the checkout provider, emails a receipt for every purchase.