Quickstart
This walks you from account creation to a first synthesized clip via curl.
1. Create an API key
- Sign up and verify your email.
- Open Dashboard → Settings → API Keys (lands in M2).
- Copy the
hk_live_...value. Treat it like a password.
2. Pick a voice
Every workspace starts with 50+ preset voices seeded by @hakim/db covering
Arabic dialects, English variants, and a dozen other languages. You can also
clone a custom voice from the dashboard or via POST /v1/audio/voices.
curl https://api.tryhakim.ai/v1/audio/voices \
-H "Authorization: Bearer $HAKIM_API_KEY"
Each row carries an id (stable, unique, what you should pass on /v1/audio/speech)
and a human-friendly slug (e.g. priya-hi, also accepted but may collide
between presets and clones, so prefer the id for production traffic).
3. Synthesize
curl -X POST https://api.tryhakim.ai/v1/audio/speech \
-H "Authorization: Bearer $HAKIM_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "hakim-fast-v1",
"voice": "cmokbc2b1001pvu39wmj61b7h",
"input": "مرحبا، أنا حكيم."
}' \
--output hello.mp3
Substitute the voice value with an id from step 2. Slugs work too
("voice": "priya-hi") but are best for prototyping, production callers
should pin the id so a future rename of the voice catalogue doesn't move
their traffic.
You'll receive an audio/mpeg stream. The endpoint also supports WebSocket
streaming for low-latency UIs, see SDK.
Need transcription instead? POST /v1/audio/transcriptions takes a
multipart upload and returns text, and WSS /v1/audio/transcriptions/stream
delivers OpenAI-Realtime-compatible partial transcripts as audio
arrives. Both routes are covered in detail in the
streaming guide.
4. Production checklist
- Rotate keys every 90 days.
- Wire a webhook for
synthesis.completedif you're batching. - Stay inside the rate limits advertised on your plan page.