Generate Audio from Text with Our Cloud TTS API

By BotVoice Metrics editorial team · Updated 2026-11-19

This documentation provides the precise technical details for integrating BotVoice Metrics’ cloud Text-to-Speech API into your voice assistant or chatbot applications. You will find exact endpoint specifications, parameter definitions, and code examples for both raw HTTP requests and OpenAI SDK compatibility. The guide covers authentication, voice selection, and response formats to help you evaluate integration ease and latency for indie developer workflows.

All endpoints follow the standard OpenAI request shape, allowing you to swap the base URL and use existing SDKs with minimal code changes. We focus on concrete metrics like cost-per-character and rate limits to help you build reliable audio generation pipelines. This page is designed for developers who need transparent, predictable pricing and clear technical constraints without marketing fluff.

Generate Audio from Text with Our Cloud TTS API

Frequently asked questions

How do I get my API key?

Sign up on /get-api-key/ using Google or email. Accounts are per site. The dashboard displays your active key, balance, and usage statistics immediately after registration. You can issue a new key at any time, which invalidates the old one instantly.

Can I use the OpenAI Python SDK?

Yes. The request shape matches the OpenAI speech endpoint. Update the SDK's base_url to https://api.zc999.info/v1 and use your BotVoice Metrics key. This allows seamless integration with existing OpenAI Python client code without custom wrappers.

What is the base URL for the API?

The base URL is https://api.zc999.info/v1. Use this for all requests, including POST /v1/audio/speech, GET /v1/voices, and GET /v1/models. Ensure your authentication header uses this domain to avoid routing errors.

How do I specify the language?

Pass the optional language field with an ISO code (e.g., 'fr', 'de'). If omitted, the system guesses from the script, defaulting Latin text to English. Explicitly setting it ensures accurate synthesis for non-English Latin-script languages.

What are the available voice IDs?

Use: aria, nova, luna, sage (female); felix, milo, atlas, orion (male). Each voice supports all 23 listed languages. Fetch the full list via GET /v1/voices. These presets cover narrator, upbeat, storytelling, and documentary styles.

Can I change the speed of the audio?

Yes, set the speed parameter between 0.25 and 4.0. This adjusts playback rate without altering pitch. Values outside this range may be rejected. Adjust speed to fit your application's timing requirements for voice assistants or chatbots.

What happens if I exceed the rate limit?

You are limited to 60 requests per minute per key (10 before first top-up). Exceeding this causes requests to wait in a queue or fail with a 429 error. Monitor your usage dashboard to plan burst traffic for your voice assistant applications.

Is SSML supported in the request body?

No. The API does not support SSML, phoneme dictionaries, or custom pronunciation lexicons. Input is plain text up to 4096 characters. For precise control, adjust voice selection and speed parameters instead of relying on markup tags.

How do I handle long texts?

Split input into parts of up to 4096 characters. Generate audio for each part separately, then join the resulting audio files. This ensures compliance with character limits while maintaining audio continuity for longer voice assistant responses.

Does the API support streaming?

No. The API returns complete audio files upon request completion. There is no WebSocket or real-time partial audio support. Requests are processed sequentially, so latency depends on queue status and text length, typically real-time for long texts.

What is the maximum character limit per request?

The input field accepts up to 4096 characters per request. Spaces and punctuation count toward this limit. For longer content, manually split the text and concatenate the generated audio files from multiple API calls.

How do I rotate my API key?

Issue a new key via your account dashboard at any time. The new key becomes active immediately, and the old key stops working at once. This ensures secure access management for your indie developer projects.

Is the API key tied to an IP address?

No. The key is not tied to a specific IP address. It is associated with your account. You can use the same key across multiple environments or devices, provided you stay within the rate limits.

Can I use the same key for multiple projects?

Yes. One active key per account can be used across multiple projects. Share the key or distribute it as needed. Monitor usage via the dashboard to ensure you stay within the 60 requests per minute limit.

First request

curl

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

Authentication

Sound wave illustration for: Authentication

Access the API using a Bearer token obtained from your account dashboard. Each account is issued one active key, which authenticates all requests to the endpoint.

Keys are managed via the /get-api-key/ page, where you can view usage statistics and generate new credentials instantly without service interruption.

API Key Generation

API Key Generation

Sign up on /get-api-key/ using Google or email to receive your initial key. The dashboard displays your key, balance, and a ready-to-use curl example for immediate testing.

Keys are unique per site account. You can generate a new key at any time, which becomes active immediately upon creation.

  • Supported authentication via Google or email/password sign-up
  • One active key per account
  • Instant key generation via dashboard

Bearer Token Usage

