Integrate Our Text-to-Speech API with Ease

By TextCast Studio editorial team · Updated 2026-11-18

This guide helps indie developers integrate our text-to-speech API into news publications and content platforms. You will find concrete steps for authentication, request structure, and SDK compatibility, ensuring accurate synthetic voices fit your editorial workflows without unnecessary complexity.

We cover essential details like supported audio formats, voice presets, and rate limits. You will learn how to handle long texts, adjust speech speed, and manage errors efficiently. The instructions are specific to our TTS-1 endpoints, allowing you to start generating audio files quickly and reliably.

Integrate Our Text-to-Speech API with Ease

Frequently asked questions

How do I get an API key?

Sign up on the /get-api-key/ page using Google or email plus password. The dashboard displays your single active key, balance, and usage. You can issue a new key at any time, which immediately invalidates the old one. Accounts created with email do not receive the free trial credit.

What is the base URL?

The API base URL is https://api.abo77login.com/v1. You send POST requests to /audio/speech and GET requests to /voices or /models. This endpoint structure matches the OpenAI speech endpoint, allowing you to use standard HTTP clients or compatible SDKs by adjusting the base URL configuration.

Can I use the OpenAI SDK?

Yes, the official OpenAI SDKs work by changing the base_url to https://api.abo77login.com/v1 and using your site-specific key. The request shape matches the OpenAI speech endpoint exactly. You do not need a custom SDK, as standard HTTP requests or the OpenAI library handle the integration seamlessly.

What audio formats are supported?

You can specify the response_format as mp3, wav, opus, flac, or pcm. These formats are available for all voice models. The generated audio is returned directly in the API response. No other formats are supported, and you cannot stream partial audio or use WebSocket connections.

How do I set the language?

Include an optional ISO language code in the request body. If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, you must explicitly set the language parameter to ensure correct pronunciation and voice selection.

What is the rate limit?

The limit is 60 requests per minute per key. New accounts start with 10 requests per minute until the first top-up. Requests are processed sequentially, so high load may cause queuing delays. Exceeding the limit will result in standard rate-limit errors from the API endpoint.

What happens if a request fails?

Failed requests are free, and the charge is returned in full. The system does not bill you for synthesis errors or timeouts. You can retry the request without worrying about additional costs, provided you stay within your rate limits and have sufficient balance for successful requests.

How do I handle long texts?

Split your input text into parts of up to 4096 characters each. Send separate requests for each part and join the resulting audio files on your side. This ensures compliance with the character limit per request while allowing you to generate longer content seamlessly.

Can I adjust the speed?

Yes, you can set the speed parameter between 0.25 and 4.0. This allows you to slow down or speed up the narration to fit your editorial workflow. The speed adjustment applies to all voices and languages.

Is there a character limit per request?

Each request supports up to 4096 characters in the input field. Spaces and punctuation count toward this limit. For texts exceeding this length, you must split the content into multiple requests and concatenate the resulting audio files manually in your application logic.

How do I rotate my key?

Issue a new key from the dashboard at any time. The new key becomes active immediately, and the old key stops working at once. This allows you to rotate credentials without downtime. You can manage your single active key directly through the account interface.

Do I need a specific model for voices?

No, the model parameter only selects between tts-1 and tts-1-hd, which use the same engine and price. You select the voice separately using the voice parameter. Both models support all eight presets and 23 languages, offering identical voice capabilities regardless of the model choice.

What is the authorization header?

Use the header Authorization: Bearer tts-... with your unique API key. This key is generated when you sign up on the site. Ensure the key is sent with every request to authenticate your account and track usage against your balance and rate limits.

Are responses cached?

Responses are not cached by the API. Each request generates audio fresh from the engine. Input text is used only to produce the audio and is not used for training. Request metadata is kept for billing, but the audio files are returned in the response and not retained on our servers.

First request

curl

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

Sound wave illustration for: Authentication and Setup

Access the /get-api-key/ page to generate your credentials. Signing in via Google provides a $0.50 trial credit valid for seven days, while email accounts start without initial credit. The dashboard displays your active key, current balance, and usage statistics.

Generating Your API Key

Generating Your API Key

