Docs / Music Series / Suno / Vocals & Voices
Docs / Music Series / Suno / Vocals & Voices
Voice Persona step 1: upload a vocal sample and get the verification phrase.
Submit a vocal sample as the first step of creating a vocal voice (persona). This endpoint is asynchronous: it returns a public task_id as soon as the request is accepted, and you then poll the task status with GET /v1/tasks/:id.
When the task succeeds, the result contains a phrase_text verification phrase. Have a real person read and record this phrase, then use the task_id returned here as the session_id for /v1/music/voice/create to complete voice creation.
The full flow is: voice/sample submits the vocal sample and returns a task_id → poll to get the phrase_text → a real person reads and records it → voice/create submits the recording and the session_id.
Use a JSON request body with the Content-Type: application/json header. Convert the audio content to a Base64 string first and put it in the audio field.
| Field | Type | Required | Description |
|---|---|---|---|
audio | string | Yes | Base64 audio content of the vocal sample |
filename | string | No | Original audio file name, e.g. vocal.mp3 |
vocal_start_s | number | No | Start of the sampled vocals, in seconds |
vocal_end_s | number | No | End of the sampled vocals, in seconds |
language | string | No | Language of the verification phrase, e.g. zh, en, ja |
notify_hook | string | No | Callback URL invoked when the task reaches a terminal state |
curl --request POST \
--url https://api.apimax.ai/v1/music/voice/sample \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
"audio": "SUQzBAAAAA...",
"filename": "vocal.mp3",
"vocal_start_s": 0,
"vocal_end_s": 12,
"language": "zh",
"notify_hook": "https://example.com/hooks/voice-sample"
}'{
"audio": "SUQzBAAAAA...",
"filename": "vocal.mp3",
"vocal_start_s": 0,
"vocal_end_s": 12,
"language": "zh",
"notify_hook": "https://example.com/hooks/voice-sample"
}Replace the audio field with the Base64 string of your actual audio file. You can omit notify_hook if you don't need a callback.
{
"code": "success",
"message": "",
"data": "task_YYx5OVJQmLCxGubf2G1LWAg7bOchCfie"
}| Field | Type | Description |
|---|---|---|
code | string | Response code; fixed to success on success |
message | string | Status message; usually empty on success |
data | string | Public task ID; also used as the session_id for the subsequent voice/create request |
Errors use the structure below, where error.message is the reason returned by the upstream:
{
"error": {
"code": "upstream_error",
"message": "invalid base64 audio",
"type": "max_api_error",
"upstream": {
"code": "task_request_invalid"
}
}
}| HTTP | error.code | error.message | Scenario |
|---|---|---|---|
| 400 | upstream_error | one of audio or audio_url required | No audio was provided |
| 400 | upstream_error | invalid base64 audio | audio is not valid Base64 |
After a successful submission, poll with the returned task_id:
GET /v1/tasks/:idWhen the task status is completed, the actual result is in the data array. data contains the verification phrase, for example:
{
"created_at": 1795404855,
"data": [
{
"phrase_id": "8b76b3a7-f806-4eef-ba93-49902fcecf81",
"phrase_text": "让音乐在夜里自由唱出温柔旋律",
"vocal_end_s": 0,
"vocal_start_s": 0,
"voice_recording_id": "d93dc623-ec68-4382-9a07-0ed43d0d50e7",
"vox_audio_id": "6a1dd259-6962-4312-a321-e6af761bcf81"
}
],
"finished_at": 1795404869,
"id": "task_YYx5OVJQmLCxGubf2G1LWAg7bOchCfie",
"model": "suno_voice_sample",
"object": "task",
"platform": "suno",
"progress": 100,
"started_at": 1795404855,
"status": "completed",
"type": "suno"
}Have a real person read the phrase_text aloud and record it, then use this task ID as the session_id in /v1/music/voice/create.