Download Media from the OnlyFans CDN
Downloads a file from a https://cdn*.onlyfans.com/* URL through a 302 redirect. Follow redirects (curl -L). Cached cdn.fansapi.com files are free; otherwise dl.fansapi.com streams through the account proxy. Send one Range: bytes=start-end header to request a chunk for playback or a preview. A supported range returns 206, Content-Range, and the chunk Content-Length; an upstream that ignores Range can return a full 200, so check the response. Each nonempty transfer costs 3 credits per decimal MB streamed (minimum 1 credit). Credits for the selected response are reserved before streaming; unused reserved credits are released on completion, including an interrupted transfer. HEAD follows the same redirects and returns metadata without a body or download charge. HEAD does not populate the media cache. This regular endpoint does not decrypt DRM media.
Authorization
default Get your API Key from OnlyFansAPI Console - https://app.onlyfansapi.com/api-keys
In: header
Path Parameters
The Account ID
Optional parameter. The CDN URL to scrape. Keep in mind that these URLs expire in approx. 20 minutes. So for example, if you fetched Media Vault Items at 01:00pm, the URLs will expire at around 01:20pm
Response Body
text/plain
application/json
curl -X GET "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/media/download/""<Redirect to the download service or cached CDN file>"{
"error": "Unauthorized. Go to https://app.onlyfansapi.com/api-keys to get your API key."
}