Text-to-Speech API Documentation for Developers

By ScribeSound editorial team · Updated 2026-11-18

This guide helps WordPress developers integrate high-quality text-to-speech audio into their blogs using a simple, lightweight API. You will learn how to send text and receive audio files that enhance reader engagement without requiring complex plugins or monthly subscriptions.

We cover authentication, endpoint usage, and parameter tuning, including voice selection and speed control. The documentation also explains how to use the OpenAI SDK by adjusting the base URL, ensuring you can start generating audio for your articles with minimal code changes.

Text-to-Speech API Documentation for Developers

Frequently asked questions

How do I get an API key?

Sign up on the /get-api-key/ page using Google or an email and password. Your account is specific to this site. The dashboard displays your active API key, balance, and usage statistics immediately after registration, allowing you to start making requests right away.

What is the base URL for the API?

The API base URL is https://api.play55win.com/v1. You use this endpoint for all requests, including the main speech generation endpoint and the voices listing endpoint. Ensure your HTTP client is configured to send POST requests to this specific domain for audio synthesis.

Can I use the OpenAI Python SDK?

Yes. Since the request shape matches the OpenAI speech endpoint, you can use the official OpenAI SDKs. Simply change the base_url to https://api.play55win.com/v1 and provide your ScribeSound API key. This allows you to use familiar client libraries without rewriting your integration logic.

How do I set the language explicitly?

Include the language field in your JSON body with an ISO code, such as 'en' or 'de'. While the API guesses the language from the script (defaulting to English for Latin text), explicitly setting it ensures accuracy for non-English Latin-script content like French or German.

What happens if I exceed the rate limit?

You are limited to 60 requests per minute per key. If you exceed this, your requests may queue or fail. New accounts start with a 10 requests per minute limit until the first top-up is processed. Failed requests do not consume your character balance.

Is the API synchronous or asynchronous?

The API is synchronous. You send a POST request and wait for the audio file response. Requests are processed sequentially, so under load, a request may wait in a queue. There is no asynchronous webhook or polling mechanism for completion status.

How do I handle long texts over 4096 characters?

Split your text into parts of up to 4096 characters each. Send separate requests for each part and join the resulting audio files in your application. This ensures each request stays within the character limit while preserving the full content of your article.

Does the API support streaming audio?

No. The API returns the complete audio file in the response body. There is no streaming, WebSocket, or real-time partial audio support. You must wait for the full synthesis to complete before receiving the audio data, which may take a few seconds for short phrases.

Can I use the API with WordPress PHP?

Yes. You can use standard PHP HTTP libraries like cURL or Guzzle to send POST requests to the endpoint. Since the format is standard JSON, you can easily integrate it into your WordPress theme or plugin to generate audio for blog posts dynamically.

How do I check my balance via API?

Balance information is primarily displayed on the /get-api-key/ dashboard page. While the API provides voice and model details, the specific balance and character counts are managed through the account interface. You can also monitor usage statistics directly from your account dashboard.

What is the default voice if none is specified?

If you do not specify a voice, the API uses a default voice (typically 'nova'). You can explicitly choose from the eight available presets: aria, nova, luna, sage, felix, milo, atlas, or orion.

Are there webhooks for long requests?

No. The API is synchronous, so there are no webhooks. You send a request and receive the audio file directly in the response. Long texts are handled by splitting them into multiple requests, each returning its audio file immediately upon completion.

How do I regenerate my API key?

You can issue a new API key at any time from your account dashboard. When you generate a new key, the old one stops working immediately. This allows you to rotate keys securely without any downtime in your service if you update your configuration.

First request

curl

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

Secure your API access with a single bearer token. This key authenticates every request to the ScribeSound engine, ensuring your usage is tracked against your account balance.

API Key Header

Include your key in the Authorization header of every HTTP request. The format is strictly Bearer tts-.... Without this header, the API returns a 401 Unauthorized error.

  • Header name: Authorization
  • Value format: Bearer <your_key>

Bearer Token

Your token is a unique string starting with tts-. It links all generated audio credits directly to your WordPress site’s account. Keep this value private in your code or environment variables.

Key Management

