Frequently asked questions
How do I get an API key?
Sign up at https://bg4550.net/get-api-key/ using Google or email. Accounts are per site. The dashboard displays your active key, balance, and usage details. You can issue a new key at any time, which immediately invalidates the old one.
Can I use the OpenAI SDK?
Yes. The request shape matches the OpenAI speech endpoint. Change the base_url to https://api.bg4550.net/v1 and use your FitVoice key. The official OpenAI SDKs work directly without modification for integration into your fitness or meditation app workflows.
What is the base URL?
The API base URL is https://api.bg4550.net/v1. Use this for all requests, including the speech endpoint at /v1/audio/speech. This allows compatibility with standard HTTP clients and SDKs configured for OpenAI-style endpoints.
How do I handle rate limits?
Limits are 60 requests per minute per key (10 before first top-up). Requests process sequentially, so queueing may occur under load. Split long texts into parts of 4096 characters to manage volume efficiently without exceeding limits.
Is streaming supported?
No streaming or WebSocket support exists. The API returns complete audio files upon completion. You receive the full MP3, WAV, OPUS, FLAC, or PCM file in the response body after synthesis finishes, suitable for static audio assets.
What happens on error?
Failed requests are free. If synthesis fails, the charge is returned in full. Request metadata is kept for billing, but no cost is incurred for unsuccessful audio generation attempts, ensuring you only pay for successful outputs.
Can I change my API key?
Yes. You can issue a new key at any time from your dashboard. The old key stops working immediately upon issuing the new one. This allows secure rotation without downtime for your fitness app integrations.
Is SSML supported?
No SSML support is available. The API accepts plain text input up to 4096 characters. You cannot use phoneme dictionaries or custom pronunciation lexicons. Input text is processed directly to generate audio without markup interpretation.
How do I send a long text?
Split text into parts of up to 4096 characters. Send each part via the API and join the resulting audio files. This approach handles longer scripts efficiently, as each request processes independently within the rate limits.
What is the character limit?
Each request supports up to 4096 characters. Spaces and punctuation count toward this limit. For longer content, split the input into multiple requests and concatenate the returned audio files to create the final output asset.
Does the API support Python?
Yes, via the OpenAI Python SDK. Configure the base_url to https://api.bg4550.net/v1 and provide your FitVoice key. Standard HTTP libraries also work directly. No proprietary Python SDK is required for integration.
Is there a JavaScript SDK?
No official SDK of our own exists. Use the OpenAI JS SDK by changing the base_url to https://api.bg4550.net/v1. Alternatively, use standard fetch or axios for direct HTTP requests to the speech endpoint.
How do I test the API?
Use the curl example provided on your dashboard at /get-api-key/. Send a POST request to /v1/audio/speech with your key and text. Check the response for the audio file or error details to verify integration.
What audio formats are returned?
Supported formats are mp3, wav, opus, flac, and pcm. Specify the desired format in the response_format field. Each generated file includes an inaudible watermark that marks it as synthetic speech.
First request
curl
curl https://api.bg4550.net/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.bg4550.net/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.bg4550.net/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
To use the FitVoice API, you must include a valid API key in the request header. This key authenticates your account and tracks your usage and billing.
You can retrieve your key from the /get-api-key/ dashboard. It begins with 'tts-' and is the only credential needed for all endpoints.
Bearer token key
Include your key in the Authorization header as a Bearer token. The format is Authorization: Bearer tts-.... This ensures your requests are recognized by the API.
The key is tied to your account balance and rate limits. Keep it secure, as anyone with the key can use your credits.
- Starts with
tts- - Included in
Authorization: Bearerheader - No other credentials required
One active key per account
Each account maintains exactly one active API key. This simplifies management for product teams who need a single point of access.
If you lose your key or suspect a breach, you can issue a new one immediately. The previous key stops working at once.
- Single active key per account
- Simplified access management
- Immediate invalidation on replacement
Revoke old keys instantly
When you generate a new key, the old one is revoked instantly. There is no waiting period or grace period.
This ensures that if a key is compromised, access is cut off immediately without waiting for a session timeout or daily reset.
- Instant revocation
- No delay on invalidation
- Secure key rotation
Endpoints
The API exposes three primary endpoints for generating audio and managing resources. Use the speech endpoint to convert text into audio files, while the voices and models endpoints provide metadata about available synthesis options.
All requests require a Bearer token in the Authorization header. The speech endpoint accepts JSON bodies with text, voice selection, and format preferences, returning the resulting audio file directly in the response.
POST /v1/audio/speech
This endpoint accepts text input (up to 4096 characters) and returns an audio file. You specify the model (tts-1 or tts-1-hd), voice preset, response format (mp3, wav, opus, flac, pcm), and optional speed or language parameters.
Longer texts should be split into parts under 4096 characters and joined by your application, as the API processes each request sequentially.
- Accepts JSON body with model, input, voice, response_format, speed, and language fields.
- Returns audio file directly in the response body.
- Supports formats: mp3, wav, opus, flac, pcm.
GET /v1/voices
Returns a list of available voice presets, their associated languages, supported formats, and pricing details. This helps you select the appropriate voice for your fitness or meditation content.
You can verify which voices support specific languages before generating audio, ensuring accurate synthesis for your target audience.
- Returns list of voices with metadata.
- Includes language support and format compatibility.
- Shows current pricing per character.
GET /v1/models
Returns available model configurations, such as tts-1 and tts-1-hd, along with their engine details and pricing tiers. Use this to verify model availability before making synthesis requests.
Both models use the same engine and price, with no performance or quality difference between them.
- Lists available TTS models.
- Shows engine details and pricing.
- Confirms model availability for requests.
Request Parameters
Configure the synthesis engine and input payload to generate audio files. The API accepts standard JSON bodies where you define the model, text content, voice preset, and output format.
Ensure your input text respects the character limit per request. If your script exceeds this boundary, split it into chunks, generate each part, and join the resulting audio files.
Model: tts-1 or tts-1-hd
Select between "tts-1" and "tts-1-hd". Both models use the same engine and carry the same price of $10 per 1 million characters.
Input: up to 4096 chars
The input field accepts plain text up to 4096 characters. Spaces and punctuation count toward this limit. Long texts must be split into parts and joined after synthesis.
Voice: 8 presets available
Choose from 8 licensed voice presets. All voices support any of the 23 supported languages. Set the language parameter for non-English Latin text to ensure accurate detection.
- Female: aria, nova, luna, sage
- Male: felix, milo, atlas, orion
Audio Formats
Select your preferred audio format when sending a POST request to /v1/audio/speech. The API supports MP3, WAV, Opus, FLAC, and PCM, allowing you to choose the best balance between file size and quality for your fitness or meditation app.
MP3, WAV, Opus
MP3 is ideal for web delivery due to its small file size. WAV offers uncompressed audio for local playback. Opus provides high efficiency at low bitrates, suitable for mobile data conservation.
FLAC and PCM support
FLAC delivers lossless compression. PCM provides raw, uncompressed audio data.
No streaming format
The API returns complete audio files, not streaming chunks. You must wait for the full response before playback begins, which suits standard app audio players but excludes real-time partial audio use cases.
Rate Limits
Rate limits protect the stability of the synthesis engine. Each API key is capped at 60 requests per minute, which is sufficient for most production workflows. If you exceed this limit, additional requests will be rejected with a 429 error.
60 requests per minute
Once your account is funded, you can send up to 60 synthesis requests per minute. This throughput allows for batch processing, though requests are processed sequentially and may queue under load.
10 req/min before top up
New accounts start with a lower limit of 10 requests per minute. This applies even if you have active trial credit. You must complete a top-up to increase your throughput to the standard 60 req/min.
Queue on load
Requests are processed sequentially. Under high load, your request may wait in a queue before synthesis begins. Short phrases typically take a few seconds, while longer texts are processed at roughly real-time speed.

