API Documentation for Text-to-Speech Integration

By VoicePulse editorial team · Updated 2026-11-19

This guide helps podcast publishers integrate VoicePulse’s text-to-speech API into their production workflows. You will find precise reference details for converting scripts into natural-sounding audio files, including authentication, endpoint structures, and parameter configurations. The documentation is designed for developers who need reliable, scalable audio generation without complex infrastructure.

We cover the essential technical steps to start generating voiceovers, from setting up your API key to handling responses via cURL or the official OpenAI SDK. You will also learn about rate limits, error handling, and voice selection to ensure your podcast audio meets quality standards while staying within fair pricing limits.

API Documentation for Text-to-Speech Integration

Frequently asked questions

How do I get an API key?

Sign up on the /get-api-key/ page using Google or email. Accounts are per site. The dashboard displays your active key, balance, and usage. You can issue a new key at any time, which immediately invalidates the old one. A free trial of $0.50 is available for Google sign-ins.

What is the base URL for the API?

The API base URL is https://api.999f.info/v1. You send POST requests to https://api.999f.info/v1/audio/speech for synthesis. Other endpoints like /v1/voices are also available at this base. Use this URL to configure your HTTP client or SDK for all API interactions.

Can I use the OpenAI SDK?

Yes, the official OpenAI SDKs work by changing the base_url to https://api.999f.info/v1. The request shape matches the OpenAI speech endpoint. You simply provide your VoicePulse API key for authentication. This allows you to use familiar code structures for generating audio files from your scripts.

How many characters can I send?

Each request accepts up to 4096 characters in the input field. For longer texts, split them into parts of this size and join the resulting audio files. Spaces and punctuation count toward this limit. This ensures consistent processing and allows you to manage large podcast scripts effectively.

What voices are available?

There are eight presets: Aria, Nova, Luna, and Sage (female); Felix, Milo, Atlas, and Orion (male). Each has a distinct tone, from warm narration to deep documentary. Any voice can speak any of the 23 supported languages. You can select the voice that best fits your podcast style via the voice parameter.

How do I set the language?

Pass an optional ISO language code in the request. If omitted, the system guesses the language, defaulting to English for Latin script. For non-English Latin text, explicitly set the language to ensure accuracy. Supported languages include English, Spanish, German, French, Japanese, and others listed in the documentation.

What formats are supported?

You can choose from mp3, wav, opus, flac, and pcm via the response_format field. MP3 is efficient for web playback, while WAV and FLAC offer lossless quality. PCM provides raw audio data. Select the format that best suits your podcast production workflow and delivery requirements.

What is the rate limit?

The limit is 60 requests per minute per key. New accounts start with 10 requests per minute until the first top-up. Requests are processed sequentially, so high load may cause queuing. Monitor your usage in the dashboard to ensure smooth generation for your podcast episodes without interruption.

How do I handle errors?

Failed requests are free, with the charge returned in full. Check the response status for error details. Ensure your input text is within the 4096 character limit and your API key is valid. The dashboard shows usage and balance, helping you diagnose issues quickly and retry as needed.

Is streaming supported?

No, streaming is not supported. The API returns the complete audio file in the response. You cannot receive partial audio chunks in real-time. This design ensures reliable delivery of finished audio segments.

Is SSML supported?

No, SSML is not supported. The API accepts plain text input. There are no phoneme dictionaries or custom pronunciation lexicons available. You control pacing and tone by selecting different voices and adjusting the speed parameter between 0.25 and 4.0. Keep your script simple for best results.

Can I clone my own voice?

No, custom voice cloning is not offered. You cannot upload your own voice or design a new one. The eight presets are based on licensed recordings: LibriTTS-R (CC BY 4.0), from LibriVox public-domain audiobook readings. Each generated file includes an inaudible watermark marking it as synthetic speech, ensuring clear identification of the source.

Is there 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 for server-side integration. Podcast publishers typically generate audio files via their backend systems and then distribute them through standard podcast hosting channels.

How do I rotate my key?

Issue a new key from your dashboard at any time. The new key becomes active immediately, and the old one stops working at once. This allows you to secure your account or distribute keys for different projects without downtime. You can have one active key per account.

First request

curl

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

Access the API key management page to retrieve your unique identifier. You can sign up using Google or an email and password combination. The dashboard displays your current key, account balance, and usage statistics.

Get your API key

Get your API key

Navigate to the /get-api-key/ section of the site. Your key begins with 'tts-'. It is displayed alongside your balance and character count.

Bearer token format

Bearer token format

