Developers

Parexa REST API for text to speech and speech to text.

Create an API key

Authentication

Every request needs a key created on the API Keys page. Send it as a bearer token:

Authorization: Bearer px_live_...

Base URL: https://parexa.xyz (local: http://localhost:3000)

POST/api/v1/audio/speechtext → mp3

Synthesize speech. Returns raw audio (default audio/mpeg).

FieldTypeDescription
textstring · requiredUp to 4,000 characters.
voicestringEdge neural voice, e.g. en-IN-PrabhatNeural.
ratenumber 0.5–2Speaking speed. Default 1.
pitchnumber 0.5–2Voice pitch. Default 1.
formatstringmp3-48k (default), mp3-96k, opus-24k.
curl https://parexa.xyz/api/v1/audio/speech \
  -H "Authorization: Bearer $PAREXA_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"text":"Hello from Parexa","voice":"en-US-AriaNeural"}' \
  --output speech.mp3
const res = await fetch("https://parexa.xyz/api/v1/audio/speech", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.PAREXA_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({ text: "Hello from Parexa", voice: "en-US-AriaNeural" }),
});

const audio = Buffer.from(await res.arrayBuffer());
POST/api/v1/audio/transcriptionsaudio → text

Transcribe an audio file. Send multipart/form-data with the recording in the file field (max 25 MB).

FieldTypeDescription
filefile · requiredmp3, wav, m4a, ogg, webm. Max 25 MB.
languagestringOptional ISO-639-1 hint, e.g. hi.
response_formatjson | textDefault json.
curl https://parexa.xyz/api/v1/audio/transcriptions \
  -H "Authorization: Bearer $PAREXA_API_KEY" \
  -F "[email protected]" \
  -F "language=en"
{
  "text": "Hello from Parexa",
  "provider": "cloudflare",
  "language": "en"
}
GET/api/v1/voicesvoice catalog

List available voices. Filter with ?locale=en-IN or ?search=aria.

curl "https://parexa.xyz/api/v1/voices?locale=en-IN" \
  -H "Authorization: Bearer $PAREXA_API_KEY"

Limits & errors

  • · 60 requests per minute per key
  • · TTS text up to 4,000 characters per request
  • · Audio uploads up to 25 MB
StatusMeaning
401Missing or invalid API key.
400 / 413 / 415Bad input, too large, unsupported audio type.
422No speech detected in the audio.
429Rate limit exceeded.
502 / 503Upstream engine failed or not configured.

Errors return { "error": { "message", "type" } }.