Quickstart Guide to Our Podcast Text-to-Speech API

By NarrateFlow editorial team · Updated 2026-11-18

This guide explains how to integrate the NarrateFlow TTS API into your podcast agency’s voiceover pipeline. You will learn to generate audio files from text using a stable REST endpoint compatible with standard OpenAI SDKs. The documentation covers authentication, parameter configuration, and response handling for high-volume episodic content.

Developers managing production workflows can use these examples to automate voice generation. We detail rate limits, error handling, and supported formats like MP3 and WAV. The guide assumes basic familiarity with HTTP requests and provides concrete code snippets for Python and Node.js environments.

Quickstart Guide to Our Podcast Text-to-Speech API

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.play666apk.com/v1. You can use this endpoint for all requests, including speech synthesis and voice listing. Ensure your Authorization header uses the Bearer token format with your unique API key for authentication.

Can I use the OpenAI SDK?

Yes, the official OpenAI SDKs work by changing the base_url to https://api.play666apk.com/v1. Use your site-specific key and the same request shape as the OpenAI speech endpoint. This allows seamless integration without needing a custom client library.

What models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and pricing structure. You can choose between them based on your quality preference, but the cost remains identical at $10 per 1 million characters for either option.

How do I set the language?

Pass the optional language parameter as an ISO code. If omitted, the system guesses from the script, defaulting Latin text to English. For non-English Latin text, explicitly set the language to ensure accurate pronunciation and avoid incorrect language detection.

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 scripts, split the text into chunks of this size and join the resulting audio files to create the final output.

Do you support streaming audio?

No, streaming audio is not supported. The API returns the complete audio file in the response after synthesis finishes. Requests are processed sequentially, so under load, you may experience queue delays before the full file is generated and returned. Requests are processed sequentially, so under load, you may experience queue delays before the full file is generated and returned.

Is there an SSML option?

No, SSML support is not available. The API accepts plain text input only. There are no emotion tags, phoneme dictionaries, or custom pronunciation lexicons. You must rely on the natural prosody of the eight preset voices for delivery.

How do I handle long texts?

Split your text into parts of up to 4096 characters. Send each part as a separate request and join the resulting audio files. This ensures compliance with the character limit while allowing you to generate full-length episodes or audiobooks.

What happens if the request fails?

Failed requests are free. If synthesis fails, the charge is returned in full to your account balance. You can retry the request or adjust parameters without incurring additional costs for the failed attempt, ensuring accurate budgeting for your pipeline.

Can I change my API key?

Yes, you can issue a new key at any time from your account dashboard. When a new key is issued, the old one stops working immediately. This allows you to rotate keys for security without interrupting your active services.

Do you have a mobile SDK?

No, there is no official mobile SDK. You can use the OpenAI SDK or plain HTTP requests from any platform. The API is designed to be lightweight and accessible via standard REST protocols compatible with iOS, Android, and web apps.

Is there a webhook for completion?

No, webhooks for completion are not provided. The API returns the audio file directly in the response upon successful synthesis. You must handle polling or synchronous waits if you need to process the output immediately after the request.

Can I mix voices in one request?

No, each request accepts only one voice preset. To mix voices, you must generate separate audio files for each voice and join them programmatically. This allows flexible episode structures but requires client-side assembly for multi-voice podcast segments.

What is the speed range?

The speed range is 0.25 to 4.0. You can adjust the playback speed within this range to fit your podcast pacing. Lower values slow down the narration, while higher values increase it, allowing precise control over the final audio duration.

First request

curl

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

Sound wave illustration for: Authentication

The API authenticates every request using a Bearer token passed in the Authorization header. You must include your unique key with each call to https://api.play666apk.com/v1/audio/speech to generate audio files.

Bearer Token Usage

Bearer Token Usage

Send your key as Authorization: Bearer tts-... in every HTTP request. The token validates your account and tracks usage against your rate limits and billing balance.

Single Key Limit

Single Key Limit

Each account maintains one active API key at a time. If you generate a new key, the previous one becomes invalid immediately, ensuring clear audit trails for podcast production teams.

Key Rotation Process

Issue a new key via the dashboard whenever needed. The old key stops working instantly upon creation, so update your integration scripts promptly to avoid synthesis failures.

Endpoint Overview

Sound wave illustration for: Endpoint Overview

