How AI is applied across API Evangelist and APIs.io. Read my AI disclosure →
API Evangelist API Evangelist
Discovery
Learnings
Guidance
Toolbox
Alignment
API Evangelist LLC

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).

Plex Library API is one of 31 APIs that Plex publishes on the APIs.io network, described by a machine-readable OpenAPI specification.

Tagged areas include Library. The published artifact set on APIs.io includes an OpenAPI specification, API documentation, and an API reference.

This API exposes 84 operations across 72 paths, and defines 26 schemas. It is described by OpenAPI 3.2.0, at version 1.2.2 .

Requests are made against a single base URL, https://{IP-description}.{identifier}.plex.direct:{port}.

84 operations 72 paths 26 schemas 12 DELETE39 GET7 POST26 PUT

Metadata

The identity and technical contract details declared by the specification.

Specification
OpenAPI 3.2.0
API Version
1.2.2
Base URL
https://1-2-3-4.0123456789abcdef0123456789abcdef.plex.direct:32400
Authentication
API Key
License
Resource Areas
1

Authentication & Security 1

Plex Library API declares 1 security scheme for authenticating requests. An API key is passed in the header as X-Plex-Token (user_token). By default, every request must be authenticated.

  • user_token — The token which identifies the user accessing the PMS. This is typically provided to the client by plex.tv. This can be either a traditional access token or a…

Paths & Operations 84

Across 72 paths, the API surfaces 84 operations — 12 DELETE, 39 GET, 7 POST, 26 PUT. Each is listed below with its method, path, parameters, and response codes.

Library 84

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

