API Documentation for Cloud Text-to-Speech Generation

By VocalPop editorial team · Updated 2026-11-18

This documentation explains how to integrate VocalPop’s text-to-speech API into your VTuber streams, video edits, or content workflows. You will find clear examples for generating audio files, managing your API key, and handling voice selection. The guide covers the essential endpoints, supported formats, and rate limits so you can start generating speech without unnecessary setup delays.

Designed for streamers and content creators, this page assumes you want reliable, natural-sounding audio in 23 languages. We cover the JSON request structure, OpenAI SDK compatibility, and practical tips for handling longer texts. Whether you are building a simple bot or a complex stream overlay, these specs give you exactly what you need to produce high-quality voice content efficiently.

API Documentation for Cloud Text-to-Speech Generation

Frequently asked questions

How do I get an API key?

Sign up on /get-api-key/ using Google or email plus password. Your account page displays your unique API key, balance, trial status, characters left, and usage. You can issue a new key at any time, which immediately invalidates the old one. Accounts created with email do not receive the free trial credit.

What is the base URL?

The API base URL is https://api.1g17apk.com/v1. You can use the official OpenAI SDKs by changing the base_url to this address and providing your site-specific key. All requests follow the standard OpenAI speech endpoint structure for compatibility.

Do I need the OpenAI SDK?

No, you can use plain HTTP or any HTTP client. The OpenAI SDKs work well by adjusting the base_url, but they are not required. You can send a standard POST request with your JSON body and receive the audio file directly.

Which models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and pricing structure. You select the model in your request body along with the voice, input text, and response format to generate your audio content.

What are the rate limits?

You are limited to 60 requests per minute per key. Before your first top-up, this limit drops to 10 requests per minute. Requests are processed sequentially, so high load may cause queuing delays during synthesis.

How do I handle errors?

If synthesis fails, the charge is returned in full. You can monitor your balance and usage on the account page. Failed requests do not consume your character allowance, ensuring you only pay for successfully generated audio.

What is the max text length?

Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer scripts, you must split the text into chunks and join the resulting audio files manually.

Do you support SSML?

No, we do not support SSML. The API accepts plain text input. You cannot use SSML tags for pronunciation or prosody control. We also do not offer phoneme dictionaries or custom pronunciation lexicons.

Can I stream audio?

No, we do not support streaming or WebSocket connections. Audio is returned as a complete file in the response. There is no real-time partial audio delivery, so you must wait for the full synthesis to complete.

How do I split long texts?

Split your text into parts of up to 4096 characters each. Send each part as a separate POST request to the speech endpoint. Once you receive all audio files, join them together to create the final audio.

What happens if I exceed limits?

If you exceed the rate limit, requests may queue or fail. Requests are processed one after another, so under heavy load, you may experience delays. Failed requests are free, so you are not charged for rejected attempts.

Is the API RESTful?

Yes, the API is RESTful. It uses standard HTTP methods like POST for speech generation and GET for retrieving voices and models. You interact with resources via JSON bodies and standard HTTP status codes.

Can I use the same key on multiple devices?

Yes, you can use your single active API key on multiple devices or applications simultaneously. The key is tied to your account, and you can issue a new key at any time to invalidate the old one.

How do I revoke my key?

You can issue a new key from your account page at any time. The new key becomes active immediately, and the old key stops working at once. This effectively revokes the previous key without needing a separate action.

First request

curl

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

Get Your API Key

Sound wave illustration for: Get Your API Key

Access your API key by signing up at /get-api-key/. You can register using Google or create an account with an email and password. Once logged in, the dashboard displays your active key, current balance, trial status, and a ready-to-use cURL example.

Sign up on /get-api-key/

Visit the sign-up page to create your account. Google sign-ups receive a $0.50 free trial credit (valid for 7 days), while email-based accounts start without trial credit. Your account is specific to this site.

  • Sign up with Google or email/password
  • Receive API key and balance details immediately
  • Google sign-ups get $0.50 trial credit

Generate a new key

You can issue a new API key at any time from your dashboard. When a new key is generated, the previous one stops working immediately, ensuring your credentials remain secure without needing manual revocation.

  • Issue a new key anytime
  • Old key stops working instantly
  • One active key per account

First Request with cURL

Sound wave illustration for: First Request with cURL

Start by sending a simple POST request to the speech endpoint. This basic interaction returns an audio file, letting you verify connectivity and voice quality before integrating into your VTuber stream or video editing workflow. It is the fastest way to hear how VocalPop handles your specific text inputs.

Use the provided cURL command as a template. Replace the placeholder key and text with your actual credentials. This single request demonstrates the core capability: sending text and receiving synthesized audio, ready for immediate playback or post-production use.

POST endpoint example

Send your text to the speech endpoint using a standard HTTP POST request. The API accepts JSON payloads and returns the audio data directly in the response body. This simple structure allows you to integrate the voice generation into any scripting language or automation tool used in your streaming setup.

You can test this immediately with the following cURL command. Ensure you replace YOUR_API_KEY with your actual key from the dashboard and update the text content to match your needs.

  • curl -X POST https://api.1g17apk.com/v1/audio/speech \
  • -H "Authorization: Bearer YOUR_API_KEY" \
  • -H "Content-Type: application/json" \
  • `-d '{"model": "tts-1", "input": "Hello from VocalPop", "voice": "aria"}'`

JSON body structure

The request body requires specific fields to define the synthesis parameters. You must provide the model, input text, and voice preset. Optional fields like response_format and speed allow you to tailor the output for your specific streaming or recording needs without extra configuration steps.

