CreatorAPI is a hosted REST API for 4based, OnlyFans and Fansly that returns plain JSON. Call it with fetch from Node, Bun or Deno: one key, one header, no SDK to install, and no 4based path layout to memorize.
You do not need an SDK because CreatorAPI is plain REST that returns JSON, so any HTTP client in any JavaScript runtime works: fetch, axios, got, undici, whatever you already use. 4based itself publishes no official public API. CreatorAPI fills that gap by calling the same authenticated endpoints the 4based app uses, through your own connected session, and rewrites shorthand names like me or subscribers to 4based's real paths so you never touch them. The examples below use the built in fetch that ships with Node 18 and later.
Listing subscribers takes one GET request with your key in the X-API-Key header. Every native route follows the same pattern, so once this works, tiers, chats, feed, vault and earnings work the same way.
// list 4based subscribers · a native read costs 1 credit const res = await fetch( "https://api.creator-api.com/v1/{account}/native/subscribers?limit=50", { headers: { "X-API-Key": process.env.CREATOR_API_KEY } } ); const subscribers = await res.json();
An export job bulk dumps subscribers and chats to CSV or JSONL for 10 credits, and you download the file when the job is done. That is the right tool when you want a whole dataset instead of paging through reads.
// start a bulk export, poll the job, download when done const job = await fetch("https://api.creator-api.com/v1/{account}/exports", { method: "POST", headers: { "X-API-Key": process.env.CREATOR_API_KEY, "Content-Type": "application/json" }, body: JSON.stringify({ dataset: "subscribers", format: "csv" }) }).then(r => r.json());
Push instead of poll, handle failures cleanly, and let your AI editor write the boring parts.
Register a URL with POST /v1/{account}/webhooks and CreatorAPI pushes events like new messages, pay per view unlocks and subscriber changes. Every delivery is signed with HMAC SHA256 and retried with backoff. Details on the 4Based webhooks page.
Failures come back as JSON with a clear error field. 401 means a bad key, 402 insufficient credits, 429 rate limit, so a try catch plus a status check covers it.
The whole API reference ships as one file, llms-full.txt. Paste it into Claude or Codex and let the assistant write your integration against real routes.
The fastest path is the quickstart, which takes you from signup to your first JSON response in a few minutes. For the full route catalog and shorthand aliases, see the 4Based API overview. The free trial includes 1,000 credits with no card required, and a native read costs 1 credit, so there is plenty of room to prototype.
4based publishes no official public API. CreatorAPI fills that gap with a hosted REST API that any JavaScript runtime can call, using the same authenticated endpoints the 4based app uses through your own connected session.
No. CreatorAPI is plain REST returning JSON, so fetch, axios, got or any other HTTP client works as is.
No. Shorthand aliases like me, subscribers, tiers, chats, feed, vault and earnings map to the real 4based paths, and CreatorAPI fills in the creator's own id for you.
Send your key in the X-API-Key header on every request. Keys look like ca_live_ and you get one after connecting an account.
You register a URL and CreatorAPI pushes events like new messages, pay per view unlocks and subscriber changes. Every delivery is signed with HMAC SHA256 and failed deliveries are retried with backoff.
Yes. The full API reference ships as one file, llms-full.txt, which you can paste into Claude or Codex so the assistant codes against real routes.
Start free with 1,000 credits, no card, one key for OnlyFans, Fansly and 4based.