Generate High-Quality Audio from Text with Our TTS API

By SnapVoice editorial team · Updated 2026-11-19

This guide helps developers integrate SnapVoice’s text-to-speech API into their workflows. You will learn how to generate high-quality audio files from text scripts for TikTok, Reels, and Shorts. The documentation covers essential steps from acquiring your API key to handling responses, ensuring you can turn your content ideas into ready-to-use audio without complex editing.

We provide concrete examples using cURL, Python, and JavaScript. The API follows a familiar structure, making it easy to adapt existing code. You will find details on available voices, languages, and parameters like speed and format. This resource is designed for no-code and code users who need a reliable, straightforward solution for generating voiceovers quickly.

Generate High-Quality Audio from Text with Our TTS API

Frequently asked questions

How do I get my API key?

Sign up on the /get-api-key/ page using Google or email. Your unique key appears immediately on the dashboard. You can issue a new key at any time, which stops the old one instantly. Each account is tied to this specific site, so create a separate account if needed.

Which parameters are required?

The request body must include the model (tts-1 or tts-1-hd), the input text (up to 4096 characters), and the voice preset. You may also specify response_format, speed, and an optional language code. The API key is sent via the Authorization header.

Can I use the OpenAI SDK?

Yes. The request shape matches the OpenAI speech endpoint. Simply change the base_url in your OpenAI SDK configuration to https://api.turbo6.info/v1 and provide your SnapVoice API key. This allows you to use official OpenAI SDKs without writing custom HTTP clients.

What is the base URL?

The base URL for all API requests is https://api.turbo6.info/v1. Use this prefix for the speech endpoint (POST /v1/audio/speech) and other endpoints like GET /v1/voices. Ensure your SDK or HTTP client points to this domain for correct routing.

Which formats are supported?

You can request audio in mp3, wav, opus, flac, or pcm formats. Select the format that best fits your workflow using the response_format parameter. All formats are generated from the same engine, so quality remains consistent regardless of your choice.

What does 'response_format' mean?

The response_format parameter determines the audio container and codec of the returned file. Options include mp3, wav, opus, flac, and pcm. Choose based on your playback needs; for example, use mp3 for web compatibility or wav for uncompressed editing.

How do I set the speed?

Use the speed parameter to adjust playback rate between 0.25 and 4.0. The default is 1.0. Values below 1.0 slow the voice, while values above 1.0 speed it up. This applies to all voices and languages uniformly.

Why do I get an error?

Errors may occur if the text exceeds 4096 characters, the voice is invalid, or the API key is incorrect. Check your input length and ensure you are using one of the eight preset voices. Failed requests do not consume your credit balance.

How many characters per request?

Each request supports up to 4096 characters of input text. For longer scripts, split the text into chunks of this size and join the resulting audio files. This ensures consistent generation quality and avoids timeouts for very long inputs.

What is the HD model?

The tts-1-hd model uses the same engine as tts-1. Both models have identical pricing and character limits. Choose tts-1-hd if you prioritize audio quality over minimal processing time for your voiceovers.

Can I use multiple voices?

Yes, you can switch between the eight available voices (Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion) by changing the voice parameter in each request. Each request generates audio for a single voice, so you must send separate requests for different voices.

How does authentication work?

Include your API key in the Authorization header as Bearer tts-.... One active key exists per account. If you generate a new key, the old one stops immediately. Ensure your key is valid and has sufficient balance before sending requests.

What happens to credit on errors?

If synthesis fails, the charge is returned in full. You are only billed for successful audio generations. This applies to network errors or invalid parameters. Check your dashboard balance to confirm refunds appear after failed requests.

Is there a sandbox environment?

No separate sandbox environment exists. Use your production API key at https://api.turbo6.info/v1. You can test with your free trial credit ($0.50) or paid balance. The environment is identical to production, so test your integration directly with live endpoints.

First request

curl

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

Get your API Key

Sound wave illustration for: Get your API Key

SnapVoice provides a straightforward path to audio generation for your short-form content workflows. You start by creating an account on our dedicated key management page, where you can choose to sign in with Google or use a standard email and password combination.

Once registered, you will receive a unique API key. This key is the only credential needed to authenticate your requests to the TTS engine. Keep this value safe, as it controls your usage and billing.

Register on the /get-api-key/ page

Register on the /get-api-key/ page

Visit the /get-api-key/ section of the site to begin. You can authenticate instantly using your Google account or create a new account with your email and a secure password. Accounts are specific to this site, ensuring your credentials are isolated.

  • Google Sign-In for instant setup
  • Email and password option available
  • No credit card required to start (USDT only)

Copy your key

Copy your key

After registration, your API key appears on the dashboard. It begins with tts- and is your single active key for all requests. You can generate a new key at any time, which immediately invalidates the previous one.

  • Key format: tts-...
  • One active key per account
  • New keys invalidate old ones instantly

Save your key securely

