API Documentation for In-Car Audio Generation

By WaySpeech editorial team · Updated 2026-11-19

This page provides the exact technical details for integrating WaySpeech’s text-to-speech API into your in-car navigation and infotainment systems. You will find clear examples for generating natural-sounding audio prompts for directions, alerts, and media updates using standard HTTP requests or the OpenAI SDK.

Designed for automotive product teams, this documentation covers everything from key rotation to voice selection. We focus on reliable, concrete integration steps so you can generate human-like speech without managing enterprise contracts or complex infrastructure.

Whether you need crisp navigation instructions or engaging media voices, our API delivers consistent results. You can start immediately with a free trial or scale up with USDT top-ups. Let’s get your audio pipeline running.

API Documentation for In-Car Audio Generation

Frequently asked questions

What is the base URL for the API?

The API base URL is https://api.59h.info/v1. You use this endpoint for all requests, including speech synthesis and voice listing. This structure allows you to use standard HTTP clients or the OpenAI SDK by simply adjusting the base URL configuration in your integration setup.

Do I need the OpenAI SDK?

No, you do not need the OpenAI SDK. You can use any standard HTTP client to send POST requests. The OpenAI SDK is optional and works only if you change its base_url to our endpoint. Plain HTTP requests are fully supported for all operations.

How do I authenticate requests?

Include your API key in the Authorization header as a Bearer token. The format is: Authorization: Bearer tts-... . Each account has one active key. If you rotate your key, the old one stops immediately, so ensure your navigation system updates the token promptly.

What models are available?

Two models are available: tts-1 and tts-1-hd. Both use the same engine and price. You select the model in the request body. The choice affects audio quality but not the cost per character or the available voices and formats supported by the underlying synthesis engine.

Can I use the tts-1-hd model?

Yes, tts-1-hd is available and uses the same engine and pricing as tts-1. It costs $10 per 1 million characters. Use this model if you prefer its specific audio characteristics. The request structure remains identical to the standard model, requiring only a model field change.

How do I select a voice?

Select from eight presets: aria, nova, luna, sage, felix, milo, atlas, or orion. Pass the voice name in the request body. Each voice has a distinct tone, from warm narrators to deep documentary styles. You can also optionally specify a language code to guide the synthesis.

What audio formats are supported?

Supported formats are mp3, wav, opus, flac, and pcm. Specify your preferred format in the response_format field. MP3 and WAV are common for in-car systems. Opus offers efficient compression, while FLAC provides lossless quality. PCM is available for raw audio processing needs.

What is the rate limit?

The limit is 60 requests per minute per key. Before the first top-up, it is 10 requests per minute. This applies to your single active key. Monitor your usage to ensure smooth navigation prompt generation, especially during high-frequency alert scenarios in your infotainment system.

What happens if I exceed the rate limit?

Requests are processed sequentially, so exceeding limits may cause queuing delays. Failed requests are free. If synthesis fails, the charge is returned. Ensure your system handles HTTP 429 errors gracefully and retries after a short delay to maintain smooth audio playback in the vehicle.

How do I handle errors?

Check the HTTP status code. Failed requests are free, and charges are returned in full. Monitor response bodies for error details. Implement retry logic for transient issues. Since requests are queued under load, allow for variable latency. Log errors for debugging integration issues with your navigation backend.

Can I rotate my API key?

Yes, you can issue a new key at any time. The old key stops immediately upon rotation. This ensures security if a key is compromised. Update your navigation system’s configuration promptly to use the new key. Accounts are per site, so manage keys within your 59h.info dashboard.

Is the key per account or per project?

The key is per account. Each account has one active key. You can rotate it to generate a new one. There are no separate keys for different projects within the same account. Manage all usage and billing through the single account associated with your API key.

Do I need to install extra libraries?

No extra libraries are required. You can use standard HTTP clients like curl, Python requests, or JavaScript fetch. The OpenAI SDK is optional. No official SDK or mobile SDK is provided. Just send a POST request with the correct JSON body and authentication header.

Is the API endpoint POST or GET?

The speech synthesis endpoint is POST. Use POST https://api.59h.info/v1/audio/speech. GET requests are used for listing voices and models at /v1/voices and /v1/models. Always use POST for generating audio, passing your text, voice, and format parameters in the JSON request body.

First request

curl

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

Accessing the WaySpeech API requires a valid bearer token. You can obtain one by signing up directly on this site. The process is straightforward: create an account, generate your key, and start making requests immediately without waiting for approval or setting up enterprise contracts.

Once you have your key, you can authenticate your requests to the API base URL. This key allows you to generate navigation prompts, alerts, and infotainment audio for your in-car applications.

Sign Up with Google

Sign Up with Google

