Skip to main content
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 usable voiceId.
Use an 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

When modelId is omitted, the request uses the default model path.
The response body is the audio (normally 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.
myvocal_v3 is publicly documented. If your request returns code = -1, verify voiceId, language, account plan, and current backend availability before retrying.

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 returned id as the voiceId for the next step.
The list includes your own compatible voices plus the prebuilt voices available to your API key. It is a selection aid: a voice appearing in it is not a guarantee that a later generation will succeed.

Create TTS with the Accent model

Send the same request shape as the default path, with modelId set to myvocal_v3_accent_enhance. Use --output to save the returned audio to a file:
  • language: omit it, or send auto, to let the model detect the language. The Accent model accepts its own list of 40 language codes plus auto; see TTS Models & Migration. A plain V3 code the Accent model does not support (for example hmn) is rejected with code = 10004.
  • voiceSettings.stability: a value inside the legal range (0.1 to 1) is accepted for compatibility but has no effect on this model. An out-of-range value is rejected with code = 10006.
  • Streaming: POST /sound_clone/api/v1/tts/stream takes the same body.
Read 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

  1. Query TTS list to get generated record IDs.
  2. 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: 10 to 1000, default 10. A value outside that range is rejected with code = 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 with code = 10019.
The response contains list, hasMore and earliestHistoryItemId.
See TTS History for the full reference.

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 a voiceId. 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.