Include the key in the request header as a Bearer token. The format is 'Authorization: Bearer tts-your-key-here'. Ensure no extra spaces are included.

Key rotation

Issue a new key from the dashboard at any time. The previous key stops working immediately upon generation of the new one. This ensures secure access without service interruption.

Endpoint Overview

Sound wave illustration for: Endpoint Overview

VoicePulse provides a straightforward REST API designed for podcast producers who need to convert scripts into audio efficiently. The core endpoint handles synthesis, while two additional endpoints allow you to discover available voices and model capabilities without guessing parameters.

Each endpoint returns structured JSON data, making it easy to integrate with existing podcast production pipelines. You can list available voices, check model details, and generate audio files using standard HTTP methods compatible with most modern programming languages.

POST /v1/audio/speech

This is the primary endpoint for generating audio. Send a JSON body containing the text, voice selection, and format preferences to receive an audio file. The endpoint supports multiple output formats including MP3, WAV, Opus, FLAC, and PCM, allowing you to choose the best balance of quality and file size for your podcast distribution needs.

  • Accepts text up to 4096 characters per request
  • Supports speed adjustment from 0.25x to 4.0x
  • Returns audio data directly in the response

GET /v1/voices

Retrieve a list of all available voices, their associated languages, and supported audio formats. This endpoint helps you dynamically build your interface to let users or editors select the most appropriate voice for a specific script or episode segment. You can filter voices by language to match your podcast's tone.

  • Lists all 8 voice presets with metadata
  • Shows supported languages for all voices
  • Returns available output formats

GET /v1/models

Fetch details about the current TTS models, including their capabilities and pricing tiers. This endpoint helps you understand the differences between the standard and HD models, ensuring you select the right engine for your quality requirements. Use this data to optimize your API calls based on the desired audio fidelity.

  • Returns model IDs and descriptions
  • Shows pricing per character
  • Indicates supported response formats

Request Parameters

Sound wave illustration for: Request Parameters

Configure the synthesis engine and input constraints to ensure your podcast audio matches your production quality standards. The API accepts standard text inputs with specific character boundaries and model tiers for consistent results.

Model selection

Choose between tts-1 for standard efficiency or tts-1-hd for higher fidelity. Both models use the same underlying engine and pricing, allowing you to toggle quality without changing your integration logic.

Input text limit

Each request accepts up to 4096 characters, including spaces and punctuation. For longer scripts, split the text into chunks, generate each part, and join the resulting audio files sequentially.

  • Limit: 4096 characters per request
  • Count includes spaces and punctuation

Voice and language settings

Select from eight voice presets like Aria or Atlas. Optionally specify an ISO language code (e.g., en, de) to prevent incorrect language guessing for non-English Latin-script text.

Any voice can speak any of the 23 supported languages, ensuring consistent tonal branding across your global episodes.

  • 8 voice presets available
  • 23 supported languages
  • Optional language parameter

Response Formats

Sound wave illustration for: Response Formats

Upon successful synthesis, the API returns the audio file directly in the response body. The format matches your chosen response_format parameter (mp3, wav, opus, flac, or pcm). You can save this binary data directly to your podcast production pipeline or storage bucket without additional conversion steps.

Audio file download

The response contains the raw audio bytes, allowing immediate playback or storage. Each generated file includes an inaudible watermark to mark it as synthetic speech, which is useful for content identification in distributed podcast feeds.

  • Supported formats: mp3, wav, opus, flac, pcm
  • Audio is returned as raw binary data
  • Inaudible synthetic watermark embedded in all files

Error messages

If synthesis fails (e.g., input too long or server error), the API returns a JSON error object with a status code and a descriptive message. Failed requests are free: if synthesis fails, the charge is returned in full.

Always check the status field in the response to determine if your audio file was successfully generated or if an error occurred.

  • 400 Bad Request: Invalid parameters or input > 4096 characters
  • 429 Too Many Requests: Rate limit exceeded
  • 500 Internal Server Error: Temporary synthesis failure

Rate limit headers

The response includes standard rate limit headers to help you manage request throughput. You are allowed 60 requests per minute after your first top-up, or 10 requests per minute initially. Monitor these headers to avoid 429 errors during high-volume podcast batch processing.

  • X-RateLimit-Limit: Maximum requests allowed per window
  • X-RateLimit-Remaining: Requests left in current window
  • X-RateLimit-Reset: Time until the limit resets

cURL Example

Sound wave illustration for: cURL Example

Use cURL to quickly test the API before integrating it into your podcast production pipeline. This method allows you to verify voice selection, audio format, and speed settings directly from your terminal.

