Cloud Text-to-Speech API for Developers and Teams

By EasyVoice editorial team · Updated 2026-11-19

This documentation provides the technical specifications for the EasyVoice cloud text-to-speech API, designed for developers integrating synthetic audio into educational and accessibility applications. You will find precise details on generating audio files from script text using standard JSON requests, including configuration for models, voices, and output formats.

The guide covers essential integration steps, including authentication via Bearer tokens, endpoint structures, and rate limit constraints. It also outlines billing mechanics for failed requests and provides concrete examples for cURL, Python, and OpenAI SDK implementations. This resource is intended for technical users who need reliable, non-streaming audio generation without custom voice cloning or SSML support.

Cloud Text-to-Speech API for Developers and Teams

Frequently asked questions

How do I get an API key for the voice over service?

Navigate to the /get-api-key/ page and sign up using Google or an email and password combination. The interface displays your active API key, current balance, and usage statistics. Each account maintains one active key, which can be regenerated at any time to invalidate the previous credential immediately.

What is the base URL for the OpenAI SDK?

The API base URL is https://api.5567.info/v1. To utilize the official OpenAI SDKs, configure the client to use this base URL instead of the default OpenAI endpoint. This allows standard SDK methods to interact directly with the EasyVoice text-to-speech service without requiring custom HTTP implementations.

Can I use the official OpenAI SDKs with this API?

Yes, the request shape matches the OpenAI speech endpoint. By changing the base URL to https://api.5567.info/v1, the official OpenAI SDKs function correctly. This enables seamless integration for developers already familiar with the OpenAI ecosystem, requiring only a configuration adjustment to point to the EasyVoice infrastructure.

What is the maximum input length for a single request?

Each API request supports a maximum input of 4096 characters. If your script exceeds this limit, you must split the text into smaller parts. Generate audio for each segment individually and then join the resulting audio files to create the final output for longer documents or presentations.

How do I specify the voice for the narration?

Include the voice parameter in your JSON body with one of the eight available presets. Options include female voices like aria, nova, luna, and sage, or male voices such as felix, milo, atlas, and orion. Select the preset that best matches the tone required for your educational or accessibility content.

What happens if I exceed the rate limit?

The API allows 60 requests per minute per key, or 10 per minute before the first top-up. Requests are processed sequentially, so exceeding the limit may cause your request to wait in a queue. Ensure your implementation handles potential delays gracefully when processing larger volumes of text efficiently.

Is the API key tied to a specific account?

Yes, each account maintains one active API key. If you issue a new key, the previous one becomes invalid immediately. This ensures that only the current credential is used for authentication. You can regenerate the key at any time via the account dashboard to revoke access for older integrations.

How do I change the speed of the generated audio?

Use the speed parameter in your request, accepting values between 0.25 and 4.0. This allows you to adjust the playback rate to suit different listening preferences or accessibility needs. A value of 1.0 represents normal speed, while lower or higher values slow down or speed up the narration respectively.

What is the difference between tts-1 and tts-1-hd?

Both models use the same engine and incur the same price of $10 per million characters. The tts-1-hd designation indicates the HD model, though the pricing structure remains identical to the standard tts-1 model. Select the model based on your quality requirements without worrying about additional cost differences.

Can I generate audio in multiple languages?

The API supports 23 languages, including English, Spanish, French, German, Japanese, and Chinese. Any voice can speak any of these languages. If the language field is omitted, the system guesses the language based on the script, defaulting to English for Latin text. Specify the ISO code for non-English Latin text.

How do I handle texts longer than 4096 characters?

Split your text into segments of up to 4096 characters each. Send each segment as a separate request to the API. Once you receive the audio files for all parts, join them together to create the complete audio file. This ensures compliance with the single-request character limit while processing long scripts.

Does the API support streaming audio?

No, the API does not support streaming, WebSockets, or real-time partial audio. It returns the complete audio file in the response after synthesis is finished. This design suits batch processing workflows where the entire audio asset is required before playback begins.

What format is the audio returned in?

You can specify the output format using the response_format parameter. Supported formats include mp3, wav, opus, flac, and pcm. The generated audio files are returned directly in the API response. Each file also contains an inaudible watermark to identify it as synthetic speech generated by the service.

How do I authenticate my requests?

