Create audio generation
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "eleven_v4"
}
'import requests
url = "https://gengen.farm/api/gengen/v1/audio/generations"
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/generations', 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>",
"contentType": "<string>",
"bytes": 123,
"expiresAt": "2023-11-07T05:31:56Z"
}
]
},
"usage": {
"inputCharacters": 123,
"billableCharacters": 123,
"chargedUsd": 123
},
"phase": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}Generations
Create audio generation
Create audio generation. See the Audio API guide for limits, lifecycle and examples.
POST
/
audio
/
generations
Create audio generation
curl --request POST \
--url https://gengen.farm/api/gengen/v1/audio/generations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "eleven_v4"
}
'import requests
url = "https://gengen.farm/api/gengen/v1/audio/generations"
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/generations', 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>",
"contentType": "<string>",
"bytes": 123,
"expiresAt": "2023-11-07T05:31:56Z"
}
]
},
"usage": {
"inputCharacters": 123,
"billableCharacters": 123,
"chargedUsd": 123
},
"phase": "<string>",
"createdAt": "2023-11-07T05:31:56Z",
"updatedAt": "2023-11-07T05:31:56Z"
}{
"error": {
"code": "<string>",
"message": "<string>"
}
}See the Audio API guide for request examples, limits, billing and delivery behavior.
Use
mode: "text_to_speech" for single-speaker speech or follow
Text to Dialogue for multi-speaker input.
Both modes use this endpoint and the same task lifecycle.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
Available options:
eleven_v3, eleven_v4, eleven_v4_turbo Available options:
queued, processing, succeeded, failed, cancelled Show child attributes
Show child attributes
Show child attributes
Show child attributes