# Clone a voice from an audio clip

> POST /voices/clone. HeyRik API parameters and documented request and response examples.

Source: https://www.heyrik.com/docs/api-reference/voices/post-voices-clone-clone-a-voice-from-an-audio-clip

POST https://server.heyrik.com/api/v1/voices/clone

## Headers

Authorization: Bearer $HEYRIK_API_KEY (required). Keep your key on your server.

## Parameters

- clip (multipart file, required): Aim for 20–30 seconds of clean speech from one speaker with no background noise.
- name (string, required): What to call the cloned voice.
- language (string): Primary language of the clip.
- gender (string): male | female — for filtering only.

## Notes

Voice cloning uses credits; confirm the current price shown before submitting because pricing can change. The returned voice_id is immediately usable — set voice_settings.voice_id on any agent, or find it later via GET /voices?type=cloned.

## Request example

```sh
curl -X POST https://server.heyrik.com/api/v1/voices/clone \
  -H "Authorization: Bearer $HEYRIK_API_KEY" \
  -F "clip=@sample.wav" \
  -F "name=Founder voice" \
  -F "language=en-IN"
```

## Response example

```json
{
  "data": {
    "voice_id": "vx_7b1e44a2",
    "name": "Founder voice",
    "language": "en-IN",
    "credits_charged": 5
  }
}
```
