Jellyfin API
Melodee provides a Jellyfin-compatible API that enables popular Jellyfin music clients to connect and stream your music library. This API implements the core Jellyfin media server endpoints required for music playback, browsing, and management.
Overview
The Jellyfin API allows clients designed for Jellyfin servers to work seamlessly with Melodee. This includes support for:
- Media Browsing: Artists, albums, songs, and playlists
- Streaming: Direct play and transcoding
- Library Management: Favorites, play states, and ratings
- Session Management: Playback reporting and scrobbling
- Playlist Operations: Create, edit, and manage playlists
Endpoint Structure
Jellyfin endpoints are available at the server root with automatic URL rewriting:
- Clients connect to:
http://your-server:port/ - Internal routing:
/api/jf/*
The middleware automatically detects Jellyfin client requests via the Authorization: MediaBrowser header and routes them appropriately.
Authentication
Server Discovery
Clients discover the server using:
GET /System/Info/Public
Response:
{
"LocalAddress": "http://localhost:5157",
"ServerName": "Melodee",
"Version": "1.7.0",
"ProductName": "Melodee",
"OperatingSystem": "Unix",
"Id": "c33ccd9320a17c12cfda124620290cae",
"StartupWizardCompleted": true
}
User Authentication
Authenticate using username and password:
POST /Users/AuthenticateByName
Content-Type: application/json
X-Emby-Authorization: MediaBrowser Client="MyClient", Device="MyDevice", DeviceId="unique-id", Version="1.0"
{
"Username": "your-username",
"Pw": "your-password"
}
Response includes an access token:
{
"User": {
"Id": "user-guid",
"Name": "username"
},
"AccessToken": "your-access-token"
}
Authenticated Requests
Include the token in subsequent requests:
Authorization: MediaBrowser Token="your-access-token", Client="MyClient", Device="MyDevice", DeviceId="unique-id", Version="1.0"
Core Endpoints
System
| Method | Path | Description |
|---|---|---|
| GET | /System/Info/Public | Server info (anonymous) |
| GET | /System/Ping | Server ping |
| POST | /System/Ping | Server ping (POST variant) |
Users
| Method | Path | Description |
|---|---|---|
| GET | /Users/Public | List users available for login |
| POST | /Users/AuthenticateByName | Authenticate user |
| GET | /Users/Me | Get current user profile |
| GET | /UserViews | Get user’s library views |
Items (Library Browsing)
| Method | Path | Description |
|---|---|---|
| GET | /Items | Query items with filters |
| GET | /Items/{id} | Get single item details |
| GET | /Items/{id}/PlaybackInfo | Get playback/streaming info |
| GET | /Items/{id}/Similar | Get similar items |
| GET | /Items/{id}/InstantMix | Generate instant mix |
| POST | /Items/{id}/Refresh | Request item rescan |
| DELETE | /Items/{id} | Delete item (playlists only) |
| GET | /Items/Filters | Get available filters (genres, years) |
Query Parameters for /Items
| Parameter | Description | Example |
|---|---|---|
| includeItemTypes | Filter by type | MusicAlbum, MusicArtist, Audio, Playlist |
| parentId | Filter by parent | Library or artist ID |
| sortBy | Sort field | SortName, DateCreated, Random |
| sortOrder | Sort direction | Ascending, Descending |
| limit | Max results | 50 |
| startIndex | Pagination offset | 0 |
| searchTerm | Search query | love songs |
| genres | Filter by genre | Rock |
| years | Filter by year | 2024 |
| isFavorite | Only favorites | true |
Artists
| Method | Path | Description |
|---|---|---|
| GET | /Artists | List all artists |
| GET | /Artists/AlbumArtists | List album artists only |
| GET | /Artists/{id}/Similar | Get similar artists |
Genres
| Method | Path | Description |
|---|---|---|
| GET | /Genres | List all genres |
| GET | /MusicGenres | List music genres (alternative endpoint) |
Playlists
| Method | Path | Description |
|---|---|---|
| POST | /Playlists | Create new playlist |
| POST | /Playlists/{id} | Update playlist metadata |
| DELETE | /Playlists/{id} | Delete playlist |
| GET | /Playlists/{id}/Items | Get playlist items |
| POST | /Playlists/{id}/Items | Add items to playlist |
| DELETE | /Playlists/{id}/Items | Remove items from playlist |
| POST | /Playlists/{id}/Items/{itemId}/Move/{newIndex} | Reorder playlist item |
Favorites and Play State
| Method | Path | Description |
|---|---|---|
| POST | /Users/{userId}/FavoriteItems/{itemId} | Add to favorites |
| DELETE | /Users/{userId}/FavoriteItems/{itemId} | Remove from favorites |
| POST | /Users/{userId}/PlayedItems/{itemId} | Mark as played |
| DELETE | /Users/{userId}/PlayedItems/{itemId} | Mark as unplayed |
Playback and Sessions
| Method | Path | Description |
|---|---|---|
| POST | /Sessions/Playing | Report playback started |
| POST | /Sessions/Playing/Progress | Report playback progress |
| POST | /Sessions/Playing/Stopped | Report playback stopped (triggers scrobble) |
| POST | /Sessions/Logout | Logout/revoke token |
| POST | /Sessions/Capabilities | Register client capabilities |
| POST | /Sessions/Capabilities/Full | Register full capabilities |
| GET | /Sessions | Get active sessions |
Streaming
| Method | Path | Description |
|---|---|---|
| GET | /Audio/{id}/universal | Stream audio (supports transcoding) |
| HEAD | /Audio/{id}/universal | Check stream availability |
| GET | /Audio/{id}/stream | Direct stream |
Streaming Parameters
| Parameter | Description | Default |
|---|---|---|
| container | Output format | mp3, opus, flac |
| audioBitRate | Target bitrate | 320000 |
| maxStreamingBitrate | Max bitrate | 999999999 |
| transcodingContainer | Transcoding format | mp3 |
Images
| Method | Path | Description |
|---|---|---|
| GET | /Items/{id}/Images/Primary | Get primary image |
| GET | /Items/{id}/Images/{imageType} | Get specific image type |
| GET | /Audio/{id}/Lyrics | Get song lyrics |
Client Setup Guides
Finamp
Finamp is a popular open-source Jellyfin music client for iOS, Android, and Desktop.
- Download Finamp from your app store or GitHub releases
- Add Server:
- Open Finamp and tap “Add Server”
- Enter your Melodee server URL:
http://your-server:port - Finamp will detect the server automatically
- Login:
- Enter your Melodee username and password
- Finamp will authenticate and load your library
- Configuration Tips:
- Enable offline downloads for your favorite albums
- Configure transcoding quality in settings
- Set up lyrics display if your library has embedded lyrics
Feishin (Jellyfin Mode)
Feishin is a modern music client that supports both Jellyfin and Subsonic servers.
- Download Feishin from GitHub releases
- Add Server:
- Click “Add Server”
- Select “Jellyfin” as the server type
- Enter your Melodee server URL:
http://your-server:port
- Login:
- Enter your username and password
- Feishin will connect and index your library
- Features:
- Modern, customizable interface
- Gapless playback support
- Queue management and playlists
- Keyboard shortcuts for power users
Streamyfin
Streamyfin is a Jellyfin client focused on music streaming for iOS and Android.
- Install Streamyfin from your app store
- Add Server:
- Tap “Add Server” on first launch
- Enter:
http://your-server:port
- Authenticate with your Melodee credentials
- Enjoy:
- Browse your library by artist, album, or genre
- Create and manage playlists
- Stream with background playback support
Gelli
Gelli is an Android music player for Jellyfin servers.
- Install Gelli from F-Droid or GitHub
- Configure Server:
- Open Settings → Server
- Enter your Melodee URL
- Login with your credentials
- Start Streaming:
- Browse artists and albums
- Build your queue
- Configure audio quality settings
Playback Reporting
Melodee tracks playback through session reporting endpoints. When clients report playback stopped, Melodee:
- Records the play in the user’s history
- Updates play counts
- Scrobbles to Last.fm (if configured)
- Updates “Recently Played” lists
Reporting Flow
Client starts playback → POST /Sessions/Playing
Client updates progress → POST /Sessions/Playing/Progress (periodic)
Client stops playback → POST /Sessions/Playing/Stopped (triggers scrobble)
Compatibility Notes
Supported Features
- ✅ Library browsing (artists, albums, songs)
- ✅ Audio streaming (direct play and transcoding)
- ✅ Playlist management
- ✅ Favorites and ratings
- ✅ Play state tracking
- ✅ Instant mix generation
- ✅ Similar items recommendations
- ✅ Search functionality
- ✅ Genre and year filtering
- ✅ Session management
- ✅ Scrobbling integration
Video and TV Features
Melodee is a music-focused server. Video-related Jellyfin features are not implemented:
- ❌ Video playback
- ❌ TV shows and movies
- ❌ Live TV
- ❌ Subtitles
- ❌ Video transcoding
Known Limitations
- Image types are limited to Primary and Album art
- Some advanced Jellyfin features may return empty results
- User management is handled through Melodee’s native interface
Troubleshooting
Client Can’t Connect
- Verify the server URL is correct and accessible
- Check that the
Authorization: MediaBrowserheader is being sent - Ensure no firewall is blocking the connection
- Try accessing
/System/Info/Publicdirectly in a browser
Authentication Fails
- Verify username and password are correct
- Check that the user account is not locked
- Ensure the client is sending proper MediaBrowser headers
Playback Issues
- Check server logs for streaming errors
- Verify the audio file format is supported
- Try a different transcoding setting in the client
- Check available disk space for transcoding cache
Missing Library Content
- Ensure your music is properly indexed in Melodee
- Check that albums have valid metadata
- Run a library scan from Melodee’s admin interface
- Verify the user has access to the library
API Testing
You can test Jellyfin API endpoints using curl:
# Server discovery
curl http://your-server:port/System/Info/Public
# Ping
curl http://your-server:port/System/Ping
# Authenticate (save token for subsequent requests)
curl -X POST http://your-server:port/Users/AuthenticateByName \
-H "Content-Type: application/json" \
-H "X-Emby-Authorization: MediaBrowser Client=\"curl\", Device=\"test\", DeviceId=\"test123\", Version=\"1.0\"" \
-d '{"Username":"your-user","Pw":"your-password"}'
# Get albums (with token)
curl http://your-server:port/Items?includeItemTypes=MusicAlbum \
-H "Authorization: MediaBrowser Token=\"YOUR_TOKEN\", Client=\"curl\", Device=\"test\", DeviceId=\"test123\", Version=\"1.0\""
For the complete Jellyfin API specification, refer to the Jellyfin API Documentation. Melodee implements the subset of endpoints relevant to music streaming.
Feedback
Was this page helpful?
Glad to hear it! Please tell us how we can improve.
Sorry to hear that. Please tell us how we can improve.