Navigate to the key management page on abo77login.com to create your unique identifier. Keys are tied to your account balance and rate limits.

  • Google sign-in grants $0.50 trial credit
  • Email accounts require manual top-up
  • Keys are unique per account

Authorization Header Format

Authorization Header Format

Include your key in every API call using the standard bearer token format. This ensures secure authentication for all requests sent to the endpoint.

Use the header: Authorization: Bearer tts-....

Key Rotation Process

Rotate your key anytime via the dashboard. When a new key is issued, the previous one becomes invalid immediately, ensuring tight control over access.

This is useful for security audits or after potential exposure.

Making Your First Request

Sound wave illustration for: Making Your First Request

To begin, send a POST request to https://api.abo77login.com/v1/audio/speech with your API key. The API accepts text up to 4,096 characters and returns an audio file immediately.

Use the JSON body below to define the model, input text, and voice preset. Failed requests incur no charge, ensuring you only pay for successful synthesis.

cURL Example for Speech

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

  • curl -X POST https://api.abo77login.com/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Breaking news: market trends shift", "voice": "aria", "response_format": "mp3"}'

JSON Body Structure

The request body is a standard JSON object. All fields are processed sequentially, so under load, longer texts may queue.

  • model: "tts-1" or "tts-1-hd"
  • input: String up to 4,096 characters
  • voice: One of 8 presets (e.g., "aria")
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: 0.25 to 4.0
  • language: Optional ISO code

Required Fields

The model, input, and voice fields are mandatory. The input field accepts plain text; spaces and punctuation count toward the 4,096-character limit and your $0.01 per 1,000 characters billing unit.

OpenAI SDK Compatibility

Sound wave illustration for: OpenAI SDK Compatibility

Our API endpoint mirrors the OpenAI speech structure, allowing you to reuse existing client code with minimal changes. By simply updating the base URL to https://api.abo77login.com/v1, the official OpenAI SDKs recognize our endpoints as compatible without requiring custom parsers.

Base URL Configuration

Point your SDK client to https://api.abo77login.com/v1. This single change directs requests to our infrastructure while maintaining the standard JSON body format.

  • Base URL: https://api.abo77login.com/v1
  • Endpoint: /v1/audio/speech
  • Method: POST

Using Official SDKs

Leverage the standard OpenAI Python or Node.js libraries. Pass your API key via the Authorization header. No additional authentication logic is needed.

Code Snippet Examples

Initialize the client with your new base URL. Call the audio.speech method with standard parameters like model, voice, and input. The response returns the audio binary directly.

  • Use standard OpenAI SDK
  • Pass base_url parameter
  • Standard JSON body

Supported Audio Formats

Sound wave illustration for: Supported Audio Formats

The API supports five distinct audio formats to suit different delivery needs, from lightweight web streams to lossless archival. You specify the desired output format using the response_format parameter in your request payload, choosing between mp3, wav, opus, flac, or pcm.

MP3 for Web Delivery

MP3 is the default choice for most web applications, offering a balance between file size and quality. It is ideal for embedding audio players in news articles or podcast feeds where bandwidth efficiency matters.

WAV for High Quality

Choose WAV when you need uncompressed, high-fidelity audio for professional editing or broadcast workflows. This format preserves the full quality of the synthesized voice without any lossy compression artifacts.

FLAC and OPUS Options

FLAC provides lossless compression, reducing file size while maintaining exact audio fidelity, suitable for archival storage. OPUS offers superior compression for low-bandwidth scenarios, ensuring clear audio even on slower connections.

Voice and Language Parameters

Sound wave illustration for: Voice and Language Parameters

Choose from eight distinct voice presets tailored for editorial clarity, from the warm narration of Aria to the neutral news tone of Atlas. Each voice is generated from licensed recordings and supports all 23 available languages.

Language handling is precise: provide an ISO code for explicit control, or rely on automatic detection based on the script. Non-English Latin text defaults to English, so always set the language field to ensure correct pronunciation for languages like Dutch or Finnish.

Selecting a Voice Preset

Select a voice that matches your publication’s tone. Options include Aria (warm narrator), Nova (upbeat), Luna (soft storytelling), Sage (calm instructional), Felix (energetic promo), Milo (friendly), Atlas (neutral news), and Orion (deep documentary).

