Quickstart Guide: Generate Audio with Our TTS API

By SlotVoice editorial team · Updated 2026-11-18

This guide helps transport and classifieds startups generate natural-sounding audio for UI notifications, voice guides, and ads. You will learn to integrate our TTS API using simple curl commands or the official OpenAI SDK, adapting just the base URL to get started quickly without enterprise complexity.

We cover authentication, available voices, and rate limits so you can build reliable audio features. Whether you need mp3 for web players or wav for high-fidelity alerts, this documentation provides the exact endpoints and parameters you need to start generating speech immediately.

Quickstart Guide: Generate Audio with Our TTS API

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.7j77slot.com/v1. You send POST requests to https://api.7j77slot.com/v1/audio/speech for speech synthesis. Other endpoints like /v1/voices and /v1/models are also available at this base path for retrieving voice options and model details.

Can I use the OpenAI SDK with this API?

Yes, the official OpenAI SDKs work by changing the base_url to https://api.7j77slot.com/v1 and using your site-specific key. The request shape matches the OpenAI speech endpoint exactly, allowing you to integrate our TTS API into existing OpenAI-based workflows seamlessly.

How do I authenticate my requests?

Include an Authorization header with your Bearer token: Authorization: Bearer tts-.... Each account has one active key. You can issue a new key at any time via the dashboard, which immediately invalidates the old key, ensuring secure access to your synthesis credits.

What happens if I hit 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 under load, a request may wait in a queue. If a request fails, the charge is returned in full.

Is SSML supported in the input?

No, SSML is not supported. The API accepts plain text input only. You cannot use SSML tags to control pronunciation or pacing. For custom pronunciation, you must rely on the standard text input or choose a voice that matches your desired tone.

Can I stream the audio as it generates?

No, streaming is not supported. The API returns the complete audio file in the response after synthesis is finished. There is no WebSocket or real-time partial audio support. You receive the final audio file once the request completes successfully.

What is the maximum text length per request?

The maximum text length is 4096 characters per request. Spaces and punctuation count toward this limit. If your text exceeds this length, you should split it into smaller parts, generate audio for each, and join the resulting audio files.

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 the speech endpoint. Once you receive the audio files for each part, join them to create the final audio file for your application.

Are there any SDKs for mobile apps?

No, there is no official mobile SDK. You can use the OpenAI SDK or plain HTTP requests from your mobile app by setting the base URL to https://api.7j77slot.com/v1. The standard HTTP approach works well for iOS and Android development.

Does the API support WebSockets?

No, the API does not support WebSockets. Communication is handled via standard HTTP POST requests. You send text and receive the audio file in the response. There is no persistent connection or real-time streaming capability available through WebSocket protocols.

What formats are available for output?

You can choose from mp3, wav, opus, flac, and pcm formats. Specify the desired format using the response_format field in your request body. This allows you to select the best balance of quality and file size for your transport or classifieds app.

Can I customize the pronunciation?

No, custom pronunciation dictionaries or lexicons are not supported. The API uses the selected voice’s standard pronunciation for the given text. You can influence tone by choosing from eight specific voice presets, but fine-grained phoneme control is not available.

Is there a JSON schema for requests?

The request body is a JSON object with fields: model, input, voice, response_format, speed, and optional language. The model is either tts-1 or tts-1-hd. input is the text string, voice is one of eight presets, and speed ranges from 0.25 to 4.0.

How do I revoke my API key?

You can issue a new API key at any time via the dashboard. When a new key is generated, the old key is immediately invalidated. This effectively revokes access for the old key without needing manual deletion, ensuring quick security updates.

First request

curl

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

Sound wave illustration for: Authentication

For SlotVoice, authentication is straightforward: include your API key in the request header as Authorization: Bearer tts-.... This single token grants access to generate speech. Balances and account management are handled via the dashboard at 7j77slot.com.

You receive one active key per account. It is secure, simple, and directly tied to your specific startup’s usage limits and billing.

Bearer Token Format

Bearer Token Format

Your key starts with tts- and must be passed exactly as shown. The API validates this token against your account to authorize the request and deduct characters from your balance.

