Frequently asked questions
What is the maximum text length per request?
You can send up to 4096 characters per request. Spaces and punctuation count toward this limit. If your text exceeds this length, you must split it into smaller parts. Each part generates a separate audio file that you can join later. This ensures reliable processing and avoids timeouts for longer scripts.
How do I specify a language explicitly?
Include the language field in your JSON body with the ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. Explicitly setting it is recommended for non-English Latin-script text to ensure accurate pronunciation and correct voice selection.
Can I use the OpenAI Python SDK with this API?
Yes. The endpoint matches the OpenAI speech endpoint shape. Change the base_url to https://api.playtk71.com/v1 and use your API key. The official OpenAI SDKs work directly without modification, allowing you to integrate TTS into your existing Python workflows seamlessly.
What is the difference between tts-1 and tts-1-hd?
Both models use the same engine and price. The only difference is the model identifier string you send in the request. There is no price or feature distinction between tts-1 and tts-1-hd in this API; they are functionally identical for your billing and generation needs.
How do I handle long texts exceeding 4096 characters?
Split your text into chunks of up to 4096 characters. Send each chunk as a separate request to the API. You will receive multiple audio files. You must then join these audio files together to create the final complete audio track for your project.
Is the API key shared across all users?
No. Each account has one active API key. You can issue a new key at any time, which immediately invalidates the old one. Keys are tied to your specific account on this site, ensuring secure and isolated access for your dubbing projects.
What happens if I send invalid JSON?
The request will fail. Failed requests are free, so you are not charged for the characters. The API returns an error response indicating the issue. You should check your JSON structure and retry the request once the syntax is corrected.
Can I stream the audio response?
No. The API returns the complete audio file in the response body. There is no streaming, WebSocket, or real-time partial audio support. You must wait for the full file to be generated and received before playing or processing it.
How do I get the list of available voices?
Send a GET request to /v1/voices. This endpoint returns details about all available voices, languages, formats, and pricing. You can use this information to select the correct voice preset for your dubbing project before sending your speech synthesis requests.
Is there a limit on concurrent requests?
Requests are processed one after another, so under load a request may wait in a queue. The rate limit is 60 requests per minute per key. Requests are processed sequentially, so parallel requests may experience delays during high traffic periods.
Do I need to encode the input text?
Send the text as a standard UTF-8 string in the JSON body. No special encoding is required beyond standard JSON formatting. Ensure your text fits within the 4096 character limit and does not contain unescaped control characters that might break the JSON structure.
How do I verify the audio format received?
Specify the response_format field in your request (mp3, wav, opus, flac, or pcm). The API returns the audio file in that exact format. You can verify the file type by checking the content type header or the file extension returned in the response.
Can I use a custom domain for the API?
No. The API base URL is fixed at https://api.playtk71.com/v1. You cannot change the domain or use a custom subdomain. All requests must be sent to this specific endpoint to ensure proper routing and authentication for your account.
Is there a webhook for completion notifications?
No. There is no webhook support for completion notifications. You must poll the API or wait for the synchronous response. The API does not push events to your server when a request is processed or completed.
First request
curl
curl https://api.playtk71.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.playtk71.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.playtk71.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 and keys
Start by creating your account at /get-api-key/ using Google or an email password. The dashboard displays your unique API key, current balance, and usage stats immediately upon login. This key is the single credential required for all API interactions across the platform.
Generate your API key
Your API key appears in the account dashboard as soon as you sign in. It starts with the prefix tts- and is unique to your account on playtk71.com. Keep this value secure, as it grants direct access to your voice synthesis credits and usage history.
- Keys are generated automatically upon account creation
- Only one active key exists per account at a time
- Keys can be rotated instantly via the dashboard
Bearer token format
Include your key in the HTTP header for every request. Use the standard Authorization header with the Bearer scheme. For example: Authorization: Bearer tts-xxxxx. This token authenticates your identity and links the generated audio credits to your specific account balance.
Key rotation policy
You can issue a new key at any time from the dashboard. When you generate a replacement, the previous key stops working immediately. This ensures that if a key is compromised, you can revoke access instantly without waiting for a manual approval process.
Speech endpoint details
The core of DubSync API is the speech generation endpoint. You send a POST request to https://api.playtk71.com/v1/audio/speech with your text payload. The service returns a binary audio file ready for immediate use in your dubbing projects.
This endpoint processes up to 4096 characters per request. For longer scripts, split your text into chunks and join the resulting audio files. Requests are processed sequentially, so queue times may occur during high load.
POST /v1/audio/speech
Send a POST request to the endpoint URL. Include your API key in the Authorization header. The request body must be valid JSON containing the necessary parameters for voice synthesis.
The endpoint accepts standard text inputs. It returns the synthesized audio file directly in the response body. Use the appropriate Content-Type header for your client library.
- Endpoint:
https://api.playtk71.com/v1/audio/speech - Method:
POST - Auth:
Bearer tts-...
JSON body structure
The request body is a JSON object. It includes the model identifier, the text input, the chosen voice, and optional parameters for speed and language. This structure mirrors the OpenAI speech endpoint.
Specify the input field with your script text. Set the voice to one of the eight available presets. Define the response_format for your desired audio codec.
model: "tts-1" or "tts-1-hd"input: string, max 4096 charactersvoice: one of 8 presetsresponse_format: mp3, wav, opus, flac, pcmspeed: 0.25–4.0language: optional ISO code
Required fields
You must provide the model, input, and voice fields. These are essential for the engine to generate the audio file correctly. Omitting any of these will result in a 400 error.
The model determines the quality tier. The input is your actual text content. The voice selects the specific preset for your project's tone and style.
model: Requiredinput: Requiredvoice: Required
Models and voices
The engine offers two model options, tts-1 and tts-1-hd, which share the same price point and underlying synthesis engine. This means you get identical audio quality and performance characteristics regardless of which model you select, simplifying your decision-making process during localization projects.
tts-1 and tts-1-hd options
Both models support the full range of voices and formats. Since the pricing and processing speed are identical, you can switch between them without cost implications or changes to your workflow.
8 voice presets available
Access eight distinct voice presets covering male and female tones. These voices are derived from licensed recordings, including LibriTTS-R and LibriVox public-domain audiobook readings, ensuring a professional sound for your dubbing needs.
- Female: aria, nova, luna, sage
- Male: felix, milo, atlas, orion
Voice selection by name
Select voices directly by their preset names in the voice parameter. Each voice has a specific character, from the warm narration of aria to the deep documentary tone of orion, allowing precise tonal matching for diverse localization scripts.
Response formats and codecs
DubSync API returns raw audio bytes directly in the response body, allowing you to pipe the output straight into your local storage or dubbing pipeline. You select the desired codec via the response_format field in your request, choosing from MP3, WAV, OPUS, FLAC, or PCM to match your project’s quality and size requirements.
MP3, WAV, OPUS, FLAC, PCM
Choose MP3 for compact, widely compatible files ideal for web playback or quick previews. Select WAV or FLAC for lossless, high-fidelity audio suitable for professional editing suites. OPUS offers efficient compression, while PCM provides uncompressed raw data for maximum flexibility in post-production.
- MP3: Standard compression, small file size.
- WAV: Lossless, high quality for editing.
- FLAC: Lossless, smaller than WAV.
- OPUS: Efficient compression codec.
- PCM: Raw uncompressed audio data.
Binary audio response
The API response body contains the binary audio data, not JSON metadata. When using the OpenAI SDK or a plain HTTP client, ensure you handle the response as a binary stream. This allows direct file writing without additional decoding steps, keeping your workflow fast and simple for large volume dubbing tasks.
Content-Type headers
The response includes a Content-Type header matching your requested format (e.g., audio/mpeg for MP3). This ensures your client library correctly interprets the binary data. Always check this header to handle different codecs dynamically in your automation scripts without hardcoding file extensions.
Speed and language parameters
Adjusting voice speed allows you to match the pacing of original video dialogue, ensuring your dubbing feels natural and synchronized. The API accepts a speed parameter ranging from 0.25 to 4.0, giving you precise control over delivery rate without altering voice quality.
For accurate synthesis, specify the language using an ISO code. While the system can guess the language from Latin script, explicitly setting it prevents errors for non-English texts, ensuring the correct voice preset applies to your localization project.
Speed range 0.25–4.0
Set the speed value between 0.25 and 4.0 to stretch or compress audio timing. This is critical for aligning TTS output with video clips in your editing timeline. Faster speeds may be useful for quick explainers, while slower rates improve clarity for complex technical content.
Optional ISO language code
Pass the language field (e.g., "en", "es", "ja") to force specific pronunciation rules. Although any voice can speak any of the 23 supported languages, explicit language codes ensure consistent accent and intonation, especially for nuanced scripts like Arabic or Chinese.
Auto-detection fallback
If you omit the language field, the API guesses the language from the text script. Latin script defaults to English. For other languages using Latin characters (e.g., German), always set the language code to avoid incorrect synthesis, as auto-detection may default to English. Note that Indonesian is not supported.

