Skip to main content

API Server

Neiroha exposes a local HTTP server so external tools can call TTS through an OpenAI-compatible interface.

Start the Server

Open:

Settings -> API Server

Default settings:

SettingDefault
Bind host127.0.0.1
Port8976
API keyempty
CORS originsempty
Rate limit60 req/min/IP
Max body size1048576 bytes

By default, only local loopback access is allowed. For LAN access, set the bind host to 0.0.0.0 and configure an API key.

When an API key is configured, clients must send either:

Authorization: Bearer <key>

or:

X-API-Key: <key>

If the API key is empty, omit the auth header from request examples.

Endpoints

MethodPathDescription
POST/v1/audio/speechOpenAI-compatible speech synthesis
GET/v1/audio/voicesList voices in the active voice bank
GET/v1/modelsList active voice banks as models
GET/speakersSillyTavern-compatible speaker list
GET/healthHealth check

See API Reference for complete fields and error codes.

Request Example

curl http://localhost:8976/v1/audio/speech \
-H "Content-Type: application/json" \
-H "Authorization: Bearer <key>" \
-d '{
"model": "Default Bank",
"voice": "Default Voice",
"input": "Hello, world!",
"response_format": "wav",
"speed": 1.0
}' \
--output hello.wav

Voice Banks as Models

The API uses voice banks as the model abstraction:

  • Active voice banks appear in /v1/models.
  • A voice bank name can be used as the model value in POST /v1/audio/speech.
  • /v1/audio/voices and /speakers are scoped to the active voice bank.

This lets OpenAI-compatible clients select different character sets through the model field.