Frequently asked questions
How do I get an API key?
Sign up on the /get-api-key/ page using Google or email plus password. Your account page displays your active API key, balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the previous one, ensuring secure access to the BotVoice API.
Can I use the OpenAI Python SDK?
Yes, the official OpenAI SDKs work perfectly. Simply change the base_url to https://api.playuubd.com/v1 and use your BotVoice key. This allows you to use standard libraries without installing a custom SDK, making integration into your existing Python chatbot workflows straightforward and familiar.
What is the base URL?
The API base URL is https://api.playuubd.com/v1. You use this endpoint for all requests, including POST /v1/audio/speech for synthesis and GET /v1/voices for metadata. This structure mirrors the OpenAI speech endpoint, ensuring compatibility with standard HTTP clients and SDKs.
How do I handle rate limits?
The limit is 60 requests per minute per key, or 10 per minute before your first top-up. Requests process sequentially, so under load, they may queue. Monitor your usage on the account page to stay within limits and avoid delays in your voice assistant responses.
What audio formats are supported?
You can request audio in mp3, wav, opus, flac, or pcm formats. Specify your preferred format in the response_format field of your request. These options allow you to balance file size and quality according to your chatbot’s bandwidth and playback requirements.
How do I specify a language?
Pass an ISO language code in the language field. If omitted, the system guesses the language from the script, defaulting to English for Latin text. Explicitly setting the language ensures accurate synthesis for non-English Latin-script texts or when the script might be ambiguous.
What is the max input length?
Each request accepts up to 4096 characters of text. For longer texts, split the input into chunks of this size and join the resulting audio files. This ensures consistent performance and allows your application to handle long-form content like detailed chatbot responses or stories.
Do I need to install a special SDK?
No, you do not need a special SDK. We do not provide our own SDK; use the official OpenAI SDK or plain HTTP. You can use the official OpenAI SDKs or plain HTTP requests. Just update the base URL to our endpoint. This flexibility lets you integrate BotVoice API into any tech stack without vendor lock-in or extra dependencies.
How do I join multiple audio chunks?
Split your text into parts of up to 4096 characters, send each to the API, and receive separate audio files. Your application should then concatenate these audio files into a single stream. This approach handles long texts while staying within the per-request character limit.
Is the API RESTful?
Yes, the API is fully RESTful. It uses standard HTTP methods like POST for speech synthesis and GET for retrieving voices and models. You interact with it via JSON bodies and standard headers, making it easy to integrate with any REST-compatible client or framework.
How do I authenticate requests?
Include your API key in the Authorization header as Bearer tts-.... Each account has one active key at a time. Ensure you send this header with every request to the https://api.playuubd.com/v1 endpoint to authenticate and authorize your usage against your account balance.
What happens if synthesis fails?
If synthesis fails, the charge is returned in full. You are not billed for failed requests. This ensures you only pay for successfully generated audio files. You can retry the request or adjust parameters like speed or voice based on the error details provided.
Can I change the voice mid-sentence?
No, each request generates audio for a single voice preset. To change voices mid-sentence, you must split the text, generate separate audio files for each voice, and join them in your application. The API does not support dynamic voice switching within a single synthesis request.
Do you support SSML in requests?
No, the API does not support SSML. You send plain text in the input field. If you need pauses or emphasis, you can adjust the speed parameter or split text into separate requests. The API focuses on simplicity and direct text-to-audio conversion without markup complexity.
First request
curl
curl https://api.playuubd.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.playuubd.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.playuubd.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 |
Get your API key
Access the /get-api-key/ dashboard to create your account via Google or email. Once registered, you will see your active Bearer token, current balance, and a ready-to-use curl example for immediate testing.
Sign up on the dashboard
Navigate to the sign-up page to create your BotVoice API account. You can register using Google for instant access or via email and password. Each account is tied to this specific storefront instance.
Copy your Bearer token
Locate your unique API key on the dashboard. Use this value as the Authorization: Bearer <key> header in your requests. This single key authenticates all your API calls.
- Keys are displayed securely on the dashboard.
- One active key per account.
Regenerate keys if needed
You can issue a new key at any time from the dashboard. When you generate a new key, the old one stops working immediately, ensuring clean access control for your bot workflows.
First request with curl
To generate speech, send a POST request to https://api.playuubd.com/v1/audio/speech with your JSON payload and a Bearer token. The API returns the audio file directly in the response body, ready for immediate playback or storage in your chatbot’s voice pipeline.
This endpoint accepts text up to 4,096 characters per request. For standard voice synthesis, specify the tts-1 model and select one of the eight available voice presets to match your conversational tone.
POST to /v1/audio/speech
Direct your requests to the speech endpoint using the standard TTS structure. Ensure your Authorization header includes your unique Bearer token, which you can copy from the dashboard after signing in via Google or email.
- Endpoint:
POST https://api.playuubd.com/v1/audio/speech - Header:
Authorization: Bearer tts-... - Content-Type:
application/json
Include model and voice
Define the synthesis quality and speaker personality in the JSON body. Choose between tts-1 for standard efficiency or tts-1-hd for higher fidelity. Select a voice such as aria for a warm narrator tone or felix for energetic promo style.
model: "tts-1" or "tts-1-hd"voice: One of 8 presets (e.g., "nova", "atlas")input: Your text string (max 4,096 characters)
Receive audio file in response
The API processes your text and returns the synthesized audio file directly in the HTTP response. Depending on your specified response_format, the body contains binary data for mp3, wav, opus, flac, or pcm files, which you can save or stream to your user.
- Response format:
mp3,wav,opus,flac, orpcm - Status 200: Audio file returned
- Status 400/500: Error details in JSON
Using the OpenAI SDK
You can use the official OpenAI Python SDK to interact with BotVoice API without learning a new library. This allows your existing codebases to integrate voice generation seamlessly by simply pointing the client to our endpoint.
By overriding the base URL, you retain the familiar structure of the OpenAI SDK while accessing our specific TTS engine. This approach is ideal for chatbot teams who want a standard interface for their automated voice workflows.
Install the official OpenAI SDK
Install the latest version of the OpenAI Python package via pip. This provides the necessary classes and methods to handle API communication, including audio file parsing and retry logic.
Set base_url to our API endpoint
Configure the OpenAI client to use our API base URL instead of the default OpenAI endpoint. You must provide your Bearer token from the dashboard for authentication.
- Set
base_urltohttps://api.playuubd.com/v1 - Pass your key via the
api_keyparameter
Use standard SpeechClient methods
Call the audio.speech.create method just as you would for OpenAI. Pass your desired model, voice, and input text. The SDK handles the JSON request and returns the audio bytes or file.
Request parameters
Configure your synthesis request by selecting the engine, providing the source text, and choosing a voice preset. These three fields define the core behavior of the API call, ensuring the output matches your conversational AI needs.
model: tts-1 or tts-1-hd
Select either tts-1 or tts-1-hd. Both models use the same underlying engine and pricing structure, so you can switch between them without cost differences. Use tts-1-hd if you prioritize audio fidelity for high-quality voice assistants.
input: text up to 4096 chars
The input field accepts your text payload, limited to 4096 characters per request. Spaces and punctuation count toward this limit. For longer dialogues, split the text into chunks and join the resulting audio files sequentially to maintain context.
voice: one of 8 presets
Choose one of eight licensed voices based on recordings from LibriVox. Options include warm narrators like Aria, upbeat presenters like Nova, or neutral news anchors like Atlas. Every voice supports all 23 available languages, allowing flexible localization.
- Aria: warm, clear narrator
- Nova: bright, upbeat
- Luna: soft, storytelling
- Felix: energetic, promo
- Milo: friendly, conversational
- Atlas: neutral, news
Response formats
The API returns audio in five formats: mp3, wav, opus, flac, and pcm. Choose mp3 for efficient storage and web playback, or wav for lossless quality. Opus provides excellent compression suitable for efficient delivery.
Flac offers lossless compression for archival purposes, while pcm delivers raw uncompressed audio for immediate processing. All formats support the same speed and voice settings.
mp3: compressed audio
MP3 is the default format, offering a good balance between file size and quality. It is ideal for web applications and mobile bots where bandwidth matters.
Use MP3 when you need broad compatibility across players and devices. The file size is significantly smaller than WAV, reducing storage and transfer costs.
- Default choice for most integrations
- Small file size reduces bandwidth costs
- Widely supported by all audio players
wav: uncompressed audio
WAV provides lossless audio quality, preserving every detail of the synthesized speech. It is suitable for professional voiceovers or high-fidelity voice assistants.
Choose WAV when file size is less important than audio fidelity. The files are larger than MP3 but require no decompression artifacts.
This format is ideal for archival storage or further audio processing steps where quality must be preserved.
- Lossless audio quality
- Ideal for professional voiceovers
- Larger file size than MP3
opus: efficient streaming-ready
Opus is designed for efficient compression and low-latency delivery. It is suitable for real-time voice bots and interactive conversational AI applications.
The format balances quality and compression, making it suitable for live voice interactions where speed is critical.
Use Opus when you need to deliver audio quickly to users with minimal buffering delays.
- Optimized for low-latency delivery
- High compression efficiency
- Ideal for real-time voice bots

