Aura-2 is a context-aware text-to-speech (TTS) model that applies natural pacing, expressiveness, and fillers based on the context of the provided text. The quality of your text input directly impacts the naturalness of the audio output.
curl https://api.aigateway.sh/v1/audio/speech \
-H "Authorization: Bearer $AIGATEWAY_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"deepgram/aura-2-es","voice":"alloy","input":"Hello world."}'{
"model": "deepgram/aura-2-es",
"input": "Hello from AIgateway.",
"voice": "alloy",
"format": "mp3", // mp3 | wav | flac | opus
"speed": 1.0
}// Binary audio stream in the requested format (mp3 by default). // Content-Type: audio/mpeg (or audio/wav, audio/flac, audio/opus) // Read the response body directly to a file.
from openai import OpenAI
client = OpenAI(base_url="https://api.aigateway.sh/v1", api_key="sk-aig-...")
r = client.audio.speech.create(model="deepgram/aura-2-es", voice="alloy", input="Hello world.")
r.stream_to_file("out.mp3")