A2E
  1. TTS and Voice Clone
A2E
  • AI Avatar API
  • Get Tokens
    • Obtain Login Token
      POST
    • Get API token
      POST
    • Delete API token
      POST
    • List api tokens
      GET
    • Getting API Tokens (2025 version)
      GET
  • TTS and Voice Clone
    • List Public TTS Options
      POST
    • List Voice Clone Options
      GET
    • Train TTS Model of The User's Voice (Voice Clone)
      POST
    • List Ongoing Voice Clone Tasks
      GET
    • Generate TTS Audio (Text-to-Speech)
      POST
    • Get Details of a Voice
      GET
    • Delete a User Voice
      DELETE
  • Generate Avatar Videos
    • Generate AI Avatar Videos
      POST
    • List of Result Videos
      POST
    • List One or All Avatars
      POST
    • Obtain the Status of One Avatar Video Task
      POST
    • Obtain the List of Personalized Lip-Sync Models
      GET
    • Delete or Cancel a Video
      DELETE
    • Auto Language Detect
      POST
    • Auto Swith to Public Computing Pool
      POST
  • Create Avatars and Train Lip-sync Models
    • Create A Custom Avatar by a Video or an Image
      POST
    • Train a Personalized Lip-sync Model (Optional) a.k.a. Continue Training 💠
      POST
    • Remove A Customized Avatar
      POST
    • Get Status of All Tasks
      GET
    • Get All Ongoing "Training" Tasks
      GET
    • Status of One Task
      GET
    • Clone Voice from a Video
      POST
  • Background Matting and Replacement
    • Obtain the List of Background Images
    • Add Custom Background Image
    • Delete Custom Image
  • Face Swap
    • Manage Face Swap Resource
      • Add Face Swap Image
      • Get Records of Face Swap Images
      • Delete User Face Swap Image
    • Quickly Preview Face Swap
      • Add User Face Swap Preview
      • Get Status of Face Swap Preview Process
    • Face Swap Tasks
      • Add User Face Swap Task
      • Get Status of Face Swap Task
      • Get Face Swap Task Records
      • Get Details of Face Swap
      • Delete Record
  • AI Dubbing
    • Start dubbing
    • List Dubbing Tasks
    • List All Processing Dubbing Tasks
    • Get Details
    • Delete Record
  • Image to Video
    • Start Image-to-Video
    • Check Status of One Task
    • List Status of All Tasks
    • Delete Record
  • Caption Removal
    • Start Caption Removal
    • Get Records of All Tasks
    • Get Status of All Tasks in Processing
    • Get Details of One Task
    • Delete a Task
  • Streaming Avatar
    • Get All avatars
    • Get a Streaming Avatar Token
    • Set QA Context
    • Get QA Context
    • Ask a Question to the Avatar
    • Let the Avatar Speak Directly
    • Leave the Room
  • Miscellaneous
    • Add a User
    • Get User Remaining Credits
    • Exchange Diamonds
    • List Available Languages
    • Save URL to A2E's storage
  1. TTS and Voice Clone

Generate TTS Audio (Text-to-Speech)

Global Server
https://video.a2e.ai
Global Server
https://video.a2e.ai
POST
/api/v1/video/send_tts

If you want to use our TTS engine to generate an audio file and use it later for the "create" method for video synthesis, use this API.
You do not neccessarily need this API if you choose to upload your own audio to drive the lip motion of avatars. Note there are two ways to provide the audio for avatar video generation.

  1. upload your own audio

  2. Use the TTS that we provide (This API endpoing).

You can choose from public available TTS engines (currently we provdie Microsoft Azure and Elevenlabs), or use your custom trained TTS (obtained by the methods listed in user_voice section).

Request

Authorization
Provide your bearer token in the
Authorization
header when making requests to protected resources.
Example:
Authorization: Bearer ********************
Body Params application/json
msg
string 
required
the text for TTS
tts_id
string 
optional
Use this if you want to use public TTS. The id of the voice. This is obtained from the the return of /api/v1/anchor/voice_list. Use data -> children -> value. Example: 66dc61ec5148817d26f5b79e
user_voice_id
string 
optional
Use this if you want to use your cloned voice. The id of the voice clone training result. (obtained from the api of /api/v1/userVoice/completedRecord)
You can provide either tts_id or user_voice_id.
You must provide "country" and "region" if you set this parameter.
speechRate
number 
required
1 is normal speed. The larger this value, the faster the speech.
country
string 
optional
The code of the country.
When you use "user_voice_id", you must provide this.
Valid options include: zh, en, ar, ja, es, de, fr, etc. For all available choices, refere to the results returned by /v1/anchor/voice_list method
region
string 
optional
The code of the language.
Valid options include: CN, US, AE etc. So the system can combine en-US (US accent English), zh-CN (Mainland accent Chinese), ar-AE (UAE accent Arabic) etc.
For all available choices, refere to the results returned by /v1/anchor/voice_list method. When you provide "country", you must provide this.
Example
{
  "msg": "hello every one,i am eric,nice to see you!",
  "tts_id": "66503e3d9d7679eb9b640343",
  "speechRate": 1.1,
  "country": "en",
  "region": "US"
}

Request samples

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://video.a2e.ai/api/v1/video/send_tts' \
--header 'Content-Type: application/json' \
--data-raw '{"msg":"hello every one,i am eric,nice to see you!",
 "tts_id":"66503e3d9d7679eb9b640343",
 "speechRate":1.1,
 "country": "en",
 "region": "US"}'

Responses

🟢200send_tts
application/json
Body
code
integer 
required
data
string 
required
The url to download the audio file
Example
{
  "code": 0,
  "data": "https://dh24as48lv9ce.cloudfront.net/ai/speech/tts/2023-10-11/en-US-JennyMultilingualNeural/tts_f44zzb8h.wav"
}
Previous
List Ongoing Voice Clone Tasks
Next
Get Details of a Voice
Built with