Bearer Token Usage

Include your key in the HTTP header as Authorization: Bearer tts-.... This token is required for all API calls, including speech generation and voice listing.

Ensure the key is sent exactly as generated; no prefix or suffix modifications are allowed.

  • Format: Authorization: Bearer tts-<your-key>
  • Required for all endpoints

Key Rotation Policy

Generating a new key invalidates the old one immediately. Use this feature if you suspect a leak or need to rotate credentials for different environments.

There is no cooldown period; the new key is active from the moment of creation.

  • Old key stops at once
  • New key activates immediately
  • No downtime during rotation

Speech Generation Endpoint

Sound wave illustration for: Speech Generation Endpoint

The core endpoint is POST https://api.zc999.info/v1/audio/speech. Send JSON containing your text, voice selection, and model choice. The API returns a binary audio file or an error object.

You can process up to 4096 characters per request. For longer texts, split the input and join the resulting audio files sequentially.

POST /v1/audio/speech

Send a POST request to the speech endpoint with your API key in the Authorization header. The request body must include the input text, voice preset, and model selection.

  • Endpoint: POST https://api.zc999.info/v1/audio/speech
  • Content-Type: application/json

Request Body Parameters

Required fields are model ("tts-1" or "tts-1-hd"), input (string, max 4096 chars), and voice. Optional fields include response_format, speed (0.25–4.0), and language (ISO code).

  • model: "tts-1" or "tts-1-hd"
  • input: Text string, up to 4096 characters
  • voice: One of 8 presets (e.g., aria, nova)
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: Float between 0.25 and 4.0
  • language: Optional ISO code

Response Format

On success, the response contains the raw audio binary data corresponding to your selected response_format. Failed requests return a JSON error object with a status code and message, with no charge applied.

Voices and Models

Sound wave illustration for: Voices and Models

BotVoice Metrics tests voice quality and latency across all available presets. Use GET /v1/voices to retrieve the full list of eight voices, their supported languages, and current pricing. This endpoint confirms which voices are active and ready for synthesis.

GET /v1/voices

Call this endpoint to see all eight voice presets: aria, nova, luna, sage, felix, milo, atlas, and orion. Each voice supports all 23 listed languages. The response includes metadata useful for selecting the right tone for your voice assistant or chatbot interface.

GET /v1/models

Retrieve the available model identifiers. This confirms the standard model names recognized by the API for text synthesis requests.

Model Selection (tts-1, tts-1-hd)

Both tts-1 and tts-1-hd use the same engine and incur the same price: $0.01 per 1,000 characters. There is no cost difference between the standard and HD models. Choose based on your preferred audio format or specific latency requirements, as the synthesis quality is identical.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

To integrate with BotVoice Metrics, configure your OpenAI SDK client to point at our API base URL. This allows you to use standard libraries without custom wrappers, leveraging the same request shape as the official speech endpoint.

Base URL Configuration

Set the base_url parameter in your SDK client to https://api.zc999.info/v1. This redirects all standard TTS requests to our infrastructure while maintaining compatibility with existing OpenAI SDK implementations.

SDK Initialization

Initialize the client using your API key obtained from /get-api-key/. Ensure the key is passed as a Bearer token in the authorization header, which the SDK handles automatically when configured correctly.

Example Code Snippet

Use the standard client.audio.speech.create() method. Pass your model (tts-1 or tts-1-hd), voice preset, and input text. The SDK returns the audio binary directly, which you can save or stream to your voice assistant.

  • Set base_url to https://api.zc999.info/v1
  • Use standard AudioSpeech parameters
  • Compatible with official OpenAI Python/Node SDKs

Curl Example

Sound wave illustration for: Curl Example

Use curl to verify your integration quickly. The following examples demonstrate standard text-to-speech requests against the ZC999 API endpoint, covering basic synthesis, language specification, and speed adjustment.

Basic Request

Send a POST request to the speech endpoint with a model and voice preset. The API returns the audio file directly in the response body.

  • curl -X POST "https://api.zc999.info/v1/audio/speech" \ -H "Authorization: Bearer tts-your-api-key" \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova"}'

With Language Parameter

Explicitly set the language ISO code to ensure correct pronunciation, especially for Latin-script texts that are not English. This prevents automatic language guessing from failing.

  • curl -X POST "https://api.zc999.info/v1/audio/speech" \ -H "Authorization: Bearer tts-your-api-key" \ -d '{"model": "tts-1", "input": "Bonjour", "voice": "aria", "language": "fr"}'

With Speed Adjustment

