API Documentation for Text-to-Speech Integration

By VerbaSound editorial team · Updated 2026-11-19

This documentation provides a practical guide for indie developers building language education tools. You will find everything needed to integrate high-quality synthetic voices into your apps, from initial setup to handling edge cases. We focus on clear, copy-paste examples using standard HTTP requests and the OpenAI SDK, ensuring you can start generating audio in minutes without complex infrastructure.

You will learn how to manage your API key, select from eight distinct voices across 23 languages, and choose the right audio format for your use case. We also cover rate limits, error handling, and billing details so you can build reliable, cost-effective speech features for flashcards, reading assistants, or interactive exercises with confidence.

API Documentation for Text-to-Speech Integration

Frequently asked questions

How do I get an API key?

Navigate to /get-api-key/ and sign up using Google or an email and password. Your unique key appears on the dashboard alongside your balance, usage stats, and a ready-to-use cURL example. If you use Google, you receive a $0.50 trial credit valid for seven days.

Does the API support OpenAI SDK?

Yes. The request shape matches the OpenAI speech endpoint exactly. You can use the official OpenAI SDKs by simply changing the base_url to https://api.kt10.info/v1 and providing your site-specific key in the Authorization header.

What is the base URL?

The API base URL is https://api.kt10.info/v1. All requests are sent to this domain. For example, the speech endpoint is POST https://api.kt10.info/v1/audio/speech. This allows compatibility with standard HTTP clients and the OpenAI SDK.

Which audio formats are supported?

You can choose from mp3, wav, opus, flac, and pcm. Specify the desired format using the response_format field in your JSON request body. This gives you flexibility for different playback environments and storage requirements in your language learning apps.

How do I select a voice?

Choose from eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. List all available voices by sending a GET request to /v1/voices. Each voice has a distinct tone, such as warm narration or energetic promo, suitable for various educational contexts.

What is the rate limit?

The limit is 60 requests per minute per key. New accounts start with a lower limit of 10 requests per minute until the first top-up is processed. This ensures fair usage while maintaining service stability for your development and production environments.

What happens if I exceed the limit?

Requests are processed sequentially. If you exceed the limit, your requests will wait in a queue until capacity is available. This may increase latency, but your requests are not dropped. Monitoring your usage via the dashboard helps manage these queues effectively.

Are failed requests charged?

No. If synthesis fails, the charge is returned in full. You only pay for successful audio generations. This ensures you are not penalized for transient errors or invalid inputs, making budgeting for your language tool development more predictable.

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 texts, you must split the content into chunks of this size and join the resulting audio files in your application logic.

How do I handle long texts?

Split your text into parts of up to 4096 characters. Send each part as a separate request to the speech endpoint. Then, join the returned audio files in your application. This approach ensures consistent quality and avoids hitting character limits.

Can I use the same key for multiple projects?

Yes. One active key is issued per account. You can use this single key across multiple projects or applications. The rate limit and usage statistics apply collectively to the key, so monitor your total consumption across all your integrations.

How do I issue a new API key?

You can issue a new key at any time from your account dashboard. When a new key is generated, the old one stops working immediately. This allows you to rotate keys for security without downtime, ensuring only authorized projects use your access.

What are the model options?

The available models are tts-1 and tts-1-hd. Both use the same engine and pricing. You can specify either in your request model field. The choice does not affect cost or quality, as both models use the same engine.

Is there an SDK for mobile devices?

No. There is no official mobile SDK. You can use the standard OpenAI SDKs or plain HTTP requests by setting the base_url to https://api.kt10.info/v1. This works on any platform that supports HTTP, including iOS and Android native apps.

First request

curl

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

Create an account on kt10.info to access the TTS API. You can sign up instantly via Google or use a standard email and password combination. This account stores your API key, balance, and usage statistics for your language education tools.

Once registered, you receive a unique API key starting with tts-.... Use this key in the Authorization header for all requests. You can issue a new key at any time, which immediately invalidates the old one for security.

Google Sign-Up

Google Sign-Up

Click the sign-up button on the /get-api-key/ page and authenticate with your Google account. This method is the fastest way to get started and includes a free trial credit of $0.50 (approx. 50,000 characters) valid for 7 days.

Your account dashboard will immediately display your API key, current balance, and a ready-to-use cURL example. You can start generating speech for your flashcards or exercises right away.

  • Instant setup with Google OAuth
  • Includes $0.50 free trial credit
  • Valid for 7 days

Email Registration

Email Registration

Alternatively, create an account using your email address and a secure password. This method does not include the initial trial credit, so you will need to add funds before making your first request.

This option is useful if you prefer a standalone account or are integrating the API into a backend system that manages credentials separately from a Google identity provider.

Key Management

Your API key is displayed on the /get-api-key/ dashboard. You can generate a new key at any time from this page. When you issue a new key, the previous one becomes invalid immediately.

Use the key in the header Authorization: Bearer tts-... for all API calls. Keep this key secure, as it provides access to your balance and usage data.

  • Generate new keys anytime
  • Old keys invalidate instantly
  • View usage and balance in dashboard

