API Documentation for Museum Audioguide Integration

By MuseumVoice editorial team · Updated 2026-11-18

This documentation provides the technical specifications for integrating MuseumVoice’s text-to-speech API into museum audioguide systems. It covers authentication, request structures, and response formats necessary for converting tour scripts and exhibit descriptions into natural-sounding audio files. The guide is designed for tourism agencies and curators who need reliable, multilingual audio content without hiring voice actors.

You will find clear instructions for using cURL or the official OpenAI SDKs to generate speech files. Details on available voices, supported languages, rate limits, and error handling are included to help you build a robust integration. All endpoints and parameters are described with concrete examples to ensure smooth implementation.

API Documentation for Museum Audioguide Integration

Frequently asked questions

How do I get an API key?

Sign up on the /get-api-key/ page using Google or email and password. Accounts are per site. The page displays your active API key, balance, and usage statistics. You can issue a new key at any time, which immediately invalidates the old one.

Can I use the OpenAI Python SDK?

Yes. The endpoint matches the OpenAI speech endpoint shape. Change the SDK's base_url to https://api.play8999bet.com/v1 and use your site’s key. The official OpenAI SDKs work directly by changing the base_url. This allows you to use familiar code structures for generating audio from text inputs efficiently.

What is the maximum text length per request?

The input field accepts up to 4096 characters per request. This limit includes spaces and punctuation. If your text exceeds this, you must split it into smaller parts. Each part generates a separate audio file that you can join later. Short phrases may take a few seconds to process.

How do I handle long tour scripts?

Split your script into chunks of up to 4096 characters. Send each chunk as a separate POST request. Join the resulting audio files to create the final guide. Typical speed is roughly real time, so long texts take approximately as long as their audio duration to generate.

What happens if the API returns an error?

Failed requests are free. If synthesis fails, the charge is returned in full. You can retry the request without incurring additional costs. Requests are processed one after another, so under load a request may wait in a queue. Check the status code for details.

Do I need to install any specific libraries?

No specific library is required. You can use plain HTTP requests or the official OpenAI SDK. No custom SDK or mobile library is provided. Standard HTTP clients in any language work. Just ensure you send the correct JSON body and authorization header to the endpoint.

Can I change the voice mid-sentence?

No. Each request generates audio for a single voice preset. You cannot change the voice mid-sentence within one request. To switch voices, you must split the text into separate requests, each specifying the desired voice. Join the resulting audio files to maintain continuity in the final output.

Is the API synchronous or asynchronous?

The API is synchronous. You send a POST request and receive the audio file in the response. Requests are processed one after another, so under load, a request may wait in a queue. There is no streaming or WebSocket support.

How do I set the language explicitly?

Include the language field in the JSON body with an ISO code. If omitted, the language is guessed from the script, defaulting to English for Latin text. Explicitly setting the language ensures correct pronunciation for non-English texts, such as Arabic, Chinese, or Japanese, which might otherwise be misidentified.

Can I use the API from a mobile app?

Yes. The API is accessible via standard HTTP requests from any environment, including mobile apps. There is no dedicated mobile SDK, but you can use any HTTP client. Ensure you manage your API key securely within the app. The rate limit applies per key, regardless of the client.

What is the response format for errors?

The API returns standard HTTP status codes indicating success or failure. Failed requests are free, and charges are returned. The response body contains details about the error. Use the status code to determine if you should retry the request or if it was a permanent failure.

Do I need to handle retries manually?

Yes, implement retry logic in your application. Requests are processed one after another, so under load a request may wait in a queue. If a request fails, it is free, so you can retry without cost. Ensure your client handles timeouts and transient errors gracefully to maintain smooth audio generation.

Can I use the API in a serverless environment?

Yes. The API works with any HTTP client, including serverless functions. There are no special requirements for serverless deployments. Just ensure you handle the request processing and manage rate limits. You can split long texts into chunks to fit within the 4096-character limit per request.

How do I track my usage and costs?

Check the /get-api-key/ page for your balance, characters left, and usage history. Request metadata, including time, characters, and status, is kept for billing. Costs are $0.01 per 1,000 characters. Failed requests are free. You can view your current balance and usage statistics directly on the account page.

First request

curl

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

Authentication for the MuseumVoice API relies on a single active API key per account. You can generate your key directly on the /get-api-key/ page by signing in with Google or creating an email-based account. The dashboard displays your current key, balance, and usage statistics immediately after creation.

Generate API key on /get-api-key/

Generate API key on /get-api-key/

Navigate to the /get-api-key/ page to create your account. You may authenticate via Google or standard email registration. Once registered, the interface provides immediate access to your unique API key and current balance details.

Use Bearer token in Authorization header

Use Bearer token in Authorization header

Include your API key in the HTTP header for every request. Format the header exactly as: Authorization: Bearer tts-.... This token authenticates your account and tracks character consumption against your balance.

One active key per account

Each account maintains only one active API key at any time. If you issue a new key, the previous one becomes invalid immediately. This ensures secure access control for your museum audio projects.

Quickstart with cURL

Sound wave illustration for: Quickstart with cURL

