Documentation Index
Fetch the complete documentation index at: https://runcrate.ai/docs/llms.txt
Use this file to discover all available pages before exploring further.
Translate text between languages using multilingual LLMs. Context-aware translations that outperform traditional MT on nuanced content.
Recommended models
| Model | Strengths |
|---|
| Qwen3-Max | Best for CJK (Chinese, Japanese, Korean), strong European |
| DeepSeek-V3 | Strong across all major languages, cost-effective for volume |
Basic translation
from runcrate import Runcrate
client = Runcrate(api_key="rc_live_YOUR_API_KEY")
response = client.models.chat_completion(
model="Qwen/Qwen3-Max",
messages=[
{"role": "system", "content": "Translate to Japanese. Output only the translation."},
{"role": "user", "content": "Our new API reduces integration time from weeks to hours."}
],
)
print(response.choices[0].message.content)
Multi-language
source = "Your account has been upgraded. You now have access to all premium features."
for lang in ["Japanese", "Spanish", "German", "Korean"]:
response = client.models.chat_completion(
model="Qwen/Qwen3-Max",
messages=[
{"role": "system", "content": f"Translate to {lang}. Output only the translation."},
{"role": "user", "content": source}
],
)
print(f"{lang}: {response.choices[0].message.content}")
Batch — localization file
import json
strings = {"welcome": "Welcome back", "upgrade": "Upgrade your plan", "settings.save": "Save changes"}
def translate_batch(strings, target):
r = client.models.chat_completion(
model="deepseek-ai/DeepSeek-V3",
messages=[
{"role": "system", "content": "Translate UI strings. Keep JSON keys unchanged. Valid JSON only."},
{"role": "user", "content": f"Translate values to {target}:\n\n{json.dumps(strings, indent=2)}"}
],
response_format={"type": "json_object"},
)
return json.loads(r.choices[0].message.content)
for code, name in [("ja", "Japanese"), ("es", "Spanish"), ("de", "German")]:
with open(f"locales/{code}.json", "w") as f:
json.dump(translate_batch(strings, name), f, indent=2, ensure_ascii=False)
Context-aware translation
response = client.models.chat_completion(
model="Qwen/Qwen3-Max",
messages=[
{"role": "system", "content": "Cloud computing translator. Translate to German. Keep API, SDK in English. Formal Sie."},
{"role": "user", "content": "Deploy your model to a GPU instance in seconds."}
],
)
Tips
- Qwen3 for CJK. More natural Chinese, Japanese, Korean output.
- DeepSeek-V3 for volume. Cheaper per token, strong European languages.