Adjust the speed parameter between 0.25 and 4.0 to match your voice assistant's pacing needs. Lower values create slower, clearer speech; higher values increase tempo.

  • curl -X POST "https://api.zc999.info/v1/audio/speech" \ -H "Authorization: Bearer tts-your-api-key" \ -d '{"model": "tts-1", "input": "Fast forward", "voice": "felix", "speed": 2.0}'
Curl Example

Response Formats

Sound wave illustration for: Response Formats

The API returns audio files in five distinct formats, allowing you to choose the optimal balance between file size and quality for your chatbot or voice assistant application. Select mp3 for efficient bandwidth usage or wav and flac for lossless fidelity during development and testing phases.

For raw audio processing or specific codec pipelines, pcm and opus provide uncompressed linear audio and low-latency compression respectively. Each format is delivered directly in the HTTP response body, ensuring seamless integration with your existing audio infrastructure without additional conversion steps.

MP3 Support

MP3 is the default and most widely supported format, offering a good balance between compression and audio quality. It is ideal for web-based voice assistants where bandwidth efficiency matters. The codec ensures compatibility with nearly all playback engines used in chatbot deployments.

  • Default format for most integrations
  • Optimized for web delivery and storage
  • Compatible with standard audio players

WAV and FLAC Options

WAV provides uncompressed PCM audio, preserving the exact bit depth and sample rate of the synthesis engine. FLAC offers lossless compression, reducing file size by up to 50% compared to WAV while maintaining identical audio fidelity. Both are excellent for high-precision verification or archival storage.

  • WAV: Uncompressed, maximum compatibility
  • FLAC: Lossless compression, smaller size
  • Ideal for testing and archival

PCM and OPUS Formats

PCM returns raw audio data, suitable for direct processing in custom audio pipelines or embedded systems with specific hardware requirements. OPUS provides low-latency, high-quality compression, making it suitable for efficient file transfer, though the API does not support real-time streaming.

  • PCM: Raw binary audio data
  • OPUS: Low-latency, high-efficiency
  • Best for custom hardware pipelines

Error Handling

Sound wave illustration for: Error Handling

Errors are returned as standard HTTP status codes with a JSON body describing the issue. Failed synthesis requests incur no charge, ensuring you only pay for successfully generated audio.

Common Error Codes

Use 400 for bad requests, 401 for invalid API keys, and 429 for rate limits. Each response includes a message field explaining the specific failure, allowing your application to log and retry appropriately.

  • 400 Bad Request: Invalid JSON or missing required fields.
  • 401 Unauthorized: The provided API key is incorrect or expired.
  • 429 Too Many Requests: Exceeded the per-minute rate limit.

Rate Limit Exceeded

You are limited to 60 requests per minute per key after the initial threshold. If you exceed this, subsequent requests may wait in a queue or return a 429 error until the window resets.

  • Standard limit: 60 requests per minute.
  • Initial limit: 10 requests per minute before the first top-up.

Invalid Input Handling

The API validates the input field strictly. Text exceeding 4096 characters will cause a 400 error. Ensure your client code splits longer texts into valid chunks before sending them to the endpoint.

Rate Limits

Sound wave illustration for: Rate Limits

The API enforces a standard rate limit of 60 requests per minute per active API key. This threshold is sufficient for most indie developer workloads, allowing steady integration with chatbot pipelines or voice assistant backends without immediate throttling. Requests are processed sequentially, so high-volume generation may experience slight queue delays during peak usage.

Initial 10 Requests Per Minute

New accounts without a top-up start with a reduced limit of 10 requests per minute. This lower threshold helps manage load during the free trial phase or before initial funding. Once you add funds via USDT (TRC-20), the limit automatically increases to the standard 60 requests per minute.

Quota Reset Timing

The rate limit window resets continuously every minute, not on a fixed hourly or daily cycle. If you exceed the limit, subsequent requests will be rejected with a 429 status code until the window slides forward. Monitor your usage via the dashboard to avoid interruptions in automated voice synthesis pipelines.

  • Limit: 60 requests/minute (standard)
  • Limit: 10 requests/minute (new accounts)
  • Reset: Sliding 60-second window
  • Error: HTTP 429 when exceeded

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. We assess naturalness by listening to the eight voice presets across different languages.

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. Creative Commons Attribution 4.0
  3. curl documentation
  4. openai-node on GitHub
  5. MDN: Web Speech API
  6. ISO 639 language codes
  7. W3C WAI: making audio and video accessible
  8. IETF RFC 7845: Ogg Opus
  9. LibriTTS-R corpus (OpenSLR 141)
  10. LibriVox public-domain audiobooks
  11. LibriTTS-R paper (arXiv 2305.18802)
  12. Node.js documentation

More on this site