import requests url = "https://cloudlabs-text-to-speech.p.rapidapi.com/synthesize" payload = { "voice_code": "en-US-1", "text": "hello, Yes. I'm RED NATION!", "speed": "1.00", "pitch": "1.00", "output_type": "audio_url" } headers = { "content-type": "application/x-www-form-urlencoded", "X-RapidAPI-Key": "21253d4ad8mshc858b5f3ba04919p1b5a03jsna381170f15fe", "X-RapidAPI-Host": "cloudlabs-text-to-speech.p.rapidapi.com" } response = requests.post(url, data=payload, headers=headers) print(response.json())