> ## 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.

# TypeScript SDK

> Typed OnlyFans API coverage — use the hosted REST API to execute calls; use the SDK for types, method names, and resource reference.

`onlyfanskit` is the typed surface behind the [hosted REST API](/api-reference/introduction).
**Default integration path:** connect an account on the platform, then call
`/v1/accounts/{id}/{resource}/{method}` with your API key.

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
curl "https://api.onlyfanskit.dev/v1/accounts/$ACCOUNT_ID/posts/feed?limit=10" \
  -H "Authorization: Bearer $OFK_KEY"
```

Install the package when you want types and IDE autocomplete while building
request bodies, or when you run code on onlyfanskit infrastructure that executes
the client directly:

```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
npm install onlyfanskit
```

## Resource layout

The client is organized as `of.<resource>.<method>(...)`. Each maps to one
OnlyFans API call:

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const posts = await of.posts.feed({ limit: 10 });
const chats = await of.chats.list({ limit: 20 });
await of.messages.send(userId, { text: "Hi!" });
```

## What's covered

<CardGroup cols={2}>
  <Card title="Account & identity" href="/sdk/resources/account-and-identity">
    users, subscriptions, security, helpers, sessions, referrals, streaks
  </Card>

  <Card title="Content" href="/sdk/resources/content">
    posts, comments, media, stories, highlights, streams, bookmarks, labels
  </Card>

  <Card title="Messaging" href="/sdk/resources/messaging">
    messages, chats, notifications
  </Card>

  <Card title="Money" href="/sdk/resources/money">
    earnings, payments, payouts, chargebacks, dataExports
  </Card>

  <Card title="Growth & promo" href="/sdk/resources/growth">
    campaigns, trialLinks, promotions, lists, schedules, following, social
  </Card>

  <Card title="Support & metadata" href="/sdk/resources/support-and-metadata">
    tickets, reports, releaseForms, discovery, iso, pages
  </Card>
</CardGroup>

## Raw paths

```ts theme={"theme":{"light":"github-light","dark":"github-dark"}}
const data = await of.client.get<MyType>("/some/path", { limit: 5 });
```

On the hosted API, the same call is
`GET /v1/accounts/{id}/...` or the generic SDK passthrough documented in
[API reference](/api-reference/introduction).

See [Connecting the client](/sdk/client) for how sessions relate to the platform.
