Cloud Text-to-Speech API: Documentation & Integration Guide

By ClarityRead editorial team · Updated 2026-11-18

This guide provides technical documentation for the ClarityRead cloud Text-to-Speech API, designed for publishers integrating audio generation into accessibility and learning platforms. You will find precise specifications for request payloads, response formats, and integration workflows using standard HTTP clients or the OpenAI SDK. The documentation covers essential parameters including voice selection, language codes, and audio output formats to ensure consistent, high-volume production of dyslexia-friendly digital assets.

All endpoints and authentication methods are described with concrete examples, including ready-to-use cURL commands and JSON structures. This page serves technical teams responsible for implementing reliable TTS pipelines, detailing rate limits, error handling, and configuration options such as speed control. Use this reference to integrate ClarityRead’s API into your existing content management or publishing workflows efficiently.

Cloud Text-to-Speech API: Documentation & Integration Guide

Frequently asked questions

What is the API endpoint?

The endpoint is POST https://api.qq1212apk.com/v1/audio/speech. Send a JSON body containing the text, voice selection, and desired output format. This endpoint handles all synthesis requests for the ClarityRead service.

How do I authenticate?

Include an Authorization header with your Bearer token: Authorization: Bearer tts-... . Each account holds one active key. Issuing a new key immediately invalidates the previous one, so update your configuration promptly.

Which models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and pricing structure. Select the model that best fits your quality requirements, as the underlying synthesis capabilities remain identical for both options.

Can I use the OpenAI SDK?

Yes. The request shape matches the OpenAI speech endpoint. Configure your OpenAI SDK client by changing the base_url to https://api.qq1212apk.com/v1 and providing your ClarityRead API key for authentication and usage.

What are the rate limits?

Limits are 60 requests per minute per key. New accounts start with 10 requests per minute until the first top-up is processed. Exceeding these limits may result in temporary throttling of your synthesis requests.

How do I handle errors?

Failed requests are free. Monitor response status codes to identify failures. Since requests are processed sequentially, high load may cause delays, but failed attempts remain free of cost.

What formats are supported?

Supported response formats include mp3, wav, opus, flac, and pcm. Specify your preferred format in the request body. This allows integration with various accessibility tools and learning applications requiring specific audio standards.

How do I set the speed?

Use the speed parameter with a value between 0.25 and 4.0. This adjusts the playback rate of the generated audio. Adjusting speed helps optimize listening experiences for different content types and user preferences.

Is there a character limit?

Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer content, split the text into chunks and process them individually to ensure successful synthesis.

How do I split long texts?

Divide your text into segments of up to 4096 characters. Generate audio for each segment separately, then join the resulting audio files. This workflow ensures consistent quality and manageable request sizes for high-volume production.

What is the base URL?

The base URL is https://api.qq1212apk.com/v1. Use this prefix for all API calls, including voice listing and model information. This URL structure ensures compatibility with standard HTTP clients and existing SDK configurations.

How do I get my API key?

Sign up at /get-api-key/ using Google or email. Your API key appears on the dashboard alongside your balance and usage statistics. Keys are unique per site, so ensure you are on the correct domain.

Are there any SDKs?

We do not provide a proprietary SDK. However, the official OpenAI SDKs work by updating the base_url. You can also use standard HTTP libraries to interact with the API endpoints directly as needed.

How do I test the API?

Use the provided curl example on the /get-api-key/ dashboard. Send a POST request with sample text to verify connectivity. Check the response for audio data and confirm the status code indicates success.

First request

curl

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

Getting Started with the API

Sound wave illustration for: Getting Started with the API

ClarityRead delivers a cloud-based text-to-speech API designed for publishers requiring reliable audio generation for accessibility and learning applications. The service operates via standard HTTP requests, allowing integration into existing digital asset pipelines without specialized middleware.

Obtaining an API Key

Navigate to the /get-api-key/ page to register an account using Google or email credentials. Upon authentication, the dashboard displays your active API key, current balance, and usage statistics. Each account maintains one active key; issuing a new key immediately invalidates the previous one.

  • Accounts are site-specific to qq1212apk.com
  • Support is email-only; no phone support

Base URL Configuration

Configure your client to target the base URL https://api.qq1212apk.com/v1. This endpoint accepts POST requests for audio synthesis and GET requests for voice and model metadata. The request structure mirrors the OpenAI speech endpoint, ensuring compatibility with existing integrations.

Authentication Header

