Inner is a Kotlin Multiplatform library that wraps YouTube Music’s internal InnerTube API, giving Android and KMP developers a clean, coroutine-based interface for building music applications. Whether you’re building a full-featured music player, a playlist manager, or a discovery app, Inner takes care of the raw HTTP communication, response parsing, and authentication plumbing so you can focus on your product.Documentation 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.
What Inner provides
Search
Search YouTube Music for songs, videos, albums, artists, and playlists. Filter results by type and page through them with continuation tokens.
Browse
Browse the home feed, explore page, charts, moods & genres, new releases, and artist/album detail pages.
Playback
Fetch player responses, stream URLs, and up-next queues. Resolve PoTokens for authenticated and anonymous playback across multiple YouTube clients.
Playlists & Library
Create, rename, delete, and manage playlist entries. Page through playlist songs using continuation tokens. Access listening history and liked content.
Authentication
Authenticate with a YouTube Music session cookie. Manage visitor data, dataSyncId, and PoToken state through the
PlaybackAuthState model.KMP Support
Share browse and search logic across Android and iOS targets from a single
commonMain source set, with platform-specific HTTP engines wired in automatically.Project structure
Inner exposes two public entry points depending on your target platform:YouTube (Android singleton)
YouTube is a Kotlin object defined in androidMain. It owns an internal InnerTube instance and a MutableStateFlow<PlaybackAuthState> that centralises all authentication state — cookie, visitor data, dataSyncId, and PoToken values. Because it is a singleton you never instantiate it; you simply set properties and call suspend functions:
YouTube whenever your project targets Android exclusively or you are writing platform-specific Android code inside a KMP module.
PortableInnertube (KMP class)
PortableInnertube is a regular class defined in commonMain. It accepts an optional HttpClient in its constructor, making it straightforward to inject in tests or share across targets. It covers search (with an optional raw params filter string), browse, home feed, albums, artists, and playlists — the full set of operations that work without Android-specific dependencies:
PortableInnertube.search() accepts an optional params string rather than a typed SearchFilter. Android-specific features such as stream URL extraction, PoToken generation, and playback tracking are only available through the YouTube singleton.
Use PortableInnertube when you want to share music-fetching logic between Android and iOS in a KMP project, or when you need to inject a custom HTTP client.
Platform support
Inner is built with the Kotlin Multiplatform Gradle plugin and targets the following platforms:| Platform | Target | Notes |
|---|---|---|
| Android | android | minSdk 26, compileSdk 36, JVM target 21 |
| iOS (device) | iosArm64 | arm64 physical devices |
| iOS (simulator, Apple Silicon) | iosSimulatorArm64 | M-series Mac simulators |
| iOS (simulator, Intel) | iosX64 | x86-64 Mac simulators |
android {} block in build.gradle.kts sets namespace = "com.tamed.music.innertube" and jvmToolchain(21) is applied at the top-level kotlin {} block, so all source sets compile to JVM 21 bytecode on Android and use Kotlin/Native for iOS.
Key dependencies
| Dependency | Role |
|---|---|
ktor-client-core | Multiplatform HTTP client (commonMain) |
ktor-client-content-negotiation + ktor-serialization-kotlinx-json | JSON response deserialisation (commonMain) |
ktor-client-encoding | Gzip/deflate content-encoding plugin (commonMain) |
ktor-client-okhttp | OkHttp engine for Android |
ktor-client-darwin | URLSession-backed engine for iOS |
brotli | Brotli decompression for Android HTTP responses |
newpipe-extractor | Stream URL extraction and signature deciphering (Android) |
re2j | RE2-compatible regex for stream processing (Android) |
rhino | JavaScript engine used to generate PoTokens on Android |
Inner operates against YouTube Music’s internal
youtubei/v1/ API endpoint (https://music.youtube.com/youtubei/v1/). No official API key is required, but authenticated features — such as library access, playlist management, history, and account info — need a valid YouTube Music session cookie.