Quick Start Guide for Teachers Using TTS API

By Q111 editorial team · Updated 2026-11-19

This guide helps educators and students use the EchoLearn text-to-speech API without writing complex code. You will learn how to convert classroom texts into clear audio files using simple requests. We explain every step, from getting your key to understanding voice options, so you can create accessible reading materials quickly.

You do not need technical expertise to start. We provide ready-to-use examples for both cURL and the OpenAI SDK, which work with our API by simply changing the base URL. This page covers authentication, rate limits, and error handling specifically for teachers who need reliable, affordable audio generation for their lessons.

Quick Start Guide for Teachers Using TTS API

Frequently asked questions

How do I get my API key?

Sign up on the /get-api-key/ page using Google or an email and password. The /get-api-key/ page displays your active API key, balance, and usage details. You can issue a new key at any time, which immediately invalidates the previous one. This key is used for authentication via the Authorization header in your API requests.

Does the API support the OpenAI SDK?

Yes, the request shape matches the OpenAI speech endpoint. You can use the official OpenAI SDKs by changing the base_url to https://api.q111.info/v1 and providing your site's key. This allows you to integrate our TTS service into existing OpenAI-compatible workflows without rewriting your code logic.

What is the maximum text length per request?

The API accepts up to 4096 characters per request. For longer texts, you should split the content into parts of this size and join the resulting audio files. Spaces and punctuation count toward this limit, so plan your input text accordingly to ensure smooth synthesis without truncation.

Can I use the same key for multiple projects?

Yes, one active key is provided per account and can be used across multiple projects. The rate limit of 60 requests per minute applies to the key itself, regardless of how many applications use it. If you need separate limits, you can issue a new key.

How do I handle rate limit errors?

The limit is 60 requests per minute per key, or 10 per minute before the first top-up. If you exceed this, requests may queue or fail. Implement retry logic with exponential backoff in your application to handle temporary delays gracefully and ensure your audio generation completes successfully.

Which audio format is best for students?

MP3 is widely supported and efficient for web playback, while WAV offers uncompressed quality for offline use. FLAC provides lossless compression for archiving. Choose based on your platform's requirements. All formats are generated from the same engine.

What happens if I exceed the character limit?

Requests with input exceeding 4096 characters will fail. You must split your text into smaller chunks of up to 4096 characters each. Process these chunks sequentially or in parallel, then join the resulting audio files to create a continuous listening experience for your students or reading materials.

Is the API compatible with Python?

Yes, since the API follows the OpenAI endpoint structure, you can use the official OpenAI Python SDK. Simply configure the base_url to https://api.q111.info/v1 and use your API key. This allows you to leverage existing Python libraries and code snippets designed for OpenAI-compatible TTS services.

How do I specify a voice in the request?

Include the voice parameter in your JSON body with one of the eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Each voice has a distinct tone, such as warm, upbeat, or calm. The API does not support custom voice cloning, so select from these licensed presets.

Can I adjust the speed of the audio?

Yes, you can set the speed between 0.25 and 4.0 in your request. This allows you to slow down narration for clarity or speed up content for quick reviews. Adjusting speed does not affect the character count or pricing, which remains based on the original input text length.

What is the response format?

The API returns an audio file in the format you requested: mp3, wav, opus, flac, or pcm. The response contains the binary audio data directly. Failed requests are free, and the audio is not stored on our servers, ensuring your data is used only for generation.

How do I check my usage limits?

Visit the /get-api-key/ page on your account dashboard. It displays your current balance, trial status, characters remaining, and usage history. You can also monitor your rate limit status through API responses. Top-ups are processed automatically, and your balance does not expire once credited.

Does the API support SSL?

Yes, the API uses HTTPS. The endpoint https://api.q111.info/v1 employs standard encryption to secure your API keys and data in transit. This ensures that your requests and responses remain protected between your application and our servers during the text-to-speech synthesis process.

Can I use this API in a classroom app?

Yes, the API is designed for educators and students. You can integrate it into no-code tools or custom apps to create accessible reading materials. With simple integration via OpenAI SDKs, it is easy to add audio features to educational platforms.

First request

curl

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

Python (openai)

from openai import OpenAI

