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 /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 /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
Englishen-US
English (US)en-AU
English (AU)en-GB
English (GB)en-NZ
English (NZ)bg
Bulgariancs
Czechda
Danishnl
Dutchfr
Frenchfr-CA
French (Canada)de
Germande-CH
German (Switzerland)el
Greekhi
Hindihu
Hungarianid
Indonesianit
Italianja
Japaneseko
Koreanlt
Lithuanianms
Malayno
Norwegianpl
Polishpt
Portuguesept-BR
Portuguese (Brazil)ro
Romanianru
Russianes
Spanishes-419
Spanish (Latin America)sv
Swedishth
Thaitr
Turkishuk
Ukrainianvi
Vietnamesezh
Chinese (Mandarin, Simplified)zh-TW
Chinese (Mandarin, Traditional)zh-HK
Chinese (Cantonese, Traditional)
CaptionKit also supports a special multi
language code, which is for bilingual English and Spanish speech.
Output only language codes
These languages are only available in the CaptionKit dashboard "translations" selection, but are listed here for reference:
ar
Arabicfa
Farsi/Persianht
Haitian Creolerw
Kinyarwandasw
Swahili
Requesting new languages
If you don't see your language above, reach out to our support team! We are in the process of adding more languages and will prioritize requested languages first.