Podcast TTS API Documentation & Quickstart

By AudiaCast editorial team · Updated 2026-11-19

This documentation guides freelance podcast producers in integrating AudiaCast’s text-to-speech API into their audio workflows. You will find precise reference materials for authenticating requests, selecting voices, and handling audio formats. The guide covers the full request lifecycle, from sending plain text to receiving synthesized audio files compatible with standard editing pipelines.

Designed for developers using Python, JavaScript, or command-line tools, this page explains how to leverage the OpenAI-compatible SDKs for seamless integration. We detail rate limits, long-text splitting strategies, and error handling so you can reliably generate high-quality narration without unexpected interruptions or billing surprises.

Podcast TTS API Documentation & Quickstart

Frequently asked questions

How do I get my API key?

Visit the /get-api-key/ page on gggph.info to sign up using Google or an email and password. Once registered, your account page displays your active API key, current balance, and usage statistics. Each account holds one active key, which you can manage directly from this dashboard.

Can I use the OpenAI SDK with this API?

Yes. The API accepts the same request shape as the OpenAI speech endpoint. You can use the official OpenAI SDKs by changing the base_url to https://api.gggph.info/v1 and providing your site-specific key. This allows seamless integration into existing workflows without requiring a custom library.

What is the maximum input length per request?

The API accepts up to 4096 characters per request. If your script exceeds this limit, you must split the text into smaller parts. The API processes each segment individually, allowing you to handle long podcast episodes by breaking them down into manageable chunks for synthesis.

Do I need to install any specific libraries?

No specific library is required. You can use the official OpenAI SDK or plain HTTP requests to interact with the API. Since there is no official SDK of our own, you can integrate the service using standard tools like cURL or any language that supports JSON over HTTPS.

How does the API handle long podcast scripts?

You must split long texts into parts of up to 4096 characters. After receiving the audio files for each segment, you join them to create the final audio file. This manual splitting ensures accurate processing, as the API does not automatically handle multi-part synthesis in a single call.

What happens if the server is busy?

Requests are processed sequentially, so under load, a request may wait in a queue. Typical generation speed is roughly real time, but short phrases take a few seconds. If the server is busy, your request will simply wait its turn before being synthesized and returned.

Can I change my API key if it leaks?

Yes. You can issue a new API key at any time from your account dashboard. When you generate a new key, the old one stops working immediately. This ensures that if your key is compromised, you can secure your account without waiting for a manual review.

Is there a sandbox environment for testing?

There is no separate sandbox environment. You use the same production endpoint at https://api.gggph.info/v1. You can test with your free trial credit of $0.50 (if eligible) or by making small top-ups. All testing occurs in the live environment with real pricing.

First request

curl

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

To generate audio, you must include a valid API key in every request. Your unique key is issued when you create an account on the /get-api-key/ page. You can sign up using Google or an email password; Google sign-ups include a $0.50 trial credit, while email accounts start with zero balance.

Keep your key secure, as it acts as the sole credential for your account. You can view your current key, usage stats, and balance directly on the account dashboard.

Obtain your Bearer token

Obtain your Bearer token

Navigate to /get-api-key/ to generate your token. The system provides a single active key per account, displayed alongside your current balance and character limits.

Use this key immediately in your integration. If you lose access or suspect a breach, you can issue a new key at any time from the dashboard.

Authorization header format

Authorization header format

Include the key in the HTTP header using the standard Bearer scheme. This ensures the API identifies your account and applies your rate limits and billing.

Example: Authorization: Bearer tts-1234567890abcdef.

  • Header Name: Authorization
  • Format: Bearer <your_key>
  • Case-sensitive: Yes

Key rotation policy

You may rotate your key at any time from the /get-api-key/ page. Issuing a new key instantly invalidates the previous one.

This is useful if you suspect unauthorized use or want to reset access for a specific project. The old key stops working immediately, ensuring no lingering access.

Endpoints Overview

Sound wave illustration for: Endpoints Overview

The API exposes three core endpoints for generating and managing podcast audio. The primary speech endpoint handles synthesis, while the metadata endpoints provide details on available voices and models.

POST /v1/audio/speech

Sends text to generate an audio file. Accepts a JSON body with model, input text, voice selection, and format options. Returns binary audio data or error details.

  • Endpoint: POST https://api.gggph.info/v1/audio/speech
  • Body: JSON with model, input, voice, response_format, speed

