Quickstart Guide: Integrate TTS API for Menus and PA

By SavorSpeech editorial team · Updated 2026-11-18

This guide helps restaurant teams integrate SavorSpeech’s text-to-speech API for digital menus and internal communications. You will learn how to send text and receive audio files using standard HTTP requests or the OpenAI SDK. We provide concrete steps for configuration, parameter selection, and error handling, ensuring your system works reliably across all 23 supported languages.

Designed for large dining halls, this documentation focuses on practical implementation without unnecessary complexity. You will see exact curl examples, Python and JavaScript SDK setups, and strategies for handling long menu texts. The guide covers authentication, rate limits, and pricing details so you can deploy consistent audio outputs for your staff and customers quickly.

Quickstart Guide: Integrate TTS API for Menus and PA

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.ek7pk.com/v1. You send POST requests to https://api.ek7pk.com/v1/audio/speech for speech generation. This endpoint accepts JSON bodies containing your text, voice selection, and format preferences for generating audio files suitable for digital menus or internal communications.

How do I authenticate?

Include your unique API key in the request header as Authorization: Bearer tts-... . Each account has one active key; issuing a new key immediately invalidates the old one. You can find your key and manage it on the /get-api-key/ page after signing in.

What models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and price. Select the model in your request body. The tts-1-hd option provides higher quality audio for clear digital menu announcements, while tts-1 is optimized for standard internal communications.

Can I use the OpenAI SDK?

Yes, the official OpenAI SDKs work by changing the base_url to https://api.ek7pk.com/v1. Use your site's key for authentication. This allows you to use familiar SDK methods while sending requests to our endpoint, ensuring compatibility with existing code structures used by other developers.

What audio formats are supported?

Supported response formats are mp3, wav, opus, flac, and pcm. Specify your preferred format in the request body. MP3 is efficient for web delivery, while WAV and FLAC offer lossless quality for internal systems. PCM provides raw audio data for specific processing pipelines.

What is the character limit?

Each request supports up to 4096 characters of input text. Spaces and punctuation count toward this limit. For longer texts, split them into parts of 4096 characters or less and join the resulting audio files. This ensures consistent processing and avoids request size errors.

How do I set the language?

Pass the optional language parameter with an ISO code (e.g., en, hi, es). If omitted, the system guesses the language from the script, defaulting to English for Latin text. For non-English Latin-script text, explicitly set the language parameter to ensure accurate pronunciation.

Can I change the speed?

Yes, adjust the speed parameter between 0.25 and 4.0. This allows you to slow down announcements for clarity or speed up internal updates. The speed value is included in your request body alongside the model, voice, and input text parameters.

What happens if I exceed rate limits?

The limit is 60 requests per minute per key. Before the first top-up, the limit is 10 requests per minute. Exceeding the limit may result in delayed processing or errors. Requests are processed sequentially, so high load can cause queuing delays during busy periods.

How are errors returned?

Errors are returned via standard HTTP status codes and JSON error responses. Failed requests are free, with the charge returned in full. You will receive details about the failure reason, allowing you to adjust parameters like text length or voice selection for retry.

Is JSON the only request format?

Yes, the API accepts JSON bodies for requests. The request shape matches the OpenAI speech endpoint. Send your text, voice, model, and format preferences as JSON fields in the POST request to the /v1/audio/speech endpoint for consistent and structured data transmission.

Can I generate audio in real-time?

No, streaming or WebSocket real-time partial audio is not supported. Audio is generated after the full request is processed. Typical speed is roughly real-time for long texts, but short phrases may take a few seconds. Requests are queued under load.

Do I need a custom SDK?

No, you do not need a custom SDK. Use the official OpenAI SDK by changing the base_url, or make plain HTTP requests. Our API follows standard conventions, allowing you to integrate using widely available libraries without requiring proprietary software or additional dependencies.

How do I handle failed requests?

Failed requests are free, with charges returned in full. Check the error response for details on why the synthesis failed, such as invalid parameters or rate limits. Adjust your request body accordingly and retry. No additional cost is incurred for unsuccessful attempts.

First request

curl

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

Sound wave illustration for: Authentication

To access the SavorSpeech API, include your unique API key in every request. Pass it via the Authorization header using the Bearer token scheme: Authorization: Bearer tts-.... This key authenticates your account and tracks usage against your character quota.

Use Bearer token in Authorization header

Use Bearer token in Authorization header

Include the header in all HTTP requests to https://api.ek7pk.com/v1. The format is strictly Authorization: Bearer YOUR_API_KEY. Ensure no extra spaces precede the token value to avoid authentication failures during menu generation or internal broadcasts.

One active key per account

One active key per account

Each SavorSpeech account maintains a single active API key. This key grants access to your balance and usage statistics. You can generate a new key at any time via your dashboard, which immediately invalidates the previous one.

Revoke old keys instantly

Key rotation is immediate. Once you issue a new key, the old one stops working at once. This ensures that if a key is compromised or no longer needed by a specific kitchen display system, access is cut off without delay.

Base URL Configuration

Sound wave illustration for: Base URL Configuration

Configure your API client by pointing the base URL to https://api.ek7pk.com/v1. This single endpoint handles all audio synthesis requests for your digital menus and internal PA systems.

The API uses standard JSON bodies and returns audio files directly, making integration straightforward for existing restaurant tech stacks without requiring proprietary libraries.

You can use the official OpenAI SDKs by simply updating the base_url configuration. This allows you to leverage familiar code structures while accessing our specific voice presets and pricing model.

Set base_url to api.ek7pk.com/v1

Point your HTTP client to https://api.ek7pk.com/v1. This is the single entry point for all speech synthesis operations, including voice selection and audio generation.

Ensure your application routes all POST requests for audio generation to this specific domain to avoid connectivity issues with the legacy provider.

  • Base URL: https://api.ek7pk.com/v1
  • Protocol: HTTPS
  • Format: JSON

Compatible with OpenAI SDKs

The API mirrors the standard OpenAI speech endpoint structure. This means you can use existing OpenAI SDKs for Python or JavaScript by overriding the base_url.

This compatibility reduces development time for restaurant IT teams already familiar with common TTS libraries, allowing for rapid deployment across digital signage networks.

  • Uses standard JSON request bodies
  • Supports Python and JavaScript SDKs
  • Simple base_url override required

Standard HTTP methods

Audio synthesis uses the POST method. Send your text payload to the /audio/speech endpoint to receive an audio file.

Other endpoints like /v1/voices and /v1/models use GET requests to retrieve available voice options and model details.

Standard HTTP status codes indicate success or failure, allowing your system to handle errors gracefully during menu updates.

  • POST for audio synthesis
  • GET for voice and model info
  • Standard HTTP status codes

Required Parameters

Sound wave illustration for: Required Parameters

Your API request must include three core fields: model, input, and voice. These define the synthesis engine, the text content, and the speaker persona. Omitting any of these will result in a validation error before processing begins.

Model: tts-1 or tts-1-hd

Select tts-1 for standard speed and quality, or tts-1-hd for higher fidelity. Both models use the same underlying engine and incur identical pricing. Choose tts-1-hd only if your digital menu boards require noticeably clearer audio for complex dishes or names.

Input: Text up to 4096 characters

The input field accepts your menu item description, price, or announcement as plain text. You can include spaces and punctuation, which count toward the character limit. Each request can process up to 4096 characters; longer texts require splitting into multiple requests.

  • Spaces and punctuation count as characters
  • Maximum length: 4096 characters per request
  • Plain text format only

Voice: Select from 8 presets

Choose one of eight voice presets to match your dining hall’s tone. Female voices like Aria (warm narrator) or Luna (soft storytelling) work well for elegant settings. Male voices like Felix (energetic promo) or Atlas (neutral news) suit fast-paced cafeterias.

  • Aria: Warm, clear narrator
  • Felix: Energetic, promo
  • Atlas: Neutral, news
  • Nova: Bright, upbeat
  • Luna: Soft, storytelling
  • Sage: Calm, instructional
  • Milo: Friendly, conversational
  • Orion: Deep, documentary

Optional Parameters

Sound wave illustration for: Optional Parameters

Optional parameters let you fine-tune the audio output for your digital menus or internal announcements. You can choose the file format, adjust playback speed, and specify the language for precise control over how the speech sounds.

Response format: mp3, wav, opus, flac, pcm

Select the output format that best fits your playback system. MP3 is standard for web players, while WAV or FLAC offers higher quality for local audio systems. PCM is available for raw data processing.

  • mp3: Best for web and general compatibility
  • wav: Lossless, suitable for local audio systems
  • opus: Efficient compression
  • flac: Lossless compressed audio
  • pcm: Uncompressed raw audio data

Speed: 0.25 to 4.0

Adjust the speech rate between 0.25 and 4.0 to match your audience's needs. Slower speeds improve clarity for noisy dining halls, while faster speeds help keep short announcements concise.

  • Default speed is 1.0
  • Min: 0.25 (very slow)
  • Max: 4.0 (very fast)

Language: ISO code for specific languages

Specify the ISO language code to ensure correct pronunciation. If omitted, the system guesses the language, defaulting to English for Latin script. Explicitly setting the language prevents errors for non-English texts.

  • Supported: Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish
  • Not supported: Vietnamese, Indonesian, Thai, Ukrainian, Romanian, Czech, Bengali

Example Request (Curl)

Sound wave illustration for: Example Request (Curl)

The following curl command demonstrates a standard synthesis request. It sends a short menu announcement to the API, receiving an MP3 file in return. This structure works for any voice and language supported by the service.

Ensure your API key is valid and has sufficient balance. The request body includes the model, input text, voice selection, and desired output format.

Basic JSON body structure

Send a POST request with a JSON body. The input field accepts up to 4096 characters. Spaces and punctuation count toward this limit.

