Music API

Every route of the music app backend. The Jamendo catalogue is mirrored into SQLite and audio is cached on disk, so the app talks to one host with one response shape.

Base URL

https://music.cloudrx.cyou

All app routes live under /v1. /health, /stats and /openapi.json sit at the root.

Envelope

{ "ok": true, "data": ..., "meta": { ... } }
{ "ok": false, "error": { "code": "...", "message": "..." } }

meta carries limit, offset, total, cached and sometimes stale.

Auth

authorization: Bearer <token>

Get a token from /v1/auth/guest, /v1/auth/register or /v1/auth/login. Tokens last 90 days; /v1/auth/logout revokes all of them.

Paging

?limit=20&offset=0

limit is capped at 100. meta.total is the upstream count when Jamendo reports one.

Caching

x-cache: HIT | MISS

Lists 30 min, details 6 h, genres 7 d, audio 30 d on disk, artwork 60 d on disk. A stale entry is served if Jamendo fails.

Errors

400 bad_request      bad parameter
401 unauthorized     missing or stale token
404 not_found        unknown id or licence blocks download
429 rate_limited     client is too fast
502 upstream_error   Jamendo refused or track has no audio
503 unavailable      upstream cooling down after a 429

Every error body has the same error.code machine name.

Quick start

# browse
curl -s 'https://music.cloudrx.cyou/v1/home' | head -c 400

# guest session, then save a favourite
TOKEN=$(curl -s -X POST 'https://music.cloudrx.cyou/v1/auth/guest' \
  -H 'content-type: application/json' \
  -d '{"deviceId":"android-7f3c9a12b4"}' | node -pe 'JSON.parse(require("fs").readFileSync(0)).data.token')

curl -s -X POST 'https://music.cloudrx.cyou/v1/me/favorites' \
  -H "authorization: Bearer $TOKEN" -H 'content-type: application/json' \
  -d '{"trackId":"168"}'

# stream with seeking
curl -s -H 'range: bytes=0-1023' 'https://music.cloudrx.cyou/v1/stream/168' -o chunk.mp3

Catalog

Read-only browsing and search over the Jamendo catalogue, normalised to a single track shape.

GET /v1/home runnable here

Everything the home screen needs, in one call

Trending this week, newest releases, a chillout shelf, the genre list and the radios, fetched in parallel. When one of the four upstream calls fails the answer is still 200 with partial: true, and that variant is cached for 2 minutes instead of 30.

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/home'
response
{
  "ok": true,
  "data": {
    "trending": [ { "id": "2034080", "title": "...", "stream": "..." } ],
    "newReleases": [ { "id": "1998265", "title": "..." } ],
    "chill": [ { "id": "1753915", "title": "..." } ],
    "genres": [ { "tag": "chillout", "name": "Chillout" }, { "tag": "rock", "name": "Rock" } ],
    "radios": [ { "id": "1", "name": "bestof", "stream": ".../v1/radios/1/stream" } ],
    "partial": false
  },
  "meta": { "cached": false }
}
GET /v1/genres runnable here

Curated genre tags, optionally with artwork

Path and query parameters
coversbool optional1 or true also resolves a cover per genre (slower, cached 7 days)
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/genres'
response
{
  "ok": true,
  "data": [
    { "tag": "chillout", "name": "Chillout", "image": null, "cover": null },
    { "tag": "rock", "name": "Rock", "image": "https://usercontent.jamendo.com?...", "cover": "..." }
  ],
  "meta": { "cached": true }
}
GET /v1/tracks runnable here

Browse and search tracks

