Create a private voice
curl --request POST \
--url https://gengen.farm/api/gengen/v1/video/kling/voices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Narrator",
"sampleUrl": "https://example.com/speaker.wav"
}
'import requests
url = "https://gengen.farm/api/gengen/v1/video/kling/voices"
payload = {
"name": "Narrator",
"sampleUrl": "https://example.com/speaker.wav"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Narrator', sampleUrl: 'https://example.com/speaker.wav'})
};
fetch('https://gengen.farm/api/gengen/v1/video/kling/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"operationId": "638f14d6-81ba-49f7-8c21-a16f34dca78f",
"status": "active",
"name": "Narrator",
"voiceId": "839000000000000001",
"previewUrl": "https://example.com/narrator-preview.wav"
}Kling 4.0
Create a private Kling voice
Clone one speaker from an authorized sample and use the result in Kling 4.0 Omni.
POST
/
video
/
kling
/
voices
Create a private voice
curl --request POST \
--url https://gengen.farm/api/gengen/v1/video/kling/voices \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "Narrator",
"sampleUrl": "https://example.com/speaker.wav"
}
'import requests
url = "https://gengen.farm/api/gengen/v1/video/kling/voices"
payload = {
"name": "Narrator",
"sampleUrl": "https://example.com/speaker.wav"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({name: 'Narrator', sampleUrl: 'https://example.com/speaker.wav'})
};
fetch('https://gengen.farm/api/gengen/v1/video/kling/voices', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"operationId": "638f14d6-81ba-49f7-8c21-a16f34dca78f",
"status": "active",
"name": "Narrator",
"voiceId": "839000000000000001",
"previewUrl": "https://example.com/narrator-preview.wav"
}Give the voice a display
name and set sampleUrl to a public HTTPS link to your own recording. Use 5–30 seconds of clean speech from one speaker whose voice you have permission to replicate. MP3, WAV, MP4 and MOV are supported.
- HTTP 202,
pending— CopyoperationIdinto Get voice operation to check progress. - HTTP 200,
active— UsevoiceIdinassets.voices[].voiceIdand listen topreviewUrlif provided. See the Omni request example. - HTTP 200,
failed— Readmessagefor the reason. Submit a corrected sample as a new creation.
Idempotency-Key header is optional. Without it, each accepted submission creates a separate operation and incurs a charge, even for the same sample. For safe retries, send a key on the first request and reuse it with the same body. GENGEN then returns the original operation without another charge. Reusing a key with different input returns HTTP 409.
Each workspace has five private voice slots. Pending and active voices, as well as voices awaiting deletion, occupy slots.Headers
Body
application/json
Response
Current state of a completed creation or an idempotent replay. Inspect status before using voiceId.