Basic request

Send a POST request to the speech endpoint with your text and desired voice. The API returns the audio file directly in the response body.

Headers included

Always include your API key in the Authorization header. Set the Content-Type to application/json to ensure proper parsing of your request parameters.

  • Authorization: Bearer tts-your-api-key
  • Content-Type: application/json

Response handling

Save the returned binary data to a file using the -o flag. Check the HTTP status code to confirm success or identify any errors.

  • Status 200: Audio generated successfully
  • Status 401: Invalid API key
  • Status 429: Rate limit exceeded
cURL Example

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

Integrating VoicePulse with the official OpenAI SDK requires only one configuration change. By updating the base_url to our API endpoint, you leverage familiar libraries without rewriting your entire codebase.

This approach works seamlessly for Python, JavaScript, and other supported languages, allowing podcast developers to adopt TTS quickly while maintaining existing project structures.

Change base URL

Point your SDK client to https://api.999f.info/v1 instead of the default OpenAI endpoint. This single change redirects all requests to our infrastructure while preserving the standard request shape.

Use official SDK

Use the standard openai package. Pass your API key via the Authorization header as usual. The SDK handles serialization and response parsing automatically.

Code snippet

```python import openai client = openai.OpenAI(base_url="https://api.999f.info/v1", api_key="tts-your-key") response = client.audio.speech.create( model="tts-1", voice="nova", input="Hello from VoicePulse" ) response.write_to_file("output.mp3") ```

Rate Limits

Sound wave illustration for: Rate Limits

Rate limits protect the synthesis engine during high-volume podcast production. You can make 60 requests per minute, which is sufficient for most publishing workflows. Requests are processed sequentially, so longer texts may queue briefly under heavy load.

If you exceed the limit, the API returns a 429 error. Simple retry logic with exponential backoff handles this gracefully without losing your queued tasks.

60 requests per minute

The standard limit is 60 requests per minute per API key. This allows you to generate multiple voiceovers or episodes simultaneously without throttling.

Each request counts as one unit, regardless of text length. Plan your batch sizes to stay within this threshold for consistent delivery speeds.

  • Applies per API key.

10 requests initially

New accounts start with a lower limit of 10 requests per minute. This ensures fair usage while your account is unverified.

You can monitor your current usage and limits in the dashboard.

  • Initial limit applies to all new keys.
  • Increases automatically after top-up.
  • No manual request needed.

Limit increase after top-up

Once you top up your balance, your rate limit increases to the full 60 requests per minute. This happens automatically within minutes of your USDT transfer.

You can continue generating audio immediately without waiting for verification.

Balance does not expire, so your limit remains active as long as you have credits.

  • Minimum top-up is $5.
  • USDT (TRC-20) only.
  • Limit applies within minutes after credit confirmation.

Error Handling

Sound wave illustration for: Error Handling

Our API returns clear JSON errors when requests fail, allowing you to build robust fallbacks for your podcast production workflow. Understanding these codes helps you quickly distinguish between temporary network hiccups and permanent configuration issues.

Common error codes

We use standard HTTP status codes to indicate the result of your synthesis request. A 200 status means your audio file is ready for download. A 4xx error typically indicates an issue with your authentication key or request format, while 5xx errors suggest a temporary server-side problem.

  • 401 Unauthorized: Invalid or expired API key.
  • 429 Too Many Requests: You have exceeded your rate limit.
  • 500 Internal Server Error: Temporary processing failure.

Retry logic

For transient 5xx errors, implement an exponential backoff strategy. Wait briefly before retrying, as our queue processes requests sequentially during high load. Do not retry immediately, as this may exacerbate congestion. Failed synthesis requests do not consume your character balance, so retrying is safe and cost-free.

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

Invalid input

Ensure your input text does not exceed 4096 characters. If you provide an unsupported voice ID or an invalid response format, the API will return a 400 Bad Request error. Always validate your payload structure before sending, especially when using the OpenAI SDK with a custom base URL.

  • Text length must be under 4096 characters.
  • Voice must be one of the 8 presets.
  • Format must be mp3, wav, opus, flac, or pcm.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Every character, including spaces and punctuation, counts toward this total.

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. Python documentation
  4. TRON developer hub: TRC-20
  5. Node.js documentation
  6. IETF RFC 7845: Ogg Opus
  7. Tether (USDT)
  8. OpenAI API reference: create speech
  9. FFmpeg documentation
  10. curl documentation
  11. Creative Commons Attribution 4.0
  12. openai-python on GitHub

More on this site