Each account holds one active key. If you suspect it is exposed, you can issue a new key via the dashboard. The old key stops working immediately, so update your WordPress plugin or script promptly.

  • One active key per account
  • Revocation is instant

Speech Endpoint

Sound wave illustration for: Speech Endpoint

To generate audio, send a POST request to https://api.play55win.com/v1/audio/speech. You can use the official OpenAI SDK by changing the base_url to this endpoint, or send a standard HTTP request with your API key in the Authorization header.

The request body is JSON containing the text, voice model, and output format. The API processes the text synchronously, returning the audio file directly in the response body for immediate use in your WordPress posts or blog content.

POST Request

Send a POST request to the /v1/audio/speech endpoint. Ensure your request includes the Authorization: Bearer <your-key> header. The API accepts text up to 4096 characters per request; longer texts must be split into chunks.

JSON Body

The request body must be a valid JSON object. Required fields include model ("tts-1" or "tts-1-hd"), input (your text string), and voice (one of the 8 presets). Optional fields allow you to set response_format, speed, and language.

  • model: "tts-1" or "tts-1-hd"
  • input: string (max 4096 characters)
  • voice: e.g., "nova", "atlas"
  • response_format: mp3, wav, opus, flac, or pcm
  • speed: 0.25 to 4.0
  • language: optional ISO code

Response Format

On success, the API returns the audio file directly in the response body with a Content-Type matching your requested format. Failed requests return a JSON error object and are free, so you won’t be charged for synthesis errors.

Speech Endpoint

Parameters

Sound wave illustration for: Parameters

Configure your synthesis requests by selecting the engine model, choosing one of eight distinct voice presets, and adjusting the playback speed to fit your content style.

Model Selection

Use either tts-1 or tts-1-hd. Both models use the same underlying engine and carry identical pricing, allowing you to switch freely without changing your integration logic.

Voice Presets

Choose from eight licensed voices, including warm narrators like Aria and calm instructors like Sage. Every voice supports all 23 languages; set the language field explicitly for non-English Latin text to ensure accurate pronunciation.

  • Aria: warm, clear narrator
  • Nova: bright, upbeat
  • Luna: soft, storytelling
  • Sage: calm, instructional
  • Felix: energetic, promo
  • Milo: friendly, conversational

Speed Control

Adjust the speed parameter between 0.25 and 4.0 to match the pacing of your blog posts. Slower speeds improve clarity for complex explanations, while faster speeds keep energetic content engaging.

Audio Formats

Sound wave illustration for: Audio Formats

ScribeSound supports five standard audio formats to suit different WordPress use cases. You can select the format that best balances file size and compatibility for your blog’s audio players.

MP3 Support

MP3 is the default and most widely supported format. It offers excellent compression for faster page loads while maintaining clear voice quality, making it ideal for embedding directly into WordPress posts.

WAV Quality

WAV provides uncompressed, high-fidelity audio. Use this format when you need maximum quality for podcasts or archival purposes, though files will be significantly larger than MP3s.

Other Formats

You can also choose Opus, FLAC, or PCM. Opus offers efficient compression, FLAC preserves lossless audio without metadata overhead, and PCM provides raw uncompressed data for specialized processing.

  • mp3
  • wav
  • opus
  • flac
  • pcm

Rate Limits

Sound wave illustration for: Rate Limits

The API enforces a standard rate limit of 60 requests per minute per key. This ensures stable performance for your WordPress content generation pipelines, allowing you to batch-process articles without overwhelming the service during peak publishing hours.

60 Requests Per Minute

Each API key is allowed 60 requests per minute. This limit applies globally to your account, so distribute your requests evenly if you are generating audio for multiple posts simultaneously.

Trial Limits

New accounts with the free trial start with a lower limit of 10 requests per minute. This allows you to test the integration before upgrading your balance.

Burst Handling

Requests are processed sequentially. If you exceed the limit, you will receive a 429 error. Implement exponential backoff in your WordPress plugin to retry automatically without spamming the API.

  • Use standard HTTP 429 responses to trigger retries
  • Cache generated audio to avoid redundant requests
  • Spread large article batches over time
Rate Limits

OpenAI SDK Integration

Sound wave illustration for: OpenAI SDK Integration

