Skip to main content
The Hume endpoint analyzes audio from a URL to extract emotional prosody and language features using the Hume AI API.

Endpoint

POST http://localhost:5000/api/hume

Request body

audioUrl
string
required
A valid URL pointing to an audio file. The URL must be accessible by Hume AI’s servers for analysis.

Response

job_id
string
The unique identifier for the Hume AI batch job
status
string
The current status of the analysis job (e.g., “queued”, “processing”, “completed”)
request
object
Contains details about the submitted request

Example request

curl -X POST http://localhost:5000/api/hume \
  -H "Content-Type: application/json" \
  -d '{
    "audioUrl": "https://example.com/audio/conversation.mp3"
  }'

Example response

{
  "job_id": "abc123-def456-ghi789",
  "status": "queued",
  "request": {
    "url": "https://example.com/audio/conversation.mp3",
    "models": {
      "language": {},
      "prosody": {}
    }
  }
}

Error responses

error
string
Description of the error that occurred

Missing audioUrl (400)

{
  "error": "audioUrl is required"
}

Invalid URL format (400)

{
  "error": "Invalid URL format"
}

Analysis failed (500)

{
  "error": "analysis failed"
}

Implementation details

The endpoint:
  1. Validates that audioUrl is provided and is a valid URL format
  2. Obtains an access token from Hume AI using OAuth2 client credentials flow
  3. Submits the audio URL to Hume AI’s batch analysis endpoint
  4. Returns the job details for tracking the analysis progress
The analysis is performed asynchronously by Hume AI. You’ll need to poll the job status or use webhooks to get the final results.
The endpoint requires VITE_HUME_API_KEY and HUME_SECRET_KEY environment variables to be configured.

Build docs developers (and LLMs) love