The API provides three primary endpoints for podcast production workflows. The main synthesis endpoint accepts text and returns audio files, while the metadata endpoints allow you to discover available voices and model configurations without consuming credits.

POST /v1/audio/speech

This is the core endpoint for generating speech. Send a JSON payload with your text, selected voice, and format preferences to receive an audio file. It supports up to 4096 characters per request, requiring text splitting for longer scripts.

  • Endpoint: POST https://api.play666apk.com/v1/audio/speech
  • Returns: Audio file in specified format (mp3, wav, opus, flac, pcm)
  • Input: JSON body with model, input, voice, and optional parameters

GET /v1/voices

Retrieve the full list of eight preset voices (e.g., aria, nova, felix, atlas) along with their supported languages and pricing tiers. This endpoint helps you programmatically select the right voice for your podcast episodes without hardcoding IDs.

  • Endpoint: GET https://api.play666apk.com/v1/voices
  • Returns: List of voice IDs, names, and supported languages
  • Use case: Dynamic voice selection in your application

GET /v1/models

Fetch available model versions, currently including tts-1 and tts-1-hd. Both models use the same engine and pricing, allowing you to standardize your API calls or upgrade quality for specific segments without changing your codebase.

  • Endpoint: GET https://api.play666apk.com/v1/models
  • Returns: Model IDs and metadata
  • Supports: tts-1 and tts-1-hd

Request Parameters

Sound wave illustration for: Request Parameters

Configure your synthesis requests using the model, input, voice, response_format, speed, and optional language fields. The API accepts standard JSON bodies compatible with the OpenAI speech endpoint, allowing teams to integrate quickly using existing SDKs or simple HTTP clients.

Model Selection

Select between "tts-1" or "tts-1-hd" using the model field. Both models utilize the same underlying engine and pricing structure, so choose based on your specific quality requirements without affecting cost calculations.

Input Text Limits

The input field accepts up to 4096 characters per request. Characters include spaces and punctuation. For longer scripts, split the text into chunks and join the resulting audio files to ensure reliable generation.

  • Maximum 4096 characters per request
  • Spaces and punctuation count toward the limit
  • Split longer texts manually before sending

Voice and Language Settings

Choose from eight preset voices such as aria, nova, or atlas. While the API guesses the language from the script (defaulting to English for Latin text), explicitly setting the language parameter ensures accuracy for non-English content. All voices support any of the 23 supported languages.

  • 8 preset voices available
  • All voices support all 23 languages
  • Set language to avoid guess errors
  • Optional speed range: 0.25–4.0

Response Formats

Sound wave illustration for: Response Formats

Selecting the correct audio format balances file size, quality, and compatibility for your podcast pipeline. Our API supports five distinct formats via the response_format parameter, allowing you to optimize storage and playback performance based on your distribution needs.

MP3 Compression

MP3 is the standard choice for web delivery and most podcast platforms. It offers efficient compression while maintaining acceptable audio quality, making it ideal for archiving large volumes of episodic content.

WAV Lossless

WAV provides uncompressed, lossless audio. Use this format when you need pristine quality for post-production editing or master files, ensuring no data is lost during generation.

OPUS and FLAC Options

OPUS offers efficient compression for modern web applications, while FLAC provides lossless compression for smaller file sizes without quality reduction. Both formats cater to specific technical requirements beyond standard MP3 and WAV.

Rate Limits

Sound wave illustration for: Rate Limits

Podcast agencies generating episodic content must manage API quotas carefully to avoid interruptions in their voiceover pipelines. The standard rate limit is 60 requests per minute per API key, which supports steady production workflows but requires monitoring during bulk generation tasks. Requests are processed sequentially, so under load a request may wait in a queue.

60 Requests Per Minute

Each account key allows 60 requests per minute once the first top-up is processed. This limit applies to the total number of synthesis jobs, so splitting large scripts into multiple requests counts toward this quota.

  • Standard limit: 60 requests/minute
  • Applies per API key
  • Counts all synthesis jobs

Initial 10 RPM Limit

New accounts start with a reduced limit of 10 requests per minute. This lower threshold applies until the first top-up is processed, helping to prevent resource abuse before billing is confirmed.

  • Initial limit: 10 requests/minute
  • Applies to new accounts
  • Resolves after first top-up

Queue Behavior

