Frequently asked questions
How do I get an API key?
Sign up on the /get-api-key/ page using Google or email plus password. The dashboard displays your active key, balance, and usage details. Each account holds one active key, which you can rotate at any time. New keys take effect immediately, invalidating the previous one.
What is the base URL for the SDK?
Use https://api.premium777.cc/v1 as your base URL. This allows official OpenAI SDKs to work by simply changing the base_url configuration. Send POST requests to /v1/audio/speech with your JSON body containing the model, input text, voice selection, and format preferences.
Which models are available?
Two models are available: tts-1 and tts-1-hd. Both use the same engine and pricing structure. Select either model in your request body. The choice does not affect the cost per character, which remains $10 per million characters regardless of the model selected.
How do I set the language?
Pass the optional language parameter with an ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language parameter to ensure accurate synthesis and avoid misinterpretation.
What are the rate limits?
The limit is 60 requests per minute per key. Before your first top-up, this limit is 10 requests per minute. Requests are processed sequentially, so under load, your request may wait in a queue. Monitor your usage via the dashboard to avoid throttling.
How do I handle errors?
Failed requests are free, and the charge is returned in full if synthesis fails. Check the response status code and message. Ensure your input text is under 4096 characters and your voice ID is valid. Use the dashboard to monitor usage and balance status.
Can I use the OpenAI SDK?
Yes, the API uses the same request shape as the OpenAI speech endpoint. You can use official OpenAI SDKs by changing the base_url to https://api.premium777.cc/v1. This allows seamless integration into existing pipelines without rewriting your client code or learning a new interface.
How do I split long texts?
Split input text into parts of up to 4096 characters per request. Generate audio for each part separately, then join the resulting audio files. This ensures each request stays within the character limit while allowing you to process longer documents or scripts effectively.
What happens if I exceed the limit?
Requests are processed sequentially. If you exceed the rate limit, your request may wait in a queue. The system may reject requests with a 429 error. Monitor your usage on the dashboard to stay within the 60 requests per minute limit.
Is the API key unique per account?
Yes, each account has one active key. You can issue a new key at any time, which immediately invalidates the old one. This ensures security and allows you to rotate credentials without downtime. The dashboard displays your current key and usage statistics.
How do I rotate my API key?
Issue a new key from the dashboard at any time. The new key becomes active immediately, and the old key stops working at once. This allows you to revoke access to compromised keys without affecting ongoing service. Use the new key in your requests.
What formats does the API support?
The API supports mp3, wav, opus, flac, and pcm response formats. Specify your preferred format in the request body. Every generated file carries an inaudible watermark that marks it as synthetic speech. Choose the format that best fits your voice assistant or chatbot pipeline.
How do I calculate character count?
Count all characters, including spaces and punctuation. The price is $10 per million characters, or $0.01 per 1,000 characters. Failed requests are free, so only successful generations incur charges. Monitor your usage and balance on the dashboard to track spending accurately.
Can I use custom voices?
No, the API offers eight preset voices: aria, nova, luna, sage, felix, milo, atlas, and orion. There is no custom voice cloning or uploading of your own voice. All voices are based on licensed recordings from LibriTTS-R and LibriVox public-domain audiobook readings.
First request
curl
curl https://api.premium777.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.premium777.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.premium777.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
Access the API by generating a key on the /get-api-key/ page. Each account receives one active key, which you must include in every request to authenticate your identity and track usage against your balance.
API Key Generation
Sign up with Google or email to create an account. The dashboard displays your unique key starting with tts-. Use this key to authorize your requests immediately.
Bearer Token Usage
Include your key in the Authorization header as a Bearer token: Authorization: Bearer tts-.... The API validates this token for every request to ensure you have sufficient balance.
Key Rotation
Generate a new key from the dashboard at any time. The old key stops working immediately, ensuring that if a key is compromised, access is revoked without delay.
Endpoints
The API exposes three primary endpoints for integrating text-to-speech into your conversational AI pipeline. These endpoints allow you to generate audio, discover available voice presets, and verify model capabilities without requiring complex setup steps.
Each endpoint follows standard REST conventions, making it easy to integrate with existing HTTP clients or SDKs. You can retrieve voice metadata, check available formats, and generate speech files in a single workflow.
Speech Generation
Send text to the /v1/audio/speech endpoint using a POST request. The API returns an audio file directly in the response body. Text is limited to 4,096 characters per request; longer texts must be split and concatenated by your application.
The endpoint supports multiple response formats including mp3, wav, opus, flac, and pcm. You can adjust the speaking speed between 0.25x and 4.0x. If synthesis fails, no charge is applied to your account balance.
- Endpoint: POST /v1/audio/speech
- Input: JSON body with text, voice, and format
- Output: Raw audio file or error JSON
Available Voices
Use GET /v1/voices to retrieve a list of all 8 available voice presets and their metadata. Each voice supports all 23 supported languages.
The response includes voice IDs, names, genders, and supported languages. This allows your application to dynamically populate voice selection menus for end-users without hardcoding voice names.
- 8 voice presets: aria, nova, luna, sage, felix, milo, atlas, orion
- Supports 23 languages
- Dynamic voice discovery via JSON response
Model Information
The GET /v1/models endpoint returns details about the available TTS models. Currently, two models are available: tts-1 and tts-1-hd. Both use the same underlying engine and pricing structure.
You can use either model identifier in your requests. The choice affects audio quality but not cost. Use this endpoint to verify model availability and configuration before making synthesis requests.
- Models: tts-1, tts-1-hd
- Same pricing and engine
- Endpoint: GET /v1/models
Request Parameters
Configure the core synthesis parameters to define how your text is converted into speech. Select the appropriate model and voice preset to match your assistant's personality, then choose a response format that integrates cleanly with your existing audio pipeline.
Model Selection
Choose between tts-1 for standard quality or tts-1-hd for higher fidelity. Both models use the same engine and pricing, allowing you to upgrade audio quality without changing your integration logic.
Voice Presets
Select from eight distinct voice presets, such as aria for warm narration or atlas for neutral news delivery. Each voice supports all 23 languages; set the language parameter explicitly for non-English Latin scripts to ensure accurate pronunciation.
- Female: aria, nova, luna, sage
- Male: felix, milo, atlas, orion
Response Formats
Output audio as mp3, wav, opus, flac, or pcm. MP3 offers the best balance of quality and file size for most voice assistant applications, while WAV provides uncompressed clarity for local playback.
cURL Example
Use cURL to test the speech generation endpoint directly from your terminal. This method requires no external libraries, making it ideal for quick validation of your API key and voice selection before integrating into your voice assistant pipeline.
Ensure your command includes the correct authentication header and a valid JSON payload. The endpoint returns the audio file directly in the response body.
Basic Request
Execute a POST request to the speech endpoint. Replace YOUR_API_KEY with your actual token from the dashboard. The command sends a simple text string to the TTS engine, which returns the generated audio file.
- Use
curl -X POSTfor the request method. - Target
https://api.premium777.cc/v1/audio/speech. - Include
-H "Authorization: Bearer YOUR_API_KEY". - Set
-H "Content-Type: application/json".
Headers
The Authorization header is mandatory for every request. It must contain your Bearer token issued from the /get-api-key/ page. Without this, the API returns a 401 error.
Content-Type should be set to application/json. This ensures the server correctly parses the text input and voice parameters in the request body.
- Authorization: Bearer tts-xxxxxxxxxx
- Content-Type: application/json
JSON Body
The body defines the synthesis parameters. Specify the model (tts-1 or tts-1-hd), the voice preset (e.g., aria), and the input text. The input must not exceed 4096 characters.
You can optionally set the response format (mp3, wav, opus, flac, pcm) and speed (0.25–4.0). The language is inferred from the script unless explicitly provided.
- model: "tts-1"
- input: "Hello, this is a test."
- voice: "aria"
- response_format: "mp3"
OpenAI SDK Integration
The OpenAI SDK simplifies integration by allowing you to redirect the base URL to our API endpoint. This enables direct use of standard SDK methods without custom HTTP clients.
Initialize the client with your API key and the adjusted base URL. This setup ensures compatibility with existing conversational AI pipelines built on the OpenAI ecosystem.
Base URL Configuration
Set the base URL to https://api.premium777.cc/v1. This redirects all SDK requests to our infrastructure while maintaining the standard request shape.
Client Initialization
Import the OpenAI SDK and instantiate the client using your tts-... API key. Pass the configured base URL during initialization to ensure all subsequent calls route correctly to Audiova’s speech endpoint.
Response Handling
The SDK returns an audio file directly. Handle the response as binary data or save it to disk. Since requests are processed sequentially, expect slight delays for longer texts due to queueing.

