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 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.

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...'

Cache an Entire Vault List

curl -X POST 'https://api.ofauth.com/v2/vault-plus/store/list/:listId' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

Accessing Stored Media

Get by Media ID

curl -X GET 'https://api.ofauth.com/v2/vault-plus/:mediaId' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'
Response:
{
  "mediaId": "12345",
  "presignedUrl": "https://...",
  "expiresAt": 1234567890,
  "status": "stored"
}

Batch Get URLs (up to 100)

curl -X POST 'https://api.ofauth.com/v2/vault-plus/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/list?status=stored' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

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/: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/purge' \
  -H 'apikey: YOUR_API_KEY' \
  -H 'x-connection-id: conn_xxx'

Media & Vault

Full media operations guide

Access API

Complete API reference