Cloud TTS API: Quickstart Guide & Endpoint Reference

By VoiceWise Casino editorial team · Updated 2026-11-18

This guide helps e-commerce agencies integrate reliable text-to-speech into their product description and review workflows. You will learn how to generate audio files using a simple POST request, compatible with the official OpenAI SDKs. We cover essential endpoints, parameter options, and error handling to ensure your team can scale audio content production without complexity.

Whether you are building automated voiceovers for online stores or testing synthetic speech alternatives, this reference provides the concrete details you need. We explain authentication, rate limits, and supported formats so you can implement the API quickly. The guide is designed for developers who value specific, honest technical details over marketing hype.

Cloud TTS API: Quickstart Guide & Endpoint Reference

Frequently asked questions

How do I get an API key?

Sign up on our /get-api-key/ page using Google or email. Your account receives one active key. You can issue a new key at any time, which immediately invalidates the old one.

What is the base URL?

The API base URL is https://api.cash88casino.com/v1. Use this for all requests. The speech endpoint is POST https://api.cash88casino.com/v1/audio/speech. This matches the OpenAI shape, allowing you to simply update your base_url configuration in standard HTTP clients or compatible SDKs.

Can I use the OpenAI Python SDK?

Yes. Since our request shape matches the OpenAI speech endpoint, you can use the official OpenAI SDKs. Just change the base_url to https://api.cash88casino.com/v1 and provide your site’s key. This allows your team to integrate our TTS API into existing Python workflows seamlessly.

What is the maximum input length?

Each request supports up to 4096 characters. Spaces and punctuation count toward this limit. If your product description exceeds this, split the text into smaller parts. Generate audio for each part separately, then join the resulting audio files to create a complete audio file for your store.

How do I handle errors?

Failed requests are free; the charge is returned in full if synthesis fails. Monitor your response status codes. If a request fails, you can retry or adjust parameters like speed or voice. Your balance remains unaffected by failed attempts, ensuring predictable costs for your agency’s billing.

What formats are supported?

We support mp3, wav, opus, flac, and pcm. Choose the format that best fits your e-commerce platform’s requirements. These formats ensure compatibility with most web players and mobile apps. You can specify the desired format in the response_format field of your JSON request body.

Is streaming supported?

No. We do not offer streaming or WebSocket endpoints for real-time partial audio. The API returns the complete audio file upon successful synthesis. This fits well with pre-generated product descriptions or reviews, where latency is less critical than reliability and consistent audio quality for your customers.

Do you have a WebSocket endpoint?

No. We do not provide a WebSocket endpoint. All interactions are standard HTTP requests. You send a POST request with your text and receive the audio file in the response. This simplifies integration for agencies using standard web technologies without needing specialized WebSocket clients or libraries.

How do I rotate my API key?

You can issue a new API key at any time from your account dashboard. Once a new key is generated, the old one stops working immediately. This allows you to rotate keys securely without downtime. We provide one active key per account to keep access simple and secure.

What is the speed range?

You can adjust the speed between 0.25 and 4.0. This allows you to fine-tune the pacing of product descriptions or reviews. Slower speeds improve clarity for complex details, while faster speeds suit quick summaries.

Can I specify a language?

Yes, you can set the language using an ISO code. If omitted, the system guesses from the script, defaulting to English for Latin text. For non-English Latin-script text, always set the language explicitly. We support 23 languages, including English, Spanish, German, and French.

How do I split long texts?

Split your text into parts of up to 4096 characters. Generate audio for each part separately using the API. Then, join the resulting audio files using your preferred audio tool. This method ensures high-quality synthesis for each segment, avoiding potential quality drops in very long inputs.

Is the audio returned in chunks?

No. The audio is returned as a complete file in the response. We do not support streaming or chunked transfer for partial audio. This means you receive the full audio file once synthesis is complete. It is ideal for static product pages where the entire audio is needed.

What is the character limit?

The limit is 4096 characters per request. Spaces and punctuation count toward this total. For longer product descriptions, split the text into multiple requests. Each request generates a separate audio file. You can then concatenate these files to create a continuous audio experience for your online store visitors.

First request

curl

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

Get Your API Key

Sound wave illustration for: Get Your API Key

Start by visiting the /get-api-key/ page on cash88casino.com. Sign up using your Google account for an instant $0.50 trial credit, or create an email-based account. This single step grants access to your unique Bearer token and dashboard.

Once registered, copy your API key from the dashboard. Store it securely in your environment variables, such as AUTHORIZATION: Bearer tts-..., to prevent accidental exposure in client-side code or version control systems.

Sign Up on /get-api-key/

