Developer Documentation for News Audio API

By NewsSynth editorial team · Updated 2026-11-19

This documentation provides the technical specifications for integrating the VoiceWire Text-to-Speech API into your news production workflow. It covers authentication, endpoint structures, and SDK configurations required to generate compliant audio files at scale. The guide is designed for product teams and developers managing high-volume audio content who need precise control over voice selection, output formats, and billing transparency.

You will find concrete examples for OpenAI SDK configuration, cURL commands, and Python integration, along with details on rate limits and error handling. All endpoints follow a standard JSON structure, allowing you to leverage existing client libraries by simply adjusting the base URL. This page assumes you have already obtained an API key via the /get-api-key/ endpoint.

Developer Documentation for News Audio API

Frequently asked questions

What SDKs are supported?

The API follows the OpenAI speech endpoint shape. You can use any official OpenAI SDK by changing the base_url to https://api.m4vip.cc/v1. Alternatively, use standard HTTP requests. We do not provide a proprietary SDK. This allows immediate integration using libraries you already know, ensuring compatibility with existing codebases without requiring new dependencies or learning curves.

How do I authenticate requests?

Include your API key in the Authorization header as a Bearer token: Authorization: Bearer tts-.... Each account holds one active key. You can issue a new key at any time via the dashboard, which immediately invalidates the previous key. Ensure your key is sent with every request to the API endpoint for proper authentication and billing attribution.

What is the max text length?

Each request supports up to 4096 characters. If your text exceeds this limit, split it into parts of 4096 characters or fewer. Generate audio for each part separately, then join the resulting audio files. This ensures consistent processing and avoids errors. Character counts include spaces and punctuation, so plan your segmentation accordingly for long-form content delivery.

Can I stream audio?

No, streaming is not supported. The API returns the complete audio file in the response body after synthesis finishes. You cannot receive partial audio chunks in real-time. For long texts, you must split the input into chunks, generate each file, and join them client-side. This approach ensures file integrity but requires handling multiple requests for longer content.

Does it support SSML?

SSML is not supported. The API accepts plain text input only. You cannot use SSML tags for pronunciation, pauses, or emphasis. If you need specific control, you must manage pacing and breaks manually by splitting text into separate requests. This limits fine-grained audio control but simplifies the integration process for standard text-to-speech workflows.

How do I handle rate limits?

The limit is 60 requests per minute per key (10 per minute before the first top-up). Requests are processed sequentially, so under load, they may queue. Implement exponential backoff or queue management in your integration. Monitor your usage via the dashboard. If you exceed limits, wait for the window to reset.

What are the voice options?

Eight presets are available: Aria, Nova, Luna, Sage (female); Felix, Milo, Atlas, Orion (male). Voices are based on licensed LibriTTS-R recordings. Each voice supports all 23 languages. Select the voice that matches your content tone, such as Atlas for news or Luna for storytelling. All voices are included in the standard pricing model without extra fees.

How do I format the JSON request?

Send a POST request to /v1/audio/speech with a JSON body. Required fields are model (tts-1 or tts-1-hd), input (text), and voice. Optional fields include response_format, speed (0.25–4.0), and language. Use the standard OpenAI SDK structure. Ensure the text does not exceed 4096 characters. The response will contain the audio file in the requested format.

Is there a Python SDK?

Yes, the official OpenAI Python SDK works by setting the base_url to https://api.m4vip.cc/v1. You can use the same code structure as for OpenAI’s speech endpoint. No custom Python library is required. This allows you to leverage existing Python integrations and tools. Simply update the API key and base URL in your configuration settings.

How do I change the language?

Set the language field in the request body to the ISO code of your desired language. If omitted, the system guesses the language from the script, defaulting to English for Latin text. Explicitly setting the language ensures accuracy, especially for non-English Latin-script content. Supported languages include Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish.

What happens on error?

Failed requests are free. If synthesis fails, the charge is returned in full. The API returns an error status code and details about the failure. You can retry the request or adjust parameters like text length or voice. No credit is deducted for unsuccessful attempts, ensuring you only pay for successfully generated audio files.

How do I rotate my key?

Issue a new key from the dashboard at any time. The new key becomes active immediately, and the old key stops working at once. This ensures seamless rotation without downtime. You can manage keys directly from the account page. Use the new key in your applications to maintain security and control over your API access.

Can I use custom voices?

No, custom voice cloning is not offered. You must choose from the eight preset voices: Aria, Nova, Luna, Sage, Felix, Milo, Atlas, or Orion. These are based on licensed recordings: LibriTTS-R (CC BY 4.0), from LibriVox public-domain audiobook readings. You cannot upload your own voice or design custom voices. This limitation keeps the service simple and consistent for high-volume news audio production.

How do I track usage?

View usage details on the dashboard after signing in. The page shows your balance, characters left, and usage history. Request metadata, including time, characters, and status, is kept for billing. You can also monitor rate limits and key status. This transparency helps you manage costs and ensure consistent audio generation for your news outlet’s content pipeline.

First request

curl

