bandmixr®

White-Label API

Masters and mixes from your own software, paid with your box's tokens.

What it is

Your own software makes masters and mixes with Bandmixr: an upload flow, a label's tools, a plugin. Every song is paid with your box's tokens.

Base address
https://bandmixr.com/api/v1/partner
Your key
In every request, as Authorization: Bearer <key>. Make it in your box's setup, in its part API. It is shown once: keep it on your server, since the API answers no browser.
Answers
JSON. A success has "success": true and its data; a refusal has "success": false, a message and an errorCode.
What it costs
A song's first download takes one of your box's tokens. Starting, uploading, mastering, mixing and listening are free. A started song holds one token until then, so a box without a free token starts no song.

Every example below starts from this set-up.

export BANDMIXR_API_KEY='<your key>'

A master in four calls

One finished file in, its master out.

  1. Start a master

    kind is "master"; title and genre are optional. The song waits 2 hours for its file.

    curl https://bandmixr.com/api/v1/partner/songs \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"kind": "master", "title": "Night Drive", "genre": "pop"}'
    Answer 201 CreatedPOST /songs
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f0c2a1b2c3d4e5f60718",
          "kind": "master",
          "title": "Night Drive",
          "genre": "pop",
          "state": "waitingForFiles",
          "progress": null,
          "failureCode": null,
          "stems": [],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-11-29T12:00:00.000Z"
        }
      }
    }
  2. Upload the file

    Name the file and its size in bytes. Send it in the chunks the answer names, as raw bytes, then complete it. The song is ready and stands 7 days.

    SONG=6650f0c2a1b2c3d4e5f60718
    wc -c < 'Night Drive.wav'   # the size in bytes: 42336044
    
    curl https://bandmixr.com/api/v1/partner/songs/$SONG/uploads \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"fileName": "Night Drive.wav", "fileSize": 42336044}'
    
    UPLOAD=6650f0c9a1b2c3d4e5f60721
    split -b 5242880 'Night Drive.wav' chunk-   # chunks of the chunkSize the answer names
    index=0
    for chunk in chunk-*; do
      curl -X PUT https://bandmixr.com/api/v1/partner/songs/$SONG/uploads/$UPLOAD/chunks/$index \
        -H "Authorization: Bearer $BANDMIXR_API_KEY" \
        -H "Content-Type: application/octet-stream" \
        --data-binary @"$chunk"
      index=$((index + 1))
    done
    
    curl -X POST https://bandmixr.com/api/v1/partner/songs/$SONG/uploads/$UPLOAD/complete \
      -H "Authorization: Bearer $BANDMIXR_API_KEY"
    Answer 201 CreatedPOST /songs/{songId}/uploads
    {
      "success": true,
      "data": {
        "uploadId": "6650f0c9a1b2c3d4e5f60721",
        "chunkSize": 5242880,
        "chunkCount": 9
      }
    }
    Answer 200 OKPUT /songs/{songId}/uploads/{uploadId}/chunks/0
    {
      "success": true,
      "data": {
        "receivedChunks": [
          0
        ],
        "chunkCount": 9,
        "complete": false
      }
    }
    Answer 200 OKPOST /songs/{songId}/uploads/{uploadId}/complete
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f0c2a1b2c3d4e5f60718",
          "kind": "master",
          "title": "Night Drive",
          "genre": "pop",
          "state": "ready",
          "progress": null,
          "failureCode": null,
          "stems": [],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
  3. Master it

    The song is working until its master is there. genre may be set here too.

    curl -X POST https://bandmixr.com/api/v1/partner/songs/$SONG/master \
      -H "Authorization: Bearer $BANDMIXR_API_KEY"
    Answer 202 AcceptedPOST /songs/{songId}/master
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f0c2a1b2c3d4e5f60718",
          "kind": "master",
          "title": "Night Drive",
          "genre": "pop",
          "state": "working",
          "progress": null,
          "failureCode": null,
          "stems": [],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
  4. Wait, then download

    Read the song every 5 seconds until it is done. Then ask for the link of its master as WAV, FLAC or MP3, and fetch the file within 5 minutes. This first download takes one token; the same result downloads again for free, in any format.

    curl https://bandmixr.com/api/v1/partner/songs/$SONG \
      -H "Authorization: Bearer $BANDMIXR_API_KEY"
    
    RESULT=6650f10ba1b2c3d4e5f6073c   # the result whose version is "mastered"
    curl https://bandmixr.com/api/v1/partner/songs/$SONG/results/$RESULT/download \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"version": "mastered", "format": "wav"}'
    
    curl -o 'Night Drive (master).wav' '<the url of the answer>'
    Answer 200 OKGET /songs/{songId}
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f0c2a1b2c3d4e5f60718",
          "kind": "master",
          "title": "Night Drive",
          "genre": "pop",
          "state": "done",
          "progress": null,
          "failureCode": null,
          "stems": [],
          "results": [
            {
              "id": "6650f10ba1b2c3d4e5f6073c",
              "version": "mastered",
              "downloadable": true
            }
          ],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
    Answer 200 OKPOST /songs/{songId}/results/{resultId}/download
    {
      "success": true,
      "data": {
        "url": "https://bandmixr.com/api/v1/box/…/songs/6650f0c2a1b2c3d4e5f60718/downloads/6650f10ba1b2c3d4e5f6073c?version=mastered&format=wav&d=…",
        "expiresAt": "2026-11-29T10:09:00.000Z"
      }
    }

The whole master in one script

Save it as master.py or master.mjs and run it with your key in BANDMIXR_API_KEY: Python 3 with requests, or Node 18 or newer.

import os
import time

import requests

API = "https://bandmixr.com/api/v1/partner"
KEY = os.environ["BANDMIXR_API_KEY"]


def call(method, path, json=None, data=None):
    """One request of the API: answers its data, or stops with its errorCode."""
    headers = {"Authorization": f"Bearer {KEY}"}
    if data is not None:
        headers["Content-Type"] = "application/octet-stream"
    response = requests.request(
        method, API + path, headers=headers, json=json, data=data, timeout=120
    )
    answer = response.json() if response.content else {}
    if not response.ok:
        raise RuntimeError(f"{answer.get('errorCode')}: {answer.get('message')}")
    return answer.get("data")


start = {"kind": "master", "title": "Night Drive", "genre": "pop"}
song = call("POST", "/songs", json=start)["song"]


def upload(song_id, path):
    """Sends a file in the chunks the API names; answers the song once the file is whole."""
    size = os.path.getsize(path)
    start = call("POST", f"/songs/{song_id}/uploads",
                 json={"fileName": os.path.basename(path), "fileSize": size})
    route = f"/songs/{song_id}/uploads/{start['uploadId']}"
    with open(path, "rb") as file:
        for index in range(start["chunkCount"]):
            call("PUT", f"{route}/chunks/{index}", data=file.read(start["chunkSize"]))
    return call("POST", f"{route}/complete")["song"]


song = upload(song["id"], "Night Drive.wav")


call("POST", f"/songs/{song['id']}/master")


def wait_until_done(song_id):
    """Reads the song every 5 seconds until it is done or failed."""
    while True:
        song = call("GET", f"/songs/{song_id}")["song"]
        if song["state"] in ("done", "failed"):
            return song
        time.sleep(5)


song = wait_until_done(song["id"])
if song["state"] == "failed":
    raise RuntimeError(f"The master failed: {song['failureCode']}")
result = next(each for each in song["results"] if each["version"] == "mastered")
link = call("POST", f"/songs/{song['id']}/results/{result['id']}/download",
            json={"version": "mastered", "format": "wav"})
with open("Night Drive (master).wav", "wb") as file:
    file.write(requests.get(link["url"], timeout=600).content)

A mix from stems in five calls

Separate tracks in, a mix and its master out.

  1. Start a mix

    kind is "mix"; title and genre are optional.

    curl https://bandmixr.com/api/v1/partner/songs \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"kind": "mix", "title": "Night Drive", "genre": "rock_indie"}'
    Answer 201 CreatedPOST /songs
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f3a7a1b2c3d4e5f60800",
          "kind": "mix",
          "title": "Night Drive",
          "genre": "rock_indie",
          "state": "waitingForFiles",
          "progress": null,
          "failureCode": null,
          "stems": [],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
  2. Upload each stem

    One upload for each file, as for a master: up to 24 stems. Bandmixr guesses each stem's label while it analyses it.

    SONG=6650f3a7a1b2c3d4e5f60800
    # For each stem, as in "Upload the file" of a master:
    # start its upload, send its chunks, complete it.
    curl https://bandmixr.com/api/v1/partner/songs/$SONG/uploads \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"fileName": "Drums.wav", "fileSize": 38211596}'
    Answer 200 OKPOST /songs/{songId}/uploads/{uploadId}/complete
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f3a7a1b2c3d4e5f60800",
          "kind": "mix",
          "title": "Night Drive",
          "genre": "rock_indie",
          "state": "checkingLabels",
          "progress": null,
          "failureCode": null,
          "stems": [
            {
              "id": "6650f3b1a1b2c3d4e5f60811",
              "fileName": "Drums.wav",
              "label": "drum_bus",
              "labelOrigin": "guessed",
              "analysis": "pending"
            },
            {
              "id": "6650f3b6a1b2c3d4e5f60812",
              "fileName": "Bass.wav",
              "label": "bass_electric",
              "labelOrigin": "guessed",
              "analysis": "pending"
            },
            {
              "id": "6650f3bca1b2c3d4e5f60813",
              "fileName": "Lead Vocal.wav",
              "label": "vocal_backing",
              "labelOrigin": "guessed",
              "analysis": "pending"
            }
          ],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
  3. Check the labels

    Read the song until no stem's analysis is "pending", then change a label that is wrong. A label decides how its stem is mixed.

    curl https://bandmixr.com/api/v1/partner/songs/$SONG \
      -H "Authorization: Bearer $BANDMIXR_API_KEY"
    
    STEM=6650f3bca1b2c3d4e5f60813   # the stem whose label is wrong
    curl -X PATCH https://bandmixr.com/api/v1/partner/songs/$SONG/stems/$STEM \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"label": "vocal_lead"}'
    Answer 200 OKGET /songs/{songId}
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f3a7a1b2c3d4e5f60800",
          "kind": "mix",
          "title": "Night Drive",
          "genre": "rock_indie",
          "state": "checkingLabels",
          "progress": null,
          "failureCode": null,
          "stems": [
            {
              "id": "6650f3b1a1b2c3d4e5f60811",
              "fileName": "Drums.wav",
              "label": "drum_bus",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3b6a1b2c3d4e5f60812",
              "fileName": "Bass.wav",
              "label": "bass_electric",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3bca1b2c3d4e5f60813",
              "fileName": "Lead Vocal.wav",
              "label": "vocal_backing",
              "labelOrigin": "guessed",
              "analysis": "done"
            }
          ],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
    Answer 200 OKPATCH /songs/{songId}/stems/{stemId}
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f3a7a1b2c3d4e5f60800",
          "kind": "mix",
          "title": "Night Drive",
          "genre": "rock_indie",
          "state": "checkingLabels",
          "progress": null,
          "failureCode": null,
          "stems": [
            {
              "id": "6650f3b1a1b2c3d4e5f60811",
              "fileName": "Drums.wav",
              "label": "drum_bus",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3b6a1b2c3d4e5f60812",
              "fileName": "Bass.wav",
              "label": "bass_electric",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3bca1b2c3d4e5f60813",
              "fileName": "Lead Vocal.wav",
              "label": "vocal_lead",
              "labelOrigin": "set",
              "analysis": "done"
            }
          ],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
  4. Mix and master

    The labels count as they stand, and the mix and its master are made. While the mix is made, progress goes from 0 to 100.

    curl -X POST https://bandmixr.com/api/v1/partner/songs/$SONG/mix \
      -H "Authorization: Bearer $BANDMIXR_API_KEY"
    Answer 202 AcceptedPOST /songs/{songId}/mix
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f3a7a1b2c3d4e5f60800",
          "kind": "mix",
          "title": "Night Drive",
          "genre": "rock_indie",
          "state": "working",
          "progress": null,
          "failureCode": null,
          "stems": [
            {
              "id": "6650f3b1a1b2c3d4e5f60811",
              "fileName": "Drums.wav",
              "label": "drum_bus",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3b6a1b2c3d4e5f60812",
              "fileName": "Bass.wav",
              "label": "bass_electric",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3bca1b2c3d4e5f60813",
              "fileName": "Lead Vocal.wav",
              "label": "vocal_lead",
              "labelOrigin": "set",
              "analysis": "done"
            }
          ],
          "results": [],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }
  5. Wait, then download

    As for a master. version is "mastered" for the master or "mixed" for the mix before it: the result a song paid for downloads again as either, in any format.

    curl https://bandmixr.com/api/v1/partner/songs/$SONG/results/6650f10ba1b2c3d4e5f6073c/download \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"version": "mastered", "format": "wav"}'
    Answer 200 OKGET /songs/{songId}
    {
      "success": true,
      "data": {
        "song": {
          "id": "6650f3a7a1b2c3d4e5f60800",
          "kind": "mix",
          "title": "Night Drive",
          "genre": "rock_indie",
          "state": "done",
          "progress": null,
          "failureCode": null,
          "stems": [
            {
              "id": "6650f3b1a1b2c3d4e5f60811",
              "fileName": "Drums.wav",
              "label": "drum_bus",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3b6a1b2c3d4e5f60812",
              "fileName": "Bass.wav",
              "label": "bass_electric",
              "labelOrigin": "guessed",
              "analysis": "done"
            },
            {
              "id": "6650f3bca1b2c3d4e5f60813",
              "fileName": "Lead Vocal.wav",
              "label": "vocal_lead",
              "labelOrigin": "set",
              "analysis": "done"
            }
          ],
          "results": [
            {
              "id": "6650f10ba1b2c3d4e5f6073c",
              "version": "mixed",
              "downloadable": true
            },
            {
              "id": "6650f10ba1b2c3d4e5f6073c",
              "version": "mastered",
              "downloadable": true
            }
          ],
          "paid": false,
          "createdAt": "2026-11-29T10:00:00.000Z",
          "expiresAt": "2026-12-06T10:00:00.000Z"
        }
      }
    }

The whole mix in one script

Save it as mix.py or mix.mjs and run it with your key in BANDMIXR_API_KEY: Python 3 with requests, or Node 18 or newer.

import os
import time

import requests

API = "https://bandmixr.com/api/v1/partner"
KEY = os.environ["BANDMIXR_API_KEY"]


def call(method, path, json=None, data=None):
    """One request of the API: answers its data, or stops with its errorCode."""
    headers = {"Authorization": f"Bearer {KEY}"}
    if data is not None:
        headers["Content-Type"] = "application/octet-stream"
    response = requests.request(
        method, API + path, headers=headers, json=json, data=data, timeout=120
    )
    answer = response.json() if response.content else {}
    if not response.ok:
        raise RuntimeError(f"{answer.get('errorCode')}: {answer.get('message')}")
    return answer.get("data")


start = {"kind": "mix", "title": "Night Drive", "genre": "rock_indie"}
song = call("POST", "/songs", json=start)["song"]


def upload(song_id, path):
    """Sends a file in the chunks the API names; answers the song once the file is whole."""
    size = os.path.getsize(path)
    start = call("POST", f"/songs/{song_id}/uploads",
                 json={"fileName": os.path.basename(path), "fileSize": size})
    route = f"/songs/{song_id}/uploads/{start['uploadId']}"
    with open(path, "rb") as file:
        for index in range(start["chunkCount"]):
            call("PUT", f"{route}/chunks/{index}", data=file.read(start["chunkSize"]))
    return call("POST", f"{route}/complete")["song"]


for path in ["Drums.wav", "Bass.wav", "Lead Vocal.wav"]:
    song = upload(song["id"], path)


while any(stem["analysis"] == "pending" for stem in song["stems"]):
    time.sleep(5)
    song = call("GET", f"/songs/{song['id']}")["song"]

labels = {"Lead Vocal.wav": "vocal_lead"}
for stem in song["stems"]:
    label = labels.get(stem["fileName"])
    if label and label != stem["label"]:
        route = f"/songs/{song['id']}/stems/{stem['id']}"
        song = call("PATCH", route, json={"label": label})["song"]