Rate limits and errors
BotVoice API enforces a standard rate limit of 60 requests per minute per API key. This limit applies uniformly to all requests, ensuring fair usage across the network. You can monitor your current usage and remaining quota directly from your account dashboard.
60 requests per minute
Your API key allows up to 60 synthesis requests every minute. If you exceed this threshold, subsequent requests will be rejected until the window resets. This limit helps maintain consistent generation speeds, especially during peak usage times.
10 requests before top-up
New accounts without a top-up are limited to 10 requests per minute. This lower cap applies until you add credits via USDT transfer. Once your balance is updated, your limit automatically increases to the standard 60 requests per minute.
Handle 429 Too Many Requests
When you exceed your rate limit, the API returns an HTTP 429 status code. Implement exponential backoff in your chatbot logic to retry requests after a short delay. Check the Retry-After header if provided to determine the optimal wait time.
- Return HTTP 429 when limit is reached
- Implement exponential backoff for retries
- Check
Retry-Afterheader for wait duration - Monitor usage via dashboard for proactive management
Handling long texts
To handle inputs longer than 4,096 characters, split your text into smaller chunks. Each chunk is processed independently by the TTS endpoint, ensuring that no single request exceeds the character limit while preserving the integrity of your audio output.
Split text into 4096 char chunks
Divide your source text into segments of up to 4,096 characters, including spaces and punctuation. This limit applies per request, so ensure your splitting logic respects this boundary to avoid errors.
Generate audio for each chunk
Send each segment to the POST /v1/audio/speech endpoint. The API returns an audio file for each chunk. Since requests are processed sequentially, longer texts may take time proportional to their length, roughly one second of audio per 25 characters of text, though short phrases may take a few seconds and queues may add delay under load.
Join audio files sequentially
Once all chunks are synthesized, concatenate the resulting audio files in the original order. This creates a single, continuous audio stream that matches your original text structure without gaps or overlaps.
Advanced settings
BotVoice API provides precise control over voice characteristics and output formats, allowing you to tailor the audio experience to your application’s specific needs. By adjusting speed and explicitly setting languages, you ensure consistent performance across diverse conversational flows.
Adjust speed from 0.25 to 4.0
You can modify the speaking rate using the speed parameter, accepting values between 0.25 and 4.0. This allows you to slow down complex instructions for clarity or speed up simple confirmations to reduce latency in voice interactions.
Set language ISO code explicitly
While the API guesses the language from the text script, setting the language parameter explicitly ensures correct pronunciation for Latin-script texts that are not English. This prevents misinterpretation and maintains natural intonation for languages like German or Dutch.
Choose output format via request
Select the response_format to match your client’s capabilities. Use MP3 for broad compatibility, WAV for uncompressed quality, or OPUS for efficient bandwidth usage. The API returns the audio file directly in the response, ready for playback or storage.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Design conversational flows that feel like a helpful colleague, not a robotic script, for our next voice interface update.
23 languages
Any voice speaks any of these languages.