GET /v1/voices

Lists all available voices, supporting languages, and supported audio formats. Useful for dynamically selecting the best voice for your podcast segment.

  • Endpoint: GET https://api.gggph.info/v1/voices

GET /v1/models

Returns available models, including tts-1 and tts-1-hd, along with their pricing and capabilities. Use this to verify engine options before synthesis.

  • Endpoint: GET https://api.gggph.info/v1/models

Request Parameters

Sound wave illustration for: Request Parameters

Configure the synthesis parameters to match your podcast production needs. The API accepts standard fields compatible with the OpenAI speech endpoint, allowing you to swap the base URL and use existing SDKs without rewriting your integration logic.

Precision in parameter selection ensures the generated audio aligns with your editorial style, from narration to promotional segments, without requiring additional post-processing for basic voice characteristics.

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

Choose between tts-1 and tts-1-hd. Both models use the same underlying engine and pricing structure, so the decision relies on your quality preference rather than cost differences.

Select tts-1-hd for higher fidelity in complex podcast scripts where vocal nuance matters. Use tts-1 for standard narration or background voiceovers where file size efficiency is prioritized.

  • tts-1: Standard quality, efficient processing.
  • tts-1-hd: High-definition audio for detailed narration.

Input text length limit

Each request accepts a maximum of 4096 characters for the input field. This limit applies to the raw text string, including spaces and punctuation.

For scripts exceeding this length, split the text into chunks of 4096 characters or fewer. Generate each chunk separately and join the resulting audio files to maintain continuous playback.

  • Maximum 4096 characters per request.
  • Spaces and punctuation count toward the limit.

Voice and speed settings

Select one of eight preset voices, such as aria for clear narration or atlas for neutral news delivery. You can also adjust the speed parameter between 0.25 and 4.0 to match the pacing of your podcast.

If the default language detection is inaccurate, explicitly set the language parameter using an ISO code to ensure correct pronunciation for non-English scripts.

Note that voices are based on licensed recordings and carry an inaudible synthetic watermark; they do not support custom emotion tags or SSML formatting.

  • 8 voice presets available.
  • Speed range: 0.25–4.0.
  • Optional language parameter for accurate pronunciation.

Response Formats

Sound wave illustration for: Response Formats

The API returns synthesized audio as binary data in the format specified by the response_format parameter. You can choose between MP3, WAV, Opus, FLAC, or PCM. This flexibility allows you to balance file size and quality for your podcast workflow.

MP3, WAV, Opus, FLAC, PCM

Select the format that best suits your editing pipeline. MP3 offers efficient compression, while WAV and FLAC provide lossless quality. Opus is an efficient compressed format., and PCM gives raw uncompressed data. All formats support the full range of voices and speeds.

  • MP3: Standard compressed audio.
  • WAV: Lossless audio format.
  • Opus: Efficient low-latency codec.
  • FLAC: Lossless compression.
  • PCM: Raw uncompressed audio.

Binary audio data return

The response body contains the raw audio bytes directly. There is no JSON wrapper around the audio data itself. You must handle the binary stream appropriately in your code to save the file or play it in your podcast software.

Error response structures

If synthesis fails, the API returns a standard JSON error object with a status code and message. Failed requests are free, so your balance is not charged. Check the error message for details on invalid parameters or rate limits.

Rate Limits

Sound wave illustration for: Rate Limits

AudiaCast enforces a limit of 60 requests per minute per key. This limit ensures consistent audio generation quality for your podcast workflows without overwhelming the backend infrastructure.

60 requests per minute

Once your account is active, you can process up to 60 synthesis requests each minute.

10 requests before first top-up

New accounts or those without a USDT top-up are limited to 10 requests per minute. This lower cap applies to accounts before the first top-up.

Queuing under load

Requests are processed sequentially. If you exceed the limit or if many users are active, your request may wait in a queue. Typical generation speed is roughly one second of audio per 25 characters of text, so longer texts naturally take more time.

Rate Limits

Code Examples

Sound wave illustration for: Code Examples

Integrate AudiaCast into your podcast production pipeline using standard HTTP clients. The API mirrors the OpenAI speech endpoint structure, allowing you to leverage familiar SDKs or simple fetch requests without learning a proprietary protocol.

