Frequently asked questions
What is the maximum input length per request?
The API accepts up to 4096 characters per request. Spaces and punctuation count toward this limit. For longer product descriptions, you must split the text into chunks of 4096 characters or less and join the resulting audio files manually.
Can I use the OpenAI Python SDK with this API?
Yes. The request shape matches the OpenAI speech endpoint. You can use the official OpenAI SDK by changing the base_url to https://api.k333casino.com/v1 and providing your LingvoCart API key. This allows seamless integration into your existing Python workflows.
Does the API support SSML markup?
No. The API does not support SSML markup. It accepts plain text input. If you need specific pacing or pronunciation, you must manage that logic in your application code before sending the text to the endpoint.
How do I handle long product descriptions?
Split your text into parts of up to 4096 characters. Send each part to the API and join the resulting audio files. This ensures you stay within the character limit while delivering complete product descriptions to your customers.
Is the audio response streamed or returned as a file?
The audio is returned as a file in the response body, not streamed. Supported formats include mp3, wav, opus, flac, and pcm. You receive the complete audio file after the request completes, allowing for standard HTTP handling.
What happens if I provide an invalid voice ID?
The request will fail. If synthesis fails, the charge is returned in full. You can verify available voice IDs by calling the GET /v1/voices endpoint before making your speech generation requests to ensure compatibility.
Can I specify a language for Latin script text?
Yes. If the language parameter is not set, the API guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly set the language parameter to ensure accurate synthesis and avoid misinterpretation.
Are there any additional parameters for voices?
The API uses eight preset voices: aria, nova, luna, sage, felix, milo, atlas, and orion. You can adjust the speed between 0.25 and 4.0. There are no emotion tags, custom cloning, or additional voice-specific parameters beyond these settings.
How do I rotate my API key?
You can issue a new API key at any time via your account dashboard. The old key stops working immediately when the new one is issued. This ensures secure access management for your e-commerce integration without downtime.
What is the default speed setting?
The default speed is 1.0. You can adjust the speed parameter between 0.25 and 4.0 to make the speech slower or faster. This allows you to optimize audio length for product descriptions or customer support messages.
Does the API return metadata with the audio?
The response returns the audio file directly. Request metadata like time, characters, and status are kept for billing purposes but are not included in the audio response. You must track usage metrics separately using your account dashboard.
Can I request multiple voices in one call?
No. Each request accepts a single voice ID. To generate audio with different voices, you must make separate API calls for each voice. You can then join the resulting audio files in your application logic.
Is the API synchronous or asynchronous?
The API is synchronous. You send a POST request and wait for the audio file response. Requests are processed sequentially, so under load, a request may wait in a queue before synthesis begins.
How do I test the API without spending money?
Sign in with Google to receive a $0.50 free trial credit, valid for 7 days. This provides about 50,000 characters. Accounts created with email and password do not receive this trial credit, so use Google for testing.
First request
curl
curl https://api.k333casino.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.k333casino.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.k333casino.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 |
Authentication and Keys
Access to the LingvoCart TTS API requires a valid API key, which you can generate directly from the /get-api-key/ dashboard. Each account holds one active key at a time, ensuring clear attribution for billing and usage tracking.
Include your key in the HTTP header as Authorization: Bearer tts-<your-key>. The key is tied to your specific site account on k333casino.com, not a global identity.
Generating Your API Key
Sign up via Google or email/password on the registration page. Your unique key appears immediately on the dashboard, ready for integration into your e-commerce backend or customer support audio pipelines.
Bearer Token Authorization
Pass the key in the Authorization header for every request. The format is strictly Bearer tts-.... Do not append the key to the URL query string for security.
Key Rotation Policy
Issue a new key from the dashboard at any time. The previous key becomes inactive instantly, preventing unauthorized use if compromised. No downtime occurs during rotation.
- Old key stops immediately upon new key issuance.
- No manual deactivation period required.
Endpoints Overview
The API provides three primary endpoints for generating and managing audio content. The core synthesis endpoint accepts text and configuration parameters, returning an audio file directly. Two metadata endpoints allow you to list available voices and model details without consuming credits.
POST /v1/audio/speech
This endpoint processes your input text and returns the generated audio file. It accepts JSON bodies with model, input, voice, and format parameters. Failed requests do not incur charges.
- Accepts text up to 4096 characters
- Returns audio in specified formats
- Charges only on success
GET /v1/voices
Retrieve a list of all available voice presets, including their ID, gender, and supported languages. This helps you select the appropriate voice for product descriptions or support audio.
- Lists all 8 voice presets
- Shows supported language codes
- Includes voice metadata
GET /v1/models
Returns details about the available TTS models, including their names and capabilities. This endpoint helps verify compatibility with your integration setup.
- Lists 'tts-1' and 'tts-1-hd'
- Shows model capabilities
- No character consumption
Request Parameters
Configure the synthesis parameters to match your e-commerce audio needs. The API accepts a JSON body with specific fields for model, input, voice, format, and speed.
Model Selection (tts-1 / tts-1-hd)
Choose between "tts-1" and "tts-1-hd". Both use the same engine and price, so select based on your preference for audio fidelity versus processing speed.
Input Text Limit (4096 Chars)
The input field accepts up to 4096 characters per request. For longer product descriptions, split your text into chunks and join the resulting audio files.
Voice and Language Settings
Select one of eight preset voices. Set the language ISO code to ensure correct pronunciation for non-English Latin text, as the API otherwise guesses from the script.
Supported languages include English, German, French, Spanish, and Japanese. Voices are licensed from LibriTTS-R and LibriVox public-domain readings.
- 8 voice presets: aria, nova, luna, sage, felix, milo, atlas, orion
Supported Audio Formats
Choose the audio format that best fits your e-commerce infrastructure. Each option balances file size, quality, and compatibility differently, allowing you to optimize storage and delivery costs without compromising the clarity of your product descriptions or support audio.
MP3 for Web Delivery
MP3 is the standard for web delivery, offering a good balance between file size and sound quality. It is widely supported by all major browsers and media players, making it ideal for embedding audio directly into product pages or customer support interfaces.
WAV for High Quality
Use WAV when you need uncompressed audio for premium product demos or detailed voiceovers. This format preserves the full fidelity of the synthesis, ideal for offline storage or professional editing.
FLAC and Opus Options
FLAC provides lossless compression for archival purposes, while Opus offers high efficiency for low-bandwidth delivery. These formats allow you to optimize bandwidth usage without sacrificing clarity, depending on your specific infrastructure needs.
OpenAI SDK Integration
Integrating LingvoCart’s TTS API with existing e-commerce workflows is straightforward because the endpoint shape matches the OpenAI speech standard. By simply adjusting the base URL in your client configuration, you can leverage the official OpenAI SDKs without rewriting core logic. This compatibility allows startups to use familiar libraries for generating product descriptions or customer support audio with minimal code changes.
The integration requires only a minor configuration shift. You point the SDK’s base_url to https://api.k333casino.com/v1 and provide your unique API key. The rest of the request structure remains identical to the OpenAI specification, ensuring that your existing error handling and retry logic continue to function correctly across different voice models and audio formats.
Changing the Base URL
Update your SDK configuration to point to the LingvoCart API base URL. This single change directs all subsequent requests to our infrastructure while maintaining the standard JSON payload structure expected by OpenAI-compatible libraries.
Ensure your authentication header uses the Bearer token format. The SDK will automatically attach your API key to each request, allowing seamless integration with your e-commerce backend or frontend applications.
- Set
base_urltohttps://api.k333casino.com/v1 - Use standard
Authorization: Bearer <key>header - No custom client library required
Using Official SDKs
Leverage the official OpenAI SDKs (Python, Node.js, etc.) by using the Speech class or equivalent HTTP client methods. The library handles the JSON serialization and HTTP requests, reducing boilerplate code in your e-commerce service.
Since the request shape is identical, you can reuse existing integration patterns. This reduces development time and testing overhead for startups looking to add audio features to their online stores.
- Works with Python, Node.js, and other official SDKs
- No additional dependencies needed
- Standard HTTP client behavior
JSON Body Structure
The request body follows the standard OpenAI speech format. Include the model, input, voice, and response_format fields. The API processes these fields exactly as documented, ensuring predictable results.
You can also include optional parameters like speed and language to customize the audio output. The SDK handles the conversion of these parameters into the correct JSON structure for the API.
model: "tts-1" or "tts-1-hd"input: Text string (max 4096 chars)voice: One of the 8 preset voicesresponse_format: mp3, wav, opus, flac, or pcm

