Audio analysis API
Published November 2026
Send a recording over HTTP and get its key, tempo, meter, downbeats, sections and chords back as JSON, in a few seconds and for no credits.
A free account has 120 credits a month. The catalog, a quote and the OpenAPI document need no key.
One call
Make a key at Settings → API keys and send it as X-API-Key (or Authorization: Bearer):
export DOO_API_KEY=dsk_live_...
analyze_song reads a recording at a public URL. This one is public, so the call runs as written: it is the loop on the game page, a waltz whose score we wrote, which means the right answers are known. G major, 3/4, 144 bpm, 32 bars.
curl -s -X POST https://api.doseedo.com/api/jobs \
-H "X-API-Key: $DOO_API_KEY" \
-H 'Content-Type: application/json' \
-H 'Idempotency-Key: waltz-analysis-v1' \
-d '{
"kind": "analyze_song",
"input": { "audio_url": "https://doseedo.com/static/game/market-waltz/loop.flac" }
}'
curl -s "https://api.doseedo.com/api/jobs/$JOB_ID?wait=50" -H "X-API-Key: $DOO_API_KEY"
The finished job, trimmed to its shape. This is the reply to the call above, run on November 22, 2026: queued to finished in 3.3 seconds, for no credits.
{
"object": "job",
"kind": "analyze_song",
"status": "succeeded",
"output": {
"duration": 40,
"bpm": 145,
"tempo_map": [ { "time": 0.058, "bpm": 150.76 }, { "time": 4.7949, "bpm": 142.94 }, … ],
"key": { "name": "G major", "root": 7, "scale": "major", "confidence": 0.936 },
"meter": "3/4",
"beats_per_bar": 3,
"downbeats": [ 0.4644, 1.5325, 2.7632, 4.0171, … ],
"sections": [ { "name": "Section A", "position_s": 0.464, "position_beats": 1.122 }, … ],
"chords": [
{ "chord": "Gmaj7", "start": 0.058, "end": 0.8127, "start_beat": 0, "end_beat": 2, "confidence": 0.8167 },
{ "chord": "G", "start": 0.8127, "end": 2.3336, "start_beat": 2, "end_beat": 6, "confidence": 0.8876 },
{ "chord": "Cmaj7", "start": 2.3336, "end": 3.5991, "start_beat": 6, "end_beat": 9, "confidence": 0.8537 },
…
],
"dynamics": { "fade_in_sec": 0, "fade_out_sec": 0, "fade_out_start": null }
}
}
Beside the score: it heard G major (written: G major), 3/4 (3/4), 145 bpm (144) and 32 downbeats (32 bars). Its downbeats fall a median of 76 ms after the written bar lines, and the worst is 464 ms off. The piece was played at a fixed 144: the few bpm the tempo map moves are the tracker's, not the music's, so on a steady recording take bpm and keep the map for one that drifts.
What comes back
key: its name, its root as a number (C is 0), major or minor, and a confidence from 0 to 1.bpmandtempo_map: one tempo for the recording, and the tempo at points along it.meter,beats_per_baranddownbeats: how it is counted, and the time of each bar's first beat in seconds.sections: where the music changes, in seconds and in beats.chords: each chord with its start and end in seconds and in beats, and a confidence.dynamics,cuesandgaps: fades at either end, and the stretches of music in the file with the silences between them, each stretch with its own tempo, key and level.
A result link from another job is accepted as audio_url, so a stem from a separation can be analysed without downloading it.
The grid and the chart, on their own
Two more jobs return one thing each, from the same input:
{
"kind": "beat_grid",
"input": { "audio_url": "https://doseedo.com/static/game/market-waltz/loop.flac" }
}
{
"kind": "detect_chords",
"input": { "audio_url": "https://doseedo.com/static/game/market-waltz/loop.flac" }
}
beat_grid: every beat and every downbeat in seconds, the tempo, and the beats in a bar. On the same file: 143.55 bpm, 96 beats and 32 downbeats, counted in three, every beat within 93 ms of where it was written (a median of 58 ms late), in 1.4 seconds. It is the job to use when the grid is what you need.detect_chords: a chord chart as spans, in seconds and in beats. On the same file: 38 spans, beginning G, G, G7, Gmaj7, in 4.6 seconds. It counted this waltz in four where the other two counted three: take the meter from them."deep": falseswaps its detector for a faster, plainer one.
A file on your machine
A file that is not at a public URL goes up in two calls, and its key is passed as audio_key:
# 1. Ask for an upload slot
curl -s -X POST https://api.doseedo.com/api/jobs/uploads \
-H "X-API-Key: $DOO_API_KEY" -H 'Content-Type: application/json' \
-d '{"filename":"song.wav"}'
# → { "key": "ingest/…", "upload_url": "https://…", "headers": { "Content-Type": "audio/wav" }, "input_param": "audio_key" }
# 2. PUT the bytes to upload_url, with that Content-Type
curl -s -X PUT -H 'Content-Type: audio/wav' --data-binary @song.wav "$UPLOAD_URL"
# 3. Pass the key to the job as input.audio_key
curl -s -X POST https://api.doseedo.com/api/jobs \
-H "X-API-Key: $DOO_API_KEY" -H 'Content-Type: application/json' \
-d '{"kind":"analyze_song","input":{"audio_key":"ingest/…"}}'
WAV, MP3, FLAC, AIFF, M4A, OGG or Opus.
What it costs
The analysis jobs cost no credits, on every plan including the free one. They count against a daily fair-use allowance instead, and they need an account and a key. The jobs that make audio are the ones that spend credits:
One credit pool pays for every job. A free account has 120 credits a month; Pro is $12 a month with 2,000, plus one-time extra usage (500 credits for $5). The quote endpoint prices a call before you make it, a refused call spends nothing, and a failed job is refunded.
Limits
- You send the audio. Nothing is looked up by a song's title, an ISRC or a streaming service's track id: the job measures the file or the URL you give it.
- Measurements, not labels. Key, tempo, meter, beats, sections, chords and level. No mood, energy or danceability score.
- An estimate, with its confidence. The numbers above are one clean recording's, not a benchmark. A recording with no steady pulse has no single tempo, and a low-confidence chord is a draft.
- A dense mix blurs its chords. For a chart you can trust, separate the mix first and chart the stem that carries the harmony.
- Asynchronous, though quick. Usually 5 to 25 s, by the catalog: submit, then long-poll.
- Server to server. Call the API from your server, not from a web page on another site: the key is a secret, and the API does not answer browsers on other origins.
An audio analysis API
Audio analysis API, BPM and key detection API, chord detection API and beat tracking API name the same family of jobs: a recording goes in, and what a musician would say about it comes out as JSON.
Analyse your first recording
Make a key and post a URL. The analysis jobs cost no credits.
Get an API key →FAQ
Is there an API that detects the key and BPM of a song?
Yes. Doseedo's analyze_song job takes a recording by URL or upload and returns its key with a confidence, its tempo and a tempo map, its meter, its downbeats, its sections and its chords as JSON. beat_grid returns every beat, and detect_chords a chord chart.
Is it free?
The analysis jobs cost no credits on any plan, including the free one. They need an account and a key, and a daily fair-use allowance applies.
Can it analyse a song from its title or a streaming link?
No. It measures audio you send: a file you upload, or a public URL of the audio itself. It does not look a song up by its title, by an ISRC or by a streaming service's track id.
Does it return mood, energy or danceability?
No. It returns what can be measured in the music: key, tempo, meter, beats, sections, chords and level. There are no mood or popularity scores.
How accurate is it?
On the recording this page analyses, a 32-bar waltz whose score is known (G major, 3/4, 144 bpm, 32 bars), analyze_song returned G major, 3/4 and 145 bpm, and beat_grid put every beat within 93 milliseconds of where it was written. That is one clean recording, not a benchmark: every answer carries a confidence, and a dense or free-tempo recording is harder.
Can it find the chords of a full mix?
It returns a chart for any recording, with a confidence on each chord. A dense mix blurs the harmony, so for a chart to rely on, separate the mix first and analyse the stem that carries the chords.
The music API · music your code controls
- MIDI to audio APIyour notes, played
- Video soundtrack APIspot, render, lay on the picture
- Stem separation APIa mix in, stems and MIDI out
- Sound effects APIa description in, a WAV out
- Audio analysis APIkey, tempo, beats, chords
- Game music generatorseamless loops, in layers
- The MCP serverthe same jobs for an AI agent
- Every toolthe reference
- Planscredits a month