Developer Docs/Voice Clone API

Voice Clone API

Build Voice Clone integrations with A2E. Review authentication, request parameters, task creation, status, and result endpoints.

Overview

Convert text to natural-sounding speech using a library of built-in voices, or clone a custom voice from a short audio sample for consistent narration.

Primary Endpoint

POST/api/v1/userVoice/training

Start voice training

Request Parameters

NameTypeRequiredDescription
namestringYesName of the voice model
voice_urlsarray<string>YesArray of audio file URLs for training
genderenum: female | maleNoVoice gender
denoisebooleanNoWhether to apply denoising
enhance_voice_similaritybooleanNoWhether to enhance voice similarity
modelenum: a2e | cartesia | minimax | elevenlabsNoVoice model to use
languagestringNoLanguage code from client (e.g. en-US, zh-CN). If omitted, server will infer from request headers.
webhook_urlstringNoHTTPS URL to receive task.completed / task.failed notifications. Best-effort delivery, single attempt, no retries; clients should treat the detail API as the source of truth.
webhook_tokenstringNoOptional plaintext token returned in the X-A2e-Webhook-Token header so receivers can verify the request originated from a2e.

Request Example

curl -X POST "https://www.a2e.com.cn/api/v1/userVoice/training" \
  -H "Authorization: Bearer YOUR_API_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
  "name": "My Custom Voice",
  "voice_urls": [
    "https://example.com/audio1.wav",
    "https://example.com/audio2.wav"
  ],
  "gender": "female",
  "denoise": true,
  "enhance_voice_similarity": true,
  "model": "a2e",
  "language": "en-US",
  "webhook_url": "https://your-server.example.com/a2e/webhook",
  "webhook_token": "a-shared-secret"
}'

Related Endpoints

POST/api/v1/anchor/tts_list

List system voices (TTS presets)

POST/api/v1/anchor/language_list

List supported languages/regions for voices

POST/api/v1/anchor/voice_list

List available voices by country/region

GET/api/v1/anchor/voice_list

List available voices (GET)

POST/api/v1/video/send_tts

Generate text-to-speech audio

GET/api/v1/tts/preview/list

Get TTS preview list

DELETE/api/v1/tts/preview/{id}

Delete TTS preview record

POST/api/v1/userVoice/training

Start voice training

GET/api/v1/userVoice/trainingRecord

Get voice training records

GET/api/v1/userVoice/completedRecord

Get completed voice training records

DELETE/api/v1/userVoice/{_id}

Delete voice training record

GET/api/v1/userVoice/{_id}

Get voice training record detail

PUT/api/v1/userVoice/{_id}

Update voice training record name

Responses

200

Voice training record created successfully

400

Bad Request - Invalid training data

401

Unauthorized - Invalid or missing bearer token

403

Forbidden - Voice clone limit exceeded