Every filter maps to a Jamendo parameter. Up to 4 tags combine with + or a comma. Tracks carry musicinfo tags, so genre chips render without a second call.

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
orderenum: popularity_total, popularity_month, popularity_week, releasedate_desc, releasedate_asc, downloads_total, downloads_month, downloads_week, listens_total, listens_month, listens_week, name, random optionaldefault popularity_week, or popularity_total when q is set
qstring optionalname search, max 100 characters
tagstring optionalfuzzy tag filter, up to 4 joined with + (alias: tags)
artistIdstring optionaltracks of one artist
albumIdstring optionaltracks of one album
idsstring optionalcomma separated track ids, max 50
featuredbool optionaltrue keeps featured tracks, false excludes them
vocalinstrumentalenum: vocal, instrumental optional
speedenum: verylow, low, medium, high, veryhigh optional
genderenum: male, female optional
durationMinint optionalseconds, needs durationMax too
durationMaxint optionalseconds, must exceed durationMin
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/tracks?tag=chillout&limit=2'
response
{
  "ok": true,
  "data": [
    {
      "id": "2034080",
      "title": "Music Soothe - Meditation Music",
      "duration": 216,
      "artist": { "id": "551562", "name": "StimiBeats" },
      "album": {
        "id": "522038",
        "name": "Impression - Meditation Music",
        "image": "https://usercontent.jamendo.com?type=album&id=522038&width=300"
      },
      "image": "https://usercontent.jamendo.com?type=album&id=522038&width=300",
      "cover": "https://music.cloudrx.cyou/v1/img?u=https%3A%2F%2Fusercontent.jamendo.com...",
      "releasedate": "2023-06-01",
      "license": "http://creativecommons.org/licenses/by-nc-nd/3.0/",
      "position": 5,
      "stream": "https://music.cloudrx.cyou/v1/stream/2034080",
      "download": "https://music.cloudrx.cyou/v1/download/2034080",
      "share": "https://www.jamendo.com/track/2034080",
      "tags": { "genres": ["ambient"], "instruments": [], "vartags": ["instrumental"] }
    }
  ],
  "meta": { "limit": 20, "offset": 0, "total": 486213, "cached": false, "stale": false }
}
GET /v1/tracks/:id

Track detail

Answered from the local SQLite mirror when that row already carries tags, otherwise refreshed from Jamendo and cached for 6 hours.

Path and query parameters
waveformbool optional1 or true adds the waveform peaks array
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/tracks/168'
response
{
  "ok": true,
  "data": {
    "id": "168",
    "title": "J'm'e FPM",
    "duration": 183,
    "artist": { "id": "7", "name": "TriFace" },
    "album": { "id": "24", "name": "Premiers Jets", "image": "..." },
    "image": "...",
    "cover": "...",
    "releasedate": "2004-12-17",
    "license": "http://creativecommons.org/licenses/by-nc-nd/2.0/fr/",
    "position": 1,
    "stream": "https://music.cloudrx.cyou/v1/stream/168",
    "download": "https://music.cloudrx.cyou/v1/download/168",
    "share": "https://www.jamendo.com/track/168",
    "tags": { "genres": ["hardcore", "rock", "metal"], "instruments": [], "vartags": ["vocal"] },
    "waveform": [0.12, 0.4, 0.31]
  },
  "meta": { "cached": true }
}
GET /v1/tracks/:id/similar

Related tracks

Seeds on the track genres, tops up from the same artists, then from the weekly chart, so the list is rarely empty.

Path and query parameters
limitint optional1-50, default 20
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/tracks/168/similar?limit=5'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 5, "cached": false }
}
GET /v1/albums runnable here

Browse albums

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
orderenum: popularity_total, popularity_month, popularity_week, releasedate_desc, releasedate_asc, downloads_total, downloads_month, downloads_week, listens_total, listens_month, listens_week, name, random optionaldefault popularity_month
qstring optionalname search
artistIdstring optionalalbums of one artist
idsstring optionalcomma separated album ids, max 50
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/albums?q=premiers&limit=2'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 2, "cached": false }
}
GET /v1/albums/:id

Album with its track list

Path and query parameters
tracksbool optional0 or false skips the track list
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/albums/24'
response
{
  "ok": true,
  "data": {
    "id": "24",
    "name": "Premiers Jets",
    "artist": { "id": "7", "name": "TriFace" },
    "image": "https://usercontent.jamendo.com?type=album&id=24&width=300",
    "cover": "https://music.cloudrx.cyou/v1/img?u=...",
    "releasedate": "2004-12-17",
    "share": "https://www.jamendo.com/list/a24",
    "tracks": [ { "id": "168", "title": "J'm'e FPM", "position": 1 } ]
  },
  "meta": { "cached": true }
}
GET /v1/artists runnable here

Browse artists

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
orderenum: popularity_total, popularity_month, popularity_week, releasedate_desc, releasedate_asc, downloads_total, downloads_month, downloads_week, listens_total, listens_month, listens_week, name, random optionaldefault popularity_month
qstring optionalname search
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/artists?q=triface'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 1, "cached": false }
}
GET /v1/artists/:id

