Frequently asked questions
What is the API endpoint?
Send POST requests to https://api.pinataz.cc/v1/audio/speech. The request body must be JSON containing the text, voice selection, and desired audio format. This endpoint handles all synthesis tasks for your application, returning the generated audio file directly in the response upon successful completion.
How do I authenticate in Python?
Include your API key in the Authorization header as a Bearer token. Use the format 'Authorization: Bearer tts-...'. Ensure your key is active and associated with your account. The key grants access to the API services, and you can issue a new key at any time if needed.
Which SDK should I use?
Use the official OpenAI Python SDK. Configure it by setting the base_url to https://api.pinataz.cc/v1. The request shape matches the OpenAI speech endpoint, ensuring compatibility. No proprietary SDK is required, allowing you to leverage familiar tools and existing code structures for integration.
Can I change the base URL?
Yes, configure your SDK client to use https://api.pinataz.cc/v1 as the base URL. This directs requests to our infrastructure while maintaining the standard request format. You do not need to change the endpoint path or request body structure, only the base URL configuration in your client setup.
What are the rate limits?
The limit is 60 requests per minute per key. Before your first top-up, the limit is 10 requests per minute. Requests are processed sequentially, so under load, you may experience queueing. Monitor your usage to stay within these limits and ensure consistent performance for your assistive device applications.
How do I handle errors?
Check the HTTP status code and response body for error details. Failed requests are free: if synthesis fails, the charge is returned in full. Implement retry logic for transient errors. The API provides clear error messages to help you diagnose issues with input text, voice selection, or authentication.
What audio formats are supported?
Supported formats are mp3, wav, opus, flac, and pcm. Specify the desired format in the response_format field of your request. Each format serves different use cases, from web playback to high-fidelity recording. The API returns the audio file directly in the response for immediate use in your application.
How do I set the language?
Set the language parameter to an ISO code like 'en', 'es', or 'fr'. If omitted, the system guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly setting the language ensures accurate pronunciation and voice selection across the 23 supported languages.
Can I adjust the speed?
Yes, set the speed parameter between 0.25 and 4.0. This allows you to slow down speech for clarity or speed it up for efficiency. The default speed is typically suitable for most use cases, but adjusting it can optimize the listening experience for elderly users or specific assistive contexts.
What happens if I exceed limits?
Requests are processed sequentially, so exceeding the rate limit may cause your request to wait in a queue. This can increase latency, especially for long texts. Ensure your application handles potential delays gracefully. You can monitor your usage via the dashboard to stay within the 60 requests per minute limit.
Is the API synchronous?
Yes, the API is synchronous. You send a request and wait for the audio file to be generated and returned. For long texts, split them into parts of up to 4096 characters and join the resulting audio files. This ensures reliable delivery of the synthesized speech.
Do I need to install extra libraries?
No, you only need the standard OpenAI Python SDK. Install it via pip. No proprietary libraries are required. The API uses standard HTTP requests, so you can also use any HTTP client library like requests if you prefer. This keeps your dependencies minimal and easy to manage.
How do I get my API key?
Sign up on /get-api-key/ using Google or email. The page displays your API key, balance, and usage statistics. Keys are unique per account. You can issue a new key at any time, which immediately invalidates the old one. Ensure you store your key securely for authentication.
What is the character limit?
Each request supports up to 4096 characters. For longer texts, split the input into smaller parts and join the audio files. Spaces and punctuation count as characters. This limit ensures efficient processing and consistent performance. Monitor your character usage to manage costs effectively, as pricing is based on character count.
First request
curl
curl https://api.pinataz.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.pinataz.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.pinataz.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 |
Get Your API Key
Pinataz Editorial provides a straightforward path to accessing our text-to-speech API, ensuring your assistive devices or elderly care software can speak with clarity. Getting started requires only a few minutes to configure your authentication credentials for reliable integration.
Sign up with Google
Navigate to the /get-api-key/ page and select the Google sign-in option. This method automatically provisions a free trial account with $0.50 of credit, valid for seven days. This trial provides approximately 50,000 characters for testing your hardware or software integration immediately.
Create email account
Alternatively, you can register using an email address and password. This standard account creation method does not include the initial trial credit. You will need to top up your balance using USDT on the TRON network to begin generating audio files.
Locate key in dashboard
Once registered, the dashboard displays your unique API key, which follows the tts-... format. This key is the sole credential required for authentication. You can issue a new key at any time, which instantly invalidates the previous one, ensuring secure access for your development environment.
- Key format: Bearer tts-...
- One active key per account
- Instant invalidation on rotation
First Request with cURL
Sending a text-to-speech request via cURL is a simple way to verify your integration. You post a JSON payload to the speech endpoint, providing the text, voice, and format preferences. The API returns the generated audio file directly in the response body, allowing immediate playback or storage.
This method requires no external libraries, making it ideal for quick validation of your API key and endpoint configuration before moving to a full SDK implementation in your Python application.
Basic POST command
Execute the following command, replacing YOUR_API_KEY with your credentials from the dashboard. The request targets the standard speech endpoint compatible with OpenAI SDKs.
```bash curl -X POST https://api.pinataz.cc/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello, this is a test for assistive devices.", "voice": "aria", "response_format": "mp3"}' \ --output speech.mp3 ```
- Ensure the endpoint URL matches
https://api.pinataz.cc/v1/audio/speech - Use
Bearertoken authentication with your unique key - Output is saved directly to a local file like
speech.mp3
JSON body structure
The request body is a standard JSON object. The model field accepts tts-1 or tts-1-hd, which share the same engine. The input field contains your text, limited to 4096 characters. Specify the voice preset and desired response_format (mp3, wav, opus, flac, or pcm).
Optionally include a language code (e.g., en, es) to override automatic detection, which defaults to English for Latin script text. The speed parameter accepts values between 0.25 and 4.0.
model: 'tts-1' or 'tts-1-hd'input: Text string (max 4096 chars)voice: One of 8 presets (e.g., 'aria', 'nova')response_format: 'mp3', 'wav', 'opus', 'flac', 'pcm'speed: Float 0.25–4.0language: Optional ISO code
Response handling
On success, the API returns an audio file in the specified format. Failed requests are free and return no charge. If the synthesis fails, the error response indicates the issue, such as an invalid voice or network error.
For assistive devices, handle the binary audio data directly. Ensure your application checks the HTTP status code before attempting to parse the audio payload, as errors will return JSON instead of audio bytes.
- Success returns the audio binary stream
- Failed requests incur no charge
- Check HTTP status for error handling
Using the OpenAI SDK
The OpenAI Python SDK works with Pinataz by redirecting its base URL. This allows you to use familiar methods without learning a new library. Simply install the standard package and point it to our API endpoint.
Authentication relies on a standard Bearer token. Pass your API key in the header, and the SDK handles the request format automatically. This ensures consistent behavior across your assistive device software.
Install the Python SDK
Install the official OpenAI library using pip. This provides the necessary classes for speech synthesis without requiring a custom client.
The package is lightweight and compatible with standard Python environments used in embedded devices.
- pip install openai
Set the base URL
Configure the client to target our infrastructure instead of OpenAI’s servers. This ensures your requests reach the Pinataz TTS engine.
Use the base_url parameter to direct traffic to https://api.pinataz.cc/v1.
- base_url="https://api.pinataz.cc/v1"
Authenticate with Bearer token
Pass your unique API key as a Bearer token in the authorization header. This key identifies your account and tracks usage against your balance.
Ensure the key is stored securely within your device or application configuration.
- Authorization: Bearer tts-...
Voice and Model Selection
Choosing the right voice and model ensures your assistive devices or elderly care software speak with clarity and consistency. Our API offers eight distinct voice presets, ranging from warm narrators to calm instructional tones, all capable of speaking any of our supported 23 languages.
Selecting between tts-1 and tts-1-hd allows you to balance quality and cost. Both models use the same underlying engine and voice presets, meaning your audio output remains consistent regardless of the model you choose for a specific integration.
Available voice presets
We provide eight voice presets designed for clear communication. Female voices include Aria (warm, clear narrator), Nova (bright, upbeat), Luna (soft, storytelling), and Sage (calm, instructional). Male options feature Felix (energetic, promo), Milo (friendly, conversational), Atlas (neutral, news), and Orion (deep, documentary).
Every voice can speak any of the 23 supported languages. If the language parameter is omitted, the system guesses the language based on the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly setting the language code is recommended.
- Aria: warm, clear narrator
- Nova: bright, upbeat
- Luna: soft, storytelling
- Sage: calm, instructional
- Felix: energetic, promo
- Milo: friendly, conversational
Model options: tts-1 and tts-1-hd
The API supports two model identifiers: tts-1 and tts-1-hd. Both utilize the same synthesis engine and voice presets, ensuring consistent audio characteristics across your application.
The primary difference lies in the pricing tier. Both models use the same engine and voice presets, but tts-1-hd has a different price than tts-1.
Choose tts-1 for cost-effective, high-volume deployments in assistive devices where standard quality suffices. Opt for tts-1-hd when premium audio fidelity is required for specific user interactions.
Same engine, different price
Both models draw from the same voice library and language capabilities. This uniformity means you can switch between tts-1 and tts-1-hd without changing your voice configuration logic.
Pricing is set at $0.01 per 1,000 characters. The specific model identifier you pass in the request determines the charge, but the generation process and output format remain the same.
This structure allows startups to optimize their operational costs by selecting the appropriate model based on the importance of audio quality for each specific feature in their elderly care or assistive device solution.
Audio Formats and Speed
The API returns audio in MP3, WAV, OPUS, FLAC, or PCM formats. Choose MP3 for efficient storage in assistive devices, or WAV for lossless quality during prototyping. Each format suits different hardware constraints and network conditions.
Adjust playback speed between 0.25x and 4.0x to match listener needs. Slower speeds aid comprehension for elderly users with cognitive impairments, while faster speeds reduce latency for quick alerts. The engine maintains clarity across this range.
Supported output formats
Select MP3 for compact storage, WAV for uncompressed quality, or OPUS for high efficiency. FLAC preserves lossless audio, while PCM provides raw data for direct hardware processing. Format choice impacts bandwidth and storage requirements.
All formats are returned as binary audio data within the API response. Ensure your integration handles binary payloads correctly to avoid corruption.
- mp3, wav, opus, flac, pcm
Speed range: 0.25 to 4.0
Set speed via the speed parameter (0.25–4.0). Lower values enhance clarity for users with hearing or cognitive challenges. Higher values accelerate delivery for time-sensitive notifications.
Speed adjustments do not alter voice characteristics, ensuring consistent brand identity across all assisted interactions.
Language code specification
Pass an ISO language code (e.g., 'en', 'es', 'de') to force pronunciation. Without it, the API guesses language from script, defaulting to English for Latin text.
Specify the code explicitly for non-English Latin scripts or mixed-language content to ensure accurate articulation and avoid mispronunciation in assistive contexts.
- Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish

Rate Limits and Queuing
Pinataz Editorial's TTS API enforces a standard rate limit of 60 requests per minute per API key. This capacity supports steady generation workflows for assistive devices and elderly care software without requiring complex throttling logic in your application layer.
60 requests per minute
The active key allows up to 60 synthesis requests within a one-minute window. This limit applies to the key itself, so ensure your integration respects this ceiling to avoid 429 Too Many Requests errors.
Initial limit of 10 requests
New accounts start with a reduced limit of 10 requests per minute. This restriction lifts automatically after your first top-up of at least $5 via USDT on the TRON network.
Queue behavior under load
Requests are processed sequentially. Under heavy load, a request may wait in a queue before synthesis begins. This ensures consistent audio quality but means generation time can increase during peak usage periods.
Handling Errors
The API returns standard HTTP status codes to indicate request outcomes. Understanding these codes helps you distinguish between temporary network hiccups and permanent configuration mistakes in your elderly care or assistive device software.
Common error codes
A 401 Unauthorized error occurs if the Bearer token is missing, invalid, or expired. A 429 Too Many Requests indicates you have exceeded the 60 requests per minute limit. A 500 Internal Server Error suggests a temporary backend issue, which is rare but requires a brief pause.
- 401: Invalid or missing API key
- 429: Rate limit exceeded (check your dashboard)
- 500: Temporary server error
Retry logic
Implement exponential backoff for 500 and 503 errors. Do not retry 401 or 400 errors, as they will fail repeatedly until the key or input is corrected. For 429 errors, wait until the rate limit window resets.
Character limit errors
Requests exceeding 4096 characters return a 400 Bad Request. Ensure your input text is split into smaller chunks before sending. Each chunk generates a separate audio file that must be concatenated later.
Long Text Chunking
The API enforces a strict 4096-character limit per request. For assistive devices reading long instructions or elderly care logs exceeding this length, you must split the text into smaller chunks. Each chunk generates a separate audio file, requiring client-side logic to manage the sequence.
Splitting logic should preserve natural pauses. Joining the resulting audio files ensures seamless playback. This approach maintains clarity for users relying on consistent speech patterns without waiting for a single large synthesis to complete.
4096 character limit
Each API call accepts a maximum of 4096 characters. This limit includes spaces and punctuation. If your input text, such as a detailed medication schedule or a long story, exceeds this threshold, the API will reject the request. You must divide the text into segments that fit within this boundary.
Splitting large texts
Divide your text at logical boundaries, such as sentence ends or paragraph breaks. This ensures that the generated audio segments maintain natural prosody. Avoid cutting mid-sentence to prevent awkward pauses in assistive reading applications. Process each segment as a separate POST request to the /v1/audio/speech endpoint.
- Identify split points before sending requests.
- Send each chunk independently.
- Track segment order for playback.
Joining audio files
Once you receive audio files for each chunk, concatenate them in the correct order. Use standard audio libraries to merge the files. This creates a single continuous stream for the end-user. Ensure that the format and speed settings match across all segments to maintain consistent voice quality.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Consistency in tone prevents jarring shifts between alerts and content.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- ISO 639 language codes
- TRON developer hub: TRC-20
- W3C WAI: making audio and video accessible
- LibriTTS-R corpus (OpenSLR 141)
- FFmpeg documentation
- Tether (USDT)
- Creative Commons Attribution 4.0
- LibriTTS-R paper (arXiv 2305.18802)
- Python documentation
- LibriVox public-domain audiobooks
- OpenAI API reference: create speech