The fastest way to get started is by signing up with your Google account. This method automatically grants you a free trial credit of $0.50, which covers approximately 50,000 characters of text-to-speech generation. The trial is valid for seven days, giving you time to test the integration with your navigation software.

  • Instant account creation via Google OAuth
  • Automatic $0.50 trial credit
  • No credit card required upfront

Create Account

Create Account

If you prefer not to use Google, you can create an account with an email address and a password. Accounts created this way do not receive the trial credit. You will need to top up your balance using USDT on the TRON network (TRC-20) before you can make your first request. Minimum top-up is $5.

  • Email and password option
  • No trial credit included
  • Balance topped up via TRC-20 USDT

Copy Key

After creating your account, navigate to the dashboard to view your unique API key. Copy this key and use it in the Authorization: Bearer header of your API requests. You can issue a new key at any time; the old one will stop working immediately, ensuring security if needed.

  • View key in the dashboard
  • Copy and paste into header
  • Rotate keys anytime for security

Authentication

Sound wave illustration for: Authentication

Authentication is handled via a single active API key per account. You generate this key on the /get-api-key/ page after signing in with Google or creating an email account. The key identifies your account for billing and rate limiting purposes.

To use the API, you must include the key in every request. This ensures that usage is tracked accurately against your balance. If you lose access or suspect a leak, you can issue a new key immediately.

Bearer Token

Include your API key as a Bearer token in the Authorization header. This is the standard method for authenticating REST API requests. The system validates the token before processing synthesis, ensuring only authorized accounts can generate audio.

Each account holds one active key. Unlike some services that support multiple keys, we simplify tracking by allowing only one active credential at a time.

  • Format: Bearer tts-<your-key>
  • Single active key per account
  • Validates billing and limits

Header Format

Set the Authorization header exactly as shown below. Replace <your-key> with the string starting with tts- from your dashboard. Do not include extra spaces or quotes around the token value.

Incorrect formatting will result in a 401 Unauthorized error, and no characters will be deducted from your balance since the request fails before processing.

  • Authorization: Bearer tts-abc123xyz
  • No extra whitespace
  • Case-sensitive key value

Key Rotation

You can generate a new API key at any time from your account dashboard. When you issue a new key, the previous one stops working immediately. There is no overlap period.

This is useful if you suspect your key was exposed or if you want to rotate credentials periodically. Any requests made with the old key after rotation will fail without charge.

  • Old key stops immediately
  • New key issued instantly
  • No downtime during rotation

Base URL and SDK Setup

Sound wave illustration for: Base URL and SDK Setup

Our API mirrors the standard OpenAI speech endpoint structure, allowing you to use familiar OpenAI SDKs by simply pointing them to our infrastructure. This means you can integrate high-quality navigation audio into your infotainment system without rewriting your entire codebase.

OpenAI SDK Compatible

You can leverage the official OpenAI Python or Node.js libraries, which already handle the underlying HTTP requests efficiently. This compatibility reduces the learning curve for teams already accustomed to OpenAI’s interface.

  • Use standard OpenAI SDKs for seamless integration.
  • Leverage existing code structures with minimal changes.

Change Base URL

To route your requests to WaySpeech, update the SDK configuration to use https://api.59h.info/v1 as the base URL. Ensure your API key is passed in the Authorization header as Bearer tts-....

Standard Methods

Send a POST request to /v1/audio/speech with your JSON payload containing the model, voice, and input text. The API returns the generated audio file directly in the response.

Speech Endpoint Details

Sound wave illustration for: Speech Endpoint Details

The core of WaySpeech is the speech endpoint, which converts your navigation text into audio. You send a request to the API, and it returns the generated sound file directly. This simple flow fits easily into your car’s infotainment system or navigation software.

Use the standard POST method to submit your parameters. The API expects a JSON payload containing the text, voice selection, and desired audio format. If the synthesis fails, you are not charged for that attempt.

POST Method

Send requests to the endpoint using the HTTP POST method. This is the standard way to submit data for processing. The API processes requests sequentially, so under heavy load, a request might wait in a queue before generating.

  • Method: POST
  • Endpoint: /v1/audio/speech
  • Content-Type: application/json

JSON Body

Structure your request as a JSON object. The body includes the text to speak, the voice preset, and the output format. You can also adjust the playback speed between 0.25 and 4.0 times normal speed.

  • input: The text string (max 4096 chars)
  • voice: One of the 8 available presets
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: Float between 0.25 and 4.0

Required Fields

Every request must include the model identifier, the input text, and the voice ID. The model determines the quality tier, while the input contains the actual navigation instructions. The voice ID selects the specific tone for your prompts.

  • model: "tts-1" or "tts-1-hd"
  • input: Your navigation text
  • voice: Voice preset ID

