Frequently asked questions
What is the base URL for the API?
The API base URL is https://api.playq79.com/v1. You send POST requests to /v1/audio/speech to generate audio files. This endpoint accepts JSON bodies with your text, voice selection, and format preferences. Other endpoints, such as listing voices or models, are relative to this same base URL.
How do I generate an API key?
Sign up on the /get-api-key/ page using Google or an email and password. Accounts are per site. Once registered, your dashboard displays your active API key, current balance, and usage statistics.
Can I use the OpenAI Python SDK?
Yes, the official OpenAI SDKs work by changing the base_url to https://api.playq79.com/v1. You simply provide your ClarityCast API key as the authorization token. The request shape matches the OpenAI speech endpoint, allowing you to use standard libraries without custom client code.
What is the maximum character limit per request?
Each request supports up to 4096 characters of input text. If your text exceeds this limit, you must split it into smaller parts. Generate audio for each part separately, then join the resulting audio files to create a continuous playback experience for the user.
How do I set the voice parameter?
Specify one of the eight preset voices in the request body. Options include female voices (aria, nova, luna, sage) or male voices (felix, milo, atlas, orion). Each voice has a distinct tone, from warm narration to energetic promo styles.
Can I control the speaking speed?
Yes, you can adjust the speed between 0.25 and 4.0. This allows you to slow down audio for better comprehension or speed it up for quick updates. The default speed is 1.0. Adjusting speed does not affect the character count or pricing of your requests.
How do I specify the language?
Include an optional ISO language code in the request body. 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 explicitly to ensure accurate synthesis and avoid mispronunciation.
What response formats are available?
You can choose from mp3, wav, opus, flac, or pcm formats. Select the format that best fits your application’s playback requirements. MP3 is efficient for web delivery, while WAV and FLAC offer lossless quality. PCM provides raw audio data for specialized processing needs.
What happens if I exceed the rate limit?
The limit is 60 requests per minute per key. If you exceed this, requests may wait in a queue or fail. Before your first top-up, the limit is 10 requests per minute. Failed requests are free, so you are not charged for requests that do not complete successfully.
Is there a WebSocket endpoint?
No, there is no WebSocket endpoint or streaming support. Audio is generated synchronously and returned in the response body. You must wait for the full audio file to be ready before processing it.
Do I need to handle audio decoding?
You receive the audio file directly in the response body. If you choose formats like PCM, you may need to decode the raw bytes. For compressed formats like MP3 or Opus, standard media players can handle playback. No additional decoding libraries are strictly required for basic usage.
How do I detect errors in the response?
Check the HTTP status code of the response. A 200 OK status indicates success, while other codes signal errors. Failed requests are free, so you can retry without cost. Review the response body for specific error messages to diagnose issues like invalid parameters or network problems.
Can I use multiple API keys?
Each account has one active key. You can issue a new key at any time, which immediately invalidates the old one. This allows you to rotate keys for security or distribute usage across different projects by creating separate accounts, as accounts are per site.
How do I revoke an API key?
You can revoke the current key by issuing a new one from your dashboard. The old key stops working immediately upon generation of the new key. This provides instant revocation without waiting for a propagation period. You can generate a new key as often as needed.
First request
curl
curl https://api.playq79.com/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.playq79.com/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.playq79.com/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
ClarityCast uses a simple Bearer token for API authentication. Include your key in the Authorization header of every request to identify your account and track usage against your character limit.
Use Bearer token in Authorization header
Pass your API key as a Bearer token in the Authorization header. This standard method works with any HTTP client or SDK, ensuring secure and straightforward access to the TTS endpoint without requiring complex OAuth flows.
One active key per account
Each account maintains a single active API key. This simplifies management for accessibility teams, as you only need to track one credential across all your integration points, reducing the risk of unauthorized access from stale keys.
Revoke old keys instantly
If a key is compromised or no longer needed, issuing a new key immediately invalidates the previous one. The old key stops working at once, ensuring that any unauthorized usage ceases without waiting for a batch process.
First request with cURL
Once you have your API key, you can generate speech immediately using a simple command line tool. This section demonstrates the minimal viable request to convert text into an audio file, ensuring you understand the basic data flow before integrating into larger applications.
The process is straightforward: send a POST request to the speech endpoint with your authentication token and the text payload. The API processes the input and returns the synthesized audio directly in the response body.
POST to /v1/audio/speech
Direct your request to the endpoint https://api.playq79.com/v1/audio/speech. This URL is the core of the integration, accepting standard HTTP POST methods. Ensure you include your Bearer token in the Authorization header to validate your account and apply the correct rate limits.
- Use HTTPS for secure transmission.
- Include
Authorization: Bearer <your_key>header.
JSON body with model and input
The request body must be valid JSON containing the model, input, and voice fields. The input field accepts up to 4096 characters. You can choose between tts-1 and tts-1-hd; both use the same engine and pricing structure, so the choice depends on your quality preference rather than cost.
Example structure: ```json { "model": "tts-1", "input": "Hello, this is a test of the ClarityCast API.", "voice": "nova" } ```
model: "tts-1" or "tts-1-hd".input: Max 4096 characters.voice: Select from 8 presets.
Receive audio file in response
Upon successful processing, the API returns the audio file directly in the response body. The format matches the response_format you specified, such as mp3 or wav. If the synthesis fails, the request is free, and you will receive an HTTP error code detailing the issue, allowing you to retry or adjust parameters without incurring charges.
- Response includes binary audio data.
- Check HTTP status codes for errors.
- Failed requests incur no charge.
OpenAI SDK compatibility
ClarityCast’s API mirrors the OpenAI speech endpoint structure, allowing teams to reuse existing integrations with minimal code changes. This compatibility reduces engineering overhead for accessibility teams migrating from legacy providers or experimenting with new voice synthesis workflows for screen readers and audio books.
Change base_url to api.playq79.com
To route requests through our infrastructure, update your client configuration to point to https://api.playq79.com/v1. This single change directs traffic to our processing nodes while maintaining standard HTTP verbs and JSON payloads.
Use official OpenAI SDKs
You can utilize the official OpenAI SDKs for Python, Node.js, or other supported languages. By simply overriding the base URL, the SDK handles authentication and serialization exactly as it would for OpenAI services, ensuring a familiar developer experience.
Same request shape as OpenAI
The JSON body accepts model, input, voice, response_format, and speed fields identical to the OpenAI specification. This consistency means your existing code for sending text and receiving audio files works without modification, streamlining the transition for large teams managing multiple voice assets.
Available models
Our API offers two model variants that share the same underlying engine but differ in processing depth. Both tts-1 and tts-1-hd support all eight voice presets and 23 languages, ensuring consistent character limits and speed characteristics across the board.
Developers can switch between models to balance clarity and computational load without changing their integration logic. Since the request shape remains identical to the OpenAI standard, swapping the model name is often the only configuration change required.
tts-1: standard quality
The tts-1 model provides clear, natural speech suitable for most accessibility use cases. It processes text at roughly real-time speeds, making it ideal for generating audio books or screen reader alternatives for dyslexic users where latency matters but extreme fidelity is not critical.
- Supports all 8 voice presets
- Handles up to 4096 characters per request
- Compatible with all response formats
tts-1-hd: high definition quality
The tts-1-hd model applies additional processing to enhance audio fidelity. This is particularly useful for longer texts where subtle vocal nuances help maintain listener engagement and reading comprehension over extended periods.
The added quality does not impact the character limit or speed characteristics, which remain consistent with the standard model.
- Enhanced audio clarity
- Same character limit (4096 chars)
- Same speed characteristics
Same price for both models
Both models are billed at $0.01 per 1,000 characters, with spaces and punctuation counting toward the total. This flat rate structure simplifies cost forecasting for large teams, as you do not need to pay more for higher quality output.
Failed requests are free, ensuring you only pay for successful synthesis regardless of which model you selected for the request.
- $0.01 per 1,000 characters
- No price difference between models
- Failed requests are free
Response formats
Select the response_format parameter in your request to define the output container. Supported formats include mp3, wav, opus, flac, and pcm. This choice dictates how the synthesized audio is packaged for your application's playback engine.
mp3, wav, opus, flac, pcm
The API returns raw audio data in the specified container. MP3 offers efficient compression for web delivery, while WAV and FLAC provide uncompressed lossless quality. OPUS is efficient for low-bandwidth delivery, and PCM delivers raw linear audio for direct processing.
- mp3: Compressed, widely compatible
- wav: Uncompressed, high fidelity
- opus: Efficient for low bandwidth
- flac: Lossless compression
- pcm: Raw linear audio
Choose based on playback needs
Match the format to your client’s capabilities. For accessibility apps requiring precise waveform analysis, PCM or WAV may be preferable. For standard web players, MP3 or OPUS reduces bandwidth usage without sacrificing intelligibility for dyslexic users.
All formats supported
Every voice model supports all five formats equally. The audio engine processes the speech identically regardless of the output container, ensuring consistent quality across mp3, wav, opus, flac, and pcm responses.

