Synthesize or non-streaming (Gen2)
Synthesize (Gen 2) sends the full text in one request and returns a file URL when generation finishes. Use it for studio voiceover: ads, narration, e-learning, and other offline playback where you need styles, pause tags, audio duration, or variations.
Pass modelVersion: "GEN2" in the request. Host is https://api.murf.ai.
Do not send Synthesize calls to the streaming host.
Use HTTP streaming when you need audio chunks in real time, or WebSocket when text arrives in pieces.
Quickstart
Generate an audio file from text with POST /v1/speech/generate. The response includes a link to the file. The file remains available for 72 hours.
Getting Started
Generate an API key here. Store the key in a secure location, as you’ll need it to authenticate your requests. You can optionally save the key as an environment variable in your terminal.
Voices
Pick a voice from the Gen 2 list in the Voice Library. Gen 2 has 150+ voices and 20+ speaking styles. Gen 2 voices are for studio voiceover.
Endpoint
Each in-flight generate request counts toward Synthesize (Gen 2) concurrency. A request can include up to 3,000 characters. Split longer scripts across multiple calls.
The machine-readable request and response are in the Synthesize Speech API reference.
Speech customization
Voice, locale, speed, and pitch are available. Style control, custom pause tags, audio duration, and variations are Synthesize (Gen 2) only. Set pronunciations with pronunciationDictionary.
See Speech Customization for ranges and samples.
Supported output formats
The default output format is WAV. Set format, channelType, and sampleRate in the request. The API supports stereo and mono, and sample rates of 8000, 24000, 44100, and 48000 Hz.
ULAW and ALAW formats only support mono channel type and a sample rate of 8000 Hz. If you specify a different channel type or sample rate, the API will default to the supported values.
Base64 encoding
Base64 encoding is Synthesize (Gen 2) only. Set encodeAsBase64 to true to receive the audio inline instead of a file URL. That also enables zero retention of audio data on Murf’s servers.
The response includes the audio encoded in Base64:
gzip
gzip is Synthesize (Gen 2) only. Include gzip in the accept-encoding header. This is especially useful with Base64 audio.
Next Steps
FAQs
What is Gen 2?
Gen 2 is Murf’s studio text-to-speech model. It returns a file URL from Synthesize Speech and supports 150+ voices and 20+ speaking styles. See the Gen 2 model page.
Who should use Synthesize (Gen 2)?
Use Synthesize when you want a finished file for ads, narration, e-learning, or other offline playback, and when you need styles, pause tags, audio duration, or variations. Use HTTP streaming or WebSocket for realtime agents.
How do I enable Gen 2?
Pass modelVersion: "GEN2" (Python SDK: model_version="GEN2") on
POST /v1/speech/generate.
What features are supported?
Voice, locale, speed, and pitch are available, plus styles, custom pause
tags, audio duration, variations, and pronunciationDictionary. See
Speech Customization.
What audio format will this support?
Synthesize returns MP3, FLAC, WAV, ALAW, ULAW, OGG, or PCM. Inline Base64 audio and gzip are Synthesize only.
How long is the audio file available?
The returned URL stays available for 72 hours after generation. Use Base64 encoding if you need the audio inline with no object-storage retention.