Frequently asked questions
How do I get an API key?
Sign up on the /get-api-key/ page using Google or an email and password combination. Accounts are specific to this site. Once registered, your active API key is displayed on the account page, ready for immediate use in your integration requests.
What is the base URL for the API?
The API base URL is https://api.nbcasino.info/v1. You can send POST requests to /audio/speech and GET requests to /voices or /models using this base endpoint for all standard interactions with the text-to-speech service.
Can I use the OpenAI SDK?
Yes, the official OpenAI SDKs work seamlessly. Simply change the base_url to https://api.nbcasino.info/v1 and use your site-specific key. The request shape matches the OpenAI speech endpoint exactly, allowing for easy integration into existing codebases.
Which voices are available?
Eight presets are available: aria, nova, luna, and sage (female); felix, milo, atlas, and orion (male). Each voice supports all 23 listed languages. Voices are based on licensed recordings from LibriTTS-R and LibriVox public-domain audiobook readings.
What audio formats are supported?
Supported formats include mp3, wav, opus, flac, and pcm. You specify the desired format using the response_format field in your request body. The generated audio is returned directly in the response without being stored on our servers.
What is the rate limit?
The limit is 60 requests per minute per key. New accounts start with a limit of 10 requests per minute until the first top-up is completed. Requests are processed sequentially, so high load may cause queuing delays.
How do I handle failed requests?
Failed requests are free; if synthesis fails, the charge is returned in full. You should implement logic to catch API errors and retry or handle the failure gracefully, knowing that no credit will be deducted for unsuccessful attempts.
How do I split long texts?
Split input text into parts of up to 4096 characters each. Send each part as a separate request and join the resulting audio files client-side. This ensures compliance with the per-request character limit while processing longer content.
Is there a limit on text length?
Yes, each request supports up to 4096 characters. Spaces and punctuation count toward this limit. For texts exceeding this length, you must split the input into multiple requests and combine the generated audio segments in your application.
How do I authenticate requests?
Include your API key in the Authorization header as a Bearer token. The format is Authorization: Bearer tts-<your-key>. Ensure your key is active and correctly formatted to avoid authentication errors during your API calls.
What happens if I exceed my limit?
Requests are processed sequentially. If you exceed the rate limit, subsequent requests may wait in a queue. Monitor your usage to maintain smooth operation.
Can I regenerate my API key?
Yes, you can issue a new key at any time from your account page. The new key becomes active immediately, and the old key stops working at once. This allows you to revoke access without waiting for expiration.
Is there a developer dashboard?
The /get-api-key/ page serves as your dashboard. It displays your API key, current balance, trial status, characters remaining, usage history, and provides a ready-to-use cURL example for quick testing and integration verification.
How do I track usage?
Usage data, including time, character count, and status, is displayed on your account dashboard. Request metadata is kept for billing purposes. You can monitor your consumption and balance directly through the interface provided on the site.
First request
curl
curl https://api.nbcasino.info/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.nbcasino.info/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.nbcasino.info/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
Accessing the VoiceLoom TTS API requires a unique authentication key tied to your account. You can create an account immediately using your Google credentials or by registering with an email and password directly on the /get-api-key/ page.
This key is the sole credential needed for all API calls. It links to your billing balance, usage history, and rate limit tier, ensuring secure and trackable access to the synthesis engine.
Sign up with Google or email
Navigate to the sign-up page to create your account. You may choose Google OAuth for quick setup or standard email registration. Note that Google sign-ups include a $0.50 free trial credit, while email-only accounts start with zero balance.
Once registered, you are redirected to your dashboard where your credentials and usage metrics are displayed. This step is required before making any API requests to the endpoint.
Locate your API key
After signing in, your API key is displayed prominently on the dashboard. It appears as a string starting with tts-. This key is used in the Authorization: Bearer header for every request.
The dashboard also shows your current balance, trial status, and character consumption. Keep this key secure, as it provides direct access to your account and billing.
Revoke and regenerate keys
You can issue a new key at any time from the dashboard. When a new key is generated, the previous one becomes invalid immediately. This ensures that if a key is compromised or no longer needed, access is cut off instantly.
There is no delay or grace period for old keys. Regenerating is the recommended practice for security updates or when rotating credentials in your LMS integration environment.
First Request with cURL
Send a POST request to the speech endpoint with your API key. The service returns synthesized audio after processing, which may take time for long texts due to sequential processing and queuing.
This guide shows the minimal JSON payload required. You can adapt this structure for any programming language or framework supporting standard HTTP clients.
Basic POST request
Use the following cURL command to generate audio. Replace YOUR_API_KEY with your token from the dashboard.
The request targets the standard speech endpoint, ensuring compatibility with existing OpenAI SDK configurations by simply adjusting the base URL.
- Endpoint: POST https://api.nbcasino.info/v1/audio/speech
- Header: Authorization: Bearer YOUR_API_KEY
JSON body structure
The request body must include the model, input text, and voice preset. You can optionally specify the response format, speed, and language.
Text is limited to 4096 characters per request. Longer content requires splitting logic to maintain audio continuity.
- model: "tts-1" or "tts-1-hd"
- input: "Your text here"
- voice: e.g., "aria"
- response_format: "mp3"
Response format
A successful request returns the audio file directly in the response body with the appropriate content-type header.
If synthesis fails, an error object is returned, and the request is free, ensuring no charge for failed attempts.
- Content-Type: audio/mpeg (for mp3)
- Body: Binary audio data
OpenAI SDK Integration
The VoiceLoom API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing codebases with minimal friction. By adjusting the base URL, your application can switch from OpenAI’s infrastructure to VoiceLoom’s engine without rewriting the core logic.
This compatibility means product teams can prototype quickly using familiar SDKs, then swap the endpoint for production use. It reduces integration time for LMS platforms that already support OpenAI-style TTS services.
Change base_url
Point your SDK client to https://api.nbcasino.info/v1 instead of the default OpenAI endpoint. This single configuration change routes all TTS requests to VoiceLoom’s processing cluster while maintaining the same request and response shapes.
You can use this approach with any HTTP client that supports custom base URLs, ensuring your LMS audio generation remains flexible and decoupled from a single vendor’s proprietary SDK.
- Base URL: https://api.nbcasino.info/v1
- Endpoint: /v1/audio/speech
- Compatible with OpenAI Python/Node SDKs
Use official SDKs
Since the API follows the OpenAI speech endpoint schema, you can use the official OpenAI SDKs for Python and JavaScript. Simply initialize the client with your new base URL and your VoiceLoom API key.
This allows you to leverage existing error handling, retry logic, and type definitions within your LMS admin dashboard or student-facing web application without building custom HTTP wrappers.
- OpenAI Python SDK
- OpenAI Node.js SDK
- Standard JSON request body
Authentication header
Include your API key in the Authorization header using the Bearer scheme: Authorization: Bearer tts-.... Ensure your key is kept secure within your LMS backend environment variables.
Each account holds one active key at a time; generating a new key immediately invalidates the previous one, so update your configuration promptly to avoid service interruption.
- Header: Authorization: Bearer tts-...
Supported Voices
VoiceLoom provides eight distinct voice presets, each designed for specific educational contexts. These voices are derived from licensed recordings and public-domain audiobook readings, ensuring clear, professional audio for e-learning modules. Every generated file includes an inaudible watermark to identify synthetic speech, aiding in content transparency for students.
Female voices: Aria, Nova, Luna, Sage
Aria offers a warm, clear narration style ideal for standard course content. Nova provides a bright, upbeat tone suitable for introductory videos. Luna delivers a soft, storytelling voice perfect for narrative-driven lessons. Sage is calm and instructional, making it excellent for step-by-step tutorials.
- Aria: Warm, clear narrator
- Nova: Bright, upbeat
- Luna: Soft, storytelling
- Sage: Calm, instructional
Male voices: Felix, Milo, Atlas, Orion
Felix brings an energetic, promo-style voice for engaging marketing or short modules. Milo offers a friendly, conversational tone for informal learning materials. Atlas provides a neutral, news-style delivery for factual content. Orion features a deep, documentary voice suitable for serious, in-depth subjects.
- Felix: Energetic, promo
- Milo: Friendly, conversational
- Atlas: Neutral, news
- Orion: Deep, documentary
Voice characteristics
All eight voices support 23 languages, including English, Spanish, French, German, Chinese, Japanese, and Arabic. You can specify a language ISO code or rely on automatic detection from the text script. Voices are based on LibriTTS-R and LibriVox recordings, offering consistent quality across all supported languages.
- Supports 23 languages
- Automatic language detection
- Licensed source recordings
- Inaudible synthetic watermark
Audio Formats
VoiceLoom supports five audio formats to match your LMS infrastructure. MP3 offers a balance of compatibility and file size for web delivery, while WAV provides uncompressed quality for high-fidelity archival needs. OPUS, FLAC, and PCM allow you to optimize for specific bandwidth or processing requirements.
MP3 for web
MP3 is the default recommendation for most online course platforms. It ensures broad browser compatibility and minimizes bandwidth usage for students accessing lessons on mobile devices or slower connections. This format efficiently balances audio clarity with storage efficiency for large course libraries.
WAV for quality
WAV provides uncompressed audio. Use this format when integrating with advanced audio players or when storing master audio files for your LMS. It preserves the full dynamic range of the synthesized voice.
OPUS, FLAC, PCM options
OPUS offers efficient compression for modern web players. FLAC provides lossless compression. PCM is raw, uncompressed data suitable for immediate post-processing or specialized audio engines. Select these formats based on your specific playback or editing pipeline needs.

