Appearance
Overview
xVoice is a speech API for production workloads: generate speech from text, transcribe audio files, and transcribe live audio while people are still talking.
The API follows OpenAI's audio API, so the official OpenAI SDKs work once you change the base URL and the key.
What you can build
| Product | Endpoint | Use it for |
|---|---|---|
| Text to speech | POST /v1/audio/speech | Voice agents, read-aloud and notifications. Streamed audio starts playing before the whole clip is generated |
| Speech to text | POST /v1/audio/transcriptions | Recordings, voicemail and uploaded files, up to 10 minutes each |
| Realtime transcription | WS /v1/realtime | Phone calls, meetings and microphones, with text arriving as people speak |
Speech is generated by cadence-tts, and both kinds of transcription use cadence-stt. See Models and voices.
Usage is metered per second of audio and per character of text, and is never rounded up to the minute. Prices are on xvoice.dev, and how billing works is on Billing.
Make your first request
bash
export XVOICE_API_KEY=xv_...
curl https://api.xvoice.dev/v1/audio/speech \
-H "Authorization: Bearer $XVOICE_API_KEY" \
-H "Content-Type: application/json" \
-d '{"model": "cadence-tts", "voice": "clara", "input": "Hello from xVoice."}' \
--output hello.wavThe quickstart goes from signup to a working round trip in about five minutes.
Base URL and SDKs
Every endpoint lives under one base URL:
text
https://api.xvoice.dev/v1Use the official OpenAI SDK for your language, or any HTTP client:
python
from openai import OpenAI
client = OpenAI(api_key="xv_...", base_url="https://api.xvoice.dev/v1")js
import OpenAI from 'openai'
const client = new OpenAI({ apiKey: 'xv_...', baseURL: 'https://api.xvoice.dev/v1' })The examples on these pages read the key from $XVOICE_API_KEY. What is the same as OpenAI, and what is not, is listed on OpenAI compatibility.
Conventions
- Authentication is a bearer token in the
Authorizationheader, on every endpoint including the WebSocket. See Authentication. - Every response carries
X-Request-Id, and every error body repeats it asrequest_id. Log it: it ties a support request to the exact call. - Errors share one envelope across all endpoints, with a stable
codeto branch on. See Errors. - Ids are prefixed by what they identify:
org_…,proj_…,key_…,req_…. - Lists return
{"object": "list", "data": [...]}. - Unknown fields are errors on the realtime endpoint, so a misspelled setting fails loudly instead of being ignored.
Next steps
- Quickstart: get a key and make a round trip.
- Realtime transcription: stream a live call or microphone.
- Models and voices: what is available, and what each model accepts.
- Rate limits: what your account can do per minute, and how to handle a
429.