It sounds like your API is counting extra seconds/minutes that the dashboard automatically filters out — usually things like ringing time, incomplete calls, or calls that never fully connected. The CSV often only includes billable/connected durations, while the API returns total durations.
I can help you pinpoint the exact mismatch.
Quick question: Are you summing the duration field or the full call_ended_at - call_started_at timestamps from the API?