Include your API key in the request header using the format Authorization: Bearer tts-.... You obtain this key by signing up on the /get-api-key/ page. Ensure the key is active and corresponds to your account balance. Failed requests do not incur charges, but authentication is required for all valid calls.

First request

curl

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

Authentication

Sound wave illustration for: Authentication

Access the EasyVoice API using a unique bearer token issued to your account. Each account holds one active key; generate a new key via the dashboard to immediately invalidate the previous one, ensuring secure credential management.

API Key Generation

API Key Generation

Sign up on /get-api-key/ using Google or email. The dashboard displays your active key, balance, and usage statistics.

  • One active key per account
  • Instant invalidation of old keys

Bearer Token Usage

Bearer Token Usage

Include the header Authorization: Bearer tts-... in every request. The key grants access to all endpoints.

Key Revocation

Generate a new key in the dashboard to revoke the old one immediately. No waiting period applies.

Endpoints

Sound wave illustration for: Endpoints

The API exposes three primary endpoints for audio synthesis and metadata retrieval. All requests require a Bearer token in the Authorization header, using the base URL https://api.5567.info/v1. The speech endpoint handles text conversion, while the voices and models endpoints provide configuration data.

Speech Generation Endpoint

Send text to POST https://api.5567.info/v1/audio/speech to receive an audio file. The request body follows the OpenAI speech endpoint schema, supporting model selection, voice preset, output format, and speed adjustment.

  • Method: POST
  • Accepts JSON body with input, voice, model, and response_format fields.
  • Returns audio file directly in the response body.

Voices Listing Endpoint

Use GET https://api.5567.info/v1/voices to retrieve available voice presets, supported languages, and available audio formats. This endpoint helps developers configure their integration without hardcoding values.

  • Lists 8 voice presets (e.g., aria, nova, atlas).
  • Returns supported ISO language codes.
  • Details available output formats (mp3, wav, opus, flac, pcm).

Models Listing Endpoint

Query GET https://api.5567.info/v1/models to confirm available model identifiers. The API currently supports tts-1 and tts-1-hd, which share the same engine and pricing structure.

  • Returns model ID strings.
  • Confirms pricing parity between tts-1 and tts-1-hd.

Request Parameters

Sound wave illustration for: Request Parameters

Configure the API request by selecting the synthesis model, defining the input text, and choosing a voice preset. These parameters determine the output quality, character limits, and audio characteristics delivered by the endpoint.

Model Selection

Choose between "tts-1" and "tts-1-hd" models. Both utilize the same underlying engine and carry identical pricing, allowing you to switch without affecting cost or audio quality.

Input Text Field

Provide the script text in the "input" field, with a maximum limit of 4096 characters per request. Spaces and punctuation count toward this total. For longer scripts, split the text into chunks and join the resulting audio files.

Voice Selection

Select one of eight voice presets, such as "aria" for narration or "atlas" for news. Each voice can speak any of the 23 supported languages; optionally specify the ISO language code to ensure correct pronunciation for non-English Latin text.

  • 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

Response Formats

Sound wave illustration for: Response Formats

Selecting the appropriate response format ensures compatibility with your playback environment and storage constraints. The API returns binary audio data directly in the HTTP response body, allowing seamless integration into existing media pipelines without intermediate file handling steps.

Choose MP3 for broad compatibility, WAV for uncompressed quality, or OPUS/FLAC for efficient lossless or lossy compression. Each format serves distinct technical requirements for educational and accessibility content delivery.

MP3 Output

MP3 is the default and most widely supported format. It provides a good balance between file size and audio quality, making it suitable for web playback and general distribution.

WAV Output

WAV offers uncompressed PCM audio. This format is ideal for professional editing workflows or systems that require raw audio data without compression artifacts.

OPUS and FLAC Options

OPUS provides efficient lossy compression, reducing bandwidth usage while maintaining clear speech. FLAC offers lossless compression, preserving exact audio quality. Both are viable for specialized archival needs.

Integration Examples

Sound wave illustration for: Integration Examples

Integration requires only a valid API key and standard HTTP requests. The endpoint accepts JSON bodies with text input and voice selection, returning audio files directly.

cURL Command Example

Use the following command to generate speech. Replace YOUR_API_KEY with your key from /get-api-key/.

  • curl -X POST https://api.5567.info/v1/audio/speech \\ -H "Authorization: Bearer YOUR_API_KEY" \\ -H "Content-Type: application/json" \\ -d '{"model": "tts-1", "input": "Hello world", "voice": "nova"}'

