Suggestions

close search

Add Messaging, Voice, and Authentication to your apps with Vonage Communications APIs

Visit the Vonage API Developer Portal

Live Captions — REST

Use the OpenTok Live Captions API to enable real-time audio captioning for your OpenTok Sessions.

The REST APIs allow you to start, stop audio captioning for an OpenTok Session.

Starting live captions

Use the OpenTok REST API to start live captions for a session.

curl -X POST  \
-H 'X-OPENTOK-AUTH: ' \
-H 'Content-Type: application/json' \
-d '{
  "sessionId": "<valid-session-id>",
  "token": "<valid-token>",
}'
 https://api.opentok.com/v2/project/<apiKey>/captions

For more information, see the OpenTok REST API documentation.

Stopping live captions

Use the OpenTok REST API to stop live captions for a session.

curl
  -X POST
  -H "Content-Type: application/json"
  -H "X-OPENTOK-AUTH:<valid-jwt-token>"
  https://api.opentok.com/v2/project/<apiKey>/captions/<captionsId>/stop;

For more information, see the OpenTok REST API documentation.