Cloud TTS API: Quickstart & Documentation

By Net8 editorial team · Updated 2026-11-19

This page documents the Voxly Cloud TTS API, designed for indie developers integrating speech into SaaS notifications and UI components. You will find precise specifications for the POST /v1/audio/speech endpoint, including request structures, supported response formats (MP3, WAV, OPUS, FLAC), and integration examples using the OpenAI SDK or plain HTTP.

The documentation covers essential operational details: authenticating with Bearer tokens, managing rate limits (60 req/min), and selecting from eight voice presets across 23 languages. Use this reference to generate audio files efficiently, handle errors correctly, and understand the pricing model based on character count. All endpoints and field requirements are listed below for immediate implementation.

Cloud TTS API: Quickstart & Documentation

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.net8.info/v1. You send POST requests to https://api.net8.info/v1/audio/speech for synthesis. Other endpoints like /v1/voices and /v1/models are also available at this base path. Use this URL when configuring your HTTP client or SDK for correct routing.

Can I use the OpenAI Python SDK?

Yes, the official OpenAI SDKs work by changing the base_url to https://api.net8.info/v1. Use your Voxly API key instead of an OpenAI key. The request shape matches the OpenAI speech endpoint, allowing you to integrate quickly without rewriting your existing client logic or data structures.

How do I pass the API key?

Pass your key via the Authorization header: Authorization: Bearer tts-... . You obtain this key on the /get-api-key/ page. Each account has one active key; sending it with every request authenticates your usage and tracks your character consumption against your current balance.

What audio formats are supported?

Supported formats are mp3, wav, opus, flac, and pcm. Specify the desired format using the response_format field in your JSON request body. This allows you to choose between compressed audio for web delivery or lossless formats for high-quality archival purposes.

What is the character limit per request?

Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer texts, split your content into chunks of 4096 characters or fewer, generate audio for each, and join the resulting files.

How do I set the speech speed?

Use the speed field in your request body, accepting values between 0.25 and 4.0. The default speed is 1.0. Adjusting this parameter allows you to slow down narration for clarity or speed up content for concise UI notifications and alerts.

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). Exceeding this may cause requests to queue or fail. Failed requests are free: if synthesis fails, the charge is returned in full.

Is the API key reusable?

Yes, the API key is reusable for all requests until you issue a new one. Each account maintains one active key. You can generate a new key at any time, and the old key stops working immediately upon creation of the new one.

How do I generate a new API key?

Generate a new key on the /get-api-key/ page of your account dashboard. Once issued, the new key becomes active immediately, and the previous key stops working at once. This allows you to rotate keys for security without downtime in your integration.

Does the API support SSML tags?

No, the API does not support SSML tags. It accepts plain text input only. You cannot use SSML for pauses, emphasis, or pronunciation control. For precise control, you must manage timing and breaks in your application logic before sending the text.

Can I specify the language in the request?

Yes, 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, explicitly setting the language ensures correct pronunciation and voice selection.

What is the default voice if none is specified?

The API requires a voice parameter; there is no implicit default. You must specify one of the eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Each voice has a distinct tone, from warm narrator to deep documentary style.

How do I handle large texts exceeding 4096 characters?

Split the text into parts of up to 4096 characters. Send each part as a separate request to the /v1/audio/speech endpoint. Then, join the resulting audio files in your application. This ensures each request stays within the character limit constraints.

Is the response binary or JSON?

The response contains the audio file directly, not JSON. The body is the binary audio data in the format you requested (e.g., mp3, wav). Headers indicate content type. You do not need to parse JSON to access the generated speech audio.

First request

curl

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

Your API key authenticates requests to the Voxly cloud service. It is issued upon account creation on /get-api-key/ and is tied to your specific net8.info account.

API Key Format

API Key Format

Keys begin with the prefix tts- followed by a unique alphanumeric string. You generate one active key per account, which you pass in the HTTP header to identify your billing account.

Bearer Token Usage

Bearer Token Usage

