Quickstart
This guide will help you get started with the Murf API. You’ll learn how to get your API key, and how to make your first TTS API request.
Generate an API Key
To use the Murf API, you need an API key. If you don’t have one yet, you can sign up for a free account and generate your first API Key. Store the key in a secure location, as you’ll need it to authenticate your requests. Then, save the key as an environment variable in your terminal.
Make Your First API Request (Streaming)
To use Murf’s streaming API, you can either use the REST API using an HTTP client to receive audio data in real-time, or use one of our official SDKs.
Murf offers a variety of voice IDs for different languages and accents. You can choose a voice ID that best suits your application’s needs. You can see the full list of available voice IDs here, or fetch the list programmatically using the list_voices endpoint.
The following code snippets assume that you have exported the MURF_API_KEY system environment variable as shown above.
Python SDK
REST API
Install the Python SDK and PyAudio
pyaudio depends on PortAudio, you may need to install it first.
Installing PortAudio (for PyAudio)
PyAudio depends on PortAudio, a cross-platform audio I/O library. You may need to install PortAudio separately if it’s not already on your system.
macOS
Linux (Debian/Ubuntu)
Windows
Once you have installed PortAudio, you can install the required Python packages using the following command:
Make Your First API Request (Non Streaming)
To use Murf, you can either us the REST API using an HTTP client, or use one of our official SDKs.