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.