Frequently asked questions
How do I authenticate with the API?
Include your unique API key in the request header as Authorization: Bearer tts-.... Each account maintains one active key. You can issue a new key at any time via the dashboard, which immediately invalidates the previous key, ensuring secure access to the text-to-speech endpoint.
What is the base URL for the OpenAI SDK?
Set the OpenAI SDK base_url to https://api.vs98.info/v1. This allows you to use the official OpenAI Python SDK directly by changing the base URL while keeping the standard request shape. The API endpoint for speech generation is POST https://api.vs98.info/v1/audio/speech.
Which Python libraries are compatible?
The API is compatible with the official OpenAI Python SDK. By configuring the base_url to https://api.vs98.info/v1, you can utilize standard SDK methods for speech generation. Alternatively, you may use any standard HTTP library like requests to send JSON payloads to the endpoint manually.
How do I handle rate limit errors?
The limit is 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so under load, a request may wait in a queue. Implement exponential backoff in your Python code to handle HTTP 429 errors gracefully during high-volume batch processing.
What is the maximum input text length?
The maximum input text length is 4096 characters per request. For longer texts, split the input into chunks of up to 4096 characters. Generate audio for each chunk separately and join the resulting audio files to create a continuous output. Spaces and punctuation count toward this limit.
Can I change the voice speed programmatically?
Yes, include the speed parameter in your JSON request body. The acceptable range is 0.25 to 4.0. This allows you to adjust the playback speed of the generated synthetic audio programmatically to suit specific call center or IVR timing requirements without needing post-processing.
How do I specify the language in the request?
Include the language field with a valid ISO code in your request body. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly setting the language field ensures accurate synthesis.
What happens if the API key is revoked?
When you issue a new key via the dashboard, the old key stops working immediately. Any subsequent API calls using the revoked key will fail authentication. Ensure your application updates its configuration promptly to avoid service interruption during key rotation.
Is there a Python SDK provided by VoxSynth?
No, VoxSynth does not provide an official proprietary SDK. You should use the official OpenAI Python SDK or standard HTTP libraries. The API uses the same request shape as the OpenAI speech endpoint, making the OpenAI SDK compatible by simply adjusting the base URL.
How do I decode the audio response?
The API returns the audio file directly in the response body. Depending on the response_format specified (mp3, wav, opus, flac, or pcm), you can save the raw bytes to a file or process them using standard audio libraries. No additional decoding steps are required beyond handling the binary stream.
What are the supported response formats?
The API supports mp3, wav, opus, flac, and pcm formats. Specify your preferred format in the response_format field of the JSON request body. This allows you to optimize file size and quality based on your IVR system's requirements for call center audio delivery.
How long does a typical request take?
Generation speed is roughly real-time, approximately 25 characters of text per second of generation for long texts. Short phrases may take a few seconds. Requests are processed sequentially, so under load, a request may wait in a queue. Plan your batch processing accordingly to manage latency expectations.
Can I use the API for batch processing?
Yes, split long texts into parts of up to 4096 characters and generate audio for each. Join the resulting audio files to create a continuous output. Ensure your implementation handles the rate limit of 60 requests per minute to maintain efficient throughput for high-volume call center applications.
How do I monitor my API usage?
Visit the /get-api-key/ page to view your balance, trial status, characters left, and usage history. Request metadata, including time, characters, and status, is kept for billing purposes. This dashboard provides transparent tracking of your character consumption and spending without requiring external monitoring tools.
First request
curl
curl https://api.vs98.info/v1/audio/speech \
-H "Authorization: Bearer $TTS_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model":"tts-1","voice":"aria","input":"Hello from the API.","response_format":"mp3"}' \
--output hello.mp3Python (openai)
from openai import OpenAI
client = OpenAI(base_url="https://api.vs98.info/v1", api_key="tts-...")
with client.audio.speech.with_streaming_response.create(
model="tts-1", voice="nova", input="Hello from Python.", response_format="mp3"
) as response:
response.stream_to_file("hello.mp3")Node.js (openai)
import OpenAI from "openai";
import fs from "node:fs";
const client = new OpenAI({ baseURL: "https://api.vs98.info/v1", apiKey: process.env.TTS_API_KEY });
const res = await client.audio.speech.create({ model: "tts-1", voice: "milo", input: "Hello from Node.js." });
fs.writeFileSync("hello.mp3", Buffer.from(await res.arrayBuffer()));| voice | |
|---|---|
aria | female |
nova | female |
luna | female |
sage | female |
felix | male |
milo | male |
atlas | male |
orion | male |
| language | |
|---|---|
ar | العربية |
zh | 中文 |
da | Dansk |
nl | Nederlands |
en | English |
fi | Suomi |
fr | Français |
de | Deutsch |
el | Ελληνικά |
he | עברית |
hi | हिन्दी |
it | Italiano |
ja | 日本語 |
ko | 한국어 |
ms | Bahasa Melayu |
no | Norsk |
pl | Polski |
pt | Português |
ru | Русский |
es | Español |
sw | Kiswahili |
sv | Svenska |
tr | Türkçe |
Authentication and Keys
Access the VoxSynth API using a single active bearer token issued upon account creation. Each account maintains one primary key; authentication is handled via the standard Authorization: Bearer <key> header in every request to https://api.vs98.info/v1.
API Key Generation
Retrieve your API key from the /get-api-key/ dashboard after signing in via Google or email. The key is displayed immediately and must be stored securely in your environment variables or configuration files.
Bearer Token Usage
Include the header Authorization: Bearer tts-... in all HTTP requests. The token authenticates your account and tracks usage against your balance and rate limits.
Key Rotation Policy
Issue a new key at any time from the dashboard. The previous key stops working immediately upon generation, ensuring secure access control without downtime.
- Old key invalidates instantly upon new key creation
- No pending grace period for revoked keys
Basic Request Example
To generate speech, send a POST request to the /v1/audio/speech endpoint. The API returns a binary audio file directly in the response body, allowing straightforward integration into existing call center workflows without complex parsing.
cURL Command Example
Use the following command to test the endpoint. Replace YOUR_API_KEY with your credentials from the dashboard.
- curl -X POST https://api.vs98.info/v1/audio/speech \
- -H "Authorization: Bearer YOUR_API_KEY" \
- -H "Content-Type: application/json" \
- -d '{"model": "tts-1", "input": "Hello world", "voice": "nova"}'
Python Requests Library
The standard requests library handles the response as binary data. This approach is efficient for IVR systems that need to stream audio files directly to telephony hardware.
- import requests
- response = requests.post("https://api.vs98.info/v1/audio/speech",
- headers={"Authorization": "Bearer YOUR_API_KEY"},
- json={"model": "tts-1", "input": "Test", "voice": "nova"})
- with open("output.mp3", "wb") as f:
- f.write(response.content)
JSON Body Structure
The request body requires the model, input text, and voice parameters. Optional fields like language and speed allow fine-tuning of the synthetic audio output.
OpenAI SDK Integration
The VoxSynth API adheres to the OpenAI speech endpoint schema, allowing direct integration using standard OpenAI Python SDKs. By overriding the base URL, your existing call center infrastructure can utilize familiar libraries without custom wrappers.
This compatibility ensures rapid deployment for IVR systems. Developers can leverage official SDK features while maintaining strict compliance with our character-based pricing and rate limits.
Base URL Configuration
Set the client's base_url to https://api.vs98.info/v1 and provide your tts-... API key. This redirects requests to our inference engine while preserving the standard request structure.
Ensure the environment variable or client configuration correctly points to this endpoint to avoid routing errors during high-volume IVR calls.
- Base URL:
https://api.vs98.info/v1 - Auth Header:
Authorization: Bearer tts-... - Compatible with OpenAI Python SDK
SDK Version Compatibility
The official OpenAI Python SDK works seamlessly with our endpoint. No proprietary client is required, allowing you to use the same codebase for multiple TTS providers if needed.
Standard SDK methods for audio generation are fully supported, ensuring predictable behavior across different Python environments used in your call center software.
- Works with official OpenAI Python SDK
- No custom library required
- Standard HTTP request structure
Parameter Mapping
Map your text input to the input field and select a voice from the 8 available presets. The model field accepts tts-1 or tts-1-hd, both using the same engine.
Speed and language parameters map directly to the API’s requirements. Note that the language field is optional but recommended for non-English Latin script text to ensure accurate synthesis.
- Model:
tts-1ortts-1-hd - Input: text up to 4096 characters
- Voice: 8 presets (e.g., aria, felix)
Audio Format Options
The API returns audio in four distinct formats to suit varying infrastructure needs. Each format is selected via the response_format field in the JSON request body.
MP3 Compression
MP3 provides efficient compression with minimal quality loss, making it ideal for reducing bandwidth usage in high-volume IVR deployments.
WAV Lossless Quality
WAV delivers uncompressed, high-fidelity audio suitable for quality assurance testing or systems requiring raw PCM data without decoding overhead.
OPUS and FLAC Support
OPUS offers superior compression for web-based applications, while FLAC provides lossless compression for archival purposes. Select the format that aligns with your storage and playback constraints.
Error Handling
The API returns specific HTTP status codes to indicate failure conditions, allowing your integration to handle errors gracefully. Failed synthesis requests are free, ensuring that erroneous calls do not impact your billing balance. Understanding these error states is critical for maintaining stable call center operations and IVR workflows.
Rate Limit Errors
Requests exceeding 60 per minute return a 429 status. New accounts start with a 10 requests per minute limit until the first top-up. Exceeding these limits requires implementing exponential backoff in your Python clients to prevent request storms.
- Status 429 indicates quota exhaustion
- New accounts: 10 requests/minute
- Post-top-up: 60 requests/minute
Invalid Voice IDs
The API rejects requests with voice identifiers not present in the /v1/voices endpoint. Ensure your application uses only the eight supported presets: aria, nova, luna, sage, felix, milo, atlas, and orion. Using an unsupported voice results in a 400 Bad Request error.
- Verify voice IDs before sending
- Eight presets supported
- Unsupported IDs return 400
Input Text Length Limits
Each request supports a maximum of 4096 characters, including spaces and punctuation. Text exceeding this limit must be split into multiple requests by your application logic. The generated audio files must then be joined to create the final output.
- Max 4096 characters per request
- Spaces count toward limit
- Split and join logic required for long text

Rate Limits and Throttling
VoxSynth enforces a standard rate limit of 60 requests per minute per API key. This threshold supports steady-state IVR traffic and bulk audio generation.
60 Requests Per Minute
The limit applies uniformly to all authenticated requests. Exceeding this threshold results in a 429 status code, indicating temporary saturation.
- Limit is per key, not per IP.
Initial Limit for New Accounts
New accounts start with a reduced limit of 10 requests per minute. This restriction applies until the first top-up is processed, ensuring initial load stability.
Queue Processing Behavior
Requests are processed sequentially. Under heavy load, synthesis may wait in a queue before generation begins. Typical processing speed is roughly real-time, but queue delays can extend total latency for large batches.
- Sequential processing ensures consistent resource allocation.
Voice Parameter Configuration
Configure voice parameters to ensure synthetic audio meets your IVR or call center requirements. The API supports two model tiers that share the same engine and pricing structure, allowing you to select the appropriate quality level without complex migration steps.
Speed Adjustment Range
Adjust playback speed between 0.25 and 4.0 to optimize speech clarity for different user demographics or system constraints. Slower speeds may improve comprehension for non-native speakers, while higher speeds reduce latency in high-volume IVR flows.
- Minimum speed: 0.25x
- Maximum speed: 4.0x
- Default speed: 1.0x
Language Code Specification
Specify the language using an ISO code to ensure accurate synthesis, especially for Latin-script texts that are not English. While the API guesses the language from the script (defaulting to English), explicit specification prevents errors for languages like Arabic, Chinese, or Japanese.
- Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
Model Selection
Choose between 'tts-1' and 'tts-1-hd'. Both models use the same underlying engine and incur identical character-based charges. Select 'tts-1-hd' if you require the higher fidelity output; both models use the same engine and incur identical charges.
- tts-1: Standard quality
- tts-1-hd: High definition quality
- Same price for both models
Advanced Usage Patterns
High-volume call centers often process scripts exceeding the 4,096-character limit. Efficient synthesis requires splitting long texts into valid segments and reassembling the resulting audio files without noticeable gaps or timing errors.
Proper batching ensures that your IVR system maintains low latency while adhering to the 60 requests-per-minute rate limit. Strategic queuing prevents timeouts during peak call traffic periods.
Long Text Splitting
Split input text into chunks of up to 4,096 characters. Each chunk generates a separate audio file. Ensure boundaries do not break mid-sentence to maintain natural flow in IVR responses.
Audio Joining Logic
Concatenate the generated audio files sequentially. Since requests are processed sequentially under load, you may need to add small buffers to smooth transitions between segments in the final playback stream.
Batch Processing Strategies
Group independent text segments into batches to maximize throughput. Monitor the 60 requests per minute limit per key. New accounts start with 10 requests per minute until the first top-up.
Use the OpenAI SDK by changing the base URL to https://api.vs98.info/v1. This allows you to leverage existing Python libraries while maintaining compatibility with the standard JSON body structure.
- Calculate total characters before splitting to estimate processing time.
- Implement retry logic for temporary queue delays.
- Rotate API keys if one key becomes a bottleneck for critical IVR flows.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Their softer or deeper tones create a less intrusive listening experience, encouraging higher completion rates for lengthy question sets.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- LibriVox public-domain audiobooks
- IETF RFC 7845: Ogg Opus
- Tether (USDT)
- Creative Commons Attribution 4.0
- OpenAI API reference: create speech
- TRON developer hub: TRC-20
- W3C WAI: making audio and video accessible
- openai-python on GitHub
- LibriTTS-R paper (arXiv 2305.18802)
- Python documentation
- LibriTTS-R corpus (OpenSLR 141)
