Integration
Batch analysis and realtime streaming
Base URL: https://api.prosodyai.app
Auth: psk_* API key from the dashboard → Organization → API keys
Batch vs streaming
| Batch | Streaming | |
|---|---|---|
| Use when | Recorded files, offline scoring | Live calls, agent steering |
| Input | File, buffer, or URL | Live PCM over WebSocket |
| Client | @prosodyai/sdk or REST | SDK realtime stream, raw WebSocket, or LiveKit plugin |
| Endpoint | POST /v1/analyze/* | wss://api.prosodyai.app/v1/stream/realtime |
| Auth | Header X-API-Key: psk_… | api_key in the first config frame |
| Steering | — | Tone-shift cues on every chunk + discrete steering events |
| Session | Optional session_id | Optional session_id (enables transcript + history) |
Inference runs on ProsodyAI infrastructure. Call api.prosodyai.app — do not call the model host directly.
Batch (REST / SDK)
import { ProsodyClient } from '@prosodyai/sdk';
const client = new ProsodyClient({
apiKey: process.env.PROSODY_API_KEY!,
});
const result = await client.analyze('./interview.wav');
console.log(result.valence, result.arousal, result.signals);
for (const turn of result.turns ?? []) {
console.log(turn.speaker_id, turn.prosody);
}POST https://api.prosodyai.app/v1/analyze/audio
X-API-Key: psk_...
Content-Type: multipart/form-data
file=<wav>Full walkthrough: Quickstart · SDK.
Streaming (WebSocket)
On connect, send a JSON config frame with your API key, then stream 16 kHz mono PCM. The server chunks audio (~2s), runs ProsodySSM, and returns tone, optional transcript, and steering cues.
const stream = client.createRealtimeStream({
sessionId: 'call-123',
sampleRate: 16000,
onResult: (r) => console.log(r.valence, r.signals, r.text),
});
await stream.connect();
stream.send(pcmChunk);
await stream.end();Raw WebSocket URL:
wss://api.prosodyai.app/v1/stream/realtimeLocal sidecar walkthrough: Demo.
Which mode?
- Files or offline scoring →
analyze()/ REST - Live calls and agent steering →
createRealtimeStream()/ WebSocket