import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const response = await client.voiceAnalysis.analyze();
console.log(response.summary);{
"summary": {
"totalCalls": 123,
"totalMinutes": 123,
"totalTransfers": 123,
"totalTransferMinutes": 123,
"averageCallDuration": 123
}
}import BrainbaseLabs from 'brainbase-labs';
const client = new BrainbaseLabs({
apiKey: process.env['BRAINBASE_LABS_API_KEY'], // This is the default and can be omitted
});
const response = await client.voiceAnalysis.analyze();
console.log(response.summary);{
"summary": {
"totalCalls": 123,
"totalMinutes": 123,
"totalTransfers": 123,
"totalTransferMinutes": 123,
"averageCallDuration": 123
}
}API key authentication
Start date for analysis (ISO 8601)
End date for analysis (ISO 8601)
Time granularity for breakdown
daily, weekly, monthly, yearly Optional filter by deployment IDs
Optional filter by worker ID
Include transfer analysis
Include detailed call logs in response
Timezone for date calculations
Voice deployment analysis results
Show child attributes