Include your API key in the request header using the format: Authorization: Bearer tts-... . This key authorizes all subsequent requests to the speech endpoint. Ensure the key remains valid, as rotating it in the dashboard instantly deactivates the old key.

Sending Your First Request

Sound wave illustration for: Sending Your First Request

The API accepts text input and returns audio files via a standard HTTP POST request. This section details the exact structure required for successful synthesis, ensuring publishers can integrate the service into their existing content pipelines immediately.

Requests are processed sequentially, meaning under load a request may wait in a queue. Ensure your implementation handles potential delays gracefully, especially when processing high volumes of accessibility content.

cURL Example

Use the following cURL command to test the endpoint. Replace YOUR_API_KEY with your key from the dashboard.

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

JSON Body Structure

The request body must be valid JSON. The input field accepts up to 4096 characters. Spaces and punctuation count toward this limit.

All fields are optional except input, but providing voice and response_format is recommended for consistent output. Note that model is also required. The language field is optional and defaults to English for Latin script.

Required Fields

  • input: The text to convert (max 4096 chars).
  • model: "tts-1" or "tts-1-hd".
  • voice: One of the 8 available presets.
  • response_format: mp3, wav, opus, flac, or pcm.
Sending Your First Request

Supported Models and Voices

Sound wave illustration for: Supported Models and Voices

The API provides two models, tts-1 and tts-1-hd, which utilize the same underlying engine and pricing structure. Users may select either for identical pricing. Each model processes input text up to 4096 characters per request.

Voice selection determines the synthetic speaker’s tonal quality. Eight presets are available, categorized by gender and intended use case. Publishers select voices based on content type, such as neutral tones for news or warm tones for narrative storytelling.

tts-1 and tts-1-hd Models

Both models offer identical audio generation capabilities. The selection between tts-1 and tts-1-hd does not affect pricing. Users may implement either model depending on preference.

  • tts-1: Standard model
  • tts-1-hd: High-definition model

Voice Selection Parameters

Eight voice presets are available for integration. Female voices include aria (warm narrator), nova (upbeat), luna (storytelling), and sage (instructional). Male voices include felix (energetic), milo (conversational), atlas (news), and orion (documentary).

All voices support the full range of 23 languages. Voice selection is passed via the voice parameter in the JSON request body. Each generated file contains an inaudible watermark identifying it as synthetic speech.

  • aria, nova, luna, sage (Female)
  • felix, milo, atlas, orion (Male)

Language Code Specification

The API supports 23 languages, including English, Spanish, French, German, Chinese, Japanese, and Arabic. Users may specify the language using an ISO code in the language field.

If the language parameter is omitted, the system guesses the language from the text script. Latin script defaults to English. For non-English Latin text, explicitly setting the language code is required to ensure accurate synthesis.

  • Arabic, Chinese, Danish, Dutch, English
  • Finnish, French, German, Greek, Hebrew
  • Hindi, Italian, Japanese, Korean, Malay
  • Norwegian, Polish, Portuguese, Russian, Spanish
  • Swahili, Swedish, Turkish

Audio Output Formats

Sound wave illustration for: Audio Output Formats

ClarityRead supports five audio formats to suit different accessibility and production workflows. The response_format parameter accepts mp3, wav, opus, flac, and pcm, allowing publishers to balance file size, quality, and compatibility with their existing digital asset management systems.

MP3 Support

MP3 is the default format, offering efficient compression for web delivery and standard accessibility players. It provides a reliable balance between audio fidelity and bandwidth usage for large-scale publishing projects.

WAV and FLAC Options

WAV and FLAC provide uncompressed or lossless audio, ideal for archival purposes or high-quality learning applications where bit-perfect accuracy is required. FLAC offers lossless compression.

PCM and Opus Formats

PCM delivers raw, uncompressed audio data suitable for direct integration into specialized broadcasting pipelines. Opus provides high-quality audio at lower bitrates, optimizing storage and transmission costs for extensive content libraries.

Rate Limits and Throttling

Sound wave illustration for: Rate Limits and Throttling

The API enforces a standard limit of 60 requests per minute per active key. This capacity supports high-volume publishing workflows, allowing consistent generation of accessibility audio assets without immediate throttling. Requests are processed sequentially, so under heavy load, synthesis may queue slightly behind the initial submission.

Requests Per Minute Limit