Requests are processed sequentially under load. If you exceed the rate limit, subsequent requests may wait in a queue rather than failing immediately. This ensures that all submitted text is eventually synthesized, though latency increases during peak usage.

  • Sequential processing under load
  • Queues instead of immediate failure
  • Increased latency during peaks
Rate Limits

Error Handling

Sound wave illustration for: Error Handling

When your pipeline encounters issues, the API returns standard HTTP status codes to help you diagnose failures quickly. Understanding these responses ensures your podcast production workflow remains stable without manual intervention.

The system distinguishes between client-side mistakes and server-side limitations, allowing you to adjust your request logic or retry strategies accordingly with precise error details.

Common HTTP Errors

Use 401 for authentication failures, indicating an invalid or expired API key. Use 429 when you exceed the 60 requests per minute limit, signaling that you need to back off. Use 500 for unexpected server issues during synthesis.

  • 401 Unauthorized: Check your Bearer token.
  • 429 Too Many Requests: Implement exponential backoff.
  • 500 Internal Server Error: Retry after a brief pause.

Character Limit Exceeded

Each request supports a maximum of 4096 characters in the input field. Spaces and punctuation count toward this limit. Exceeding this threshold returns an error, requiring you to split your text into smaller chunks before sending.

  • Limit: 4096 characters per request.
  • Includes spaces and punctuation.
  • Split long scripts into parts.

Invalid Voice ID

Ensure the voice parameter matches one of the eight available presets. Using an unknown ID returns an error. Verify your list using the GET /v1/voices endpoint to stay synchronized with available options.

  • Check voice IDs via GET /v1/voices.
  • Available: aria, nova, luna, sage, felix, milo, atlas, orion.
  • Mismatched IDs return 400 Bad Request.

SDK Integration

Sound wave illustration for: SDK Integration

Leverage the official OpenAI SDKs with zero additional dependencies, by changing the base_url. By adjusting the base URL, you utilize familiar methods to integrate podcast voiceovers directly into your agency’s production pipeline.

This approach ensures consistent code structure while supporting our specific endpoint shape for audio generation.

OpenAI SDK Compatibility

Our API mirrors the request shape of the OpenAI speech endpoint. This allows teams to reuse existing SDK configurations without rewriting core logic, reducing integration time for high-volume episodic content.

  • Compatible with official OpenAI Python and Node.js libraries
  • Identical JSON body structure for speech generation
  • No custom client library required for basic usage

Base URL Configuration

Point your SDK client to https://api.play666apk.com/v1. This single configuration change directs all requests to our infrastructure while maintaining standard authentication headers.

Python and Node Examples

Use the standard OpenAI client initialization with the custom base URL. Pass your Bearer token and request parameters like voice and model to receive audio files directly in your script.

Curl Example

Sound wave illustration for: Curl Example

The cURL command provides a direct way to test the TTS endpoint without relying on external SDKs. This method is ideal for verifying authentication and payload structure before integrating into your podcast production pipeline.

You can use this snippet to generate audio files for episodic content, ensuring the request format matches the expected JSON schema for seamless pipeline automation.

Basic Request Structure

Send a POST request to the speech endpoint. Replace YOUR_API_KEY with your bearer token and input with your script text.

The request body must include the model type (tts-1 or tts-1-hd) and the desired voice preset.

  • curl -X POST https://api.play666apk.com/v1/audio/speech
  • -H 'Authorization: Bearer YOUR_API_KEY'
  • -H 'Content-Type: application/json'

Headers and Body

Include the standard JSON headers to ensure proper parsing. The input field supports up to 4096 characters, which is sufficient for short monologues or ad reads.

Specify the voice, such as aria for narration, and select a format like mp3 for compatibility with most podcast hosting platforms.

Audio File Output

The API returns the audio file directly in the response body. You can redirect this output to a local file using the -o flag.

This approach allows you to integrate the generated audio directly into your editing software or upload it to your CMS without intermediate storage steps.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Under load, requests may queue, so buffer your generation time accordingly.

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. LibriTTS-R paper (arXiv 2305.18802)
  3. IETF RFC 7845: Ogg Opus
  4. OpenAI API reference: create speech
  5. MDN: Web Speech API
  6. Tether (USDT)
  7. Node.js documentation
  8. FFmpeg documentation
  9. Python documentation
  10. openai-python on GitHub
  11. curl documentation
  12. ISO 639 language codes

More on this site