Get Your API Key

Before you can use the Suonora API, you’ll need an API key to authenticate your requests.
You can get your API key by signing into your Suonora account and navigating to the API Keys section on your dashboard.Copy your secret API key and keep it secure. You will use this key in the Authorization header for every API request.

Generate Your First Audio

This example will guide you through creating your first audio file from text using a simple cURL command.

The API Request

Use the following command in your terminal to generate an audio file. Remember to replace YOUR_API_KEY with your actual secret key.
curl --request POST \
  --url [https://api.suonora.com/v1/speech](https://api.suonora.com/v1/speech) \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "text": "Hello from the Suonora API!",
    "voice_id": "voice-en-us-1",
    "model_id": "suonora-v1"
  }' \
  --output suonora_speech.mp3
This command will create a file named suonora_speech.mp3 in the same directory where you run it.

Next Steps

You’ve successfully generated your first audio file! Here’s what you can explore next to get the most out of the Suonora API.