Authentication

Organization API keys for REST and WebSocket

Create an API key under API keys in the dashboard. The key is shown once. ProsodyAI stores its SHA-256 hash.

export PROSODY_API_KEY="your-api-key"

The key selects the organization for identity, storage, usage, and billing.

TypeScript SDK

const prosody = new ProsodyClient({
  apiKey: process.env.PROSODY_API_KEY!,
});

REST

The SDK sends the key in X-API-Key:

X-API-Key: your-api-key

Realtime WebSocket

ProsodyRealtimeStream sends the key in the first JSON frame:

{
  "type": "config",
  "api_key": "your-api-key",
  "encoding": "pcm16",
  "sample_rate": 16000
}

Run the realtime WebSocket from a trusted server or worker, so the key never reaches a browser.

Errors

StatusMeaning
401Missing or invalid API key
402Credit balance too low for the requested audio
403Key is valid but the plan or scope does not allow the operation

On this page