Skip to main content
POST
/
v1
/
ai-voice-cloner
AI Voice Cloner
curl --request POST \
  --url https://api.magichour.ai/v1/ai-voice-cloner \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "assets": {
    "audio_file_path": "api-assets/id/1234.mp3"
  },
  "style": {
    "prompt": "Hello, this is my cloned voice."
  },
  "name": "Voice Cloner audio"
}
'
{
  "id": "cuid-example",
  "credits_charged": 1
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <api_key>, where <api_key> is your API key. To get your API key, go to Developer Hub and click "Create new API Key".

Body

application/json

Body

assets
object
required

Provide the assets for voice cloning.

style
object
required
name
string
default:Voice Cloner - dateTime

The name of audio. This value is mainly used for your own identification of the audio.

Example:

"Voice Cloner audio"

Response

Success

Success

id
string
required

Unique ID of the audio. This value can be used in the get audio project API to fetch additional details such as status

Example:

"cuid-example"

credits_charged
integer
required

The amount of credits deducted from your account to generate the audio. We charge credits right when the request is made.

If an error occurred while generating the audio, credits will be refunded and this field will be updated to include the refund.

Example:

1