API Documentation: Generate Audio with Code

By ReadWell Editorial Team · Updated 2026-11-18

This documentation explains how to integrate ReadWell’s text-to-speech API into your educational tools. You will find clear examples for generating audio files from lesson plans and reading materials using standard HTTP requests or the OpenAI SDK. The guide covers voice selection, language settings, and formatting options so your team can build reliable audio features without complex software.

Designed for teachers and school product teams, this page helps you turn text into clear audio efficiently. We provide concrete code snippets, pricing details, and limits tailored to educational workflows. Whether you are adding accessibility features or creating audio versions of documents, you will find everything you need to start building immediately.

API Documentation: Generate Audio with Code

Frequently asked questions

How do I get an API key?

Sign up on our /get-api-key/ page using Google or email and password. Your account is specific to this site. Once registered, you will 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 OpenAI Python SDK?

Yes. Our endpoint matches the OpenAI speech request shape. Simply change the base_url to https://api.vip7slot.com/v1 and use your ReadWell key. The official OpenAI SDKs work directly with this configuration, allowing you to integrate text-to-speech into your Python applications without custom client code.

What is the base URL for the API?

The API base URL is https://api.vip7slot.com/v1. You send POST requests to https://api.vip7slot.com/v1/audio/speech. Other endpoints like /v1/voices and /v1/models are also available at this base URL for retrieving voice lists, languages, formats, and pricing information.

How do I handle rate limits?

You are limited to 60 requests per minute per key, or 10 per minute before your first top-up. Requests are processed sequentially, so under load, your request may wait in a queue. Ensure your implementation handles retries or delays if you exceed these limits during peak usage.

What audio formats are supported?

We support mp3, wav, opus, flac, and pcm. You specify the desired format using the response_format field in your request. Each generated file carries an inaudible watermark marking it as synthetic speech. Choose the format that best fits your educational platform's playback requirements.

Can I change the voice mid-sentence?

No. Each request generates audio for a single voice preset. To change voices, you must split your text into separate requests, specifying the desired voice for each part. You then join the resulting audio files together in your application to create the final continuous audio output.

How do I specify a language?

Pass the optional 'language' field with an ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, always set the language explicitly to ensure accurate pronunciation and avoid incorrect language detection.

What happens if the API is down?

Failed requests are free; if synthesis fails, the charge is returned in full. We do not offer an SLA or uptime guarantee. If the service is unavailable, your request will fail, and you will not be billed for characters processed during that failed attempt.

Do I need to install extra libraries?

No. You can use the official OpenAI SDKs or plain HTTP requests. No custom library is required. Simply point your HTTP client to our base URL. This makes integration simple for teachers and product teams who want to add TTS without managing complex dependencies.

How do I test the API before buying?

Sign in with Google to receive a free trial credit of $0.50, valid for 7 days. This covers about 50,000 characters. Accounts created with email and password start without trial credit. Use this credit to test voices, formats, and integration workflows before making a top-up.

Is the API documentation public?

Yes, this documentation is public. You can also access /v1/voices and /v1/models endpoints to retrieve technical details about available voices, languages, and formats. The request shape matches the OpenAI speech endpoint, making it easy to find examples and integrate using standard developer resources.

Can I use the API in a classroom?

Yes. Our API is built for reliability and simple integration, making it easy to add text-to-speech to educational tools. You can convert lesson plans and reading materials into clear audio. Each account is per site, so you can manage keys and usage specifically for your classroom needs.

How do I handle long texts?

Split your text into parts of up to 4096 characters. Send each part as a separate request to the /v1/audio/speech endpoint. Then, join the returned audio files in your application. This ensures you stay within character limits while generating complete audio for longer documents or books.

What is the speed range for voices?

You can adjust the speed between 0.25 and 4.0. This allows you to slow down narration for clarity or speed up content for quick reviews. Set the 'speed' field in your request body. Typical generation speed is roughly real-time, processing about 25 characters per second.

First request

curl

curl https://api.vip7slot.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.mp3

Python (openai)

from openai import OpenAI

