API Documentation for IVR Voice Generation

By VoxCore editorial team · Updated 2026-11-18

This documentation details the REST API for converting script text into natural voice-overs, designed specifically for startups building IVR systems. You will find concrete examples for generating audio files at scale, including request structures, available voices, and pricing metrics. The guide covers the technical essentials needed to integrate VoxCore into your call center workflow without unnecessary complexity.

All endpoints follow the standard OpenAI request shape, allowing you to use existing SDKs by simply adjusting the base URL. We provide specific figures on rate limits, character counts, and supported languages to help you plan your deployment. This page is intended for developers who need reliable, clear audio generation for high-volume text-to-speech tasks.

API Documentation for IVR Voice Generation

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.nzx88casino.com/v1. You send POST requests to https://api.nzx88casino.com/v1/audio/speech for speech generation. Other endpoints include GET /v1/voices and GET /v1/models for configuration details.

Can I use the OpenAI SDK with this API?

Yes. The request shape matches the OpenAI speech endpoint. You can use official OpenAI SDKs by changing the base_url to https://api.nzx88casino.com/v1 and using your site-specific API key for authentication.

How do I set the language for non-English text?

Set the optional 'language' field to the ISO code. If omitted, the system guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly set the language parameter to ensure correct pronunciation.

What happens if I exceed the rate limit?

The limit is 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so exceeding limits or high load may cause your request to wait in a queue until capacity is available.

Can I generate audio in MP3 format?

Yes. You can specify the 'response_format' field in your request. Supported formats include mp3, wav, opus, flac, and pcm. The API returns the generated audio file in the requested format directly in the response.

Is there a limit on the input text length?

Yes, the maximum input length is 4096 characters per request. For longer texts, split them into parts of up to 4096 characters, generate audio for each part, and join the resulting audio files.

How do I rotate my API key?

Issue a new key from your account dashboard. When a new key is issued, the old one stops working immediately. This ensures secure access control without downtime, as only one key is active per account at a time.

Do I need to install any specific libraries?

No. You can use the official OpenAI SDKs or plain HTTP requests. There is no dedicated VoxCore SDK, mobile SDK, or WordPress plugin required. Standard HTTP libraries for your programming language are sufficient for integration.

Can I use the API from a backend server?

Yes. The API is designed for backend integration. Send POST requests with your Bearer token from your server to generate audio files. It is suitable for high-volume call center audio generation and IVR system deployments.

What is the maximum speed I can set?

The speed parameter accepts values between 0.25 and 4.0. This allows you to adjust the voice speed for your IVR scripts, ranging from half-speed to four times normal speed, depending on your audio requirements.

Does the API support SSML tags?

No. The API does not support SSML tags, phoneme dictionaries, or custom pronunciation lexicons. It accepts plain text input only.

Can I stream the audio while it generates?

No. There is no streaming or WebSocket support for real-time partial audio. The API returns the complete audio file in the response after synthesis is finished. Requests are processed sequentially, so you receive the full file once ready.

How do I check my API usage?

Visit the /get-api-key/ page on this site. The dashboard displays your current balance, trial status, characters remaining, and usage history. You can also monitor request metadata like time and status kept for billing purposes.

What is the response format for errors?

Failed requests are free, and the charge is returned in full. The API returns standard HTTP error codes with a JSON body detailing the error. You can retry failed requests without incurring additional costs.

First request

curl

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

Access the VoxCore TTS API by generating a unique API key through your account dashboard at https://nzx88casino.com/get-api-key/. Each account holds one active key, which you can use to authenticate your HTTP requests for IVR script generation.

API Key Generation

API Key Generation

Sign in with Google or email credentials to retrieve your key. The dashboard displays your current balance, character usage, and a ready-to-use cURL example for immediate testing.

Bearer Token Usage

Bearer Token Usage

Include your key in the request header as Authorization: Bearer tts-.... This standard header format ensures secure transmission of your credentials for every speech synthesis call.

Key Rotation

Issue a new key from the dashboard at any time. The old key stops working immediately upon generation, ensuring tight security for high-volume call center operations without downtime.

Endpoint: Speech Generation

Sound wave illustration for: Endpoint: Speech Generation

The core of our IVR integration is the POST endpoint for generating speech. You send a JSON payload containing your script and voice preferences to receive an audio file. This single endpoint handles the entire synthesis process, designed for high-volume call center workflows where reliability and clear pricing are critical.

By using the standard OpenAI-compatible request shape, you can integrate seamlessly with existing HTTP clients or the official SDKs. Simply adjust the base URL to our API domain, ensuring your IVR system receives natural voice-overs without complex custom parsing logic.

