Features
Key & BPM Extraction
Processes an audio file to extract key changes, dominant key, and BPM (Beats Per Minute).
POST
Python
Extract key and BPM (beats per minute) from an input audio file with optional webhook callback for asynchronous updates.
Endpoint
This endpoint analyzes an audio file to determine its musical key and BPM. You can upload the audio file or provide a URL. Optionally, supply a webhook_url
to receive asynchronous results.
Request Parameters
Parameter | Type | Required | Description |
---|---|---|---|
audio_url | String | Optional | The URL of an audio file to analyze. Either audio_url or audio_file must be provided. |
audio_file | UploadFile | Optional | Upload the audio file directly. Either audio_url or audio_file must be provided. |
webhook_url | String | Optional | Callback URL for async response. |
š” Note: Either
audio_url
oraudio_file
must be provided ā one is required.
Sample Request
cURL
Python
š Replace
{path_to_your_audio_file}
,api_key
, andwebhook_url
before executing.
Sample Response
Success (200 OK)
Common Errors
- 422 Unprocessable Entity: Both
audio_url
andaudio_file
cannot beNone
. - 500 Internal Server Error: A server error occurred during processing.
Webhook Response
Once key and BPM extraction is completed, the webhook receives:
Output Fields
key_changes
: A mapping of time ranges to identified keys.dominant_key
: The most prominent key throughout the audio.bpm
: Estimated beats per minute.conversion_path
: Path to the original input audio file.conversion_path_wav
: Path to the.wav
version of the input file.
Payload and Request Formation
Authorizations
Body
multipart/form-data
Response
200
application/json
Successfully initiated key/bpm extraction
The response is of type object
.
Python