> ## Documentation Index
> Fetch the complete documentation index at: https://docs.onlyfansapi.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Download DRM-protected Media (/api-reference/media/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.

## OpenAPI

````yaml https://app.onlyfansapi.com/scribe-docs/openapi.yaml get /api/{account}/media/download/drm/{media_id}
openapi: 3.0.3
info:
  title: OnlyFans API
  description: ""
  version: 1.0.0
servers:
  - url: https://app.onlyfansapi.com
security:
  - default: []
tags:
  - name: API Keys
    description: ""
  - name: Account
    description: Endpoints for your linked accounts
  - name: Analytics - Financial
    description: APIs for retrieving financial analytics data
  - name: Analytics - Summary
    description: APIs for retrieving summary analytics data
  - name: Banking
    description: Operations related to user banking details, payout methods, legal
      and tax information, and account country settings.
  - name: Banned Words
    description: Reference list of OnlyFans banned words used by the
      `blockBannedWords` screening parameter
  - name: Blocked / Restricted Users
    description: APIs for listing the users an account has blocked or restricted
  - name: Chargebacks
    description: ""
  - name: Chat Messages
    description: ""
  - name: Chats
    description: ""
  - name: Client Sessions
    description: ""
  - name: Connect OnlyFans Account
    description: ""
  - name: Data Exports
    description: APIs for managing data exports
  - name: Engagement / Messages
    description: ""
  - name: Fans
    description: APIs for managing OnlyFans fans (subscribers)
  - name: Fans - AI Summary
    description: APIs for generating and retrieving AI-powered fan profile summaries
  - name: Following
    description: APIs for managing OnlyFans followings (people you're subscribed to)
  - name: Free Trial Links
    description: APIs for managing Free Trial Links
  - name: Giphy
    description: ""
  - name: Link Tags
    description: APIs for managing tags on free trial links, tracking links, and Smart Links
  - name: Mass Messaging
    description: ""
  - name: Media
    description: ""
  - name: Media Vault
    description: ""
  - name: Media Vault Lists
    description: ""
  - name: Notifications
    description: Endpoints for managingr account notifications
  - name: Payouts
    description: ""
  - name: Post Comments
    description: ""
  - name: Post Labels
    description: APIs for managing your post labels
  - name: Posts
    description: APIs for managing OnlyFans posts
  - name: Promotions
    description: ""
  - name: Public Profiles
    description: ""
  - name: Queue
    description: ""
  - name: Release Forms
    description: APIs for managing OnlyFans release forms
  - name: Saved For Later (Messages)
    description: ""
  - name: Saved For Later (Posts)
    description: ""
  - name: Settings
    description: ""
  - name: Shared Free Trial Links
    description: APIs for Free Trial Links that other OF creators have shared with
      this account. Revenue, cost, and spender data are not available for shared
      links.
  - name: Shared Tracking Links
    description: APIs for Tracking Links (campaigns) that other OF creators have
      shared with this account. Revenue, cost, and spender data are not
      available for shared campaigns.
  - name: Smart Link Postbacks
    description: APIs for managing Smart Link postback destinations
  - name: Smart Links
    description: APIs for managing Smart Links (Free Trial Links and Tracking Links
      with pooled inventory)
  - name: Statistics
    description: ""
  - name: Stored Free Trial Links
    description: Instant APIs for retrieving stored free trial links from the
      OnlyFansAPI Cache (free, no credits used)
  - name: Stored Shared Free Trial Links
    description: Instant APIs for retrieving stored shared Free Trial Links from the
      OnlyFansAPI Cache (free, no credits used)
  - name: Stored Shared Tracking Links
    description: Instant APIs for retrieving stored shared Tracking Links
      (campaigns) from the OnlyFansAPI Cache (free, no credits used)
  - name: Stored Tracking Links
    description: Instant APIs for retrieving stored tracking links from the
      OnlyFansAPI Cache (free, no credits used)
  - name: Stories
    description: APIs for managing OnlyFans stories
  - name: Story Highlights
    description: APIs for managing OnlyFans story highlights
  - name: Subscription Bundles
    description: ""
  - name: Tracking Links
    description: APIs for managing tracking links
  - name: Transactions
    description: APIs for managing OnlyFans transactions
  - name: Usage
    description: Credit usage reporting for your team
  - name: User List Collections
    description: ""
  - name: Users
    description: APIs for fetching OnlyFans users
  - name: Webhooks
    description: ""
paths:
  /api/{account}/media/download/drm/{media_id}:
    parameters:
      - in: path
        name: account
        description: The Account ID
        example: acct_XXXXXXXXXXXXXXX
        required: true
        schema:
          type: string
      - in: path
        name: media_id
        description: The Media Vault item ID to download.
        example: "2381923812"
        required: true
        schema:
          type: string
    get:
      summary: Download DRM-protected Media
      operationId: downloadDRMProtectedMedia
      description: >-
        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.
      parameters: []
      responses:
        "302":
          description: ""
          content:
            text/plain:
              schema:
                type: string
                example: <Redirect to the download service>
        "401":
          description: ""
          content:
            application/json:
              schema:
                type: object
                example:
                  error: Unauthorized. Go to https://app.onlyfansapi.com/api-keys to get your API
                    key.
                properties:
                  error:
                    type: string
                    example: Unauthorized. Go to https://app.onlyfansapi.com/api-keys to get your
                      API key.
        "402":
          description: Insufficient credits
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Insufficient credits for a DRM media download.
                properties:
                  message:
                    type: string
                    example: Insufficient credits for a DRM media download.
        "422":
          description: Media is not DRM-protected
          content:
            application/json:
              schema:
                type: object
                example:
                  message: Media 123 is not DRM-protected. Use the regular media download endpoint
                    instead.
                properties:
                  message:
                    type: string
                    example: Media 123 is not DRM-protected. Use the regular media download endpoint
                      instead.
      tags:
        - Media
components:
  securitySchemes:
    default:
      type: http
      scheme: bearer
      description: Get your API Key from OnlyFansAPI Console -
        https://app.onlyfansapi.com/api-keys
````