Ensure your text does not exceed 4096 characters. The API will process the input and return the audio file in the format you specified. This straightforward structure ensures compatibility with existing tools while providing the flexibility needed for diverse content creation scenarios.

  • model: "tts-1" or "tts-1-hd"
  • input: Your text string (max 4096 chars)
  • voice: One of the 8 presets
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: Float between 0.25 and 4.0
  • language: Optional ISO code for language hint
First Request with cURL

OpenAI SDK Compatibility

Sound wave illustration for: OpenAI SDK Compatibility

VocalPop’s API mirrors the OpenAI speech structure, meaning you can reuse your existing integration code with minimal changes. This compatibility lets VTubers and streamers integrate TTS directly into their existing streaming software or bot workflows without rebuilding their entire audio pipeline from scratch.

Change base_url

To start, update your SDK’s base_url configuration to https://api.1g17apk.com/v1. This directs your requests to our infrastructure while keeping the standard request shape intact. You can then use your VocalPop API key in the Authorization header just like you would with any other compatible service.

Use official SDKs

Since the request shape is identical to the OpenAI speech endpoint, the official OpenAI SDKs work perfectly. Simply point the SDK to our base URL and pass your tts-... key. This allows you to leverage familiar libraries for handling audio responses and managing characters in your stream highlights or video narration.

Available Voices and Models

Sound wave illustration for: Available Voices and Models

VocalPop offers eight distinct voice presets designed for VTubers and streamers, ranging from warm narrators to energetic promo voices. You can retrieve the full list of available voices, supported languages, and formats by calling the /v1/voices endpoint.

GET /v1/voices

Call this endpoint to see all eight voice options (Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion) along with their associated languages and audio formats. Each voice is based on licensed recordings from LibriTTS-R (CC BY 4.0) and LibriVox public-domain audiobook readings.

GET /v1/models

Use this endpoint to check available model configurations. Currently, the API supports "tts-1" and "tts-1-hd," which share the same engine and pricing. This endpoint helps you verify the current model status before generating audio for your stream highlights or VTuber dialogue.

Audio Formats

Sound wave illustration for: Audio Formats

The API supports five audio formats to suit different streaming and editing needs. You can choose from MP3, WAV, Opus, FLAC, or PCM by setting the response_format field in your request. Each format offers a different balance of file size, quality, and compatibility for your VTuber content.

Selecting the right format depends on whether you are storing clips for later use or playing them live during a stream. We recommend MP3 for general compatibility and small file sizes, while WAV or FLAC are better for high-quality archival. Opus offers excellent compression for real-time delivery, and PCM provides raw, uncompressed data for immediate processing.

MP3, WAV, Opus, FLAC, PCM

MP3 is a widely supported format, ideal for quick uploads and general playback. WAV and FLAC provide lossless quality, perfect for preserving the nuance of your character's voice in high-fidelity recordings. Opus offers efficient compression suitable for streaming overlays. PCM outputs raw audio data without any compression, useful for direct audio processing pipelines.

  • MP3: Best for compatibility and small file sizes.
  • WAV: Lossless, ideal for high-quality archival.
  • Opus: Efficient compression for live streaming.
  • FLAC: Lossless, preserves audio detail.
  • PCM: Raw, uncompressed data for processing.

Choosing the right format

For VTuber dialogue and stream highlights, MP3 is usually sufficient due to its balance of quality and size. If you are creating voice packs or need lossless fidelity, choose WAV or FLAC. Use Opus when bandwidth is a concern during live streams. PCM is best if you need to apply additional audio effects immediately after generation.

Audio Formats

Rate Limits

Sound wave illustration for: Rate Limits

Rate limits ensure fair usage of our generation infrastructure. Each API key allows 60 requests per minute (10 per minute before the first top-up).

60 requests per minute

The standard limit of 60 requests per minute applies to all active keys. Requests are processed one after another, so under load a request may wait in a queue.

10 requests before top-up

New accounts or those with an empty balance are restricted to 10 requests per minute. This lower limit helps manage load before you add funds via USDT.

Error Handling

Sound wave illustration for: Error Handling

Synthesis failures are handled transparently. If synthesis fails, the charge is returned in full.

This policy applies to all request types, so you can integrate with confidence knowing your balance remains accurate even during brief service hiccups.

Failed requests are free

We refund the character cost immediately if synthesis fails. This ensures your billing stays precise, reflecting only successful audio generations.

No hidden fees or delayed deductions apply to failed attempts.

Common error codes

Standard HTTP codes indicate request status. Use 401 for invalid keys, 429 for rate limits, and 400 for invalid parameters like unsupported voices or format issues.

Check your key and ensure the text does not exceed 4096 characters per request.

  • 400: Bad Request (invalid input or voice)
  • 401: Unauthorized (invalid or expired API key)
  • 429: Too Many Requests (rate limit exceeded)
Error Handling

Text Length Limits

Sound wave illustration for: Text Length Limits

Each API call accepts a maximum of 4096 characters, including spaces and punctuation. This limit applies to the input field in your JSON payload, so ensure your text fits within this constraint before sending.

4096 characters per request

Stay within the 4096-character limit per request. Exceeding this will result in an error, and no audio will be generated.

Splitting longer texts

For longer scripts, split your text into chunks of up to 4096 characters. Generate audio for each chunk separately and join the resulting files to create a complete voiceover.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Connect deeply with your community by consistently sharing your authentic self and creative passion.

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-python on GitHub
  3. LibriTTS-R corpus (OpenSLR 141)
  4. Python documentation
  5. LibriTTS-R paper (arXiv 2305.18802)
  6. W3C WAI: making audio and video accessible
  7. Node.js documentation
  8. openai-node on GitHub
  9. MDN: Web Speech API
  10. ISO 639 language codes
  11. Tether (USDT)
  12. FFmpeg documentation

More on this site