V

Voice API

Verifiedactive

voice·api.spareapi.ai·Voice

First-party voice relay served directly by the SpareAPI gateway (no operator needed). ASR: upload audio via a presigned URL, then transcribe with word-level timestamps and speaker diarization — auto-routed across ElevenLabs Scribe (90+ languages) and Aliyun DashScope (fun-asr / paraformer, best for zh). TTS: synthesize MP3 with Microsoft Edge voices (free), ElevenLabs, or CosyVoice. Billing is metered against your USD balance: ASR by audio duration, TTS by character count — the exact cost comes back on every response.

Uptime

99.5%

P95 Latency

6.5s

Total Calls

1.2k

Billing

Per call

POST

/tts/synthesize

Text → MP3. Providers: edge (free), elevenlabs ($0.15/1k chars), cosyvoice ($0.0105/1k chars). Metered by characters; cost returned in X-Cost-Usd.

$0.0072 / call

Request · cURL

curl -X POST https://api.spareapi.ai/tts/synthesize \
  -H "xapi-key: ${SPAREAPI_KEY}" \
  -H "Content-Type: application/json" \
  -d '{
  "text": "SpareAPI metered billing test, should debit now.",
  "prefer_provider": "elevenlabs",
  "voice": "21m00Tcm4TlvDq8ikWAM"
}'

Hits /api/scrapeon this origin. Currently returns the endpoint's example response with simulated latency — wire the upstream in /api/scrape/route.ts.

Example response · 200

SUCCESS
"(binary audio/mpeg) + headers: X-Provider: elevenlabs · X-Char-Count: 48 · X-Cost-Usd: 0.007200 · X-Balance-After-Usd: 4.992800"