Before you get started make sure to create an API key in your CaptionKit dashboard and read up on the API authentication.
Signal types
captions:stream:start
- Start streaming captionscaptions:stream:stop
- Stop streaming captionscaptions:stream:clear
- Clear caption textcaptions:pending:on
- Turn on "Starting soon" messagecaptions:pending:off
- Turn off "Starting soon" messagecaptions:visibility:hide
- Temporarily hide captionscaptions:visibility:show
- Show captionslanguage:select
- Set transcription languageThis signal requires an additional
value={language}
parameter. Read further down for details.
Get ready to receive signals
To receive signals in your CaptionKit dashboard, toggle on the ๐ก Signals button in the caption controls area.
Sending a signal
Signals can be sent using either a POST
or GET
request to the following URL:
https://api.captionkit.io/v2/signal
For the below examples, the API_KEY
will be included in a query param, but this can also be included in the request headers.
GET /me/signal
Using curl
curl https://api.captionkit.io/v2/signal?key={API_KEY}&event=captions:stream:start
Using fetch in JS or Node
fetch( 'https://api.captionkit.io/v2/signal?key={API_KEY}&event=captions:stream:start');
POST /me/signal
Using curl
curl -X POST https://api.captionkit.io/v2/signal?key={API_KEY} -H 'Content-Type: application/json' -d '{"event":"captions:stream:start"}'
Using fetch in JS or Node
fetch('https://api.captionkit.io/v2/signal?key={API_KEY}', { method: 'POST', headers: { 'Content-Type': 'application/json', }, body: JSON.stringify({ event: 'captions:stream:start', }),});
Language selection
When using the language:select
signal, you must include a value
parameter in the request, with a validlanguage code. For example, to set the language to English, you would use the language code en
.
The available language codes are:
en
English,en-US
English (United States),en-AU
English (Australia),en-GB
English (Great Britain),en-NZ
English (New Zealand),fr
French,fr-CA
French (Canada),de
German,de-CH
German (Switzerland),it
Italian,ja
Japanese,ko
Korean,es
Spanish,es-419
Spanish (Latin America),