OpenAI SDK Configuration

The official OpenAI SDK works by changing the base URL. Set base_url to https://api.5567.info/v1 and use your EasyVoice key.

  • client = OpenAI(base_url="https://api.5567.info/v1", api_key="YOUR_API_KEY")

Python Script Example

Import the requests library to send a POST request. The response contains the audio binary data, which you can save directly to a file.

  • response = requests.post('https://api.5567.info/v1/audio/speech', headers={'Authorization': 'Bearer KEY'}, json={'model': 'tts-1', 'input': 'Test', 'voice': 'aria'})
Integration Examples

Error Handling

Sound wave illustration for: Error Handling

The API returns standard HTTP status codes to indicate the outcome of each synthesis request. Developers should implement logic to parse these codes and handle specific failure scenarios, such as invalid input parameters or temporary service unavailability, to ensure robust integration.

Understanding the specific error response body allows for targeted debugging, whether the issue stems from character limits, unsupported language codes, or authentication failures.

Common Error Codes

A 400 Bad Request indicates invalid input, such as exceeding the 4096-character limit or providing an unsupported voice preset. A 401 Unauthorized error occurs when the Bearer token is missing or invalid, requiring key regeneration.

A 429 Too Many Requests signals that the rate limit has been exceeded. This typically happens during high-volume generation tasks where multiple threads send simultaneous requests.

  • 400: Invalid JSON structure or character limit exceeded
  • 401: Missing or incorrect Bearer token
  • 429: Rate limit exceeded (60 req/min)

Retry Logic

Implement exponential backoff for transient errors (429, 500, 503). Start with a short delay and increase it progressively to avoid overwhelming the server during congestion.

For 400 errors, do not retry automatically as they indicate a configuration issue. Instead, log the error and alert the developer to correct the input parameters before resuming generation.

  • Use exponential backoff for 429 and 5xx errors
  • Stop retrying on 400 errors
  • Cap maximum retry attempts to prevent infinite loops

Failed Request Billing

If synthesis fails due to server-side issues or invalid inputs that prevent audio generation, the request is not charged. The full character count is not deducted from your balance.

This ensures that you only pay for successfully generated audio files. Failed requests return a 200 OK or 4xx status with a clear error message, confirming no charge was applied.

Rate Limits

Sound wave illustration for: Rate Limits

Rate limits protect API stability by capping request throughput per active key. The system processes requests sequentially, so under load, synthesis may queue briefly.

Requests Per Minute

Standard accounts allow 60 requests per minute. This limit applies uniformly regardless of text length, ensuring predictable throughput for batch processing workflows.

Pre-Payment Limit

Before the first top-up, new accounts are restricted to 10 requests per minute. This reduced capacity allows testing without consuming significant credits.

Post-Payment Limit

After topping up with USDT (TRC-20), the limit increases to 60 requests per minute. Credits are deducted only on successful synthesis, ensuring efficient usage during high-volume generation.

Audio Specifications

Sound wave illustration for: Audio Specifications

Define precise control over audio generation timing and input constraints. The API accepts speed values between 0.25 and 4.0, allowing you to adjust the playback rate of the synthesized speech. Input text is limited to 4096 characters per request; longer scripts must be split and concatenated by the client application.

Speed Parameter Range

Adjust the speed parameter from 0.25 to 4.0 to control the voice pace. Values below 1.0 slow the delivery, while values above 1.0 increase it. This ensures the audio matches the intended pacing for educational materials or accessibility content without requiring post-processing.

Character Limit per Request

Each API call accepts a maximum of 4096 characters for the input field. Spaces and punctuation count toward this limit. For texts exceeding this length, split the content into chunks and join the resulting audio files sequentially. Short phrases may take a few seconds to generate.

  • Limit: 4096 characters per request
  • Includes spaces and punctuation
  • Split and join for longer texts

Language Code Format

Use standard ISO language codes for the language field. If omitted, the system guesses the language based on the script, defaulting to English for Latin text. Explicitly set the language for non-English Latin-script inputs to ensure accurate synthesis across the 23 supported languages.

  • Supported: 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. Each top-up is a standalone transaction, giving you full control over your spending without recurring commitments or hidden fees.

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

More on this site