This quickstart uses production API host
https://api.myvocal.ai and the accessKey request header.
Steps 1–3 are the shortest path to one synthesized audio file. The optional sections after them are
independent of each other; use only the ones you need.Step 1: Get your API key
Use a MyVocal account with API access: sign in to MyVocal Account, open Account Info and copy your API key. See Authentication.Step 2: Get your user info and voices
Use these calls first to confirm your key is valid and to get a usablevoiceId.
id from the voice list as voiceId in the next step. To use your own voice instead, create one first; see How to use voices.
Step 3: Create TTS with the default model path
WhenmodelId is omitted, the request uses the default model path.
Content-Type: audio/mpeg); add --output output-default.mp3 to
save it to a file. HTTP 200 alone does not mean success: if Content-Type is JSON, read code and
message. See Create speech for all fields and errors.
That is the whole shortest path. Everything below is optional.
Optional branches
Optional: request myvocal_v3 explicitly
Set modelId to myvocal_v3 to explicitly request V3.
Optional: use the Accent model
Discover Accent-compatible voices
An Accent request must use a voice that is compatible with the Accent model. Ask for that list explicitly and pick a returnedid as the voiceId for the next step.
Create TTS with the Accent model
Send the same request shape as the default path, withmodelId set to myvocal_v3_accent_enhance. Use
--output to save the returned audio to a file:
language: omit it, or sendauto, to let the model detect the language. The Accent model accepts its own list of 40 language codes plusauto; see TTS Models & Migration. A plain V3 code the Accent model does not support (for examplehmn) is rejected withcode = 10004.voiceSettings.stability: a value inside the legal range (0.1to1) is accepted for compatibility but has no effect on this model. An out-of-range value is rejected withcode = 10006.- Streaming:
POST /sound_clone/api/v1/tts/streamtakes the same body.
Content-Type before trusting the body. On success the body is audio (Content-Type: audio/mpeg). When
the request is rejected, or generation fails before any audio is sent, the service answers with HTTP 200 and
a JSON envelope whose code is not a success code. HTTP 200 alone does not mean the request succeeded.
If the connection is interrupted after audio has already started, the transfer simply ends rather than
appending JSON, so treat a short file as a failed request.
Optional: query TTS History and output URLs
- Query TTS list to get generated record IDs.
- Query URL endpoint with those IDs to get playable output URLs.
GET /sound_clone/api/v1/tts/list is a GET endpoint with two optional query parameters:
limit:10to1000, default10. A value outside that range is rejected withcode = 10027.startBeforeTTSId: cursor for older history. The row with that id is included in the page (id <= startBeforeTTSId), so pass the id of the oldest row you already have to continue further back. An id you cannot see is rejected withcode = 10019.
list, hasMore and earliestHistoryItemId.
See full model details
Open TTS Models & Migration for the current public model list and migration guidance.
Other products
These are separate products with their own quickstarts; they are not steps of this TTS quickstart. Speech to Text, Text to Music and Interpretation do not need avoiceId. AI Cover does:
Generate a cover requires the voiceId of a compatible Cover voice (your
custom voice’s id or a premade voice’s id). See How to use voices to find or
create one.
Speech to Text — Real-time
Stream live audio and receive partial and final transcripts.
Speech to Text — Batch
Transcribe a recording (Batch quickstart).
Text to Music
Brief → arrangement → quote → generate → MP3.
Interpretation
Translate and dub uploaded audio/video: upload → probe → quote → generate → export.
AI Cover
Turn a song into a cover sung by a Cover voice.
