Frequently asked questions
Does it support streaming?
No streaming is available. You send a POST request and receive the complete audio file in the response. There is no WebSocket or real-time partial audio support. You must wait for the synthesis to finish before downloading or playing the file.
What is the latency?
Typical speed is roughly real time, about 25 characters of text per second of generation. Short phrases take a few seconds. Requests are processed sequentially, so under load a request may wait in a queue before processing begins.
Can I send audio back?
Yes, the API returns the generated audio file directly in the response. You can choose formats like MP3, WAV, OPUS, FLAC, or PCM. The audio is not stored on our servers; it is returned immediately for your use.
How do I split long texts?
Split your input text into parts of up to 4096 characters per request. Generate audio for each part individually, then join the resulting audio files. This ensures each request stays within the character limit for a single synthesis job.
Is the SDK official?
No official SDK is provided by PlayTQTQ. However, the endpoint shape matches the OpenAI speech endpoint. You can use the official OpenAI SDKs by changing the base_url to https://api.playtqtq.com/v1 and using your API key.
What about webhooks?
Webhooks are not supported. The API is synchronous; you send a request and wait for the response containing the audio file. There is no background processing notification system. You must poll or handle the response directly in your workflow.
Can I batch requests?
You can send multiple requests, but requests are processed sequentially. Under load, a request may wait in a queue. Rate limits apply per key: 60 requests per minute after top-up, or 10 per minute initially. Process them sequentially or in parallel as your infrastructure allows.
Is JSON required?
Yes, the request body must be JSON. It includes fields like model, input, voice, response_format, and speed. The endpoint expects a standard JSON structure compatible with the OpenAI speech endpoint format for easy integration with existing tools.
How do I debug errors?
Check the HTTP status code and response body for error details. Failed requests are free, and charges are returned in full if synthesis fails. Ensure your API key is valid and your text does not exceed 4096 characters.
What is the max text length?
The maximum input text length is 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 generate audio for each chunk separately.
Does it support SSML?
No SSML support is available. You provide plain text input. There are no phoneme dictionaries or custom pronunciation lexicons. You cannot use SSML tags to control pacing, pitch, or emphasis within the text payload.
Can I use custom voices?
No custom voice cloning is offered. You must choose from the 8 preset voices: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, or Orion. These are based on licensed recordings and cannot be modified or cloned by customers.
How do I test endpoints?
Use the curl example provided on the /get-api-key/ page. Send a POST request to https://api.playtqtq.com/v1/audio/speech with your Bearer token and JSON body. Check the GET /v1/voices endpoint to verify available voices and languages before generating audio.
Is documentation versioned?
The API version is v1. We maintain backward compatibility within this version for all endpoints and parameters.
First request
curl
curl https://api.playtqtq.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.playtqtq.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.playtqtq.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
Authentication for the PlayTQTQ API relies on a single active Bearer token per account. Include this key in every request header as Authorization: Bearer tts-.... This token grants access to the speech generation endpoint and usage tracking.
Bearer Token Usage
Pass your API key in the Authorization header for all requests. The format is Authorization: Bearer YOUR_API_KEY. Ensure no extra spaces or quotes surround the token to avoid 401 errors.
- Header name: Authorization
- Prefix: Bearer
- Value: Your unique API key
Generating Your API Key
Sign up on the /get-api-key/ page using Google or email. Your unique API key appears immediately on the dashboard alongside your balance and usage stats.
- Supports Google or email signup
- Key visible on dashboard
- Starts with 'tts-'
Revoking and Renewing Keys
You can issue a new key at any time. The previous key stops working instantly upon generation of the new one, ensuring immediate security control.
- One active key per account
- Instant revocation
- Generate new key anytime
Quickstart with cURL
Generate audio with a simple cURL command. Send your script to the speech endpoint and receive an MP3 file ready for YouTube editing.
Set the voice, language, and format directly in the request. The API handles synthesis and returns the binary audio data for immediate download.
Basic Text-to-Speech Request
Use this command to generate speech. Replace YOUR_API_KEY with your key from /get-api-key/. The response body contains the audio file.
```bash curl -X POST https://api.playtqtq.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "aria", "response_format": "mp3"}' \ --output speech.mp3 ```
- Endpoint: POST /v1/audio/speech
- Auth: Bearer token in header
- Returns binary audio data
Setting Voice and Language
Specify a voice from the 8 presets (e.g., aria, nova, felix). For non-English Latin text, set the language parameter to avoid incorrect auto-detection.
```bash curl -X POST https://api.playtqtq.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Bonjour le monde", "voice": "nova", "response_format": "mp3", "language": "fr"}' \ --output speech.mp3 ```
- Voices: aria, nova, luna, sage, felix, milo, atlas, orion
- Languages: 23 supported, set explicitly for clarity
Specifying Output Format
Choose mp3, wav, opus, flac, or pcm. MP3 is recommended for YouTube due to small file size and universal compatibility.
The response header includes Content-Type: audio/mpeg (or corresponding format) to help your script save the file correctly.
- Supported: mp3, wav, opus, flac, pcm
- Recommended: mp3 for video editing
Using the OpenAI SDK
The API follows the same request shape as OpenAI’s speech endpoint, allowing you to use official SDKs by simply changing the base URL. This compatibility means you can switch providers without rewriting your core logic.
Changing the Base URL
Point your SDK client to https://api.playtqtq.com/v1 instead of the default OpenAI endpoint. This directs all requests to PlayTQTQ’s infrastructure while maintaining the standard JSON body structure.
Installing the Python SDK
Install the official OpenAI Python package using pip. This library provides the necessary tools to construct requests and handle audio responses efficiently.
- Run:
pip install openai
Code Example for Speech Generation
Initialize the client with your API key and the custom base URL. Send a POST request with your text, voice selection, and desired format to receive the audio file directly.
Request Parameters
Configure your synthesis requests by defining the model, input text, and playback speed. These three parameters control the engine selection, character limits, and temporal pacing of the generated audio.
Model Selection (tts-1, tts-1-hd)
Both tts-1 and tts-1-hd use the same underlying engine and incur identical pricing. Select either model based on your preference for voice characteristics; the API processes them identically.
Input Text Limit (4096 Chars)
Each request accepts a maximum of 4,096 characters. This limit includes spaces and punctuation. For longer YouTube scripts, split the text into chunks, synthesize each part, and join the resulting audio files.
Speed Control (0.25–4.0)
Adjust the speaking rate using the speed parameter, which accepts values between 0.25 and 4.0. A value of 1.0 represents normal speech. Faster speeds can reduce generation time for long narrations, while slower speeds may improve clarity for complex instructional content.
Response Formats
The API returns raw binary audio data, allowing you to save the file directly to your local drive or pipe it into your video editing pipeline. You control the output format by setting the response_format parameter in your request.
MP3, WAV, Opus, FLAC, PCM
Select the format that best fits your workflow. MP3 is ideal for web use, while WAV and FLAC provide lossless quality for professional editing. PCM offers raw uncompressed data, and Opus provides efficient compression for smaller file sizes.
Binary Audio Response
The response body contains the raw audio bytes, not a JSON object. This allows direct writing to disk or immediate streaming into media players without parsing overhead.
Content-Type Headers
The response includes a Content-Type header indicating the selected format (e.g., audio/mpeg, audio/wav). Use this header to ensure your client handles the file correctly.

