---
title: "AI Voice Cloner"
method: POST
path: "/v1/ai-voice-cloner"
tags: ["Audio Projects"]
---

# AI Voice Cloner

`POST /v1/ai-voice-cloner`

## Request

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

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

## Request body

- object
  - `name` string: Give your audio a custom name for easy identification.
  - `assets` object, required: Provide the assets for voice cloning.
    - `audio_file_path` string, required: The audio used to clone the voice. This value is either - a direct URL to the file. The URL path must end in a supported file extension. - `file_path` field from the response of the [upload urls API](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls). See the [file upload guide](https://docs.magichour.ai/api-reference/files/generate-asset-upload-urls#input-file) for details.
  - `style` object, required
    - `prompt` string, required: Text used to generate speech from the cloned voice. The character limit is 1000 characters.

## Response `200`

Success

- object: Success
  - `id` string, required: Unique ID of the audio. Use it with the [Get audio Project API](https://docs.magichour.ai/api-reference/audio-projects/get-audio-details) to fetch status and downloads.
  - `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.

## Other responses

- `400`: Invalid Request
- `401`: Unauthorized
- `402`: Payment Required
- `404`: Not Found
- `422`: Unprocessable Entity
- `500`: Internal Server Error

## Changes

- **2026-09-02** `9aeb9397c62a`: 8 info
  - added the non-success response with the status `500`
  - removed the `Not Found` enum value from the `message` response property for the response status `404`
  - removed the `Unauthorized` enum value from the `message` response property for the response status `401`
  - added the required property `code` to the response with the `400` status
  - …4 more
- **2026-03-06** `1f72d520ddc6`: 1 info
  - added the non-success response with the status `402`

[Operation history](https://skmtc.dev/magichourhq/apis/magic-hour-api/changes/v1/ai-voice-cloner/post.md)

---

[API](https://skmtc.dev/magichourhq/apis/magic-hour-api.md) - [All operations](https://skmtc.dev/magichourhq/apis/magic-hour-api/llms.txt) - [OpenAPI document](https://skmtc.dev/magichourhq/apis/magic-hour-api/revisions/2ee5927306a9?raw)
