Frequently asked questions
What is the base URL for the API?
The API base URL is https://api.playtha555.cc/v1. You send POST requests to https://api.playtha555.cc/v1/audio/speech for speech synthesis. Other endpoints like /v1/voices and /v1/models are also available at this base path. Ensure your client targets this specific domain for all interactions.
How do I authenticate my requests?
Include your API key in the Authorization header as a Bearer token. The format is Authorization: Bearer tts-.... You obtain this key when signing up on /get-api-key/. Each account has one active key; issuing a new one immediately invalidates the old one.
Can I use the OpenAI SDK with this API?
Yes, the request shape matches the OpenAI speech endpoint. You can use official OpenAI SDKs by changing the base_url to https://api.playtha555.cc/v1 and providing your site-specific key. This allows seamless integration into existing workflows without rewriting client code.
What is the maximum character limit per request?
The input field accepts up to 4096 characters per request. Spaces and punctuation count toward this limit. For longer texts, split the content into chunks of 4096 characters or fewer and join the resulting audio files after synthesis.
How do I specify the audio format?
Use the response_format field in your JSON body. Supported formats are mp3, wav, opus, flac, and pcm. Choose the format that best suits your production pipeline. The default behavior depends on your client configuration, but explicit specification is recommended.
How does the speed parameter work?
The speed parameter accepts values between 0.25 and 4.0. It adjusts the playback speed of the generated audio. A value of 1.0 is normal speed. Lower values slow down the speech, while higher values accelerate it, useful for fitting specific durations.
What happens if I exceed the rate limit?
The limit is 60 requests per minute per key. Before the first top-up, it is 10 requests per minute. Exceeding this may cause requests to wait in a queue or return errors. Requests are processed sequentially, so load can increase latency.
How do I handle long texts for voice over?
Split your text into parts of up to 4096 characters. Send each part in a separate request to the /v1/audio/speech endpoint. After receiving the audio files, join them in your production pipeline. This ensures compliance with character limits while maintaining continuity.
Is the API key reusable?
Yes, the key remains active until you issue a new one. You can generate a new key at any time via your account page. When a new key is issued, the old one stops working immediately. This allows for easy rotation or revocation.
How do I list available voices?
Send a GET request to /v1/voices. This endpoint returns information about available voices, languages, formats, and pricing. It provides the list of eight presets including aria, nova, luna, sage, felix, milo, atlas, and orion, along with their characteristics.
What is the difference between tts-1 and tts-1-hd?
Both tts-1 and tts-1-hd use the same engine and price. The distinction is purely in the model identifier. There is no difference in cost or processing speed between the two options. You can use either based on your preference or SDK defaults.
How do I set the language manually?
Include the language field with an ISO code in your request. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, always set the language field to ensure accuracy.
What audio formats are supported?
The API supports mp3, wav, opus, flac, and pcm. Specify the desired format using the response_format parameter. Each format serves different use cases, from web delivery to high-quality archival. The audio files contain an inaudible watermark marking them as synthetic.
How do I interpret error codes?
Standard HTTP status codes indicate success or failure. Failed requests are free, and charges are returned in full if synthesis fails. Check the response body for details. Rate limit errors occur if you exceed 60 requests per minute. Other errors indicate invalid parameters or keys.
First request
curl
curl https://api.playtha555.cc/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.playtha555.cc/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.playtha555.cc/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
Authentication for the Sonix TTS API relies on a single active API key per account, issued upon registration via Google or email. This key grants access to all endpoints, including voice listing and model details, ensuring a straightforward integration workflow for agency production pipelines.
API Key Format
Your API key is a string prefixed with tts- (e.g., tts-abc123...). It is displayed on your dashboard alongside your balance and usage statistics. Keep this key secure, as it is the sole credential for your account’s request quota.
- Keys are generated automatically during sign-up.
- Each account maintains one active key at a time.
- Keys do not expire unless revoked or replaced.
Bearer Token Usage
Include your key in the Authorization header of every request using the Bearer scheme. The format is Authorization: Bearer tts-<your_key>. This header is required for all POST and GET requests to the API base URL.
Key Revocation
You can issue a new key at any time from your dashboard. The previous key stops working immediately upon generation of the new one, ensuring no overlap or confusion. This allows instant invalidation if a key is compromised or if you rotate credentials between development and production environments.
- New keys invalidate old ones instantly.
- Revocation is immediate with no grace period.
Endpoint: /v1/audio/speech
The /v1/audio/speech endpoint accepts a POST request to synthesize text into audio. It mirrors the OpenAI speech endpoint structure, allowing agencies to use existing OpenAI SDKs by simply adjusting the base URL to https://api.playtha555.cc/v1. This ensures immediate compatibility with your current pipeline without rewriting client logic.
POST Method Overview
Send your request to https://api.playtha555.cc/v1/audio/speech with a JSON body containing your parameters. The API processes requests sequentially, so longer texts may queue during high load. Each request synthesizes up to 4096 characters, returning a single audio file upon completion.
JSON Body Structure
The request body requires four mandatory fields: model, input, voice, and response_format. You may optionally specify speed (0.25–4.0) and language (ISO code). The model field accepts either "tts-1" or "tts-1-hd", both using the same engine and pricing tier.
- model: "tts-1" or "tts-1-hd"
- input: text string (max 4096 chars)
- voice: one of 8 presets (e.g., aria, atlas)
- response_format: mp3, wav, opus, flac, or pcm
- speed: float between 0.25 and 4.0
- language: optional ISO 639 code
Response Format
A successful response returns the audio file directly in the body with the specified response_format header. If synthesis fails, you receive a standard error JSON object, and the character count is not deducted from your balance. Failed requests are free.
Request Parameters
The API accepts tts-1 or tts-1-hd as model identifiers, both using the same engine and price tier. This simplifies integration since no code changes are required when upgrading quality, allowing agencies to standardize their request structures across different production pipelines.
Input text is capped at 4,096 characters per request. For longer documentary scripts, split the text into chunks and join the resulting audio files. Each character, including spaces and punctuation, counts toward the 1 million characters per $10 rate.
Model Selection (tts-1 vs tts-1-hd)
Both models use identical synthesis engines and pricing. Choose tts-1 for standard throughput or tts-1-hd for higher fidelity without altering your billing or integration logic. This uniformity ensures consistent pipeline behavior regardless of quality preference.
Since the underlying engine is the same, latency and character processing rates remain consistent. This predictability is crucial for automated video editing workflows where timing estimates must remain stable across different quality settings.
- -
tts-1: Standard quality, same price as HD - -
tts-1-hd: High-definition audio, same price - - No code changes needed to switch models
- - Identical processing latency for both tiers
Input Text Limit
Each request accepts up to 4,096 characters of input text. This limit applies to the raw string sent in the input field. Exceeding this limit will result in an error, so ensure your client-side logic handles text splitting appropriately before submission.
Longer documents should be divided into segments. Generate audio for each segment separately and concatenate the files in your pipeline. This approach maintains audio quality and ensures reliable processing, even for lengthy narration scripts.
- - Maximum 4,096 characters per request
- - Spaces and punctuation count as characters
- - Split long texts into smaller chunks
- - Concatenate audio files post-generation
Voice Preset Selection
Select from 8 licensed voice presets, including female voices like Aria and Nova, and male voices like Felix and Milo. Each voice is optimized for specific tones, such as documentary narration or conversational prompts, ensuring consistent audio output.
Voices are based on licensed recordings from LibriTTS-R and LibriVox. All generated files include an inaudible watermark indicating synthetic speech. Choose voices that match your documentary’s tone, such as Atlas for neutral news or Orion for deep documentary styles.
Every voice can speak all 23 supported languages. If the language field is omitted, the system guesses the language based on the script, defaulting to English for Latin text. Explicitly set the language code for non-English Latin-script text to ensure accuracy.
- - 8 voice presets available
- - Supports 23 languages
- - Inaudible watermark in all audio
- - Language auto-detection defaults to English
Audio Format Options
The API supports five distinct audio formats, allowing agencies to balance file size against quality needs. Each format serves a specific workflow requirement, from quick web previews to archival-grade master files.
Selecting the right format ensures efficient storage and playback. The system returns the audio file directly in the response body, ready for immediate integration into your editing pipeline or content management system.
MP3 Compression
MP3 is an efficient format for web delivery and general use. It offers compression while maintaining acceptable audio quality, making it suitable for embedding voiceovers in online videos or applications where bandwidth is a concern.
This format is suitable for high-volume automated pipelines where file size impacts storage costs and loading speeds.
- - Supports variable bitrates for optimal compression
- - Ideal for web streaming and mobile apps
WAV Lossless Audio
WAV provides uncompressed audio data. This format preserves the full fidelity of the synthesized voice, ensuring no quality degradation occurs during generation. It is a common choice for professional editing environments.
Use WAV when you plan to apply further audio effects, crossfade, or mix the voiceover with other tracks in your post-production software.
- - Zero data loss
- - Compatible with all major NLEs
FLAC and OPUS Support
FLAC offers lossless compression, reducing file size compared to WAV without sacrificing audio quality. OPUS provides high-quality lossy compression, suitable for modern streaming contexts and efficient archival storage.
These formats allow you to retain quality while minimizing storage overhead. OPUS is useful for applications where network efficiency is critical.
- - FLAC: Lossless compression
- - OPUS: High-efficiency lossy format
Speed and Language Settings
Adjust the playback speed to fit your video timeline or to reduce token usage. The API accepts values between 0.25 and 4.0, allowing precise synchronization of narration with visual pacing without requiring external audio editing tools.
Language handling ensures accurate synthesis by either specifying an ISO code or relying on script detection. This flexibility supports multi-episode documentary series where voice consistency matters across different linguistic segments.
Speed Range (0.25–4.0)
Set the speed parameter to alter generation time and audio duration. Values below 1.0 slow the voice, while values above 1.0 accelerate it. This is useful for matching voice-over length to specific video cuts.
- Minimum speed: 0.25
- Maximum speed: 4.0
- Default speed: 1.0
Language Code Specification
Explicitly set the language parameter using ISO 639-1 codes (e.g., de for German, ja for Japanese) to ensure correct pronunciation. This is critical for texts in Latin script that are not English, preventing default English pronunciation errors.
- Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
Auto-Detection Logic
If the language field is omitted, the system guesses the language based on the text script. Latin script defaults to English. For non-English Latin text (e.g., French or German), always specify the language code to avoid incorrect accents.

