OnlyFans API
OnlyFans

Download DRM-protected Media

Downloads a Widevine-protected video from your own Media Vault. DRM media returns files.full.url = null from the Vault endpoints, so this endpoint resolves the Widevine license, decrypts the video and audio streams, and returns a playable MP4.

The response is a 302 redirect to dl.fansapi.com, which streams the decrypted file. Most HTTP clients follow redirects automatically (curl requires -L).

Expect roughly 8-15 seconds before the first byte arrives while the license exchange, download and decrypt complete. Repeat downloads of the same media are faster because the content keys are cached. Credits are charged for the bytes actually delivered.

GET
/api/{account}/media/download/drm/{media_id}
AuthorizationBearer <token>

Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys

In: header

Path Parameters

account*string

The Account ID

media_id*string

The Media Vault item ID to download.

Response Body

text/plain

application/json

application/json

application/json

curl -X GET "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/media/download/drm/2381923812"
"<Redirect to the download service>"
{
  "error": "Unauthorized. Go to https://app.onlyfansapi.com/api-keys to get your API key."
}
{
  "message": "Insufficient credits for a DRM media download."
}
{
  "message": "Media 123 is not DRM-protected. Use the regular media download endpoint instead."
}