Frequently asked questions
How do I get an API key?
Visit /get-api-key/ to sign up using Google or an email and password. Accounts created with email and password start without trial credit. Your account page displays your unique API key, balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the previous one.
What is the maximum text length?
Each request supports a maximum of 4096 characters in the input field. Spaces and punctuation count toward this limit. For longer texts, split your content into chunks of 4096 characters or fewer and join the resulting audio files.
Can I change the speed of the voice?
Yes, you can adjust the speed parameter between 0.25 and 4.0. This allows you to slow down narration for clarity or speed up content for brevity. The default speed is 1.0, providing natural pacing for most use cases.
How do I specify a language?
Include the optional language field with an ISO code. If omitted, the system guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly set the language to ensure accurate pronunciation and synthesis quality.
What is the tts-1 model?
The tts-1 model is one of two available engine options. It uses the same underlying engine and pricing as tts-1-hd. Choose this model for standard synthesis tasks where the HD variant’s specific nuances are not required.
What is the tts-1-hd model?
The tts-1-hd model is the second available engine option. It shares the same pricing and core engine as tts-1. Select this model if you prefer its specific audio characteristics, though both models are priced identically at $0.01 per 1,000 characters.
How do I handle long texts?
Split your text into parts of up to 4096 characters. Send each part as a separate POST request to the speech endpoint. Once you receive all audio files, join them together to create a continuous audio track for your users.
What is the response format?
You can specify the output format using the response_format field. Supported formats include mp3, wav, opus, flac, and pcm. The API returns the generated audio file directly in the response body according to your selected format preference.
Is the API RESTful?
Yes, the API is RESTful. You send POST requests to the speech endpoint and GET requests to list voices or models. It follows standard HTTP methods and JSON structures, making it easy to integrate with existing web applications and services.
Can I use this with JavaScript?
Yes, you can use the official OpenAI SDKs by changing the base URL to https://api.playhi89.com/v1. Alternatively, you can make standard HTTP requests using any JavaScript fetch library. This ensures compatibility with common JavaScript development environments and tools.
How do I rotate my API key?
You can issue a new API key at any time from your account page. When you generate a new key, the old one stops working immediately. This allows you to securely rotate credentials without downtime or complex configuration changes.
What happens if I exceed rate limits?
You are limited to 60 requests per minute per key. If you exceed this, requests may queue or fail. New accounts start with a 10 requests per minute limit until the first top-up is processed. Monitor your usage to avoid delays.
Are there any reserved characters?
The API accepts standard text input up to 4096 characters. Spaces and punctuation count toward the character limit. There are no specific reserved characters mentioned that would break the synthesis, so you can pass standard text directly in the input field.
How do I test the API?
Sign up with Google to receive $0.50 in free trial credit valid for 7 days. Accounts created with email and password start without trial credit. Use the provided curl example on your account page to send a test request. Failed requests are free, allowing you to verify integration without consuming your balance.
First request
curl
curl https://api.playhi89.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.playhi89.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.playhi89.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
Access the Public Voice API using a single active key per account. Keys are issued during sign-up on the /get-api-key/ page and appear in your dashboard alongside your balance and usage statistics. You can manage keys directly from this interface without needing external tools.
API Key format
Your API key is a string starting with the prefix tts-. It is unique to your account and grants full access to all endpoints. Keep this value secure, as anyone with the key can use your credit balance.
- Format:
tts-followed by alphanumeric characters - One active key per account
- Visible in your dashboard
Bearer token usage
Include your key in the HTTP header for every request. Use the standard Authorization: Bearer scheme followed by your key value. This method ensures compatibility with standard HTTP clients and the OpenAI SDK.
- Header:
Authorization: Bearer tts-... - Required for all endpoints
- Standard HTTP authentication
Key rotation
You can issue a new key at any time via your dashboard. When you do, the old key stops working immediately. This allows you to revoke access for a specific device or service without downtime for others using the new key.
- Generate new key from dashboard
- Old key invalidates instantly
- No service interruption
Endpoint overview
The Public Voice API provides three core endpoints to integrate speech synthesis into your applications. Use the speech endpoint to convert text into audio, and the voices and models endpoints to discover available options and parameters.
Speech generation
Send a POST request to /v1/audio/speech with your text and voice selection. The API returns an audio file in your chosen format, ready for playback or download.
List voices
Call GET /v1/voices to retrieve the full list of available voices, their associated languages, and supported audio formats. This helps you select the best voice for your accessibility or learning content.
List models
Use GET /v1/models to view the available synthesis models. Currently, both tts-1 and tts-1-hd use the same engine and pricing, giving you flexibility in your API calls.
Request parameters
Configure the synthesis parameters to match your accessibility or learning tool requirements. The API accepts standard JSON fields that control voice identity, text volume, and audio quality.
Model selection
Choose between tts-1 for standard quality or tts-1-hd for higher fidelity. Both use the same engine and pricing structure, so select based on your clarity needs.
Input text limit
Each request supports up to 4096 characters. For longer scripts, split the text into chunks, synthesize them separately, and join the resulting audio files.
Voice selection
Select one of eight presets. Female voices include aria (warm, clear narrator), nova (bright, upbeat), luna (soft, storytelling), and sage (calm, instructional). Male options are felix (energetic, promo), milo (friendly, conversational), atlas (neutral, news), and orion (deep, documentary).
Specify the language ISO code if your text uses Latin script but is not English, ensuring accurate pronunciation.
Response formats
The API returns audio files in the format you specify via the response_format parameter. Most integrations default to MP3 for its balance of quality and file size, making it ideal for web playback and mobile apps where bandwidth matters.
MP3 output
MP3 is the standard choice for most use cases. It provides good audio clarity while keeping file sizes manageable, which helps when generating large volumes of content for accessibility tools or learning modules.
WAV output
Choose WAV when you need uncompressed, high-fidelity audio. This format is useful for professional recording pipelines or when downstream systems require lossless audio without decoding overhead.
Other formats
You can also request Opus, FLAC, or PCM. Opus offers excellent compression for low-bandwidth scenarios. FLAC provides lossless compression without the file size of WAV. PCM returns raw audio data, suitable for direct processing in specialized audio software.
Rate limits
The Public Voice API enforces a standard rate limit of 60 requests per minute per API key. This cap is designed to ensure stable performance for NGOs and public sector teams generating audio for accessibility tools, preventing queue delays during bulk content creation.
60 requests per minute
Once your account is active, you can send up to 60 synthesis requests each minute. If you exceed this limit, subsequent requests will queue until the window resets. For most text-to-speech workflows, this capacity is sufficient to process standard document lengths without noticeable delay.
Initial limit
New accounts start with a lower threshold of 10 requests per minute. This initial limit helps maintain system stability before your first top-up. You can verify your current limits and usage metrics directly on your /get-api-key/ dashboard page.
Upgrade path
After you add funds via USDT (TRC-20), your rate limit automatically increases to the standard 60 requests per minute. There are no complex tiers or manual support tickets required. The upgrade happens within minutes after the transfer.

