Skip to content

Latest commit

 

History

8 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OFMAPI Python SDK

Status: planned, not yet published. OFMAPI has not released a Python package. The package named onlyfans on PyPI belongs to a different project and is not an OFMAPI client, so do not pip install onlyfans expecting one.

Use OFMAPI from Python today

Generate a type-safe client from the public OpenAPI 3.1 spec. It takes about a minute and gives you a module per operation with typed models.

pip install openapi-python-client
openapi-python-client generate --url https://ofmapi.com/openapi.json --meta poetry
pip install -e ./ofmapi-client
import os
from ofmapi_client import Client
from ofmapi_client.api.accounts import list_accounts_v1_accounts_get

client = Client(
    base_url="https://api.ofmapi.com",
    headers={"Authorization": f"Bearer {os.environ['OFMAPI_KEY']}"},
)
accounts = list_accounts_v1_accounts_get.sync(client=client)

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

./generate.sh

Full walkthrough, including async usage and sending a message: https://ofmapi.com/docs/sdk/python

Plain HTTP works just as well:

import os, requests

r = requests.get(
    "https://api.ofmapi.com/v1/accounts",
    headers={"Authorization": f"Bearer {os.environ['OFMAPI_KEY']}"},
)
print(r.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 Python 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

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages