Text to Speech API Documentation for Developers

By Dyslexia TTS Studio editorial team · Updated 2026-11-18

This documentation provides the technical reference for integrating the Dyslexia TTS Studio API into your publisher workflows. You will find the exact request structures, supported models, and voice presets required to convert long-form text into accessible audio for readers with dyslexia and visual impairments. The guide covers all essential endpoints, from authentication to audio delivery, ensuring you can implement the service without complex enterprise contracts.

The API uses a standard JSON structure compatible with OpenAI SDKs, allowing for straightforward integration into existing content pipelines. You will learn how to manage API keys, handle rate limits, and select appropriate response formats like MP3 or WAV. By following these practical steps, you can reliably generate clear, natural-sounding audio files that meet accessibility standards for your digital publications.

Text to Speech API Documentation for Developers

Frequently asked questions

How do I get an API key?

Sign up on the /get-api-key/ page using Google or email and password. Accounts are per site. The page shows the key, balance, trial, characters left, usage and a ready curl example.

Is the API compatible with OpenAI SDK?

Yes. The request shape matches the OpenAI speech endpoint. You can use official OpenAI SDKs by changing the base_url to https://api.7u777casino.com/v1 and providing your site-specific API key for authentication.

What is the base URL?

The API base URL is https://api.7u777casino.com/v1. Use this endpoint for all requests, including POST /v1/audio/speech for synthesis and GET /v1/voices for listing available voices, languages, formats, and price.

How do I set the language?

Include the optional 'language' field in your JSON body with an ISO code. If omitted, the system guesses the language from the script, defaulting to English for Latin text. Explicitly setting it ensures accuracy for non-English Latin-script content.

What happens if I exceed the rate limit?

You are limited to 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so exceeding limits may cause your request to wait in a queue until capacity is available.

Can I change the voice mid-request?

No. Each request generates audio for a single voice preset. To change voices, you must send separate requests for each segment and join the resulting audio files. You can switch voices between requests freely.

Does the API support SSML?

No. The API accepts plain text input up to 4096 characters. It does not support SSML, phoneme dictionaries, or custom pronunciation lexicons. You must manage text segmentation and formatting in your application logic.

Is there a WebSocket endpoint?

No. The API uses standard HTTP POST requests. Audio is returned in the response body or as a file download. There is no streaming or WebSocket support for real-time partial audio delivery.

How do I handle errors?

If synthesis fails, the charge is returned in full. Check your HTTP response status codes. Failed requests do not consume your character balance, ensuring you are not billed for unsuccessful generation attempts.

What is the maximum text length?

The maximum input text length is 4096 characters per request. For longer texts, split your content into chunks of up to 4096 characters, generate audio for each, and join the resulting audio files.

Can I stream the audio?

No. The API returns the complete audio file in the response. There is no streaming endpoint or WebSocket support. You receive the full file once generation is complete, which may take time for long texts.

Is there a client library?

There is no official SDK of our own. However, you can use the official OpenAI SDKs by pointing them to our base URL. Alternatively, you can use plain HTTP requests to interact with the API.

How do I rotate my API key?

You can issue a new API key at any time from your account dashboard. When a new key is issued, the old one stops working immediately. This allows for seamless key rotation without downtime.

What happens if the service is down?

There is no SLA, no uptime guarantee. If the service is unavailable, requests may fail or queue. Failed requests are free, so you are not charged for audio that was not successfully generated.

First request

curl

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

Authentication and Keys

Sound wave illustration for: Authentication and Keys

Access the Dyslexia TTS API by creating an account on our /get-api-key/ page. You can sign in using Google or create a standard email and password account. Once authenticated, your unique API key is displayed immediately alongside your current balance and usage statistics.

This key grants you full access to the speech synthesis endpoint. You may generate a new key at any time via your dashboard; the previous key becomes invalid instantly, ensuring secure access control for your publishing workflows.

Generate API Key

Generate API Key

Navigate to the /get-api-key/ page to create your account. Signing in with Google provides a $0.50 trial credit valid for 7 days, while email-based accounts start without trial credit. Your API key is generated instantly and can be viewed or regenerated at any time.

Authorization Header Format

Authorization Header Format