Rate limits
Rate limits protect service stability during peak usage. Each API key allows 60 requests per minute, which is sufficient for most production workloads generating synthetic speech for accessibility tools.
When you first start, the limit is 10 requests per minute. This ensures fair usage while your account is being verified or top-up is processed.
60 requests per minute per key
Once your account is active and funded, you can make up to 60 requests per minute. This capacity supports continuous generation for large texts.
Requests are processed sequentially, so under heavy load, a request may wait in a queue. Plan your integration to handle potential delays gracefully.
- Sufficient for most accessibility and screen reader use cases
- Supports continuous generation for long texts
10 requests per minute initially
New accounts start with a lower limit of 10 requests per minute. This helps prevent abuse while ensuring the service remains responsive for all users.
The limit returns to 60 requests per minute once your balance is updated. The limit increases automatically within minutes after the transfer.
Limits increase after top-up
There are no monthly plans or seats. Your rate limit is tied directly to your account key and increases after a top-up.
The limit returns to 60 requests per minute once your balance is updated. This allows you to scale usage as needed without waiting for a billing cycle.
Error handling
When synthesis fails, you are not charged for the characters processed. The API returns a clear error response, ensuring your billing reflects only successful generations. This protects large teams from unexpected costs during debugging or when handling edge cases like unsupported characters or temporary queue delays.
You can rely on standard HTTP status codes to distinguish between client mistakes and server issues. Use these codes to implement robust retry logic in your accessibility pipelines, ensuring that screen reader users receive audio without unnecessary friction even when transient errors occur.
Failed requests are free
If the TTS engine cannot process a request due to a server error, the full amount is returned to your balance. You only pay for successful audio generation, making it safe to retry failed calls without worrying about inflating your character count or budget.
This policy applies to all models, including tts-1-hd. Whether you are generating short phrases for UI cues or long chapters for dyslexic readers, failed attempts do not incur a charge, preserving your credit for subsequent successful requests.
Standard HTTP error codes
The API uses standard HTTP status codes to indicate the nature of the error. Common codes include 400 for malformed requests and 401 for authentication issues. These codes help developers quickly identify whether the issue lies with the request format or the account status.
By adhering to these standards, you can integrate the TTS API into existing error-handling frameworks with minimal code changes.
Check response status
Always check the HTTP status code of the response to determine the outcome of your request. A 200 OK status indicates success, while other codes indicate specific issues that need to be addressed. This simple check can prevent silent failures in your audio generation pipeline.
Implementing a status check allows you to log errors accurately and trigger appropriate user notifications or retry mechanisms. This is particularly important for accessibility applications, where reliable audio output is crucial for the user experience.
For rate limit errors, you can implement exponential backoff to retry the request after a short delay. This ensures that your application remains responsive even under high load, providing a seamless experience for users relying on the generated audio.
- Always check the HTTP status code of the response to determine the outcome of your request.
- Implement a retry mechanism with exponential backoff for rate limit errors to ensure reliability.
- Log errors accurately to help diagnose issues and improve the user experience over time.
Long text handling
The API accepts up to 4096 characters per request. For longer content, divide the source text into chunks that respect this limit before sending them sequentially.
Each chunk returns a separate audio file. Your application must play these files in order to reconstruct the full narration without gaps.
Split text into 4096 character parts
Break your input string at word boundaries to avoid cutting words in half. Ensure each segment stays under 4096 characters, including spaces and punctuation.
- Count characters accurately; spaces and punctuation count toward the limit.
- Preserve paragraph structure if possible for better voice synthesis.
Join audio files sequentially
Receive each audio response immediately after submission. Concatenate the binary data or play them in sequence to maintain the narrative flow.
- Requests are processed one after another, so under load a request may wait in a queue.
- Handle each file as a complete segment of the whole.
Maintain natural pacing
Since requests are processed sequentially, longer texts may take time. The total generation speed is roughly real-time, ensuring consistent pacing across segments.
- Allow for queue time under load.
- Do not assume instantaneous completion for large texts.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. His consistent tone ensures that the data and facts remain the primary focus, making it easier for users to distinguish between information and interpretation.
23 languages
Any voice speaks any of these languages.
