API Documentation

Integrate Leadrogenie's powerful audio processing capabilities into your applications

Upload Audio & Trigger Transcript API

This endpoint allows you to upload an audio file and trigger multiple analysis services such as transcription, summarization, sentiment analysis, VoC extraction, and evaluation.

POSThttps://app.leadrogenie.com/api/upload-audio-transcript

Authentication

HeaderTypeDescription
x-api-keystringYour API key for authentication

Parameters

ParameterTypeRequiredDescription
audiofile*Audio file (mp3, wav, aac, or flac)
audio_urlstring*URL to audio file (alternative to audio)
project_idstringYesID of the project to link the audio to
has_transcriptbooleanNoIf true, generate transcription
has_summarybooleanNoIf true, generate a summary
has_sentimentbooleanNoIf true, perform sentiment analysis
has_vocbooleanNoIf true, extract Voice of the Customer (VoC) insights
has_evaluationbooleanNoIf true, evaluate the call with scoring
qa_idstringNoOptional question-answer set ID for evaluation

Note: Either audio (file upload) or audio_url is required, but not both.

Code Examples

Using File Upload (audio)

curl -X POST https://app.leadrogenie.com/api/upload-audio-transcript \
  -H "x-api-key: YOUR_API_KEY" \
  -F "audio=@/path/to/audio.mp3" \
  -F "project_id=PROJECT_ID" \
  -F "has_transcript=true" \
  -F "has_summary=true" \
  -F "has_sentiment=true" \
  -F "has_voc=false" \
  -F "has_evaluation=true" \
  -F "qa_id=OPTIONAL_QA_ID"

Using Audio URL (audio_url)

curl -X POST https://app.leadrogenie.com/api/upload-audio-transcript \
  -H "x-api-key: YOUR_API_KEY" \
  -F "audio_url=https://example.com/path/to/audio.mp3" \
  -F "project_id=PROJECT_ID" \
  -F "has_transcript=true" \
  -F "has_summary=true" \
  -F "has_sentiment=true" \
  -F "has_voc=false" \
  -F "has_evaluation=true" \
  -F "qa_id=OPTIONAL_QA_ID"

Responses

Success Response (200 OK)

{
  "message": "Audio uploaded successfully",
  "conversation_id": "661bfa..."
}

Error Response (400 Bad Request)

{
  "message": "Error uploading audio"
}

API Behavior

When a request is made to this endpoint:

  • Saves the audio to the system
  • Creates a new conversation in the specified project
  • Launches automated actions based on selected flags:
    • • Transcription
    • • Summary
    • • Sentiment Analysis
    • • Voice of the Customer (VoC)
    • • Evaluation
  • Returns a conversation_id to help you track processing and retrieve results