API Documentation for Text-to-Speech Integration

By SynthLogix editorial team · Updated 2026-11-19

This documentation provides the technical specifications for integrating the SynthLogix text-to-speech API into WordPress plugins, freelance CMS workflows, and custom applications. You will find precise details on authentication, request structures, and response handling, enabling you to generate audio files programmatically without external dependencies.

The guide covers essential parameters such as model selection, voice presets, and speed control, along with practical examples using cURL and the OpenAI SDK. It also details rate limits, error codes, and long-text splitting logic to ensure reliable audio synthesis for your digital content delivery pipeline.

API Documentation for Text-to-Speech Integration

Frequently asked questions

How do I get an API key?

Navigate to /get-api-key/ and sign up using Google or an email and password combination. Your unique key, prefixed with tts-, appears on the dashboard. You may issue a new key at any time, which immediately invalidates the previous one. This key is required for all API requests.

Is the API RESTful?

Yes. The API uses standard HTTP methods. Send text via POST to /v1/audio/speech to receive audio. Retrieve available voices and models using GET requests to /v1/voices and /v1/models respectively. This structure allows straightforward integration with existing HTTP clients and development environments.

Does it work with the OpenAI SDK?

Yes. The request shape matches the OpenAI speech endpoint. Configure your OpenAI SDK by setting the base_url to https://api.5977app.cc/v1 and providing your SynthLogix key. This allows you to use official OpenAI SDKs without modifying your code structure significantly.

What is the base URL?

The base URL for all API requests is https://api.5977app.cc/v1. This endpoint handles both the speech generation POST requests and the GET requests for retrieving voice metadata. Ensure your client library points to this domain to avoid connection errors.

How do I handle authentication?

Include your API key in the Authorization header of every request. The format must be: Authorization: Bearer tts-<your_key>. Each account has one active key at a time. If you generate a new key, the old one stops working immediately.

What formats are supported?

You can specify the response_format parameter as mp3, wav, opus, flac, or pcm. These formats cover most use cases for digital content. Select the format that best fits your delivery pipeline or playback environment when sending the POST request to /v1/audio/speech.

What is the character limit per request?

Each request supports up to 4096 characters of input text. This limit applies to the input field in the JSON body. If your text exceeds this length, you must split it into smaller chunks before sending them to the API endpoint.

How do I handle long texts?

Split your text into parts of up to 4096 characters. Send each part as a separate POST request to /v1/audio/speech. Once you receive the audio files for each chunk, join them sequentially to create the final audio file for your content.

What are the rate limits?

The limit is 60 requests per minute per key. New accounts start with a limit of 10 requests per minute until the first top-up is processed. Exceeding this limit may result in delays as requests are processed sequentially in a queue.

How do I interpret error codes?

Standard HTTP status codes are used. Failed synthesis requests are free, and the charge is returned in full. Check the response body for specific error details. Ensure your key is valid and your input text does not exceed the 4096 character limit.

Can I change the voice speed?

Yes. Use the speed parameter to adjust playback speed between 0.25 and 4.0. The default speed is 1.0. This allows you to optimize audio length for your specific content needs without altering the voice characteristics or the underlying synthesis engine.

Do I need to specify language?

It is recommended. If you omit the language parameter, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language parameter to ensure accurate synthesis and avoid mispronunciation errors.

How do I detect languages?

The API does not have a dedicated detection endpoint. It guesses the language from the script, defaulting to English for Latin characters. You should explicitly set the language parameter using ISO codes for non-English Latin text to ensure correct voice synthesis.

Is JSON the only format?

Yes, the request body must be JSON. You send text, voice, model, and other parameters in a JSON object. The response returns the audio file directly, not as JSON. The input format strictly follows the JSON structure required by the POST endpoint.

First request

curl

curl https://api.5977app.cc/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.5977app.cc/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.5977app.cc/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

Sound wave illustration for: Authentication

SynthLogix requires a valid API key for all requests. You obtain this key by signing up on the /get-api-key/ page using Google or an email address. Each account is issued one active key, which you will use to authenticate your API calls.

API Key Generation

API Key Generation

Generate your key directly from your account dashboard. The system provides a unique string prefixed with 'tts-'. This key is tied to your specific site account and is required to access the speech endpoint.

Bearer Token Usage

Bearer Token Usage

Include your key in the HTTP header as a Bearer token. Use the format Authorization: Bearer tts-<your_key>. This header must be present in every POST request to the speech endpoint.

Ensure no extra spaces are added to the key value. The API validates the token strictly against the active key in your account.

Key Rotation Policy

You can issue a new key at any time from your dashboard. When a new key is generated, the previous key becomes invalid immediately. This ensures that only your current credentials are active.

Use this feature if you suspect a key has been exposed or need to revoke access for a specific integration without changing your password.

Quickstart with cURL

Sound wave illustration for: Quickstart with cURL

