Generate Audio
Dedicated audio generation endpoint using the Universal Schema with flat parameters.
Supports three audio types:
- **speech**: Multi-speaker TTS (auto-detects characters, designs unique voices per entity)
- **music**: AI-generated music
- **sfx**: AI-generated sound effects
**Universal Base Schema:**
- user_id (str, required): The end-user ID
- project_id (str, required): The project ID
- persona_id (str, optional): The specific system persona/voice to use
- disabled_learning (bool, optional): If true, request is ignored by long-term memory
**Input:**
- text_input (str, required): Text to speak or audio prompt
- context (str, optional): Additional context
**Audio Params (Flat):**
- model (str, required): Model ID (e.g., eleven-turbo)
- voice (str, required): Voice ID for TTS
- audio_type (str, optional): 'speech', 'music', or 'sfx'
- speed (float, optional): Playback speed (0.5-2.0)
- duration (float, optional): Max duration in seconds
- seed (int, optional): Random seed for reproducibility
**Reference inputs:**
- image_base64 (str, optional): Base64 encoded reference image for context
- video_base64 (str, optional): Base64 encoded reference video for context
- audio_base64 (str, optional): Base64 encoded reference audio for context
**Authentication**: Requires valid API key or JWT token
Note: Reasoning is not currently supported for audio generation.
Request body
Example request
{
"audio_type": "speech",
"model": "eleven-turbo",
"project_id": "proj_ABC",
"speed": 1,
"text_input": "Hello world, this is a test.",
"user_id": "user_123",
"voice": "rachel"
}Response
Successful Response
Changes
Changed in 4 of the 29 revisions of this API.27
- ○
added the new optional request property
max_reasoning_iterationsnew-optional-request-property
- ○
added the new optional request property
use_reasoningnew-optional-request-property
- ○
the
modelrequest property default value changed fromeleven-turbotolyria-2request-property-default-value-changed
- ○
- ○
the
output_typeresponse's property default value changed frombase64tobothfor the status200response-property-default-value-changed
- ○
- ▲
the response property
audio_base64became optional for the status200response-property-became-optional
- ▲
response property
audio_base64list-of-types was widened by adding typesnullto media typeapplication/jsonof response200response-property-list-of-types-widened
- ○
added the optional property
audio_urlto the response with the200statusresponse-optional-property-added
- ○
added the optional property
output_typeto the response with the200statusresponse-optional-property-added
- ▲
- ○
endpoint added
endpoint-added
This revision also has 20 changes that name no endpoint, such as unreferenced schemas being removed. See the revision's changelog
- ○