Automated Key Detection API
OpenKeyScan isn't just a desktop app—it's a powerful engine for businesses that need accurate musical metadata at scale.
Whether you run a record pool, a digital music store, or manage a large catalog of audio assets, accurate key information is critical for your customers. The OpenKeyScan API allows developers to integrate our studio-grade key detection algorithm directly into automated workflows, ingestion pipelines, and content management systems.
REST API Reference
The OpenKeyScan desktop application includes a built-in REST API server that runs automatically on port 58721.
Base URL: http://localhost:58721
Key Endpoints
GET /health
Check if the API server is running.
No parameters
POST /analyze/add
Queue files for async analysis (batch, up to 1000 files).
Body:
{
"files": ["/path/to/track1.mp3", "/path/to/track2.mp3"]
}
POST /analyze/single
Analyze single file synchronously (waits for result).
Body:
{
"file": "/path/to/track.mp3"
}
GET /analyze/result
Query cached analysis result by file path.
Query Parameters:
file(required): Full path to the audio file
Example: /analyze/result?file=/path/to/track.mp3
GET /analyze/results
Get all analysis results (queued, done, errored).
No parameters. Returns array of all files with status, current key, and analyzed key.
DELETE /analyze/clear
Clear all files from UI and cache.
No parameters.
Quick Example
curl -X POST http://localhost:58721/analyze/single \
-H "Content-Type: application/json" \
-d '{"file": "/path/to/track.mp3"}'
# Response:
# {"success": true, "file": "/path/to/track.mp3", "key": "1m"}
Note: The API respects app settings (key format, auto-tagging) and updates the UI in real-time via IPC.
No audio files? Look the key up instead
The local API analyzes files you have on disk. If you are building an app, a store or a catalog tool and only have track metadata (an ISRC, a Spotify ID, or an artist and title), use Sonovault's key and BPM API. Sonovault runs the OpenKeyScan engine over its music catalog and pairs each key with the tempo from the Lexicon DJ beat detector, so one REST call returns key and BPM for a track without downloading or analyzing anything yourself.
Keys come back in alphanumeric, musical and Open Key notation, next to the ISRC, genre and platform links. See the key and BPM API (free tier available).