PUBLIC API · /api/v1

API Reference

Build TTS, speech-to-text, and voice clone into your app. Base URL: https://hvoice.app

Authentication

Send a Bearer token on every request:

Authorization: Bearer hv_live_…

You can also use the JWT from Google sign-in (Studio session). API keys start with hv_live_.

Create an API key

curl -X POST https://hvoice.app/api/v1/account/api-keys \
  -H "Authorization: Bearer <studio_jwt>" \
  -H "Content-Type: application/json" \
  -d '{"name":"Default"}'

Response includes key (store it immediately) and key_prefix.

Endpoints

MethodPathDescription
GET/api/v1/voicesVoice library (library + your clones)
POST/api/v1/tts/synthesizeCreate a TTS job
GET/api/v1/tts/jobsList recent jobs (?limit=, max 50)
GET/api/v1/tts/jobs/:jobIdJob status and audio URLs
DELETE/api/v1/tts/jobs/:jobIdDelete a job
GET/api/v1/tts/jobs/:jobId/parts.zipDownload part WAVs as zip
GET/api/v1/tts/jobs/:jobId/transcript.srtDownload SRT transcript
POST/api/v1/tts/jobs/:jobId/parts/:index/retryRetry one part; optional {"text"}
POST/api/v1/sttSpeech-to-text (multipart audio)
POST/api/v1/voices/cloneClone a voice (multipart audio + name)
POST/api/v1/voices/transcribe-refTranscribe a reference clip
GET/api/v1/account/usageToken balance and ledger
GET/api/v1/account/api-keysList key prefixes (JWT)
POST/api/v1/account/api-keysCreate key (JWT)
DELETE/api/v1/account/api-keys/:idRevoke key (JWT)

Synthesize

JSON body fields:

FieldNotes
textRequired. Source text (or use source_srt).
voice_idFrom GET /voices.
formate.g. mp3, wav.
speedPlayback speed.
languagee.g. vi, en.
titleOptional job title.
pitch / pitch_semitonesPitch shift in semitones.
volume / volume_pctVolume percent.
instructStyle instruction string.
gender, age, style, accentMerged into instruct if empty.
pause_settingsPause configuration object.
source_srtOptional SRT for timed dubbing.
curl -X POST https://hvoice.app/api/v1/tts/synthesize \
  -H "Authorization: Bearer hv_live_…" \
  -H "Content-Type: application/json" \
  -d '{"text":"Xin chào","voice_id":"YOUR_VOICE_ID","format":"mp3","language":"vi"}'

Poll GET /api/v1/tts/jobs/:jobId until status is completed or failed. Character credits are deducted from your plan balance.

Speech to text

curl -X POST https://hvoice.app/api/v1/stt \
  -H "Authorization: Bearer hv_live_…" \
  -F "audio=@sample.mp3" \
  -F "lang=vi"

Accepts audio/video up to 40 MB. STT does not consume character credits. Optional field: lang or language.

Voice clone

curl -X POST https://hvoice.app/api/v1/voices/clone \
  -H "Authorization: Bearer hv_live_…" \
  -F "audio=@ref.wav" \
  -F "name=My voice" \
  -F "ref_text=optional transcript" \
  -F "language=vi"

If ref_text is omitted, Whisper transcribes the clip when ASR is configured. Returns voice_id for synthesize.

Usage

curl https://hvoice.app/api/v1/account/usage \
  -H "Authorization: Bearer hv_live_…"

Admin endpoints are not part of this public reference. Questions: Zalo support.