Downloading Media from OnlyFans CDN
Learn how to download photos/videos/audio from OnlyFans CDN URLs and store them locally or in your cloud storage.
OnlyFans API makes it easy to download media files directly from OnlyFans CDN URLs. You can download photos, videos, and audio files by calling our download endpoint with the CDN URL.
Download media from OnlyFans CDN
The full media download endpoint documentation can be found here.
Media can be downloaded by calling GET https://app.onlyfansapi.com/api/{account}/media/download/{ONLYFANS_CDN_URL}.
The {ONLYFANS_CDN_URL} parameter should be a URL from OnlyFans CDN (e.g., https://cdn2.onlyfans.com/files/e/e5/123/600x400_123.jpg?Tag=2&u=123&Policy=123&Signature=signature&Key-Pair-Id=123). You can just enter the OnlyFans CDN URL after the .../media/download/{ONLYFANS_CDN_URL} without any need for encoding the URL.
curl --location 'https://app.onlyfansapi.com/api/{account}/media/download/https://cdn2.onlyfans.com/files/e/e5/123/600x400_123.jpg?Tag=2&u=123&Policy=123&Signature=signature&Key-Pair-Id=123' \
--header 'Authorization: Bearer {token}' \
--output 'downloaded-media.jpg'The endpoint will return the media file directly, which you can then save to your local storage or process as needed.