Create an Instant Voice Clone
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/voices/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'name=<string>' \
--form files=@example-file \
--form consent=trueimport requests
url = "https://gengen.farm/api/gengen/v1/audio/voices/clone"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"consent": "true"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', '<string>');
form.append('files', '<string>');
form.append('consent', 'true');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://gengen.farm/api/gengen/v1/audio/voices/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"kind": "clone",
"status": "creating",
"models": [
"<string>"
],
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statusUrl": "<string>",
"id": "<string>",
"voiceId": "<string>",
"message": "<string>"
}{
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statusUrl": "<string>",
"name": "<string>",
"kind": "clone",
"status": "creating",
"models": [
"<string>"
],
"id": "<string>",
"voiceId": "<string>",
"message": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Create voices
Clone a voice from recordings
Submit recordings of one speaker. The complete multipart body must fit within 4 MiB.
POST
/
audio
/
voices
/
clone
Create an Instant Voice Clone
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/voices/clone \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: multipart/form-data' \
--form 'name=<string>' \
--form files=@example-file \
--form consent=trueimport requests
url = "https://gengen.farm/api/gengen/v1/audio/voices/clone"
files = { "files": ("example-file", open("example-file", "rb")) }
payload = {
"name": "<string>",
"consent": "true"
}
headers = {"Authorization": "Bearer <token>"}
response = requests.post(url, data=payload, files=files, headers=headers)
print(response.text)const form = new FormData();
form.append('name', '<string>');
form.append('files', '<string>');
form.append('consent', 'true');
const options = {method: 'POST', headers: {Authorization: 'Bearer <token>'}};
options.body = form;
fetch('https://gengen.farm/api/gengen/v1/audio/voices/clone', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"name": "<string>",
"kind": "clone",
"status": "creating",
"models": [
"<string>"
],
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statusUrl": "<string>",
"id": "<string>",
"voiceId": "<string>",
"message": "<string>"
}{
"operationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"statusUrl": "<string>",
"name": "<string>",
"kind": "clone",
"status": "creating",
"models": [
"<string>"
],
"id": "<string>",
"voiceId": "<string>",
"message": "<string>"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Creating a clone uses one private voice slot and has no separate creation fee.
Prepare the recordings. Aim for about 1–2 minutes in total across all samples. Use one speaker with a consistent speaking style and recording level. Avoid background noise and room reverb.
Upload limits. Send 1–10 nonempty files by repeating the multipart
Without an
files field. The entire multipart body, including form headers and boundaries, must fit within 4 MiB. Set consent=true to confirm you have the rights and consent to clone the speaker.
curl https://gengen.farm/v1/audio/voices/clone \
-H "Authorization: Bearer $GENGEN_API_KEY" \
-F 'name=Narrator' \
-F 'consent=true' \
-F 'files=@narrator.mp3;type=audio/mpeg'
| Result | Next step |
|---|---|
201, active | Use the returned voiceId for speech or dialogue with any active key in this workspace. |
201, verificationRequired | Send your voiceId to GENGEN support, then check the voice status. |
202 | Poll the returned statusUrl instead of uploading again. |
Idempotency-Key, uploading twice can create two voices. For a safe retry, keep the same fields, file order, names, media types and contents.Authorizations
Headers
Scoped to the workspace and creation operation. Without this header each submission is independent and can occupy another slot. To retry safely, reuse the same key and input. Changing the input under the same key returns 409.
Required string length:
1 - 128Pattern:
^[!-~]{1,128}$Body
multipart/form-data
Response
Saved voice or idempotent replay. Use for generation when active.