Use this file to discover all available pages before exploring further.
You can use the following API to generate tts voice and voice clones.
The resources (image, video, voice) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.
POST https://openapi.akool.com/api/open/v3/audio/create
Request Headers
Parameter
Value
Description
Authorization
Bearer {token}
Your API Key used for request authorization.Get Token
Body Attributes
Parameter
Type
Value
Description
input_text
String
Enter what talkingphoto to say, The text content is limited to 5000 words.
voice_id
String
Voice id: get from Voice List API api,the field is 【voice_id】
rate
String
Voice speaking speed【field value ranges(0%-100%)】
webhookUrl
String
Callback url address based on HTTP request
Response Attributes
Parameter
Type
Value
Description
code
int
1000
Interface returns business status code(1000:success)
msg
String
Interface returns status information
data
Object
{ _id: "", status: 1 }
_id: Interface returns data, status: the status of audio: 【1:queueing, 2:processing, 3:completed, 4:failed】
ExampleBody
{ "input_text": "Choose from male and female voices for various use-cases. For tailored options, refer to voice settings or read further.There are both male and female voices to choose from", "voice_id": "LcfcDJNUP1GQjkzn1xUU", "rate": "100%", "webhookUrl":""}
Request
curl --location 'https://openapi.akool.com/api/open/v3/audio/create' \--header "x-api-key: {{API Key}}" \--header 'Content-Type: application/json' \--data '{ "input_text": "Choose from male and female voices for various use-cases. For tailored options, refer to voice settings or read further.There are both male and female voices to choose from", "voice_id": "LcfcDJNUP1GQjkzn1xUU", "rate": "100%", "webhookUrl":""}'
Response
{ "code": 1000, "msg": "OK", "data": { "_id": "65f8017f56559aa67f0ecde7", "create_time": 1710752127995, "uid": 101690, "from": 3, "input_text": "Choose from male and female voices for various use-cases. For tailored options, refer to voice settings or read further.There are both male and female voices to choose from", "rate": "100%", "voice_model_id": "65e980d7af040969db5be854", "url": "https://drz0f01yeq1cx.cloudfront.net/1710752141387-e7867802-0a92-41d4-b899-9bfb23144929-4946.mp3", "status": 3, "__v": 0 }}
POST https://openapi.akool.com/api/open/v3/audio/clone
Request Headers
Parameter
Value
Description
Authorization
Bearer {token}
Your API Key used for request authorization. Get Token
Body Attributes
Parameter
Type
Required
Value
Description
input_text
String
true
Enter what avatar in video to say, The text content is limited to 5000 words.
rate
String
true
Voice speaking speed【field value ranges(0%-100%)】
voice_url
String
false
Voice url address
webhookUrl
String
false
Callback url address based on HTTP request
voice_id and voice_url must provide one
Response Attributes
Parameter
Type
Value
Description
code
int
1000
Interface returns business status code(1000:success)
msg
String
Interface returns status information
data
Object
{ _id: "", status: 1, url:"" }
_id: Interface returns data, status: the status of audio: 【1:queueing, 2:processing, 3:completed, 4:failed】, url: Links to the generated audio resources,You can use it in the interface Create Talking Avatar API api.
ExampleBody
{ "input_text": "Hello, this is Akool's AI platform!", "rate": "100%", "voice_url":"https://drz0f01yeq1cx.cloudfront.net/1713168740392-4022bc91-5502-4e79-a66a-8c45b31792e4-4867.mp3", "webhookUrl":""}
Request
curl --location 'https://openapi.akool.com/api/open/v3/audio/clone' \--header "x-api-key: {{API Key}}" \--header 'Content-Type: application/json' \--data '{ "input_text": "Hello, this is Akool'\''s AI platform!", "rate": "100%", "voice_url":"https://drz0f01yeq1cx.cloudfront.net/1713168740392-4022bc91-5502-4e79-a66a-8c45b31792e4-4867.mp3", "webhookUrl":""}'
Response
{ "code": 1000, "msg": "OK", "data": { "create_time": 1712113285547, "from": 3, "input_text": "Hello, this is Akool's AI platform!", "rate": "100%", "voice_model_id": "65e813955daad44c2267380d", "url": "https://drz0f01yeq1cx.cloudfront.net/1712113284451-fe73dd6c-f981-46df-ba73-0b9d85c1be9c-8195.mp3", "status": 3, "_id": "660cc685b0950b5bf9bf4b55" }}
{ "code": 1000, "msg": "OK", "data": { "_id": "65f8017f56559aa67f0ecde7", "create_time": 1710752127995, "uid": 101690, "from": 3, "input_text": "Choose from male and female voices for various use-cases. For tailored options, refer to voice settings or read further.There are both male and female voices to choose from", "rate": "100%", "voice_model_id": "65e980d7af040969db5be854", "url": "https://drz0f01yeq1cx.cloudfront.net/1710752141387-e7867802-0a92-41d4-b899-9bfb23144929-4946.mp3", // Generated audio resource url "status": 3, // current status of audio: 【1:queueing(The requested operation is being processed),2:processing(The requested operation is being processing),3:completed(The request operation has been processed successfully),4:failed(The request operation processing failed, the reason for the failure can be viewed in the audio details.)】 "__v": 0 }}