client = OpenAI(base_url="https://api.vip7slot.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.vip7slot.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
ariafemale
novafemale
lunafemale
sagefemale
felixmale
milomale
atlasmale
orionmale
language
arالعربية
zh中文
daDansk
nlNederlands
enEnglish
fiSuomi
frFrançais
deDeutsch
elΕλληνικά
heעברית
hiहिन्दी
itItaliano
ja日本語
ko한국어
msBahasa Melayu
noNorsk
plPolski
ptPortuguês
ruРусский
esEspañol
swKiswahili
svSvenska
trTürkçe

Quick Start with cURL

Sound wave illustration for: Quick Start with cURL

Get started with the ReadWell TTS API by sending a simple POST request. You only need a valid API key and a short text sample to generate clear audio suitable for classroom materials.

This section covers the essential cURL command to test your integration immediately. Verify your key works before building into your lesson plan tools.

### Get Your API Key Navigate to /get-api-key/ on vip7slot.com to sign up via Google or email. Your unique API key appears immediately on the dashboard, ready for use.

### Basic Request Example Use this cURL command to convert text to speech. Replace YOUR_API_KEY with your key from the dashboard. ```bash curl -X POST https://api.vip7slot.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello, this is a test for students.", "voice": "nova"}' ``` ### Response Format The API returns the audio file directly in the response body. Supported formats include mp3, wav, opus, flac, and pcm. If synthesis fails, the request is free and no characters are deducted from your balance.

Using the OpenAI SDK

Sound wave illustration for: Using the OpenAI SDK

ReadWell’s API mirrors the OpenAI speech endpoint structure, allowing you to use the official OpenAI Python or JavaScript SDKs with minimal changes. This means your existing codebase can integrate text-to-speech without learning a new library.

Install the SDK

Install the SDK

Install the official package via your preferred package manager. For Python, run pip install openai. For Node.js, use npm install openai. Ensure your environment has the required dependencies.

Configure Base URL

Configure Base URL

Point the SDK to our API by setting the base_url to https://api.vip7slot.com/v1. Use your API key in the Authorization header. This directs all requests to our processing servers instead of OpenAI’s infrastructure.

  • Base URL: https://api.vip7slot.com/v1
  • Auth Header: Bearer tts-your-api-key

Code Snippet Example

Create a speech object with your chosen model, voice, and input text. The SDK handles the JSON serialization and HTTP POST request automatically. Receive the audio file directly in your application memory or save it to disk.

  • Model: tts-1 or tts-1-hd
  • Voice: e.g., aria, nova, felix
  • Format: mp3, wav, opus, flac, pcm

Available Voices

Sound wave illustration for: Available Voices

ReadWell provides eight distinct voice presets, designed to handle everything from narrating lesson plans to reading accessibility documents. Each voice is based on licensed recordings from LibriVox public-domain audiobooks, ensuring a natural, human-like quality for educational content.

Female Voice Options

Select from four female voices, each tailored for specific reading styles. Aria offers a warm, clear narration ideal for textbooks. Nova provides a bright, upbeat tone for engaging student materials. Luna delivers a soft, storytelling voice for narrative reading. Sage ensures calm, instructional clarity for procedural guides.

  • Aria: warm, clear narrator
  • Nova: bright, upbeat
  • Luna: soft, storytelling
  • Sage: calm, instructional

Male Voice Options

The male preset selection includes four distinct tones. Felix brings energy for promotional school announcements. Milo offers a friendly, conversational style for interactive learning. Atlas provides a neutral, news-style delivery for factual content. Orion adds a deep, documentary feel for historical or detailed readings.

  • Felix: energetic, promo
  • Milo: friendly, conversational
  • Atlas: neutral, news
  • Orion: deep, documentary

Voice Characteristics

All eight voices support 23 languages, including English, Spanish, French, and Mandarin. Any voice can speak any supported language, allowing you to maintain a consistent narrator across different lesson materials. The voices are synthesized from licensed recordings, carrying an inaudible watermark to mark them as synthetic speech.

Audio Formats

Sound wave illustration for: Audio Formats

Choose the audio format that best fits your educational tools. MP3 offers the best balance of quality and file size for most web and mobile applications, while WAV provides uncompressed, high-fidelity audio suitable for premium listening experiences.

Opus and FLAC deliver efficient compression and lossless quality respectively. Select the format that aligns with your bandwidth constraints and storage requirements without compromising on the clarity of the generated speech.

MP3 Support

MP3 is the default and most widely supported format. It provides good audio quality with smaller file sizes, making it ideal for streaming or downloading lesson plans on various devices.

WAV Format

WAV offers uncompressed audio, ensuring the highest fidelity for the generated speech. This format is perfect for archival purposes or when your application requires raw audio data without compression artifacts.

Opus and FLAC Options

Opus provides excellent compression with low latency, suitable for real-time applications. FLAC offers lossless compression, preserving the original audio quality while reducing file size compared to WAV, ideal for storage-efficient backups.

Rate Limits

Sound wave illustration for: Rate Limits

Rate limits ensure reliable audio generation for your educational tools. Each API key allows 60 requests per minute under normal conditions.

60 Requests Per Minute

You can send up to 60 synthesis requests every minute. This limit applies per API key, so plan your batch processing accordingly.

Initial Limit

New keys start with a lower limit of 10 requests per minute. This helps prevent sudden bursts from untested integrations.

Limit After Top-Up

Once you top up your balance with USDT (TRC-20), the limit increases to the full 60 requests per minute. The change is automatic and applies immediately.

Rate Limits

Error Handling

Sound wave illustration for: Error Handling

API responses include standard HTTP status codes to indicate success or failure. Use these codes to determine if your request completed or if an adjustment is needed.

Common Error Codes

A 400 status indicates invalid input, such as exceeding the 4096 character limit or using an unsupported voice or model. A 401 status means your API key is missing or incorrect. A 429 status signals that you have exceeded the 60 requests per minute limit.

  • 400: Bad Request (invalid parameters)
  • 401: Unauthorized (invalid key)
  • 429: Too Many Requests (rate limit exceeded)

Retry Strategy

Implement exponential backoff for transient errors. Wait briefly before retrying requests that fail due to temporary server issues. Avoid rapid retries to prevent overwhelming the API during high load.

Failed Request Refund

If synthesis fails, the charge is returned in full. You are not billed for requests that do not produce audio. Failed requests are free.

Language Settings

Sound wave illustration for: Language Settings

Language handling in the ReadWell API supports 23 languages, including Arabic, Chinese, English, French, German, Japanese, Spanish, and many others. You can control language detection precisely to ensure the synthetic speech matches your educational content’s intended audience.

ISO Language Codes

The API accepts standard ISO 639-1 language codes to specify the target language explicitly. This ensures consistent pronunciation and voice behavior regardless of the input text’s script.

  • Supported codes include: ar, zh, da, nl, en, fi, fr, de, el, he, hi, it, ja, ko, ms, no, pl, pt, ru, es, sw, sv, tr

Auto-Detection

If the language field is omitted, the system guesses the language based on the text’s script. Latin script defaults to English, while other scripts trigger their respective language models.

Explicit Language Set

For non-English Latin-script text, you must set the language parameter explicitly. Without this, the API may default to English, leading to unnatural pronunciation for languages like German or Dutch.

Text Input Limits

Sound wave illustration for: Text Input Limits

Each API request accepts a maximum of 4,096 characters, including spaces and punctuation. This limit ensures consistent processing speed and predictable billing for your lesson plans and reading materials.

4096 Character Limit

Short phrases take a few seconds to generate, while longer texts take roughly real-time (about 25 characters per second). Requests are processed sequentially, so high volume may cause brief queues.

Splitting Long Texts

If your document exceeds 4,096 characters, split the text into smaller parts before sending requests. This approach keeps each request within the limit and maintains audio quality for your educational content.

Joining Audio Files

After receiving separate audio files for each part, combine them in your application. The API returns distinct files, allowing your team to manage the final audio assembly directly within your tools.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Teachers need tools that seamlessly integrate into their daily routines without adding administrative friction.

Avatar of the voice aria
ariafemale
Avatar of the voice nova
novafemale
Avatar of the voice luna
lunafemale
Avatar of the voice sage
sagefemale
Avatar of the voice felix
felixmale
Avatar of the voice milo
milomale
Avatar of the voice atlas
atlasmale
Avatar of the voice orion
orionmale

23 languages

Any voice speaks any of these languages.

Sources and further reading

  1. Wikipedia
  2. Node.js documentation
  3. IETF RFC 7845: Ogg Opus
  4. LibriTTS-R paper (arXiv 2305.18802)
  5. OpenAI API reference: create speech
  6. TRON developer hub: TRC-20
  7. MDN: Web Speech API
  8. Tether (USDT)
  9. openai-python on GitHub
  10. Python documentation
  11. LibriTTS-R corpus (OpenSLR 141)
  12. LibriVox public-domain audiobooks

More on this site