Making Requests
Making Requests
Get started with the powerful features of the Speech Synthesis API by making your first request.
After setting up your account, obtaining your API key, and configuring webhooks, you can start interacting with the Phonix AI Synthesis API. This guide will walk you through the process of making your first request and demonstrate how to generate speech from text.
import requests
url = "https://api.phonixai.com/uapi/v1/speech-synthesis"
headers = {
"Content-Type": "application/json",
"x-api-key": "<your api key>"
}
data = {
"model": "synthesis-1",
"voice_id": "OA001",
"speed": 1,
"input": "Hello world!"
}
response = requests.post(url, headers=headers, json=data)
print(response.json())You can find available voice_id values on the Voice Library page on the Developers Portal.
Last updated