ai_subtitle_translate
Subtitle translator (SRT/WebVTT) — Translate an SRT or WebVTT subtitle file into any language while keeping every timing line and cue number exactly as is. Pass text= (file content; POST JSON {text,to} for long files) or url= (an .srt or .vtt file, e.g. a Whisper transcript) and to= (language name or code). Cues are translated in batches by Workers AI with count checks (a batch that comes back misaligned is retried, then left in the original language and listed), / tags and multi-line cues are kept. Returns the rebuilt subtitle file, counts, untranslated cue ids and reading-speed warnings (cues over 20 chars/sec after translation). Up to 400 cues per call. JSON. Price: $0.02 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": {
"text": "<text>",
"to": "<to>"
},
"name": "ai_subtitle_translate"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | Yes | e.g. Spanish | |
| text | Yes | e.g. 1 00:00:01,000 --> 00:00:03,000 Hello there. How are you? 2 00:00:04,000 --> 00:00:05,500 I am fine, thanks. |