Each API key is allocated a maximum of 60 requests per minute. This limit applies to all synthesis calls regardless of audio format or voice selected. Publishers should monitor their usage dashboard to ensure sustained high-volume production remains within these bounds.

  • Limit: 60 requests/minute per key
  • Processing: Sequential
  • Status: 429 Too Many Requests

Pre-Topup Rate Limit

Accounts without an active top-up are restricted to 10 requests per minute. This lower threshold allows for initial testing and validation of the integration before committing to a higher volume of production. Once a top-up is processed, the standard 60 requests/minute limit applies immediately.

  • New accounts: 10 requests/minute
  • Activated accounts: 60 requests/minute

Handling Throttle Errors

When the limit is exceeded, the API returns a 429 status code. Implement exponential backoff in your integration to retry requests after a short delay. Failed synthesis requests do not consume character credits.

  • Error Code: 429
  • Action: Retry with backoff
  • Cost: No credit usage on failure
Rate Limits and Throttling

Error Handling and Status Codes

Sound wave illustration for: Error Handling and Status Codes

The API returns standard HTTP status codes to indicate the outcome of each synthesis request. Understanding these responses allows publishers to implement robust retry logic and monitor production health without guesswork. Most errors are immediate and self-correcting, ensuring minimal disruption to high-volume content pipelines.

Common Error Codes

A 400 Bad Request indicates invalid JSON or missing required fields. A 401 Unauthorized occurs if the API key is missing or invalid. A 429 Too Many Requests signals that the per-minute limit has been exceeded. A 500 Internal Server Error denotes a server error.

  • 400: Invalid input or syntax error
  • 401: Invalid or expired API key
  • 429: Rate limit exceeded (60 req/min)
  • 500: Temporary server error

Handling Timeouts

Requests may time out if the generation queue is congested under load. Short phrases typically complete in seconds, but longer texts may require more processing time. Implement exponential backoff for transient errors to handle queue delays effectively.

Request Validation Errors

The API validates input length strictly. Text exceeding 4096 characters per request returns a validation error. Ensure your integration splits long texts into smaller segments before submission to maintain consistent audio quality and avoid truncation.

  • Max input length: 4096 characters
  • Spaces and punctuation count toward the limit

Integration with OpenAI SDKs

Sound wave illustration for: Integration with OpenAI SDKs

ClarityRead’s API mirrors the OpenAI speech endpoint structure, allowing direct integration with existing OpenAI SDKs. By adjusting the base URL, publishers can utilize standard libraries without custom client code.

Base URL Modification

Set the SDK base URL to https://api.qq1212apk.com/v1. This redirects requests to ClarityRead’s infrastructure while maintaining the standard request shape.

SDK Compatibility

Official OpenAI SDKs (Python, Node.js, etc.) work by overriding the default endpoint. No custom wrapper is required for standard TTS operations.

Example Code Snippets

Configure the client with your tts-... key and the modified base URL. Send a POST request to /audio/speech with the model, input, and voice parameters.

Integration with OpenAI SDKs

Advanced Configuration Options

Sound wave illustration for: Advanced Configuration Options

Adjustable playback speed allows publishers to optimize audio for specific accessibility needs. The API accepts speed values between 0.25 and 4.0, enabling precise control over speech rate without affecting voice quality or synchronization.

Speed Control (0.25–4.0)

Set the speed parameter to modify the generation rate. Values below 1.0 slow the speech, while values above 1.0 increase it. This feature supports diverse learning requirements and ensures consistent audio delivery for dyslexia-friendly content.

Input Text Limits

Each API request accepts a maximum of 4,096 characters for the input field. Spaces, punctuation, and special characters count toward this limit. Requests exceeding this threshold will return a validation error.

Long Text Splitting Strategy

For texts longer than 4,096 characters, split the input into sequential chunks. Generate audio for each chunk individually, then concatenate the resulting files to create a complete audio track. This approach ensures reliable synthesis and accurate billing.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Publishers must ensure their digital content supports diverse reading needs through clear accessibility and dyslexia-friendly design.

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. IETF RFC 7845: Ogg Opus
  3. openai-node on GitHub
  4. LibriTTS-R paper (arXiv 2305.18802)
  5. Creative Commons Attribution 4.0
  6. LibriVox public-domain audiobooks
  7. W3C WAI: making audio and video accessible
  8. MDN: Web Speech API
  9. LibriTTS-R corpus (OpenSLR 141)
  10. Python documentation
  11. OpenAI API reference: create speech
  12. Node.js documentation

More on this site