Include your API key in the HTTP header of every request to the base URL https://api.7u777casino.com/v1. The header must follow the standard Bearer token format to authenticate your requests.

  • Header: Authorization: Bearer tts-...
  • Format: Bearer followed by your unique key string.
  • One active key per account; new keys replace old ones immediately.

Key Rotation Process

Rotate your key directly from the dashboard. When you issue a new key, the previous one stops working immediately. This ensures that if a key is compromised or no longer needed, access is revoked without delay.

Endpoint: /v1/audio/speech

Sound wave illustration for: Endpoint: /v1/audio/speech

Send a POST request to https://api.7u777casino.com/v1/audio/speech with your API key and text payload. The API processes input up to 4096 characters per request, returning a single audio file.

For longer texts, split the content into chunks of 4096 characters, generate each segment, and join the resulting audio files. This ensures consistent playback for publishers creating accessible content.

POST Request Structure

Use standard HTTP POST to the speech endpoint. Include the Authorization: Bearer tts-... header with your active key. The request body must be valid JSON containing the required fields for synthesis.

JSON Body Fields

The body requires model (tts-1 or tts-1-hd), input (text string), and voice (one of 8 presets). Optional fields include response_format, speed (0.25–4.0), and language (ISO code).

If language is omitted, the system guesses based on the script; Latin text defaults to English. Set language explicitly for non-English Latin-script text to ensure accuracy.

  • model: "tts-1" or "tts-1-hd"
  • input: text up to 4096 characters
  • voice: aria, nova, luna, sage, felix, milo, atlas, orion
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: 0.25 to 4.0
  • language: optional ISO code

Response Audio File

On success, receive a binary audio file in the specified format. Failed requests return zero charges. Generated audio is not stored on our servers.

Supported Models

Sound wave illustration for: Supported Models

Both models utilize the same underlying synthesis engine, ensuring consistent voice quality and character pricing regardless of your selection. The primary difference lies in the output format capabilities rather than generation quality or speed.

tts-1 Model

Standard generation suitable for most accessible content needs. It processes text efficiently, delivering audio files that meet standard readability requirements for dyslexic readers.

tts-1-hd Model

Select this model if you require higher fidelity output. It is suitable for long-form audiobooks, offering the same engine quality as tts-1.

Same Engine and Price

Since both models share the same engine, you pay the same rate of $10 per 1 million characters for either choice. There is no price premium for the "hd" designation, making it easy to swap models without affecting your budget calculations.

Voice Selection

Sound wave illustration for: Voice Selection

Select one of eight preset voices optimized for clarity and reduced cognitive load. Each voice offers a distinct tonal quality suitable for long-form accessibility content.

Voices are based on licensed recordings from LibriTTS-R and LibriVox. Every generated file contains an inaudible watermark identifying it as synthetic speech.

8 Preset Voices

Choose from four female and four male presets. Options include aria (warm narrator), nova (bright), luna (soft storytelling), sage (calm instructional), felix (energetic), milo (friendly), atlas (neutral news), and orion (deep documentary).

All voices support all 23 listed languages. Select the preset that best matches the tone of your published material.

  • 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

Voice Parameters

Each voice supports a speed adjustment between 0.25 and 4.0. Adjusting speed allows readers to consume content at their preferred pace.

The engine processes requests sequentially. Under load, a request may wait in a queue before synthesis begins.

Language Code Specification

Specify the language using an ISO code (e.g., 'en', 'de', 'es'). 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 parameter to ensure accurate pronunciation. The system does not support Vietnamese, Indonesian, Thai, or Ukrainian.

Response Formats

Sound wave illustration for: Response Formats

Choose the response_format that best fits your accessibility workflow. MP3 offers efficient compression for web delivery, while WAV provides uncompressed quality for local editing.

MP3 Format

The default format. MP3 files are compact and widely supported by screen readers and audio players, making them ideal for embedding in web pages or delivering via email.

WAV Format

WAV provides uncompressed audio. Use this format when you need maximum fidelity for archival purposes or further processing in audio editing software.

OPUS, FLAC, PCM Options

OPUS offers high-quality compression for low-bandwidth environments. FLAC provides lossless compression for storage efficiency. PCM returns raw audio data without any compression overhead.

Response Formats

Rate Limits and Quotas

Sound wave illustration for: Rate Limits and Quotas