You can use the official OpenAI SDKs with ScribeSound by simply pointing them to our API base URL. This allows WordPress developers to leverage familiar libraries without writing custom HTTP clients from scratch.

The only adjustment required is updating the base_url property in your client configuration to https://api.play55win.com/v1. All other request shapes remain identical to the standard OpenAI speech endpoint.

Base URL Change

Update your OpenAI client's base_url to https://api.play55win.com/v1. This ensures all requests route through our TTS infrastructure while maintaining compatibility with existing SDK structures.

No other configuration changes are needed for the endpoint path or JSON body structure.

This approach works for any language supported by the official OpenAI SDKs, including Python, JavaScript, and Go.

Client Setup

Initialize your client with your API key just as you would for OpenAI, but using our base URL.

Ensure your API key starts with tts- and is passed in the Authorization: Bearer header.

The SDK handles authentication automatically when configured correctly.

Code Example

  • Set base_url to https://api.play55win.com/v1
  • Pass your tts-... API key in the authorization header
  • Use the standard audio.speech method with model, input, and voice parameters
  • Receive binary audio data directly in the response

Error Handling

Sound wave illustration for: Error Handling

Errors return standard HTTP codes with a JSON body explaining the issue. Most failures are due to invalid keys, malformed input, or exceeding the character limit.

The API returns full charges only for successful synthesis. Failed requests are free, so you can retry without worrying about billing surprises.

4xx Errors

Client errors include 401 for invalid API keys, 400 for bad JSON or missing fields, and 429 for rate limits. Check the error message to fix the request format or wait before sending more text.

  • 401: Invalid or expired API key
  • 400: Missing required fields like 'model' or 'input'
  • 429: Rate limit exceeded (60 req/min)

5xx Errors

Server errors like 503 indicate temporary overload. Since requests are processed sequentially, high traffic may cause brief delays. These are rare but possible during peak usage.

  • 503: Service Unavailable (temporary overload)
  • 500: Internal Server Error (unexpected issue)

Retry Logic

Implement exponential backoff for 429 and 5xx errors. Retry up to 3 times with increasing delays. Do not retry 400 errors as they indicate a persistent client mistake.

  • Retry 429 and 5xx errors with backoff
  • Do not retry 400 errors
  • Max 3 retries recommended
Error Handling

Voices Endpoint

Sound wave illustration for: Voices Endpoint

The /v1/voices endpoint provides a complete list of available voice presets, their supported languages, and pricing. This allows WordPress developers to dynamically populate audio player dropdowns in their blog posts without hardcoding voice IDs.

You can also query /v1/models to verify the current engine status. Both endpoints return JSON data compatible with standard JavaScript fetch calls, making integration into WordPress themes straightforward.

List Voices

Returns all eight voice presets (Aria, Nova, Luna, Sage, Felix, Milo, Atlas, Orion) with metadata including gender, style description, and supported languages. Each voice supports all 23 available languages.

Use this data to build a user-friendly selection interface in your WordPress plugin, ensuring readers can choose their preferred narrator tone for articles.

  • 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

Language Codes

Returns ISO 639-1 language codes for all 23 supported languages, including English, Spanish, German, Japanese, and Arabic. You can pass these codes in the language parameter to override automatic detection.

If omitted, the API guesses the language from the script, defaulting to English for Latin text. Explicitly setting the language ensures accurate synthesis for non-English Latin-script content.

Model Info

Returns details for tts-1 and tts-1-hd models. Both use the same engine and pricing ($0.01 per 1,000 characters), .

Use this endpoint to dynamically adjust UI labels or pricing displays in your WordPress admin panel based on the selected model tier.

Listen to the 8 voices

Each sample below was generated by this API from the same sentence. Streamline your publishing workflow by integrating reliable hosting solutions with powerful content management systems for seamless performance.

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. OpenAI API reference: create speech
  3. openai-node on GitHub
  4. LibriVox public-domain audiobooks
  5. MDN: Web Speech API
  6. Node.js documentation
  7. ISO 639 language codes
  8. LibriTTS-R paper (arXiv 2305.18802)
  9. Python documentation
  10. TRON developer hub: TRC-20
  11. openai-python on GitHub
  12. Creative Commons Attribution 4.0

More on this site