POST Request

Send a POST request to https://api.nzx88casino.com/v1/audio/speech. This endpoint accepts your text input and configuration parameters, returning the synthesized audio directly. It is designed to handle the volume typical of startup IVR deployments, processing requests sequentially with predictable timing.

For long scripts exceeding 4096 characters, split your text into chunks and join the resulting audio files. This approach ensures consistent quality and avoids character limit errors while maintaining the natural flow of your call center messages.

  • Method: POST
  • URL: https://api.nzx88casino.com/v1/audio/speech
  • Content-Type: application/json

JSON Body Structure

The request body requires model, input, and voice fields. You can optionally specify response_format, speed, and language. The input field accepts up to 4096 characters of plain text, which is converted directly into speech using the selected voice preset.

Ensure your model is set to either tts-1 or tts-1-hd. Both use the same engine and pricing, so choose based on your quality needs. The voice field must match one of the eight available presets, such as aria for warm narration or atlas for neutral news-style delivery.

  • model: "tts-1" or "tts-1-hd"
  • input: string (max 4096 chars)
  • voice: e.g., "aria", "atlas"
  • response_format: mp3, wav, opus, flac, pcm
  • speed: 0.25–4.0
  • language: optional ISO code

Response Format

A successful request returns the audio file directly in the response body, encoded in your chosen format. The response contains the audio file directly. Note that this is not a streaming endpoint; the full file is returned after synthesis completes.

If the synthesis fails, the charge is returned in full. Failed requests are refunded in full, ensuring you only pay for successfully generated audio.

Available Models

Sound wave illustration for: Available Models

VoxCore offers two model variants for IVR audio generation, both powered by the same underlying engine. The selection between them depends on your specific balance between processing speed and audio fidelity. Each model accepts the same input parameters and produces output in the requested format.

Both models support the full range of eight voice presets and 23 languages. The core difference lies in the quality tier, which affects the final audio characteristics.

tts-1 Model

The standard model provides efficient, real-time synthesis suitable for high-volume IVR systems. It delivers speech optimized for quick processing cycles.

This model is ideal for standard menu prompts and basic interactions where latency is critical. It maintains the same voice characteristics as the HD variant.

  • Engine: Standard tier
  • Latency: Optimized for speed
  • Use case: High-volume IVR menus

tts-1-hd Model

The HD model offers enhanced audio quality with richer tonal depth. It is designed for scenarios where higher audio fidelity is prioritized.

Use this model for key customer touchpoints, such as welcome messages or complex instructions, where voice clarity enhances user experience.

  • Engine: High-definition tier
  • Latency: Slightly higher than standard
  • Use case: Premium IVR segments

Price Difference

Despite the difference in audio quality, both models are priced identically at $0.01 per 1,000 characters. There is no cost premium for selecting the HD variant.

This uniform pricing allows you to upgrade specific IVR segments to HD quality without increasing your overall API spend. Failed requests are refunded regardless of the model used.

  • Standard price: $10 per 1 million characters
  • Both models: Same rate
  • No premium for HD quality

Voice Selection

Sound wave illustration for: Voice Selection

Selecting the right voice is critical for IVR clarity and user experience. VoxCore provides eight distinct presets, each engineered for specific tonal qualities in call center environments. These voices are based on licensed recordings: LibriTTS-R (CC BY 4.0), from LibriVox public-domain audiobook readings.

Female Voices

Female voices offer warmth and clarity essential for modern IVR systems. Aria provides a clear, narrator-like tone suitable for standard menus. Nova brings an upbeat energy for promotional prompts. Luna excels in storytelling or complex instructions, while Sage delivers calm, instructional clarity for account verification steps.

  • Aria: Warm, clear narrator
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional

Male Voices

Male voices provide reliable, neutral tones for professional call centers. Felix is energetic, ideal for promotional announcements. Milo offers a friendly, conversational style for customer support flows. Atlas delivers a neutral news-style tone for status updates, while Orion provides a deep, documentary-style voice for premium or serious service lines.

  • Felix: Energetic, promo
  • Milo: Friendly, conversational
  • Atlas: Neutral, news
  • Orion: Deep, documentary

Voice IDs

Each voice is referenced by a simple lowercase ID in your API requests. Pass the voice parameter with one of the eight IDs: aria, nova, luna, sage, felix, milo, atlas, or orion. Any voice can speak any of the 23 supported languages, allowing you to maintain consistent branding across regions.

Audio Formats