SynthLogix provides a standard REST interface for text-to-speech synthesis. This section demonstrates how to generate audio files using command-line tools, which serves as a practical starting point for freelancers integrating audio into WordPress sites or client blogs without requiring complex setup procedures.

The API accepts JSON payloads containing the input text and voice parameters. Successful requests return the generated audio file directly in the response body, allowing for immediate storage or playback in digital content workflows.

Basic Request Structure

Send a POST request to the endpoint https://api.5977app.cc/v1/audio/speech. The request body must be formatted as JSON and include the text to be converted, the selected voice preset, and the desired audio format.

Headers and Parameters

Include the Authorization header with your Bearer token. The JSON body requires the model (tts-1 or tts-1-hd), input (up to 4096 characters), voice, and response_format fields. Optional parameters include speed and language.

Response Handling

A successful response returns an audio file in the specified format (mp3, wav, opus, flac, or pcm). Failed requests return error details without charging the account balance, ensuring no cost is incurred for invalid inputs.

SDK Integration

Sound wave illustration for: SDK Integration

The API endpoint structure mirrors the OpenAI speech endpoint, allowing developers to reuse existing libraries without rewriting core logic. By adjusting the base URL, the official OpenAI SDKs authenticate and process requests seamlessly against SynthLogix infrastructure.

This compatibility extends to standard HTTP clients, enabling direct JSON payloads for integration into WordPress plugins or freelance automation scripts without requiring a proprietary wrapper.

OpenAI SDK Compatibility

SynthLogix adheres to the standard OpenAI TTS request shape. This ensures that libraries written for OpenAI’s TTS endpoint function correctly with minimal configuration changes.

Developers can utilize the official OpenAI SDKs for Python, Node.js, and Go, leveraging familiar methods for handling audio binaries and error responses.

  • Compatible with OpenAI Python, Node.js, and Go SDKs.
  • Standard JSON body structure for POST /v1/audio/speech.
  • Supports standard HTTP client libraries (requests, axios, fetch).

Base URL Configuration

To route requests to SynthLogix, configure your SDK client’s base URL to https://api.5977app.cc/v1. This directs all API calls to the correct SynthLogix endpoints.

Ensure the Authorization header includes your Bearer token (tts-...) as the sole credential. The SDK will append this to every request automatically.

  • Set base_url to https://api.5977app.cc/v1.
  • Use standard Bearer token authentication.
  • No additional endpoint path modifications required.

Language-Specific Clients

While no official SynthLogix SDK exists, the OpenAI SDKs provide sufficient abstraction for all language-specific needs. Developers can instantiate clients in Python, JavaScript, or Go and pass the configured base URL.

For WordPress developers, standard cURL requests or PHP HTTP clients can be used directly, as the JSON structure remains consistent across all integration methods.

  • Use standard OpenAI SDKs for Python, JS, Go.
  • Direct cURL or PHP HTTP clients are fully supported.
  • No proprietary SDK installation required.

Request Parameters

Sound wave illustration for: Request Parameters

SynthLogix provides two model variants, tts-1 and tts-1-hd, which utilize the same underlying engine and pricing structure. The tts-1-hd designation indicates higher fidelity output, while tts-1 offers standard quality. Both models support the full range of voice presets and audio formats defined in the API specification.

Model Selection: tts-1 vs tts-1-hd

The tts-1 and tts-1-hd models share identical pricing at $10 per 1 million characters. There is no functional difference in voice selection or language support between the two. Developers may choose tts-1-hd for projects requiring enhanced audio clarity, or tts-1 for standard digital content generation.

Voice Preset Selection

Select from eight licensed presets based on your content’s tone. Female voices include Aria (warm narrator), Nova (upbeat), Luna (storytelling), and Sage (instructional). Male voices offer Felix (energetic promo), Milo (conversational), Atlas (neutral news), and Orion (deep documentary).

All voices support all 23 listed languages. Specify the language parameter for non-English Latin scripts to ensure accurate pronunciation, as the API defaults to English for Latin text.

  • Aria: Warm, clear narrator
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional
  • Felix: Energetic, promo
  • Milo: Friendly, conversational

Input Text Limits

Each API request accepts a maximum of 4096 characters for the input field. Spaces and punctuation count toward this limit. For longer texts, split the content into chunks of 4096 characters or less and join the resulting audio files sequentially.

Generation speed is approximately real-time (25 characters per second). Short phrases may take a few seconds to process, while longer texts are processed sequentially.

Response Formats

Sound wave illustration for: Response Formats

The API returns audio as a binary stream. You may select the output format using the response_format parameter, which supports MP3, WAV, Opus, FLAC, and PCM. This flexibility allows developers to choose the optimal balance between file size and quality for their specific WordPress plugin or blog audio workflow.

Audio Formats: MP3, WAV, Opus, FLAC, PCM

