API Documentation for News Audio Generation

By NewsVoice API editorial team · Updated 2026-11-18

This documentation provides a complete reference for integrating NewsVoice API into your editorial workflow. It covers authentication, request structures, and integration patterns for generating synthetic speech from news scripts. The guide is designed for engineering teams managing high-volume audio distribution across broadcast and digital platforms.

You will find concrete cURL examples, SDK configuration steps, and details on voice presets and response formats. The documentation also explains rate limits, long-text handling, and error codes specific to newsroom use cases. All endpoints and parameters are listed to help you build reliable, scalable audio generation pipelines.

Frequently asked questions

What is the API endpoint?

The endpoint is POST https://api.playwin333.com/v1/audio/speech. It accepts a JSON body with fields like model, input, voice, response_format, and speed. This structure matches the OpenAI speech endpoint, allowing you to send text and receive an audio file directly via standard HTTP requests.

How do I authenticate requests?

Include your API key in the Authorization header as a Bearer token: Authorization: Bearer tts-... You obtain this key by signing up on the /get-api-key/ page. Each account has one active key, which you can revoke and replace at any time via the dashboard.

Which SDKs are supported?

The API uses the same request shape as the OpenAI speech endpoint. Therefore, the official OpenAI SDKs work by changing the base_url to https://api.playwin333.com/v1. You can also use plain HTTP libraries like curl or Python requests without needing any proprietary wrappers or custom code.

What models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and price. You select the model in your request body. The choice does not affect the cost, which is $0.01 per 1,000 characters, nor does it affect audio quality as both use the same engine.

How do I handle long news scripts?

Split your text into parts of up to 4096 characters per request. Generate audio for each part individually, then join the resulting audio files. This ensures you stay within the character limit while maintaining high-quality synthesis for longer news scripts or detailed updates.

What are the rate limits?

You are limited to 60 requests per minute per key. Before your first top-up, the limit is 10 requests per minute. If you exceed this, requests may be queued or rejected. Monitor your usage via the dashboard to ensure consistent delivery for your editorial workflows.

How do I get my API key?

Sign up on the /get-api-key/ page using Google or email plus password. Once registered, your dashboard displays your API key, balance, and usage statistics. The key starts with tts- and is used for authenticating all your API requests to the NewsVoice service.

Can I change my API key?

Yes, you can issue a new key at any time from your dashboard. When you generate a new key, the old one stops working immediately. This allows you to rotate keys for security without downtime, ensuring your news production pipeline remains secure and accessible.

What audio formats are supported?

You can choose from mp3, wav, opus, flac, and pcm formats. Specify the desired format using the response_format field in your request. These options allow you to balance file size and quality according to your specific broadcast or digital distribution requirements.

Do I need to install extra libraries?

No extra libraries are required if you use standard HTTP requests. If you prefer the OpenAI SDK, you can use it by adjusting the base_url. No proprietary SDK or specific framework is needed, making integration straightforward for existing newsroom tech stacks and automation scripts.

Is there a WebSocket stream?

No, there is no WebSocket streaming or real-time partial audio. The API returns the complete audio file upon request completion. This synchronous model is suitable for batch processing news scripts where immediate, frame-by-frame delivery is not required for your editorial workflow.

Do you provide an official SDK?

We do not provide an official SDK. Instead, we support the official OpenAI SDKs by matching their request shape. You can also use any standard HTTP client. This approach gives you flexibility and avoids vendor lock-in while leveraging well-documented, widely used tools.

How do I handle errors?

Failed requests are free, and charges are returned in full if synthesis fails. Monitor your response status codes and handle errors in your code accordingly. Request metadata (time, characters, status) is kept for billing.

What is the character limit per request?

The input text is limited to 4096 characters per request. If your news script exceeds this, you must split it into multiple parts. Each part generates a separate audio file, which you then combine. This ensures consistent performance and stays within the system's processing limits.

First request

curl

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

Sound wave illustration for: Authentication and Keys

Access to the NewsVoice API requires a valid API key, which serves as the primary credential for all requests. You can generate a key by signing up via the /get-api-key/ page using either Google or an email address. This key authenticates your account and tracks your usage against your balance.

Generate key via /get-api-key/ page

Generate key via /get-api-key/ page

