Higgs Audio V2

Transform text into natural-sounding speech using advanced AI voice synthesis with multiple voice options

Backend online

Enter Text

0 / 1000 characters

Select Voice

🔥
Amy

Warm, rich voice with character

💼
Lisa

Clear, professional voice

😎
Jenny

Casual, friendly voice

Quick examples:

🔌 API Access

Convert text to lifelike speech through our REST API.

🔑 API Keys

To use the API, you need an API key. Manage your API keys →

POST /api/v1/generate

Generate Speech with TTS

Submit text and receive an MP3 audio response using our hosted voices.

Cost: 0.1 credits per audio minute

Credits scale with output length. Add optional duration_seconds if you want to pre-authorize minutes.

Request (cURL)

curl -X POST https://app.eigenai.com/api/v1/generate \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "model=higgs_audio_v2" \
  -F "text=Hello, this is a test of the text-to-speech system." \
  -F "voice=roasted" \
  -F "sampling={\"temperature\":0.85,\"top_p\":0.95,\"top_k\":50}" \
  # Optional: estimate runtime to reserve credits
  # -F "duration_seconds=12" \
  --output speech.mp3

Request (Python)

import json
import requests

url = "https://app.eigenai.com/api/v1/generate"
headers = {"Authorization": "Bearer YOUR_API_KEY"}
data = {
    "model": "higgs_audio_v2",
    "text": "Hello, this is a test of the text-to-speech system.",
    "voice": "roasted",
    "sampling": json.dumps({"temperature": 0.85, "top_p": 0.95, "top_k": 50}),
    # "duration_seconds": "12"  # Optional estimate
}

response = requests.post(url, headers=headers, data=data)
with open("speech.mp3", "wb") as output:
    output.write(response.content)

print("Credits remaining:", response.headers.get("X-Credits-Remaining"))

Request (JavaScript/Node.js)

const FormData = require('form-data');
const fs = require('fs');
const axios = require('axios');

const form = new FormData();
form.append('model', 'higgs_audio_v2');
form.append('text', 'Hello, this is a test of the text-to-speech system.');
form.append('voice', 'roasted');
form.append('sampling', JSON.stringify({ temperature: 0.85, top_p: 0.95, top_k: 50 }));
// form.append('duration_seconds', '12'); // Optional estimate in seconds

axios.post('https://app.eigenai.com/api/v1/generate', form, {
    headers: {
        ...form.getHeaders(),
        Authorization: 'Bearer YOUR_API_KEY'
    },
    responseType: 'arraybuffer'
}).then(response => {
    fs.writeFileSync('speech.mp3', response.data);
    console.log('Credits remaining:', response.headers['x-credits-remaining']);
});

Parameters

Parameter Type Required Description
model string ✅ Yes Must be tts
text string ✅ Yes Text to convert into speech
voice string Optional Voice preset (e.g., roasted, wassup)
sampling JSON Optional Sampling controls for deterministic speech (default: {"temperature":0.85,"top_p":0.95,"top_k":50})
style string Optional Advanced voice/style modifiers when supported

Generated Audio

🎵

Your generated audio will appear here

Ready to generate speech

Cost: 0.1 credits per audio minute.