Sound wave illustration for: Audio Formats

VoxCore supports five output formats to suit different IVR infrastructure requirements. Each format balances file size, compatibility, and audio fidelity for your call center deployment.

MP3 Output

MP3 is the default and most widely supported format for IVR systems. It offers a good balance between file size and sound quality, ensuring fast transmission over standard telephony networks without consuming excessive bandwidth.

WAV Output

WAV provides uncompressed, high-quality audio ideal for systems that require lossless playback. Use this format if your IVR platform does not support efficient compression or if you need raw audio data for further processing.

Other Formats

We also offer Opus, FLAC, and PCM. Opus is efficient for modern web-based IVR solutions. FLAC provides lossless compression for archival purposes, while PCM delivers raw linear audio for specialized telephony hardware.

  • mp3
  • wav
  • opus
  • flac
  • pcm
Audio Formats

Speed and Language

Sound wave illustration for: Speed and Language

Adjust the playback speed between 0.25 and 4.0 to fit IVR timing constraints. Faster rates reduce latency for menu prompts, while slower speeds improve comprehension for complex instructions. This flexibility allows you to optimize call flow duration without re-recording assets.

Speed Range

Values outside 0.25–4.0 are rejected. Use speed adjustments to maintain consistent audio pacing across different voice personas in your call tree.

Language Codes

Specify the ISO code for the language parameter to ensure accurate synthesis. Supported languages include Arabic, Chinese, English, French, German, Hindi, Japanese, Korean, Spanish, and others. Explicitly setting the language prevents mispronunciation, especially for mixed-script texts or names.

  • English: en
  • Spanish: es
  • French: fr
  • German: de
  • Chinese (Simplified): zh
  • Japanese: ja

Auto-Detection

If the language field is omitted, the system guesses the language from the script. Latin script defaults to English. For non-English Latin text, always set the language parameter to avoid incorrect accentuation or pacing.

Rate Limits

Sound wave illustration for: Rate Limits

Understanding rate limits is critical for IVR systems that generate audio dynamically during call flows. Our API enforces a standard limit of 60 requests per minute per API key. This ensures stable performance for high-volume call center deployments without requiring complex throttling logic on your end.

Requests are processed sequentially. If you exceed the limit, additional requests wait in a queue rather than failing immediately. This behavior helps maintain audio continuity even during brief traffic spikes.

60 Requests Per Minute

Each API key is allowed 60 synthesis requests per minute.

You can monitor your current usage via the dashboard to ensure you stay within these bounds during peak call hours.

Initial Limit

New accounts without a top-up start with a lower limit of 10 requests per minute. This allows you to test the API integration before scaling up your call volume.

Once you add USDT (TRC-20) to your balance, the limit automatically increases to the full 60 requests per minute.

Queue Behavior

When the 60-request threshold is reached, new requests are placed in a queue and processed one after another. This prevents immediate failures but may introduce latency for long audio generations.

Since typical generation is near real-time, queuing rarely causes significant delays for short IVR prompts, but plan your burst traffic accordingly.

Error Handling

Sound wave illustration for: Error Handling

The API returns standard HTTP status codes to indicate success or failure. A 2xx code confirms audio generation, while 4xx and 5xx errors provide specific details about invalid inputs, rate limits, or authentication issues.

Common Errors

Common errors include 400 Bad Request for invalid JSON or missing fields, 401 Unauthorized for expired or incorrect keys, and 429 Too Many Requests when exceeding the 60 requests per minute limit.

  • 400: Invalid JSON, missing 'input', or voice not found.
  • 401: Invalid API key or token expired.
  • 429: Rate limit exceeded (60 req/min).
  • 500: Internal server error during synthesis.

Retry Logic

Implement exponential backoff for 429 and 5xx errors. Since requests are processed sequentially, short waits often resolve temporary queue delays. Do not retry 400 errors as they indicate a client-side configuration issue.

  • Retry 429 and 5xx errors with exponential backoff.
  • Do not retry 400 errors.
  • Limit retries to 3 attempts max.

Refund Process

Failed requests are free. If synthesis fails, the charge is returned in full to your balance. The refund is automatic.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Choose FLAC when you require the exact audio quality of WAV but need to reduce storage or bandwidth requirements.

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. LibriVox public-domain audiobooks
  4. openai-python on GitHub
  5. Node.js documentation
  6. Python documentation
  7. LibriTTS-R corpus (OpenSLR 141)
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. ISO 639 language codes
  10. MDN: Web Speech API
  11. Creative Commons Attribution 4.0
  12. curl documentation

More on this site