Rate Limits and Queues
Your API key allows 60 requests per minute. This limit applies to the key itself, so ensure you use a single active key to maximize throughput. Each request consumes one unit of your allowance, regardless of the text length or voice selected.
60 Requests Per Minute
The standard rate limit is 60 requests per minute. This allows for steady generation of narration clips for video editing workflows. If you exceed this limit, you will receive a 429 Too Many Requests error.
- Limit is per API key, not per account.
10 Requests Before Top-Up
New accounts without a top-up are limited to 10 requests per minute. This allows you to test the API and verify voice quality before committing to a larger batch or payment. Once you add funds via USDT (TRC-20), the limit increases to 60 requests per minute.
- Top-up via USDT (TRC-20) is required to increase the limit.
Queue Behavior Under Load
Requests are processed sequentially. If you send multiple requests rapidly, they may wait in a queue. This can increase latency, especially for longer texts. Expect a delay of a few seconds for short phrases, and roughly real-time speed for longer narrations.
Error Handling
If synthesis fails, the charge is returned in full, so you are not billed for errors. This applies to any request that does not successfully generate audio, ensuring you only pay for usable output.
Understanding standard HTTP codes helps you troubleshoot quickly. Most issues are resolved by checking your key or request body.
Failed Request Refunds
Any request that fails to produce audio is free. The system returns the credit immediately, so you can retry without penalty. This ensures you only pay for successful generations.
Common HTTP Error Codes
Use these codes to identify issues quickly. 401 indicates an invalid or expired API key. 429 means you have exceeded the rate limit of 60 requests per minute. 400 suggests a malformed request body or invalid parameters.
Handling Timeouts
Long texts may take time to process. If you receive a timeout, simply retry the request. Failed requests are free, so repeated attempts do not increase your cost.
Documentation FAQ
This FAQ addresses common technical questions for YouTube creators integrating our TTS API. It clarifies limitations and workflows to help you build reliable narration pipelines.
You can find full parameter details in the previous sections. Use this guide for quick decisions on streaming, SDKs, and error handling.
Does it support streaming?
No. The API returns the complete audio file only after synthesis finishes. You cannot receive partial audio chunks in real-time.
What is the latency?
Generation takes roughly real-time speed (25 characters per second). Short phrases take a few seconds; longer texts may queue under load.
Can I send audio back?
The response contains the binary audio file directly. You can save it as MP3, WAV, Opus, FLAC, or PCM based on your response_format choice.
How do I split long texts?
Split your input into chunks of 4,096 characters or less. Synthesize each part separately, then join the resulting audio files in your editor.
Is the SDK official?
We do not provide an official SDK. Use the standard OpenAI Python SDK by pointing it to our base_url with your API key.
What about webhooks?
Webhooks are not supported. The API is synchronous; you send a request and wait for the response containing the audio file.
Can I batch requests?
The API handles one request per call. For multiple texts, send sequential requests or split one long text into multiple 4,096-character chunks.
Is JSON required?
Yes, the request body must be valid JSON containing model, input, voice, and other optional parameters like speed or language.
How do I debug errors?
Check the HTTP status code. Failed requests are free and refunded. Ensure your key is valid and your text does not exceed character limits.
What is the max text length?
The input field supports up to 4,096 characters per request. For longer scripts, split the text into multiple requests.
Does it support SSML?
No. The API uses plain text input. There is no support for SSML tags, phoneme dictionaries, or custom pronunciation lexicons.
Can I use custom voices?
No. You choose from 8 predefined voice presets (e.g., Aria, Felix, Luna). Custom voice cloning or uploading your own voice is not offered.
How do I test endpoints?
Use the cURL examples in the Quickstart section. Verify your key works by sending a short test text and checking the audio response.
Is documentation versioned?
The current version is v1. The endpoint remains stable. If changes occur, they will be announced on the site.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. This style helps retain viewer attention by reducing the 'read-aloud' fatigue often associated with standard TTS.
23 languages
Any voice speaks any of these languages.
