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. Accounts are specific to this site. Once registered, you receive one active API key starting with 'tts-'. You can issue a new key at any time, which immediately invalidates the old one.
Can I use the official OpenAI SDK?
Yes. The request shape matches the OpenAI speech endpoint. You can use official OpenAI SDKs by changing the base URL to https://api.bl77.info/v1 and providing your site-specific key. This allows you to integrate the API into existing workflows without rewriting client code.
What is the base URL for the API?
The base URL is https://api.bl77.info/v1. You send POST requests to https://api.bl77.info/v1/audio/speech for generation. Other endpoints include GET /v1/voices for voice details and GET /v1/models for model information. Use this base URL for all SDK configurations.
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 are processed sequentially, so high load may cause queuing. Monitor your usage via the dashboard. Exceeding limits may result in delays or errors until the window resets.
What happens if I send invalid text?
If synthesis fails, the charge is returned in full. Failed requests incur no cost. Ensure your text is under 4096 characters and uses supported voices. The API returns an error status, allowing you to retry or adjust parameters without financial penalty.
Do I need to split long texts manually?
The API accepts up to 4096 characters per request. For longer texts, you must split the input into parts of this size. Your client should then join the resulting audio files. This ensures consistent processing and avoids exceeding the single-request character limit.
Can I change the API key if it leaks?
Yes. You can issue a new key at any time from your dashboard. The new key becomes active immediately, and the old one stops working at once. This allows you to revoke access instantly without waiting for a manual review or email confirmation.
Is the API compatible with other tools?
Yes, because it uses the same request shape as the OpenAI speech endpoint. Any tool that supports standard JSON POST requests with an Authorization header can use this API. You simply update the base URL to point to our endpoint instead of OpenAI's.
How do I specify the audio format?
Include the response_format field in your JSON body. Supported formats are mp3, wav, opus, flac, and pcm. Choose the format that best fits your podcast workflow. The API returns the audio file in the specified format directly in the response.
What is the character limit for input?
Each request supports up to 4096 characters. Spaces and punctuation count toward this limit. If your text exceeds this length, split it into smaller chunks. Each chunk generates a separate audio file that you must concatenate on the client side.
Does the API support async requests?
No. The API processes requests synchronously. Requests are handled one after another, so under load, a request may wait in a queue. You must wait for the response before proceeding.
How do I check available voices?
Send a GET request to /v1/voices. This endpoint returns details on all 8 voice presets, including their names, genders, and supported languages. You can also check /v1/models for model information. Use this data to select the appropriate voice for your content.
Can I use custom SSML tags?
No. The API does not support SSML, phoneme dictionaries, or custom pronunciation lexicons. It accepts plain text input. If you need specific pacing or emphasis, you must rely on the speed parameter or adjust the text itself. No SSML tags are processed.
What happens if the server is down?
There is no SLA or uptime guarantee. If the server is unavailable, requests will fail. Failed requests are free, so you are not charged for failed attempts. You can retry after the service restores. Support is by email only.
First request
curl
curl https://api.bl77.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.bl77.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.bl77.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 |
Authentication and Keys
Access the /get-api-key/ page to generate your API key via Google sign-in or email registration. This page displays your active key, current balance, and usage metrics alongside a ready-to-use cURL example for immediate testing.
Generating Your API Key
Sign up using Google or an email/password combination. Google accounts receive a $0.50 trial credit valid for 7 days, while email accounts start without trial credit. One active key is issued per account.
- Google sign-in includes $0.50 trial credit
- Email accounts start with zero balance
- Key visible on /get-api-key/ dashboard
Bearer Token Authorization
Include your key in the request header as Authorization: Bearer tts-.... The official OpenAI SDKs work seamlessly by setting the base URL to https://api.bl77.info/v1.
Key Rotation and Revocation
You can issue a new key at any time from your dashboard. The old key stops working immediately upon issuance, ensuring secure access control for your podcast production pipeline.
Endpoint Overview
The API provides three core endpoints for generating and managing podcast audio. The primary speech endpoint accepts text and voice parameters to return audio files, while secondary endpoints list available voices and model details for integration planning.
Speech Generation Endpoint
Send text via POST to /v1/audio/speech. The endpoint accepts JSON bodies with model, input, voice, response_format, and speed fields. It returns the generated audio file directly in the response.
Voice Listing Endpoint
Use GET /v1/voices to retrieve the full list of eight presets, supported languages, and available audio formats. This helps you configure your podcast generation pipeline with the correct voice IDs.
Model Information Endpoint
Call GET /v1/models to view the available TTS models. This endpoint confirms that both tts-1 and tts-1-hd are accessible, allowing you to choose between standard and high-definition audio quality.
Request Parameters
The API accepts plain text input with a hard limit of 4096 characters per request. Spaces and punctuation count toward this total. For longer podcast segments, split the text into chunks, generate each part, and join the resulting audio files.
Input Text and Character Limits
Ensure your input string does not exceed 4096 characters. If your script is longer, divide it into multiple requests. The API processes requests sequentially, so under load, a request may wait in a queue before synthesis begins.
Voice Selection Options
Select from eight licensed presets based on LibriTTS-R recordings. Female voices include Aria, Nova, Luna, and Sage. Male voices include Felix, Milo, Atlas, and Orion. Each voice supports all 23 available languages, allowing flexible casting for diverse podcast content.
Audio Format and Speed Settings
Choose from MP3, WAV, OPUS, FLAC, or PCM formats. Adjust the speed parameter between 0.25 and 4.0 to fit specific pacing needs. The default language is English for Latin-script text, but explicitly set the ISO code for other languages to ensure accurate synthesis.
OpenAI SDK Integration
The API follows the OpenAI speech endpoint structure, allowing you to reuse existing OpenAI SDKs by simply pointing them to our base URL. This means you can integrate ScriptCast into your podcast production pipeline without rewriting your audio generation logic from scratch.
By configuring the base_url to https://api.bl77.info/v1, you can use the official OpenAI Python or Node.js libraries to generate audio files directly from your scripts. This approach simplifies integration for agencies already familiar with the OpenAI developer ecosystem.
Changing the Base URL
Update your SDK client configuration to use https://api.bl77.info/v1 as the base URL. Ensure you pass your API key via the Authorization: Bearer <key> header, identical to the standard OpenAI format.
- Base URL: https://api.bl77.info/v1
- Auth Header: Authorization: Bearer tts-...
Using Official Python SDK
Install the standard openai package. Initialize the client with your base URL and key. Call audio.speech.create() with your desired model, voice, input text, and response format.
- pip install openai
- client = OpenAI(base_url="https://api.bl77.info/v1", api_key="tts-...")
Using Official Node.js SDK
Install the openai npm package. Configure the client with the ScriptCast base URL and your API key. Invoke the speech creation method to receive the audio file.
- npm install openai
- const openai = new OpenAI({ baseURL: 'https://api.bl77.info/v1', apiKey: 'tts-...' })
Error Handling
Errors are returned as standard HTTP codes with JSON bodies. A 401 Unauthorized indicates an invalid or revoked API key, while a 400 Bad Request signals invalid parameters like an unsupported voice or format. These errors do not consume your character balance.
Synthesis failures also result in a full refund of the request cost. You should check the error message to determine if the issue is transient or requires a parameter adjustment before retrying.
Common API Errors
The API returns specific error codes to help you debug requests. A 401 error occurs when the Bearer token is missing, malformed, or has been revoked after key rotation. A 400 error indicates invalid input, such as exceeding the 4096-character limit or selecting an unsupported audio format.
- 401 Unauthorized: Invalid or expired API key.
- 400 Bad Request: Invalid parameters or character limit exceeded.
- 500 Internal Server Error: Temporary server-side processing issue.
Rate Limit Responses
You are limited to 60 requests per minute per key. New accounts start with a 10 requests-per-minute limit until the first top-up is processed. If you exceed this limit, the API returns a 429 Too Many Requests status.
- Standard limit: 60 RPM after top-up.
- Initial limit: 10 RPM for new accounts.
- Status code: 429 Too Many Requests.
Handling Synthesis Failures
If audio generation fails due to engine issues, the request is marked as failed and your balance is refunded in full. Unlike successful requests, no characters are deducted. You should implement logic to retry failed requests after a short delay, as the queue may be under load.
- Failed requests are fully refunded.
- No characters are deducted for failed synthesis.
- Implement retry logic for transient errors.

