API docs / Core Capabilities

Core Capabilities

Core Capabilities (Plugins)

Upload OnlyFans photos and videos in one call instead of weeks of reverse-engineering. Extend the SDK with plugins.

The SDK doesn't just wrap OnlyFans API HTTP calls; we collapse entire infrastructure layers into single methods through our Core Capabilities (exposed as plugins).

These capabilities add higher-level infrastructure abstractions on top of the core HTTP and WebSocket clients. They're initialized when you create the client and accessed through the plugin property.

import { OfApiClient } from "@betterfans/link-sdk"
import { media } from "@betterfans/link-sdk/plugins/media"

const client = new OfApiClient({
  apiKey: process.env.OFM_API_KEY,
  plugins: [media()],
})

const account = client.for("123456789")
const result = await account.plugin.media.upload({
  source: "https://cdn.example/photo.jpg",
})

Available plugins

  • Media: Attach a photo or video to a message or post with one call.

How plugins work

Plugins receive a context object with access to HTTP requests and WebSocket events. When you call .for(accountId), the scoped client automatically binds plugin methods to that account: no manual ID passing needed.

// Without scoping — accountId is the first argument
await client.plugin.media.upload("123456789", { source })

// With scoping — accountId is bound automatically
const account = client.for("123456789")
await account.plugin.media.upload({ source })