Plex Library API

Library endpoints which are outside of the Media Provider API. Typically this is manipulation of the library (adding/removing sections, modifying preferences, etc).

GitHub OpenAPI
Business capability
Media Asset Management BC-3710

Operations 84

Each operation below carries the questions people ask an LLM about it and the instructions they give an agent to run it. Generated by API Evangelist overlay

GET /library/all List all items in the library · Get all items in library #
Ask an LLM
“How do I get every item in my media library?”
“Can I search the library for a movie by title?”
Tell an agent
List all items in the library.
Find library items matching {mediaQuery}.
DELETE /library/caches Clear library hub caches · Delete library caches #
Ask an LLM
“How do I force Plex to rebuild its hub caches?”
“What happens to cached library data when I clear the caches?”
Tell an agent destructive · confirm first
Delete the library hub caches.
Recompute library hub data by clearing the caches.
PUT /library/clean/bundles Clean unused media bundles · Clean bundles #
Ask an LLM
“How do I remove bundles that no longer point to any media?”
“Can I clean up old media bundles after deleting files?”
Tell an agent destructive · confirm first
Clean out unused media bundles.
Remove bundles that are no longer attached to any media.
POST /library/file Ingest a file as a transient item · Ingest a transient item #
Ask an LLM
“How do I add a movie or episode to the library without a library section?”
“Can I ingest a file by URL and have its metadata scanned automatically?”
Tell an agent
Ingest {url} as a transient item.
Add {url} as a transient item with compute hashes {computeHashes}.
GET /library/matches Match external content to library items · Get library matches #
Ask an LLM
“How do I find the library item that matches an external movie or show?”
“Can I match a file path to a library item by title and year?”
Tell an agent
Match {title} ({type}) to a library item.
Find library matches for {title} ({type}) released in {year}.
GET /library/media/{mediaId}/chapterImages/{chapter} Get a chapter thumbnail image · Get a chapter image #
Ask an LLM
“How do I fetch a single chapter thumbnail for a movie?”
“Can I get one chapter image by its index?”
Tell an agent
Get chapter {chapter} image for media {mediaId}.
Fetch the thumbnail of chapter {chapter} on {mediaId}.
PUT /library/metadata/{ids} Edit a metadata item · Edit a metadata item #
Ask an LLM
“How do I change the title or year of a movie in the library?”
“Can I edit metadata fields on a library item?”
Tell an agent
Edit metadata item {ids} with {args}.
Update the metadata fields of library item {ids}.
DELETE /library/metadata/{ids} Delete a metadata item and its media · Delete a metadata item #
Ask an LLM
“How do I remove a movie from the library and delete its file?”
“Can I delete a library item and its proxy versions too?”
Tell an agent destructive · confirm first
Delete metadata item {ids} and its media.
Remove library item {ids} and proxy items ({proxy}).
PUT /library/metadata/{ids}/addetect Start ad detection on an item · Ad-detect an item #
Ask an LLM
“How do I detect ads in a movie or episode?”
“Can ad detection be started on a library item?”
Tell an agent
Start ad detection on item {ids}.
Run ad detection on library item {ids}.
GET /library/metadata/{ids}/allLeaves List the episodes of a show · Get the leaves of an item #
Ask an LLM
“How do I get every episode of a TV show in the library?”
“Can I list the leaves of a show's metadata item?”
Tell an agent
Get the leaves of metadata item {ids}.
List all episodes of show {ids}.
PUT /library/metadata/{ids}/analyze Start analyzing a media item · Analyze an item #
Ask an LLM
“How do I start analyzing a movie for its chapters and metadata?”
“Can I set thumbnail and artwork offsets during analysis?”
Tell an agent
Start analyzing item {ids}.
Analyze {ids} with thumbnail offset {thumbOffset} and artwork offset {artOffset}.
PUT /library/metadata/{ids}/chapterThumbs Generate chapter thumbnails · Generate thumbs of chapters for an item #
Ask an LLM
“How do I generate thumbnails for each chapter of a movie?”
“Can I force chapter thumbnail generation for an item?”
Tell an agent
Generate chapter thumbnails for item {ids}.
Force chapter thumbnails on {ids} with force {force}.
PUT /library/metadata/{ids}/credits Detect credits in a media item · Credit detect a metadata item #
Ask an LLM
“How do I detect the opening and closing credits of a movie?”
“Can I force a fresh credit detection run?”
Tell an agent
Detect credits in item {ids}.
Force credit detection on {ids} with force {force}.
GET /library/metadata/{ids}/extras List an item's extras · Get an item's extras #
Ask an LLM
“How do I see the extras attached to a movie or episode?”
“What extras are available for a library item?”
Tell an agent
Get the extras for item {ids}.
Show extra content attached to {ids}.
POST /library/metadata/{ids}/extras Add an extra to an item · Add to an item's extras #
Ask an LLM
“How do I add a behind-the-scenes extra to a movie?”
“Can I attach a new extra to a library item by URL and title?”
Tell an agent
Add extra {title} of type {extraType} from {url} to item {ids}.
Attach {url} as extra {title} to {ids}.
GET /library/metadata/{ids}/file Get a bundle file from an item · Get a file from a metadata or media bundle #
Ask an LLM
“How do I fetch the theme music file of a TV show?”
“Can I download an image or MP3 from a metadata item's bundle?”
Tell an agent
Get the bundle file {url} from item {ids}.
Download the theme music of {ids}.
PUT /library/metadata/{ids}/index Start BIF indexing of an item · Start BIF generation of an item #
Ask an LLM
“How do I generate a BIF index for a movie?”
“Can I force BIF generation on an item?”
Tell an agent
Start BIF generation for item {ids}.
Force BIF indexing on {ids} with force {force}.
PUT /library/metadata/{ids}/intro Detect intros in a media item · Intro detect an item #
Ask an LLM
“How do I detect the intro sequence of a TV show?”
“Can I set the intro detection threshold?”
Tell an agent
Detect intros in item {ids}.
Detect intros in {ids} with threshold {threshold}.
POST /library/metadata/{ids}/marker Create a marker on an item · Create a marker #
Ask an LLM
“How do I mark a spot in a movie for a user?”
“Can I create a marker of a given type at a specific time offset?”
Tell an agent
Create a {type} marker on item {ids} at {startTimeOffset}.
Add a {type} marker from {startTimeOffset} to {endTimeOffset} on {ids}.
DELETE /library/metadata/{ids}/marker/{marker} Delete a user marker on a library item · Delete a marker #
Ask an LLM
“How do I remove a playback marker I set on a movie in my library?”
“Can I delete a marker from a metadata item for a specific user?”
Tell an agent destructive · confirm first
Delete marker {marker} from metadata item {ids}.
Remove the user's marker {marker} on library item {ids}.
PUT /library/metadata/{ids}/marker/{marker} Edit a marker on an item · Edit a marker #
Ask an LLM
“How do I move an existing marker on a movie?”
“Can I change the attributes of a marker I already created?”
Tell an agent
Edit marker {marker} on item {ids} to {type} at {startTimeOffset}.
Update marker {marker} on {ids} with attributes {attributes}.
PUT /library/metadata/{ids}/match Match a library item to a media guid · Match a metadata item #
Ask an LLM
“How do I match a movie or show in my library with a specific media guid?”
“Can I match a metadata item to an entry from a particular source?”
Tell an agent
Match metadata {ids} to guid {guid}.
Link library entry {ids} to {name} ({year}) with source {guid}.
PUT /library/metadata/{ids}/matches Find metadata matches for a library item · Get metadata matches for an item #
Ask an LLM
“What metadata matches exist for a movie I added to my library?”
“Can I find a match for a library item by its parent title and year?”
Tell an agent
Find metadata matches for {title} in library item {ids}.
Find matches for {title} under parent {parentTitle} in library {ids}.
DELETE /library/metadata/{ids}/media/{mediaItem} Delete a media file from a library item · Delete a media item #
Ask an LLM
“How do I remove a video file from a movie in my library?”
“Can I delete a proxy media item from a library item?”
Tell an agent destructive · confirm first
Delete media item {mediaItem} from metadata item {ids}.
Remove media {mediaItem} from library item {ids} with proxy {proxy}.
PUT /library/metadata/{ids}/merge Merge a library item with others · Merge a metadata item #
Ask an LLM
“How do I combine a movie in my library with other items?”
“Can I merge several library items into one?”
Tell an agent
Merge metadata item {ids} with items {ids2}.
Combine library item {ids} into one item.
GET /library/metadata/{ids}/nearest Find tracks similar to a song · Get nearest tracks to metadata item #
Ask an LLM
“What songs sound most like a track I have in my library?”
“Can I find tracks within a maximum distance of a song?”
Tell an agent
Find tracks nearest to {ids}.
Find {limit} tracks within distance {maxDistance} of {ids}.
PUT /library/metadata/{ids}/prefs Set preferences on a library item · Set metadata preferences #
Ask an LLM
“How do I set preferences on a movie or show in my library?”
“Can I save preferences for a library item by passing arguments?”
Tell an agent
Set preferences on metadata item {ids}.
Save preferences for library item {ids} with args {args}.
PUT /library/metadata/{ids}/refresh Refresh a library item's metadata · Refresh a metadata item #
Ask an LLM
“How do I reload a movie's metadata from its agent?”
“Can I refresh a library item and mark it updated?”
Tell an agent
Refresh metadata item {ids}.
Refresh library item {ids} from agent {agent} and mark it updated {markUpdated}.
GET /library/metadata/{ids}/related Get related items to a library item · Get related items #
Ask an LLM
“What related items are in the hub for a movie in my library?”
“Can I get a related-items hub for a library item?”
Tell an agent
Get the related items hub for metadata item {ids}.
Show related items for library item {ids}.
GET /library/metadata/{ids}/similar Find items similar to a library item · Get similar items #
Ask an LLM
“What movies are similar to one I have in my library?”
“Can I get a list of similar items to a library item?”
Tell an agent
Find {count} similar items to metadata item {ids}.
Get similar movies to library item {ids}.
PUT /library/metadata/{ids}/split Split a library item into several · Split a metadata item #
Ask an LLM
“How do I split a movie in my library into separate items?”
“Can I split a metadata item into multiple items?”
Tell an agent
Split metadata item {ids} into separate items.
Break up library item {ids} into several items.
GET /library/metadata/{ids}/subtitles Add subtitles to a library item · Add subtitles #
Ask an LLM
“How do I add a subtitle track to a movie in my library?”
“Can I add subtitles to a specific media item of a library item?”
Tell an agent
Add subtitles to metadata item {ids}.
Add {language} subtitles to media {mediaItemID} of library item {ids}.
GET /library/metadata/{ids}/tree Get a library item as a tree · Get metadata items as a tree #
Ask an LLM
“How do I see the seasons and episodes of a show in my library as a tree?”
“Can I get a library item's tree structure?”
Tell an agent
Get metadata item {ids} as a tree.
Show the seasons and episodes of library item {ids} as a tree.
PUT /library/metadata/{ids}/unmatch Unmatch a library item from its agent · Unmatch a metadata item #
Ask an LLM
“How do I unmatch a movie in my library from its agent?”
“Can I clear the agent match on a library item?”
Tell an agent
Unmatch metadata item {ids}.
Clear the agent match on library item {ids}.
GET /library/metadata/{ids}/users/top Get users who played a library item most · Get metadata top users #
Ask an LLM
“Which users have played a movie in my library the most?”
“Can I see the top users for a library item?”
Tell an agent
Get the top users for metadata item {ids}.
Show the users who played library item {ids} most.
PUT /library/metadata/{ids}/voiceActivity Detect voice activity in a library item · Detect voice activity #
Ask an LLM
“How do I detect spoken voice in a movie or show in my library?”
“Can I force a voice activity detection on a library item?”
Tell an agent
Detect voice activity in metadata item {ids}.
Run voice activity detection on library item {ids} manually {manual}.
POST /library/metadata/{ids}/{element} Set artwork, theme or other element on a library item · Set an item's artwork, theme, etc #
Ask an LLM
“How do I upload artwork for a movie in my library?”
“Can I set a theme on a library item by posting binary data?”
Tell an agent
Post artwork {element} to metadata item {ids}.
Upload binary data for {element} on library item {ids}.
PUT /library/metadata/{ids}/{element} Set artwork, theme or other element on a library item · Set an item's artwork, theme, etc #
Ask an LLM
“How do I set the artwork on a movie in my library?”
“Can I set a theme for a library item by URL?”
Tell an agent
Set the {element} of metadata item {ids} to {url}.
Set artwork {element} on library item {ids}.
DELETE /library/metadata/{ids}/{element} Delete artwork, theme or other element from a library item · Delete an item's artwork, theme, etc #
Ask an LLM
“How do I remove the artwork from a movie in my library?”
“Can I delete a theme from a library item?”
Tell an agent destructive · confirm first
Delete the {element} from metadata item {ids}.
Remove artwork {element} from library item {ids}.
GET /library/metadata/{ids}/{element}/{timestamp} Get artwork, theme or other element of a library item · Get an item's artwork, theme, etc #
Ask an LLM
“How do I fetch the artwork of a movie in my library?”
“Can I get a theme element of a library item for a timestamp?”
Tell an agent
Get {element} for metadata item {ids} at {timestamp}.
Show artwork {element} of library item {ids} for {timestamp}.
GET /library/metadata/augmentations/{augmentationId} Check a metadata augmentation · Get augmentation status #
Ask an LLM
“Has my metadata augmentation finished?”
“Can I wait for an augmentation to complete before continuing?”
Tell an agent
Check the status of augmentation {augmentationId}.
Wait for augmentation {augmentationId} to complete.
PUT /library/optimize Optimize the media database · Optimize the Database #
Ask an LLM
“How do I optimize the media database?”
“Can I optimize the database without waiting for it to finish?”
Tell an agent
Optimize the media database.
Optimize the database asynchronously with async {async}.
PUT /library/parts/{partId} Set audio and subtitle streams for a media part · Set stream selection #
Ask an LLM
“How do I choose which audio and subtitle tracks play for a media part?”
“Can I set the same audio and subtitle streams across all parts of a media item?”
Tell an agent
Set the audio stream of part {partId} to {audioStreamID}.
Set the subtitle stream of part {partId} to {subtitleStreamID}.
GET /library/parts/{partId}/indexes/{index} Get a BIF index for a media part · Get BIF index for a part #
Ask an LLM
“How do I get the BIF index for a media part?”
“Can I fetch a BIF index at a specific interval?”
Tell an agent
Get the {index} BIF index for part {partId}.
Get BIF index {index} for part {partId} at intervals of {interval} ms.
GET /library/parts/{partId}/indexes/{index}/{offset} Extract an image from a media part's BIF · Get an image from part BIF #
Ask an LLM
“How do I extract a thumbnail image from a media part's BIF at a given offset?”
“Can I grab a BIF image for a video still?”
Tell an agent
Extract a BIF image from part {partId} at offset {offset} using index {index}.
Grab a video still at {offset} ms from BIF index {index} of part {partId}.
GET /library/parts/{partId}/{changestamp}/{filename} Stream or download a media part · Get a media part #
Ask an LLM
“How do I stream a media part for playback?”
“Can I download a media part instead of streaming it?”
Tell an agent
Stream media part {partId} with changestamp {changestamp} and filename {filename}.
Download media part {partId} as {filename} using changestamp {changestamp}.
GET /library/people/{personId} Get details for an actor · Get person details #
Ask an LLM
“What details are stored for a particular actor?”
“Can I look up an actor by their Plex GUID tag key?”
Tell an agent
Get details for actor {personId}.
Look up actor {personId} by tag key.
GET /library/people/{personId}/media List media for an actor · Get media for a person #
Ask an LLM
“Which movies and shows has a particular actor appeared in?”
“Can I get every media item for one actor?”
Tell an agent
List all media for actor {personId}.
Show the filmography of actor {personId}.
GET /library/randomArtwork Get random artwork for a screensaver · Get random artwork #
Ask an LLM
“How do I get random artwork for a screensaver?”
“Can I limit the random artwork to certain sections?”
Tell an agent
Get random artwork across all sections.
Get random artwork for sections {sections}.
GET /library/sections/all List media library sections · Get library sections (main Media Provider Only) #
Ask an LLM
“What media libraries are available on my server?”
“Can I see the type and supported sorts of each library section?”
Tell an agent
List all library sections.
Show every media library on the server.
POST /library/sections/all Add a new media library section · Add a library section #
Ask an LLM
“How do I add a new library section for my media?”
“Can I import media from iTunes when creating a library section?”
Tell an agent
Add a {type} library section named {name} using agent {agent} and language {language}.
Create a library section {name} of type {type} with agent {agent}, language {language} and locations {locations}.
DELETE /library/sections/all/refresh Stop all library section refreshes · Stop refresh #
Ask an LLM
“How do I stop every library section from refreshing metadata?”
“Can I halt all section refreshes at once?”
Tell an agent destructive · confirm first
Stop all library section refreshes.
Halt every section's metadata refresh.
GET /library/sections/prefs Get a library section's preferences · Get section prefs #
Ask an LLM
“What preferences are set for a library section?”
“Can I check the preferences for a section's metadata agent?”
Tell an agent
Get the preferences for section {type} using agent {agent}.
Show the preferences of the {type} section.
POST /library/sections/refresh Refresh all library section metadata · Refresh all sections #
Ask an LLM
“How do I force a metadata refresh across all library sections?”
“Can I refresh section metadata without re-scanning everything?”
Tell an agent
Refresh metadata for all library sections.
Force a metadata refresh across every section with force {force}.
GET /library/sections/{sectionId} Get a library section's details · Get a library section by id #
Ask an LLM
“What type and supported sorts does a library section have?”
“Can I get the details of one library section?”
Tell an agent
Get details for library section {sectionId}.
Show the type and supported sorts of section {sectionId}.
DELETE /library/sections/{sectionId} Delete a library section · Delete a library section #
Ask an LLM
“How do I delete a library section?”
“Can I delete a library section asynchronously?”
Tell an agent destructive · confirm first
Delete library section {sectionId}.
Delete section {sectionId} asynchronously with async {async}.
PUT /library/sections/{sectionId} Edit a library section · Edit a library section #
Ask an LLM
“How do I rename a library section or change its agent?”
“Can I change the language or locations of an existing library section?”
Tell an agent
Rename library section {sectionId} to {name}.
Set the agent of section {sectionId} to {agent}.
PUT /library/sections/{sectionId}/all Rename or relabel library items · Set the fields of the filtered items #
Ask an LLM
“How do I rename all movies in a section at once?”
“Can I change the title or year of every item matching a filter?”
Tell an agent
Set the title of all {type} items in section {sectionId} to {title}.
Rename everything in section {sectionId} matching {filters} to {title}.
PUT /library/sections/{sectionId}/analyze Analyze all items in a library section · Analyze a section #
Ask an LLM
“How do I start analyzing every item in a library section?”
“Can I trigger BIF generation for a section at the same time as analysis?”
Tell an agent
Analyze all items in library section {sectionId}.
Start analysis and BIF generation for section {sectionId}.
GET /library/sections/{sectionId}/autocomplete Autocomplete a search field in a library section · Get autocompletions for search #
Ask an LLM
“How do I autocomplete a search query in a library section?”
“Can I autocomplete only genre or title values?”
Tell an agent
Autocomplete {field.query} in section {sectionId}.
Autocomplete {field.query} for {type} items in section {sectionId}.
GET /library/sections/{sectionId}/collections List collections in a library section · Get collections in a section #
Ask an LLM
“What collections are defined in one of my library sections?”
“Can I see the collections for a music or video library section?”
Tell an agent
List the collections in library section {sectionId}.
Show collections in section {sectionId} matching {mediaQuery}.
DELETE /library/sections/{sectionId}/collection/{collectionId} Delete a library collection · Delete a collection #
Ask an LLM
“How do I remove a collection from a library section?”
“Can I delete a single collection by its ID?”
Tell an agent destructive · confirm first
Delete collection {collectionId} from library section {sectionId}.
Remove the {collectionId} collection in section {sectionId}.
GET /library/sections/{sectionId}/common Get common attributes of items in a section · Get common fields for items #
Ask an LLM
“What attributes do all the items in a library section share?”
“Can I get common fields for a filtered set of items in a section?”
Tell an agent
Get common fields for items in library section {sectionId}.
Show common attributes of {type} items in section {sectionId} matching {mediaQuery}.
GET /library/sections/{sectionId}/composite/{updatedAt} Get a composite image of a section · Get a section composite image #
Ask an LLM
“Can I get a composite image of all the posters in a library section?”
“What does the composite image of a section look like at a given update time?”
Tell an agent
Get the composite image of library section {sectionId} updated at {updatedAt}.
Build a section composite for {sectionId} using the {composite} composite type.
PUT /library/sections/{sectionId}/emptyTrash Empty a library section's trash · Empty section trash #
Ask an LLM
“How do I permanently delete missing media and metadata from a library section?”
“Can I empty the trash of a single library section?”
Tell an agent destructive · confirm first
Empty the trash in library section {sectionId}.
Permanently delete missing media and metadata from section {sectionId}.
GET /library/sections/{sectionId}/audioLayout List audio layouts in a section · Get audio layouts in a section #
Ask an LLM
“Which audio layouts like stereo or 5.1 are found in a library section?”
“Can I list distinct audio layouts for a music library section?”
Tell an agent
List audio layouts in library section {sectionId}.
Show distinct audio layouts for section {sectionId} matching {mediaQuery}.
GET /library/sections/{sectionId}/videoCodec List video codecs in a section · Get video codecs in a section #
Ask an LLM
“What video codecs are used in a library section?”
“Can I list distinct video codecs for a video library section?”
Tell an agent
List video codecs in library section {sectionId}.
Show distinct video codecs for section {sectionId} matching {mediaQuery}.
GET /library/sections/{sectionId}/audioCodec List audio codecs in a section · Get audio codecs in a section #
Ask an LLM
“Which audio codecs are used in a library section?”
“Can I list distinct audio codecs for a music library section?”
Tell an agent
List audio codecs in library section {sectionId}.
Show distinct audio codecs for section {sectionId} matching {mediaQuery}.
GET /library/sections/{sectionId}/subtitleCodec List subtitle codecs in a library section · Get subtitle codecs in a section #
Ask an LLM
“Which subtitle codecs are found in a library section?”
“Can I list the subtitle formats used by media in a section?”
Tell an agent
List subtitle codecs in section {sectionId}.
Show the subtitle codecs used in {sectionId} matching {mediaQuery}.
GET /library/sections/{sectionId}/filters List common filters on a section · Get section filters #
Ask an LLM
“What common filters are applied to a library section?”
“Can I see the filters that affect items in a section?”
Tell an agent
List common filters on library section {sectionId}.
Show the filters applied to section {sectionId}.
GET /library/sections/{sectionId}/firstCharacters List first characters of items in a section · Get list of first characters #
Ask an LLM
“Which first characters of titles appear in a library section?”
“Can I sort a section's items by first letter?”
Tell an agent
List first characters of {type} items in library section {sectionId}.
Show first characters of section {sectionId} sorted by {sort}.
DELETE /library/sections/{sectionId}/indexes Delete all indexes in a section · Delete section indexes #
Ask an LLM
“How do I rebuild the indexes of a library section?”
“Can I delete every index in a section at once?”
Tell an agent destructive · confirm first
Delete all indexes in library section {sectionId}.
Rebuild the indexes of section {sectionId} by removing them first.
DELETE /library/sections/{sectionId}/intros Delete all intro markers in a section · Delete section intro markers #
Ask an LLM
“How do I remove intro markers from a library section?”
“Can I clear every intro marker in a section?”
Tell an agent destructive · confirm first
Delete all intro markers in library section {sectionId}.
Clear the intro markers of section {sectionId}.
GET /library/sections/{sectionId}/prefs Get a section's preferences · Get section prefs #
Ask an LLM
“What preferences are set on a library section?”
“Can I read a section's prefs, optionally overriding the agent?”
Tell an agent
Get the preferences of library section {sectionId}.
Show section {sectionId} preferences using agent {agent}.
PUT /library/sections/{sectionId}/prefs Set a section's preferences · Set section prefs #
Ask an LLM
“How do I change the preferences of a library section?”
“Can I set preferences on a section by ID?”
Tell an agent
Set the preferences of library section {sectionId} to {prefs}.
Update section {sectionId} preferences with {prefs}.
POST /library/sections/{sectionId}/refresh Refresh a library section · Refresh section #
Ask an LLM
“How do I force a library section to refresh its metadata?”
“Can I refresh only one path within a section?”
Tell an agent
Refresh library section {sectionId}.
Refresh section {sectionId} at path {path} with force {force}.
DELETE /library/sections/{sectionId}/refresh Cancel a library section refresh · Cancel section refresh #
Ask an LLM
“How do I stop a library section refresh that is in progress?”
“Can I cancel a section refresh by its ID?”
Tell an agent destructive · confirm first
Cancel the refresh of library section {sectionId}.
Stop the in-progress refresh of section {sectionId}.
GET /library/sections/{sectionId}/sorts List sort mechanisms available in a section · Get a section sorts #
Ask an LLM
“What sort options are available for a library section?”
“Can I see how items in a section can be sorted?”
Tell an agent
List sort mechanisms for library section {sectionId}.
Show the available sort options of section {sectionId}.
GET /library/streams/{streamId}.{ext} Get a sidecar stream like a subtitle · Get a stream #
Ask an LLM
“Can I fetch a sidecar subtitle stream from a library section?”
“Is it possible to get a stream by its ID and extension?”
Tell an agent
Get stream {streamId} with extension {ext}.
Fetch sidecar stream {streamId}.{ext} with auto-adjust {autoAdjustSubtitle}.
PUT /library/streams/{streamId}.{ext} Set a stream offset · Set a stream offset #
Ask an LLM
“How do I adjust the offset of a sidecar stream?”
“Can I set a stream offset in milliseconds?”
Tell an agent
Set the offset of stream {streamId}.{ext} to {offset}.
Adjust sidecar stream {streamId}.{ext} by {offset} ms.
DELETE /library/streams/{streamId}.{ext} Delete a downloaded subtitle stream · Delete a stream #
Ask an LLM
“How do I remove a subtitle stream I downloaded?”
“Can I delete a sidecar subtitle stream?”
Tell an agent destructive · confirm first
Delete subtitle stream {streamId}.
Remove downloaded stream {streamId} with extension {ext}.
GET /library/streams/{streamId}/loudness Get loudness of a stream · Get loudness about a stream #
Ask an LLM
“What is the loudness of a stream in dB?”
“Can I get loudness readings every 100ms?”
Tell an agent
Get loudness of stream {streamId}.
Get loudness of stream {streamId} subsampled to {subsample}.
GET /library/streams/{streamId}/levels Get stream loudness as JSON · Get loudness about a stream in json #
Ask an LLM
“Can I get stream loudness as JSON?”
“Which stream levels are returned per 100ms?”
Tell an agent
Get stream levels for stream {streamId} as JSON.
Get stream loudness JSON for {streamId} with subsample {subsample}.
GET /library/tags List library tags · Get all library tags of a type #
Ask an LLM
“What tags are used across my media library?”
“Can I list only one type of library tag?”
Tell an agent
List all library tags.
List library tags of type {type}.

Work with this as data

Every API here is available over the APIs.io API and to AI agents over MCP.

MCP server

One button, every client — Claude, Cursor, VS Code and the rest.

https://apis.io/mcp

Tools for apis

7 MCP tools reach this
  • find_apisBrowse and filter every API in the catalog.
  • get_api_artifactsOne API's artifacts, grouped by type.
  • get_openapiThe primary OpenAPI for this API.
  • find_similar_apisAPIs that look like this one.
  • apis_io_searchSTART HERE — APIs, providers and tags for one query, each with its total.
  • resolveTurn a domain, URL or GitHub org into the provider it belongs to.
  • find_cohortsEvery scored population of providers in the catalog.
All 92 tools →

Call it yourself

curl for this page
This API
curl "https://apis.io/api/v1/apis/plex:plex-library-api"
All apis
curl "https://apis.io/api/v1/apis?limit=25"

Calls without X-API-Key need no key. Calls with it need a paid plan — get a key.

Get an API key

Free tier, no form to fill in. Signing in shares your email address with us — we store it to create your key and to recognise you if you sign in with another provider. By signing up you are subscribing to the APIs.io and API Evangelist newsletters — you can unsubscribe from any issue. See our Privacy Policy and Terms.

A second provider on the same verified email joins the account you already have.

OpenAPI Specification

plex-library-api-openapi.yml Raw ↑
openapi: 3.2.0
info:
  title: Plex Media Server Library API
  version: '1.2.2

    '
  license:
    name: Apache 2.0
    url: https://www.apache.org/licenses/LICENSE-2.0.html
  description: '# API Info

    ## Content Types

    The API supports responses in both XML and JSON, and clients can request one or the other using the standard `Accept` HTTP header.'
servers:
- url: https://{IP-description}.{identifier}.plex.direct:{port}
  variables:
    IP-description:
      default: 1-2-3-4
      description: A `-` separated string of the IPv4 or IPv6 address components
    identifier:
      default: 0123456789abcdef0123456789abcdef
      description: The unique identifier of this particular PMS
    port:
      default: '32400'
security:
- user_token:
  - shared user
  - admin
tags:


# --- truncated at 32 KB (248 KB total) ---
# Full source: https://artifacts.apis.io/plex/openapi/plex-library-api-openapi.yml