⚡ Developer API · included with Pro & Business

37 ultra-realistic Indian voices,
one simple REST call.

Turn any text into natural studio-quality speech in 11 Indian languages — from your own app, script, bot or workflow. Same engine that powers DetheAI.

Get your API key → Read the docs

01Quickstart

Generate your first voiceover in 30 seconds. Get a key from the API console (Pro & Business plans), then:

curl -X POST https://www.dethe.in/api/v1/tts \
  -H "Authorization: Bearer dth_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "text": "नमस्ते! यह DetheAI की आवाज़ है।",
    "voice": "priya",
    "languageCode": "hi-IN"
  }' | jq -r .audioBase64 | base64 -d > voice.mp3

02Authentication

Every request needs your API key in the Authorization header. Keys are issued instantly on the API console after upgrading to Pro or Business.

Authorization: Bearer dth_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx

🔒 Keep your key secret — anyone holding it can spend your credits. Revoke & reissue anytime from the console.

03Endpoints

MethodEndpointWhat it does
POST/api/v1/ttsText → speech (returns base64 MP3)
GET/api/v1/voicesAll 37 voices + 11 languages (no auth)
POST/api/keys/issueIssue a key (needs payment proof — console does this)
POST/api/keys/infoCheck key balance & expiry
POST/api/keys/revokePermanently delete a key

04POST /api/v1/tts — request

FieldTypeNotes
text requiredstring1–3,000 characters per request
voicestringAny of the 37 voices below. Default: shubh
languageCodestringhi-IN (default), en-IN, ta-IN, te-IN, mr-IN, bn-IN, gu-IN, pa-IN, kn-IN, ml-IN, od-IN
speednumber0.5 – 2.0, default 1.0

Response

{
  "audioBase64":     "//uQxAAAAAABJRU5ErkJggg==…",  // base64 MP3
  "mimeType":       "audio/mpeg",
  "provider":       "sarvam",          // sarvam | edge | google-translate
  "voice":          "priya",
  "languageCode":   "hi-IN",
  "words":          7,
  "creditsUsed":    500,
  "creditsRemaining": 49500,
  "plan":           "Pro"
}

05Credits & limits

💎 Same credit economy

500 credits per 100-word block (min 500/request). Pro = 50,000/month, Business = 200,000/month — credits refill automatically every 30 days.

📏 Per request

Max 3,000 characters. Keys stay valid while your plan is active (monthly = 30 days, yearly = 365 days).

🛟 Failed = free

If synthesis fails, credits are auto-refunded. You only pay for audio you actually receive.

06Errors

StatuscodeMeaning
401unauthorized / invalid_key / key_expiredMissing, wrong or expired key
400empty_texttext field missing
413text_too_longOver 3,000 characters — split the text
402insufficient_creditsMonthly quota over — upgrade plan
503synthesis_failed / storage_unavailableTemporary — retry, credits refunded

07Code samples

JavaScript

const r = await fetch(
  "https://www.dethe.in/api/v1/tts",
  {
    method: "POST",
    headers: {
      Authorization: "Bearer dth_live_KEY",
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      text: "Welcome to DetheAI!",
      voice: "aditya",
      languageCode: "en-IN",
    }),
  }
).then((x) => x.json());

const audio = new Audio(
  "data:" + r.mimeType +
  ";base64," + r.audioBase64
);
audio.play();

Python

import requests, base64

r = requests.post(
    "https://www.dethe.in/api/v1/tts",
    headers={"Authorization":
             "Bearer dth_live_KEY"},
    json={
        "text": "नमस्ते दोस्तों!",
        "voice": "priya",
        "languageCode": "hi-IN",
    },
).json()

with open("voice.mp3", "wb") as f:
    f.write(base64.b64decode(
        r["audioBase64"]))

08The 37 studio voices

14 female + 23 male ultra-realistic voices. Try them all on the DetheAI studio before you pick.

FEMALE
priyaritunehapoojasimrankavyaishitashreyaroopatanyashrutisuhanikavitharupali

MALE
shubhadityarahulrohanamitdevratanvarunmanansumitkabiraayanashutoshadvaitanandtarunsunnymanigokulvijaymohitrehansoham

Ready to build with Indian voices?

API access is included with Pro (₹799/mo) and Business (₹2,499/mo) — same credits work on the website and the API.

Get your API key → See pricing