GET
/library/all
Get all items in library
libraryGetAll 1 param → 200
DELETE
/library/caches
Delete library caches
libraryDeleteCaches → 200
PUT
/library/clean/bundles
Clean bundles
libraryPutCleanBundles → 200
POST
/library/file
Ingest a transient item
libraryPostFile 4 params → 200
GET
/library/matches
Get library matches
libraryGetMatches 14 params → 200
GET
/library/media/{mediaId}/chapterImages/{chapter}
Get a chapter image
libraryGetMediaMediaChapterImagesChapter 2 params → 200404
PUT
/library/metadata/{ids}
Edit a metadata item
libraryMetadataPutSlash 2 params → 200400
DELETE
/library/metadata/{ids}
Delete a metadata item
libraryMetadataDeleteSlash 2 params → 200400
PUT
/library/metadata/{ids}/addetect
Ad-detect an item
libraryMetadataPutAddetect 1 param → 200
GET
/library/metadata/{ids}/allLeaves
Get the leaves of an item
libraryMetadataGetAllLeaves 1 param → 200
PUT
/library/metadata/{ids}/analyze
Analyze an item
libraryMetadataPutAnalyze 3 params → 200
PUT
/library/metadata/{ids}/chapterThumbs
Generate thumbs of chapters for an item
libraryMetadataPutChapterThumbs 2 params → 200
PUT
/library/metadata/{ids}/credits
Credit detect a metadata item
libraryMetadataPutCredits 3 params → 200
GET
/library/metadata/{ids}/extras
Get an item's extras
libraryMetadataGetExtras 1 param → 200
POST
/library/metadata/{ids}/extras
Add to an item's extras
libraryMetadataPostExtras 4 params → 200404
GET
/library/metadata/{ids}/file
Get a file from a metadata or media bundle
libraryMetadataGetFile 2 params → 200
PUT
/library/metadata/{ids}/index
Start BIF generation of an item
libraryMetadataPutIndex 2 params → 200
PUT
/library/metadata/{ids}/intro
Intro detect an item
libraryMetadataPutIntro 3 params → 200
POST
/library/metadata/{ids}/marker
Create a marker
libraryMetadataPostMarker 5 params → 200400
DELETE
/library/metadata/{ids}/marker/{marker}
Delete a marker
libraryMetadataDeleteMarkerMarker 2 params → 200400404
PUT
/library/metadata/{ids}/marker/{marker}
Edit a marker
libraryMetadataPutMarkerMarker 6 params → 200400404
PUT
/library/metadata/{ids}/match
Match a metadata item
libraryMetadataPutMatch 4 params → 200
PUT
/library/metadata/{ids}/matches
Get metadata matches for an item
libraryMetadataGetMatches 7 params → 200
DELETE
/library/metadata/{ids}/media/{mediaItem}
Delete a media item
libraryMetadataDeleteMediaMediaItem 3 params → 200400404
PUT
/library/metadata/{ids}/merge
Merge a metadata item
libraryMetadataPutMerge 2 params → 200
GET
/library/metadata/{ids}/nearest
Get nearest tracks to metadata item
libraryMetadataGetNearest 5 params → 200
PUT
/library/metadata/{ids}/prefs
Set metadata preferences
libraryMetadataPutPrefs 2 params → 200
PUT
/library/metadata/{ids}/refresh
Refresh a metadata item
libraryMetadataPutRefresh 3 params → 200
GET
/library/metadata/{ids}/related
Get related items
libraryMetadataGetRelated 1 param → 200
GET
/library/metadata/{ids}/similar
Get similar items
libraryMetadataGetSimilar 2 params → 200
PUT
/library/metadata/{ids}/split
Split a metadata item
libraryMetadataPutSplit 1 param → 200
GET
/library/metadata/{ids}/subtitles
Add subtitles
libraryMetadataPostSubtitles 8 params → 200
GET
/library/metadata/{ids}/tree
Get metadata items as a tree
libraryMetadataGetTree 1 param → 200
PUT
/library/metadata/{ids}/unmatch
Unmatch a metadata item
libraryMetadataPutUnmatch 1 param → 200
GET
/library/metadata/{ids}/users/top
Get metadata top users
libraryMetadataGetUsersTop 1 param → 200
PUT
/library/metadata/{ids}/voiceActivity
Detect voice activity
libraryMetadataPutVoiceActivity 3 params → 200
POST
/library/metadata/{ids}/{element}
Set an item's artwork, theme, etc
libraryMetadataPostElement 3 params → 200
PUT
/library/metadata/{ids}/{element}
Set an item's artwork, theme, etc
libraryMetadataPutElement 3 params → 200
DELETE
/library/metadata/{ids}/{element}
Delete an item's artwork, theme, etc
libraryMetadataDeleteElement 2 params → 200404
GET
/library/metadata/{ids}/{element}/{timestamp}
Get an item's artwork, theme, etc
libraryMetadataGetElement 3 params → 200
GET
/library/metadata/augmentations/{augmentationId}
Get augmentation status
libraryGetMetadataAugmentationsAugmentation 2 params → 204401404
PUT
/library/optimize
Optimize the Database
libraryPutOptimize 1 param → 200
PUT
/library/parts/{partId}
Set stream selection
libraryPutPartsPart 4 params → 200400
GET
/library/parts/{partId}/indexes/{index}
Get BIF index for a part
libraryGetPartsPartIndexesIndex 3 params → 200404
GET
/library/parts/{partId}/indexes/{index}/{offset}
Get an image from part BIF
libraryGetPartsPartIndexesIndexOffset 3 params → 200404
GET
/library/parts/{partId}/{changestamp}/{filename}
Get a media part
libraryGetPartsPartChangestampFilename 4 params → 200403404503509
GET
/library/people/{personId}
Get person details
libraryGetPeoplePerson 1 param → 200404
GET
/library/people/{personId}/media
Get media for a person
libraryGetPeoplePersonMedia 1 param → 200404
GET
/library/randomArtwork
Get random artwork
libraryGetRandomArtwork 1 param → 200
GET
/library/sections/all
Get library sections (main Media Provider Only)
libraryGetSections → 200
POST
/library/sections/all
Add a library section
libraryPostSection 10 params → 200400
DELETE
/library/sections/all/refresh
Stop refresh
libraryDeleteSectionsAllRefresh → 200
GET
/library/sections/prefs
Get section prefs
libraryGetSectionsPrefs 2 params → 200400
POST
/library/sections/refresh
Refresh all sections
libraryPostSectionsRefresh 1 param → 200503
GET
/library/sections/{sectionId}
Get a library section by id
librarySectionGetSection 2 params → 200
DELETE
/library/sections/{sectionId}
Delete a library section
libraryDeleteSection 2 params → 200
PUT
/library/sections/{sectionId}
Edit a library section
librarySectionPutSection 8 params → 200400
PUT
/library/sections/{sectionId}/all
Set the fields of the filtered items
librarySectionPutAll 14 params → 200400404409
PUT
/library/sections/{sectionId}/analyze
Analyze a section
librarySectionPutAnalyze 1 param → 200
GET
/library/sections/{sectionId}/autocomplete
Get autocompletions for search
librarySectionGetAutocomplete 4 params → 200400
GET
/library/sections/{sectionId}/collections
Get collections in a section
librarySectionGetCollections 2 params → 200
DELETE
/library/sections/{sectionId}/collection/{collectionId}
Delete a collection
librarySectionDeleteCollectionCollection 2 params → 200404
GET
/library/sections/{sectionId}/common
Get common fields for items
librarySectionGetCommon 3 params → 200400404
GET
/library/sections/{sectionId}/composite/{updatedAt}
Get a section composite image
librarySectionGetComposite 4 params → 200
PUT
/library/sections/{sectionId}/emptyTrash
Empty section trash
librarySectionPutEmptyTrash 1 param → 200
GET
/library/sections/{sectionId}/audioLayout
Get audio layouts in a section
librarySectionGetAudioLayouts 2 params → 200
GET
/library/sections/{sectionId}/videoCodec
Get video codecs in a section
librarySectionGetVideoCodecs 2 params → 200
GET
/library/sections/{sectionId}/audioCodec
Get audio codecs in a section
librarySectionGetAudioCodecs 2 params → 200
GET
/library/sections/{sectionId}/subtitleCodec
Get subtitle codecs in a section
librarySectionGetSubtitleCodecs 2 params → 200
GET
/library/sections/{sectionId}/filters
Get section filters
librarySectionGetFilters 1 param → 200
GET
/library/sections/{sectionId}/firstCharacters
Get list of first characters
librarySectionGetFirstCharaters 4 params → 200
DELETE
/library/sections/{sectionId}/indexes
Delete section indexes
librarySectionDeleteIndexes 1 param → 200
DELETE
/library/sections/{sectionId}/intros
Delete section intro markers
librarySectionDeleteIntros 1 param → 200
GET
/library/sections/{sectionId}/prefs
Get section prefs
librarySectionGetPrefs 2 params → 200
PUT
/library/sections/{sectionId}/prefs
Set section prefs
librarySectionPutPrefs 2 params → 200
POST
/library/sections/{sectionId}/refresh
Refresh section
librarySectionPostRefresh 3 params → 200
DELETE
/library/sections/{sectionId}/refresh
Cancel section refresh
librarySectionDeleteRefresh 1 param → 200
GET
/library/sections/{sectionId}/sorts
Get a section sorts
librarySectionGetSorts 1 param → 200
GET
/library/streams/{streamId}.{ext}
Get a stream
libraryGetStreamsStream 5 params → 200403404501
PUT
/library/streams/{streamId}.{ext}
Set a stream offset
libraryPutStreamsStream 3 params → 200400
DELETE
/library/streams/{streamId}.{ext}
Delete a stream
libraryDeleteStreamsStream 2 params → 200403500
GET
/library/streams/{streamId}/loudness
Get loudness about a stream
libraryGetStreamsStreamLoudness 2 params → 200403404
GET
/library/streams/{streamId}/levels
Get loudness about a stream in json
libraryGetStreamsStreamLevels 2 params → 200403404
GET
/library/tags
Get all library tags of a type
libraryGetTags 1 param → 200

Schemas 26

The contract defines 26 schemas that model the data the API accepts and returns. The most detailed are metadata (67 properties), stream (29 properties), librarySection (20 properties), media (18 properties). Each schema is shown below with its type and property counts.

directory
object
15 properties
hub
object
14 properties
part
object
Part represents a particular file or "part" of a media item. The part is the playable unit of the media hierarchy. Suppose that a movie library contains a movi…
11 properties
sort
mediaContainer
object
MediaContainer is commonly found as the root of a response and is a pretty generic container. Common attributes include identifier and things related to paging…
1 property
mediaContainerWithSettings
object
1 property
librarySection
object
20 properties
thumb
string
metadata
object
Items in a library are referred to as "metadata items." These metadata items are distinct from "media items" which represent actual instances of media that can…
67 properties
stream
object
Stream represents a particular stream from a media item, such as the video stream, audio stream, or subtitle stream. The stream may either be part of the file…
29 properties
filter
allowSync
boolean
type
string
mediaContainerWithArtwork
object
1 property
content
boolean
title
string
key
string
mediaContainerWithMetadata
object
MediaContainer is commonly found as the root of a response and is a pretty generic container. Common attributes include identifier and things related to paging…
1 property
media
object
Media represents an one or more media files (parts) and is a child of a metadata item. There aren't necessarily any guaranteed attributes on media elements sin…
18 properties
tag
object
A variety of extra information about a metadata item is included as tags. These tags use their own element names such as Genre, Writer, Directory, and Role. In…
10 properties
MediaContainer
object
4 properties
image
object
Images such as movie posters and background artwork are represented by Image elements.
3 properties
items
object
art
string
mediaContainerWithNestedMetadata
object
1 property
serverConfiguration

Specification

The full machine-readable OpenAPI contract behind this narrative.

Source

plex-library-api-openapi.yml Raw ↑

Other APIs Plex publishes across the network.

Plex Account and Authentication API
Plex MCP Server
Plex Activities API
Plex Butler API
Plex Collections API
Plex Content API
Plex Devices API
Plex Download Queue API
Plex DV Rs API
Plex EPG API
Plex Events API
Plex General API
Where this information came from

This is an independent, third-party profile of Plex Library API, published by API Evangelist. We do not operate, host, resell, or support these APIs, and we are not affiliated with or endorsed by the company unless stated above. Everything here is built from publicly available information — the company's own site, developer portal, documentation, public repositories, and the specifications it publishes for public use. Nothing is obtained by breaching a system, defeating an access control, or using credentials.

The Kin Score and Agent Readiness rating are independently calculated assessments of a company's public API artifacts, scored against a published rubric. They are not certifications, endorsements, security assessments, or audits.

Corrections, re-scores, and removal are free — no partnership or purchase required, and you do not need to justify the request. A removed company is recorded as unrated, never scored zero for having asked. Acknowledgement within one business day; removal within two.

info@apievangelist.com · Read the full data-sourcing policy →
On a security or compliance team? Put security in the subject line and you will get a person, not a form — we will tell you exactly which public URLs this profile was built from.