Authentication
Organization API keys for REST, WebSocket, and LiveKit
Create a psk_* key under Organization → API keys in the
dashboard. The key is shown once. ProsodyAI
stores its SHA-256 hash.
export PROSODY_API_KEY=psk_...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: psk_...Realtime WebSocket
ProsodyRealtimeStream sends the key in the first JSON frame:
{
"type": "config",
"api_key": "psk_...",
"encoding": "pcm16",
"sample_rate": 16000
}Run the realtime WebSocket from a trusted server or worker. Browser media uses
prosody.realtime.createSession() on the server and connects with the returned
short-lived LiveKit token.
Errors
| Status | Meaning |
|---|---|
401 | Missing or invalid API key |
402 | Credit balance too low for the requested audio |
403 | Key is valid but the plan or scope does not allow the operation |