API Server (Hono)
The Hono server runs on port 3000 and acts as the orchestrator. It handles validation, resolves voices/parameters, and forwards inference requests to the FastAPI service.
Generation
Generate Speech
http
POST /api/generateBody:
json
{
"model": "kokoro-v1",
"input": "Hello, world!",
"voice": "voice_id",
"speed": 1.0,
"language": "en",
"stream": false
}Response: audio/wav or audio/pcm (when stream: true)
Voices
List Voices
http
GET /api/voicesCreate a Voice
http
POST /api/voicesBody: multipart/form-data with name, description, language, avatar.
Get Voice Details
http
GET /api/voices/:idUpdate a Voice
http
PUT /api/voices/:idDelete a Voice
http
DELETE /api/voices/:idAdd a Sample
http
POST /api/voices/:id/samplesBody: multipart/form-data with audio file and transcript.
Delete a Sample
http
DELETE /api/voices/:id/samples/:sidModels
Get Model Catalog
http
GET /api/models/catalogReturns the list of available models from embedded manifests.
Get Installed Models
http
GET /api/models/installedScans the filesystem to list installed models.
Pull a Model
http
GET /api/models/:id/pullResponse: Server-Sent Events stream with download progress:
data: {"progress": 45, "speed": "12.5 MB/s", "status": "downloading"}
data: {"progress": 100, "status": "complete"}Delete a Model
http
DELETE /api/models/:idModel Events
http
GET /api/models/eventsSSE stream notifying filesystem changes (model installed/removed).
Transcription
Transcribe Audio
http
POST /api/transcribeBody: multipart/form-data with audio file.
Response:
json
{
"text": "transcribed text",
"language": "en"
}History
List Generations
http
GET /api/generationsPaginated list with filters: voice, model, language, date.
Get Generation Details
http
GET /api/generations/:idDelete a Generation
http
DELETE /api/generations/:idSystem
Health Check
http
GET /api/healthVersion
http
GET /api/version