Store your key in environment variables or a secure configuration file. Since one key controls your account and billing, treat it like a password. Avoid sharing it in public repositories or client-side code where it might be exposed.

  • Use environment variables
  • Avoid public git repositories
  • Regenerate if compromised

First request with cURL

Sound wave illustration for: First request with cURL

Send a POST request to the speech endpoint with your text and preferred voice. The API returns a ready-to-use audio file that you can save or play immediately.

Copy the command

Use this cURL template to generate audio. It sends a simple text input and receives an MP3 file in response.

  • curl -X POST https://api.turbo6.info/v1/audio/speech
  • -H "Authorization: Bearer YOUR_API_KEY"
  • -H "Content-Type: application/json"
  • -d '{"model": "tts-1", "input": "Hello world", "voice": "nova"}'

Insert your key

Replace YOUR_API_KEY with the key from your dashboard. Ensure it starts with 'tts-'. The key authenticates your requests, subject to a 60 requests per minute limit.

Receive the audio response

The response contains binary audio data. Save it as an .mp3 file. Short phrases take a few seconds to generate.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

SnapVoice’s API mirrors the OpenAI speech endpoint structure, allowing you to leverage existing OpenAI SDKs with minimal configuration. By simply adjusting the base URL and authentication header, you can integrate high-quality voiceovers into your workflow without rewriting your HTTP client logic.

Change base URL

Update your SDK’s base_url configuration to point to https://api.turbo6.info/v1. This directs all subsequent requests to our TTS endpoint while maintaining the standard request shape compatible with OpenAI’s SDKs.

Set your key

Initialize your client using your unique SnapVoice API key. Ensure the key is passed via the Authorization: Bearer header. Remember that each account holds one active key; issuing a new one immediately invalidates the previous one.

Adapt the code

Pass your text script, selected voice, and desired audio format to the speech endpoint. The SDK handles the JSON body construction automatically. You will receive the audio file directly in the response, ready for immediate playback or upload to your short-form video projects.

  • Supported models: tts-1 and tts-1-hd
  • Accepts voices like aria, nova, or atlas
  • Formats include mp3, wav, opus, flac, and pcm

Available Endpoints

Sound wave illustration for: Available Endpoints

The API provides three core endpoints for generating and managing speech assets. The primary endpoint handles text synthesis, while the secondary endpoints expose available voices and model configurations.

POST /v1/audio/speech

Send JSON with model, input, and voice to receive an audio file. Supports formats like mp3, wav, opus, flac, and pcm. Text is limited to 4096 characters per request.

GET /v1/voices

Retrieve details on all 8 voice presets (e.g., aria, nova, felix) and supported languages. This endpoint confirms available formats and pricing.

  • Lists 8 distinct voice presets
  • Confirms 23 supported languages
  • Displays current pricing per character

GET /v1/models

Fetch available model versions. Currently supports "tts-1" and "tts-1-hd", which share the same engine and pricing structure for consistent cost forecasting.

Parameters

Sound wave illustration for: Parameters

The API accepts two model identifiers, tts-1 and tts-1-hd, which utilize the same underlying engine and pricing tier. You select the desired model via the model field in your request JSON. Both models support the full range of voice presets and language options available in the system.

Voice output is controlled through the voice parameter, allowing you to choose from eight distinct presets ranging from warm narrators to energetic promo voices. The response_format field lets you specify the audio codec, with options including mp3, wav, opus, flac, and pcm, ensuring compatibility with your editing workflow.

Model selection

Choose between tts-1 or tts-1-hd. Both use the same engine and cost $10 per 1 million characters. The choice does not affect pricing or voice availability.

Select the model. Short phrases may take a few seconds to generate, while longer texts process at roughly real-time speed. Requests are processed sequentially, so high volume may introduce queue delays.

  • tts-1: Standard model identifier
  • tts-1-hd: High-definition model identifier
  • Same price: $0.01 per 1,000 characters

Language setting

Pass the ISO 639-1 language code via the language parameter to ensure accurate synthesis. If omitted, the system guesses the language based on the script, defaulting to English for Latin text. For non-English text in Latin script, explicitly setting the language is recommended.

The API supports 23 languages, including Arabic, Chinese, English, French, German, Hindi, Japanese, Korean, Spanish, and others. Any voice can speak any of these supported languages. Vietnamese, Indonesian, Thai, and Ukrainian are not supported.

  • Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
  • Optional: ISO 639-1 code
  • Default: English for Latin script

Speed control

Adjust the playback speed using the speed parameter, which accepts values between 0.25 and 4.0. This allows you to speed up voiceovers for quick social media clips or slow them down for clearer enunciation. The default speed is 1.0.

Changing the speed does not alter the character count or cost. A 10,000-character script costs the same whether spoken at 0.5x or 2.0x speed. Ensure your text fits within the 4,096-character limit per request; longer texts must be split and joined.

  • Range: 0.25 to 4.0
  • Default: 1.0
  • Does not affect pricing
Parameters

Response Format

Sound wave illustration for: Response Format

