API Documentation for IVR Text-to-Speech Integration

By Voqu editorial team · Updated 2026-11-19

This documentation provides step-by-step instructions for integrating Voqu’s text-to-speech API into your IVR system. You will learn how to generate audio files from text using standard HTTP requests, compatible with the OpenAI SDK shape, to replace human agents with scalable synthetic voices.

Designed for startups building professional phone trees, this guide covers key integration steps: obtaining your API key, configuring voice presets, handling rate limits, and managing response formats. Read on to implement reliable, cost-effective voice synthesis for your call center workflows.

API Documentation for IVR Text-to-Speech Integration

Frequently asked questions

What is the API endpoint URL?

The endpoint is POST https://api.cc6666.info/v1/audio/speech. You send a JSON body containing your text, voice selection, and other parameters. This follows the same request shape as the OpenAI speech endpoint, ensuring compatibility with standard HTTP clients and SDKs that support this structure.

How do I get an API key?

Sign up on /get-api-key/ using Google or email plus password. Your account page displays your active API key, balance, and usage stats. You can issue a new key at any time; the old one stops immediately. Each account has one active key at a time.

Can I use the OpenAI Python SDK?

Yes. The API uses the same request shape as OpenAI. Change the base_url to https://api.cc6666.info/v1 and use your site’s key. The official OpenAI SDKs work directly without modification, allowing you to integrate quickly into your existing Python codebase.

What is the maximum text length?

The input field accepts up to 4096 characters per request. For longer texts, split them into parts of this limit and join the resulting audio files. Spaces and punctuation count toward the character limit. Failed requests are free, so you can test lengths safely.

Does the API support streaming?

No. The API does not support streaming, WebSocket, or real-time partial audio. You send a request and receive the complete audio file in the response. For IVR systems, this means you must wait for the full file before playing it to the caller.

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

How do I specify the voice?

Include the voice field in your JSON body with one of the 8 presets: aria, nova, luna, sage, felix, milo, atlas, or orion. These voices are based on licensed recordings from LibriTTS-R and LibriVox. You can select different voices for different IVR prompts or menus.

Is there an SDK for mobile?

No. There is no official mobile SDK. You can use the standard HTTP API or the OpenAI SDK, which works on mobile platforms. Since the API is RESTful, you can integrate it directly into your mobile app’s backend or call it from your mobile code.

What formats are supported?

Supported response formats are mp3, wav, opus, flac, and pcm. You specify the desired format using the response_format field in your request. MP3 and WAV are common for IVR systems, while OPUS and FLAC offer compression or lossless quality depending on your infrastructure needs.

How do I handle errors?

If synthesis fails, the charge is returned in full. You should check the HTTP status code and response body for error details. Failed requests do not consume your character balance. Implement retry logic for transient errors, but note that rate limits may still apply during retries.

Can I change my API key?

Yes. You can issue a new key at any time from your account page. When a new key is issued, the old one stops immediately. This allows you to rotate keys for security without downtime, ensuring that only authorized clients can access your IVR generation service.

Is there a sandbox environment?

No. There is no separate sandbox environment. You use the same production endpoint for testing. You can use your free trial credit ($0.50) or top-up balance to test in the live environment. Failed requests are free, allowing you to test error handling without cost.

How do I set the language?

Use the optional language field with an ISO code. If omitted, the language is guessed from the script, defaulting to English for Latin text. For non-English Latin-script text, always set the language field to ensure accurate synthesis. Supported languages include English, Spanish, German, and 20 others.

What is the response format?

The response contains the generated audio file in the format you requested (mp3, wav, opus, flac, or pcm). The audio is returned directly in the response body. Each file includes an inaudible watermark marking it as synthetic speech. You receive the full file, not partial streams.

First request

curl

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

Sign up on our /get-api-key/ page using your Google account or an email and password. This creates an independent account specific to cc6666.info. Google sign-ins receive a $0.50 trial credit valid for 7 days, while email accounts start with zero balance. You need a funded account to generate audio for your IVR system.

Sign up via Google or email

Sign up via Google or email

Visit the registration page and choose your preferred method. Google sign-up provides immediate trial credit. Email sign-up requires manual top-up before use.

