API Documentation for Text-to-Speech Integration

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

This guide helps no-code creators integrate accessible text-to-speech into their projects using the Dyslexia TTS Review API. You will learn how to generate audio files quickly by sending simple HTTP requests, ensuring your content is readable for diverse audiences without complex infrastructure.

We cover essential integration steps, including authentication, voice selection, and supported formats like MP3 and WAV. By following these examples, you can replace expensive platforms with a transparent, character-based pricing model that scales with your usage.

The documentation assumes you are building web or app experiences where clarity and speed matter. We provide concrete curl examples and SDK instructions to get you from sign-up to your first generated audio file.

All endpoints follow standard patterns, making it easy to switch between services if needed. We focus on practical details like rate limits and error handling, so you can build reliable reading experiences without guessing about backend behavior or hidden constraints.

API Documentation for Text-to-Speech Integration

Frequently asked questions

How do I get an API key?

Sign up on /get-api-key/ using Google or email and password. Accounts are specific to this site. The dashboard displays your active API key, current balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the previous one.

What is the base URL for the API?

The API base URL is https://api.playtbjee.com/v1. Use the POST endpoint at https://api.playtbjee.com/v1/audio/speech for text-to-speech conversion. Other endpoints like /v1/voices and /v1/models are also available under this base URL structure for retrieving configuration details.

Can I use the OpenAI SDK?

Yes. The request shape matches the OpenAI speech endpoint. Configure your OpenAI SDK by changing the base_url to https://api.playtbjee.com/v1 and providing your site-specific API key. This allows you to use official OpenAI SDKs without modification for integration.

What audio formats are supported?

Supported formats are mp3, wav, opus, flac, and pcm. Specify your preference in the response_format field. Each generated file includes an inaudible watermark identifying it as synthetic speech. These formats ensure compatibility with most standard audio players and processing pipelines.

How many requests can I make per minute?

You are limited to 60 requests per minute per key. Before your first top-up, the limit is 10 requests per minute. Requests are processed sequentially, so high load may cause queuing delays. Longer texts must be split into parts of up to 4096 characters and joined.

What happens if I exceed the rate limit?

Requests are processed one after another, potentially waiting in a queue under load. If the queue exceeds capacity or the limit is strictly enforced, requests may fail. Failed requests are free, and the charge is returned in full if synthesis fails.

How do I specify the voice?

Choose from eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Pass the voice name in the request body. You can also optionally set the language using an ISO code. If omitted, the system guesses the language from the script.

What is the character limit per request?

Each request supports up to 4096 characters of input text. For longer texts, split them into parts of this size and join the resulting audio files. Spaces and punctuation count toward the character total used for billing calculations.

How do I handle errors in my code?

Use standard HTTP status codes to detect errors. If synthesis fails, the charge is returned in full. Monitor your response for success indicators. Failed requests do not incur costs, ensuring you only pay for successfully generated audio files.

Is the API RESTful?

Yes, it is a standard RESTful API. Use POST for speech generation and GET for retrieving voices and models. Authentication is handled via the Authorization header. The structure is simple and follows standard web conventions for easy integration into any application.

Do I need to install a specific library?

No specific library is required. You can use plain HTTP requests or the official OpenAI SDK. The API shape is compatible with OpenAI’s speech endpoint. Simply adjust the base URL and provide your API key for immediate use.

Can I use SSL certificates?

Yes, the API endpoint https://api.playtbjee.com/v1 uses standard HTTPS. Ensure your client supports standard SSL verification when making requests to ensure secure transmission of your text and API keys.

How do I check available voices?

Send a GET request to /v1/voices. This endpoint returns details about all available voices, supported languages, formats, and pricing. Use this information to select the appropriate voice preset for your specific text-to-speech generation needs.

What is the response format?

The response contains the generated audio file in the format you requested (mp3, wav, opus, flac, or pcm). The audio is returned directly in the response body. Metadata such as request time and character count is kept for billing purposes.

First request

curl

curl https://api.playtbjee.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.playtbjee.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.playtbjee.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 API by generating a key on our /get-api-key/ page. You can sign in using Google or an email and password combination. Once logged in, the dashboard displays your active key, balance, and a ready-to-use cURL example for immediate testing.

Generate key on /get-api-key/

Generate key on /get-api-key/

Visit the /get-api-key/ page to create your account. Accounts are specific to this site. After signing in, you receive a unique API key to authenticate your requests.

Use Bearer token in Authorization header

Use Bearer token in Authorization header

Include your key in the HTTP Authorization header using the Bearer scheme. The format is Authorization: Bearer tts-.... This token authenticates each request sent to the API endpoint.

One active key per account

Each account holds one active key at a time. If you issue a new key, the previous one stops working immediately. This ensures simple access control for your no-code projects.

First Request with Curl

Sound wave illustration for: First Request with Curl

The API accepts text via a standard HTTP POST request. You send your script to the speech endpoint and receive an audio file in return. This simple structure allows you to integrate speech synthesis into any no-code automation or simple script without complex middleware.

