Estimate the tempo (BPM) and the musical key of a music file: onset autocorrelat...
https://ton.halowerk.com/v1/bpm-key-detectOverview
Estimate the tempo (BPM) and the musical key of a music file: onset autocorrelation for tempo, peak chroma with Krumhansl-Kessler profiles for key, with confidence values. Decodes up to 10 minutes (mono mix, 22.05 kHz) with ffmpeg and analyses it in JavaScript.
Protocol
x402 (POST)
Price
$0.0050
Payment Asset
USD Coin
Payment Network
Base
Category
uncategorized
Provider
ton
Source
bazaar
Indexed
2026-11-21 08:04:08
Health
Status
unknown
Latency (p50)
—
Uptime (30d)
—
Reliability Score
—
Last Checked
Never
Last Healthy
Never
Consecutive Failures
0
x402 Payment Validation
Payment Requirements
—
Asset Verified
—
Facilitator
—
Input Schema
{
"body": {
"audio_url": "https://ton.halowerk.com/beispiel/bpm-key-detect-audio.flac"
},
"bodyType": "json",
"method": "POST",
"type": "http"
}
Output Schema
{
"example": {
"limitations": [
"Tempo has an inherent octave ambiguity (half/double tempo); both alternatives are listed.",
"Key estimation assumes Western tonal music with one key; modulations, modal or atonal music give low correlations.",
"Relative major/minor keys share pitch classes and are the most frequent confusion."
],
"result": {
"key": null,
"key_detail": {
"candidates": [
{
"correlation": 0.496,
"key": "G major"
},
{
"correlation": 0.494,
"key": "B minor"
},
{
"correlation": 0.485,
"key": "E minor"
},
{
"correlation": 0.389,
"key": "A minor"
}
],
"chroma": {
"A": 0.1,
"A#": 0.079,
"B": 0.109,
"C": 0.087,
"C#": 0.061,
"D": 0.073,
"D#": 0.064,
"E": 0.08,
"F": 0.072,
"F#": 0.095,
"G": 0.099,
"G#": 0.082
},
"chroma_contrast": 1.302,
"tonal": false,
"tuning_offset_cents": 0
},
"method": {
"key": "peak chroma 60–2100 Hz vs Krumhansl-Kessler 1982 profiles (Pearson r)",
"tempo": "spectral-flux onset envelope, unbiased autocorrelation, log-Gaussian prior (Ellis 2007), refined over multiples"
},
"source": {
"analysed_s": 16,
"analysis_rate_hz": 22050,
"bytes": 39834,
"channels": 1,
"codec": "flac",
"container": "flac",
"duration_s": 16,
"sample_rate": 22050,
"sha256": "ade868ace3fffc75e43d500317cf6cdce8c72eacb957bbebf4b434aa43d99543"
},
"tempo": {
"bpm": 89.99,
"double_tempo": {
"bpm": 179.98,
"periodicity": 0
},
"frame_rate_hz": 86.13,
"half_tempo": {
"bpm": 44.99,
"periodicity": 0.955
},
"multiples_used": 4,
"periodicity": 0.775
},
"tempo_bpm": 89.99
},
"service": "bpm-key-detect",
"status": "success"
},
"type": "json"
}