The API returns audio data as a binary response. The response_format parameter determines the encoding of the output file, allowing you to choose between compressed MP3 for efficient storage or lossless WAV for editing flexibility. Both formats are standard and widely compatible with video editing tools used for short-form content.

MP3 format

MP3 is a common format for social media uploads. It provides high-quality audio at a smaller file size, making it ideal for TikTok, Reels, and Shorts where bandwidth matters. The compression is transparent for voiceover use, ensuring your script sounds clear without wasting storage.

WAV format

Choose WAV when you need uncompressed audio for professional editing. This format preserves the full fidelity of the synthesis, which is useful if you plan to apply additional effects or normalize volume in your editing software. Note that WAV files are significantly larger than MP3s for the same duration.

Binary data handling

Since the response body contains raw audio bytes, you must save them to a file or stream them correctly. Ensure your HTTP client does not parse the response as JSON, which would corrupt the audio data. For languages other than English, set the language parameter explicitly to avoid incorrect voice synthesis.

  • Set response_format to mp3, wav, opus, flac, or pcm.
  • Handle the response body as binary, not text.
  • Specify language for non-English Latin-script text to ensure correct pronunciation.

Error Handling

Sound wave illustration for: Error Handling

Your API key enforces a strict rate limit of 60 requests per minute. If you exceed this threshold, the API returns a 429 error, pausing further processing until the window resets. Accounts starting fresh have a lower initial limit of 10 requests per minute.

Proper error handling ensures your application can gracefully manage these pauses without crashing. You can also monitor your usage dashboard to anticipate high-volume periods.

Rate limit exceeded

When you hit 60 requests per minute, subsequent calls fail immediately. This limit applies per API key, so ensure you are not sharing keys across multiple processes.

If you need higher throughput, consider splitting long texts into chunks and processing them sequentially to stay within the per-minute cap.

  • Limit: 60 requests/minute (10 for new accounts)

Invalid API key

A missing or incorrect key results in a 401 Unauthorized error. Ensure your key starts with tts- and is passed in the Authorization: Bearer header.

Keys can be revoked instantly; if you issue a new key, the old one stops working immediately.

  • Format: Authorization: Bearer tts-...

Server errors

Internal errors (5xx) are rare but may occur during peak load. Failed synthesis requests are free, so you can retry without worrying about billing.

Input text exceeding 4096 characters will also fail; split your script before sending.

  • Failed requests are free

Code Examples

Sound wave illustration for: Code Examples

Use these ready-to-use code snippets to integrate SnapVoice into your short-form video workflow. Each example demonstrates how to send a text payload and receive an audio file via the API.

Ensure your environment supports the required HTTP libraries and that your API key is stored securely.

Python snippet ['Use the requests library to send a POST request to the speech endpoint. The code handles the JSON body with model, voice, and input text, then saves the binary response to a file.', "```python\nimport requests\n\nurl = 'https://api.turbo6.info/v1/audio/speech'\nheaders = {'Authorization': 'Bearer YOUR_API_KEY'}\npayload = {\n 'model': 'tts-1',\n 'input': 'Hello creators!',\n 'voice': 'nova',\n 'response_format': 'mp3'\n}\n\nresponse = requests.post(url, json=payload, headers=headers)\nwith open('output.mp3', 'wb') as f:\n f.write(response.content)\n```"] []

Node.js snippet ['Use the axios library to make the request. The code sends the JSON payload and writes the audio data to disk.', "```javascript\nconst axios = require('axios');\n\naxios.post('https://api.turbo6.info/v1/audio/speech', {\n model: 'tts-1',\n input: 'Hello creators!',\n voice: 'nova',\n response_format: 'mp3'\n}, {\n headers: { 'Authorization': 'Bearer YOUR_API_KEY' },\n responseType: 'arraybuffer'\n}).then(response => {\n require('fs').writeFileSync('output.mp3', response.data);\n});\n```"] []

JavaScript snippet ['Use the native fetch API for modern browsers or Node.js 18+. The code handles the JSON body and writes the binary response to a file.', "```javascript\nconst fetch = require('node-fetch');\n\nfetch('https://api.turbo6.info/v1/audio/speech', {\n method: 'POST',\n headers: {\n 'Authorization': 'Bearer YOUR_API_KEY',\n 'Content-Type': 'application/json'\n },\n body: JSON.stringify({\n model: 'tts-1',\n input: 'Hello creators!',\n voice: 'nova',\n response_format: 'mp3'\n })\n}).then(response => response.arrayBuffer())\n .then(data => require('fs').writeFileSync('output.mp3', data));\n```"] []

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Use her for calm vlogs, bedtime stories, or gentle transitions to create a soothing atmosphere.

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. curl documentation
  4. TRON developer hub: TRC-20
  5. Node.js documentation
  6. openai-node on GitHub
  7. LibriVox public-domain audiobooks
  8. LibriTTS-R corpus (OpenSLR 141)
  9. Tether (USDT)
  10. openai-python on GitHub
  11. Creative Commons Attribution 4.0
  12. OpenAI API reference: create speech

More on this site