Authentication
All API requests require an API key. Pass it as a Bearer token in the Authorization header.
Authorization: Bearer sk_...
API keys can be created and managed in the Dashboard.
Base URL
https://api.schwiizerdütsch.com
Endpoints
POST /v1/speak
Generates an audio file from text.
# Request
curl -X POST https://api.schwiizerdütsch.com/v1/speak \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"text": "Grüezi, wie gaats Ihne?",
"voice": "marco",
"speed": 1.0,
"output_format": "mp3"
}' \
--output greeting.mp3
Parameters:
text requiredstringThe text to synthesise. Max. 10,000 characters.
voicestringVoice. Currently marco (Zürich German). Available voices via /v1/voices.
speedfloatSpeed. 0.5 to 2.0, default 1.0.
output_formatstringAudio format: mp3, wav, ogg, flac, pcm. Default mp3.
sample_rateintegerSample rate in Hz: 8000, 16000, 24000, 48000. Default 24000.
Response: Audio file in the selected format.
POST /v1/batch
Synchronous batch processing: multiple texts in one request. Returns one base64-encoded audio per text (same order). The whole batch counts once against your quota. Max. 100 texts per request.
curl -X POST https://api.schwiizerdütsch.com/v1/batch \
-H "Authorization: Bearer sk_..." \
-H "Content-Type: application/json" \
-d '{
"texts": ["First sentence.", "Second sentence."],
"voice": "marco",
"output_format": "mp3"
}'
Additional parameters:
texts requiredarrayArray of texts (max. 100). Each max. 10,000 characters.
Response: JSON with count, total_chars and results — per text {index, char_count, format, audio_b64}.
GET /v1/voices
Lists all available voices with dialect, gender, and description.
curl https://api.schwiizerdütsch.com/v1/voices \
-H "Authorization: Bearer sk_..."
GET /v1/usage
Returns the current character consumption and quota.
curl https://api.schwiizerdütsch.com/v1/usage \
-H "Authorization: Bearer sk_..."
Parameter Reference
textstringInput text. Max. 10,000 characters per request.
voicestringVoice ID. Currently marco. Retrieve via /v1/voices.
speedfloat0.5 to 2.0. Default: 1.0
output_formatstringmp3 · wav · ogg · flac · pcm
sample_rateinteger8000 · 16000 · 24000 · 48000
MP3audio/mpegCompressed. Ideal for web and mobile.
WAVaudio/wavUncompressed. Highest quality.
OGGaudio/oggCompressed. Open-source alternative to MP3.
FLACaudio/flacLossless compression.
PCMaudio/pcmRaw data for further processing (e.g. telephony).
Error Codes
400Bad RequestInvalid parameters or missing required fields.
401UnauthorizedMissing or invalid API key.
403ForbiddenNo access to this resource.
429Too Many RequestsRate limit exceeded.
500Server ErrorInternal server error.
Rate Limits
Free10 req/min1,000 characters per day.
Pro100 req/min500,000 characters per month.
EnterpriseCustomCustom limits by agreement.
SDKs
Official SDKs for the most popular programming languages.
Python
Install:
pip install schwiizerduetsch
Usage:
import schwiizerduetsch
client = schwiizerduetsch.Client("sk_...")
# Generate speech
audio = client.speak(
text="Grüezi, wie gaats Ihne?",
voice="marco",
speed=1.0,
format="mp3"
)
audio.save("greeting.mp3")
Supported methods:
client.speak(), Generate speech
client.batch(), Synchronous batch processing
client.voices(), List available voices
client.usage(), Query quota