To generate audio, you must provide the model version, your text input, and the desired voice. The system processes these parameters synchronously, returning the audio file directly in the response body for immediate playback or storage.

Basic POST request structure

Send a POST request to the /v1/audio/speech endpoint. Include your API key in the Authorization header as a Bearer token. The request body must be JSON formatted.

The endpoint handles the conversion of your text into the specified audio format. Ensure your text does not exceed 4096 characters per request to avoid truncation.

  • Endpoint: POST https://api.playtbjee.com/v1/audio/speech
  • Header: Authorization: Bearer tts-<your-key>
  • Body: JSON object

Required fields: model, input, voice

The model field accepts either tts-1 or tts-1-hd. Both use the same engine and pricing. The input field contains the text string to be spoken. The voice field specifies one of the eight available presets, such as aria or felix.

Optional fields like response_format and speed allow customization. If omitted, the system defaults to MP3 format and normal speed. The language field can be set explicitly to ensure correct pronunciation for non-English text.

  • model: "tts-1" or "tts-1-hd"
  • input: Your text string (max 4096 chars)
  • voice: e.g., "aria", "nova", "sage"

Example JSON body

Below is a minimal request structure. Replace the placeholder key and text with your own values. This example generates a short audio clip using the aria voice in English.

You can adjust the speed parameter between 0.25 and 4.0 to suit accessibility needs for dyslexic readers. Faster speeds may aid fluency, while slower speeds can aid comprehension.

  • curl -X POST https://api.playtbjee.com/v1/audio/speech \
  • -H "Authorization: Bearer tts-<key>" \
  • -H "Content-Type: application/json" \
  • -d '{"model":"tts-1","input":"Hello world","voice":"aria"}'

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

Leverage existing OpenAI SDKs by pointing them to our API base URL. This allows no-code creators to swap in Dyslexia TTS without rewriting their integration logic, using the same standard libraries they already know.

Change base_url to API endpoint

Update your SDK configuration to point base_url to https://api.playtbjee.com/v1. This single change routes all requests to our infrastructure while maintaining the standard request structure.

Use official OpenAI SDKs

Use the official OpenAI SDKs directly. Since we mimic the OpenAI speech endpoint, you can use the same client libraries without needing a custom wrapper or separate SDK installation.

Compatible request shape

Send JSON bodies identical to the OpenAI format. Include model, input, and voice fields. The SDK handles serialization, so you just pass your text and credentials as usual.

  • Use tts-1 or tts-1-hd for the model field
  • Pass text up to 4096 characters in the input field
  • Specify a voice from the 8 available presets
  • Include your Bearer token in the Authorization header

Supported Audio Formats

Sound wave illustration for: Supported Audio Formats

The API supports multiple audio formats to balance file size and quality. You select the desired output via the response_format field in your request, which accepts mp3, wav, opus, flac, or pcm.

MP3 for web playback

MP3 is the standard for web delivery due to its small file size and universal browser support. It provides sufficient clarity for most reading experiences while minimizing bandwidth usage for your end users.

WAV for high quality

WAV offers uncompressed, lossless audio, preserving every detail of the synthetic voice. This format is ideal for archival purposes or when maximum fidelity is required without further processing.

OPUS, FLAC, PCM options

OPUS provides efficient compression suitable for low-bandwidth environments. FLAC offers lossless compression, reducing file size without quality loss. PCM returns raw audio data, useful for immediate processing pipelines.

  • OPUS: Efficient compression for streaming
  • FLAC: Lossless compression
  • PCM: Raw audio data

Voice and Model Selection

Sound wave illustration for: Voice and Model Selection

Choose between the standard tts-1 and high-quality tts-1-hd models. Both use the same engine and pricing, differing only in audio fidelity. The API treats them interchangeably for basic integration, allowing you to switch based on your specific clarity needs without changing your request structure.

Our eight preset voices are designed for accessible, clear speech. They handle all 23 supported languages. Each voice is based on licensed recordings.

tts-1 and tts-1-hd models

Select tts-1 for efficient, real-time generation or tts-1-hd for enhanced clarity. Both models process text at the same speed and cost, roughly 25 characters per second.

The choice impacts audio detail, not pricing. Since both use the same engine, your existing code works for either. We recommend testing both with your specific text to see which best suits your audience's listening preferences.

  • tts-1: Standard quality, efficient processing
  • tts-1-hd: Enhanced clarity for complex text
  • Same price: $0.01 per 1,000 characters
  • Same speed: ~25 characters/second

8 preset voices available

We offer four female and four male voices, each with a distinct tone. Aria provides a warm, clear narration, while Luna offers a soft, storytelling style. Felix brings energetic energy for promos, and Atlas delivers a neutral, news-like delivery. All voices support all 23 languages.