Include your key in the Authorization header as a Bearer token. The format is Authorization: Bearer tts-.... This header is required for all API endpoints, including /v1/audio/speech and /v1/voices.

Key Regeneration

You can issue a new key at any time via your dashboard. When a new key is generated, the previous one stops working immediately. Use this to revoke access if a key is compromised.

Speech Endpoint

Sound wave illustration for: Speech Endpoint

The core synthesis endpoint accepts text and returns audio files. Send a POST request to the API base URL with a JSON body containing your input parameters.

The API processes requests sequentially. For texts exceeding 4096 characters, split the input into chunks, generate each part, and join the resulting audio files.

Long texts typically generate at roughly real-time speed (25 characters per second). Short phrases may take a few seconds due to queue processing under load.

POST Request Structure

Send a JSON payload to the speech endpoint. The request shape matches the OpenAI speech endpoint, allowing you to use standard OpenAI SDKs by simply updating the base URL.

Required Fields

  • model: "tts-1" or "tts-1-hd" (identical engine and pricing)
  • input: raw text string, max 4096 characters
  • voice: one of the 8 available presets

Optional Parameters

  • response_format: mp3, wav, opus, flac, or pcm
  • speed: float between 0.25 and 4.0
  • language: ISO 639 code; otherwise, the system guesses from the script (Latin defaults to English)

Response Formats

Sound wave illustration for: Response Formats

The API returns audio files in formats specified by the response_format parameter. Supported options include MP3, WAV, OPUS, FLAC, and PCM, allowing you to choose the best balance between file size and quality for your integration.

MP3 Support

MP3 is the default and most widely compatible format. It offers efficient compression suitable for web delivery and general playback.

WAV Support

WAV provides uncompressed audio data. Use this format when you need raw, high-fidelity audio files without any compression artifacts, though file sizes will be significantly larger than MP3.

OPUS and FLAC Options

OPUS offers high-quality compression at lower bitrates, suitable for modern web applications. FLAC provides lossless compression, preserving audio quality while reducing file size compared to WAV.

  • OPUS: Efficient, modern compression
  • FLAC: Lossless quality

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

The API mirrors the OpenAI speech endpoint structure, allowing you to reuse existing client libraries with minimal configuration. By adjusting the base URL, you can switch from OpenAI’s service to Voxly’s infrastructure without rewriting request logic.

Base URL Configuration

Set your SDK’s base_url to https://api.net8.info/v1. This single change directs all requests to our endpoint while maintaining standard OpenAI-compatible request shapes.

  • Base URL: https://api.net8.info/v1

Client Initialization

Initialize the OpenAI SDK using your unique tts-... bearer token. The client handles authentication headers automatically, ensuring secure transmission of your text and voice parameters.

Request Compatibility

Send standard fields like model, input, voice, and response_format. The engine accepts tts-1 or tts-1-hd models, supporting formats from MP3 to PCM.

Curl Example

Sound wave illustration for: Curl Example

Use curl to verify your integration quickly. The following commands demonstrate standard speech synthesis and parameter adjustments for your SaaS workflows.

Adjust speed and voice selection to match your UI component requirements. The API returns audio files directly in the response body.

Basic Request

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

Replace YOUR_API_KEY with your actual key from the dashboard.

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

Speed Adjustment

Adjust the speed parameter between 0.25 and 4.0 to fit your notification context.

  • curl -X POST https://api.net8.info/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "tts-1", "input": "Fast update", "voice": "felix", "speed": 1.5, "response_format": "mp3" }'

Voice Selection

Select from eight presets like aria (warm, clear narrator) or atlas (neutral, news).

  • curl -X POST https://api.net8.info/v1/audio/speech \ -H "Authorization: Bearer YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "model": "tts-1-hd", "input": "Deep documentary tone", "voice": "orion", "response_format": "wav" }'
Curl Example

Error Handling

Sound wave illustration for: Error Handling