Quickstart with cURL

Sound wave illustration for: Quickstart with cURL

The fastest way to verify your integration is a single curl command. Send a POST request to https://api.kt10.info/v1/audio/speech with your JSON body. This endpoint mirrors the OpenAI speech structure, allowing immediate compatibility with standard tools.

You receive a binary audio file directly in the response body. No parsing of complex JSON wrappers is required for the audio data itself. This simplicity makes it ideal for quick prototyping of language learning flashcards or reading assistants.

Basic Request Example

Use this command to generate a short English phrase. Replace YOUR_API_KEY with your actual key from the dashboard. The request uses the nova voice and defaults to MP3 format.

Ensure your key is active and you have sufficient balance. The request will fail if the key is invalid or credits are exhausted. Failed requests return a 4xx/5xx error without charging your balance.

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

Headers and Body

The Authorization header requires your Bearer token. The Content-Type must be application/json. The body contains model, input, voice, and optional fields like language or speed. The input field supports up to 4096 characters.

You can specify response_format (mp3, wav, opus, flac, pcm) and speed (0.25–4.0). If language is omitted, the system guesses based on the script. For Latin-script text outside English, always set the language code explicitly.

Response Format

On success, the API returns HTTP 200 with the raw audio bytes in the specified format. No JSON envelope surrounds the audio data. Save the output directly to a file for immediate playback in your app.

If an error occurs, the response body contains a JSON object with an error message and code. Common errors include 401 for invalid keys or 429 for rate limits. Check the response body for details.

image]:

Using the OpenAI SDK

Sound wave illustration for: Using the OpenAI SDK

The official OpenAI SDKs work seamlessly with our API because we mirror the standard request shape. You only need to adjust the base URL to point to our endpoint, allowing you to use familiar libraries without learning a new client.

This approach lets indie developers integrate high-quality synthetic voices into language learning apps with minimal code changes. You can continue using your preferred HTTP client or the OpenAI Python/Node libraries for consistent behavior.

By swapping the base URL, you gain access to eight distinct voices and 23 languages without complex infrastructure setup.

Base URL Configuration

Update your client's base URL to https://api.kt10.info/v1. This single change directs all requests to our TTS endpoint while maintaining compatibility with standard SDK methods.

Ensure your API key is passed in the Authorization header as Bearer tts-.... One key per account simplifies management across different environments.

  • Base URL: https://api.kt10.info/v1
  • Header: Authorization: Bearer tts-...
  • Compatible with OpenAI Python and Node SDKs

SDK Initialization

Initialize the OpenAI client with your base URL and API key. This setup allows you to call the speech endpoint using standard methods.

Pass your text, voice selection, and format preferences directly to the audio.speech.create method. The SDK handles JSON serialization automatically.

  • Set base_url to our API endpoint
  • Provide api_key for authentication
  • Use standard audio.speech methods

Code Snippets

```python import openai client = openai.OpenAI(base_url="https://api.kt10.info/v1", api_key="tts-...") with client.audio.speech.create( model="tts-1", voice="nova", input="Hello world!" ) as response: response.stream_to_file("output.mp3") `` This example demonstrates generating a warm, clear narration using the Nova voice. Adjust the voice` parameter to switch between the eight available presets for different educational contexts.

For Node.js, use await client.audio.speech.create(...) and handle the stream similarly. Remember that texts are limited to 4096 characters per request; split longer content into chunks and join the resulting audio files.

Supported Audio Formats

Sound wave illustration for: Supported Audio Formats

VerbaSound returns audio in five standard formats to suit your language learning app’s needs. Choose MP3 for broad compatibility or WAV for lossless quality in educational exercises.

MP3 and WAV

MP3 provides efficient compression for web delivery, while WAV offers uncompressed audio ideal for high-fidelity listening tests. Both formats handle the full range of our 23 languages without quality loss.

Opus and FLAC

Opus delivers superior compression at low bitrates, perfect for mobile apps where bandwidth matters. FLAC offers lossless compression, preserving every detail for archival or professional use.

PCM Support

PCM provides raw, uncompressed audio data. Use this format if your processing pipeline requires raw samples or if you need to apply custom audio effects before storage.

Voice Selection and Languages

Sound wave illustration for: Voice Selection and Languages

Choosing the right voice and language is straightforward with our API. You can retrieve all available voices and their details via a simple GET request, then select the preset that best fits your language education tool’s tone. The API supports 23 languages, with any voice capable of speaking any supported language.

Accurate language detection ensures your audio matches the script. You can explicitly set the language code or let the system guess it based on the script, though setting it manually is recommended for non-English Latin text to avoid defaulting to English.

Voice List Endpoint

Use GET /v1/voices to fetch the full list of 8 voice presets along with their supported languages and formats. Each voice has a distinct character: Aria and Luna offer warm, clear narration; Nova is bright and upbeat; Sage is calm and instructional. On the male side, Felix is energetic, Milo is friendly, Atlas is neutral for news, and Orion provides a deep, documentary style.

