We just released our native n8n integration!ยป Try now
OnlyFans API

Upload media to the OnlyFans CDN

The response can be used only once to manually include media in a post or message. This endpoint does not upload media to the Vault. You must provide either file or file_url.

POST
/api/{account}/media/upload
AuthorizationBearer <token>

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

In: header

Path Parameters

account*string

The Account ID

Request Body

multipart/form-data

file?string

The file to upload. Required if file_url is not provided. Maximum file size: 100 MB (limited by Cloudflare).

file_url?string

A URL to download the file from. Required if file is not provided. Maximum file size depends on the subscription configuration.

async?boolean

Set to true to process uploads in the background. Returns a polling_url to check status. Recommended for large files.

type?string

Set to avatar if this file will be used as a profile picture, header for a profile banner, or keep empty if this file will be for anything else.

Value in"default" | "avatar" | "header"

Response Body

application/json

application/json

curl -X POST "https://app.onlyfansapi.com/api/acct_XXXXXXXXXXXXXXX/media/upload"
{
  "prefixed_id": "ofapi_media_abc123def456abc123def456abc123de",
  "file_name": "photo.jpg",
  "processId": "abc123def456abc123de",
  "host": "convert3.onlyfans.com",
  "sourceUrl": "https://of2transcoder.s3.amazonaws.com/upload/00000000-0000-0000-0000-000000000000/000000000000/photo.jpg",
  "extra": "xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx...",
  "additional": {
    "user": "123456789"
  },
  "thumbs": [
    {
      "id": 1,
      "url": "https://cdn2.onlyfans.com/files/0/00/00000000000000000000000000000000/300x544_00000000000000000000000000000000.jpg"
    }
  ],
  "note": "Maximum file size is 1 GB. Need higher limits? Contact us for enterprise options."
}
{
  "status": "pending",
  "prefixed_id": "ofapi_media_abc123def456abc123def456abc123de",
  "polling_url": "https://app.onlyfansapi.com/api/acct_abc123def456/media/uploads/ofapi_media_abc123def456abc123def456abc123de/status"
}