The voices are built from licensed LibriTTS-R recordings. They include an inaudible watermark to mark them as synthetic. This ensures transparency for your users while maintaining high audio quality. You can switch voices instantly without retraining or custom cloning.

  • Female: Aria, Nova, Luna, Sage
  • Male: Felix, Milo, Atlas, Orion
  • All voices speak all 23 languages
  • No custom voice cloning available

Select voice by name

Pass the voice name directly in the voice field of your JSON request. Use the exact string (e.g., aria, nova, atlas). The API validates the name against the available presets. If the voice is invalid, you receive a 400 error.

You do not need to know the voice ID. Simply reference the name. For non-English Latin text, always set the language parameter to ensure correct pronunciation. The API guesses the language if not specified, but explicit setting is more reliable for accessibility.

  • Use exact voice names in requests
  • Example: "voice": "aria"
  • Case-sensitive string matching
  • Set language for non-English text
Voice and Model Selection

Rate Limits and Quotas

Sound wave illustration for: Rate Limits and Quotas

The API enforces a strict limit of 60 requests per minute per active key. This cap applies uniformly regardless of text length, ensuring predictable throughput for your no-code applications. Each character counts toward your usage, so long texts split into multiple requests consume quota faster.

60 requests per minute per key

Once you reach the 60-request threshold, subsequent requests will return a 429 Too Many Requests error. You must wait until the window resets.

10 requests before first top-up

New accounts start with a reduced limit of 10 requests per minute. This lower threshold applies until you perform your first USDT top-up. After topping up, the standard 60 requests per minute limit is immediately activated.

Queue handling under load

Requests are processed sequentially within the available quota. Under heavy load, your requests may wait in a queue before synthesis begins. This ensures audio quality remains consistent, though it may add slight latency for rapid-fire requests.

Error Handling

Sound wave illustration for: Error Handling

When a request fails, the API returns a standard HTTP status code along with a JSON error object describing the issue. Client errors typically indicate invalid input, such as exceeding the 4,096-character limit. These errors do not consume your character balance, ensuring you are not charged for incorrect submissions.

Server errors (5xx) occur when the synthesis engine encounters an unexpected issue. Since requests are processed sequentially, high traffic may cause temporary queues. Failed synthesis requests are fully refunded, so you are not charged for audio that was not successfully generated.

4xx client errors

Common 4xx errors include invalid API keys, malformed JSON, or missing required fields like model or voice. Check that your text does not exceed 4,096 characters and that the voice parameter matches one of the eight available presets.

  • 400 Bad Request: Invalid JSON or missing fields
  • 401 Unauthorized: Incorrect or expired Bearer token
  • 413 Payload Too Large: Input text exceeds 4,096 characters

5xx server errors

These errors indicate a temporary issue with the speech generation engine. If a synthesis fails, the charge is returned in full. Wait a few seconds and retry the request. If the issue persists, check the /v1/voices endpoint to ensure the requested voice is still available.

  • 500 Internal Server Error: Unexpected engine failure
  • 503 Service Unavailable: Temporary overload or maintenance

Retry logic for failures

Implement exponential backoff for both 4xx and 5xx errors. For rate limit errors (429), wait before retrying, keeping in mind the 60 requests per minute limit per key. Since requests are queued, short delays between retries help prevent overwhelming the system.

Voice Endpoint Details

Sound wave illustration for: Voice Endpoint Details

The GET /v1/voices endpoint provides a complete list of available presets, their supported languages, and compatible audio formats. This allows you to verify compatibility before making synthesis requests, ensuring your text is processed by a voice that supports the target language.

You can also use the GET /v1/models endpoint to confirm available engine options. These endpoints help you build robust selection interfaces for your no-code applications without hardcoding values.

GET /v1/voices for list

Send a GET request to /v1/voices to retrieve all eight presets. Each entry includes the voice name, gender, and a brief description of its tone.

  • Returns a JSON array of voice objects
  • Each object contains name, gender, and description fields
  • Use this list to populate dropdown menus in your app

Include languages and formats

The response details which of the 23 supported languages each voice can speak. It also lists the acceptable response formats (mp3, wav, opus, flac, pcm). This ensures you do not send unsupported format requests.

  • Verify language support before sending text
  • Check compatible audio formats for your use case
  • Avoid errors by matching voice capabilities to your input

Check price per voice

Pricing is uniform across all voices and models. The cost is $0.01 per 1,000 characters, regardless of which preset you select. This simplifies budgeting as you do not need to track different rates for different voices.

  • Standard rate: $10 per 1 million characters
  • No price difference between tts-1 and tts-1-hd
  • No price difference between male and female voices

Listen to the 8 voices

Each sample below was generated by this API from the same sentence.

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. LibriTTS-R paper (arXiv 2305.18802)
  3. Python documentation
  4. LibriVox public-domain audiobooks
  5. openai-node on GitHub
  6. FFmpeg documentation
  7. TRON developer hub: TRC-20
  8. W3C WAI: making audio and video accessible
  9. curl documentation
  10. Tether (USDT)
  11. MDN: Web Speech API
  12. IETF RFC 7845: Ogg Opus

More on this site