ai_translate_batch
Batch translator for app strings (placeholder-safe) — Translate up to 25 short strings (UI text, product copy, notifications) into one target language in a single call. texts = JSON array of strings or strings separated by ||; to = target language code or name. Optional from=, tone= (formal, casual...) and context= (what the strings are for). Every translation is checked offline: placeholders ({name}, {{count}}, %s, %1$s, %.2f), HTML tag names, URLs and digit runs must survive; identical-to-source output and odd length ratios are flagged. Returns per-string status, issues, a source-to-translation map and a verdict OK / MOSTLY_OK / REVIEW. Workers AI (Llama 3.3 70B). Price: $0.012 USDC (Base, via x402).
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"texts": "<texts>",
"to": "<to>"
},
"name": "ai_translate_batch"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | e.g. es | |
| texts | Yes | e.g. Hello {name}, you have %d new messages||Save changes||Your order ships in 3 days |