Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.onlyfanskit.dev/llms.txt

Use this file to discover all available pages before exploring further.

The REST API is a managed HTTP surface over the same capabilities as the SDK. You authenticate with a bearer API key, connect an OnlyFans account once, then call any method or stream realtime events — with nothing to host and no session management of your own.
Base URL   https://api.onlyfanskit.dev
Auth       Authorization: Bearer <api-key>
Errors     application/problem+json  (RFC 9457)

The flow

1

Authenticate

Send your API key as a bearer token. Confirm it with GET /v1/me. See Authentication.
2

Connect an account

POST /v1/connect/* links an OnlyFans account and returns an account id. See Connect an account.
3

Act on it

POST /v1/accounts/{id}/{resource}/{method} calls any SDK method. Enumerate them with GET /v1/sdk/methods.
4

Receive events

Stream over SSE or register a webhook.

Two API surfaces

This reference documents the platform API (/v1/*) — the endpoints you call to manage and act on accounts. The OnlyFans API surface that the SDK wraps is documented as typed SDK resources; reach any of it through the generic SDK passthrough below.

Calling any SDK method

The single most useful endpoint is the SDK passthrough:
# object-arg form (most methods)
curl -X POST https://api.onlyfanskit.dev/v1/accounts/$ID/posts/feed \
  -H "Authorization: Bearer $OFK_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "limit": 10 }'

# positional-args form
curl -X POST https://api.onlyfanskit.dev/v1/accounts/$ID/messages/send \
  -H "Authorization: Bearer $OFK_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "args": [123456, { "text": "Hi!" }] }'

# read methods also work over GET
curl "https://api.onlyfanskit.dev/v1/accounts/$ID/chats/list?limit=20" \
  -H "Authorization: Bearer $OFK_KEY"
It maps onto of.{resource}.{method}(...args) and returns { "result": ... }. Use the endpoint pages in this section for the managed endpoints (connect, accounts, webhooks, events) and SDK resources for the method catalog.