Example Requests
The API accepts standard JSON payloads to generate audio files. You can use any OpenAI-compatible SDK by pointing the base URL to https://api.playtha555.cc/v1 and supplying your Bearer token. This ensures seamless integration into existing automation pipelines without custom library dependencies.
Below are concrete examples for generating speech using common tools. These snippets demonstrate the minimal required fields: model, input text, and voice preset. Adjust parameters like speed or format as needed for your documentary workflow.
cURL Command Example
Send a POST request with your API key and text payload. The response returns the audio file directly in the response body.
```bash curl -X POST https://api.playtha555.cc/v1/audio/speech \ -H "Authorization: Bearer tts-your-api-key" \ -H "Content-Type: application/json" \ -d '{ "model": "tts-1", "input": "The documentary series explores historical events.", "voice": "atlas", "response_format": "mp3" }' \ -o output.mp3 ```
Python SDK Example
Use the official OpenAI Python SDK, configuring the base URL to point to our infrastructure. This approach simplifies error handling and authentication management for Python-based scripts.
```python import openai client = openai.OpenAI( base_url="https://api.playtha555.cc/v1", api_key="tts-your-api-key" ) audio = client.audio.speech.create( model="tts-1", voice="atlas", input="The documentary series explores historical events.", response_format="mp3" ) audio.write_to_file("output.mp3") ```
Node.js SDK Example
Integrate TTS generation into Node.js applications by setting the custom base URL. This allows you to handle audio files within server-side logic.
```javascript const { OpenAI } = require("openai"); const client = new OpenAI({ baseURL: "https://api.playtha555.cc/v1", apiKey: "tts-your-api-key" }); const audio = await client.audio.speech.create({ model: "tts-1", voice: "atlas", input: "The documentary series explores historical events.", response_format: "mp3" }); audio.write_to_file("output.mp3"); ```
Error Handling
The API returns standard HTTP status codes to indicate request outcomes. A 200 OK response confirms successful synthesis, while 4xx errors indicate client-side issues such as missing authentication or invalid input. These responses include a JSON body detailing the error type and a human-readable message to help you debug integration issues quickly.
For persistent issues, check your request payload against the documented schema. If the error persists, verify that your API key is active and has not been revoked.
Common HTTP Errors
Use standard HTTP codes to handle integration logic. A 401 Unauthorized error means your Bearer token is invalid or missing. A 400 Bad Request indicates malformed JSON or missing required fields like 'input' or 'voice'.
A 500 Internal Server Error suggests a temporary issue on our end. Retry if you encounter server-side errors.
- 401 Unauthorized: Invalid or missing API key.
- 400 Bad Request: Missing required fields or invalid JSON.
- 500 Internal Server Error: Temporary server issue, retry with backoff.
Rate Limit Errors
If you exceed 60 requests per minute, you receive a 429 Too Many Requests error. This limit applies per API key. Ensure your integration handles retries gracefully to avoid disrupting your production pipeline.
New accounts start with a lower limit of 10 requests per minute. Top-ups increase your capacity, but rate limits remain strict to ensure service stability for all users.
- 429 Too Many Requests: Exceeded 60 req/min.
- Check retry-after header for wait time.
- Limit applies per API key, not per IP.
Invalid Parameter Responses
The API validates input before processing. If 'model' is not 'tts-1' or 'tts-1-hd', a 400 error is returned. Similarly, if 'voice' is not one of the eight presets, the request fails.
Ensure 'input' does not exceed 4096 characters. If it does, split your text and join the resulting audio files as described in the integration guide.
Speed must be between 0.25 and 4.0. Values outside this range result in a validation error.
- Invalid 'model' value.
- 'input' exceeds 4096 characters.
- 'speed' outside 0.25–4.0 range.
Endpoints: /v1/voices and /v1/models
The /v1/voices and /v1/models endpoints provide essential metadata for integrating the TTS API into your production pipeline. These endpoints allow you to dynamically retrieve available voice presets, supported languages, and audio formats without hardcoding values.
Use /v1/voices to verify supported languages and /v1/models to confirm engine status. This helps you select a voice for documentary-style narration.
List Available Voices
Retrieve the full list of eight voice presets, their audio characteristics, and supported languages. This endpoint helps you match specific tonal requirements, such as 'deep, documentary' (orion) or 'warm, clear narrator' (aria), to your content strategy.
- Returns voice ID, name, gender, and description
- Lists all 23 supported languages
- Indicates default language behavior
Check Model Availability
Confirm the operational status of the tts-1 and tts-1-hd models. Both models use the same engine and pricing, so this endpoint is primarily useful for monitoring infrastructure health rather than differentiating features.
- Returns model ID and status
- Confirms tts-1 and tts-1-hd availability
- No additional feature differences
Fetch Pricing Data
Retrieve current pricing tiers and character limits directly from the API. This allows your billing dashboard to display accurate cost estimates ($0.01 per 1,000 characters) without manual calculations.
- Returns price per million characters
- Shows free trial credit status
- Displays current balance
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. 'sage' serves as a calm, instructional guide for educational documentaries.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- W3C WAI: making audio and video accessible
- Creative Commons Attribution 4.0
- Tether (USDT)
- curl documentation
- LibriTTS-R corpus (OpenSLR 141)
- LibriTTS-R paper (arXiv 2305.18802)
- IETF RFC 7845: Ogg Opus
- OpenAI API reference: create speech
- openai-node on GitHub
- LibriVox public-domain audiobooks
- FFmpeg documentation