Artist detail

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/artists/7'
response
{
  "ok": true,
  "data": {
    "id": "7",
    "name": "TriFace",
    "image": "https://usercontent.jamendo.com?type=artist&id=7&width=300",
    "cover": "https://music.cloudrx.cyou/v1/img?u=...",
    "website": "http://www.triface.net/",
    "joindate": "2004-07-19",
    "share": "https://www.jamendo.com/artist/7"
  },
  "meta": { "cached": false }
}
GET /v1/artists/:id/tracks

Tracks of one artist

Jamendo ignores limit and offset here and returns an empty page for any non-zero offset, so the whole collection is fetched once, cached, and paged locally.

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/artists/7/tracks?limit=2'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 9, "cached": false }
}
GET /v1/artists/:id/albums

Albums of one artist

Same local paging as artist tracks.

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/artists/7/albums?limit=2'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 4, "cached": false }
}
GET /v1/playlists runnable here

Jamendo curated playlists

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
orderenum: name, id, creationdate optionaldefault creationdate; anything else is rejected upstream
qstring optionalname search
userIdstring optionalplaylists of one Jamendo user
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/playlists?limit=1'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 378990, "cached": false }
}
GET /v1/playlists/:id

Playlist with its tracks

Path and query parameters
limitint optional1-100, default 100
offsetint optionaldefault 0
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/playlists/13122'
response
{
  "ok": true,
  "data": {
    "id": "13122",
    "name": "Playlists2007_les favorites",
    "user": { "id": "103826", "name": "Zeca" },
    "creationdate": "2011-02-04",
    "share": "https://www.jamendo.com/list/p13122",
    "tracks": [ { "id": "1300123", "title": "..." } ]
  },
  "meta": { "cached": false }
}
GET /v1/radios runnable here

Jamendo radios

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/radios'
response
{
  "ok": true,
  "data": [
    {
      "id": "1",
      "name": "bestof",
      "title": "Best Of Jamendo Radio",
      "type": "www",
      "image": "https://images.jamendo.com/new_jamendo_radios/bestof150.jpg",
      "cover": "https://music.cloudrx.cyou/v1/img?u=...",
      "stream": "https://music.cloudrx.cyou/v1/radios/1/stream",
      "share": null
    }
  ],
  "meta": { "cached": false }
}
GET /v1/radios/:id

Radio detail with the upstream stream URL

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/radios/1'
response
{
  "ok": true,
  "data": {
    "id": "1",
    "name": "bestof",
    "title": "Best Of Jamendo Radio",
    "type": "www",
    "image": "...",
    "cover": "...",
    "stream": "https://music.cloudrx.cyou/v1/radios/1/stream",
    "upstreamStream": "http://streaming.jamendo.com:8000/..."
  },
  "meta": { "cached": true }
}
GET /v1/feeds runnable here

Jamendo news feed

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/feeds'
response
{
  "ok": true,
  "data": [ { "id": "2034080", "title": "...", "stream": "..." } ],
  "meta": { "limit": 20, "offset": 0, "total": 25, "cached": false }
}
GET /v1/autocomplete

Search suggestions while typing

Jamendo answers with an object of four arrays; they are passed through unchanged.

Path and query parameters
qstring optionalrequired, max 60
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/autocomplete?q=stimi'
response
{
  "ok": true,
  "data": { "tags": [], "artists": ["stimibeats"], "tracks": [], "albums": [] },
  "meta": { "cached": false }
}

Media

Audio, artwork and radio. Streaming supports Range, so the player can seek without downloading the whole file.

GET /v1/stream/:id

Audio stream with Range support

Proxied on the first play, then served from disk. Send a Range header to seek: the answer is 206 with Content-Range. X-Cache is MISS on the first hit and HIT once the file is stored, X-Audio-Format names the format actually served. Jamendo signed URLs expire and some tracks lack the requested format, so the server walks mp32 to mp31 to ogg before giving up; a track with no playable file answers 502 upstream_error.

Path and query parameters
qualityenum: mp32, mp31, ogg, flac optionaldefault mp32 (128k mp3)
Request headers
Rangestring optionaloptional, single range only
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/stream/168'
response
HTTP/1.1 206 Partial Content
content-type: audio/mpeg
content-range: bytes 0-2047/4536619
accept-ranges: bytes
x-cache: MISS
x-audio-format: mp32

<binary mp3 bytes>
GET /v1/download/:id

Download the file as an attachment

Honours the track licence: when downloads are not allowed the answer is 404. The filename is "Artist - Title.mp3".

Path and query parameters
qualityenum: mp32, mp31, ogg, flac optionaldefault mp32
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/download/168'
response
HTTP/1.1 200 OK
content-type: audio/mpeg
content-disposition: attachment; filename="TriFace - J'm'e FPM.mp3"

<binary mp3 bytes>
GET /v1/radios/:id/stream

Live radio passthrough

Streams the upstream ICY feed unchanged with Cache-Control: no-store.

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/radios/:id/stream'
response
HTTP/1.1 200 OK
content-type: audio/mpeg
icy-name: Best Of Jamendo Radio

<endless audio stream>
GET /v1/img

Cached artwork proxy

Only the Jamendo artwork hosts are allowed (usercontent.jamendo.com, images.jamendo.com, img.jamendo.com), https only, no credentials in the URL. Files live on disk for 60 days and are answered with a strong ETag, so repeat requests get 304.

Path and query parameters
ustring optionalrequired, the source image URL, URL-encoded
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/img?u=https%3A%2F%2Fusercontent.jamendo.com%3Ftype%3Dalbum%26id%3D24%26width%3D300'
response
HTTP/1.1 200 OK
content-type: image/jpeg
cache-control: public, max-age=2592000, immutable
etag: "i-3f9c1b7a"

<binary image bytes>
GET /v1/cover/:albumId

Album cover shortcut

Same cache as /v1/img, without having to build the artwork URL.

Path and query parameters
sizeenum: 50, 100, 200, 300, 400, 500, 600, 700, 800, 1000, 1500, 2000 optionalwidth in pixels, default 300
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/cover/24?size=600'
response
HTTP/1.1 200 OK
content-type: image/jpeg
cache-control: public, max-age=2592000, immutable

<binary image bytes>

Account

Email accounts and device-bound guest sessions. Everything except register, login and guest needs a bearer token.

POST /v1/auth/register

Create an email account

Body
emailstring requireda valid address
passwordstring requiredat least 8 characters
namestring optionaldefaults to the email local part, max 60
Request and response
request
curl -X POST https://music.cloudrx.cyou/v1/auth/register \
  -H 'content-type: application/json' \
  -d '{"email":"[email protected]","password":"secret123","name":"You"}'
response (HTTP 201)
{
  "ok": true,
  "data": {
    "token": "eyJ1aWQiOjEsInZlciI6MX0.9m2X...",
    "user": { "id": 1, "email": "[email protected]", "name": "you", "kind": "user", "created": 1795697000000 }
  }
}
POST /v1/auth/login

Sign in

Body
emailstring required
passwordstring required
Request and response
request
curl -X POST https://music.cloudrx.cyou/v1/auth/login \
  -H 'content-type: application/json' \
  -d '{"email":"[email protected]","password":"secret123"}'
response
{
  "ok": true,
  "data": {
    "token": "eyJ1aWQiOjEsInZlciI6MX0.9m2X...",
    "user": { "id": 1, "email": "[email protected]", "name": "you", "kind": "user", "created": 1795697000000 }
  }
}
POST /v1/auth/guest

Guest session bound to a device id

Call it on first launch with a stable device id: the same id always returns the same guest account, so the library survives app restarts. Letters, digits, dot, underscore, colon and dash are allowed, 8 to 128 characters.

Body
deviceIdstring requiredstable per install
namestring optionaldefaults to Guest
Request and response
request
curl -X POST https://music.cloudrx.cyou/v1/auth/guest \
  -H 'content-type: application/json' \
  -d '{"deviceId":"android-7f3c9a12b4","name":"Pixel"}'
response
{
  "ok": true,
  "data": {
    "token": "eyJ1aWQiOjEsInZlciI6MX0.9m2X...",
    "user": { "id": 1, "email": "[email protected]", "name": "you", "kind": "user", "created": 1795697000000 }
  }
}
GET /v1/auth/me bearer token

The signed-in user

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/auth/me' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": { "id": 1, "email": "[email protected]", "name": "You", "kind": "user", "created": 1795697000000 }
}
PATCH /v1/auth/me bearer token

Rename the account

