Frequently asked questions
What is a web speech synthesis API?
It is a cloud text-to-speech API where you send text via a POST request and receive an audio file. The endpoint follows the same JSON shape as the OpenAI speech endpoint, allowing you to use standard SDKs by simply changing the base URL. This provides a reliable, programmatic way to convert written content into spoken audio for your applications.
How does a cloud TTS API differ from the browser Web Speech API?
Unlike the browser Web Speech API, which varies by device and OS, this cloud endpoint delivers consistent voice quality across all devices. It handles large volumes reliably and does not depend on the user’s local browser capabilities. You get deterministic audio output, ensuring every learner hears the same professional narration regardless of their device.
Why is the browser Web Speech API inconsistent for LMS platforms?
The browser Web Speech API relies on the user’s operating system and browser version, leading to inconsistent voice quality and availability. Some devices lack certain voices or languages. Our cloud API ensures uniform narration for all students, replacing these inconsistent local engines with a stable, centralized service that works identically on any device.
Can I use this API for generating audio for online courses?
Yes, it is designed for course creators and LMS administrators. You can send text up to 4096 characters per request and receive audio files. For longer course content, split the text into parts and join the audio files. This workflow supports scalable generation of training material audio for your educational platforms.
How many languages are supported for course content?
The API supports 23 languages, including English, Spanish, German, French, Chinese, Japanese, and Arabic. Any voice can speak any of these languages. If the language is not specified, it guesses from the script, but you should set it explicitly for non-English Latin text to ensure accuracy. Vietnamese, Thai, Indonesian, Ukrainian, Romanian, Czech, and Bengali are not supported.
What happens if a text-to-speech request fails?
If synthesis fails, the charge is returned in full. You are only billed for successful requests. This ensures you do not pay for audio that was not delivered. Failed requests are free, so you can retry or adjust parameters without financial penalty, making it safe for automated course generation pipelines.
Are the voices in the API realistic enough for professional courses?
The voices are based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings. They include eight presets like Aria, Nova, and Felix, offering clear, warm, or energetic tones suitable for education. Each generated file carries an inaudible watermark marking it as synthetic speech, ensuring transparency while maintaining professional audio quality.
Do I need a developer to integrate this API into my LMS?
Integration requires sending JSON POST requests to the API endpoint. While you can use the official OpenAI SDKs by changing the base URL, you will need to handle authentication and request formatting. For large-scale automation, a developer is recommended to manage rate limits, text splitting, and audio file management efficiently.
How is the API charged for large course libraries?
Pricing is $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count as characters. There are no monthly plans or minimum spends. You pay only for what you use, with a balance that does not expire. This model scales with your course library size without fixed overhead costs.
Can I generate audio for multiple languages in one request?
No, each request handles a single language or detected language, though the language parameter is optional. You must send separate requests for different languages. However, you can use any of the eight voices to speak any of the 23 supported languages. Simply set the language parameter or let the API guess from the script for each request.
Is there a limit on the length of text per request?
Yes, each request accepts up to 4096 characters of input text. For longer course modules, you should split the text into parts of this limit and join the resulting audio files. This ensures consistent processing and avoids timeouts. The API processes requests sequentially, so longer texts may take more time to generate.
Do I need to store audio files on my own server?
Generated audio is returned in the response and not stored by the API, though request metadata is kept for billing. You are responsible for storing the audio files on your own servers or CDN. Request metadata is kept for billing purposes. This gives you full control over your course audio assets and allows you to manage storage costs independently.
What audio formats are available for LMS compatibility?
You can choose from mp3, wav, opus, flac, and pcm formats via the response_format field. MP3 and WAV are widely supported by most LMS platforms. These formats ensure compatibility with standard audio players and learning management systems, allowing you to deliver course content without additional conversion steps for most users.
Is there a free trial available for testing the API?
Yes, signing in with Google provides $0.50 of credit, valid for 7 days, which covers about 50,000 characters. Accounts created with email and password start without trial credit. You can test the API with this credit before topping up with USDT (TRC-20). Failed requests are free, so you can test without charge.
First request
curl
curl https://api.k101.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.mp3Why LMS Platforms Need a Cloud API
Browser-based Web Speech APIs offer quick prototyping but lack the consistency required for professional online courses. They vary significantly between browsers and devices, often failing to load or produce uneven audio quality, which disrupts the learning experience for students using different setups.
A cloud API provides a stable, predictable endpoint that ensures every student hears the same high-quality audio regardless of their browser or operating system. This reliability is critical for maintaining engagement across large, diverse audiences.
Browser API Inconsistency
Web Speech API implementations differ widely. Chrome may render a voice clearly while Firefox or Safari produces garbled audio or fails entirely. This inconsistency forces course creators to test on every device, adding friction to the student experience.
- Variable voice rendering across browsers
- Inconsistent volume and tone
- Unpredictable loading times
Scalability for Large Courses
Browser APIs struggle with bulk generation or simultaneous playback in large courses. A cloud API handles high volumes reliably, allowing you to pre-generate audio for entire modules without worrying about browser memory limits or throttling during peak usage.
- Handles high-volume text processing
- Pre-generate entire course libraries
- No browser memory bottlenecks
Cross-Device Compatibility
Students access content on desktops, tablets, and phones. Cloud synthesis ensures uniform audio output across all devices. You do not need to account for device-specific voice engines, simplifying your LMS architecture and ensuring a consistent educational standard.
- Uniform output on iOS/Android/Desktop
- Simplified LMS integration
- Consistent student experience
How It Works for E-Learning
Send your lesson text to the API endpoint and receive an audio file ready for your LMS. The system handles up to 4096 characters per request; you must split longer lessons and join the resulting audio files.
Convert Lesson Text to Audio
Input plain text and get back mp3, wav, opus, flac, or pcm files. For texts exceeding the limit, the service splits the content into manageable chunks and concatenates them, ensuring a continuous listening experience without manual intervention.
Support for 23 Languages
Generate content in Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, or Turkish. Any voice can speak any supported language.
- Set the language parameter to avoid guessing errors, especially for Latin-script non-English text.
Consistent Voice Quality
Deliver uniform audio across all devices and browsers, replacing the inconsistent Web Speech API. Each file includes an inaudible watermark marking it as synthetic speech, ensuring clear attribution for your training materials.
Voice Options for Training Content
Selecting the right voice ensures your course audio matches the learning context. Our eight presets cover the full spectrum of instructional needs, from dry technical explanations to narrative-driven lessons.
Neutral Instructional Voices
Use Sage for clear, calm instructional content or Atlas for neutral news-style delivery. These voices maintain consistent pacing and tone, ideal for complex technical material where listener attention must remain on the information rather than the narrator's personality.
- Sage: Calm, instructional tone
- Atlas: Neutral, news-style delivery
Engaging Storytelling Narrators
Luna offers a soft, storytelling style perfect for case studies or narrative-based learning. Nova provides a bright, upbeat energy suitable for introductory modules or motivational content, keeping learners engaged without sounding artificial.
- Luna: Soft, storytelling style
- Nova: Bright, upbeat energy
Professional News-Style Delivery
For formal updates or structured briefings, Atlas delivers a professional, authoritative tone. Felix adds energetic emphasis for promotional course segments. Each voice is based on licensed recordings, ensuring high-quality, consistent audio across all devices.
- Atlas: Professional, authoritative tone
- Felix: Energetic, promotional emphasis
Technical Integration for Developers
The API endpoint mirrors the standard OpenAI speech interface, allowing you to reuse existing client libraries by simply updating the base URL. This compatibility means your development team can integrate LMS Speech API without rewriting core audio generation logic or learning a new SDK structure.
Requests are handled via standard POST calls with JSON bodies, accepting text input, voice selection, and formatting options. The system processes these instructions to return the synthesized audio file directly in the response, streamlining the workflow for automated course audio pipelines.
OpenAI-Compatible Endpoint
Use the standard POST /v1/audio/speech endpoint by setting your base URL to https://api.k101.info/v1. This ensures that official OpenAI SDKs work by changing the base URL to https://api.k101.info/v1.
Simple JSON Requests
Send a JSON payload containing the model, input text (up to 4096 characters), voice, and response_format. The API handles the synthesis and returns the audio file directly, eliminating the need for polling or complex state management in your LMS backend.
Multiple Audio Formats
Specify your preferred output format using the response_format field. Supported formats include mp3, wav, opus, flac, and pcm, allowing you to choose the optimal balance between file size and quality for your specific learning management system requirements.
Cost Efficiency for Bulk Generation
LMS administrators generating audio for large course libraries benefit from a straightforward pricing model that scales with actual usage. Instead of committing to expensive monthly subscriptions, you pay only for the characters you process. This approach ensures that costs remain predictable and directly tied to the volume of your training content.
Pay Per Character Used
The rate is $10 per 1 million characters, or $0.01 per 1,000 characters. Spaces and punctuation count toward this total, providing clear visibility into costs. This structure allows you to budget accurately for bulk generation projects without overpaying for unused capacity.
No Monthly Minimums
There are no monthly plans, seats, or minimum spend requirements. Your balance does not expire, and you can top up via USDT on the TRON network (TRC-20) whenever needed. This flexibility supports irregular usage patterns common in e-learning, where content updates may spike periodically rather than constantly.
Free Failed Requests
If synthesis fails due to server issues, the charge is returned in full. You only pay for successfully generated audio files. This reduces financial risk when processing large batches of lesson text, ensuring you are not billed for errors outside your control.