One Key Per Account

One Key Per Account

Each SlotVoice account is issued exactly one active API key. This simplifies integration for your transport or classifieds app, as you only need to manage a single credential across your development and production environments.

Revoke Old Keys Instantly

Revoke Old Keys Instantly

If you suspect your key has been exposed, you can issue a new one at any time via your dashboard. The old key stops working immediately, ensuring your audio generation remains secure without downtime.

Endpoints

Sound wave illustration for: Endpoints

Our API exposes three primary endpoints for managing voice synthesis and configuration. The core speech generation endpoint handles the conversion of text into audio files, while the metadata endpoints provide essential details about available voices and model capabilities. These endpoints work together to give you full control over your audio generation pipeline.

POST /v1/audio/speech

Send text to this endpoint to generate audio. The request body must include the model, input text, voice selection, and response format. This is your primary interface for creating synthetic speech files.

  • Supports JSON bodies with fields like model, input, voice, and response_format.

GET /v1/voices

Retrieve the list of 8 voice presets, supported languages, and available audio formats (mp3, wav, opus, flac, pcm). This helps you select the right voice and format for your transport or classifieds app.

GET /v1/models

Fetch the available models, currently tts-1 and tts-1-hd. Both use the same engine and pricing, allowing you to switch formats without changing your integration logic.

Request Parameters

Sound wave illustration for: Request Parameters

Configure your synthesis requests by selecting the model, defining the input text, and choosing the voice and speed parameters. The API accepts standard OpenAI-compatible fields, allowing you to switch between models or adjust playback speed with minimal code changes.

Model Selection

Choose between "tts-1" for standard quality or "tts-1-hd" for higher fidelity. Both models use the same underlying engine and pricing, so you can swap them without changing your audio integration logic.

  • "tts-1": Standard quality
  • "tts-1-hd": High-definition quality

Input Text Limit

Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer notifications or voice guides, split your text into chunks and join the resulting audio files sequentially.

Voice and Speed Settings

Select one of eight preset voices (e.g., aria, nova, atlas) to match your brand’s tone. Adjust the speed between 0.25 and 4.0 to fit your notification cadence. You can also optionally specify an ISO language code to ensure accurate pronunciation for non-English Latin-script text.

  • Voices: aria, nova, luna, sage, felix, milo, atlas, orion
  • Speed: 0.25 to 4.0
  • Language: Optional ISO code

Response Formats

Sound wave illustration for: Response Formats

Choose the output format that best fits your app’s architecture and bandwidth constraints. Every generated audio file includes an inaudible watermark to identify it as synthetic speech, ensuring transparency without affecting playback.

MP3

MP3 is the most universally supported format, making it ideal for web players and mobile apps. It offers a good balance between file size and audio quality for notifications or voice guides.

WAV

WAV provides uncompressed, high-fidelity audio. Use this format when you need pristine sound quality for professional voice guides or when your downstream processing pipeline requires raw audio data.

Opus, FLAC, PCM

Opus offers superior compression for low-bandwidth environments, while FLAC provides lossless compression for archival needs. PCM returns raw uncompressed audio data, suitable for immediate processing or analysis.

Rate Limits

Sound wave illustration for: Rate Limits

Rate limits protect the shared inference engine during high-volume bursts. You are allowed 60 requests per minute once your account is fully active, but new accounts start with a stricter cap of 10 requests per minute until the first top-up is processed. This prevents queue saturation from sudden traffic spikes common in notification-heavy transport apps.

The limit applies per API key. Since you can issue a new key instantly to replace an old one, you can effectively reset your rate limit window if needed.

60 Requests Per Minute

Once your account is funded, you can make up to 60 requests per minute. This allows for rapid generation of voice guides or ad snippets without hitting a hard wall. If you exceed this limit, you will receive a 429 error until the window resets.

  • Limit is per API key, not per IP.
  • Resets on a rolling 60-second window.
  • Applies to all request types equally.

10 Requests Before Top-Up

