API Endpoints
Complete reference of all available API endpoints
API Endpoints
All endpoints are relative to the base URL: https://api.speechgen.com/v1
Overview
| Method | Endpoint | Description |
|---|---|---|
POST | /text-to-speech | Convert text to speech |
POST | /voice-clone | Create a voice clone from audio |
GET | /voices | List all available voices |
GET | /voices/{id} | Get voice details |
GET | /audio/{id} | Retrieve generated audio |
GET | /models | List your voice models |
DELETE | /models/{id} | Delete a voice model |
Text-to-Speech
Convert text to natural-sounding speech.
POST /text-to-speechRequest Body:
{
"text": "Hello, welcome to Speechgen!",
"voice": "en-US-Neural2-A",
"format": "mp3",
"speed": 1.0,
"pitch": 0
}Response: Binary audio data
Voice Clone
Create a custom voice model from audio samples.
POST /voice-clone
Content-Type: multipart/form-dataForm Data:
Prop
Type
Response:
{
"model_id": "vm_abc123",
"status": "processing",
"estimated_time": 60
}List Voices
Get all available voices.
GET /voicesQuery Parameters:
Prop
Type
Response:
{
"voices": [
{
"id": "en-US-Neural2-A",
"name": "Aria",
"language": "en-US",
"gender": "female",
"styles": ["cheerful", "professional", "calm"]
}
]
}Retrieve Audio
Download a previously generated audio file.
GET /audio/{id}Response: Binary audio data
Audio files are stored for 7 days. Download and store them if you need longer retention.