Understanding rate limits ensures your audio generation pipeline remains stable, especially when processing long-form articles or audiobooks in bulk. Requests are processed one after another, so under load a request may wait in a queue.

Knowing how requests queue during peak usage helps you design your publishing workflow to avoid delays during high-traffic periods.

60 Requests per Minute

Each API key is limited to 60 requests per minute. This limit applies to the total number of synthesis attempts, regardless of text length. Exceeding this threshold will result in a 429 Too Many Requests error until the window resets.

  • Limit: 60 requests/minute/key
  • Applies to all request types
  • Resets on a sliding window

10 Requests Before Top-up

New accounts or those with zero balance start with a reduced limit of 10 requests per minute. This ensures efficient use of resources during the free trial phase or while awaiting payment confirmation.

Queue Behavior

Requests are processed one after another. Under heavy load, a request may wait in a queue before synthesis begins. Typical generation speed is roughly real-time (25 characters per second), but short phrases may take a few seconds to process. Longer texts are split into parts of up to 4096 characters and joined by the client.

Error Handling

Sound wave illustration for: Error Handling

API errors return standard HTTP status codes with a JSON body explaining the failure. Failed requests are free: if synthesis fails, the charge is returned in full.

Implement retry logic with exponential backoff for transient 5xx errors. Always check the response body for specific error messages before re-submitting.

Common Error Codes

400 Bad Request: Invalid JSON, missing required fields, or unsupported voice/language combination.

401 Unauthorized: Invalid or expired API key.

429 Too Many Requests: Exceeded 60 requests per minute limit. Wait before retrying.

500/503 Server Errors: Temporary service issues. Retrying with backoff is safe.

  • 400: Invalid request structure or parameters
  • 401: API key missing or invalid
  • 429: Rate limit exceeded (60 req/min)
  • 500/503: Internal server error or maintenance

Retry Logic

For 5xx errors, implement exponential backoff starting at 1 second. Retry logic is up to the client implementation.

Failed synthesis is free, so retrying on failure does not incur additional costs. However, respect the rate limit to avoid 429 errors.

  • Retry 5xx errors with exponential backoff
  • Do not retry 4xx errors (except rate limits)
  • Failed requests are free, so retries are safe

Character Limit Exceeded

The API accepts up to 4096 characters per request. If your text exceeds this limit, split it into chunks of 4096 characters.

Generate audio for each chunk and join the files. This ensures consistent performance and avoids truncation.

  • Max 4096 characters per request
  • Split long texts into chunks
  • Join audio files for complete output

Example Code Snippets

Sound wave illustration for: Example Code Snippets

Integrate the TTS API using standard HTTP methods or the OpenAI SDK. The following examples demonstrate how to send text and receive audio files for accessible content generation.

Ensure you replace the placeholder key with your actual API token. The base URL is https://api.7u777casino.com/v1 for all requests.

cURL Request Example

Use this command to generate speech. Replace YOUR_API_KEY with your token from /get-api-key/.

  • curl -X POST https://api.7u777casino.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova", "response_format": "mp3"}'

OpenAI SDK Python Example

Install the openai package and configure the base URL to point to our API.

  • import openai client = openai.OpenAI(api_key="YOUR_API_KEY", base_url="https://api.7u777casino.com/v1") speech_file = client.audio.speech.create(model="tts-1", voice="nova", input="Access content here")

JavaScript Fetch Example

Send a POST request with your API key in the header. The response is an audio blob.

  • fetch('https://api.7u777casino.com/v1/audio/speech', { method: 'POST', headers: { 'Authorization': 'Bearer YOUR_API_KEY', 'Content-Type': 'application/json' }, body: JSON.stringify({ model: 'tts-1', voice: 'nova', input: 'Text content' }) })

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. If you create an account using an email and password, this trial credit is not included, so ensure you use the Google sign-in option to access the trial funds.

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. OpenAI API reference: create speech
  3. W3C WAI: making audio and video accessible
  4. Node.js documentation
  5. ISO 639 language codes
  6. openai-python on GitHub
  7. openai-node on GitHub
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. curl documentation
  10. MDN: Web Speech API
  11. Creative Commons Attribution 4.0
  12. LibriVox public-domain audiobooks

More on this site