Quickstart
One API key, one recording, and something for a kitten to say. By the end of this page, you will have made both an STT and a TTS request.
Prerequisites
- A KittenML API key
- cURL
- An audio file for the transcription example
1. Set your API key
export KITTENML_API_KEY="sk_kitten_live_..."
Keep the complete key in a server-side secret. Do not put it in source code, browser JavaScript, mobile binaries, logs, or URLs.
2. Transcribe an audio file
First, let EmoKitten listen.
Replace speech.wav with a path on your machine:
curl --fail-with-body -sS \
https://api.kittenml.com/v1/audio/transcriptions \
-H "Authorization: Bearer $KITTENML_API_KEY" \
-F "file=@speech.wav" \
-F "model=emokittenasr-realtime" \
-F "response_format=verbose_json"
The @ tells cURL to read the file from disk. Relative paths are resolved from
your current directory; absolute paths work as well.
The response includes a clean transcript, an enriched transcript, language, duration, and speech segments. See Upload transcription for every input field and response format.
3. Generate speech
Now make a kitten talk.
curl --fail-with-body -sS \
https://api.kittenml.com/v1/audio/speech \
-H "Authorization: Bearer $KITTENML_API_KEY" \
-H "Content-Type: application/json" \
--data '{
"model": "kitten-tts-mini-0.8",
"input": "Hello! This audio was generated by KittenTTS.",
"voice": "Bella",
"response_format": "mp3",
"stream_format": "audio",
"speed": 1.0
}' \
--output kitten-output.mp3
The success body is chunked binary audio. cURL writes each chunk to the file as
it arrives; do not pipe binary output to jq or print it in a terminal.
What happened?
- The bearer token identified your KittenML organization.
- Upload STT processed one complete audio file.
- KittenTTS streamed one MP3 at a price of
$0. - Each response included an
x-request-idheader for tracing and support.
If both commands worked, you are in. Swap in your own audio, try another voice, and make some noise.