Supported Models

Sound wave illustration for: Supported Models

Both models use the same underlying synthesis engine, so audio quality is consistent regardless of which you choose. The primary difference lies in the billing rate applied to your character count.

tts-1 Standard

The standard model is optimized for speed and cost-efficiency. It delivers natural-sounding navigation prompts and alerts quickly, making it ideal for real-time directions where latency matters.

  • Cost: $0.01 per 1,000 characters

tts-1-hd

The high-definition model uses the same engine and incurs the same charge. Choose this when audio fidelity is prioritized over speed, such as for premium infotainment messages or detailed media descriptions.

  • Cost: $0.01 per 1,000 characters

Same Engine

Since both options share the same voice presets and capabilities, you can switch between them dynamically via the model field in your API request. This allows you to balance quality and cost based on the context of each navigation instruction.

Supported Models

Voice Selection

Sound wave illustration for: Voice Selection

Choosing the right voice is critical for in-car usability. Our eight presets are designed for clarity and natural flow, ensuring drivers remain engaged without cognitive overload. Each voice is derived from licensed recordings, providing a consistent, human-like quality for navigation prompts and alerts.

Selecting a voice that matches your brand’s tone helps maintain a cohesive user experience. Whether you need a calm narrator for long directions or an energetic tone for media updates, our API makes it easy to switch voices on the fly.

8 Presets Available

We offer eight distinct voice presets, each crafted for specific use cases in automotive environments. From warm narrators to neutral news anchors, you have full control over how your audio content sounds to the driver.

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

Male and Female Options

Our voices span a range of tones to suit different narrative styles. Female voices like Aria and Luna offer warmth and clarity, while male voices like Atlas and Orion provide neutrality or depth. Mix and match to create dynamic audio experiences.

All voices support all 23 languages, allowing you to localize content without losing voice consistency. If the language isn't specified, the system guesses from the script, defaulting to English for Latin text.

Voice IDs

Use the exact voice ID strings in your API requests to select your desired speaker. The list below maps each preset to its corresponding ID for easy integration.

You can test different voices using our API key dashboard to find the best fit for your navigation system.

  • aria
  • nova
  • luna
  • sage
  • felix
  • milo
  • atlas
  • orion

Audio Formats

Sound wave illustration for: Audio Formats

Your TTS API returns audio in five distinct formats, allowing your automotive team to balance file size, compatibility, and quality. The default output is MP3, which is universally supported by in-car infotainment systems and requires minimal bandwidth for navigation prompts.

MP3 Support

MP3 is the standard choice for most navigation instructions. It provides a good balance between audio clarity and file size, ensuring quick playback even on slower cellular connections inside vehicles.

WAV Support

Select WAV for uncompressed, high-fidelity audio. This format is ideal for local storage or systems that prefer raw PCM data without compression artifacts, though it results in larger file sizes.

Opus and FLAC

Opus offers efficient compression, while FLAC provides lossless quality for archival purposes. Both are available if your specific hardware or software pipeline requires these specific codec standards.

Rate Limits and Errors

Sound wave illustration for: Rate Limits and Errors

Generation requests are processed sequentially, meaning under load a request may wait in a queue. Typical speed is roughly real-time, but short phrases may take a few seconds to synthesize.

Understanding these limits helps ensure smooth navigation audio playback without interrupting the driver's experience during critical directions or alerts.

60 Requests Per Minute

Each API key allows 60 requests per minute. Before your first top-up, this limit drops to 10 requests per minute.

Exceeding the limit results in a rate limit error, ensuring fair usage across all automotive product teams using the platform.

Queue Handling

Requests are processed one after another. If the service is busy, your request may wait in a queue.

Longer texts are split into parts of up to 4096 characters, and the resulting audio files are joined seamlessly.

Plan your integration to handle potential delays, especially during peak usage times or when generating long navigation instructions.

Error Codes

Failed requests are free, and the charge is returned in full if synthesis fails.

Common errors include invalid API keys, malformed JSON, or exceeding the character limit.

Always check the response status code to determine if the audio was generated successfully.

  • 401: Invalid API key
  • 400: Malformed request or invalid parameters
  • 429: Rate limit exceeded
  • 500: Internal server error

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. This guide breaks down the three core dimensions of voice design: tone and pace, clarity and pitch, and emotional range.

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. Python documentation
  4. OpenAI API reference: create speech
  5. Creative Commons Attribution 4.0
  6. IETF RFC 7845: Ogg Opus
  7. FFmpeg documentation
  8. ISO 639 language codes
  9. MDN: Web Speech API
  10. curl documentation
  11. LibriVox public-domain audiobooks
  12. openai-python on GitHub

More on this site