What a caption file looks like
Captions are a text file with timings. The usual format is WebVTT, which any subtitle tool can export. It starts with WEBVTT and lists each caption with a start and end time.
WEBVTT
00:00:01.000 --> 00:00:03.500
Welcome to the launch.
00:00:04.000 --> 00:00:07.000
Today we are shipping three things.Fileboy does not write captions for you. You supply the file, from your own transcript or a captioning tool, and Fileboy stores it with the video and hands it to the player.
Upload a caption file
Each video can have one caption file per language. You choose the language string, such as English, and it is what the player shows in its menu. Use the same string every time you add that language to a video.
id = fileboy.upload_video_transcript(video.id, "./clips/launch.vtt", language: "English")
text = fileboy.fetch_video_transcript(video.id, id)transcript_id = client.upload_video_transcript(video.id, "./clips/launch.vtt", language="English")
text = client.fetch_video_transcript(video.id, transcript_id)$id = $fileboy->uploadVideoTranscript($video->id, './clips/launch.vtt', language: 'English');
$text = $fileboy->fetchVideoTranscript($video->id, $id);curl https://api.fileboy.io/videos/VIDEO_ID/transcripts/upload \
-H "Authorization: public YOUR_PUBLIC_KEY" \
-F "file=@./launch.vtt;type=text/vtt" \
-F 'data={"language":"English"}'Uploading needs a video of your own. The shared demo key cannot upload video or captions. Create a free app and upload a video from its dashboard first.
How the player uses them
When a video has captions, the player shows a captions menu automatically and remembers each viewer's choice. To switch a language on by default, set default-caption to its language string. It has to match what you uploaded exactly, so English and en are different. Set it to off to keep captions off until the viewer turns them on, and add no-caption-control to hide the menu.
<fileboy-player video-id="YOUR_VIDEO_ID" default-caption="English"></fileboy-player>The iframe embed uses the same player, so captions you upload show up there too.
Read a caption file back
A video's data lists its transcripts with their ids and languages. Fetch the text of one by id.
# the transcripts array lists each id and language
curl https://api.fileboy.io/videos/YOUR_VIDEO_ID/data
# the caption text itself
curl https://api.fileboy.io/videos/YOUR_VIDEO_ID/transcripts/YOUR_TRANSCRIPT_IDWhere this stops
Captions are files you provide. There is no automatic speech recognition, no translation and no caption editor. If you need those, generate the caption files elsewhere and upload them, or look at a platform built around video such as Mux.
Checked against the current libraries in November 2026. Found something that no longer works? Tell us.