Skip to content

Latest commit

 

History

1 Commit

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OFMAPI TypeScript / Node.js SDK

Status: planned, not yet published. There is no @ofmapi/onlyfans package on npm, and the package named onlyfans on npm is unrelated to OFMAPI. Do not install either expecting an OFMAPI client.

Use OFMAPI from TypeScript today

Generate a type-safe client from the public OpenAPI 3.1 spec. The generated client runs in Node, Bun, Deno, browsers, and edge runtimes.

npm install -D @hey-api/openapi-ts
npx @hey-api/openapi-ts -i https://ofmapi.com/openapi.json -o src/ofmapi -c @hey-api/client-fetch
npm install @hey-api/client-fetch
import { client } from "@hey-api/client-fetch";
import { listAccountsV1AccountsGet } from "./ofmapi";

client.setConfig({
  baseUrl: "https://api.ofmapi.com",
  headers: { Authorization: `Bearer ${process.env.OFMAPI_KEY}` },
});

const { data, error } = await listAccountsV1AccountsGet();

Or run the script in this repository, which does the same thing:

./generate.sh

Full walkthrough: https://ofmapi.com/docs/sdk/node

Plain fetch works just as well:

const res = await fetch("https://api.ofmapi.com/v1/accounts", {
  headers: { Authorization: `Bearer ${process.env.OFMAPI_KEY}` },
});
console.log(await res.json());

What OFMAPI is

A typed REST API over OnlyFans for agencies and developers, plus a hosted MCP server (174 tools) for Claude, ChatGPT, Cursor, and VS Code. Free during the public Beta; no card required; documented usage limits apply.

Roadmap

This repository will hold the official SDK source when it is published. Watch the repository or the changelog at https://ofmapi.com/changelog.

License

MIT. See LICENSE.


OFMAPI is an independent organisation, not affiliated with OnlyFans.com or Fenix International Limited. "OnlyFans" is a registered trademark of Fenix International Limited.

About

Official TypeScript / Node.js SDK for the OFMAPI OnlyFans API (planned; not yet published). Generate a typed client from the OpenAPI spec today.

Topics

Resources

Code of conduct

Contributing

Security policy

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages