§ Music API · For developers

AI music API

Published November 2026

One HTTP API for music your code controls: send notes, or direct a band generator, and every part comes back played on its own stem.

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 request, one job

Make a key at Settings → API keys and send it as X-API-Key (or Authorization: Bearer):

export DOO_API_KEY=dsk_live_...

Every job is one POST with a kind and its input. This one plays three notes on a cello:

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: cello-phrase-v1' \
  -d '{
  "kind": "render_midi",
  "input": {
    "instrument": "cello",
    "bpm": 72,
    "notes": [
      { "pitch": 48, "start_beats": 0, "duration_beats": 2 },
      { "pitch": 55, "start_beats": 2, "duration_beats": 2 },
      { "pitch": 52, "start_beats": 4, "duration_beats": 4 }
    ]
  }
}'

The reply is the job, "status": "queued", with an estimate of its credits and its time. Long-poll it until it finishes:

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 16, 2026: queued to finished in 15 seconds, for 10 credits.

{
  "object": "job",
  "kind": "render_midi",
  "status": "succeeded",
  "output": {
    "duration": 8.67,
    "seed": 2141978659,
    "takes": [
      { "url": "https://api.doseedo.com/api/files/…/take1.wav", "rank": 1, "score": 0.6223 },
      { "url": "https://api.doseedo.com/api/files/…/take2.wav", "rank": 2, "score": 0.5845 },
      { "url": "https://api.doseedo.com/api/files/…/take3.wav", "rank": 3, "score": 0.559 }
    ]
  },
  "artifacts": [
    { "name": "files_0", "type": "audio", "url": "…/take1.wav", "expires_at": "2026-11-17T21:00:00.000Z" }
  ]
}

Result links are pre-signed: download them with a plain GET and no header. They last 24 hours, and a result link is accepted as the audio_url of a later job.

The same call in Python and JavaScript

There is nothing to install: it is JSON over HTTPS. In Python, with requests:

import os, requests

API = "https://api.doseedo.com"
H = {"X-API-Key": os.environ["DOO_API_KEY"]}

def run(kind, input, key=None):
    """Submit a job and long-poll it to the end. Returns the finished job."""
    r = requests.post(f"{API}/api/jobs", json={"kind": kind, "input": input},
                      headers={**H, **({"Idempotency-Key": key} if key else {})})
    job = r.json()
    if r.status_code >= 400:
        raise SystemExit(job["error"])
    while job["status"] in ("queued", "running"):
        job = requests.get(f"{API}/api/jobs/{job['id']}", headers=H, params={"wait": 50}).json()
    if job["status"] != "succeeded":
        raise SystemExit(job["error"])
    return job

job = run("render_midi", {
    "instrument": "cello",
    "bpm": 72,
    "notes": [
        {"pitch": 48, "start_beats": 0, "duration_beats": 2},
        {"pitch": 55, "start_beats": 2, "duration_beats": 2},
        {"pitch": 52, "start_beats": 4, "duration_beats": 4},
    ],
}, key="cello-phrase-v1")

best = job["output"]["takes"][0]["url"]          # takes are ranked, best first
open("cello.wav", "wb").write(requests.get(best).content)

In JavaScript, with the fetch built into Node 18 and later:

const API = "https://api.doseedo.com";
const H = { "X-API-Key": process.env.DOO_API_KEY, "Content-Type": "application/json" };

async function run(kind, input, key) {
  const r = await fetch(`${API}/api/jobs`, {
    method: "POST",
    headers: key ? { ...H, "Idempotency-Key": key } : H,
    body: JSON.stringify({ kind, input }),
  });
  let job = await r.json();
  if (!r.ok) throw new Error(job.error.message);
  while (job.status === "queued" || job.status === "running") {
    job = await (await fetch(`${API}/api/jobs/${job.id}?wait=50`, { headers: H })).json();
  }
  if (job.status !== "succeeded") throw new Error(job.error.message);
  return job;
}

const job = await run("render_midi", {
  "instrument": "cello",
  "bpm": 72,
  "notes": [
    { "pitch": 48, "start_beats": 0, "duration_beats": 2 },
    { "pitch": 55, "start_beats": 2, "duration_beats": 2 },
    { "pitch": 52, "start_beats": 4, "duration_beats": 4 }
  ]
}, "cello-phrase-v1");

console.log(job.output.takes[0].url);            // takes are ranked, best first

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.

What your code controls

