SPEECHMAAPI
Docs Pricing Playground Dashboard Free text to speech app Get API key
NEW 456 HD voices are now in the API

Give your product
a natural voice.

Send text, get studio quality MP3 back in about a second. 1,000+ voices across 70+ languages, one simple REST API that works from any language.

Live in 2 minutes Commercial use included Cancel anytime





      
POST /api/v1/tts
1,000+natural voices
456premium HD voices
70+languages and accents
$9a month to start

How it works

From sign up to first audio in three steps.

Create your account

Pick Starter or Pro and pay securely with UPI, card or net banking. Your key is switched on the moment the payment goes through.

Copy your API key

Your dashboard shows your key, your usage and your bills. Make up to 5 keys, one for each app, and remove any key in one click.

Send text, get speech

Call POST /v1/tts with your text and a voice. You get an MP3 file straight back, ready to play, save or stream.

Built for real products

Everything you need, nothing to install.

The same voices that power speechma.com, ready for your apps, videos, games, e-learning, phone menus and accessibility tools.

1,000+ voices

Male and female voices for every age and style, with local accents for 70+ languages.

456 HD voices

Premium voices with lifelike breathing and emotion. Marked with "hd": true in the voice list.

Pauses where you want

Add [break 1s] anywhere in your text. Pause tags are free and never counted.

Styles, speed and pitch

Make a voice cheerful, sad or whispering, and tune speed and pitch from -100 to +100.

Usage you can see

Every reply tells you the characters you have left. A usage endpoint and dashboard show the rest.

Yours to use

Full commercial rights on every plan. Your audio is never stored on our servers.

Pricing

Simple monthly plans.

Every plan includes all voices, all languages and commercial use. Renews monthly, cancel anytime from your dashboard.

Starter

For side projects and small apps

$9/ month
₹864 a month in India
1Mcharacters a month
100requests an hour
  • 5,000 characters per request
  • 500 requests a day
  • 3 requests at the same time
  • All 1,000+ voices and 456 HD voices
  • Commercial use included
Start with Starter
Most popular

Pro

For growing products and teams

$99/ month
₹9,504 a month in India
50Mcharacters a month
500requests an hour
  • 10,000 characters per request
  • 5,000 requests a day
  • 10 requests at the same time
  • 50× the characters of Starter
  • Priority support
Start with Pro

Enterprise

For high volume and special needs

Custom
Pricing built around your volume
Anycharacter volume
Anyrate limits
  • Custom limits and billing cycle
  • Dedicated support and SLA
  • White-label options
  • Invoice billing
  • All voices and languages
Talk to us

Prices in US dollars. Customers in India pay in rupees. Secure payments by Razorpay. See our refund policy.

Documentation

Introduction

The SPEECHMA API turns text into natural speech. It is a plain REST API: you send JSON over HTTPS and get MP3 audio back. It works with any language that can make a web request, from cURL and Python to Node.js, PHP, Go, Java and no-code tools.

There are three endpoints: /tts makes the audio, /voices lists every voice, and /usage shows how much of your monthly quota is left.

Base URLhttps://speechma.com/api/v1

Authentication

Every request needs your API key. You find it in your dashboard. Send it in the X-API-Key header, or as a Bearer token if your tool prefers that.

X-API-Key: sm_your_api_key
Authorization: Bearer sm_your_api_key
Keep your key secret. Call the API from your server, not from browser code or a mobile app bundle, and never commit the key to GitHub. If a key leaks, delete it in your dashboard and make a new one.

Plans and limits

Limits reset with each monthly billing cycle. Every successful reply also tells you how many characters you have left (see /tts).

LimitStarterProEnterprise
Characters a month1,000,00050,000,000Custom
Characters per request5,00010,000Custom
Requests an hour100500Custom
Requests a day5005,000Custom
Requests at the same time310Custom
Price$9 a month$99 a monthContact us

POST /tts

Turns text into speech. On success the reply body is the MP3 file itself, so you can save it straight to disk or stream it to a player.

POSThttps://speechma.com/api/v1/tts

Headers

HeaderValue
X-API-KeyRequiredYour API key
Content-TypeRequiredapplication/json

Body (JSON)

FieldTypeWhat it does
textstringRequiredThe words to speak. Up to 5,000 characters on Starter or 10,000 on Pro.
voicestringRequiredA voice_id from /voices, for example voice-1.
pitchintegerOptionalFrom -100 to 100. Default 0.
rateintegerOptionalSpeed from -100 to 100. Default 0.
stylestringOptionalA speaking style such as cheerful, sad or whispering. Only for voices that list it in their styles. Other values are ignored.
Pauses: write [break 1s] or [break 500ms] anywhere in text to add silence (up to 10 seconds each, 50 per request). Pause tags are not counted as characters. HD voices support pauses but always use normal pitch, speed and style.

Example request

curl -X POST https://speechma.com/api/v1/tts \
  -H "X-API-Key: sm_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello world!","voice":"voice-1"}' \
  --output speech.mp3
