translate_subtitles
Translates an SRT subtitle file into a target language with OpenAI and returns the path to the translated .srt file, so you can localize videos without manual subtitle rewriting.
Instructions
Translate an SRT file to another language using OpenAI. Returns the path of the translated .srt file.
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": {
"srt": "<srt>",
"target_lang": "<target_lang>",
"api_key": "<api_key>"
},
"name": "translate_subtitles"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| srt | Yes | Path to the source .srt file | |
| api_key | Yes | OpenAI API key | |
| output_dir | No | Output directory | |
| target_lang | Yes | Target language (e.g. 'Chinese', 'Spanish') |