Navigate to the signup page to create your account. You can authenticate via Google for immediate trial credit or use a standard email and password setup. This portal is your central hub for managing access.

  • Google sign-in provides instant $0.50 trial credit
  • Email/password accounts start without trial credit
  • Accounts are specific to this site domain

Copy Your Bearer Token

Locate your unique API key in the dashboard. This token starts with tts- and authenticates all your requests to the api.cash88casino.com endpoint. Treat this value like a password.

  • Format: Bearer tts-...
  • One active key per account
  • New key issuance invalidates the old one immediately

Secure Storage Best Practices

Keep your key in environment variables rather than hardcoding it. This prevents accidental commits to public repositories. Use your preferred secret management tool to inject the key into your application at runtime.

  • Use environment variables
  • Avoid hardcoding in source files
  • Rotate keys if compromised

First Request with cURL

Sound wave illustration for: First Request with cURL

We help e-commerce agencies turn product descriptions and reviews into engaging audio content. This guide shows you how to generate audio files quickly using our cloud TTS API, designed for teams that need reliable, scalable voice solutions.

POST /v1/audio/speech

Send a POST request to https://api.cash88casino.com/v1/audio/speech. Include your Bearer token in the Authorization header. The endpoint accepts JSON and returns an audio file directly in the response body.

JSON Body Structure

Include model ("tts-1" or "tts-1-hd"), input (up to 4096 characters), voice (one of 8 presets), and response_format (mp3, wav, opus, flac, or pcm). You can optionally set speed between 0.25 and 4.0 and specify a language ISO code.

Response Audio File

The API returns the generated audio file with the appropriate Content-Type header (e.g., audio/mpeg). Failed requests are free, and the charge is returned in full if synthesis fails.

First Request with cURL

Using the OpenAI SDK

Sound wave illustration for: Using the OpenAI SDK

Integrating our TTS API with the official OpenAI SDKs is straightforward because we mirror the standard request shape. You simply point your client to our API base URL and use your unique bearer token for authentication. This allows your existing code to work with minimal changes.

The SDK handles the JSON serialization and response parsing for you. You only need to ensure the base_url is set correctly to https://api.cash88casino.com/v1 so that all speech synthesis requests route to our cloud infrastructure.

Set base_url to api.cash88casino.com

Configure your SDK client to direct requests to https://api.cash88casino.com/v1. This ensures that your calls to the /audio/speech endpoint hit our servers instead of OpenAI's infrastructure.

  • Use https://api.cash88casino.com/v1 as the base URL

Use Official OpenAI SDKs

You can use any official OpenAI SDK for your preferred programming language. The request parameters like model, input, and voice follow the same structure, ensuring compatibility without requiring a custom client library.

Replace Authorization Header

Replace the standard authorization header with your specific API key. Use the format Authorization: Bearer tts-<your-key>. This authenticates your account and tracks usage against your balance and rate limits.

  • Format: Authorization: Bearer tts-...
  • One active key per account

Supported Parameters

Sound wave illustration for: Supported Parameters

To generate audio, you must specify a model and a voice preset. The API accepts "tts-1" or "tts-1-hd"; both use the same engine and price, so choose based on your quality preference without worrying about cost differences. You can also adjust the playback speed between 0.25 and 4.0 to fit your video pacing.

Select from eight distinct voice presets, including female options like Aria and Luna, or male voices like Felix and Atlas. Each voice is designed for specific tones, from warm narration to energetic promos. You can also optionally set a language code (e.g., "en", "de") to ensure accurate pronunciation, especially for non-English texts.

Model: tts-1 or tts-1-hd

Both model identifiers trigger the same underlying synthesis engine and incur identical pricing ($0.01 per 1,000 characters). The choice between "tts-1" and "tts-1-hd" is purely stylistic, allowing you to test which output best suits your e-commerce content without affecting your API usage costs.

Voice: 8 Preset Options

Choose from eight licensed voices, each with a distinct character. Female options include Aria (warm narrator), Nova (bright), Luna (soft storyteller), and Sage (calm instructor). Male options include Felix (energetic promo), Milo (friendly), Atlas (neutral news), and Orion (deep documentary).

All voices support all 23 listed languages. If you omit the language parameter, the system guesses the language based on the script, defaulting to English for Latin text. For other languages, always specify the ISO code.

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

Speed: 0.25 to 4.0

The speed parameter allows you to scale the playback rate from 0.25x to 4.0x. This is useful for shortening long product descriptions or slowing down technical instructions for clarity. The audio generation time remains roughly real-time regardless of the speed setting.

Response Formats