New accounts begin with a strict 10 requests per minute limit. This ensures system stability during the free trial phase or before your first USDT transfer clears. Once your first top-up is confirmed on the TRON network, the limit automatically increases to 60 requests per minute.

  • Starts at 10 req/min.
  • Increases to 60 req/min after first top-up.
  • No manual upgrade required.

Queue Processing

Requests are processed sequentially within the available capacity. Under heavy load, your request may wait in a queue before synthesis begins. Longer texts take more time to generate, so concurrent requests might experience slight delays. Short phrases typically generate in a few seconds, while long texts process at roughly real-time speed.

  • Processed sequentially.
  • Delays possible during peak load.
  • Short phrases: few seconds.
  • Long texts: ~25 chars/sec

Error Handling

Sound wave illustration for: Error Handling

Handling errors correctly ensures your startup’s audio notifications and voice guides play smoothly without unexpected charges. Understanding the specific HTTP status codes helps you implement robust retry logic for transport and classifieds applications.

401 Unauthorized

This error occurs when the provided API key is missing, incorrect, or revoked. Ensure your request includes the Authorization: Bearer tts-... header with a valid key from your account dashboard.

429 Rate Limit

You have exceeded the limit of 60 requests per minute (or 10 per minute before top-up). The API will return a 429 status code. Wait briefly and retry, as your queue position is preserved.

500 Server Errors

Indicates a temporary server issue during synthesis. Failed requests are free, so you can safely retry without incurring charges. If the error persists, check your text length and voice selection.

SDK Integration

Sound wave illustration for: SDK Integration

The API is compatible with the official OpenAI SDKs. By simply adjusting the base URL, you can leverage existing code structures without rewriting your integration logic.

This approach keeps your dependency stack minimal while ensuring you get the same JSON request shape and response handling as other major TTS providers.

OpenAI SDK Compatibility

Our API mirrors the OpenAI speech endpoint structure. This means you can use the same libraries and client configurations you are already familiar with, reducing onboarding time for your development team.

Change base_url

Update your SDK configuration to point to https://api.7j77slot.com/v1. This single change redirects all requests to our infrastructure while maintaining the standard parameter fields like model, input, and voice.

Ensure your API key is passed in the Authorization header as Bearer tts-... to authenticate your requests correctly against our endpoints.

  • Base URL: https://api.7j77slot.com/v1
  • Auth Header: Authorization: Bearer tts-...

Use Official SDKs

You can utilize the official OpenAI SDK for Python, Node.js, or other supported languages. No custom middleware or wrapper code is required to get started.

Just initialize the client with your key and the new base URL, then call the speech method as you normally would for text-to-audio conversion.

Curl Example

Sound wave illustration for: Curl Example

The API accepts standard POST requests with JSON payloads. You send your text and voice preference to receive an audio file directly.

This guide shows how to generate speech using curl commands, which work with any HTTP client.

You can test the endpoint immediately without installing additional libraries.

Basic Request

Send a POST request to the speech endpoint with your model, input text, and voice selection.

The response returns the audio file in your chosen format, ready for playback or storage.

  • Endpoint: POST https://api.7j77slot.com/v1/audio/speech
  • Model: tts-1 or tts-1-hd
  • Voice: e.g., aria, nova, felix

Headers Setup

Include your Bearer token in the Authorization header.

Set the Content-Type to application/json for the request body.

  • Authorization: Bearer tts-<your-key>
  • Content-Type: application/json

Response Parsing

The response body contains the raw audio data.

Save the output directly to a file using curl's -o flag.

  • Use -o output.mp3 to save the file
  • Check status code 200 for success

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. You can upgrade to HD quality for premium ad banners or high-stakes customer support messages without incurring a higher per-character fee.

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. LibriTTS-R corpus (OpenSLR 141)
  4. Node.js documentation
  5. TRON developer hub: TRC-20
  6. ISO 639 language codes
  7. W3C WAI: making audio and video accessible
  8. IETF RFC 7845: Ogg Opus
  9. openai-python on GitHub
  10. OpenAI API reference: create speech
  11. Python documentation
  12. MDN: Web Speech API

More on this site