Upload captions

Add a caption or subtitle track to a video from WebVTT or SRT text.

POST https://cotlet.dev/api/v1/vimeo/videos/{video_id}/captions

write Confirm

Uploads the file as a text track with the language and type you set, then switches it on. WebVTT must start with WEBVTT and SRT with the first cue number; both must be UTF-8. A file in another format is refused with the reason. Viewers see the track at once. By default you confirm each call; you can switch that off for this tool.

Parameters

Parameters: upload_captions
NameTypeDescription
video_id string required string Video ID from search_videos, the number in vimeo.com/{id}.
language string required string Language code, for example 'en' or 'es'.
type enum required enum caption or subtitle.
content string required string The full WebVTT or SRT text.

Request

cURL
curl -X POST https://cotlet.dev/api/v1/vimeo/videos/912345601/captions \
  -H "Authorization: Bearer $COTLET_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"language":"en","type":"caption","content":"WEBVTT\n\n00:00:00.000 --> 00:00:03.500\nWelcome to the onboarding series.\n"}'
Python
result = client.call("vimeo", "upload_captions", {"video_id":"912345601","language":"en","type":"caption","content":"WEBVTT\n\n00:00:00.000 --> 00:00:03.500\nWelcome to the onboarding series.\n"})
Node.js
const result = await cotlet.call('vimeo', 'upload_captions', {"video_id":"912345601","language":"en","type":"caption","content":"WEBVTT\n\n00:00:00.000 --> 00:00:03.500\nWelcome to the onboarding series.\n"});
CLI
cotlet call vimeo upload_captions --data '{"video_id":"912345601","language":"en","type":"caption","content":"WEBVTT\n\n00:00:00.000 --> 00:00:03.500\nWelcome to the onboarding series.\n"}'

Example response

JSON

{
  "video_id": "912345601",
  "language": "en",
  "type": "caption",
  "format": "webvtt",
  "active": true
}

Sign in once. Your agent does the rest.

Sign up and add the apps you need. Free 7-day trial with 2,000 credits, no card needed.