Body
namestring requiredmax 60
Request and response
request
curl -s -X PATCH 'https://music.cloudrx.cyou/v1/auth/me' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "id": 1, "email": "[email protected]", "name": "New name", "kind": "user", "created": 1795697000000 }
}
POST /v1/auth/logout bearer token

Log out everywhere

Bumps the token version, so every token issued before this call stops working. Local caches should be cleared on the client.

Request and response
request
curl -s -X POST 'https://music.cloudrx.cyou/v1/auth/logout' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "loggedOut": true }
}

Library

Favourites, history and playlists stored in the local SQLite database. Every route here needs a bearer token.

GET /v1/me/ bearer token

Profile plus library counts

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/me/' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": {
    "user": { "id": 1, "email": null, "name": "Guest", "kind": "guest", "created": 1795697000000 },
    "counts": { "favorites": 12, "playlists": 2, "plays": 340 }
  }
}
GET /v1/me/favorites bearer token

Favourite tracks, newest first

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/me/favorites' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": [ { "id": "168", "title": "J'm'e FPM", "addedAt": 1795697000000 } ],
  "meta": { "limit": 20, "offset": 0, "total": 1 }
}
POST /v1/me/favorites bearer token

Add a favourite

Body
trackIdstring required
Request and response
request
curl -s -X POST 'https://music.cloudrx.cyou/v1/me/favorites' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response (HTTP 201)
{
  "ok": true,
  "data": { "trackId": "168", "favorite": true }
}
PUT /v1/me/favorites/:trackId bearer token

Idempotent favourite

Same effect as POST but safe to repeat, which suits optimistic UI.

Request and response
request
curl -s -X PUT 'https://music.cloudrx.cyou/v1/me/favorites/:trackId' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "trackId": "168", "favorite": true }
}
DELETE /v1/me/favorites/:trackId bearer token

Remove a favourite

Request and response
request
curl -s -X DELETE 'https://music.cloudrx.cyou/v1/me/favorites/:trackId' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "trackId": "168", "favorite": false }
}
GET /v1/me/history bearer token

Listening history grouped by track

Path and query parameters
limitint optional1-100, default 20
offsetint optionaldefault 0
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/me/history' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": [ { "id": "168", "title": "J'm'e FPM", "lastPlayed": 1795697000000, "playCount": 4 } ],
  "meta": { "limit": 20, "offset": 0, "total": 1 }
}
POST /v1/me/plays bearer token

Record a play

Send it when playback ends or passes 30 seconds, whichever policy you pick. Rows older than 180 days are pruned automatically.

Body
trackIdstring required
msint optionalplayed milliseconds, 0 to 86400000
Request and response
request
curl -s -X POST 'https://music.cloudrx.cyou/v1/me/plays' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response (HTTP 201)
{
  "ok": true,
  "data": { "trackId": "168", "recorded": true }
}
DELETE /v1/me/history bearer token

Clear the history

Request and response
request
curl -s -X DELETE 'https://music.cloudrx.cyou/v1/me/history' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "cleared": true }
}
GET /v1/me/playlists bearer token

Your playlists

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/me/playlists' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": [ { "id": 1, "name": "Late night", "created": 1795697000000, "updated": 1795697000000, "trackCount": 3 } ]
}
POST /v1/me/playlists bearer token

Create a playlist

Body
namestring requiredmax 80
Request and response
request
curl -s -X POST 'https://music.cloudrx.cyou/v1/me/playlists' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response (HTTP 201)
{
  "ok": true,
  "data": { "id": 1, "name": "Late night", "created": 1795697000000, "updated": 1795697000000, "trackCount": 3 }
}
GET /v1/me/playlists/:id bearer token

Playlist with tracks in order

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/me/playlists/:id' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": {
    "id": 1,
    "name": "Late night",
    "created": 1795697000000,
    "updated": 1795697000000,
    "trackCount": 2,
    "tracks": [
      { "id": "168", "title": "J'm'e FPM", "position": 1, "addedAt": 1795697000000 },
      { "id": "2034080", "title": "...", "position": 2, "addedAt": 1795697000000 }
    ]
  }
}
PATCH /v1/me/playlists/:id bearer token

Rename a playlist

