NewFans API, previously OnlyFans API · A new name. A broader platform.
Fans 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. Cached content keys can speed up preparation, but repeated downloads are still billable. DRM downloads cost 3 credits per decimal MB of remuxed output streamed (1 MB = 1,000,000 bytes), with a minimum of 1 credit for nonempty output. Megabytes are rounded to two decimal places, multiplied by 3, then truncated to whole credits. Billing happens after streaming; interrupted downloads are charged for output already streamed, and zero-byte failures cost no download credits. Range is unsupported: the service returns 200 with Accept-Ranges: none. HEAD returns 405; it does not decrypt a file to discover its final size.

Downloading different sizes of DRM media (240p, 720p, source)

Set the optional quality query parameter to select an existing video rendition from the DASH manifest:

qualityVideo returned with audio
OmittedThe first video rendition in the manifest, preserving the existing default.
240pThe 240p rendition.
720pThe 720p rendition.
sourceThe source rendition.
curl --fail --location \
  'https://app.onlyfansapi.com/api/{account}/media/download/drm/{media_id}?quality=240p' \
  --header 'Authorization: Bearer {token}' \
  --output 'video-240p.mp4'

Not every media item offers every quality. If the requested rendition is unavailable, the API returns 422 with {"message":"The requested quality 240p is not available for this media."}. Invalid or empty quality values also return 422. The endpoint does not substitute another quality or transcode a missing rendition.

Existing requests without quality need no changes: they keep the same video selection and 302 download flow. All qualities return a playable MP4 with audio after decryption; the upstream 240p file is still DRM-encrypted. The same per-byte pricing and minimum charge apply to every quality.

Using download URLs from media responses

Eligible DRM media includes files.drm.download_url wherever media is returned through CDN formatting: vault items and folders, chat messages and chat previews, mass-message overview/detail, posts, stories, highlights, welcome messages, and completed vault uploads. The field belongs to the media object, including when it is nested in media, lastMessage.media, or medias arrays.

Call that URL with your normal Bearer token, optionally append ?quality=240p, ?quality=720p, or ?quality=source, and follow redirects. The link is an authenticated API endpoint, not a public CDN playback URL. The item must be accessible in the connected account's own vault. Links are omitted for explicitly incoming, foreign-authored, or locked media and for third-party profile-content responses; the vault lookup remains the final access check.

The download URL is an added field; the existing response envelope, manifest, signature, and files.full.url fields retain their structure. Adding a link does not fetch manifests or prepare downloads. Quality availability is checked only when downloading. Metadata-only queue responses and compact responses that omit media objects do not gain a media download field.

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.

Query Parameters

quality?string

Video rendition to download. Omit to use the first video rendition in the DASH manifest. Returns 422 if the requested rendition is unavailable.

Value in"240p" | "720p" | "source"

Response Body

text/plain

application/json

application/json

application/json

curl -X GET "https://app.fansapi.com/api/acct_XXXXXXXXXXXXXXX/media/download/drm/2381923812?quality=240p"
"<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."
}