All voices are derived from licensed LibriTTS-R and LibriVox sources, ensuring clear, synthetic speech suitable for content platforms.

  • Aria, Nova, Luna, Sage (Female)
  • Felix, Milo, Atlas, Orion (Male)
  • All voices support all 23 languages

Setting Language Codes

Explicitly define the language using an ISO code in the request body. This ensures accurate pronunciation for non-English languages even when using Latin script.

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.

Automatic Detection

If the language field is omitted, the API guesses the language from the text script. Latin script defaults to English.

Set the language explicitly for non-English Latin-script text to avoid misinterpretation.

Voice and Language Parameters

Rate Limits and Quotas

Sound wave illustration for: Rate Limits and Quotas

Your API key allows 60 requests per minute once funded. This limit applies per key, so a single account can sustain steady throughput for editorial pipelines without dropping audio generation jobs.

Requests Per Minute Limit

After topping up with USDT on the TRON network (TRC-20), you receive a consistent 60 requests per minute. This capacity is sufficient for batch-processing news scripts or generating daily audio briefs without manual throttling.

  • Standard limit: 60 requests/minute per key
  • Applies to all endpoint calls

Pre-Top-Up Limits

New accounts start with a lower limit of 10 requests per minute until the first top-up is processed. This ensures fair usage during the initial trial phase before scaling to production volumes.

  • Initial rate: 10 requests/minute
  • Increases to 60/minute after first top-up

Queuing Behavior

Requests are processed sequentially. Under heavy load, subsequent requests may wait in a queue before synthesis begins. Typical speed is roughly real-time (25 characters per second), so long texts may take additional time to complete.

  • Sequential processing order
  • Real-time generation speed (~25 chars/sec)

Error Handling

Sound wave illustration for: Error Handling

Synthesis errors typically return standard HTTP status codes to indicate request failures. Common issues include invalid voice presets or malformed JSON bodies, which the API rejects immediately.

Common HTTP Errors

The API returns 4xx errors for authentication or parameter issues. A 429 indicates you have exceeded the 60 requests per minute limit. Check your key and input format before retrying.

  • 401: Invalid or expired API key.
  • 400: Malformed JSON or invalid parameters.
  • 429: Rate limit exceeded (60 req/min).

Failed Request Refunds

If synthesis fails due to server-side errors, the charge is returned in full. You are not billed for audio that was not successfully generated. This applies to both trial and paid balances.

Retry Logic

Implement exponential backoff for rate limit errors. Since requests are processed sequentially, brief waits often resolve temporary queue delays. Avoid rapid-fire retries to prevent further throttling.

Advanced Usage

Sound wave illustration for: Advanced Usage

Beyond basic synthesis, the API allows precise control over delivery parameters. You can adjust speech speed between 0.25x and 4.0x to match specific editorial pacing needs, ensuring audio fits seamlessly into news segments or content platforms without manual editing.

Adjusting Speech Speed

Set the speed parameter in your request body to modify playback rate. Values range from 0.25 to 4.0, allowing you to slow down complex narrations or accelerate quick updates. This eliminates the need for post-processing to fit audio into tight editorial slots.

Handling Long Texts

Each request supports up to 4,096 characters. For longer articles, split the input into chunks, generate each part, and join the resulting audio files. This approach ensures consistent quality and avoids token limits while maintaining narrative flow across your content.

Response Format Selection

Choose the response_format based on your delivery needs. MP3 offers efficient web delivery, while WAV and FLAC provide lossless quality for archival. Use OPUS or PCM for specific processing pipelines. The API returns the audio file directly in the response.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Requests are processed sequentially, meaning high-volume generation may experience queuing delays during peak load.

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. W3C WAI: making audio and video accessible
  3. OpenAI API reference: create speech
  4. openai-python on GitHub
  5. Node.js documentation
  6. curl documentation
  7. TRON developer hub: TRC-20
  8. ISO 639 language codes
  9. LibriTTS-R corpus (OpenSLR 141)
  10. Creative Commons Attribution 4.0
  11. Python documentation
  12. openai-node on GitHub

More on this site