curl https://api.m4vip.cc/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.m4vip.cc/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.m4vip.cc/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 and API Keys

Sound wave illustration for: Authentication and API Keys

Access the /get-api-key/ page to authenticate via Google or email credentials. The dashboard displays your active API key, current balance, and usage metrics. This key enables secure communication with the API base URL for all subsequent requests.

Generating Your API Key

Generating Your API Key

Sign up using Google or email to receive a unique Bearer token. Each account maintains one active key visible on the dashboard. This key authenticates your requests to the speech generation endpoint.

  • Google or email authentication
  • Single active key per account
  • Visible on /get-api-key/ dashboard

Bearer Token Authorization

Bearer Token Authorization

Include the header Authorization: Bearer tts-... in every request. The API validates this token against the account credentials. Ensure the key matches the scope of your integration.

Key Rotation Policy

Issue a new key from the dashboard at any time. The previous key becomes invalid immediately upon generation. This ensures secure key rotation without downtime for high-volume news pipelines.

Endpoints and Request Structure

Sound wave illustration for: Endpoints and Request Structure

The API follows a strict REST structure designed for reliable audio generation workflows. News product teams interact with three primary endpoints to manage speech synthesis, retrieve available voice configurations, and verify model availability.

Speech Generation Endpoint

Send a POST request to https://api.m4vip.cc/v1/audio/speech with a JSON body containing your text, selected voice, and desired output format. The endpoint accepts standard fields like input, voice, and response_format, mirroring the OpenAI speech structure for seamless integration.

  • Endpoint: POST https://api.m4vip.cc/v1/audio/speech
  • Accepts JSON body with text input and voice parameters
  • Returns audio file directly in the response

Voices List Endpoint

Retrieve the complete list of available voice presets, supported languages, and formats using a GET request to https://api.m4vip.cc/v1/voices. This endpoint allows your application to dynamically populate user selection menus without hardcoding voice IDs, ensuring compatibility with the latest available options.

  • Endpoint: GET https://api.m4vip.cc/v1/voices
  • Returns list of 8 voice presets and 23 languages
  • Includes format and pricing metadata for each voice

Models Information Endpoint

Access model details via GET https://api.m4vip.cc/v1/models to confirm available engine versions. The API supports two model variants: tts-1 and tts-1-hd, which use the same engine and pricing structure.

  • Endpoint: GET https://api.m4vip.cc/v1/models
  • Supports tts-1 and tts-1-hd model variants
  • Both models use identical pricing ($10 per 1M characters)

Request Parameters

Sound wave illustration for: Request Parameters

Configure request parameters to generate audio via the speech endpoint. Input text is limited to 4096 characters per request, including spaces and punctuation. Longer texts must be split into segments and joined client-side.

Input Text and Length Limits

Each request accepts a maximum of 4096 characters. Exceeding this limit returns a validation error. For longer content, split the text into chunks, generate audio for each, and concatenate the resulting files.

Voice Selection Options

Select from eight presets: aria, nova, luna, sage (female) or felix, milo, atlas, orion (male). Specify the voice parameter by name. If language is omitted, the system guesses based on script, defaulting to English for Latin text.

  • aria: warm, clear narrator
  • nova: bright, upbeat
  • luna: soft, storytelling
  • sage: calm, instructional
  • felix: energetic, promo
  • milo: friendly, conversational

Response Format Choices

Choose the output format using the response_format field. Options include mp3, wav, opus, flac, or pcm. Select based on your playback infrastructure's requirements. MP3 is standard for web delivery; WAV and FLAC offer uncompressed quality.

SDK Integration Examples

Sound wave illustration for: SDK Integration Examples

Integrate VoiceWire into your news audio pipeline using standard OpenAI-compatible SDKs. The only requirement is adjusting the base_url to https://api.m4vip.cc/v1 while maintaining the existing request structure. This approach allows product teams to leverage familiar libraries without rewriting core logic.

Authentication relies on a single Bearer token passed in the Authorization header. The same key supports all endpoints, from speech generation to voice listing, simplifying credential management for high-volume publishing workflows.

OpenAI SDK Configuration

Configure the client by pointing the base URL to our API endpoint. The request shape remains identical to the standard OpenAI speech endpoint, ensuring immediate compatibility with existing integrations.

This method is ideal for teams already utilizing OpenAI’s client libraries, requiring minimal code changes to switch providers.

  • Set base_url to https://api.m4vip.cc/v1
  • Use standard tts-1 or tts-1-hd model identifiers
  • Maintain standard JSON request body structure

cURL Command Example

For quick validation, use a standard cURL request to generate speech. This method is useful for debugging or scripting simple audio generation tasks within your editorial workflow.

Replace YOUR_API_KEY with your active key from the dashboard.

  • POST to /v1/audio/speech
  • Include input, voice, and model in the JSON body
  • Specify response_format as needed

Python Library Usage

Use the official OpenAI Python library to integrate VoiceWire. Initialize the client with the custom base URL and authenticate using your API key.

