The playlist management API lets you create, rename, and delete playlists; add or remove individual songs or entire playlists; reorder tracks; and manage custom thumbnail images. All methods require an authenticated session (Documentation Index
Fetch the complete documentation index at: https://mintlify.com/faraasaaay/innertube-v1/llms.txt
Use this file to discover all available pages before exploring further.
YouTube.cookie set). Most methods are suspend functions returning Result<T>.
YouTube.createPlaylist
Creates a new empty playlist with the given title and returns the new playlist’s ID.
Note:createPlaylistis implemented withrunBlockingand is therefore a blocking call. Call it from a background thread or wrap it yourself in a coroutine if needed.
The display title for the new playlist.
The new playlist ID (e.g.
"PLxxxxxxx").YouTube.renamePlaylist
Renames an existing playlist.
The ID of the playlist to rename.
The new display name for the playlist.
Wraps the raw
EditPlaylistResponse. Check Result.isSuccess to confirm the rename was accepted.YouTube.deletePlaylist
Permanently deletes a playlist owned by the authenticated user.
The ID of the playlist to delete.
Result.isSuccess is true when the API accepted the request.YouTube.addToPlaylist
Adds a single video to the end of a playlist.
The target playlist’s ID.
The video ID to add.
Wraps the raw HTTP response on success. Check
Result.isSuccess to confirm the operation was accepted.YouTube.addPlaylistToPlaylist
Appends all tracks from one playlist into another playlist.
The destination playlist’s ID.
The source playlist whose tracks will be appended.
Wraps the raw HTTP response on success. Check
Result.isSuccess to confirm the operation was accepted.YouTube.removeFromPlaylist
Removes a specific song entry from a playlist. Both the video ID and the set-video ID are required; the set-video ID uniquely identifies the entry when the same video appears multiple times.
The playlist to remove the song from.
The video ID of the song to remove.
The unique set-video ID for this playlist entry. Available as
SongItem.setVideoId from a PlaylistPage or PlaylistContinuationPage response.Wraps the raw
EditPlaylistResponse on success.YouTube.moveSongPlaylist
Moves a song to a different position in a playlist. Pass null for successorSetVideoId to move the song to the very end.
The playlist containing the song.
The set-video ID of the entry to move. Obtained from
SongItem.setVideoId.The set-video ID of the entry that should immediately follow the moved entry. Pass
null to place the song at the end of the playlist.Wraps the raw
EditPlaylistResponse on success.YouTube.uploadCustomThumbnailLink
Sets a custom thumbnail image on a playlist using a two-step upload: first obtains an upload URL, uploads the image bytes, then links the resulting blob to the playlist.
The playlist whose thumbnail will be changed.
Raw image bytes. JPEG is recommended. Recommended dimensions: 800 × 800 px.
On success, the new thumbnail URL returned by the edit-playlist response, or
null if the URL could not be parsed.YouTube.removeThumbnailPlaylist
Removes the custom thumbnail from a playlist, reverting it to the auto-generated thumbnail.
The playlist to remove the custom thumbnail from.
The auto-generated thumbnail URL after removal, or
null if parsing failed.