Pass one or more terms with the
keyterm query parameter when you open the WebSocket connection:
keyterm parameter, one per term:
keyterm value and encode spaces as %20:
Keyterms apply for the entire connection and are set only when you open it. You cannot add or change keyterms mid-stream.
Keyterm prompting works on both the Realtime STT and Realtime STT (Auto) endpoints.
SDK usage
The Cartesia Python and TypeScript/JavaScript SDKs both accept akeyterm argument on the STT websocket clients. Pass a list of strings — one entry per term or phrase. The SDK forwards each value as a repeated keyterm query parameter, so you do not need to build the URL yourself.
- Python
- TypeScript
keyterm argument is available on client.stt.manual_finalize.websocket(...) and on the async equivalents (AsyncCartesia).Best practices
Consider the following to achieve the best results:- Use keyterms for important or uncommon words and phrases, such as domain-specific terminology, brand or product names, and rare or invented words
- Avoid generic, common words like “the” or “and”
- Avoid using too many keyterms and prioritize the ones that matter most
- Use exact spelling and capitalization for each keyterm