Design voice previews
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/voice-designs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "eleven_ttv_v3",
"prompt": "A warm, clear adult narrator with a calm delivery and a neutral English accent."
}
'import requests
url = "https://gengen.farm/api/gengen/v1/audio/voice-designs"
payload = {
"model": "eleven_ttv_v3",
"prompt": "A warm, clear adult narrator with a calm delivery and a neutral English accent."
}
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({
model: 'eleven_ttv_v3',
prompt: 'A warm, clear adult narrator with a calm delivery and a neutral English accent.'
})
};
fetch('https://gengen.farm/api/gengen/v1/audio/voice-designs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"model": "eleven_v3",
"status": "queued",
"outputs": {
"audios": [
{
"url": "<string>",
"candidateId": "candidate-1",
"durationSeconds": 123,
"contentType": "<string>",
"bytes": 123,
"expiresAt": "2023-11-07T05:31:56Z"
}
]
},
"auditionText": "<string>",
"usage": {
"inputCharacters": 123,
"billableCharacters": 123,
"chargedUsd": 123
},
"error": "<unknown>",
"mediaExpiresAt": "2023-11-07T05:31:56Z",
"phase": "reconciliationRequired",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Create voices
Voice Design v3
Design three voice previews from a description and audition text.
POST
/
audio
/
voice-designs
Design voice previews
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/voice-designs \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "eleven_ttv_v3",
"prompt": "A warm, clear adult narrator with a calm delivery and a neutral English accent."
}
'import requests
url = "https://gengen.farm/api/gengen/v1/audio/voice-designs"
payload = {
"model": "eleven_ttv_v3",
"prompt": "A warm, clear adult narrator with a calm delivery and a neutral English accent."
}
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({
model: 'eleven_ttv_v3',
prompt: 'A warm, clear adult narrator with a calm delivery and a neutral English accent.'
})
};
fetch('https://gengen.farm/api/gengen/v1/audio/voice-designs', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));{
"id": "<string>",
"model": "eleven_v3",
"status": "queued",
"outputs": {
"audios": [
{
"url": "<string>",
"candidateId": "candidate-1",
"durationSeconds": 123,
"contentType": "<string>",
"bytes": 123,
"expiresAt": "2023-11-07T05:31:56Z"
}
]
},
"auditionText": "<string>",
"usage": {
"inputCharacters": 123,
"billableCharacters": 123,
"chargedUsd": 123
},
"error": "<unknown>",
"mediaExpiresAt": "2023-11-07T05:31:56Z",
"phase": "reconciliationRequired",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Submit a voice description (
prompt, 20–1,000 characters) with model: "eleven_ttv_v3". To choose what the voice reads, supply 100–1,000 characters in controls.auditionText; omit it to generate audition text automatically.
curl https://gengen.farm/v1/audio/voice-designs \
-H "Authorization: Bearer $GENGEN_API_KEY" \
-H 'Content-Type: application/json' \
-d '{
"model": "eleven_ttv_v3",
"prompt": "A warm, clear adult narrator with a calm delivery and a neutral English accent.",
"controls": {
"auditionText": "Welcome to our quiet garden. Take a moment to breathe, enjoy the morning light, and imagine a fresh beginning."
}
}'
- On HTTP 202, poll the returned task ID with the same API key, or set
webhookEndpointIdin the request for a completion callback. Auditions are asynchronous; streaming and WebSocket delivery are unavailable. - On success, listen to the three MP3 previews in
outputs.audios. Each has acandidateIdvalid only within this task. The response includes the actualauditionText. - To use a preview for speech or dialogue, save that candidate to obtain a
voiceId.
Idempotency-Key, another submission starts a separately billable audition; see retrying a request.Authorizations
Headers
Body
application/json
Response
Accepted task or existing task for this idempotency key. Poll until settlement and delivery complete.