HTTP method: GET, POST
Authentication: required
Parameters:
server: radio server ID
This API lets you manage playlists for your station.
Example: GET
Get all playlists for server ID 1:
import requests
API_KEY = "your_api_key"
headers = {"SC-API-KEY": API_KEY}
response = requests.get(
"https://demo.streaming.center:1030/api/v2/playlists/?server=1",
headers=headers
)
print(response.json())Example response
[
{
"id":1,
"duration":9244067,
"playlist_files_per_page":1000,
"tracks_num":55,
"name":"All music",
"is_default":true,
"is_random":true,
"on_air":false,
"directory_name":"",
"current_track_order":-9,
"server":1
},
{
"id":2,
"duration":9240712,
"playlist_files_per_page":1000,
"tracks_num":54,
"name":"Morning shows",
"is_default":false,
"is_random":false,
"on_air":true,
"directory_name":"",
"current_track_order":43,
"server":1
}
]Description
This endpoint returns an array of your playlists. Each playlist contains the following properties:
- id: unique playlist ID.
- duration: playback duration in milliseconds.
- playlist_files_per_page: special setting limiting how many playlist tracks are shown on one page in the admin web interface.
- tracks_num: number of tracks in the playlist.
- name: playlist name.
- is_default: whether this is the default playlist for the server. Default playlists cannot be deleted. All uploaded music is added to the default playlist, which is used as a fallback when AutoDJ has nothing else to play.
- is_random: whether the playlist is shuffled or played sequentially.
- on_air:
trueif this playlist is currently on air. - directory_name: indicates whether the playlist was created from a synced server directory.
- current_track_order: current playback position inside the playlist.
- server: current server ID.
Example: POST
Create a playlist on server ID 1:
import requests
API_KEY = "your_api_key"
headers = {"SC-API-KEY": API_KEY}
response = requests.post(
"https://demo.streaming.center:1030/api/v2/playlists/",
headers=headers,
json={"name":"New playlist","is_random":True,"server":1}
)
if response.ok:
print("The playlist was created successfully")
newly_created_playlist = response.json()To create a playlist, send the following JSON payload:
- name: new playlist name.
- is_random: pass
trueif the playlist should be shuffled. - server: integer radio server ID.
Example: POST request for importing an M3U playlist file
To import an M3U file, first upload the actual audio files to the server using FTP or the web interface. Then send a POST request with Content-Type set to multipart/form-data:
import requests
API_KEY = "your_api_key"
headers = {"SC-API-KEY": API_KEY}
m3u_file = "import.m3u"
data = {
"name":"m3u import",
"is_random":True,
"server":1
}
files = {
'm3u': (m3u_file, open(m3u_file, 'rb'),)
}
response = requests.post(
"https://demo.streaming.center:1030/api/v2/playlists/",
headers=headers,
data=data,
files=files
)HTTP method: GET, PUT, DELETE
Authentication: required
Parameters:
id: playlist ID
Lets you retrieve a specific playlist with GET, update it with PUT, or delete it with DELETE.
HTTP method: POST
Authentication: required
Parameters:
id: playlist ID
Example payload:
[40, 52, 7]
Adds tracks to a playlist. You must pass an array of AllMusic track IDs. The order of the IDs matters: tracks are inserted in the exact order in which they appear in the payload.
HTTP method: POST
Authentication: required
Parameters:
id: playlist ID
Schedules the playlist to start playing at the next full minute. For example, if you call this API at 11:30:25, a scheduler event will be created for 11:31. No payload is required.
HTTP method: POST
Authentication: required
Parameters:
id: source playlist ID
Creates a copy of the playlist together with its tracks.
Example payload
{
"new_name": "Morning shows copy"
}Example response
{
"new_name": "Morning shows copy"
}HTTP method: POST
Authentication: required
Parameters:
id: playlist ID
Changes the order of individual playlist entries.
Example payload
[101, 97, 105, 110]
You must pass playlist track IDs, not AllMusic track IDs. The endpoint returns an empty successful response.
HTTP method: POST
Authentication: required
Parameters:
id: playlist ID
Shuffles the order of all tracks in the playlist. No payload is required and the endpoint returns an empty JSON response.
HTTP method: POST
Authentication: required
Parameters:
id: playlist ID
Removes duplicate occurrences of the same track inside one playlist, keeping a single copy. No payload is required and the endpoint returns an empty JSON response.
HTTP method: GET
Authentication: not required
Parameters:
id: playlist ID
lang: optional spreadsheet header language, for example `ru` or `en`
Returns an .xlsx Excel file with the playlist track list. The spreadsheet contains the track number, filename, artist, title, duration, and upload date.
HTTP method: POST
Authentication: required
Parameters:
id: playlist ID
Adds recordings from the selected DJ recordings directory into the playlist. Files are copied into the server music library and also created as new AllMusic records.
Example payload
{
"dj": 4,
"recordings": ["show_2026_04_08.mp3", "guest_hour.mp3"]
}If recordings is empty, the API returns 400.
HTTP method: GET
Authentication: required
Parameters:
playlist_pk: playlist ID
limit: optional item limit
offset: optional offset
q: search string for `path`, `author`, or `title`
Returns tracks for a specific playlist with position information and a nested AllMusic track object.
Example response
{
"count": 2,
"results": [
{
"id": 101,
"order": 1,
"flag": 0,
"added_ts": "2026-04-08T09:10:11Z",
"track": {
"id": 40,
"author": "Daft Punk",
"title": "One More Time",
"human_up": 12,
"human_down": 1,
"path": "/srv/media/Server_1/daft_punk_one_more_time.mp3"
}
}
]
}HTTP method: GET, DELETE
Authentication: required
Parameters:
playlist_pk: playlist ID
id: playlist track entry ID
GET returns a single playlist entry with its nested track. DELETE removes one or more entries from the playlist. For bulk deletion through this route, you may pass several IDs separated by commas in the URL. After deletion the API returns:
{
"length": 9231000
}where length is the updated playlist duration in milliseconds.
HTTP method: POST
Authentication: required
Parameters:
playlist_pk: playlist ID
Deletes multiple playlist entries in one request.
Example payload
{
"tracks": [101, 102, 103],
"fs": false
}The tracks field contains playlist track IDs. If fs=true, related audio files are also removed from the filesystem. The response returns the updated playlist length:
{
"length": 9123000
}HTTP method: PUT
Authentication: required
Parameters:
playlist_pk: playlist ID
Moves multiple playlist entries to a new position.
Example payload
{
"tracks": [101, 102],
"position": 5
}position is 1-based. On success the endpoint returns an empty JSON response.
AllMusic Library API
HTTP method: GET
Authentication: not required
Parameters:
server: radio server ID
genre: filter by genre
with_tags_only: return only tracks with both `author` and `title` filled in
remote: return only remote files whose `path` is a URL
requestable: return only tracks available for song requests
search_q: search by `author` and `title`
order: sorting, `1` - by `author`, `2` - by `title`, `3` - random order
This endpoint returns tracks from the AllMusic library.
Example: GET
import requests
response = requests.get(
"https://demo.streaming.center:1030/api/v2/music/?server=1&requestable=1&search_q=queen"
)
print(response.json())Example response
[
{
"id": 40,
"server": 1,
"author": "Queen",
"title": "Radio Ga Ga",
"album": "The Works",
"genre": "Rock",
"length": 343000,
"path": "/srv/media/Server_1/queen_radio_ga_ga.mp3",
"public_path": "/queen_radio_ga_ga.mp3",
"filename": "queen_radio_ga_ga",
"meta": "Queen - Radio Ga Ga",
"requestable": true,
"human_up": 25,
"human_down": 2,
"has_waveform": true,
"length_formatted": "05:43",
"category": {
"id": 3,
"name": "Rock"
}
}
]Main AllMusic response fields
- id: track ID in the music library.
- server: radio server ID.
- path: full file path or remote file URL.
- public_path: public relative file path.
- filename: filename without extension.
- meta: string in the form
Author - Title. - author: artist.
- author_other: additional artist.
- title: track title.
- album: album.
- genre: genre.
- performance_type: performance type.
- composer: composer.
- lyricist: lyricist.
- publisher: publisher.
- label: label.
- year: year.
- comment: comment.
- length: track duration in milliseconds.
- length_formatted: formatted duration.
- samplerate: file sample rate.
- audio_format: audio format.
- requestable: whether the track can be requested by listeners.
- requests_number: number of times the track was requested.
- human_up: like count.
- human_down: dislike count.
- auto_up: listener growth on this track.
- auto_down: listener drop on this track.
- tag_image: small cover image.
- image_medium: medium cover image.
- image_large: large cover image.
- gain_db: saved gain correction.
- peak_value: peak signal value.
- isrc: ISRC code.
- mbid: MusicBrainz ID.
- category: nested category object with
idandname, ornull. - playback_start_time: playback region start.
- playback_end_time: playback region end.
- playback_start_bytes_offset: byte offset for playback start.
- playback_end_bytes_offset: byte offset for playback end.
- playback_region_calculation_status: playback region calculation status.
- disable_crossfade: whether crossfade is disabled for this track.
- has_waveform: whether a waveform is stored.
- region_length: calculated playback region length.
- max_volume_db: maximum safe gain increase without clipping.
HTTP method: GET, PUT, DELETE
Authentication: GET - not required, PUT and DELETE - required
Parameters:
id: `AllMusic` track ID
GET returns one track object. PUT lets you update metadata such as author, title, album, genre, isrc, requestable, category, and other model fields. DELETE removes the track from the database and deletes the corresponding file from storage.
HTTP method: POST
Authentication: not required
Parameters:
id: `AllMusic` track ID
Increments the human_up like counter for the track. Voting is limited to one vote per IP during the last 24 hours.
Example response
{
"up": 26,
"down": 2
}If the IP has already voted, the API returns 400 and a response like this:
{
"result": "already_voted",
"up": 26,
"down": 2
}HTTP method: POST
Authentication: not required
Parameters:
id: `AllMusic` track ID
Works like like, but increments human_down.
HTTP method: GET, POST
Authentication: GET - not required, POST - required
Parameters:
id: `AllMusic` track ID
GET returns the list of playlist IDs containing the track.
Example response
{
"playlists": [1, 2, 5]
}POST synchronizes the playlists containing the track.
Example payload
{
"playlists": [1, 5, 6]
}Example response
{
"added": [6],
"removed": [2]
}HTTP method: GET
Authentication: not required
Returns an array of unique author values.
HTTP method: GET
Authentication: not required
Returns an array of unique genre values.
HTTP method: POST
Authentication: required
Allows bulk updates for several AllMusic tracks in one request.
Example payload
{
"update_mode": "overwrite",
"track_ids": [40, 52, 70],
"fields": {
"genre": "Rock",
"requestable": true
}
}Example response
{
"result": "ok",
"updated": 3
}update_mode can be fill-empty or overwrite.
HTTP method: POST
Authentication: required
Parameters:
id: `AllMusic` track ID
Renames the file on the filesystem and updates its path in the database.
Example payload
{
"new_name": "queen_radio_ga_ga_remastered"
}HTTP method: GET, POST
Authentication: GET - not required, POST - required
Parameters:
id: `AllMusic` track ID
POST generates a waveform for the track and stores it in the database. GET returns waveform binary data with content type application/octet-stream.
HTTP method: PUT
Authentication: required
Parameters:
id: `AllMusic` track ID
Updates the track playback region.
Example payload
{
"playback_start_time": 0.85,
"playback_end_time": 176.12
}After this call, playback_region_calculation_status is set back to the queued state.
HTTP method: GET
Authentication: not required
Parameters:
server: radio server ID
Returns the music library folder tree for the server.
HTTP method: POST
Authentication: required
Returns files from selected music library folders.
Example payload
{
"folders": ["/Rock/", "/Gold/"],
"text": "queen"
}You can also pass the server query parameter.
HTTP method: GET
Authentication: not required
Parameters:
server_id: radio server ID
Returns the legacy music library tree format with tree, open, and root fields.
HTTP method: POST
Authentication: required
Resets human_up and human_down counters for all tracks on the given server.
Example payload
{
"server_id": 1
}HTTP method: PUT
Authentication: required
Bulk toggles the requestable flag for tracks.
Example payload
[
{"id": 40, "requestable": true},
{"id": 52, "requestable": false}
]HTTP method: GET
Authentication: not required
Parameters:
server_id: radio server ID
Returns only remote tracks whose path starts with http or https.
HTTP method: POST
Authentication: required
Adds one remote file to AllMusic from a URL after verifying availability and audio format.
Example payload
{
"server": 1,
"path": "https://cdn.example.com/stream/track.mp3",
"author": "Queen",
"title": "Radio Ga Ga",
"album": "The Works"
}HTTP method: POST
Authentication: required
Lets you quickly add several remote files in a single request.
HTTP method: POST
Authentication: required
Moves selected tracks to another directory inside the server music library.
Example payload
{
"file_ids": [40, 52],
"target_directory": "/Rock/Gold/",
"server_id": 1
}Example response
{
"moved_count": 2,
"failed_count": 0,
"moved_files": [
{
"id": 40,
"old_path": "/srv/media/Server_1/track1.mp3",
"new_path": "/srv/media/Server_1/Rock/Gold/track1.mp3",
"filename": "track1.mp3"
}
]
}HTTP method: POST
Authentication: required
Deletes selected files and optionally removes empty directories.
Example payload
{
"server_id": 1,
"files": [40, 52],
"directories": ["Server_1/Rock/Old"],
"ml": true
}If ml=true, the corresponding AllMusic records are also deleted from the database.
HTTP method: PUT
Authentication: required
Uploads an audio file into the selected folder on the server.
multipart/form-data parameters
- filename: uploaded file.
- server_id: server ID.
- parent_dir: destination folder.
- is_jingle: if
true, the file is uploaded into the jingles directory.
How to get the like count for a specific track by its AllMusic ID
To get the like count for a track, perform a GET request to /api/v2/music/:id/, where :id is the AllMusic object ID. In the response, use the human_up field, which contains the current number of likes.
For example, for track ID 40, the request GET /api/v2/music/40/ returns a track object where human_up may look like this:
{
"id": 40,
"author": "Queen",
"title": "Radio Ga Ga",
"human_up": 25,
"human_down": 2
}If you want not only to read the current value but also to immediately get updated counters after a user vote, call POST /api/v2/music/:id/like/. The API response includes up and down, where up is the new like count.