Upload captions
upload_captionsAdd subtitle tracks to YouTube videos from .srt or .vtt files using a preview-and-approval flow to prevent accidental caption changes.
Instructions
Add a subtitle track to a video from a SubRip (.srt) or WebVTT (.vtt) file. Two-step: returns a preview and confirmation_token; call again with the token after the user approves. Refuses if a track with the same language and name already exists.
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": {
"video_id": "<video_id>",
"file_path": "<file_path>"
},
"name": "upload_captions"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| name | No | Track name shown to viewers (max 150 chars). Empty = default track. | |
| is_draft | No | Upload as a draft (not shown to viewers). | |
| language | No | BCP-47 language code of the captions, e.g. 'en', 'en-US', 'hi'. | en |
| video_id | Yes | YouTube video ID (11 characters) or any youtube.com / youtu.be URL. | |
| file_path | Yes | Absolute path to the .srt or .vtt file (UTF-8). | |
| verify_content | No | After uploading, download the track and compare its text with the file (extra 200 quota units). | |
| confirmation_token | No | Token from the preview. Only pass it after the user has explicitly approved the preview. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||