MP3 and Opus are compressed formats suitable for web delivery. WAV and FLAC provide lossless quality for archival purposes. PCM offers raw, uncompressed audio data. Select the format that matches your content management system's storage and playback requirements.

Binary Data Handling

The response body contains the raw audio bytes. Do not expect JSON metadata in the body. Ensure your HTTP client handles binary data correctly without attempting to decode it as text. Write the stream directly to a file or memory buffer.

Header Information

Standard HTTP headers indicate the content type and length. The Content-Type header matches the requested format. Check the status code to confirm successful synthesis before processing the binary payload. Failed requests return an error JSON object instead.

Response Formats

Rate Limits

Sound wave illustration for: Rate Limits

SynthLogix enforces a strict rate limit of 60 requests per minute per API key. This constraint ensures stable synthesis performance for WordPress plugins and freelance workflows, preventing server overload during high-volume content generation.

60 Requests Per Minute

Each account is allocated a maximum of 60 successful synthesis requests within any one-minute sliding window. Exceeding this threshold triggers a 429 Too Many Requests error. Developers should implement exponential backoff strategies in their automation scripts to handle temporary throttling gracefully.

  • Limit: 60 requests/minute/key
  • Metric: Sliding window
  • Error: HTTP 429

Initial Quota Restrictions

New accounts without a top-up start with a reduced quota of 10 requests per minute. This lower limit applies until the first USDT (TRC-20) top-up is processed. Once credited, the full 60 requests/minute capacity is restored immediately.

Burst Handling

Requests are processed sequentially; under load, a request may wait in a queue. For long texts split into multiple parts, ensure your client respects the rate limit between chunks to avoid queuing delays or errors. Monitor the response headers for current usage status.

Error Codes

Sound wave illustration for: Error Codes

The API returns specific HTTP status codes to indicate request outcomes. Understanding these responses allows for precise error handling in your application logic, ensuring that failed synthesis attempts do not incur unnecessary charges.

Properly handling these codes is essential for maintaining accurate billing records and ensuring a seamless user experience when integrating the TTS endpoint into WordPress plugins or freelance workflows.

400 Bad Request

This error indicates that the request body contains invalid data. Common causes include exceeding the 4096 character limit for the input field, providing an unknown voice preset, or using an incorrect response_format.

Review the JSON payload and ensure all parameters match the documented schema. The API does not charge for these rejected requests.

  • Check input length does not exceed 4096 characters.
  • Verify voice is one of the 8 available presets.
  • Ensure response_format is mp3, wav, opus, flac, or pcm.

429 Too Many Requests

Your key has exceeded the rate limit of 60 requests per minute. New accounts start with a lower limit of 10 requests per minute until the first top-up is processed.

Implement exponential backoff in your client to handle these retries gracefully without overwhelming the endpoint.

  • Standard limit: 60 requests/minute.
  • Initial limit: 10 requests/minute.
  • Limit resets after the first top-up.

500 Server Errors

Indicates a temporary server-side issue during synthesis. The request is not charged if synthesis fails. Retry the request after a short delay; for persistent issues, contact support via email.

No SLA or uptime guarantee is provided for these transient errors. Retry logic should account for potential queueing under load.

  • Retry after short delay.
  • Contact support via email if persistent.

Advanced Usage

Sound wave illustration for: Advanced Usage

To optimize audio duration for specific content types, adjust the playback speed between 0.25 and 4.0. This parameter scales the voice output without altering pitch, allowing freelancers to fit voiceovers precisely into WordPress video timelines or podcast segments without post-production editing.

Speed Control (0.25–4.0)

Set the speed field in your JSON payload to a float value within the 0.25–4.0 range. Values below 1.0 slow the narration, suitable for educational or instructional content, while values above 1.0 increase pace for news updates or quick promotional snippets.

Language Code Specification

Explicitly define the language parameter using ISO 639-1 codes (e.g., en, de, ja) to ensure accurate synthesis. While the API guesses language from Latin script (defaulting to English), non-English Latin text like German or Dutch requires explicit specification to avoid mispronunciation.

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

Long Text Splitting Logic

The API accepts up to 4096 characters per request. For longer scripts, split your text into chunks of this size and concatenate the resulting audio files. This ensures consistent generation quality and prevents truncation of complex sentences.

  • Each chunk generates independently; join outputs sequentially for continuous playback.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. This method is ideal for custom scripts or applications where you need precise control over request parameters like speed and language codes.

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. curl documentation
  3. TRON developer hub: TRC-20
  4. Python documentation
  5. FFmpeg documentation
  6. W3C WAI: making audio and video accessible
  7. Tether (USDT)
  8. MDN: Web Speech API
  9. openai-python on GitHub
  10. LibriTTS-R corpus (OpenSLR 141)
  11. OpenAI API reference: create speech
  12. LibriTTS-R paper (arXiv 2305.18802)

More on this site