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.

$# Export an environment variable on macOS or Linux systems
>export MURF_API_KEY="your_api_key_here"

Make Your First API Request

To use Murf, you can either us the REST API using an HTTP client, or use one of our official SDKs.

1

Install the Python SDK

$pip install murf
2

Make the API Call

Once you have the SDK installed, and the API key set as an environment variable, you are ready to make your first API call.

1from murf import Murf
2
3client = Murf()
4
5audio_res = client.text_to_speech.generate(
6 text="Lo and Behold! Speech!",
7 voice_id="en-US-terrell",
8)
9
10print(audio_res.audio_file)
Built with