This setup allows you to call audio.speech.create() with the same parameters used for other TTS services, ensuring consistent codebases across different audio providers.

  • Install openai library
  • Set base_url to https://api.m4vip.cc/v1
  • Use Authorization: Bearer YOUR_API_KEY

Error Handling and Status Codes

Sound wave illustration for: Error Handling and Status Codes

The API returns standard HTTP status codes to indicate request success or failure. A 200 OK status confirms that the audio file has been generated and is included in the response body. Any deviation from this indicates a specific issue that requires attention from the integration layer.

Common Error Messages

Errors are returned as JSON objects containing an error field with a type and message. For instance, an invalid API key triggers a 401 Unauthorized error. Failed requests are free: if synthesis fails, the charge is returned in full.

  • 400 Bad Request: Invalid JSON structure or missing required fields.
  • 401 Unauthorized: Missing or invalid Bearer token in the Authorization header.
  • 429 Too Many Requests: Exceeded the per-minute rate limit for your key.
  • 500 Internal Server Error: Temporary backend issue; no charge applied.

Rate Limit Exceeded Handling

When you exceed 60 requests per minute, the API returns a 429 status code. Your integration should implement exponential backoff to retry requests after a short delay. Note that new accounts start with a lower limit of 10 requests per minute until the first top-up is processed.

Request Validation Errors

The API validates input before processing. If the input text exceeds 4096 characters, or if voice or model values are incorrect, a 400 error is returned immediately. Ensure your client library handles these validation errors gracefully to avoid unnecessary processing delays in your news audio pipeline.

Error Handling and Status Codes

Rate Limits and Throttling

Sound wave illustration for: Rate Limits and Throttling

VoiceWire enforces a strict rate limit of 60 requests per minute per API key. This limit applies after the initial trial period and ensures stable throughput for high-volume news audio generation. Each request counts toward this quota, regardless of text length or voice model selected.

60 Requests per Minute Limit

After initial top-ups, your key allows up to 60 requests per minute. This limit is consistent across all models and voices, providing predictable scaling for automated content pipelines. Failed requests do not consume quota, ensuring efficient resource usage during error conditions.

Initial Low Limit Period

New keys start with a lower limit of 10 requests per minute until the first top-up is processed. This period allows system verification before scaling to the full 60 requests per minute. The limit increases automatically within minutes of a successful USDT transfer.

Queue Processing Behavior

Requests are processed sequentially, meaning under load a request may wait in a queue. Typical generation speed is roughly real-time, but short phrases may take a few seconds. Longer texts are split into parts and joined, potentially increasing total processing time. Monitor your queue depth to optimize delivery latency.

Audio Format Specifications

Sound wave illustration for: Audio Format Specifications

VoiceWire supports five response formats to accommodate different ingestion pipelines: mp3, wav, opus, flac, and pcm. The response_format parameter in the JSON body determines the output container and compression standard. Selecting the appropriate format ensures compatibility with your existing audio processing infrastructure and minimizes unnecessary bandwidth usage during high-volume news delivery.

MP3 Compression Settings

MP3 is the default and most widely supported format for web playback and general distribution. It provides a balance between file size and audio fidelity, making it suitable for standard news clips and broadcast segments delivered over HTTP.

WAV Uncompressed Quality

WAV delivers uncompressed audio. This format is ideal for archival storage, professional editing workflows, and systems that require lossless audio data without additional decoding overhead.

Opus and FLAC Options

Opus offers high compression efficiency. FLAC provides lossless compression.

Voice Selection Guide

Sound wave illustration for: Voice Selection Guide

Selecting the correct voice preset ensures your audio content aligns with the specific tone of your news broadcasts or reports. Our eight presets cover a spectrum from neutral reporting to energetic storytelling, allowing product teams to maintain consistent brand audio across high-volume publishing workflows.

Female Voice Presets

Aria provides a warm, clear narrator tone suitable for standard news delivery. Nova offers a bright, upbeat presence ideal for promotional segments. Luna delivers a soft, storytelling quality for feature pieces, while Sage ensures calm, instructional clarity for informational content.

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

Male Voice Presets

Felix brings an energetic, promo-ready voice for dynamic segments. Milo provides a friendly, conversational tone for interviews or casual updates. Atlas offers a neutral, news-standard delivery for factual reporting. Orion delivers a deep, documentary-style voice for serious or in-depth features.

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

Voice Characteristics Guide

All eight voices support all 23 available languages, allowing you to switch voices regardless of the target language without retraining. If the language is not explicitly set, the system guesses from the script, defaulting to English for Latin text. For non-English Latin-script content, always specify the language code to ensure accurate pronunciation.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. These features appeal to entertainment but may introduce inconsistency in news broadcasting.

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. TRON developer hub: TRC-20
  3. openai-node on GitHub
  4. openai-python on GitHub
  5. IETF RFC 7845: Ogg Opus
  6. MDN: Web Speech API
  7. LibriTTS-R corpus (OpenSLR 141)
  8. LibriVox public-domain audiobooks
  9. Node.js documentation
  10. FFmpeg documentation
  11. OpenAI API reference: create speech
  12. Creative Commons Attribution 4.0

More on this site