POST
/
api
/
v1
/
{model}
/
add_voice
curl --request POST \
  --url https://waves-api.smallest.ai/api/v1/{model}/add_voice \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'displayName=<string>'
{
  "message": "<string>",
  "data": {
    "voiceId": "<string>",
    "model": "<string>",
    "status": "<string>"
  }
}

Note: The Mintlify web UI currently does not correctly upload files in the API request. Below, we have provided code examples in Python and curl to help you test the API.

Sample cURL Example

curl -X POST https://waves-api.smallest.ai/api/v1/lightning-large/add_voice \
    -H "Authorization: Bearer YOUR_API_KEY" \
    -F "displayName=my voice" \
    -F "file=@my_voice.wav;type=audio/wav"

Sample Code Example

Here is a Python example using the requests library:

import requests
url = "https://waves-api.smallest.ai/api/v1/lightning-large/add_voice"
payload = {'displayName': 'my voice'}
files=[
  ('file', ('my_voice.wav', open('my_voice.wav','rb'), 'audio/wav'))
]
headers = {
  'Authorization': 'Bearer YOUR_API_KEY'
}
response = requests.request("POST", url, headers=headers, data=payload, files=files)
print(response.text)

Replace YOUR_API_KEY with your actual API key and example.wav with the path to your audio file.

Authorizations

Authorization
string
header
required

JWT token for authentication

Path Parameters

model
enum<string>
required

The model to which the voice should be added.

Available options:
lightning-large

Body

multipart/form-data
displayName
string
required

Display name for the voice clone.

file
file
required

Audio file to create voice clone from.

Response

200
application/json
Voice clone created successfully
message
string

Message if the voice clone was created successfully.

data
object