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.
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>",
"statusCallbackUrl": "<valid-url>"
}'
https://api.opentok.com/v2/project/<apiKey>/captions
For more information, see the OpenTok REST API documentation.
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.