Generate museum audio guides by sending a POST request to our API endpoint. This method allows you to convert tour scripts directly into audio files suitable for audioguide devices or mobile applications.

The process is straightforward: provide your text, select a voice model, and receive the synthesized audio in your preferred format. This workflow supports rapid prototyping for exhibit descriptions.

You can test the integration immediately using standard command-line tools without needing complex SDK installations. The API handles all synthesis logic on our cloud servers.

Send POST request to /v1/audio/speech

Direct your requests to https://api.play8999bet.com/v1/audio/speech. Use the Authorization: Bearer header with your API key to authenticate.

The endpoint accepts JSON payloads containing your input text and configuration parameters. Ensure your text does not exceed 4096 characters per request.

  • Endpoint: POST https://api.play8999bet.com/v1/audio/speech
  • Content-Type: application/json
  • Header: Authorization: Bearer tts-...

Include model, input, and voice parameters

Specify model as either tts-1 or tts-1-hd. Both use the same engine and price. Provide the input field with your tour script text.

Select a voice from the eight available presets. You can optionally set the language ISO code if the script language is not clear from the text.

The speed parameter ranges from 0.25 to 4.0, allowing you to adjust playback speed for different audience needs, such as slow narration for elderly visitors.

Receive audio file in response

The API returns the audio file directly in the response body. You can specify the format using the response_format field, choosing between mp3, wav, opus, flac, or pcm.

For longer scripts, split the text into chunks of 4096 characters and concatenate the resulting audio files. Typical speed is roughly real time on long texts (about 25 characters per second); short phrases take a few seconds.

Failed requests incur no charge, and the response will indicate any errors. Ensure your client handles the binary audio data correctly for storage or playback.

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

Leverage the official OpenAI SDKs by simply adjusting the base_url configuration to point to our API endpoint. This approach allows tourism agencies to reuse existing integration code with minimal changes, ensuring a smooth transition for teams already familiar with the standard speech-to-audio workflow.

Change base_url to our endpoint

Configure your SDK client to use https://api.play8999bet.com/v1 as the base URL. This directs all requests to our infrastructure while maintaining the standard request shape expected by the OpenAI library.

Use official OpenAI SDKs

You can utilize any official OpenAI SDK (Python, Node.js, etc.) without needing a custom wrapper. The endpoint compatibility ensures that standard methods for generating audio work immediately upon configuration.

Pass your API key as usual

Include your unique API key in the Authorization: Bearer <key> header, just as you would for other services. Retrieve your key from the /get-api-key/ dashboard to authenticate your museum guide audio requests.

Request Parameters

Sound wave illustration for: Request Parameters

For museum audio guides, consistency and clarity are critical. This API accepts text input up to 4,096 characters per request, ensuring detailed exhibit descriptions or tour scripts are processed accurately. Each request generates a single audio file, maintaining seamless playback for visitors.

model: tts-1 or tts-1-hd

Select tts-1 for standard processing or tts-1-hd for higher fidelity audio. Both models use the same engine and pricing structure, allowing you to upgrade quality without changing your integration logic. The API handles synthesis internally, returning ready-to-play audio files.

input: text up to 4096 characters

Pass your tour script or exhibit text in the input field. The limit is 4,096 characters per request, including spaces and punctuation. For longer scripts, split the text into chunks and join the resulting audio files. This approach ensures stable generation times and prevents timeouts during high-volume periods.

  • Spaces and punctuation count toward the 4,096 character limit.
  • Generate multiple files for scripts exceeding the limit.
  • Join audio files sequentially for continuous playback.

voice: one of 8 preset voices

Choose from eight preset voices to match your institution's tone. Female voices include Aria (warm narrator), Nova (upbeat), Luna (soft storytelling), and Sage (calm instruction). Male options are Felix (energetic), Milo (conversational), Atlas (neutral news), and Orion (deep documentary). Each voice supports 23 languages, allowing consistent branding across multilingual exhibits.

  • Aria: Warm, clear narrator.
  • Luna: Soft, storytelling tone.
  • Atlas: Neutral, news-style delivery.
  • Orion: Deep, documentary style.

Response Formats

Sound wave illustration for: Response Formats

Select the response_format parameter to define how the synthesized audio is delivered. The API supports multiple standard formats to suit different playback environments and storage requirements for your museum guides.

Choose the format that best balances file size and quality for your specific use case, whether it is web playback or archival storage.

mp3: compressed audio

MP3 is the recommended format for web delivery and mobile applications. It offers a good balance between file size and audio quality, ensuring fast loading times for audioguide players without significant loss of clarity.

  • Ideal for web players and mobile apps
  • Smallest file size for efficient bandwidth usage
  • Universal compatibility with most audio devices

wav: lossless quality

WAV provides uncompressed, high-fidelity audio. This format is suitable for professional audio editing or high-end playback systems where bit-perfect accuracy is required. Note that WAV files are significantly larger than MP3.

  • Uncompressed PCM audio
  • Best for professional editing workflows
  • Larger file size than MP3

flac: archival quality

FLAC (Free Lossless Audio Codec) offers lossless compression, preserving all audio data while reducing file size compared to WAV. It is ideal for long-term archival of tour scripts and exhibit descriptions.

  • Lossless compression
  • Smaller than WAV, larger than MP3
  • Perfect for preserving original audio quality
