Generate speech audio
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "eleven_v4"
}
'import requests
url = "https://gengen.farm/api/gengen/v1/audio/speech"
payload = { "model": "eleven_v4" }
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_v4'})
};
fetch('https://gengen.farm/api/gengen/v1/audio/speech', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": {
"code": "<string>",
"message": "<string>"
}
}Text to Speech
Generate speech audio
Generate speech audio. See the Audio API guide for limits, lifecycle and examples.
POST
/
audio
/
speech
Generate speech audio
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/speech \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "eleven_v4"
}
'import requests
url = "https://gengen.farm/api/gengen/v1/audio/speech"
payload = { "model": "eleven_v4" }
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_v4'})
};
fetch('https://gengen.farm/api/gengen/v1/audio/speech', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));"<string>"{
"error": {
"code": "<string>",
"message": "<string>"
}
}See the Audio API guide for request examples, limits, billing and delivery behavior.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Reuse the same key and body after a timeout to recover accepted work without generating or charging twice.
Required string length:
1 - 128Body
application/json
Available options:
eleven_v3, eleven_v4, eleven_v4_turbo Available options:
text_to_speech, text_to_dialogue Speech text. Maximum 2,000 Unicode code points including whitespace and tags across the request.
v3/v4 only; at most ten distinct voices. Omit prompt and controls.voiceId.
Maximum array length:
100Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Response
Success
The response is of type file.