Home/Docs/Quickstart

OnlyFans and Fansly API Quickstart

One API for OnlyFans and Fansly. Native access, no per call platform fees, one key for both. Base URL: https://api.creator-api.com

Ad tracking and Instructify

For OnlyFans ad-level attribution, create a Smart Link with a full key and advertise its CreatorAPI /go/{id} URL. A readonly key suffices to list links and read each click, subscription and confirmed follow-up payment through the three /api/smart-links report endpoints.

Ad-tracking reference · Integration guide and request examples

Legacy native campaigns can report real existing purchases, but cannot reconstruct historical click IDs or UTMs. Unknown subscription amounts remain pending; do not treat pending rows as free subscriptions. Polling is the supported delivery mechanism. The integrating team performs the final end-to-end acceptance.

1. Authenticate

Every request carries your API key in a header:

Text
X-API-Key: <your key>

Authorization: Bearer <your key> works too. Keys have a scope:

  • readonly · GET requests only.
  • full · reads plus writes (POST, PUT, PATCH, DELETE).

Every full scope key can write out of the box: nothing needs to be unlocked or requested. Keep in mind that writes are a sharper tool than reads. A read is passive; a write acts on the connected account itself · a POST to a message route sends a real message the fan sees seconds later, a DELETE really deletes. There is no sandbox. Treat every write like acting inside the creator app, and try a harmless write first (for example POST /chats/mark-as-read) before wiring up automated sending.

Check your key and balance any time:

Shell
curl -H "X-API-Key: $CREATOR_API_KEY" https://api.creator-api.com/v1/whoami
curl -H "X-API-Key: $CREATOR_API_KEY" https://api.creator-api.com/v1/billing

2. Connect a creator account

You call the API on behalf of a creator account you own or manage. There are two ways to connect one · pick whichever you prefer.

Option 2 · Login with OnlyFans (assisted)

Prefer to just log in? No DevTools, no cookie hunting. Click + Connect account in your dashboard for a guided browser window, or drive it yourself:

Shell
curl -X POST https://api.creator-api.com/v1/connect/session \
  -H "X-API-Key: $CREATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "platform": "onlyfans", "proxy_mode": "managed" }'

The response carries session_id and iframe_url · show iframe_url to the creator to log in, then poll:

Shell
curl -X POST https://api.creator-api.com/v1/connect/session/{session_id}/complete \
  -H "X-API-Key: $CREATOR_API_KEY"

This is self serve today, no request needed. The creator's password and 2FA code go straight to the real platform login, never to CreatorAPI · we only capture the resulting session.

List your connected accounts with GET /v1/accounts. Each account gets an id · that id is the {account} in every native call below.

3. Make a call

Both platforms share one pattern. The {account} decides which platform is hit, so the same key and the same route serve OnlyFans and Fansly:

Text
{METHOD} https://api.creator-api.com/v1/{account}/native/{path}

Example, list a creator's subscribers on OnlyFans:

Shell
curl -H "X-API-Key: $CREATOR_API_KEY" \
  "https://api.creator-api.com/v1/{account}/native/subscriptions/subscribers?limit=50"

A few shorthands are rewritten for you, because the platform serves them under a longer path:

You callOnlyFans serves
native/me/users/me
native/transactions/payouts/transactions
native/earnings/users/me/stats/overview
native/users/me/posts/users/{your id}/posts
native/posts/archived/users/{your id}/posts/archived

The last two matter because OnlyFans keeps a creator's own posts under the numeric user id and answers every me spelling with 404. Note that plain native/posts is not a shorthand: it is the account's home feed, every creator it follows, exactly as the platform serves it.

The full path catalog per platform is in the reference files:

  • OnlyFans · reference-onlyfans.md · 303 capabilities.
  • Fansly · reference-fansly.md.

4. Billing (credits)

Calls draw credits from your balance. Unmetered keys (internal) are never charged.

ActionCredits
Native read (GET)1
Native write2
Webhook write1
Smart link write1
Tag write0
Data export job10
Fan AI summary25 (cache hit free)

Buy credits through Stripe Checkout:

Shell
curl -X POST https://api.creator-api.com/v1/billing/checkout \
  -H "X-API-Key: $CREATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "plan_id": "pack_25k" }'

The response carries a Stripe URL. On payment the credits land automatically. See GET /v1/billing/plans for the packs and GET /v1/billing/orders for history.

Creator slots (add accounts through the API)

