Audio Projects

AI Voice Cloner

Changed on

Clone a voice from an audio sample and generate speech.

  • Each character costs 0.1 credits.
  • The cost is rounded up to the nearest whole number
post/v1/ai-voice-cloner

Request

  • Base URL
    https://api.magichour.ai
  • URL
    https://api.magichour.ai/v1/ai-voice-cloner
  • Auth
    HTTP bearer

Request body

namestring

Give your audio a custom name for easy identification.

Example request

{
  "name": "My Voice Cloner audio",
  "assets": {
    "audio_file_path": "api-assets/id/1234.mp3"
  },
  "style": {
    "prompt": "Hello, this is my cloned voice."
  }
}

Response

Success

idstring required

Unique ID of the audio. Use it with the Get audio Project API to fetch status and downloads.

credits_chargedinteger 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 response

{
  "id": "cuid-example",
  "credits_charged": 1
}

Changes

    • info

      added the non-success response with the status

    • info

      removed the Not Found enum value from the response property for the response status

    • info

      removed the Unauthorized enum value from the response property for the response status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the non-success response with the status