This endpoint generates high-quality speech audio using pre-designed character voices. Supports streaming, emotional tags, and verbose output.
API key for authentication
Request Body
The unique identifier of a pre-designed voice from the Get Characters endpointRealistic Voices:
Ava
Chloe
Liam
Noah
James
Emma
Sophie
Oliver
AnimatedCartoon
Anime
Flirty
Seductively
AIMachineVoice
Cyborg
AlienSciFi
Pirate
Gangster
DarkVillain
Demon
The text to convert to speech.Max Length: 5,000 characters
Enable streaming audio generation
true
- Stream audio chunks as they’re generated (lower latency)false
- Return complete audio file after processing
Response
The generated audio file in WAV or MP3 format
Additional metadata about the generation (only when verbose is enabled)
Example Use Cases
- Ava - American 20s Female
- Emma - American 40s Female
- Noah - American 20s Male
- Liam - British 20s Male
- James - American 40s Male
- Chloe - British 20s Female
- Sophie - British 40s Female
- Oliver - British 40s Male
Streaming Response
Whenstream
is set to true
, the API returns audio chunks as they are generated for lower latency:
Streaming Example
Use streaming mode for:
- Real-time voice assistants and chatbots
- Interactive applications where latency matters
- Long-form content where you want to start playback immediately
- Live customer support systems
Best Practices
Choose the Right Character
Choose the Right Character
Browse available characters using the Get Characters endpoint and select one that matches your use case and target audience.
Match Voice to Content
Match Voice to Content
- Customer service → Friendly, patient, clear voices
- Podcast → Conversational, warm, engaging voices
- Audiobook → Clear, expressive, consistent voices
- Professional → Authoritative, confident, polished voices
Optimize for Performance
Optimize for Performance
- Enable streaming for interactive applications
- Cache character IDs for repeated use
- Break long text into manageable chunks
Error Codes
Always implement proper error handling to gracefully manage API errors.
Code | Description | Resolution |
---|---|---|
400 | Invalid request format | Check JSON syntax and ensure required fields are present |
401 | Authentication failed | Verify your API key is correct and properly formatted |
403 | Access denied | Check API permissions and usage quotas |
404 | Voice not found | Verify the voice_id exists using Get Characters endpoint |
413 | Text too long | Reduce text length to under 5,000 characters |
500 | Internal server error | Contact support if the error persists |
Performance Tips
Cache Character IDs
Store and reuse character IDs for consistent voice across your application.
Enable Streaming
Streaming reduces perceived latency for interactive applications and long content.
Batch Requests
Generate multiple audio files in parallel when possible to maximize throughput.
Optimize Text
Break very long text into manageable chunks (under 1,000 characters) for better performance.
Pro tip: For consistent brand voice across your application, select the right voice once, test thoroughly, then reuse the same voice_id for all subsequent generations.
Authorizations
API key for Maya1 API authentication
Body
application/json
The unique identifier of a pre-designed voice
Available options:
Ava
, Chloe
, Liam
, Noah
, James
, Emma
, Sophie
, Oliver
, AnimatedCartoon
, Anime
, Flirty
, Seductively
, AIMachineVoice
, Cyborg
, AlienSciFi
, Pirate
, Gangster
, DarkVillain
, Demon
Example:
"Ava"
The text to convert to speech.
Maximum length:
5000
Example:
"Welcome back to another episode of our podcast! Today we're diving into an absolutely fascinating topic that I know you're going to love. We've got some incredible insights to share with you, so let's get started right away."
Enable streaming audio generation
Example:
false
Response
Successfully generated audio
Generated audio file in WAV format