POST
/
api
/
v2
/
voice-clones
curl --request POST \
  --url https://api.buena.ai/api/v2/voice-clones \
  --header 'Authorization: <authorization>' \
  --header 'Content-Type: <content-type>' \
  --header 'x-api-key: <api-key>' \
  --data '{
  "name": "<string>",
  "description": "<string>",
  "files": [
    null
  ],
  "settings": {
    "stability": 123,
    "clarity": 123,
    "use_speaker_boost": true
  }
}'
{
  "success": true,
  "data": {
    "voiceId": "pNInz6obpgDQGcFmaJgB",
    "name": "Professional Voice",
    "description": "Professional outreach voice for LinkedIn",
    "sampleCount": 3,
    "createdAt": "2024-01-20T15:30:00.000Z"
  },
  "message": "Voice clone created successfully"
}

Create a new AI voice clone from audio samples. Upload high-quality audio files to train a custom voice model that can be used for LinkedIn voice messages and other voice synthesis applications.

Requires the voice:create permission. Maximum 5 voice clones per user.

Request

Authorization
string
required

Bearer token with your API key that has voice:create permission (e.g., “Bearer bna-your-api-key”)

Content-Type
string
required

Must be multipart/form-data for file uploads

Body Parameters

name
string
required

Descriptive name for the voice clone (e.g., “Professional Voice”, “Sales Persona”)

description
string

Optional description of the voice clone and its intended use

files
file[]
required

Audio files for voice training. Upload 1-10 high-quality audio files (WAV, MP3, M4A, FLAC). Each file must be under 50MB.

settings
object

Voice generation settings

Examples

Basic Voice Clone Creation

curl -X POST "https://api.buena.ai/api/v2/voice-clones" \
  -H "Authorization: Bearer bna-your-api-key" \
  -F "name=Professional Voice" \
  -F "description=Professional outreach voice for LinkedIn" \
  -F "files=@sample1.wav" \
  -F "files=@sample2.wav" \
  -F "files=@sample3.wav"

Advanced Voice Clone with Custom Settings

curl -X POST "https://api.buena.ai/api/v2/voice-clones" \
  -H "Authorization: Bearer bna-your-api-key" \
  -F "name=Sales Voice" \
  -F "description=Energetic sales voice for cold outreach" \
  -F "files=@recording1.wav" \
  -F "files=@recording2.wav"

Response

success
boolean

Always true for successful requests

data
object

The created voice clone information

{
  "success": true,
  "data": {
    "voiceId": "pNInz6obpgDQGcFmaJgB",
    "name": "Professional Voice",
    "description": "Professional outreach voice for LinkedIn",
    "sampleCount": 3,
    "createdAt": "2024-01-20T15:30:00.000Z"
  },
  "message": "Voice clone created successfully"
}

Voice Training Requirements

Audio Quality Guidelines

Voice Clone Limits

Limit TypeValueNotes
Max voice clones per user5Contact support for higher limits
Max files per upload10Multiple uploads allowed
Max file size50MBPer individual file
Training time2-5 minutesDepends on audio length and quality
Supported languages29+Supported languages by Buena AI

Error Responses

Invalid File Format (400)

{
  "error": true,
  "code": "INVALID_FILE_FORMAT",
  "message": "Unsupported audio format. Please use WAV, MP3, M4A, or FLAC files.",
  "version": "2.0",
  "timestamp": "2024-01-20T15:30:00Z",
  "details": {
    "supported_formats": ["wav", "mp3", "m4a", "flac"],
    "rejected_files": ["recording.txt"]
  }
}

Voice Clone Limit Exceeded (429)

{
  "error": true,
  "code": "VOICE_CLONE_LIMIT_EXCEEDED",
  "message": "Maximum voice clones reached (5). Delete existing clones or upgrade your plan.",
  "version": "2.0",
  "timestamp": "2024-01-20T15:30:00Z",
  "details": {
    "current_count": 5,
    "max_allowed": 5,
    "upgrade_url": "https://app.buena.ai/billing"
  }
}

File Size Too Large (413)

{
  "error": true,
  "code": "FILE_TOO_LARGE",
  "message": "File size exceeds maximum limit of 50MB",
  "version": "2.0",
  "timestamp": "2024-01-20T15:30:00Z",
  "details": {
    "max_size_mb": 50,
    "rejected_files": [
      {
        "filename": "large_recording.wav",
        "size_mb": 75
      }
    ]
  }
}

Training Status Updates

Voice clone training is asynchronous. Monitor progress using:

// Poll for status updates
async function checkTrainingStatus(voiceId) {
  const response = await fetch(`https://api.buena.ai/api/v2/voice-clones`, {
    headers: { Authorization: "Bearer bna-your-api-key" },
  });

  const { data } = await response.json();

  switch (data.status) {
    case "processing":
      console.log(`Training progress: ${data.training_progress}%`);
      break;
    case "ready":
      console.log("Voice clone ready for use!");
      break;
    case "failed":
      console.log("Training failed:", data.error_message);
      break;
  }

  return data;
}

Next Steps