AUDIO
🔊 Gemini TTS Model
Making Request:
Endpoint:
https://api.hyprlab.io/v1beta/models/[MODEL]:generateContent?key=[API-KEY]
Single-Speaker Example:
#!/bin/bash
set -e -E
HYPRLAB_API_KEY="$HYPRLAB_API_KEY"
MODEL_ID="gemini-2.5-flash-preview-tts"
curl -X POST \
-H "Content-Type: application/json" \
"https://api.hyprlab.io/v1beta/models/${MODEL_ID}:generateContent?key=${HYPRLAB_API_KEY}" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Greet the user in a warm and welcoming voice: Good morning! Ready to start your day?"
}
]
}
],
"generationConfig": {
"responseModalities": ["audio"],
"temperature": 1,
"speech_config": {
"voice_config": {
"prebuilt_voice_config": {
"voice_name": "Zephyr"
}
}
}
}
}' > output.json
echo "Response saved as output.json"
Multiple-Speaker Example:
#!/bin/bash
set -e -E
HYPRLAB_API_KEY="$HYPRLAB_API_KEY"
MODEL_ID="gemini-2.5-flash-preview-tts"
curl -X POST \
-H "Content-Type: application/json" \
"https://api.hyprlab.io/v1beta/models/${MODEL_ID}:generateContent?key=${HYPRLAB_API_KEY}" \
-d '{
"contents": [
{
"role": "user",
"parts": [
{
"text": "Read aloud in a warm, welcoming tone\nSpeaker 1: Hello! We are excited to show you our native speech capabilities.\nSpeaker 2: Where you can direct a voice, create realistic dialog, and so much more. Edit these placeholders to get started."
}
]
}
],
"generationConfig": {
"responseModalities": ["audio"],
"temperature": 1,
"speech_config": {
"multi_speaker_voice_config": {
"speaker_voice_configs": [
{
"speaker": "Speaker 1",
"voice_config": {
"prebuilt_voice_config": {
"voice_name": "Zephyr"
}
}
},
{
"speaker": "Speaker 2",
"voice_config": {
"prebuilt_voice_config": {
"voice_name": "Puck"
}
}
}
]
}
}
}
}' > output.json
echo "Response saved as output.json"
Pricing:
Model Name:
gemini-2.5-pro-preview-tts
Discount:
60% off
Input:
$0.4 / 1M Tokens
Output:
$8 / 1M Tokens
Context Length:
32,000
Moderation:
Unfiltered
Capabilities:
Single-Speaker Audio
Multi-Speaker Audio
Model Name:
gemini-2.5-flash-preview-tts
Discount:
60% off
Input:
$0.2 / 1M Tokens
Output:
$4 / 1M Tokens
Context Length:
32,000
Moderation:
Unfiltered
Capabilities:
Single-Speaker Audio
Multi-Speaker Audio
🔊 Chirp TTS Model
Making Request:
Endpoint:
https://api.hyprlab.io/v1/text:synthesize
curl -X POST -H "Content-Type: application/json" \
-H "Authorization: Bearer $HYPRLAB_API_KEY" \
--data '{
"input": {
"markup": "Let me take a look, [pause long] yes, I see it."
},
"voice": {
"languageCode": "en-US",
"name": "en-US-Chirp3-HD-Aoede"
},
"audioConfig": {
"audioEncoding": "MP3"
}
}' "https://api.hyprlab.io/v1/text:synthesize" | \
jq -r '.audioContent' | base64 -d > output.mp3
Pricing:
Model Name:
Discount:
Pricing:
chirp-3
33% off
$20 / 1M Characters
Last updated