Response Formats

Rate Limits and Quotas

Sound wave illustration for: Rate Limits and Quotas

Your API key allows 60 requests per minute during normal operation. This limit applies to all endpoints and ensures fair usage across the network. If you generate long audioguide segments that require splitting, each part counts as a separate request toward this quota.

60 requests per minute

Standard accounts can process up to 60 synthesis jobs each minute. This throughput supports most museum tour scripts without significant queuing. For very long exhibits, split your text into chunks under 4096 characters to manage processing time effectively.

  • Applies to all requests
  • Counts per API key
  • Supports concurrent processing

10 requests per minute initially

New accounts start with a lower limit of 10 requests per minute. This applies immediately after account creation or key generation. It allows you to test integration without exceeding capacity during early development phases.

Limits increase after top-up

Rate limits increase after a new top-up is credited to your account. Sending USDT via TRC-20 triggers this change automatically within minutes. Once credited, your quota rises to the standard 60 requests per minute, allowing sustained production of audio guides.

  • TRC-20 USDT only
  • Automatic credit
  • No manual review

Error Handling

Sound wave illustration for: Error Handling

When integrating museum audio guides, handling API errors ensures your playback system remains stable during user tours. Our API returns standard HTTP status codes to indicate specific failure modes, allowing your application to retry or alert staff appropriately without interrupting the visitor experience.

Understanding these responses helps you manage queue delays and credential issues efficiently, ensuring that exhibit descriptions load reliably even under varying network conditions or high demand periods.

400 for invalid parameters

A 400 Bad Request indicates that the JSON body contains incorrect fields, such as an unsupported voice name or text exceeding the 4096-character limit. Ensure your payload matches the required structure before sending.

Check that the model is either tts-1 or tts-1-hd, and that the voice parameter matches one of the eight available presets.

  • Verify text length does not exceed 4096 characters.
  • Confirm model is 'tts-1' or 'tts-1-hd'.
  • Ensure voice is one of the eight supported presets.

401 for invalid key

This error occurs when the Authorization header contains an incorrect or expired Bearer token. Since each account has one active key, ensure you are using the correct key generated on /get-api-key/.

If you issued a new key, the old one stops immediately. Update your configuration to use the current active key.

  • Check the Authorization header format.
  • Verify the key matches your account's current active key.

429 for rate limit exceeded

You receive a 429 status when exceeding 60 requests per minute (or 10 per minute for new accounts). This often happens when generating many short exhibit descriptions quickly.

Implement exponential backoff in your client to wait before retrying. Rate limits reset after a new top-up is credited to your account.

  • Limit to 60 requests/minute (10 for new accounts).
  • Implement exponential backoff on retry.
  • Wait for top-up credit to increase limits.

Available Voices

Sound wave illustration for: Available Voices

Select the voice that best fits your exhibit's tone. Our eight presets cover a range of styles from warm narration to deep documentary, ensuring your audio guides sound professional and consistent across all languages.

Each voice is derived from licensed recordings, providing a natural listening experience for museum visitors without the need for hiring multiple voice actors.

Female: aria, nova, luna, sage

Aria offers a warm, clear narrator style ideal for historical tours. Nova provides a bright, upbeat tone for interactive exhibits. Luna delivers a soft, storytelling voice suitable for immersive experiences. Sage is calm and instructional, perfect for detailed exhibit descriptions.

These female presets allow you to match the emotional weight of your content precisely.

  • aria: warm, clear narrator
  • nova: bright, upbeat
  • luna: soft, storytelling
  • sage: calm, instructional

Male: felix, milo, atlas, orion

Felix is energetic and ideal for promotional content or quick highlights. Milo offers a friendly, conversational tone for general information. Atlas provides a neutral, news-style delivery for factual data. Orion features a deep, documentary voice for serious historical contexts.

Choose the male voice that aligns with your curatorial vision.

  • felix: energetic, promo
  • milo: friendly, conversational
  • atlas: neutral, news
  • orion: deep, documentary

All voices support 23 languages

Every voice can speak any of our 23 supported languages, allowing you to standardize audio production across international branches. Set the language parameter explicitly for non-English Latin-script text to ensure accurate pronunciation.

This flexibility ensures consistent brand voice regardless of the visitor's location.

  • Arabic, Chinese, Danish, Dutch, English, Finnish, French, German, Greek, Hebrew, Hindi, Italian, Japanese, Korean, Malay, Norwegian, Polish, Portuguese, Russian, Spanish, Swahili, Swedish, Turkish

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Transform static exhibits into immersive journeys for your agency's discerning global travelers.

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. LibriVox public-domain audiobooks
  3. Python documentation
  4. MDN: Web Speech API
  5. ISO 639 language codes
  6. FFmpeg documentation
  7. Node.js documentation
  8. TRON developer hub: TRC-20
  9. OpenAI API reference: create speech
  10. LibriTTS-R paper (arXiv 2305.18802)
  11. curl documentation
  12. IETF RFC 7845: Ogg Opus

More on this site