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-keyRealtime 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
| 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 |