These examples demonstrate sending text to generate audio files. You can switch between models and voices to match your podcast’s tone, ensuring consistent output for episodic content or solo narration workflows.

Python with OpenAI SDK

Use the official OpenAI Python library by pointing it to our base URL. Pass your API key in the Authorization header and send the text payload to receive a binary audio response.

```python import openai client = openai.OpenAI(base_url="https://api.gggph.info/v1", api_key="tts-...") response = client.audio.speech.create( model="tts-1", voice="nova", input="Welcome to this week's episode.", response_format="mp3" ) with open('output.mp3', 'wb') as f: f.write(response.content) ```

  • Supports both tts-1 and tts-1-hd models.
  • Set speed between 0.25 and 4.0 for pacing adjustments.
  • Handles binary audio directly in memory.

cURL command line example

Generate audio files directly from your terminal or build scripts. This method is ideal for quick tests or automated batch processing of show notes.

```bash curl -X POST "https://api.gggph.info/v1/audio/speech" \ -H "Authorization: Bearer tts-..." \ -H "Content-Type: application/json" \ -d '{"model": "tts-1", "input": "Hello, listeners.", "voice": "felix", "response_format": "wav"}' \ -o audio.wav ```

  • Simple text-to-audio conversion.
  • No external libraries required.
  • Supports all output formats.

JavaScript fetch example

Integrate TTS into web-based podcast tools or content management systems. Use the native fetch API to send JSON payloads and handle the binary response.

```javascript const response = await fetch("https://api.gggph.info/v1/audio/speech", { method: "POST", headers: { "Authorization": "Bearer tts-...", "Content-Type": "application/json" }, body: JSON.stringify({ model: "tts-1", voice: "aria", input: "Episode starting now." }) }); const audioBuffer = await response.arrayBuffer(); ```

  • Native browser and Node.js support.
  • Easy integration with modern frameworks.
  • Handles JSON and binary data seamlessly.

Handling Long Texts

Sound wave illustration for: Handling Long Texts

To produce longer podcast segments, you must split input text into chunks of 4,096 characters or fewer. Each chunk generates a separate audio file via the API.

Splitting text into 4096 chars

Divide your script at natural sentence breaks before hitting the character limit. Spaces and punctuation count toward the 4,096-character maximum. This ensures each API call stays within bounds.

Joining audio files

After receiving each audio file, concatenate them in your preferred editor or script. The API returns binary data for each request, which you merge to create the final continuous track.

Managing chunk boundaries

Align your split points with sentence ends to avoid abrupt audio cuts. Since requests process sequentially, longer texts may queue, so plan your generation timeline accordingly.

Troubleshooting

Sound wave illustration for: Troubleshooting

Even with a working API, integration hiccups happen. Understanding standard error responses and managing request timing ensures your podcast production workflow remains stable without unexpected downtime or billing surprises.

Common error codes

Use HTTP status codes to diagnose issues. A 400 error indicates invalid JSON or missing fields like input or voice. A 401 error means your Bearer token is missing or invalid. Check your key rotation policy if you recently issued a new key, as the old one stops immediately.

  • 400: Invalid request structure or missing parameters
  • 401: Unauthorized; check Authorization header
  • 429: Rate limit exceeded; wait and retry
  • 500: Internal server error; retry after a few seconds

Handling timeouts

Requests are processed sequentially, so under load, your request may wait in a queue. Short phrases take a few seconds, while longer texts take longer. If a request fails, the charge is returned in full. Implement exponential backoff in your client code to handle transient delays gracefully.

  • Short texts: few seconds latency
  • Long texts: near real-time generation
  • Queue wait times vary under load

Checking voice availability

Before generating audio, verify available voices via the GET /v1/voices endpoint. This returns the 8 presets (e.g., aria, nova, felix) and supported languages. If a voice is unavailable or the language is unsupported, the API returns an error. Always cache this list locally to reduce API calls.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Selecting the right voice preset is critical for matching the auditory tone of your podcast genre.

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. Node.js documentation
  3. ISO 639 language codes
  4. TRON developer hub: TRC-20
  5. Tether (USDT)
  6. Creative Commons Attribution 4.0
  7. Python documentation
  8. openai-node on GitHub
  9. OpenAI API reference: create speech
  10. LibriVox public-domain audiobooks
  11. FFmpeg documentation
  12. W3C WAI: making audio and video accessible

More on this site