Sound wave illustration for: Response Formats

The API returns the synthesized audio directly in the response body, allowing you to save the file immediately. Supported formats include MP3, WAV, OPUS, FLAC, and PCM, giving you flexibility for different playback environments and storage needs.

MP3, WAV, OPUS, FLAC, PCM

Choose the format that best fits your workflow. MP3 offers efficient compression for web delivery, while WAV and FLAC provide lossless quality for professional editing. PCM is available for raw audio processing, and OPUS offers excellent compression for low-bandwidth scenarios.

Audio File in Response Body

The entire audio file is returned in the HTTP response body. You do not need to make a second request to download the content. Simply write the response bytes to a file on your server or save them locally.

Content-Type Headers

The response includes a Content-Type header indicating the format (e.g., audio/mpeg for MP3, audio/wav for WAV). Use this header to correctly handle the file extension and ensure your application processes the binary data appropriately.

Response Formats

Error Handling

Sound wave illustration for: Error Handling

Errors are returned as JSON objects with a code and message field. Client errors indicate incorrect requests, such as missing required fields. Server errors are rare but may occur during high load; retrying with exponential backoff is recommended.

4xx Client Errors

Common codes include invalid_request for malformed JSON or voice_not_found if a preset name is misspelled. Ensure your input text does not exceed 4096 characters, as larger inputs will trigger an error without partial audio generation.

  • invalid_request: Check JSON syntax and required fields.
  • voice_not_found: Verify against /v1/voices list.
  • model_not_found: Use tts-1 or tts-1-hd only (both are valid).

5xx Server Errors

These indicate temporary infrastructure issues. Since requests are processed sequentially, brief delays may occur during peak usage. If you receive a 503 Service Unavailable, wait a few seconds and retry.

  • service_unavailable: Retry after a short delay.
  • internal_error: Contact support via email if persistent.

Rate Limit Exceeded

Exceeding the 60 requests per minute limit returns a 429 status code. Your key resets to 10 requests per minute if no top-up is present. Monitor your usage dashboard to avoid interruptions.

  • rate_limit_exceeded: Wait for the window to reset.
  • billing_unavailable: Top up via USDT (TRC-20) to restore higher limits.

Rate Limits

Sound wave illustration for: Rate Limits

We process synthesis requests sequentially, so concurrent usage may introduce slight delays. Understanding these limits helps you plan your audio generation workflows efficiently without unexpected interruptions.

Rate limits apply per API key, ensuring fair usage across our infrastructure. You can monitor your current usage directly from your dashboard on /get-api-key/.

60 Requests per Minute

Once your account is established, you are permitted up to 60 requests per minute. This limit allows for steady, scalable audio generation suitable for most e-commerce agency needs.

10 Requests per Minute Initially

New accounts start with a reduced limit of 10 requests per minute. This allows you to verify integration stability before scaling up your volume.

Queued Processing Under Load

Requests are processed one after another. Under high load, a request may wait in a queue before synthesis begins. This ensures consistent audio quality without overloading the engine.

Rate Limits

Authentication

Sound wave illustration for: Authentication

To authenticate your requests, include a valid API key in the Authorization header using the Bearer scheme. This token is generated and managed via your account dashboard at /get-api-key/, where you can also view your current balance and usage statistics.

Each account is restricted to a single active key at any given time. This simplifies security management for e-commerce agencies, ensuring that only one valid credential is active across all your integration environments, from staging to production.

Bearer Token in Authorization Header

Pass your key as Authorization: Bearer tts-<your-key>. This standard format works seamlessly with the OpenAI SDKs and any standard HTTP client. Ensure the token is sent with every request to /v1/audio/speech to avoid 401 Unauthorized errors.

One Active Key per Account

Your dashboard displays the single active key linked to your account. If you generate a new key, the previous one becomes invalid immediately. This prevents accidental usage of outdated credentials after a rotation or security event.

Revoke Old Key on New Issue

When you issue a new key from /get-api-key/, the old key stops working at once. There is no grace period. Update your integration code promptly to use the new token to avoid service interruptions in your audio generation pipelines.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Our platform empowers agencies to seamlessly manage multiple online stores with greater efficiency and precision.

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. OpenAI API reference: create speech
  3. W3C WAI: making audio and video accessible
  4. openai-node on GitHub
  5. Tether (USDT)
  6. ISO 639 language codes
  7. IETF RFC 7845: Ogg Opus
  8. MDN: Web Speech API
  9. FFmpeg documentation
  10. curl documentation
  11. Creative Commons Attribution 4.0
  12. LibriVox public-domain audiobooks

More on this site