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

# AI Voice Cloner

`POST /v1/ai-voice-cloner`

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 video file - `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

---

[API](https://skmtc.net/magichourhq/apis/magic-hour-api.md) · [All operations](https://skmtc.net/magichourhq/apis/magic-hour-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/magichourhq/magic-hour-api/revisions/d03d90b0b8e0/schema)
