Inner provides a complete set of authenticated playlist management methods on theDocumentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/inner/llms.txt
Use this file to discover all available pages before exploring further.
YouTube object. All write operations require a valid session cookie.
Creating playlists
YouTube.createPlaylist(title) creates a new empty playlist and returns Result<String>. The unwrapped value is the new playlist’s ID string (e.g. PLxxxxxx) from the CreatePlaylistResponse.
Renaming and deleting
YouTube.renamePlaylist(playlistId, name) renames an existing playlist. YouTube.deletePlaylist(playlistId) permanently deletes it. Both return Result<Unit>-equivalent results (the inner Unit is the HTTP response body, which you can ignore).
Adding tracks
YouTube.addToPlaylist(playlistId, videoId) appends a single track to a playlist and returns Result<String?> — the setVideoId assigned to the new entry, or null if unavailable.
YouTube.addPlaylistToPlaylist(playlistId, addPlaylistId) appends all tracks from another playlist into the target playlist.
Removing and reordering tracks
YouTube.removeFromPlaylist(playlistId, videoId, setVideoId) removes a specific entry from a playlist. YouTube.moveSongPlaylist(playlistId, setVideoId, successorSetVideoId) reorders an entry by placing it immediately before the entry identified by successorSetVideoId (pass null to move the track to the end of the playlist).
The setVideoId is a per-entry identifier that is distinct from the video ID — it scopes the entry to a specific position within a specific playlist. It is available on SongItem.setVideoId for songs fetched from a PlaylistPage or PlaylistContinuationPage.
Looking up setVideoId
If you only know thevideoId of a track (and not its setVideoId), use YouTube.playlistEntrySetVideoIds(playlistId, videoId) which pages through the entire playlist and returns Result<List<String>> — all setVideoId values for occurrences of that video ID (a video can appear multiple times in the same playlist).
Liking playlists
YouTube.likePlaylist(playlistId, like) saves (like = true) or unsaves (like = false) a playlist to the user’s library.