Navigate to the /get-api-key/ page to create your account. You can sign up using Google for immediate access or use an email and password. Once registered, the page displays your active API key, current balance, and usage statistics.

  • Support for Google Sign-In for quick setup
  • Email and password registration option available
  • Immediate access to key and balance dashboard

Use Bearer token in Authorization header

Use Bearer token in Authorization header

Include your API key in the Authorization header of every request using the Bearer scheme. The format is Authorization: Bearer tts-.... This header is required for all endpoints, including speech synthesis and voice listing.

  • Header format: Authorization: Bearer tts-...
  • Required for all API requests
  • Keep your key secure and do not expose it in public repositories

One active key per account

One active key per account

Each account maintains a single active API key at any time. If you issue a new key, the previous one becomes invalid immediately. This ensures that only one active credential is used for billing and rate limiting per account.

  • Single active key per account
  • New key issuance invalidates the old one instantly
  • Simplifies billing and access control

First Request with cURL

Sound wave illustration for: First Request with cURL

Generate synthetic news audio by sending a POST request to the /v1/audio/speech endpoint. This direct HTTP call allows editorial systems to programmatically convert text scripts into broadcast-ready audio files without manual intervention.

POST request to /v1/audio/speech endpoint

POST request to /v1/audio/speech endpoint

Direct your API calls to https://api.playwin333.com/v1/audio/speech. This endpoint accepts standard JSON payloads and returns audio data, integrating seamlessly with existing newsroom automation pipelines.

JSON body with model, input, and voice

Construct your request body with the model (e.g., tts-1), the input text (up to 4096 characters), and the voice preset (e.g., atlas). Ensure your authorization header includes the Bearer token obtained from the dashboard.

  • Use tts-1 or tts-1-hd for the engine.

Receive audio file in response

The API returns the generated audio file directly in the response body. You can save this output to your local drive or push it directly to your digital distribution platform for immediate broadcast.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

Leverage existing infrastructure by redirecting the OpenAI SDK’s base URL to our API domain. This allows editorial teams to use the same client libraries they already know, minimizing integration effort for news script generation pipelines.

Change base_url to api domain

Configure the SDK’s base URL to https://api.playwin333.com/v1. This simple change routes all requests to our infrastructure while maintaining compatibility with the official client libraries.

Use official OpenAI SDKs directly

Use the standard OpenAI SDK for your preferred language. Pass your NewsVoice API key via the Authorization: Bearer header. The SDK handles serialization and retries automatically.

Same request shape as Speech endpoint

The JSON body structure mirrors the OpenAI Speech endpoint. Send model, input, voice, and response_format. The engine processes these fields identically, requiring no custom parsing logic.

Available Models and Voices

Sound wave illustration for: Available Models and Voices

The NewsVoice API offers two model variants, tts-1 and tts-1-hd, which utilize the same underlying synthesis engine. Both models support the full range of 8 voice presets and accept identical parameters, ensuring consistent output quality across different pricing tiers.

tts-1 and tts-1-hd models

Both tts-1 and tts-1-hd models handle the same input constraints, including the 4096-character limit per request. They process text sequentially, meaning under load, requests may queue. The choice between models does not affect voice selection or language support.

8 voice presets including Atlas and Orion

Select from eight distinct voice presets tailored for editorial content. Options include atlas for neutral, news-style delivery and orion for deep, documentary tones. Other presets like aria, nova, luna, sage, felix, and milo provide varied tones for different broadcast needs.

  • atlas: Neutral, news delivery
  • orion: Deep, documentary tone
  • aria: Warm, clear narrator
  • nova: Bright, upbeat
  • luna: Soft, storytelling
  • sage: Calm, instructional
  • felix: Energetic, promo
  • milo: Friendly, conversational

Same engine and price for both models

There is no price difference between tts-1 and tts-1-hd. Both incur the same rate of $10 per 1 million characters. This uniform pricing simplifies budgeting for large editorial teams generating high volumes of audio content.

Response Formats

Sound wave illustration for: Response Formats

The NewsVoice API supports MP3, WAV, OPUS, FLAC, and PCM formats, allowing editorial teams to select the optimal container for their specific broadcast workflow. Each format balances compression efficiency with fidelity, ensuring that synthetic voiceovers meet the technical standards required for both digital distribution and traditional radio transmission.

