Tutorials · 2 min read

Video captions

Adding captions

Captions allow hearing impaired users to read the words being said in your video. It also improves watch times, and can improve your SEO.

Doug Sillars

January 1, 2020

Captions allow hearing impaired users to read the words being said in your video. It also improves watch times, and can improve your SEO.

To add captions to your video, you'll need a VTT file for a video already uploaded to api.video.

Learn how to create a VTT Video Caption File

Video Upload Tutorial

Find all details to display your captions in our docs

Authenticate your session

You will need your API key to obtain the access_token. You can find your API key in your dashboard.

First, call the authentication endpoint and get your access token.

Example - Curl Request

javascript

Example - Json Response

javascript

Add the caption to your video

javascript

replace {videoId} with the videoId of the video to receive captions; {lang} with the language of the video (ex: en-US for US english); and {access_token} with your access token.

JSON response

json

Make captions default

The JSON response above shows that by default, captions are off. To add them, send a PATCH update command:

javascript

Conclusion

Captions make it easier to watch a video. Not just for hearing impaired users, but for autoplaying videos that begin muted. You users can just read what is happening without sound, and then, if they are interested can un-mute the video. You can also add internationalization by translating the captions to additional languages.

Let us know how you are using captions in our developer community. Happy building!

Try out more than 80 features for free

Access all the features for as long as you need.
No commitment or credit card required

Video API, simplified

Fully customizable API to manage everything video. From encoding to delivery, in minutes.

Built for Speed

The fastest video encoding platform. Serve your users globally with 140+ points of presence. 

Let end-users upload videos

Finally, an API that allows your end-users to upload videos and start live streams in a few clicks.

Affordable

Volume discounts and usage-based pricing to ensure you don’t exceed your budget.