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

# Call any SDK method

> Generic passthrough that maps onto `of.{resource}.{method}(...args)` on the connected account. Accepts positional args via `{ "args": [...] }`, a bare array, or a single object body (most methods). GET is supported for read methods — the query string becomes a single object arg. Requires `sdk:call`. Enumerate valid resource/method pairs with `GET /v1/sdk/methods`.



## OpenAPI

````yaml /api-reference/openapi.json post /v1/accounts/{id}/{resource}/{method}
openapi: 3.1.0
info:
  title: onlyfanskit REST API
  description: >-
    Connect OnlyFans accounts and act on them over HTTP. Authenticate with a
    bearer API key, connect a creator account once, then call any method or
    stream realtime events. Not affiliated with OnlyFans or Fenix International
    Limited.
  version: 1.0.0
servers:
  - url: https://api.onlyfanskit.dev
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Account
    description: Identity, keys, and usage for the calling org.
  - name: Connect
    description: Link OnlyFans accounts via cookie, cURL, email/password, or mobile.
  - name: Accounts
    description: Manage connected accounts.
  - name: SDK
    description: Call any SDK method against a connected account.
  - name: Realtime
    description: Server-Sent Events stream of account activity.
  - name: Webhooks
    description: HTTP callbacks for account events.
paths:
  /v1/accounts/{id}/{resource}/{method}:
    post:
      tags:
        - SDK
      summary: Call any SDK method
      description: >-
        Generic passthrough that maps onto `of.{resource}.{method}(...args)` on
        the connected account. Accepts positional args via `{ "args": [...] }`,
        a bare array, or a single object body (most methods). GET is supported
        for read methods — the query string becomes a single object arg.
        Requires `sdk:call`. Enumerate valid resource/method pairs with `GET
        /v1/sdk/methods`.
      operationId: callSdkMethod
      parameters:
        - $ref: '#/components/parameters/AccountId'
        - name: resource
          in: path
          required: true
          schema:
            type: string
          description: SDK resource, e.g. `posts`, `messages`, `earnings`.
        - name: method
          in: path
          required: true
          schema:
            type: string
          description: Method on the resource, e.g. `feed`, `send`, `balances`.
      requestBody:
        content:
          application/json:
            schema:
              oneOf:
                - type: object
                  properties:
                    args:
                      type: array
                      items: {}
                - type: array
                  items: {}
                - type: object
                  additionalProperties: true
            examples:
              objectArg:
                summary: Single object arg
                value:
                  limit: 10
              positional:
                summary: Positional args
                value:
                  args:
                    - 123456
                    - limit: 30
      responses:
        '200':
          description: Whatever the SDK method returned
          content:
            application/json:
              schema:
                type: object
                properties:
                  result: {}
        '404':
          $ref: '#/components/responses/Problem'
        '410':
          $ref: '#/components/responses/Problem'
        '502':
          $ref: '#/components/responses/Problem'
components:
  parameters:
    AccountId:
      name: id
      in: path
      required: true
      schema:
        type: string
      description: Connected account id.
  responses:
    Problem:
      description: An RFC 9457 problem detail.
      content:
        application/problem+json:
          schema:
            $ref: '#/components/schemas/Problem'
  schemas:
    Problem:
      type: object
      description: RFC 9457 problem details. Errors carry `application/problem+json`.
      properties:
        type:
          type: string
          format: uri
          description: Stable problem type URI under https://onlyfanskit.dev/problems/.
        title:
          type: string
        status:
          type: integer
        detail:
          type: string
        instance:
          type: string
        code:
          type: string
          description: Stable slug — matches the last segment of `type`.
        retryable:
          type: boolean
        retryAfterSec:
          type: integer
        upstreamCode:
          type: integer
          nullable: true
        upstreamMessage:
          type: string
          nullable: true
      required:
        - type
        - title
        - status
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Your API key, sent as `Authorization: Bearer <key>`.'

````