import requests

response = requests.post(
    "https://speechma.com/api/v1/tts",
    headers={
        "X-API-Key": "sm_your_api_key",
        "Content-Type": "application/json",
    },
    json={"text": "Hello world!", "voice": "voice-1"},
)

if response.status_code == 200:
    with open("speech.mp3", "wb") as f:
        f.write(response.content)
    print("Saved speech.mp3")
else:
    print("Error:", response.json()["error"])
import fs from "node:fs";

const response = await fetch("https://speechma.com/api/v1/tts", {
  method: "POST",
  headers: {
    "X-API-Key": "sm_your_api_key",
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text: "Hello world!", voice: "voice-1" }),
});

if (response.ok) {
  fs.writeFileSync("speech.mp3", Buffer.from(await response.arrayBuffer()));
  console.log("Saved speech.mp3");
} else {
  console.error("Error:", (await response.json()).error);
}
$ch = curl_init('https://speechma.com/api/v1/tts');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_POST           => true,
    CURLOPT_POSTFIELDS     => json_encode(['text' => 'Hello world!', 'voice' => 'voice-1']),
    CURLOPT_HTTPHEADER     => ['X-API-Key: sm_your_api_key', 'Content-Type: application/json'],
]);
$audio = curl_exec($ch);
$code  = curl_getinfo($ch, CURLINFO_HTTP_CODE);
curl_close($ch);

if ($code === 200) {
    file_put_contents('speech.mp3', $audio);
}

Reply

# The body is the MP3 file. These headers show your quota:
Content-Type:      audio/mpeg
X-Chars-Used:      250
X-Chars-Remaining: 999750
X-Plan:            starter
{
  "success": false,
  "error": "Quota exceeded",
  "code": 429
}

GET /voices

Lists every voice you can use, including 456 premium HD voices ("hd": true). Use the voice_id in your /tts requests. Each voice is listed under the language it speaks, so ?language=Czech also returns HD and multilingual voices that speak Czech. A voice with "multilingual": true speaks the listed language when your text is written in it. styles lists the values you can send as style.

GEThttps://speechma.com/api/v1/voices?language=English

Query parameter

ParameterExample
languageOptionalEnglish, Spanish, Hindi, Arabic

Reply

application/json
{
  "success": true,
  "total": 1041,
  "hd_total": 456,
  "voices": [
    {
      "voice_id": "voice-1",
      "name": "Adri",
      "language": "Afrikaans",
      "locale": "af-ZA",
      "gender": "Female",
      "hd": false,
      "multilingual": false,
      "styles": []
    },
    {
      "voice_id": "voice-584",
      "name": "Adam HD",
      "language": "English",
      "locale": "en-US",
      "gender": "Male",
      "hd": true,
      "multilingual": false,
      "styles": []
    }
    // ...and 1,025 more
  ]
}

GET /usage

Shows your plan, the characters you have used this cycle, what is left and when the cycle ends. Calling it does not use any characters.

GEThttps://speechma.com/api/v1/usage
application/json
{
  "success": true,
  "account": {
    "plan": "pro",
    "billing_cycle_end": "2026-12-10"
  },
  "quota": {
    "chars_limit": 50000000,
    "chars_used": 120450,
    "chars_remaining": 49879550,
    "usage_percent": 0.24
  }
}

Error codes

Every error comes back as JSON with "success": false, a readable "error" message and the number in "code".

CodeMeaningHow to fix it
400Bad requesttext or voice is missing or wrong, or the text is longer than your plan allows per request.
401UnauthorizedThe API key is missing or wrong. Check the X-API-Key header.
402Payment requiredYour plan is not active. Renew it in your dashboard.
403ForbiddenThe account is paused. Write to contact@speechma.com.
405Method not allowedUse POST for /tts and GET for /voices and /usage.
429Too many requestsYou hit the hourly, daily or monthly limit. Wait a little, or move to a bigger plan.
500Server errorA short problem on our side. Wait a moment and try again.
Tip: for 429 and 500, retry after a short wait (for example 2, then 4, then 8 seconds). Most apps never notice a hiccup this way.

More examples

Slower, deeper voice with a pause

JSON body
{
  "text": "Welcome to the show. [break 1s] Let us begin.",
  "voice": "voice-1",
  "pitch": -20,
  "rate": -30
}

Check your quota before a long job

Python
import requests

headers = {"X-API-Key": "sm_your_api_key"}
text = "Hello from my app!"

usage = requests.get("https://speechma.com/api/v1/usage", headers=headers).json()
if len(text) <= usage["quota"]["chars_remaining"]:
    audio = requests.post("https://speechma.com/api/v1/tts", headers=headers,
                          json={"text": text, "voice": "voice-1"})
    open("output.mp3", "wb").write(audio.content)
else:
    print("Not enough characters left this month")

Try every endpoint in your browser.

Paste your key, pick a voice and hear the result. No code needed.