Frequently asked questions
What is the API endpoint?
Send a POST request to https://api.playf65.com/v1/audio/speech with a JSON body containing your text and parameters. The endpoint accepts standard TTS parameters like model, voice, and response format. You can also list available voices and models via GET requests to /v1/voices and /v1/models respectively.
How do I get an API key?
Sign up on /get-api-key/ using Google or an email and password. Your account page displays your active API key, starting with 'tts-'. Each account has one active key; you can issue a new one at any time, which immediately invalidates the previous key.
Does it work with OpenAI SDK?
Yes, the request shape matches the OpenAI speech endpoint. Simply change the base_url to https://api.playf65.com/v1 and use your API key. The official OpenAI SDKs work directly without modification, allowing you to use familiar code structures for your text-to-speech integration.
What are the rate limits?
You are limited to 60 requests per minute per key. New accounts start with a lower limit of 10 requests per minute until the first top-up is processed. Requests are processed sequentially, so under load, your request may wait in a queue before synthesis begins.
How do I handle errors?
If synthesis fails, the request charge is returned in full. You should check the HTTP status code and response body for error details. Failed requests do not consume your character balance, ensuring you are not billed for unsuccessful audio generation attempts.
Can I use custom speeds?
Yes, you can adjust the speed between 0.25 and 4.0 using the speed parameter. This allows you to slow down narration for clarity or speed up content for quick updates.
What languages can I set?
You can set the language using an ISO code for 23 supported languages, including English, Spanish, French, German, Japanese, and Arabic. If omitted, the system guesses the language from the script, defaulting to English for Latin text. Explicitly setting it ensures accuracy for non-English content.
Is SSML supported?
No, SSML is not supported. The API accepts plain text input up to 4096 characters. You cannot use SSML tags for pronunciation or pauses. For precise control, rely on the available voice presets and speed adjustments to achieve the desired audio output.
Can I stream audio?
No, streaming or WebSocket support is not available. The API returns the complete audio file in the response after synthesis is finished. You must wait for the full file to be generated before receiving it, which typically takes time proportional to the text length.
How do I split long texts?
Split your text into parts of up to 4096 characters each. Send each part as a separate request to the API. Then, join the resulting audio files on your end. This approach ensures you stay within the character limit per request while generating longer content.
What is the character limit?
Each request can contain up to 4096 characters of input text. Spaces and punctuation count toward this limit. For texts longer than 4096 characters, you must split them into multiple requests and concatenate the resulting audio files to produce the final output.
How do I change my key?
You can issue a new API key from your account page at any time. When a new key is generated, the previous key becomes invalid immediately. This allows you to rotate keys for security without downtime, ensuring only your current key is active.
Is the API documented?
Yes, this documentation page provides the core details for integration. You can also retrieve available voices, languages, and formats via the GET /v1/voices endpoint. The request structure mirrors OpenAI’s speech endpoint, making it easy to find examples and understand the required parameters.
Are there client libraries?
There is no official SDK from Lexiconet. However, since the API matches the OpenAI speech endpoint shape, you can use the official OpenAI SDKs by changing the base_url. Plain HTTP requests also work perfectly for any programming language with standard HTTP client capabilities.
First request
curl
curl https://api.playf65.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.playf65.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.playf65.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
Secure your API access by generating a unique key in your account dashboard. Each account holds one active key, ensuring straightforward permission management without the complexity of scoped tokens or multi-user roles common in enterprise systems.
API key format
Your API key begins with the prefix tts- followed by a unique alphanumeric string. This identifier serves as your sole credential for authenticating requests to the API endpoints.
Bearer token usage
Include the key in the Authorization header of every HTTP request. Use the standard Bearer token format: Authorization: Bearer tts-xxxxxxxxxxxxxx.
Key management
You can issue a new key at any time from your dashboard. When you generate a new key, the previous one becomes invalid immediately, allowing instant revocation if needed.
Endpoints
The API exposes three core endpoints for integrating text-to-speech into your application. The primary speech endpoint accepts your text and configuration to generate audio files, while the voices and models endpoints provide metadata about available options.
Speech generation endpoint
Send a POST request to https://api.playf65.com/v1/audio/speech with a JSON body containing your text, selected voice, and desired format. The endpoint returns the audio file directly in the response, supporting formats like MP3, WAV, OPUS, FLAC, or PCM.
- Endpoint: POST /v1/audio/speech
Voices listing endpoint
Retrieve available voice presets, supported languages, and current pricing details by calling GET /v1/voices. This allows your application to dynamically populate voice selection menus based on the 8 available presets and 23 supported languages.
- Endpoint: GET /v1/voices
Models endpoint
Call GET /v1/models to list available model variants, specifically tts-1 and tts-1-hd. Both models use the same engine and pricing structure, allowing you to choose based on quality preferences without adjusting your billing logic.
- Endpoint: GET /v1/models
Request Parameters
Configure your synthesis requests by selecting a model, defining the input text, and choosing a voice preset. The API accepts standard parameters compatible with the OpenAI speech endpoint structure.
Model selection
Choose between tts-1 for standard quality or tts-1-hd for higher fidelity. Both models use the same engine and pricing structure.
Input text limits
Each request supports a maximum of 4096 characters in the input field. Spaces and punctuation count toward this limit. For longer content, split your text into chunks and join the resulting audio files.
Voice selection
Select one of eight voice presets via the voice parameter, such as nova for upbeat content or atlas for neutral news. Voices are based on licensed recordings from LibriTTS-R.
- Female: aria, nova, luna, sage
- Male: felix, milo, atlas, orion
Response Formats
The API returns audio files in the format specified by your response_format parameter. Each file is delivered directly in the response body, allowing immediate playback or storage without intermediate conversion steps.
MP3 output
MP3 is the default format, offering a balance between file size and compatibility. It works seamlessly with almost all web players and mobile applications, making it the safe choice for general-purpose integrations.
WAV output
Choose WAV for uncompressed, high-quality audio. This format is ideal for professional editing workflows or when you need lossless audio fidelity without additional decoding overhead.
OPUS and FLAC options
OPUS provides efficient compression for streaming or bandwidth-constrained environments, while FLAC offers lossless compression for archival quality. Select these formats when file size efficiency or perfect audio reproduction is prioritized over universal player support.
Rate Limits
The API enforces a rate limit of 60 requests per minute per key. This cap ensures stable performance and prevents any single account from monopolizing generation resources during peak usage.
60 requests per minute
Each API key is allowed a maximum of 60 requests within any one-minute window. This limit applies uniformly regardless of the model or voice selected, ensuring predictable throughput for your applications.
Initial limit for new accounts
New accounts start with a lower limit of 10 requests per minute. This restriction remains in place until you complete your first top-up. Once you add funds via USDT (TRC-20), your full 60 requests per minute capacity is unlocked.
Queue behavior
Requests are processed sequentially. If you exceed your limit or if many requests are submitted simultaneously, additional requests may wait in a queue. For long texts, generation takes roughly 25 characters per second, so plan your batching accordingly to avoid delays.