Errors return standard HTTP status codes with a JSON body containing a message. Failed synthesis requests are free, and charges are refunded in full if the engine cannot process the input.

Common Error Codes

The API returns 4xx or 5xx errors with descriptive messages. A 401 indicates an invalid or expired API key. A 500 error suggests a temporary server issue; retrying is safe.

Rate Limit Errors

Exceeding 60 requests per minute returns a 429 status. New accounts without a top-up are limited to 10 requests per minute. Monitor your usage to avoid queuing delays.

  • 429 Too Many Requests
  • Standard limit: 60 req/min
  • Pre-topup limit: 10 req/min

Invalid Input

Requests with text exceeding 4096 characters or missing the input field return a 400 error. Ensure your voice and model parameters match the available presets and models.

Rate Limits

Sound wave illustration for: Rate Limits

The API enforces strict rate limits to ensure stable generation for indie developers. Your active key allows 60 requests per minute under normal conditions. This limit applies per key, not per IP or account.

Before your first top-up, the limit is stricter at 10 requests per minute. Once you top up via USDT (TRC-20), the standard limit activates automatically. Failed requests do not consume your quota.

Standard Limit

You can send up to 60 requests per minute with a valid, topped-up key. This throughput is sufficient for most SaaS notification pipelines and bulk audio generation tasks.

Requests are processed sequentially. If you exceed the limit, further requests wait in a queue until capacity opens up. This prevents sudden spikes from degrading service for other users.

  • Limit: 60 requests/minute per key
  • Processing: Sequential
  • Failed requests: Do not count

Pre-Topup Limit

New accounts or those with zero balance are limited to 10 requests per minute. This lower tier ensures fair usage while you prepare your first top-up.

Once you deposit a minimum of $5 USDT on TRON, your limit instantly upgrades to the standard 60 requests/minute. No manual verification is required.

  • Limit: 10 requests/minute
  • Condition: Balance is zero
  • Upgrade: Automatic after top-up

Queue Behavior

Under load, requests are queued and processed one after another. Short phrases may take a few seconds, while longer texts take roughly real-time (25 chars/sec).

If the queue is full, you may receive a 429 error. Your charge is returned in full if synthesis fails.

  • Queue: Sequential processing
  • Error: 429 Too Many Requests
  • Refund: Automatic on failure

Voices Endpoint

Sound wave illustration for: Voices Endpoint

The /v1/voices endpoint provides a list of available voice presets, their supported languages, and formats. This allows your application to dynamically populate UI components or validate selections before sending synthesis requests.

You can filter the response by language code to ensure compatibility with your target audience's requirements.

GET /v1/voices

Send a GET request to this endpoint to retrieve the current list of eight voice presets. The response includes voice IDs, names, and metadata for each available option.

This data is cached and updated only when new voices are added, so caching the response locally for short periods is efficient.

  • Returns JSON array of voice objects
  • Includes voice ID, name, gender, and supported formats
  • No authentication required for basic listing

Voice Attributes

Each voice object contains an ID (e.g., 'aria', 'nova'), a display name, and a gender indicator. These attributes help you select the right tone for your SaaS notifications or UI elements.

Voices are based on licensed recordings: LibriTTS-R (CC BY 4.0), from LibriVox public-domain audiobook readings.

Language Codes

The endpoint returns ISO 639-1 language codes supported by each voice. While any voice can speak any of the 23 supported languages, explicitly setting the language parameter improves accuracy for non-English Latin-script text.

If the language field is omitted, the API guesses the language from the script, defaulting to English for Latin characters.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Clear audio reduces cognitive load for users with hearing impairments.

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. FFmpeg documentation
  3. Node.js documentation
  4. openai-node on GitHub
  5. Tether (USDT)
  6. curl documentation
  7. MDN: Web Speech API
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. OpenAI API reference: create speech
  10. LibriTTS-R corpus (OpenSLR 141)
  11. IETF RFC 7845: Ogg Opus
  12. Creative Commons Attribution 4.0

More on this site