Rate Limits
Understanding rate limits ensures your voice assistant maintains responsive interactions without unexpected interruptions. Our API enforces strict quotas to maintain stability for all users, allowing you to plan your conversation flows accordingly.
Rate limits are applied per API key. If you exceed the limit, requests are rejected. Knowing these boundaries helps you optimize your TTS integration for seamless voice responses.
Standard Limit
Once your trial credit is used or your account is funded, the standard rate limit is 60 requests per minute per key. This allows for smooth, continuous voice generation in most conversational scenarios.
Pre-Trial Limit
Before the first top-up, new accounts are limited to 10 requests per minute. This ensures fair usage during the initial trial phase, which provides $0.50 of credit valid for 7 days.
Queue Behavior
Requests are processed sequentially. Under load, a request may wait in a queue before synthesis begins. This can introduce slight delays for long texts, as generation takes roughly 25 characters per second.
If you exceed the limit, you may receive a 429 Too Many Requests error. Implement exponential backoff in your chatbot logic to handle these retries gracefully.
- Implement retry logic with exponential backoff
- Monitor response times for queue delays
- Split long texts to reduce queue wait times
Error Codes
API errors indicate specific issues with your request or account status. Understanding these codes helps you debug integration issues quickly without waiting for support. Most errors are immediate and self-correcting with adjusted parameters or key rotation.
400 Bad Request
The request body is malformed or missing required fields. This usually happens when the input text exceeds 4096 characters or the voice parameter is invalid. Check your JSON structure and ensure all required fields are present.
- Verify
inputlength does not exceed 4096 characters - Ensure
voicematches one of the 8 available presets - Check that
modelis either 'tts-1' or 'tts-1-hd'
401 Unauthorized
The provided API key is invalid, expired, or missing. If you rotated your key recently, ensure the old one is no longer being used. A new key invalidates the previous one immediately.
- Confirm the key starts with 'tts-'
- Check if the key was rotated recently
- Ensure the Authorization header format is correct
429 Too Many Requests
You have exceeded the rate limit of 60 requests per minute (or 10 before the first top-up). Requests are processed sequentially, so under load, you may experience queuing delays. Reduce your request frequency or implement exponential backoff in your client logic.
- Limit to 60 requests per minute
- Implement exponential backoff strategies
- Monitor queue wait times for long texts
Best Practices
Optimize your conversational AI pipeline by managing character limits and language context efficiently. Proper handling of these parameters ensures consistent latency and accurate synthesis for voice assistants.
Handling Long Texts
Split input text into chunks of up to 4096 characters. Generate each part separately and join the resulting audio files. This approach prevents request timeouts and ensures reliable delivery for longer dialogues.
Language Specification
Explicitly set the language parameter for non-English Latin-script text. While the API guesses the language from the script, defaulting to English, explicit codes prevent mispronunciation in mixed-language conversations.
Audio Format Selection
Choose mp3 for general compatibility or opus for lower bandwidth usage. Select wav or flac if your voice assistant requires lossless quality. Avoid pcm unless raw byte processing is necessary.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. When building voice assistants, naturalness dictates user trust.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- openai-node on GitHub
- openai-python on GitHub
- ISO 639 language codes
- Creative Commons Attribution 4.0
- LibriTTS-R paper (arXiv 2305.18802)
- MDN: Web Speech API
- W3C WAI: making audio and video accessible
- Node.js documentation
- LibriTTS-R corpus (OpenSLR 141)
- curl documentation
- OpenAI API reference: create speech
