Skip to main content
API responses include media.ofauth.com URLs for all media. These URLs automatically route to either edge cache or persistent storage (Vault+), and can trigger auto-caching based on your configuration.
Media ProxyVault+
What it doesEdge-cached URLsPersistent storage with access by ID
SetupAutomaticEnable per connection
Best forDisplaying contentMedia libraries, PPV features

Displaying Media

Use media.ofauth.com URLs directly in your app:
<img src="https://media.ofauth.com/abc123..." />
<video src="https://media.ofauth.com/xyz789..." controls />
When requested:
  1. If stored in Vault+ → serves from persistent storage
  2. Otherwise → fetches from OnlyFans, caches at edge

Setting Up Vault+

Enable for a Connection

curl -X PATCH 'https://api.ofauth.com/v2/account/connections/:connectionId/settings' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{ "vaultPlus": { "enabled": true } }'

Configure Auto-Caching (Organization Defaults)

curl -X PATCH 'https://api.ofauth.com/v2/account/settings' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
    "vaultPlus": {
      "autoEnableForNewConnections": true,
      "defaultSettings": {
        "autoCacheVault": true,
        "autoCacheMessages": false,
        "autoCachePosts": false
      }
    }
  }'
When autoCacheVault (or similar) is enabled, media is automatically queued for persistent storage when accessed via media.ofauth.com. Vault+ API routes require an API key with the ACCOUNT scope. List and media operations also require x-connection-id. Vault+ public routes use raw OnlyFans media IDs. If the same media has multiple stored versions, such as full-size and thumbnail variants, fetch the raw media ID and read the variants under the media object. Variant objects are keyed by label and do not include internal variant IDs.

Triggering Caching

Via Media Proxy URL

POST to any media.ofauth.com URL to immediately queue for persistent storage:
curl -X POST 'https://media.ofauth.com/abc123...'

Add New Media From a Vault List

Use add when you want to cache new media from a list without deleting anything that is already cached.
curl -X POST 'https://api.ofauth.com/v2/vault-plus/lists/:listId/add' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'
Response:
{
  "queued": true,
  "listId": "123",
  "seen": 42,
  "queuedItems": 3,
  "skippedExisting": 39
}

Sync a Vault List

Use sync when the cached list should match the current OnlyFans list. The first sync creates a baseline and removes nothing. Later syncs remove only media that was present in the previous sync baseline and is now missing from the list. If another cached list still owns the same media ID, Vault+ skips the purge. adoptedItems counts media that was already cached and is now being added to this list’s sync baseline for the first time.
curl -X PUT 'https://api.ofauth.com/v2/vault-plus/lists/:listId/sync' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'
Response:
{
  "synced": true,
  "listId": "123",
  "seen": 42,
  "addedItems": 2,
  "updatedItems": 1,
  "removedItems": 4,
  "unchangedItems": 35,
  "adoptedItems": 0
}

Accessing Stored Media

List Cached Vault Lists

curl -X GET 'https://api.ofauth.com/v2/vault-plus/lists' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'
Response:
{
  "items": [
    {
      "listId": "123",
      "mediaCount": 42,
      "lastAddedAt": "2026-06-06T20:00:00.000Z",
      "lastSyncedAt": "2026-06-06T21:00:00.000Z",
      "lastSeenAt": "2026-06-06T21:00:00.000Z"
    }
  ]
}

Get Media in a Cached Vault List

curl -X GET 'https://api.ofauth.com/v2/vault-plus/lists/:listId/media' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

Get by Media ID

Use the raw OnlyFans media ID. The response groups any stored variants by label.
curl -X GET 'https://api.ofauth.com/v2/vault-plus/media/:mediaId' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'
Response:
{
  "id": "12345",
  "type": "image",
  "duration": null,
  "media": {
    "full": {
      "status": "stored",
      "quality": "full",
      "sizeBytes": 1024000,
      "contentType": "image/jpeg",
      "accessCount": 12,
      "createdAt": 1715800000,
      "expiresAt": 1715886400,
      "storedAt": 1715800100,
      "lastAccessedAt": 1715800500,
      "url": "https://..."
    },
    "thumb": {
      "status": "stored",
      "quality": "thumb",
      "sizeBytes": 32000,
      "contentType": "image/jpeg",
      "accessCount": 8,
      "createdAt": 1715800000,
      "expiresAt": 1715886400,
      "storedAt": 1715800100,
      "lastAccessedAt": 1715800500,
      "url": "https://..."
    }
  }
}

Batch Get URLs (up to 100)

curl -X POST 'https://api.ofauth.com/v2/vault-plus/media/batch' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx' \
  -H 'Content-Type: application/json' \
  -d '{ "mediaIds": ["12345", "12346", "12347"] }'

List Stored Media

curl -X GET 'https://api.ofauth.com/v2/vault-plus/media?status=stored' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'
Supported filters include status, type, contentType, durationMin, durationMax, createdAtFrom, createdAtTo, cachedAtFrom, cachedAtTo, limit, cursor, and sort.

Connection Status

curl -X GET 'https://api.ofauth.com/v2/vault-plus/status' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

Organization Stats

curl -X GET 'https://api.ofauth.com/v2/vault-plus/stats' \
  -H 'apikey: YOUR_API_KEY'

Purging Stored Media

Via Media Proxy URL

curl -X DELETE 'https://media.ofauth.com/abc123...'

Via API

curl -X DELETE 'https://api.ofauth.com/v2/vault-plus/media/:mediaId' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

Purge All for a Connection

curl -X DELETE 'https://api.ofauth.com/v2/vault-plus/media' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

Media & Vault

Full media operations guide

Access API

Complete API reference