RPC Documentation
Documentation for RPC API endpoints accessible by clients external to Cider.
Hostname and Port
All API endpoints are accessible at http://localhost:10767.
We've observed that using 127.0.0.1 when IPv4 is disabled tends to break and not connect. We recommend you do not turn off IPv4, but if you are required to do so, try using [::1]:10767.
Authentication
Unless explicitly disabled within Cider, all API requests require a valid API token. You can generate this token, or turn off authentication, from the menu at Settings -> Connectivity -> Manage External Application Access to Cider within Cider.
The generated token should be passed in the apptoken header of all requests. Do not prefix the token with Bearer or any other string; just pass the token by itself in the header.
This token is not required if disabled within the settings menu.
/api/v1/playback
/api/v1/playbackThe API endpoints documented below are all nested under /api/v1/playback.
GET /active
/activeResponds with an empty body and status code 204: No Content. This endpoint can be used to quickly check that the RPC server is still active.
GET /is-playing
/is-playingResponds with a boolean value indicating whether music is currently playing.
GET /now-playing
/now-playingResponds with an Apple Music API response for the currently playing song.
POST /play-url
/play-urlTriggers playback of an item.
Accepts a url of the item to play. This URL can be found by right-clicking on an item and clicking on Share -> Apple Music in Cider, Share -> Copy Link in the official Apple Music app, or by copying the URL when viewing an item in the Apple Music web app.
POST /play-item-href
/play-item-hrefTriggers playback of an item.
Accepts an href (Apple Music API identifier).
POST /play-item
/play-itemTriggers playback of an item.
Accepts a type of item to play and an id for the item. type should be one of the accepted types in the Apple Music API, such as songs. Note that the ID is required to be a string, not a number.
POST /play-later
/play-laterAdds an item to the end of the play queue (played after all other items currently in the queue).
Accepts a type of item to play and an id for the item. type should be one of the accepted types in the Apple Music API, such as songs. Note that the ID is required to be a string, not a number.
POST /play-next
/play-nextAdds an item to the start of the play queue (played next, before all other items in the queue).
Accepts a type of item to play and an id for the item. type should be one of the accepted types in the Apple Music API, such as songs. Note that the ID is required to be a string, not a number.
POST /play
/playResumes playback of the current item. If no item is playing, the behavior set under the menu Settings -> Play Button on Stopped Action in Cider will take effect.
POST /pause
/pausePauses the currently playing item. If no item is playing or if the item is already paused, this will do nothing.
POST /playpause
/playpauseToggles the play/pause state of the current item. This has the same behavior as calling /pause if the item is playing, and /play if the item is paused.
POST /stop
/stopStops the current playback and removes the current item. If items are in the queue, they will be kept.
POST /next
/nextMoves to the next item in the queue, if any. Autoplay enable/disable status will be respected if the queue is empty (infinity button within the queue panel in Cider).
If no item is currently playing but there is one in the queue, it will be started.
POST /previous
/previousMoves to the previously played item, which is the item most recent in the playback history.
If no item is currently playing but there is one in the playback history, it will be started.
GET /queue
/queueGets the current queue as a list of Apple Music response objects. Note that this also includes part of the history and the currently playing track.
POST /queue
/queueNot currently functional.
POST /queue/move-to-position
/queue/move-to-positionMoves an item in the queue from the startIndex to the destinationIndex. Optionally returns the queue if passed returnQueue.
Note that the index is 1-indexed (starts at 1, not 0). Also note that the queue contains some items that are from the history, so the items visible in the Up Next view in Cider may start at a number higher than 1.
POST /queue/remove-by-index
/queue/remove-by-indexRemoves an item from the queue by its index
Note that the index is 1-indexed (starts at 1, not 0). Also note that the queue contains some items that are from the history, so the items visible in the Up Next view in Cider may start at a number higher than 1.
POST /queue/clear-queue
/queue/clear-queueClears the queue of all items.
POST /seek
/seekSeeks to a given offset, in seconds, in the currently playing item.
Accepts a position in seconds to seek to. Note that /now-playing returns a timestamp in milliseconds via the durationInMillis key, which should be divided by 1000 to get the duration in seconds.
GET /volume
/volumeGets the current playback volume as a number between 0 (muted) and 1 (full volume).
POST /volume
/volumeSets the current playback volume to a number between 0 (muted) and 1 (full volume).
Accepts a volume as a number between 0 and 1.
POST /add-to-library
/add-to-libraryAdds the currently playing item to the user's library. No effect if already in library.
POST /set-rating
/set-ratingAdds a rating to the currently playing item. Rating is -1 for dislike, 1 for like, and 0 for unset.
Accepts a rating as a number between -1 and 1.
GET /repeat-mode
/repeat-modeGets the current repeat mode as a number. 0 is off, 1 is "repeat this song", and 2 is "repeat".
POST /toggle-repeat
/toggle-repeatToggles repeat between "repeat this song", "repeat", and "off".
Note that this method doesn't take the mode to set, just changes to the next mode in the cycle repeat this song -> repeat -> off.
GET /shuffle-mode
/shuffle-modeGets the current shuffle mode as a number. 0 is off and 1 is on.
POST /toggle-shuffle
/toggle-shuffleToggles shuffle between "off" and "on".
GET /autoplay
/autoplayGets the current autoplay status as a boolean. true is on and false is off.
POST /toggle-autoplay
/toggle-autoplayToggles autoplay between "off" and "on".
/api/v1/amapi
/api/v1/amapiThe API endpoints documented below are all nested under /api/v1/amapi. These API endpoints are generally for more advanced use-cases than the above endpoints, and pass through the raw Apple Music API responses directly with no translation.
POST /run-v3
/run-v3Makes a request to the given path on the Apple Music API and returns the response.
/api/v1/lyrics
/api/v1/lyricsThe API endpoint documented below is nested under /api/v1/lyrics.
GET /:id
/:idGets lyrics for the given song ID. Currently non-functional but on track to be fixed soon.
Last updated
Was this helpful?