client = OpenAI(base_url="https://api.q111.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.q111.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
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

Get Your API Key

Sound wave illustration for: Get Your API Key

Create your EchoLearn account at /get-api-key/ using your Google sign-in or an email and password. This gives you immediate access to the dashboard where you can manage your account settings and view your usage statistics.

Sign up via Google or email

Sign up via Google or email

Signing up with Google provides an instant $0.50 trial credit valid for 7 days. Email-based accounts start without trial credit but offer full access to all features.

Find your key in the dashboard

Find your key in the dashboard

After signing up, navigate to the dashboard to locate your unique API key. This key authenticates your requests to the TTS API and is displayed alongside your current balance and character count.

One active key per account

Each account holds only one active API key at a time. You can issue a new key at any moment; the old key stops working immediately, ensuring your classroom audio conversions remain secure.

First Request with cURL

Sound wave illustration for: First Request with cURL

Getting started with the EchoLearn TTS API is straightforward. You can test the service immediately using cURL, a standard command-line tool available on most operating systems. This method requires no programming knowledge, making it ideal for teachers who want to generate audio files for lesson plans without writing code.

The process involves sending a POST request to the API endpoint with your text and voice preference. The system processes the input and returns the audio file in the response, which you can save to a file.

Basic curl command example

Use this command to send a simple request. Replace YOUR_API_KEY with your key from the dashboard.

curl -X POST https://api.q111.info/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello, this is a test.", "voice": "aria", "response_format": "mp3"}' \ --output audio.mp3

This command uses the 'tts-1' model with the 'aria' voice. The output is saved as 'audio.mp3' in your current directory.

  • Ensure your API key is valid and active.
  • The input text must be under 4096 characters.
  • Supported formats include mp3, wav, opus, flac, and pcm.

Send text and receive audio

The API accepts plain text in the 'input' field. You can specify the 'voice' and 'response_format' to match your needs. For example, use 'nova' for bright, upbeat content or 'sage' for calm instructions.

Once the request is sent, the API generates the audio file. You can then play the file or embed it in your teaching materials. The process is simple and reliable for creating accessible reading materials.

  • Text length limit: 4096 characters per request.
  • Speed can be adjusted between 0.25 and 4.0.
  • Language detection is automatic, but you can specify it explicitly.

Check response status

A successful request returns a 200 OK status code and the audio file. If there is an error, such as an invalid key or text too long, the API returns a specific error code.

You can check the status by examining the HTTP response code. If you receive an error, review your input parameters or check your API key validity. Failed requests do not incur charges.

For troubleshooting, refer to the 'Error Codes and Handling' section for common issues and solutions.

  • 200 OK: Request successful.
  • 401 Unauthorized: Invalid or expired API key.
  • 429 Too Many Requests: Rate limit exceeded.

Using OpenAI SDK

Sound wave illustration for: Using OpenAI SDK

Leverage your existing familiarity with the OpenAI ecosystem by simply redirecting the API base URL. This allows teachers to use official libraries without rewriting integration logic, ensuring a smooth transition for those already comfortable with standard TTS workflows.

Change base_url to our API

Update your client configuration to point to https://api.q111.info/v1 instead of the default OpenAI endpoint. This single change directs all requests to EchoLearn’s infrastructure while maintaining full compatibility with the standard request shape.

  • Base URL: https://api.q111.info/v1
  • No code changes needed for request bodies
  • Uses standard Bearer token auth

Use official OpenAI libraries

Install the standard OpenAI Python or JavaScript library as you normally would. The SDK handles serialization and retries automatically, so you do not need a custom client library just for text-to-speech.

  • Compatible with official OpenAI SDKs
  • Supports Python, Node.js, and other languages
  • No custom dependencies required

Same request structure

Pass your text, voice, and format parameters exactly as you would for OpenAI. The model field accepts tts-1 or tts-1-hd, and the response returns audio data in your chosen format.

  • Use model: "tts-1" or "tts-1-hd"
  • Specify voice from 8 presets
  • Set input with up to 4096 characters

Supported Models and Voices

Sound wave illustration for: Supported Models and Voices

EchoLearn’s API supports two model variants, tts-1 and tts-1-hd, which use the same underlying engine and pricing. This means you can upgrade audio quality without changing your integration logic, as both models have the same price. The choice simply affects the output format's fidelity, ensuring your educational materials meet specific clarity needs.

Both models accept input text up to 4096 characters per request. Since the engine is identical, switching between them is seamless. This consistency allows educators to standardize their audio generation workflows while retaining the flexibility to adjust quality based on the complexity of the reading material or the device where it will be played.

tts-1 and tts-1-hd models

The tts-1 and tts-1-hd models share the same engine and price point. Using either model does not affect your character count or billing rate, which remains $0.01 per 1,000 characters. This uniformity simplifies budgeting for schools, as you never face unexpected costs for switching between standard and high-definition outputs.

Both models handle the same request structure, allowing you to swap parameters easily. This ensures that your existing code remains compatible regardless of the quality setting you choose for a specific lesson or reading assignment.

  • Same engine and processing speed
  • Identical pricing: $0.01 per 1,000 characters
  • No code changes required to switch between models

Select from 8 voice presets

Choose from eight distinct voices, ranging from warm narrators to energetic presenters. Each voice is based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings. These presets cover a wide emotional range, allowing you to match the tone of your content precisely.

All voices support 23 languages, including English, Spanish, German, and Arabic. You can specify a language explicitly or let the system guess it from the text script. This flexibility ensures that your students hear clear, accurate pronunciation regardless of the subject matter.

  • aria: warm, clear narrator
  • nova: bright, upbeat
  • luna: soft, storytelling
  • sage: calm, instructional
  • felix: energetic, promo
  • milo: friendly, conversational
  • atlas: neutral, news
  • orion: deep, documentary

Choose voice by gender and tone

Select voices based on their tonal qualities to enhance student engagement. For example, use sage for calm instructional content or atlas for neutral news-style readings. Each voice offers a distinct character, helping to differentiate between sections of a textbook or lecture notes.

Gender and tone are clearly defined in the voice presets. Female voices include aria, nova, luna, and sage, while male voices include felix, milo, atlas, and orion. This clear categorization helps teachers quickly find the right voice for their specific educational context.

  • Female: aria, nova, luna, sage
  • Male: felix, milo, atlas, orion
  • All voices support all 23 languages

Audio Formats Available

Sound wave illustration for: Audio Formats Available

Choose the audio format that best fits your classroom workflow. We support standard formats to ensure compatibility with most devices and learning management systems without requiring specialized software.

MP3 for web compatibility

MP3 is the most widely supported format for web browsers and mobile apps. It offers a good balance between file size and quality, making it ideal for embedding audio directly into lesson plans or sharing via email links.

WAV for high quality

WAV provides uncompressed audio. This format is suitable for offline use or when importing audio into other software.

Opus and FLAC options

Opus delivers high quality at smaller file sizes, useful for slower connections. FLAC offers lossless compression, preserving original audio quality.

Audio Formats Available

Handling Rate Limits

Sound wave illustration for: Handling Rate Limits

The API allows 60 requests per minute per key (10 per minute before the first top-up). Each request processes independently, though short phrases may take a few seconds to generate.

60 requests per minute limit

You can send up to 60 API calls per minute using your active key. This limit applies per key, so managing your request volume ensures consistent access during peak teaching hours.

  • Limit is 60 requests/minute per key.
  • Requests are processed sequentially under load.

10 requests before top-up

New accounts without a top-up are limited to 10 requests per minute. This lower threshold helps manage initial usage before you add funds via USDT (TRC-20).

  • 10 requests/min without top-up.
  • Upgrade to 60 requests/min after funding.

Queue processing for long texts

Longer texts are split into 4096-character parts and joined. Requests are processed one after another, so under load a request may wait in a queue. Plan your generation time accordingly.

  • Split texts into 4096-character chunks.
  • Join audio files after generation.

Error Codes and Handling

Sound wave illustration for: Error Codes and Handling

When the API encounters an issue, it returns standard HTTP status codes to help you debug. Understanding these responses allows teachers and students to quickly identify why a conversion might fail without needing deep technical expertise.

Common HTTP error codes

A 400 Bad Request indicates invalid input, such as missing fields or invalid parameters. A 401 Unauthorized means your API key is incorrect or expired. A 429 Too Many Requests signals that you have exceeded the 60 requests per minute limit.

  • 400: Invalid JSON or missing required fields
  • 401: Invalid or revoked API key
  • 429: Rate limit exceeded (60 req/min)

How to retry failed requests

If a request fails due to a temporary network issue, you can safely retry it. Failed synthesis requests are free, so retrying does not incur additional charges. Ensure you wait briefly between retries to avoid hitting rate limits again.

Check input text length

Each request supports up to 4,096 characters. If your lesson text exceeds this limit, split it into smaller parts. You can then join the resulting audio files to create a continuous reading experience for your students.

Authentication Details

Sound wave illustration for: Authentication Details

EchoLearn secures your API usage with a single active key per account, ensuring straightforward access for classroom projects. This key authenticates your requests to generate audio files without requiring complex setup.

Bearer token authorization

Include your key in the request header as Authorization: Bearer tts-.... This token validates your account and deducts character usage from your balance securely.

Secure header usage

Place the token in the standard HTTP header. Ensure you do not expose this key in publicly accessible client-side code or shared classroom materials.

Key rotation process

Generate a new key at any time via your dashboard. The previous key stops working immediately, allowing you to revoke access without waiting for expiration.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. This is ideal for educators who want to prototype a feature or test voice options before full integration.

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. MDN: Web Speech API
  3. W3C WAI: making audio and video accessible
  4. curl documentation
  5. OpenAI API reference: create speech
  6. LibriVox public-domain audiobooks
  7. TRON developer hub: TRC-20
  8. openai-python on GitHub
  9. Tether (USDT)
  10. Creative Commons Attribution 4.0
  11. LibriTTS-R corpus (OpenSLR 141)
  12. IETF RFC 7845: Ogg Opus

More on this site