OpenAI SDK Integration
FitVoice uses the same request shape as OpenAI’s speech endpoint, allowing you to integrate with existing OpenAI SDKs by simply adjusting the base URL. This approach lets product teams reuse familiar code structures.
Change base URL
Update your SDK configuration to point to https://api.bg4550.net/v1 instead of the default OpenAI endpoint. This single change directs all synthesis requests to FitVoice’s infrastructure while maintaining the standard JSON payload structure.
Use official SDK
Import the standard OpenAI SDK for your preferred language. Since the request body matches the OpenAI specification, you can use the same methods for creating audio files, ensuring a smooth transition for teams already familiar with OpenAI’s tooling.
Pass API key
Provide your FitVoice API key using the standard Authorization: Bearer tts-... header. The SDK will handle authentication automatically when configured correctly, allowing your fitness or meditation app to generate calm, synthetic voice audio reliably.
Error Handling
The API returns specific HTTP status codes to indicate the result of your synthesis request. Understanding these responses helps you implement robust error handling in your fitness or meditation app, ensuring a smooth user experience when generating audio from scripts.
Most errors are immediate and descriptive. You can resolve them by checking the request payload or your account credentials before retrying.
400 Bad Request
This error indicates that the request body contains invalid data. Common causes include an input string exceeding 4096 characters, an invalid voice name, or a speed value outside the 0.25–4.0 range.
Check the error message in the response body for details. Ensure your text is properly encoded and within the character limit.
- Verify
inputlength is ≤ 4096 characters. - Ensure
voiceis one of the 8 available presets. - Check that
speedis between 0.25 and 4.0.
401 Unauthorized
The provided API key is missing, invalid, or has been revoked. Each account has one active key; if you issued a new key, the old one stops immediately.
Ensure your Authorization header includes the correct Bearer tts-... token. Regenerate your key from the dashboard if necessary.
429 Rate Limit
You have exceeded the limit of 60 requests per minute, or 10 requests per minute if no top-up has been made. Requests may also queue under load, causing delays.
Implement exponential backoff in your client. Monitor your usage in the dashboard to avoid interruptions during high-volume generation.
Curl Example
To generate audio, set the Authorization header with your API key and specify the desired output format. This ensures the request is authenticated and the response is returned in your preferred encoding.
Setup headers
Include the Authorization: Bearer <your-key> header. Set Content-Type: application/json to indicate the request body format.
- Authorization: Bearer tts-...
Send JSON body
Construct a JSON payload with model, input, and voice. Ensure the text does not exceed 4096 characters. You can also specify response_format and speed if needed.
- model: "tts-1"
- input: "Your text here"
- voice: "nova"
Receive audio file
The API returns the audio file directly in the response body. Save the output to a file on your local machine for use in your fitness or meditation app.
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. The voice handles factual statements with precision, avoiding emotional bias that might distract from performance metrics or health statistics.
23 languages
Any voice speaks any of these languages.
