ProsodyAI Docs
TypeScript SDK

TypeScript SDK

@prosodyai/sdk reference

Package: @prosodyai/sdk

See Integration for when to use batch vs streaming.

Install

npm install @prosodyai/sdk

Client

import { ProsodyClient } from '@prosodyai/sdk';

const client = new ProsodyClient({
  apiKey: process.env.PROSODY_API_KEY!, // psk_* from dashboard
});

const result = await client.analyze('./utterance.wav');

Default origin: https://api.prosodyai.app. Auth header: X-API-Key.

Methods

MethodTransport
analyze()POST /v1/analyze/audio
analyzeBase64()POST /v1/analyze/base64
analyzePCM()Wraps PCM as WAV → analyze
createStream()Chunked PCM → analyze on an interval
createRealtimeStream()WebSocket /v1/stream/realtime

Response fields

FieldBatchRealtime
Valence / arousal / dominance
signals (engagement, stress, …)
turns with turn.prosodyWhen diarize=trueVia transcript turns
text, speaker labelsWhen returned
kpi_predictionsWhen KPIs configuredWhen KPIs configured
session_idWhen sessionId setWhen sessionId set

Streaming also emits agent steering cues on the wire (modulation_mode, tone-shift events). See Streaming.

On this page