Access key on dashboard

Access key on dashboard

After registration, your dashboard displays your active API key starting with tts-. It also shows your current balance, trial status, and character usage. Use this key in your Authorization: Bearer header for all API calls.

Generate new key if needed

You can issue a new key at any time from the dashboard. When you generate a new key, the old one stops working immediately. This allows you to revoke access for specific integrations without losing your billing history or balance.

Quickstart with cURL

Sound wave illustration for: Quickstart with cURL

Use cURL to verify your API key and understand the request format before integrating into your IVR system. Send a POST request to the speech endpoint with your synthetic voice parameters to receive an audio file.

This method requires no external SDKs or libraries. You can test the endpoint directly from your command line to ensure connectivity and correct formatting before building your phone tree logic.

Basic request structure ['The API accepts JSON bodies with specific fields. You must define the model, the text input, and the voice preset. The response returns the audio file directly in the body.', {'h3': 'Required fields: model, input, voice', 'paras': ['Set model to tts-1 or tts-1-hd. Provide your text in input (max 4096 characters). Choose one of the eight voice presets in voice.', 'For IVR systems, specify the language ISO code if the text is not English, as Latin script defaults to English without explicit configuration.']}, {'h3': 'Example command for testing', 'bullets': ['Test your key immediately after signup', 'Verify audio format compatibility with your PBX', 'Check character counting for billing accuracy']}]

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

To use the OpenAI SDKs, update the base_url to https://api.cc6666.info/v1. This allows you to keep your existing code structure while routing requests to our TTS engine. The official OpenAI SDKs handle authentication and formatting automatically.

Change base_url to our endpoint

Point your SDK client to our API base URL. This ensures all subsequent calls, including speech generation, route correctly through our infrastructure without requiring code changes beyond the endpoint configuration.

  • Base URL: https://api.cc6666.info/v1
  • Use your Bearer token for auth

Use official OpenAI SDKs

Leverage the official OpenAI Python or Node.js libraries, or any HTTP client. They provide robust error handling and type safety, making integration into your IVR backend straightforward and reliable.

Compatible request shape

The request body mirrors the OpenAI /v1/audio/speech endpoint. Pass model, input, and voice to generate audio. We support tts-1 and tts-1-hd models with identical pricing and engine behavior.

Request Parameters

Sound wave illustration for: Request Parameters

Configure the synthesis engine and voice output using three core parameters. Selecting the correct model and voice ensures your IVR menu matches the desired brand tone, while speed adjustments help fit responses into strict timing constraints.

Model: tts-1 or tts-1-hd

Both models use the same engine and price. Choose "tts-1" for standard latency or "tts-1-hd" for higher fidelity. The API accepts either identifier without changing the response structure.

Voice selection from 8 presets

Assign one of eight licensed voices to your prompts. Female options include aria (warm narrator), nova (upbeat), luna (storytelling), and sage (instructional). Male options include felix (energetic), milo (conversational), atlas (news), and orion (documentary).

  • Use "sage" for clear instructional prompts.
  • Use "atlas" for neutral news-style updates.

Speed control 0.25 to 4.0

Adjust the speed parameter between 0.25 and 4.0 to match your caller experience. Faster speeds reduce wait times but may reduce clarity. Test specific voices at your target speed to ensure natural intonation in your phone tree.

Response Formats

Sound wave illustration for: Response Formats

The API returns the synthesized audio directly in the response body, allowing your IVR system to receive a complete file ready for playback. You can choose from five standard formats: MP3, WAV, OPUS, FLAC, or PCM, depending on your telephony infrastructure’s requirements.

MP3, WAV, OPUS, FLAC, PCM

Select the response_format parameter to match your carrier’s codec support. MP3 and OPUS are efficient for bandwidth, while WAV and FLAC offer lossless quality. PCM is available for raw digital audio.

Audio file in response body

The generated audio is delivered as a binary file within the HTTP response. Your system should handle this binary data directly without needing to fetch a separate URL, ensuring immediate availability for your phone tree prompts.

No streaming or WebSocket

