Text-to-Speech API Documentation for Developers

By LendVoice editorial team · Updated 2026-11-18

Welcome to the LendVoice developer hub. This guide provides everything indie fintech engineers need to integrate natural-sounding text-to-speech for customer alerts. We cover the JSON API, authentication, and SDK compatibility so you can deploy clear audio for transactional banking communications without heavy engineering overhead. You will find concrete examples for Python, Node.js, and cURL, along with precise details on voices, languages, and pricing.

Here, you will learn how to generate audio files using our OpenAI-compatible endpoint. We explain parameter options like speed and response format, detail the rate limits, and show you how to handle errors. Whether you are building a mobile app or a web dashboard, this documentation ensures you can start sending text and receiving audio quickly and reliably.

Text-to-Speech API Documentation for Developers

Frequently asked questions

How do I set the base_url for the OpenAI SDK?

Set the base_url to https://api.play77kk.com/v1. This allows you to use the official OpenAI SDKs by simply changing the endpoint. Your API key remains the same, ensuring a seamless integration for your fintech applications without requiring major code changes.

What is the maximum character limit per request?

Each request supports up to 4096 characters. If your transaction alert text exceeds this limit, you must split the text into smaller parts. Generate audio for each part separately and then join the resulting audio files to create the final notification.

Which model is better for banking notifications?

Both tts-1 and tts-1-hd use the same engine and price. For banking notifications, choose the voice that best fits your brand tone, such as atlas for neutral news or sage for calm instructions. The model choice does not affect pricing or quality significantly.

Can I adjust the speaking speed?

Yes, you can adjust the speed between 0.25 and 4.0. This allows you to make alerts concise or clear. Faster speeds help reduce character usage for long messages, while slower speeds improve comprehension for complex transaction details in your customer notifications.

How do I handle rate limit errors?

You are limited to 60 requests per minute per key. If you exceed this, implement retry logic with exponential backoff. For indie developers, this is manageable. You can also issue a new key to get a fresh quota if needed, though the old one stops immediately.

What happens if I exceed the 4096 character limit?

The API will reject the request if the input exceeds 4096 characters. You must split your text into chunks of 4096 characters or less. Generate audio for each chunk and concatenate the resulting files to deliver the complete transaction alert to your users.

Is the API compatible with other OpenAI SDKs?

Yes, it uses the same request shape as the OpenAI speech endpoint. You can use the official OpenAI SDKs by updating the base_url to https://api.play77kk.com/v1. This ensures compatibility with standard libraries without requiring a custom client implementation for your fintech stack.

How do I retrieve the list of available voices?

Send a GET request to /v1/voices. This endpoint returns details on all 8 voice presets, supported languages, formats, and pricing. Use this to select the best voice for your specific banking notification type, such as felix for promos or milo for conversational updates.

What formats are available for the audio output?

You can choose from mp3, wav, opus, flac, and pcm. MP3 is efficient for web delivery, while WAV offers high quality. Select the format that best suits your application’s playback requirements. All formats are generated instantly upon successful request completion.

Do I need to install a specific SDK?

No, you do not need a specific SDK. You can use the official OpenAI SDK or plain HTTP requests. This flexibility allows you to integrate the TTS API into any language or framework your fintech app uses, reducing engineering overhead.

How does the language detection work?

If you do not specify a language, the system guesses it from the script. Latin text defaults to English. For non-English Latin text, explicitly set the language parameter. Supported languages include Arabic, Chinese, English, French, German, Spanish, and 18 others.

What is the authorization header format?

Use the header: Authorization: Bearer tts-... with your unique API key. You can find this key on the /get-api-key/ page. Each account has one active key, and issuing a new one immediately invalidates the previous one for security.

Can I send multiple voices in one request?

No, each request specifies a single voice. To use multiple voices, send separate requests for each segment. Join the resulting audio files afterward. This allows you to create dynamic notifications with different tones for different parts of the message.

Are the API endpoints HTTP or HTTPS?

All API endpoints use HTTPS for secure communication. The base URL is https://api.play77kk.com/v1. This ensures your API keys and transaction data are transmitted securely over the internet, which is critical for fintech applications handling sensitive customer information.

First request

curl

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

Authentication and Setup

Sound wave illustration for: Authentication and Setup

Get your LendVoice API key by signing in via Google or email at /get-api-key/. Your dashboard displays your active key, balance, and usage stats immediately.

Generate Your API Key

Generate Your API Key

Navigate to the /get-api-key/ page to create your account. Choose Google sign-in for an instant $0.50 trial credit (valid 7 days) or use email/password for standard access. The dashboard shows your key, balance, and a ready-to-use cURL example.

Bearer Token Authorization

Bearer Token Authorization

Include your key in every request header as Authorization: Bearer tts-.... This single key authenticates all requests to the https://api.play77kk.com/v1 base URL. Ensure the prefix tts- is included exactly as shown in your dashboard.