call("POST", f"/songs/{song['id']}/mix")


def wait_until_done(song_id):
    """Reads the song every 5 seconds until it is done or failed."""
    while True:
        song = call("GET", f"/songs/{song_id}")["song"]
        if song["state"] in ("done", "failed"):
            return song
        time.sleep(5)


song = wait_until_done(song["id"])
if song["state"] == "failed":
    raise RuntimeError(f"The mix failed: {song['failureCode']}")
result = next(each for each in song["results"] if each["version"] == "mastered")
link = call("POST", f"/songs/{song['id']}/results/{result['id']}/download",
            json={"version": "mastered", "format": "wav"})
with open("Night Drive (mix).wav", "wb") as file:
    file.write(requests.get(link["url"], timeout=600).content)

Codes for your box

Your website makes a code for each artist, hands it to your box, and stops it when they leave. The artist never types a code.

  1. Make a code

    When an artist buys a song or joins your plan, ask for a code. Each value is optional: count codes (1 to 200) of songs each (1 to 100), both 1 by default; with everyMonth the songs come back every month; validFor is oneMonth, threeMonths, oneYear or noEnd, the default.

    curl https://bandmixr.com/api/v1/partner/codes \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"songs": 5, "everyMonth": true}'
    Answer 201 CreatedPOST /codes
    {
      "success": true,
      "data": {
        "codes": [
          {
            "code": "ABCD-EFGH-JKLM",
            "songs": 5,
            "everyMonth": true,
            "validUntil": null
          }
        ]
      }
    }
  2. Hand it to your box

    Put your box's line on the artist's own page, with their code after #code= in its address. The part after # never reaches Bandmixr's server. The box keeps the code and starts songs with it without asking.

    HTML
    <!-- Your box's line, with the artist's code after #code= -->
    <iframe
      src="https://bandmixr.com/box/YOUR_BOX_ID#code=ABCD-EFGH-JKLM"
      title="Studio"
      style="width:100%;max-width:960px;height:760px;border:0;color-scheme:light"
      allow="fullscreen"
      loading="lazy"
    ></iframe>
  3. Stop a code

    When an artist leaves, stop their code. It starts no new songs; the songs it started still open. A code the box does not hold answers NOT_FOUND; one stopped already, used up or past its end, CONFLICT.

    curl https://bandmixr.com/api/v1/partner/codes/stop \
      -H "Authorization: Bearer $BANDMIXR_API_KEY" \
      -H "Content-Type: application/json" \
      -d '{"code": "ABCD-EFGH-JKLM"}'
    Answer 200 OKPOST /codes/stop
    {
      "success": true,
      "data": {
        "code": "ABCD-EFGH-JKLM",
        "stopped": true
      }
    }

Every route

Each path below follows https://bandmixr.com/api/v1/partner. A body is JSON; a chunk is raw bytes.

  • POST/songs

    Starts a song in the key's box. It holds one of the box's tokens until its first download or its end.

    Takes
    • kind: "master" for one finished file, "mix" for stems
    • title: optional, one line of 1 to 100 characters
    • genre: optional, one of the genres below; it sets the loudness of the master

    Answers 201 with song.

  • GET/songs

    The box's songs made through the API that still stand, newest first, a page at a time.

    Takes
    • page: from 1
    • limit: 1 to 50, 20 when left out

    Answers songs (each with id, kind, title, genre, paid, createdAt and expiresAt), page, limit and total.

  • GET/songs/{songId}

    One song with its state, its stems and its results.

    Answers song.

  • DELETE/songs/{songId}

    Deletes the song and its files at once, a paid song too.

    Answers 204 without a body.

  • POST/songs/{songId}/uploads

    Starts the upload of one file: a master takes one, a mix one for each stem.

    Takes
    • fileName: its ending tells the type: .wav, .flac, .mp3, .aif or .aiff
    • fileSize: in bytes

    Answers 201 with uploadId, chunkSize and chunkCount.

  • PUT/songs/{songId}/uploads/{uploadId}/chunks/{index}

    One chunk of the file, as raw bytes with Content-Type: application/octet-stream. Chunk index starts at byte index × chunkSize; each is chunkSize bytes but the last. Chunks may come in any order, and a chunk may be sent again.

    Takes
    • the chunk's bytes as the body

    Answers receivedChunks, chunkCount, and complete once every chunk arrived.

  • POST/songs/{songId}/uploads/{uploadId}/complete

    The file is whole. A master is then ready; a mix lists the stem with the label Bandmixr guessed.

    Answers song.

  • PATCH/songs/{songId}/stems/{stemId}

    Changes a stem's label before the mix.

    Takes
    • label: one of the labels below

    Answers song.

  • POST/songs/{songId}/master

    Masters the song's file.

    Takes
    • genre: optional

    Answers 202 with song, working.

  • POST/songs/{songId}/mix

    Takes the stems' labels as they stand and makes the mix and its master.

    Takes
    • genre: optional

    Answers 202 with song, working.

  • POST/songs/{songId}/results/{resultId}/listen

    A free link to listen to a result, with your box's chime. It works for an hour.

    Takes
    • version: "mastered" or "mixed"

    Answers url and expiresAt.

  • POST/songs/{songId}/results/{resultId}/download

    A link to the clean file of a result. It works for 5 minutes. The song's first download takes one token; the result it paid for downloads again for free, as either version and in any format, and another result of the song does not.

    Takes
    • version: "mastered" or "mixed"
    • format: "wav", "flac" or "mp3"

    Answers url and expiresAt.

  • POST/codes

    Makes codes for the key's box, which open it like the codes of its setup.

    Takes
    • count: optional, 1 to 200 codes, 1 when left out
    • songs: optional, the songs each code starts, 1 to 100, 1 when left out
    • everyMonth: optional, true for codes that get their songs again every month, on the day and at the time they were made; false when left out
    • validFor: optional, "oneMonth", "threeMonths", "oneYear" or "noEnd", the default

    Answers 201 with codes, each with code, songs, everyMonth and validUntil (null for a code without an end).

  • POST/codes/stop

    Stops one code of the key's box: it starts no new song from then on, and the box's other codes stay as they are.

    Takes
    • code: the code as it was made; small letters are taken too

    Answers code and stopped.

The song

  • id, kind ("master" or "mix"), title and genre
  • state, and progress from 0 to 100 while a mix is made (otherwise null)
  • failureCode: why a failed song failed, one of the codes under Errors
  • stems: a mix's stems, each with id, fileName, label, labelOrigin ("guessed" by Bandmixr, "set" by you, "unknown" before a guess) and analysis ("pending", "done" or "failed")
  • results: each version there is, with the result's id, its version and whether it is downloadable now
  • paid: whether its first download took a token
  • createdAt and expiresAt: when it started and when it goes, as ISO 8601 dates

Its states

  • waitingForFiles A master without its file, a mix without a stem.
  • checkingLabels A mix whose stems arrived, until /mix; again when its labels changed while it waited.
  • ready A master whose file arrived, until /master.
  • working The master or the mix is being made.
  • done The master is there; results lists what downloads.
  • failed It stopped; failureCode says why.

Labels

  • kick
  • snare
  • hihat
  • toms
  • overheads
  • room_mics
  • drum_bus
  • percussion
  • bass_electric
  • bass_acoustic
  • bass_synth
  • guitar_electric_clean
  • guitar_electric_distorted
  • guitar_acoustic
  • guitar_nylon
  • piano
  • organ
  • synth_pad
  • synth_lead
  • keys_other
  • vocal_lead
  • vocal_backing
  • vocal_rap
  • strings
  • brass
  • woodwinds
  • instrumental
  • ambient
  • other

Genres

  • rock_indie
  • pop
  • acoustic
  • hip_hop
  • electronic
  • reggae_dub
  • orchestral
  • metal
  • jazz
  • blues
  • funk_soul
  • punk
  • other

Errors

A refusal has a status, a sentence for people and a code for your program. Branch on errorCode; a VALIDATION_FAILED also lists each wrong value in errors, with its field and message.