Rate Limits and Quotas
Rate limits are enforced per API key to ensure stable generation performance. By default, you can make 60 requests per minute, which is sufficient for most podcast production workflows. This limit applies to all synthesis attempts, regardless of output format.
60 Requests Per Minute
The standard quota allows 60 requests per minute per key. This capacity handles typical batch processing needs for short episodes or multiple voice checks. If you exceed this limit, further requests will be rejected until the window resets.
- Standard limit: 60 requests/minute/key
- Applies to all request types
- Resets on a sliding window basis
Initial Limit of 10 RPM
New accounts start with a lower limit of 10 requests per minute. This restriction remains until you perform your first top-up. Once you add credit via USTRC20, the limit automatically increases to the standard 60 RPM.
- New accounts: 10 requests/minute
- Unlocks after first top-up
- Automatic adjustment upon payment
Queue Processing Under Load
Audio Formats Supported
The API supports multiple audio formats to suit different podcast production workflows. You can specify the desired output format in the response_format parameter of your speech request. Supported formats include mp3, wav, opus, flac, and pcm.
MP3 for Web Distribution
MP3 is the standard format for web distribution and most podcast platforms. It offers a balance between file size and audio quality, making it ideal for streaming and downloads. Use mp3 as the response_format value.
WAV for High Quality
WAV provides uncompressed, high-quality audio suitable for editing in post-production. It preserves the full fidelity of the generated speech without lossy compression artifacts. Select wav when you need pristine audio for mixing.
OPUS for Efficient Streaming
OPUS offers efficient compression with good quality, suitable for modern streaming applications. It provides smaller file sizes compared to WAV. Choose opus for efficient compression.
Code Examples
Generate podcast audio directly via command line or code. The API returns binary audio data ready for immediate saving or processing in your editing pipeline.
Use these snippets to integrate Text-to-Speech into your agency’s batch processing workflow. Ensure you replace placeholders with your actual API key and voice selection.
cURL Request Example
Send a POST request to the speech endpoint with your JSON payload. The response contains the raw audio bytes, which you can redirect to a file.
- Endpoint: https://api.bl77.info/v1/audio/speech
- Auth: Bearer tts-your-api-key
- Model: tts-1 or tts-1-hd
Python SDK Script
Use the official OpenAI Python SDK by overriding the base URL. This allows you to leverage familiar SDK methods for synchronous audio generation.
- Install: pip install openai
- Base URL: https://api.bl77.info/v1
- Library: openai.OpenAI(base_url=...)
Node.js Integration Snippet
Initialize the OpenAI client with the custom base URL. Pass the text, voice, and format parameters to generate audio files for your podcast episodes.
- Install: npm install openai
- Base URL: https://api.bl77.info/v1
- Client: new OpenAI({ baseURL: '...' })
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Distribute these samples to a small group of beta listeners or internal team members for comparison.
23 languages
Any voice speaks any of these languages.