Error handling
When synthesis fails, you are not charged. This ensures you only pay for successful audio generation, protecting your budget during testing or network hiccups. Failed requests return a full refund to your balance.
The API provides clear feedback when inputs exceed limits or voices are invalid, allowing your integration to adapt gracefully without manual intervention.
Common errors
Ensure your text stays under 4,096 characters. If you exceed this, the request will fail immediately.
Check that your API key is correctly formatted as Bearer tts-.... A missing or invalid key returns a 401 error.
- Input text exceeds 4,096 characters
- Invalid API key or token expired
- Unsupported voice name or model
Status codes
400 Bad Request: Invalid JSON or missing required fields.
401 Unauthorized: Check your Authorization header.
429 Too Many Requests: You have hit the rate limit.
- 400: Invalid request body
- 401: Unauthorized
- 429: Rate limit exceeded
- 500: Internal server error
Retry logic
Implement exponential backoff for 429 and 500 errors. Wait briefly before retrying to avoid overwhelming the queue.
Failed requests are free, so aggressive retries on input errors are safe but unnecessary.
- Exponential backoff recommended
- Retry on 429 and 500 errors
SDK integration
The API mirrors the OpenAI speech endpoint, allowing you to reuse existing client libraries. This means you can integrate our service into your NGO’s accessibility tools without rewriting your entire backend infrastructure.
You only need to update the base URL to point to our API and supply your own API key. The request structure remains identical to what you already know.
OpenAI SDK setup
Install the OpenAI Python or Node.js library. No special package is required, just the standard client used for other TTS services.
Base URL change
Configure the client’s base_url to https://api.playhi89.com/v1. This redirects all speech requests to our processing servers while keeping the same request shape.
Ensure your authentication header includes your tts-... key. The SDK will handle the rest of the communication seamlessly.
Code example
Here is a minimal Python snippet using the OpenAI SDK to generate audio for a public announcement.
This example sends a short text string and saves the resulting MP3 file locally for immediate playback in your learning tools.
Curl example
Use curl to test speech generation directly from the terminal. This method is ideal for quick validation of your API key and voice settings without writing a full application.
You can also pipe text directly into the command to avoid creating temporary files for simple use cases.
Basic request
Send a POST request to the speech endpoint with your bearer token. Replace YOUR_API_KEY with your actual key and TEXT with the content you want converted.
This approach works well for short phrases or testing voice clarity before integrating into your NGO’s accessibility tools.
- Ensure your key starts with
tts- - Use the exact base URL: https://api.playhi89.com/v1
JSON body
Structure your request body with the required model, input, and voice fields. You can optionally set response_format to mp3 or wav, and adjust speed if needed.
The API accepts up to 4096 characters per request. For longer texts, split them into chunks and join the resulting audio files.
- model: "tts-1" or "tts-1-hd"
- voice: e.g., "aria", "nova", "felix"
- input: your text string
- response_format: "mp3" (default)
Response handling
A successful response returns the audio file directly in the body. Save this output to a file using > output.mp3.
If the request fails, check the status code and error message for details on rate limits or invalid inputs.
Remember that failed requests are free, so you can retry safely if needed.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Our platform streamlines grant management for NGOs and public service agencies.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- ISO 639 language codes
- LibriTTS-R paper (arXiv 2305.18802)
- Python documentation
- Tether (USDT)
- W3C WAI: making audio and video accessible
- FFmpeg documentation
- Node.js documentation
- LibriTTS-R corpus (OpenSLR 141)
- OpenAI API reference: create speech
- Creative Commons Attribution 4.0
- openai-node on GitHub