Data Privacy and Usage
Our API treats your educational content as ephemeral data, ensuring that the input text is used exclusively for the immediate synthesis of the requested audio file. We do not retain your lesson scripts to train our models, meaning your proprietary course material remains distinct from our training datasets.
Generated audio files are returned directly in the response and are not persistently stored on our servers after delivery. Only the necessary request metadata—such as timestamp, character count, and status—is retained for accurate billing and usage tracking.
Text Not Used for Training
Input text is processed solely to generate the specific audio file requested. It is not ingested into our training data pool, ensuring that your unique course content and instructional phrasing remain private and are not used to improve or alter our underlying voice models.
This distinction is critical for educational institutions that require strict separation between their proprietary curriculum and the AI engine powering the audio output.
- Input text is used only for immediate synthesis.
- Content is not added to training datasets.
- Proprietary course scripts remain private.
No Persistent Audio Storage
Once the audio file is delivered to your client or LMS platform, it is not stored on our servers. This minimizes data retention risks and ensures that your generated audio assets are controlled entirely by your own infrastructure.
The API returns the audio file in the response, allowing you to store, cache, or distribute it according to your own privacy policies and storage limits.
- Audio is returned in the response.
- No permanent storage on our servers.
- You control the final audio assets.
Metadata for Billing
We retain minimal request metadata, including the timestamp, character count, and request status. This data is used exclusively to calculate accurate charges based on the $0.01 per 1,000 characters rate and to verify that requests were processed.
No content metadata is kept longer than necessary for billing reconciliation, ensuring transparency in your usage costs without retaining the actual text or audio content.
- Timestamps are kept for billing.
- Character counts are logged for accurate invoicing.
- Request status is recorded for troubleshooting.
Comparison: Web Speech vs Cloud TTS
The browser’s built-in Web Speech API varies significantly depending on the user’s device, operating system, and browser version. One student might hear a robotic male voice while another hears a natural female voice, creating a disjointed learning experience. Cloud TTS provides a single, consistent audio output for every user, ensuring your course sounds exactly as intended on any device.
With cloud TTS, you control the exact voice used for every lesson. You are no longer at the mercy of the user’s system default. This consistency is critical for branding and instructional clarity, especially when using specific voice presets designed for narration or instruction.
Consistency Across Browsers
Browser APIs return different voices based on the user’s OS and device. Cloud TTS delivers the same audio quality and voice selection to every learner, regardless of whether they use Chrome on Windows, Safari on iOS, or Firefox on Linux.
This eliminates the inconsistency where a lesson sounds different on one device than another, ensuring a uniform educational experience across your entire student base.
- Same voice for all users
- No dependency on OS defaults
- Uniform audio quality
Voice Variety
The Web Speech API offers limited, system-dependent voices. Our API provides eight distinct presets: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, and Orion. You can choose a calm narrator for storytelling or a neutral voice for news-style updates.
This variety allows you to match the tone of your content precisely, whether it is a friendly conversational lesson or a serious documentary-style lecture, without relying on the user’s installed language packs.
- 8 distinct voice presets
- Choose tone for content type
- Not limited by user's OS
Control Over Speed and Format
Browser APIs offer minimal control, often lacking speed adjustment or format options. Our API allows you to set speed from 0.25x to 4.0x and choose output formats like MP3, WAV, OPUS, FLAC, or PCM.
This control ensures the audio integrates seamlessly into your LMS player, loads quickly, and can be adjusted for accessibility needs without re-recording the content.
- Adjustable speed (0.25x–4.0x)
- Multiple audio formats (MP3, WAV, etc.)
- Precise control over output
Getting Started with LMS Audio
Start by visiting the /get-api-key/ page to create your account. You can sign in with Google for an immediate $0.50 trial credit or use an email and password. Your unique API key appears on the dashboard, ready for integration.
Use the provided curl example to test the endpoint with a short lesson excerpt. Verify that the audio generates correctly and matches your expected voice preset before scaling up to full course modules.
Sign Up for an API Key
Navigate to the registration page to initialize your account. Google sign-in provides instant trial credit, while email registration starts without trial credit.
Test with Sample Text
Send a small text payload to the /v1/audio/speech endpoint to validate connectivity. Check the response for the audio file and confirm the character count matches your billing expectations.
Generate Course Audio
Integrate the API into your LMS workflow. Split longer texts into 4096-character chunks if needed, and combine the resulting audio files for seamless playback in your training modules.
- Use the OpenAI SDK or direct HTTP requests
- Adjust speed between 0.25x and 4.0x
- Select from 8 distinct voice presets
Support for Course Creators
We provide straightforward assistance for LMS administrators and course creators who need reliable audio generation without complex infrastructure management. Our support is email-only. Developers can refer to our comprehensive documentation for clear integration steps and code examples.
Voice presets are curated to match common e-learning content types. Use Sage for instructional modules, Luna for storytelling, or Atlas for news-style updates. This consistency helps maintain professional quality across all your training materials.
Email Support Available
All support requests are handled via email. We do not offer phone lines or live chat, so please include your API key and a description of the issue. Responses are provided promptly to help you resolve integration or billing questions efficiently.
Our support team understands the specific needs of online course platforms, from bulk audio generation to voice consistency across modules.
Documentation for Developers
Our documentation covers the OpenAI-compatible endpoint structure, allowing you to use existing SDKs with a simple base URL change. You will find clear examples for requests, along with details on all available parameters.
Integration is designed to be seamless, requiring only your API key and standard JSON payloads. We provide guidance on handling rate limits and character splitting for longer lessons.
- OpenAI SDK compatibility
- Python, JS, and cURL examples
- Rate limit guidelines
Voice Presets for Different Content Types
Select voices that align with your content style. Sage offers calm, instructional tones for lectures, while Luna provides a soft, storytelling voice for narrative modules. Felix adds energy to promotional content, and Atlas ensures neutral delivery for news updates.
All eight voices support 23 languages, allowing you to localize content without losing voice consistency. You can adjust speed between 0.25 and 4.0 to match your preferred pacing.
- Sage for instruction
- Luna for storytelling
- Felix for promo
- Atlas for news
Listen to the 8 voices
Each sample below was generated by this API from the same sentence. Reliable voice selection allows educators to match tone to content, whether it is instructional guidance or narrative storytelling.
23 languages
Any voice speaks any of these languages.
Sources and further reading
- Wikipedia
- openai-python on GitHub
- LibriVox public-domain audiobooks
- Creative Commons Attribution 4.0
- OpenAI API reference: create speech
- Tether (USDT)
- LibriTTS-R paper (arXiv 2305.18802)
- Node.js documentation
- MDN: Web Speech API
- LibriTTS-R corpus (OpenSLR 141)
- W3C WAI: making audio and video accessible
- IETF RFC 7845: Ogg Opus