Code Examples
Integration is straightforward using standard HTTP clients or the OpenAI SDK. We support the same request shape as OpenAI, allowing you to swap the base URL and use your API key immediately. This ensures a smooth transition for developers already familiar with common TTS workflows.
Curl command example
Use this command to generate speech. Replace YOUR_API_KEY with your actual key and adjust the voice or model as needed.
- curl -X POST "https://api.playf65.com/v1/audio/speech" \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova", "response_format": "mp3"}' \ -o speech.mp3
OpenAI SDK integration
The official OpenAI SDKs work seamlessly by pointing to our base URL. Initialize the client with your key and the correct base_url to start generating audio files instantly.
Python script example
You can use requests or the openai Python package. Simply set the base URL to https://api.playf65.com/v1 and call the speech endpoint. This approach keeps your code clean and leverages existing library features.
Error Handling
Handling API errors is straightforward. The service returns standard HTTP status codes to indicate success or failure, allowing your application to distinguish between client-side issues (like missing fields) and server-side problems.
Common error codes
Use standard HTTP responses to diagnose issues. A 400 error indicates a malformed request or missing parameters, while a 401 error signals an invalid or expired API key. Rate limit errors (429) occur when you exceed 60 requests per minute. These codes help you adjust your integration logic immediately without guessing.
Retry logic
Implement exponential backoff for transient errors. Since requests are processed sequentially, temporary congestion may cause delays. Wait briefly and retry after receiving a 429 or 5xx error. Avoid rapid-fire retries, as the queue handles volume automatically. This approach ensures stability without overwhelming the server during peak usage times.
Failure refunds
If synthesis fails, the charge is returned in full. Failed requests do not count against your character limit, ensuring you are only billed for successfully generated audio. This policy protects your budget from unexpected API hiccups, allowing you to retry safely without worrying about wasting your prepaid credits on broken outputs.
Best Practices
Maximize reliability by splitting long texts into chunks of 4,096 characters or fewer. This ensures each request stays within limits and avoids truncation. Concatenate the resulting audio files to reconstruct the full narrative seamlessly.
Adjust the speed parameter between 0.25 and 4.0 to fit your project’s pacing needs. Slower speeds improve clarity for complex content, while faster rates reduce generation time for short phrases, though queue wait times may increase under load.
Text splitting strategy
Break input text into segments of up to 4,096 characters per request. This prevents payload limits and ensures consistent synthesis quality. Join the returned audio files sequentially to maintain narrative flow.
Use this approach for novels, tutorials, or long-form articles. It keeps individual requests lightweight and predictable, fitting well within the 60 requests per minute rate limit.
- Max 4,096 characters per
inputfield - Concatenate returned audio files sequentially
- Ensures consistent synthesis quality
Speed adjustment
Set the speed parameter between 0.25 and 4.0 to control playback rate. Use slower speeds (e.g., 0.75) for educational content or complex instructions to improve listener comprehension.
Higher speeds (e.g., 3.0) work well for short updates or repetitive text, reducing generation time. Note that processing is sequential, so higher volumes may still incur queue delays.
- Range: 0.25 to 4.0
- Optimal for clarity or brevity
- Adjust based on content type
Language detection
If the language field is omitted, the API guesses the language from the script. Latin script defaults to English, which may cause errors for other Latin-based languages like French or Spanish.
Always set the language parameter (e.g., "fr", "de", "ja") for non-English texts to ensure accurate voice selection and pronunciation, especially for languages with distinct scripts like Arabic, Greek, or Japanese.
- Default: English for Latin script
- Set explicitly for non-English Latin texts
- Supported: 23 languages including Arabic, Hindi, and Korean
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Use PCM if you need raw samples for further audio manipulation.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- Node.js documentation
- W3C WAI: making audio and video accessible
- Creative Commons Attribution 4.0
- LibriTTS-R paper (arXiv 2305.18802)
- Python documentation
- OpenAI API reference: create speech
- openai-node on GitHub
- LibriVox public-domain audiobooks
- IETF RFC 7845: Ogg Opus
- Tether (USDT)
- ISO 639 language codes