Rate Limits and Quotas
The API enforces a strict limit of 60 requests per minute per key, processing them sequentially. For longer texts, this queue may introduce latency, as each chunk is synthesized one after another.
New accounts start with a lower threshold of 10 requests per minute until the first top-up is processed. This ensures fair usage during the trial period without requiring immediate payment.
60 requests per minute
Once your account is funded, the standard rate limit increases to 60 requests per minute. This capacity supports typical educational workflows, such as generating audio for short lesson segments or accessibility overlays.
10 requests before top-up
Before your first top-up, you are limited to 10 requests per minute. This restriction applies even if you have sufficient character balance, ensuring stability for new integrations during evaluation.
Handling rate limits
If you exceed the limit, the API returns a 429 status code. Implement exponential backoff in your LMS integration to retry requests automatically. Since processing is sequential, consider batching text chunks to minimize API calls.
- Check the
Retry-Afterheader for wait time. - Implement client-side queuing for large course imports.
Error Handling
Robust error handling ensures seamless audio generation for your LMS without interrupting student workflows. Understanding the API's response structure allows your application to gracefully manage transient issues and billing discrepancies.
By implementing proper retry logic and refund verification, you maintain accurate character counts and user balances even when network conditions fluctuate during peak learning hours.
Common error codes
The API returns standard HTTP status codes to indicate request success or failure. Use 400 for invalid parameters, 401 for authentication issues, and 429 for rate limit exceedance.
Failed request refunds
If synthesis fails due to server errors, the charge is returned in full. Your balance updates automatically, ensuring no characters are lost for valid attempts that fail unexpectedly.
Debugging tips
Check the model and voice fields for typos, and verify your Authorization header matches the key format. Use the /v1/voices endpoint to confirm available voices before integration.
Text Splitting Strategy
Text-to-speech generation processes input in discrete chunks, meaning any single payload cannot exceed 4,096 characters. This limit applies to the raw input string, including spaces and punctuation. When your LMS sends a long chapter or lecture transcript, you must divide the text into smaller segments that fit within this boundary before sending them to the endpoint.
To maintain narrative flow, you should split the text at natural pauses, such as sentence endings, rather than arbitrary character counts. This ensures that the resulting audio segments can be stitched together.
4096 character limit
Each API request accepts a maximum of 4,096 characters for the input field. This constraint is strict; exceeding it will result in an error. Since spaces and punctuation count toward this total, ensure your splitting logic accounts for the full string length, not just visible words.
When preparing content for your course modules, calculate the character count before submission. If a lesson exceeds this limit, divide it into multiple requests. This allows you to manage payload sizes efficiently without losing data integrity or encountering request failures.
- Count every character, including spaces and punctuation.
- Split at sentence boundaries for natural audio transitions.
- Validate character count before sending each request.
Joining audio files
Once you receive the audio files for each split segment, you need to concatenate them into a single file. Use a standard audio library or tool compatible with your chosen response_format (mp3, wav, opus, flac, or pcm) to merge these parts.
Ensure that the concatenation preserves the original format and sample rate. This step is crucial for seamless playback in your LMS player, preventing audible clicks or pauses between segments that were generated separately.
- Use a consistent audio library for merging.
- Maintain the original response format during concatenation.
- Test the final file for smooth transitions.
Handling long texts
For lengthy content like entire books or long lectures, process segments sequentially or in parallel, depending on your infrastructure. Keep in mind the rate limit of 60 requests per minute per key. Plan your splitting strategy to avoid hitting these limits during bulk generation.
If you experience delays, remember that requests are processed one after another under load. For real-time user experiences, consider pre-generating audio for static course content and storing it in your media library rather than generating on the fly.
- Monitor rate limits (60 req/min) during bulk processing.
- Pre-generate audio for static content to reduce latency.
- Store merged files in your LMS media library.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Choosing the right female voice for LMS content directly influences learner retention and comprehension.
23 languages
Any voice speaks any of these languages.