409 Conflict
{
  "success": false,
  "message": "Full songs are not available right now.",
  "errorCode": "FULL_SONGS_UNAVAILABLE",
  "requestId": "0f8a51d2-6c1e-4f0b-9a57-3a2f7c9e1b44"
}
  • NOT_FOUND404No such route, song, stem, result or upload, or a code to stop that the box does not hold.
  • API_KEY_INVALID401No key, a key of the wrong form, or a key that is unknown or revoked.
  • BOX_SWITCHED_OFF403The key's box is switched off.
  • BOXES_SWITCHED_OFF403Boxes are switched off on Bandmixr.
  • TOO_MANY_REQUESTS429The key's or the address's requests for the minute are used up. Wait the seconds Retry-After names.
  • VALIDATION_FAILED400A value is missing or wrong; errors names each one.
  • BAD_REQUEST400A request that cannot be read otherwise, such as a chunk without bytes.
  • FORBIDDEN403A refusal of another kind.
  • CONFLICT409A code to stop that is stopped already, used up or past its end, or a conflict of another kind.
  • SERVER_ERROR500Bandmixr failed. The request may be sent again later.
  • MIXING_NOT_OFFERED403A mix in a box that offers mastering alone.
  • FULL_SONGS_UNAVAILABLE409No token is free for a new song, or the pile is empty at a first download.
  • TOO_MANY_SONGS429The box started its songs for the hour.
  • WRONG_SONG_KIND409A route of a master asked of a mix, or of a mix asked of a master.
  • SONG_HAS_FILE409A master takes one file, and it has it or is receiving it.
  • NO_FILE409/master before the song's file arrived.
  • NO_STEMS409/mix before any stem arrived.
  • SONG_BUSY409Work is running on the song.
  • LIMIT_REACHED429The song's masters and mixes for the hour are used up.
  • TOO_MANY_UPLOADS429Three uploads of the song are running already.
  • FILE_TYPE400Not WAV, FLAC, MP3 or AIFF.
  • FILE_UNREADABLE400The file holds no audio Bandmixr can read.
  • FILE_SAMPLE_RATE400A sample rate outside 8 to 192 kHz.
  • FILE_CHANNELS400More than two channels: a file is mono or stereo.
  • FILE_TOO_LONG400Longer than 13 minutes.
  • FILE_TOO_LARGE400Larger than 150 MB, or a chunk larger than its size.
  • STEM_COUNT_LIMIT400The song has 24 stems already.
  • STORAGE_FULL400The song's storage is full; also a failed song's reason.
  • UPLOAD_INTERRUPTED400 or 409An upload broke off, or its chunks do not add up. Upload the file again.
  • DOWNLOAD_USED409The song paid for another result. Start a new song for this one.
  • VERSION_NOT_READY409The version's file is not there yet.

Why a song failed

A song whose state is failed names its reason as failureCode.

  • MIX_FAILEDThe mix could not be made.
  • MASTER_FAILEDThe master could not be made.
  • ENGINE_DOWNBandmixr's engine could not be reached.
  • STEM_UNREADABLEA stem's audio could not be read, so the mix cannot start.
  • NO_READABLE_STEMSNo stem of the song could be read.
  • STEMS_CHANGEDThe stems changed while the mix was made.
  • FAILEDAny other reason.

Limits

Requests
120 a minute for a key, and 600 a minute for an address. Every answer says where you stand in RateLimit-Policy, RateLimit-Remaining and RateLimit-Reset; a refusal with TOO_MANY_REQUESTS names the seconds to wait in Retry-After.
Songs
A box starts a song only while one of its tokens is free. A box that starts very many songs within an hour is asked to wait, with TOO_MANY_SONGS. Need more? Write to us.
Files
WAV, FLAC, MP3 or AIFF, mono or stereo, from 8 to 192 kHz, up to 150 MB and 13 minutes each. A mix takes up to 24 stems; a song takes up to three uploads at once.
Chunks
Of the chunkSize an upload names, in any order.
How long a song stays
2 hours until its first upload, then until 7 days after its start; once its first download paid for it, a year after that download. Then it goes with its files. DELETE takes it at once.
Links
A download link works for 5 minutes, a listening link for an hour.
Keys
A box has up to 5 working keys. A revoked key stops at once.
Codes
Up to 200 in one request, as count.