Synthesis is a batch process; you do not receive partial audio chunks. The entire audio file is generated and returned at once. This means you cannot stream real-time audio, but it simplifies error handling for IVR logic.

Response Formats

Rate Limits

Sound wave illustration for: Rate Limits

Your API key allows 60 requests per minute. This limit applies per key, so if you generate multiple keys, you can scale your throughput. Each request counts toward this quota, regardless of text length.

60 requests per minute per key

The standard rate limit is 60 requests per minute for each active API key. You can issue a new key from your dashboard, but note that only one key is active at a time. The old key stops immediately, so coordinate key rotation carefully to avoid service interruptions.

  • Limit applies per API key, not per account.
  • Generate new keys via the dashboard.
  • Old keys deactivate instantly upon new key issuance.

10 requests before first top-up

New accounts start with a lower limit of 10 requests per minute. This applies until you make your first top-up. Once you add USDT (TRC-20), your limit increases to the standard 60 requests per minute immediately.

  • Initial limit: 10 requests/minute.
  • Requires first USDT top-up to increase.
  • Limit updates automatically after payment confirmation.

Queue processing under load

Requests are processed sequentially. Under heavy load, a request may wait in a queue before synthesis begins. This can increase latency, especially for longer texts. Plan your IVR call flow to handle potential delays gracefully.

  • Requests are processed one after another.
  • Latency may increase during high traffic.
  • Design IVR prompts to accommodate queue delays.

Error Handling

Sound wave illustration for: Error Handling

When synthesis fails, the charge is returned in full, so you can retry without financial risk. This safety net allows your IVR system to handle temporary errors gracefully without impacting customer experience or budget. The API ensures that you only pay for successful audio generation, making it predictable for high-volume call center operations.

Understanding specific error responses helps your integration recover quickly. Always check the HTTP status code and the response body for detailed information about what went wrong, such as invalid parameters or exceeding limits. This allows for precise debugging and faster resolution during peak usage times.

Common error codes

Standard HTTP status codes indicate issues like invalid input or rate limits. Check the response body for specific details to resolve the issue quickly. For example, a 400 error might indicate that the text exceeds the 4096 character limit or that an unsupported voice was requested.

A 429 error signals that you have exceeded the rate limit of 60 requests per minute. Review your implementation to ensure you are not sending too many concurrent requests, especially when processing long phone trees.

  • 400: Invalid request parameters (e.g., text length, unknown voice)

Retry logic for IVR systems

Implement exponential backoff for retries to handle transient network issues or temporary server load. Since requests are processed sequentially, under heavy load a request may wait in a queue, causing a delay.

If a request fails due to a rate limit, wait briefly before retrying. Since failed requests are free, you can safely retry up to three times to ensure the audio is delivered to the caller without incurring extra costs.

Language Configuration

Sound wave illustration for: Language Configuration

The TTS engine supports 23 languages, allowing you to deploy voice agents globally without managing multiple voice models. You can specify the target language using an optional language parameter in the request body, ensuring consistent pronunciation and accent for your IVR prompts.

Optional ISO language code

Set the language field to a valid ISO 639-1 code (e.g., es, fr, de) to enforce specific output. This is critical when your text contains mixed scripts or when you need to guarantee a non-English accent for Latin-script text.

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

Auto-detection for Latin script

If the language field is omitted, the system guesses the language based on the input text. Latin script characters default to English, while Cyrillic or CJK characters trigger their respective language models automatically.

Explicit setting for non-English

For non-English text using Latin characters (e.g., Spanish or German), always set the language parameter explicitly. Without it, the engine may default to English, resulting in an unintended accent. Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, and Bengali are not supported.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. His style is consistent and professional, perfect for standard announcements.

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-python on GitHub
  3. openai-node on GitHub
  4. LibriTTS-R corpus (OpenSLR 141)
  5. Python documentation
  6. LibriVox public-domain audiobooks
  7. OpenAI API reference: create speech
  8. ISO 639 language codes
  9. MDN: Web Speech API
  10. LibriTTS-R paper (arXiv 2305.18802)
  11. W3C WAI: making audio and video accessible
  12. FFmpeg documentation

More on this site