Specify the voice preset, such as 'aria' or 'atlas', and choose the response format. The model 'tts-1' or 'tts-1-hd' determines the audio quality.

  • model: "tts-1"
  • input: "Welcome to SavorSpeech."
  • voice: "atlas"
  • response_format: "mp3"

Headers for authorization

Include your API key in the Authorization header. The format is 'Bearer tts-your_key_here'.

Set the Content-Type to application/json to ensure proper parsing of the request body.

Handling the response

A successful response returns an audio file in the specified format. Save this file to your local directory or send it directly to your digital menu system.

If the request fails, check the status code and error message. Failed requests are free and do not charge your balance.

Example Request (Curl)

Example Request (OpenAI SDK)

Sound wave illustration for: Example Request (OpenAI SDK)

Use the official OpenAI SDKs to integrate SavorSpeech quickly. Change the base URL to https://api.ek7pk.com/v1 and provide your API key. This approach works for both Python and JavaScript environments.

The configuration is identical to standard OpenAI clients, ensuring a smooth transition for teams already familiar with these libraries. You can generate audio files using the same code structure.

Python SDK configuration

Install the openai package and initialize the client with your base URL and API key. Use the audio.speech.create method to send your text and receive the audio file.

  • pip install openai
  • from openai import OpenAI
  • client = OpenAI(base_url="https://api.ek7pk.com/v1", api_key="tts-...")
  • response = client.audio.speech.create(model="tts-1", voice="aria", input="Welcome to the restaurant.", response_format="mp3")

JavaScript SDK configuration

Install the OpenAI npm package and configure the client similarly. Pass the base URL and your secret key to initiate requests for menu audio or internal announcements.

  • npm install openai
  • const { OpenAI } = require('openai');
  • const openai = new OpenAI({ baseURL: 'https://api.ek7pk.com/v1', apiKey: 'tts-...' });
  • const audio = await openai.audio.speech.create({ model: 'tts-1', voice: 'nova', input: 'Table 5 is ready.' });

Changing base_url

The critical step is overriding the default base URL. Point your SDK client to https://api.ek7pk.com/v1 to route requests through our TTS engine. This ensures compatibility with standard OpenAI endpoints.

Handling Long Texts

Sound wave illustration for: Handling Long Texts

For digital menus or PA announcements exceeding 4,096 characters, you must split the text into smaller chunks before sending them to the API. Each request generates a separate audio file, so your application needs to handle multiple synthesis tasks in sequence rather than relying on a single call.

After receiving the individual audio files, your system should join them sequentially to create one continuous playback file. This approach ensures that long texts, such as daily specials or internal comms, are delivered without hitting character limits while maintaining a consistent listening experience for your staff or customers.

Split text into 4096 char chunks

Break your input text into segments of up to 4,096 characters. Each segment is sent as a separate POST request to the /v1/audio/speech endpoint. Since requests are processed one after another, longer texts may take time due to queueing, so plan your integration accordingly.

  • Count spaces and punctuation as characters.
  • Ensure each chunk is under 4,096 characters.
  • Send each chunk as an independent request.

Join audio files sequentially

The API returns a distinct audio file for each request. Your application must download these files and concatenate them in the exact order of the original text. This creates a single, continuous audio file suitable for digital menus or announcement systems.

Manage memory efficiently

When handling many chunks, avoid loading all audio files into memory at once. Process and join files in small batches to prevent memory exhaustion on your server. This is especially important for large restaurant teams generating content for multiple locations simultaneously.

Rate Limits and Errors

Sound wave illustration for: Rate Limits and Errors

Your API key supports a maximum of 60 requests per minute once your account is active. This limit applies collectively to all devices and systems using the same key, ensuring stable performance for your digital menus and internal announcements without unexpected throttling during peak service hours.

60 requests per minute per key

The 60 requests per minute limit ensures consistent audio generation for your entire restaurant team. Since each key is unique to your account, any device or integration using that key contributes to this shared quota. Plan your batch jobs and live menu updates accordingly to avoid temporary delays.

10 requests per minute initially

New accounts start with a lower limit of 10 requests per minute. This initial threshold applies before your first top-up is processed. Once you add funds via USDT (TRC-20), your limit automatically increases to the standard 60 requests per minute.

Common error codes

Errors typically indicate authentication issues, invalid parameters, or rate limit exhaustion. Failed synthesis requests are free, so a charge is not applied if the audio generation fails. Check your key format and ensure the text length does not exceed 4096 characters per request.

  • 401 Unauthorized: Invalid or expired API key.
  • 429 Too Many Requests: Exceeded the per-minute limit.
  • 400 Bad Request: Invalid input or missing required fields.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Digital menus require reliable audio that updates instantly when prices change.

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. Creative Commons Attribution 4.0
  3. TRON developer hub: TRC-20
  4. FFmpeg documentation
  5. W3C WAI: making audio and video accessible
  6. LibriTTS-R paper (arXiv 2305.18802)
  7. IETF RFC 7845: Ogg Opus
  8. ISO 639 language codes
  9. curl documentation
  10. openai-python on GitHub
  11. Tether (USDT)
  12. openai-node on GitHub

More on this site