Your plan includes a number of creator accounts. Extra creators are slots, bought per platform. You can manage them with your normal API key (scope full), no dashboard needed.

Check capacity:

Shell
curl -H "X-API-Key: $CREATOR_API_KEY" https://api.creator-api.com/v1/billing/slots

The response carries limits (base, onlyfans, fansly, total) and, per platform, the current extra slot count and the monthly amount_usd per slot on your plan.

Set the number of extra slots for one platform:

Shell
curl -X POST https://api.creator-api.com/v1/billing/slots \
  -H "X-API-Key: $CREATOR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "platform": "onlyfans", "count": 3, "creator_id": "optional_creator_to_activate" }'
  • count is absolute, not an increment. To add one slot, read the current count and send count plus 1.
  • An increase is charged to the card on file right away, prorated for the rest of the billing period. Your billing date does not move. If the payment fails you get 402 and nothing changes.
  • A decrease is credited on your next invoice. Slots that active creators still occupy cannot be removed, you get 409 with error code slots_in_use. Disconnect the creator first with DELETE /v1/accounts/{creator_id}.
  • The new limit applies immediately. Connected but inactive creators that now fit go live in the same call and are listed under activated.

Move one slot to another platform with POST /v1/billing/slots/switch and body { "from": "fansly", "to": "onlyfans" }. You are charged or credited only the price difference.

How this fits your connect flow: connecting a creator always succeeds. When you are out of capacity the connect response says "active": false, and calls to that creator return 403 with error code slot_inactive. Buy a slot with the creator_id and the creator goes live. GET /v1/accounts returns the same active flag per creator. A creator goes live when both the limit of its platform and limits.total have room, because the accounts included in your plan are one shared pool across platforms. Slots need an active paid plan that includes the platform.

5. Platform features (beyond raw routes)

These sit on top of the native layer and work the same for both platforms:

  • Webhooks · POST /v1/{account}/webhooks. Signed delivery (HMAC SHA256), at least once with retries and backoff: occasional timeouts are normal, so answer 2xx fast and dedupe on X-CreatorAPI-Delivery. Event catalog at GET /v1/webhooks/events.
  • Data exports · POST /v1/{account}/exports. Bulk datasets (subscribers, expired_fans, transactions, posts, chats, mass_messages, direct_messages) to CSV or JSONL, download when done. mass_messages and direct_messages carry price, purchasedCount and viewedCount per message, which is how purchases are attributed to content.
  • Smart links · POST /v1/links. Trackable short links with click stats. Public redirect at /l/{slug}.
  • Tags · POST /v1/tags. First party CRM metadata on any entity. Free.
  • Fan AI summary · GET /v1/{account}/fans/{fan_id}/summary. A structured brief on a fan (persona, spend signal, churn risk, suggested next message) built from the native chat history.
  • Media upload · POST /v1/{account}/media/upload. Send a photo or video as multipart form-data with a single file field. The file is uploaded to the platform through the account's own residential session. Works for Fansly and OnlyFans. For Fansly, add an optional lock=subscribers form field to lock the post to subscribers (a locked wall); the media is gated to the account subscription tier automatically. Fansly returns {media_id, account_media_id, mime, size} · attach it with POST /v1/{account}/native/post and attachments:[{contentType:1, contentId:<account_media_id>, pos:0}] plus a scheduledFor timestamp. OnlyFans returns {platform, media_type, mime, size, md5, media_file} where media_file is a single-use descriptor {processId, host, name, extra} · create the post with POST /v1/{account}/native/posts and body {text, mediaFiles:[<media_file>], isScheduled:1, scheduledDate} (post it promptly, the descriptor expires). Billed as a write.

6. Errors

Standard HTTP status codes, JSON body { "error": "..." }:

  • 401 · missing or invalid key.
  • 402 · insufficient credits.
  • 403 · key scope too low, or the route is gated by the platform.
  • 404 · route or object not found.
  • 429 · rate limit for your key exceeded, retry after a moment.

7. Build with Claude or Codex

Don't want to write any code? Add https://api.creator-api.com/mcp as a connector in claude.ai or ChatGPT, sign in with your CreatorAPI account, and ask about your fans, messages or earnings in plain English. No key to paste, nothing to install.

To generate your own calls instead, paste llms-full.txt (the whole API in one file) into Claude or Codex and describe what you want to build. The model then writes working calls against every route below. Machine readable catalogs: capabilities-onlyfans.json, capabilities-fansly.json, and the OpenAPI spec at https://api.creator-api.com/openapi.json.