Body
namestring requiredmax 80
Request and response
request
curl -s -X PATCH 'https://music.cloudrx.cyou/v1/me/playlists/:id' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "id": 1, "name": "Late night", "created": 1795697000000, "updated": 1795697000000, "trackCount": 3 }
}
DELETE /v1/me/playlists/:id bearer token

Delete a playlist

Request and response
request
curl -s -X DELETE 'https://music.cloudrx.cyou/v1/me/playlists/:id' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "deleted": true, "id": 1 }
}
POST /v1/me/playlists/:id/tracks bearer token

Append a track

Body
trackIdstring required
Request and response
request
curl -s -X POST 'https://music.cloudrx.cyou/v1/me/playlists/:id/tracks' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response (HTTP 201)
{
  "ok": true,
  "data": { "playlistId": 1, "trackId": "168", "position": 3 }
}
DELETE /v1/me/playlists/:id/tracks/:trackId bearer token

Remove a track

Request and response
request
curl -s -X DELETE 'https://music.cloudrx.cyou/v1/me/playlists/:id/tracks/:trackId' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "playlistId": 1, "trackId": "168", "removed": true }
}
PUT /v1/me/playlists/:id/tracks bearer token

Replace the track order

Send the whole list: positions become 1..n in the order given. Up to 500 tracks.

Body
trackIdsarray requiredarray of track ids
Request and response
request
curl -s -X PUT 'https://music.cloudrx.cyou/v1/me/playlists/:id/tracks' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": { "playlistId": 1, "count": 3 }
}
GET /v1/me/recommendations bearer token

Personal shelf

Builds a tag profile from favourites and recent plays, pulls matching tracks, tops up from the same artists, then from the weekly chart. Cached 20 minutes per user.

Path and query parameters
limitint optional1-50, default 20
Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/me/recommendations' \
  -H 'authorization: Bearer $TOKEN'
response
{
  "ok": true,
  "data": [ { "id": "1984098", "title": "...", "stream": "..." } ],
  "meta": { "cached": false, "basedOn": ["chillout", "ambient"] }
}

Operations

Health, counters and maintenance.

GET /health

Liveness plus cache and upstream state

Also served at /v1/health. The upstream is probed at most once a minute, so this stays cheap enough for a monitor.

Request and response
request
curl -s 'https://music.cloudrx.cyou/health'
response
{
  "ok": true,
  "data": {
    "status": "ok",
    "uptimeSeconds": 412,
    "version": "1.0.0",
    "upstream": { "name": "jamendo", "ok": true, "latencyMs": 395, "active": 0, "queued": 0, "blockedForSeconds": 0 },
    "cache": { "entries": 7, "bytes": 61401, "memoryEntries": 7 },
    "audio": { "files": 3, "bytes": 13598242, "maxBytes": 1073741824, "activeDownloads": 0, "queued": 0 },
    "images": { "files": 20, "bytes": 308885, "maxBytes": 209715200 },
    "catalog": { "tracks": 60, "albums": 4, "artists": 9, "users": 2, "favorites": 12, "playlists": 2, "plays": 340 }
  }
}
GET /v1/stats

Cache, disk and catalog counters

Request and response
request
curl -s 'https://music.cloudrx.cyou/v1/stats'
response
{
  "ok": true,
  "data": {
    "cache": { "entries": 7, "bytes": 61401, "memoryEntries": 7 },
    "audio": { "files": 3, "bytes": 13598242, "maxBytes": 1073741824, "activeDownloads": 0, "queued": 0 },
    "images": { "files": 20, "bytes": 308885, "maxBytes": 209715200 },
    "catalog": { "tracks": 60, "albums": 4, "artists": 9, "users": 2, "favorites": 12, "playlists": 2, "plays": 340 }
  }
}
POST /v1/admin/prune admin token

Force cache and disk eviction

Requires the X-Admin-Token header to match ADMIN_TOKEN. Answers 403 when the variable is unset.

Request headers
X-Admin-Tokenstring optionalrequired
Request and response
request
curl -s -X POST 'https://music.cloudrx.cyou/v1/admin/prune' \
  -H 'authorization: Bearer $TOKEN' \
  -H 'content-type: application/json' \
  -d '{"...":"..."}'
response
{
  "ok": true,
  "data": {
    "cacheEntries": 4,
    "audioFiles": 2,
    "imageFiles": 7,
    "after": { "cache": { "...": "..." }, "audio": { "...": "..." }, "images": { "...": "..." } }
  }
}