Error Handling and Limits
API errors return standard HTTP status codes to help you debug integration issues quickly. Failed synthesis requests are free, meaning the character count is not deducted from your balance if the API returns an error.
Rate Limit Exceeded Errors
You are limited to 60 requests per minute per key. If you exceed this, the API returns a 429 status code. Accounts without a top-up are limited to 10 requests per minute.
- Use exponential backoff for retry logic.
- Monitor your usage dashboard for real-time stats.
Invalid Voice Name Errors
Ensure the voice name matches one of the eight presets (e.g., aria, nova, atlas). The GET /v1/voices endpoint lists all valid options for your selected language.
- Check the exact spelling of voice names.
- Verify language compatibility before sending requests.
Input Text Too Long Errors
Each request accepts up to 4096 characters. If your product description exceeds this, split the text into chunks and join the resulting audio files on the client side.
- Count spaces and punctuation as characters.
- Implement client-side text splitting logic.
Curl Example for Testing
Use these curl commands to verify your integration before building the product description audio pipeline. The following examples demonstrate how to send text and receive audio files directly from the terminal.
Basic Speech Generation Request
Send a simple request to generate audio using the default model and voice. Replace YOUR_API_KEY with your actual key from the dashboard.
- curl -X POST https://api.k333casino.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello, welcome to our store", "voice": "nova"}'
Setting Voice and Format
Specify a different voice and output format to match your e-commerce needs. The API supports mp3, wav, opus, flac, and pcm formats.
- curl -X POST https://api.k333casino.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1-hd", "input": "Your order has shipped", "voice": "atlas", "response_format": "wav"}'
Saving Response to File
Redirect the binary audio response directly to a file on your server. This avoids parsing JSON for binary data in your code.
- curl -X POST https://api.k333casino.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Product details available", "voice": "aria"}' \ -o output.mp3
Speed and Processing
Understanding processing speed helps you estimate latency for your e-commerce audio workflows. Our API generates audio at approximately real-time speeds for long texts, translating roughly 25 characters of text per second of audio output. Short phrases may take a few seconds to process due to initialization overhead.
For product descriptions or support prompts, this speed ensures that audio files are generated quickly enough for immediate playback without significant user wait times. This efficiency supports seamless integration into your online store's customer experience.
Adjustable Speed Multiplier
You can control the playback speed of generated audio using the speed parameter, which accepts values between 0.25 and 4.0. The default speed is 1.0, providing natural pacing. Adjusting this allows you to create faster announcements for promotions or slower, clearer instructions for accessibility.
This flexibility ensures the audio matches your brand's tone, whether it's energetic for sales or calm for detailed support content.
- Minimum speed: 0.25x (slow, clear)
- Default speed: 1.0x
- Maximum speed: 4.0x (fast, energetic)
Real-Time Generation Estimate
Generation speed is roughly real-time for longer texts, averaging about 25 characters of input per second of audio output. This metric helps you plan API call durations for bulk product description generation. Shorter phrases may experience slightly longer processing times due to engine initialization.
This predictable rate allows you to set appropriate timeout values in your integration, ensuring a smooth user experience without unnecessary delays.
Queue Behavior Under Load
Requests are processed sequentially, meaning under high load, a request may wait in a queue before synthesis begins. This can increase latency if many concurrent requests are submitted. For critical path audio, consider staggering requests or using appropriate retry logic.
The rate limit of 60 requests per minute per key helps manage this queue, ensuring fair processing for all accounts. Exceeding this limit will result in rate limit errors until the window resets.
- Processed sequentially
- Queue may form under load
- Rate limit: 60 req/min
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Listening to a clear, natural voice description can increase time spent on a product page.
23 languages
Any voice speaks any of these languages.