Key Rotation and Security

Rotate your key anytime from the dashboard. Issuing a new key instantly invalidates the old one, ensuring no overlap or duplicate usage. This allows immediate revocation if a key is exposed, with zero downtime for new requests using the fresh key.

Base URL Configuration

Sound wave illustration for: Base URL Configuration

To integrate LendVoice, configure your SDK’s base URL to https://api.play77kk.com/v1. This ensures all requests route through our endpoint while maintaining compatibility with standard OpenAI SDK clients.

OpenAI SDK Compatibility

Our API mirrors the OpenAI speech endpoint structure. By updating the base URL, you can use official OpenAI SDKs without modifying your code logic, enabling quick deployment for fintech alerts.

Setting the base_url

Set the base_url parameter in your client configuration to https://api.play77kk.com/v1. This directs authentication and speech generation requests to the correct service endpoint for your account.

Endpoint Structure

All API interactions follow a standard RESTful pattern. The primary endpoint POST /v1/audio/speech handles text-to-audio conversion, while GET /v1/voices provides metadata on available presets and languages for your integration.

Speech Generation Endpoint

Sound wave illustration for: Speech Generation Endpoint

The core of LendVoice is the POST /v1/audio/speech endpoint. Send your text payload here to receive synthesized audio files. This endpoint handles the conversion of your notification messages into clear, natural-sounding speech ready for banking alerts.

Ensure your input text does not exceed 4096 characters. For longer transaction details, split the text into chunks and join the resulting audio files on the client side. Each request is processed sequentially, so high-volume alert systems may experience brief queuing delays.

POST /v1/audio/speech

Send a JSON object containing the text, voice, and model parameters. The API returns the audio file directly in the response body.

If synthesis fails, no charge is applied, and you receive an error code. Typical generation speed is roughly real-time for long texts.

  • Endpoint: https://api.play77kk.com/v1/audio/speech
  • Method: POST
  • Content-Type: application/json

JSON Request Body

The request body must include model, input, and voice. Optional fields include response_format, speed, and language.

The input field accepts plain text strings. Spaces and punctuation count toward the 4096-character limit. Use tts-1 or tts-1-hd for the model.

  • model: "tts-1" or "tts-1-hd"
  • input: string (max 4096 chars)
  • voice: one of 8 presets
  • response_format: mp3, wav, opus, flac, pcm
  • speed: 0.25–4.0
  • language: optional ISO code

Response Format

On success, the response body contains the raw audio bytes in the requested format. Set your Accept header or parse the binary response accordingly.

Audio files are generated instantly for short phrases but may queue for longer texts. The response does not store the audio; it is returned directly to your client.

Parameters and Options

Sound wave illustration for: Parameters and Options

The API accepts two model identifiers, tts-1 and tts-1-hd, which utilize the identical synthesis engine and incur the same pricing of $10 per million characters. The distinction lies solely in the audio fidelity; tts-1-hd provides higher quality output suitable for premium banking alerts, while tts-1 offers standard quality at the same cost.

Voice Presets List

Select from eight distinct voice presets optimized for clear, natural-sounding transactional communications. These voices support all 23 available languages, ensuring your fintech notifications sound consistent across global markets. Each voice carries a synthetic watermark to identify generated audio.

  • Female: aria (warm narrator), nova (bright), luna (soft), sage (calm)
  • Male: felix (energetic), milo (friendly), atlas (neutral), orion (deep)

Response Format Options

Specify the output audio format using the response_format field. Choose from mp3, wav, opus, flac, or pcm to match your application’s playback requirements. MP3 and OPUS are ideal for bandwidth efficiency, while WAV and FLAC offer uncompressed quality for local processing.

Model Selection: tts-1 vs tts-1-hd

Both models share the same engine and pricing structure, so you can switch between them without cost implications. Use tts-1-hd for critical customer alerts where clarity is paramount, or tts-1 for high-volume, routine notifications where standard fidelity suffices.

Language and Speed Control

Sound wave illustration for: Language and Speed Control

Language specification ensures precise pronunciation for transactional alerts, while speed control allows you to balance clarity against processing time for your fintech users.

Configure these parameters directly in your API requests to tailor the audio output for specific notification contexts without needing complex post-processing.

Optional ISO Language Code

Set the language field to an ISO 639 code (e.g., 'en', 'de', 'ja') to force a specific language. This is critical when your text uses Latin script but isn't English, as the API defaults to English for Latin text otherwise. Without this, voices may mispronounce non-English terms.

  • Supported languages include 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 23 languages.

Speed Range 0.25 to 4.0

Adjust the speed parameter between 0.25 and 4.0 to control playback rate. Faster speeds reduce generation time but may impact clarity for complex financial data. Slower speeds enhance intelligibility for detailed instructions or warnings.