Support for MP3, WAV, OPUS, FLAC, PCM

WAV and FLAC provide lossless quality suitable for archiving and master recordings, while MP3 and OPUS offer efficient compression for web distribution. PCM is available for raw audio processing pipelines. All formats are delivered directly in the API response, eliminating the need for post-processing conversion steps.

Choose format based on broadcast needs

Select WAV or FLAC for high-fidelity news segments where audio integrity is critical. Use MP3 or OPUS for large-scale digital distribution to minimize bandwidth usage. The choice depends on your storage constraints and the playback environment, with no quality difference in the underlying synthesis engine.

Audio returned directly in response

Generated audio is returned immediately in the response body, allowing your systems to ingest the file without waiting for storage uploads. This direct delivery ensures that your editorial workflows remain streamlined, reducing latency between text input and audio availability for publication.

Rate Limits and Throttling

Sound wave illustration for: Rate Limits and Throttling

The API enforces a hard limit of 60 requests per minute for authenticated accounts. This cap applies per API key, ensuring stable throughput for editorial workflows. When generating audio for news scripts, monitor your request rate to avoid temporary suspension of synthesis tasks.

60 requests per minute per key

Each active API key is allowed a maximum of 60 requests per minute. This limit ensures consistent performance for high-volume news generation. Exceeding this rate results in standard HTTP 429 errors until the window resets.

10 requests per minute before first top-up

New accounts without a top-up start with a reduced limit of 10 requests per minute. This throttle applies during the free trial period or before the first USDT transfer. Upgrade to the standard 60 req/min limit after topping up.

Requests processed sequentially

Requests are processed one after another, meaning under load a request may wait in a queue. This sequential processing affects latency, especially for longer texts. Plan your generation pipeline to account for potential queuing delays during peak usage.

Handling Long Texts

Sound wave illustration for: Handling Long Texts

Each API request accepts a maximum of 4096 characters, including spaces and punctuation. For news scripts exceeding this limit, the input must be manually split into separate chunks before submission to ensure valid synthesis.

Split text into 4096 character chunks

Divide your news script into segments, ensuring no single chunk exceeds 4096 characters. This limit applies to the raw text input; spaces and punctuation are counted toward the total. Accurate splitting preserves semantic coherence, which is critical for broadcast readability.

Generate audio for each part

Submit each chunk individually via a separate POST request to the /v1/audio/speech endpoint. Each request is processed sequentially, so under load, later chunks may experience slight delays. The API returns a distinct audio file for every valid chunk.

  • Use the same voice and model parameters across all chunks to maintain audio consistency.

Join audio files for final output

Once all chunks are synthesized, concatenate the resulting audio files in the original order. This creates a single, continuous broadcast-ready file. Ensure your playback system handles the format seamlessly, whether you selected MP3, WAV, OPUS, FLAC, or PCM.

Error Handling and Status Codes

Sound wave illustration for: Error Handling and Status Codes

Failed synthesis requests incur no charge, ensuring that temporary network hiccups or engine timeouts do not impact your editorial budget. The system retains request metadata—including timestamp, character count, and status—for billing verification, allowing you to audit usage without storing the generated audio files.

Failed requests are free of charge

Each failed request is automatically refunded in full. This policy protects high-volume news workflows where transient errors are common during peak broadcasting hours. You only pay for successfully delivered audio files.

Check response status for errors

The API returns standard HTTP status codes to indicate success or failure. Review the response body for specific error details, such as invalid voice IDs or character limit exceedances. Use the retained request metadata to cross-reference failures with your billing records.

  • 400: Invalid parameter (e.g., unknown voice)
  • 429: Rate limit exceeded (60 req/min)
  • 503: Service temporarily unavailable

Retry logic for temporary failures

For 5xx errors or timeouts, implement exponential backoff in your integration. Since requests are processed sequentially, brief delays often resolve congestion issues. Avoid immediate retries to prevent exacerbating queue wait times, which can delay breaking news audio delivery.

  • Wait 1-2 seconds before first retry
  • Double wait time for subsequent attempts
  • Stop after 3-4 failed attempts

Listen to the 8 voices

Each sample below was generated by this API from the same sentence.

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

More on this site