These voices are based on licensed recordings from LibriTTS-R and LibriVox. Every generated file includes an inaudible watermark marking it as synthetic speech, which is ideal for educational transparency.

  • GET https://api.kt10.info/v1/voices

Language Codes

The API supports 23 specific languages: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, and Turkish. Any voice can speak any of these languages.

Unsupported languages include Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali, and others. If you need one of these, it is not currently available.

Auto-Detection

If you omit the language field, the API guesses the language from the script. Latin script text defaults to English. For non-English Latin-script text, always set the language parameter explicitly to ensure accurate pronunciation and avoid defaulting to English.

Voice Selection and Languages

Rate Limits and Performance

Sound wave illustration for: Rate Limits and Performance

Efficient API usage requires understanding your request limits to ensure smooth audio generation workflows. The standard rate limit allows 60 requests per minute, which is sufficient for most indie development projects and small-scale language learning tools.

Be aware that your account starts with a lower threshold until you add funds. Under normal conditions, generation speed is roughly real-time, processing about 25 characters per second, though requests are processed sequentially during high load.

Requests Per Minute

Each API key supports up to 60 requests per minute. This limit applies to all synthesis calls, so plan your batch processing accordingly to avoid throttling during peak usage hours.

Initial Limit

New accounts begin with a reduced limit of 10 requests per minute. This restriction remains in effect until you make your first top-up, after which the full 60 requests per minute allowance becomes active immediately.

Queue Processing

Requests are processed one after another. If you exceed the rate limit or if many requests are submitted simultaneously, subsequent requests will wait in a queue. This ensures fair resource distribution but may increase latency for short phrases.

Handling Errors

Sound wave illustration for: Handling Errors

When integrating VerbaSound, errors typically stem from invalid parameters or rate limits. Understanding these responses helps you build robust language education tools without unexpected interruptions.

Our API returns standard HTTP status codes. Clear error messages indicate exactly which field needs correction, such as an unsupported voice or an input text exceeding 4096 characters.

Common Error Codes

400 Bad Request indicates invalid input, such as a malformed JSON body or an unsupported language code.

429 Too Many Requests occurs when you exceed 60 requests per minute. Wait briefly before retrying.

500 Internal Server Error suggests a temporary issue on our end. If it persists, contact support via email.

  • Check your Authorization header format.
  • Ensure input is under 4096 characters.
  • Verify voice exists in the /voices list

Retry Logic

Implement exponential backoff for 429 and 500 errors. Start with a short delay and increase it with each attempt.

Avoid rapid retries, as requests are processed sequentially. Under heavy load, your request may wait in a queue.

For 400 errors, do not retry without fixing the input, as the error will persist.

Failed Request Billing

If synthesis fails due to a server error, the charge is returned in full.

Failed requests do not count against your character limit.

Check your balance page to confirm refunds appear after failed attempts.

Model Options

Sound wave illustration for: Model Options

The API offers two model variants, tts-1 and tts-1-hd, which utilize the same underlying engine. This means both models generate audio with identical voice characteristics, speed, and quality, differing only in the model name used in the request. You can switch between them without changing your voice selection logic, ensuring consistent behavior across your language learning applications.

Both models handle the full range of 23 supported languages and eight voice presets. The choice primarily affects the audio file format returned in the response, allowing you to balance file size and quality based on your specific educational tool requirements, such as flashcard audio versus reading assistant streams.

tts-1 Model

The tts-1 model is the standard option for most integration needs. It supports mp3, wav, opus, flac, and pcm response formats, making it versatile for various playback environments. It is ideal for general language exercises where standard audio quality suffices.

This model processes requests using the same engine as the HD variant. It does not introduce additional latency or processing differences beyond the format encoding step.

  • Supports mp3, wav, opus, and flac outputs
  • Standard processing pipeline
  • Compatible with all 8 voice presets

tts-1-hd Model

The tts-1-hd model is designed for higher fidelity audio output. It is useful when you need lossless formats like wav or flac, as it uses the same engine as tts-1.

Like tts-1, it uses the same engine and voice presets. The primary difference is the model name; both models support the same formats (mp3, wav, opus, flac, pcm). It ensures clarity for detailed language instruction.

  • Supports wav and flac for lossless audio
  • Higher fidelity output options
  • Same engine as tts-1

Pricing Difference

There is no pricing difference between tts-1 and tts-1-hd. Both models are charged at the same rate of $10 per 1 million characters. This simplicity allows you to upgrade your audio quality without worrying about variable costs per request.

You pay based on the input text length, regardless of the model selected. Failed requests are free, so you can test both models without financial risk. The consistent pricing makes budgeting for your API usage straightforward, whether you are generating short phrases or long reading texts.

  • Same price for both models
  • $10 per 1 million characters

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Per-character billing is the most predictable model for variable usage.

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. ISO 639 language codes
  3. W3C WAI: making audio and video accessible
  4. Node.js documentation
  5. openai-node on GitHub
  6. Creative Commons Attribution 4.0
  7. MDN: Web Speech API
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. OpenAI API reference: create speech
  10. openai-python on GitHub
  11. IETF RFC 7845: Ogg Opus
  12. Python documentation

More on this site