§ Music API · Audio analysis

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.

Get an API key →OpenAPI 3.1The job catalog

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

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" }
}

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

§ Same job, any name

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.

InA song or any recording: a public URL of the audio, or an upload.
OutIts key with a confidence, its tempo and a tempo map, its meter, every beat and downbeat in seconds, its sections and a chord chart.
Also searched asaudio analysis api · music analysis api · bpm detection api · key detection api · bpm and key detection api · tempo detection api · song key api · chord detection api · chord recognition api · beat tracking api · beat detection api · downbeat detection api · audio features api

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

By job
For games
Also

Related