Rate limits and quotas
Efficient batching is key for freelancers processing dubbing scripts. Our API enforces a standard limit of 60 requests per minute per active key, ensuring stable throughput for your localization workflow.
60 requests per minute
Once your account is funded, you can process up to 60 synthesis requests every minute. This steady rate supports steady volume, though requests are processed sequentially and may queue under load.
10 requests before first top-up
New accounts start with a lower tier of 10 requests per minute. This allows you to verify integration with your trial credit before scaling up to the full 60 req/min capacity after your first USDT top-up.
Handling 429 errors
If you exceed the limit, the API returns a 429 Too Many Requests status. Implement simple exponential backoff in your script to retry after a short delay, ensuring you do not waste API calls or incur unnecessary charges for failed attempts.
Error handling and codes
When integrating DubSync API into your dubbing workflow, understanding error responses ensures your automation scripts handle failures gracefully without wasting credits. Most issues stem from invalid input or temporary rate limits.
Common HTTP status codes
You will primarily encounter 400 (Bad Request) if your JSON body is malformed or exceeds the 4096 character limit per segment. A 401 Unauthorized error indicates an invalid or expired Bearer token, while 429 Too Many Requests signals you have exceeded the 60 requests per minute quota.
- 400: Invalid JSON or character limit exceeded
- 401: Invalid API key
- 429: Rate limit exceeded (60 req/min)
- 500: Internal server error
JSON error response format
All errors return a JSON object containing an error key with a message field describing the issue. This structure allows your script to parse the specific cause, such as an unsupported voice name or a missing required input field, and log it clearly for debugging.
Retrying failed requests
For 429 errors, implement an exponential backoff strategy before retrying. Failed synthesis requests are free, so you do not lose credit if you retry after fixing a parameter. However, do not retry indefinitely on 500 errors; wait a few seconds and check your rate limit status.
Integration examples
Integrating DubSync API into your dubbing workflow is straightforward. Use standard HTTP clients or the OpenAI SDK by pointing to our base URL. This allows you to generate voiceovers for localization projects without custom parsers.
The API returns binary audio data directly. You can save the response to a file or stream it into your editing pipeline. Ensure your code handles the raw bytes correctly to preserve audio quality.
curl command example
Use this command to generate speech instantly. Replace YOUR_API_KEY with your secret key and adjust the model, voice, and input text as needed.
- curl -X POST https://api.playtk71.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "voice": "nova", "input": "Hello, this is a test."}'
OpenAI SDK configuration
The OpenAI SDK works seamlessly with our API. Simply configure the base URL to point to our service. This allows you to use familiar methods like client.audio.speech.create().
Ensure you pass your API key in the authorization header. The SDK handles the JSON serialization and binary response parsing efficiently.
- import OpenAI client = OpenAI(base_url="https://api.playtk71.com/v1", api_key="YOUR_API_KEY") speech_file = client.audio.speech.create( model="tts-1", voice="nova", input="Hello world" ).generate_to_file("speech.mp3")
Base URL adjustment
All requests must target our specific API base URL. This ensures compatibility with the endpoint structure and authentication methods.
Do not use the default OpenAI base URL. Update your client configuration to use https://api.playtk71.com/v1 for all speech synthesis requests.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Locators master cultural nuance while dubbing artists breathe soul into characters for global audiences.
23 languages
Any voice speaks any of these languages.