Typical generation speed is roughly real-time (25 characters per second), so speeding up text can significantly lower latency for bulk notification jobs.

Auto-Detection Fallback

If you omit the language field, the API guesses the language based on the character script. Latin script defaults to English, while Cyrillic or CJK scripts trigger their respective languages.

Use explicit language codes for mixed-language texts or when your Latin-script content includes non-English words to ensure accurate pronunciation.

Language and Speed Control

Error Handling and Limits

Sound wave illustration for: Error Handling and Limits

Manage your integration stability by respecting the 60 requests per minute limit per key. If you are still in the free trial phase, this cap is lower at 10 requests per minute. Exceeding these limits will trigger a 429 error until the window resets.

Rate Limit: 60 Requests Per Minute

The rate limit applies to each API key individually. Since requests are processed sequentially, high-volume usage may queue slightly, but the 60 req/min ceiling remains strict. Monitor your usage dashboard to avoid temporary blocks.

  • Standard keys: 60 requests/minute
  • New trial keys: 10 requests/minute
  • Limits reset every 60 seconds

Character Limit: 4096 Per Request

Each API call accepts a maximum of 4096 characters. For longer banking alerts or transaction notifications, split your text into chunks and concatenate the resulting audio files on the client side. Spaces and punctuation count toward this limit.

Common Error Codes

We return standard HTTP status codes to indicate issues. A 401 error means your Bearer token is invalid or expired. A 429 indicates you have hit the rate limit. If synthesis fails, no charge is applied, but you may receive a 500 error.

  • 401 Unauthorized: Invalid or missing API key
  • 429 Too Many Requests: Rate limit exceeded
  • 400 Bad Request: Invalid JSON or parameters
  • 500 Internal Server Error: Synthesis failure (free)

Code Examples

Sound wave illustration for: Code Examples

Integrate LendVoice into your fintech alerts using standard tools. The API mirrors the OpenAI speech endpoint, allowing you to swap the base URL and start generating transactional audio immediately.

Below are quick examples for Python, cURL, and Node.js to help you prototype and deploy natural-sounding voice notifications for banking customers without heavy engineering overhead.

Python OpenAI SDK Example

Use the official OpenAI SDK by pointing it to our base URL. Pass your Bearer token and select a voice like 'sage' for calm, instructional banking updates.

cURL Command Example

Send a POST request with your text and voice selection. The API returns the audio file directly, allowing you to save it or stream it to your app.

Node.js Fetch Example

Use the native fetch API to send JSON payloads. Ensure you handle the response stream to save the MP3 or WAV file efficiently in your backend.

Voices and Models Endpoint

Sound wave illustration for: Voices and Models Endpoint

Explore your available voice assets and model configurations directly through the API. Use the /v1/voices and /v1/models endpoints to programmatically retrieve the full list of supported parameters, ensuring your integration stays synchronized with available options without hardcoding values.

GET /v1/voices

Returns a list of all 8 voice presets, their associated languages, and supported audio formats. Each voice has a unique ID (e.g., 'aria', 'nova') that you pass in the voice parameter of the speech endpoint. This allows dynamic UI updates where users can select their preferred narrator tone directly from your app.

  • Retrieves all 8 presets: aria, nova, luna, sage, felix, milo, atlas, orion
  • Shows supported languages and formats for each voice
  • Useful for building dynamic voice selection dropdowns in your fintech interface

GET /v1/models

Lists the available model identifiers. Currently, this includes 'tts-1' and 'tts-1-hd', both using the same underlying engine but differing in quality and processing speed. Use this endpoint to verify model availability or to support future model additions without code changes.

  • Returns 'tts-1' and 'tts-1-hd' model identifiers
  • Both models share the same engine and pricing structure
  • Useful for feature flagging or dynamic model selection in your API client

Available Formats and Languages

The /v1/voices endpoint details the supported response formats: mp3, wav, opus, flac, and pcm. It also lists the 23 supported languages, from Arabic to Turkish. Use this data to validate user input before sending requests, ensuring you only attempt synthesis with compatible language-voice combinations.

  • Formats: mp3, wav, opus, flac, pcm
  • 23 languages supported, including English, Spanish, German, Japanese, and Hindi
  • Use this data to validate language codes before API calls

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Your daily balance update has arrived, confirming the successful transfer of funds to your secure account.

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 corpus (OpenSLR 141)
  3. openai-node on GitHub
  4. Creative Commons Attribution 4.0
  5. Python documentation
  6. FFmpeg documentation
  7. OpenAI API reference: create speech
  8. MDN: Web Speech API
  9. Node.js documentation
  10. LibriVox public-domain audiobooks
  11. LibriTTS-R paper (arXiv 2305.18802)
  12. Tether (USDT)

More on this site