Start
.md ↗

Kalpa Speech API

Speech models that speak in context — one API for text-to-speech and multi-speaker conversation.

The Kalpa Speech API serves multi-speaker conversational speech models over HTTP and WebSocket. It does two things:

  • Text-to-speechPOST /v1/tts turns text into spoken audio.
  • ConversationPOST /v1/converse takes a conversation of turns and speaks the open (final) turn: either authoring it outright (the model writes text and voices it) or rendering text you supply, in the voice and rhythm of the conversation so far. For a stateful WebSocket, see the WebSocket reference.

There is one conversation shape and no special cases: TTS is just a one-turn conversation. REST whole-clip responses carry base64-encoded 16-bit PCM WAV; SSE and WebSocket responses stream base64 raw pcm_s16le. Generated audio is mono at the response's advertised sample rate (currently 24 kHz); input WAV may use any sample rate and multi-channel input is mixed down to mono.

bash
export KALPA_API_KEY=...   # provisioned per team — see Authentication

curl -s https://api.kalpalabs.ai/v1/tts \
  -H "Authorization: Bearer $KALPA_API_KEY" -H 'Content-Type: application/json' \
  -d '{"text": "Hey there! How are you doing today?", "speaker": "0"}'

At a glance

EndpointWhat it does
POST /v1/ttsText in, speech out
POST /v1/converseComplete the open turn of a conversation
POST /v1/converse/streamThe same, streaming audio over server-sent events
wss://api.kalpalabs.ai/v1/converse/streamStateful streaming conversation over WebSocket
GET /v1/voicesThe named-voice catalog
GET /v1/modelsThe public model registry
GET /v1/infoBackend info, default params, request limits
GET /v1/usageYour key's metered usage
GET /healthLiveness (no auth)

Base URL: https://api.kalpalabs.ai. All /v1/* endpoints require a key (Authentication). HTTP errors before streaming begins use one standard envelope (Rate limits & errors); SSE and WebSocket failures after a stream starts use their protocol-specific error events.

Built for agents

These docs assume your first reader may be a model. Every page is plain markdown at a stable URL — append .md to any path (this page is /index.md). The whole site is indexed in /llms.txt, concatenated in /llms-full.txt, and the full contract is machine-readable at /openapi.json — the same committed artifact the API reference and our clients are generated from. Point your agent at any of them.

Getting access

The API is in early access. Write to hello@kalpalabs.ai for a key, or try the models interactively first at studio.kalpalabs.ai.