A band generator, by id. This one writes a town theme for a game, sixteen bars that are written to loop:

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: town-theme-v1' \
  -d '{
  "kind": "render_score",
  "input": {
    "bpm": 96,
    "generator": { "id": "game_town", "bars": 16, "seed": 7 }
  }
}'

Run on November 16, 2026: it wrote six parts (flute, harp, pizzicato violins, violas and cellos, and basses), every part passed its check against its notes, and the six stems and a mix came back 77 seconds after the submit, for 20 credits. GET https://api.doseedo.com/api/generate/generators lists the generators, with no key. One more job mixes a piece as a loop, with every part as a layer: the game page plays one.

The jobs

kindInOutFromUsually takes
render_midiOne part: notes or a MIDI file, and an instrumentThat part played, as ranked takes10 credits per 30 s45 s to 3 min
render_scoreA whole score: parts, a file, or a band generatorEvery part as its own stem, and a mix10 credits per 30 s for each group of up to six parts60 s to 6 min
generate_loopA drum generator, bars, tempo, a seedA drum loop that repeats seamlessly, and its MIDI10 credits per 30 s3 to 20 s
generate_soundA descriptionA sound effect, foley or an ambience10 credits per 30 s15 to 60 s
mixStems, or the id of a renderA mixed and mastered WAV, and what was doneNo credits15 s to 2 min
separate_stemsA mixed recordingIts stems, and each stem's notes as MIDI20 credits60 s to 4 min
transcribeA recording of one instrumentIts notes as MIDINo credits10 to 60 s
spot_videoA videoA cue sheet: cuts, scenes, dialogue, cues with timecodesNo credits20 s to 10 min
score_to_pictureA video and mixed cuesThe scored video, a printmaster and an M&ENo credits15 s to 5 min

There are 29 kinds in all, among them covers, custom instruments, DAW sessions and DAW project conversion. GET https://api.doseedo.com/api/jobs/kinds returns each with its input schema, its price and its typical time, and the OpenAPI document describes the whole surface. Neither needs a key.

Built for a pipeline

What people build on it

What it costs

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.

On a free account a render of several parts comes back as its mix: each part as its own stem comes with Pro. A one-part render, a separation and every analysis job are the same on every plan.

Limits

The same jobs for an AI agent, and from a terminal

Every job here is also a tool on a hosted MCP server, https://api.doseedo.com/mcp, so an assistant such as Claude or ChatGPT can call them with no code of yours: see the MCP server. And npm install -g @doseedo/cli puts the same jobs in a terminal as doo.

§ Same job, any name

An AI music API

AI music API, music generation API, music API for developers and AI instrument API name the same thing here: one HTTP API where your code sends notes, or directs a band generator, and gets every part back played as audio.

InNotes as JSON, a MIDI or MusicXML file, or a band generator's id with a length, a tempo, a key and a seed.
OutEvery part played on its own stem by one of 100+ AI instruments, a mix, and each job as a JSON resource you can poll, stream or receive by webhook.
Also searched asai music api · music generation api · ai music generation api · music api for developers · ai instrument api · generative music api · controllable music api · music api for games · music api for apps · ai music api with stems · ai music rest api · ai music api free

Start with one call

Make a key, send three notes, and hear them played. A free account has 120 credits a month.

Get an API key →

FAQ

Is there an AI music API with a free tier?

Yes. A free Doseedo account has 120 credits a month, the same pool the website uses; a 30-second render of one part is 10 credits. The job catalog, a quote and the OpenAPI document need no key.

Does it generate music from a text prompt?

It can make a short sketch from a prompt, but that is not what the API is for. Its point is control: you send the notes, or direct a band generator by genre, length, key and seed, and each part is played and returned on its own.

Do I get stems?

Yes. Every part is rendered on its own and returned as its own file. On a free account a render of several parts comes back as its mix; each part as its own stem comes with Pro.

Is it real time?

No. Every job is asynchronous: you submit, then long-poll, stream events or wait for a webhook. A short part takes seconds and a score of many parts a minute or more.

Can I use the audio commercially?

You own what you make, to the extent the law allows, on every plan including the free one (Terms §6.3).

Is there an SDK?

There is no client library to install: it is JSON over HTTPS, with an OpenAPI 3.1 document to generate a client from. The same jobs are also MCP tools for an AI agent, and a command-line tool on npm.

The music API · music your code controls

By job
For games
Also

Related