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

# Quickstart

> From zero to a working OnlyFans call in about two minutes using the hosted REST API — API key, connect an account, then call any method.

Everything runs on the **hosted REST API**. You do not host login infrastructure
or paste browser cookies.

<Steps>
  <Step title="Get an API key">
    Create a key in the [dashboard](https://onlyfanskit.dev/dashboard) and
    export it:

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    export OFK_KEY="sk_..."
    curl https://api.onlyfanskit.dev/v1/me -H "Authorization: Bearer $OFK_KEY"
    ```
  </Step>

  <Step title="Connect an account">
    **For scripts and dev** — email and password (poll until connected):

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    curl -X POST https://api.onlyfanskit.dev/v1/connect/login \
      -H "Authorization: Bearer $OFK_KEY" \
      -H "Content-Type: application/json" \
      -d '{
        "email": "creator@example.com",
        "password": "<password>",
        "remember_credentials": true
      }'
    ```

    Save `attempt_id`, then poll until `state` is `completed_success` and you
    have `account_id`. See [Connect with email + password](/connect/login) and
    [Two-factor & challenges](/connect/two-factor) if the attempt parks on a
    challenge state.

    **For a product UI** — use [Embedded connect](/connect/embed) instead
    (`POST /v1/connect/client-sessions` and open `embed_url` for the creator).
  </Step>

  <Step title="Make your first calls">
    Every SDK method is reachable at `/v1/accounts/{id}/{resource}/{method}`.

    ```bash theme={"theme":{"light":"github-light","dark":"github-dark"}}
    export ACCOUNT_ID="acct_..."

    curl "https://api.onlyfanskit.dev/v1/accounts/$ACCOUNT_ID/users/me" \
      -H "Authorization: Bearer $OFK_KEY"

    curl -X POST "https://api.onlyfanskit.dev/v1/accounts/$ACCOUNT_ID/messages/send" \
      -H "Authorization: Bearer $OFK_KEY" \
      -H "Content-Type: application/json" \
      -d '{ "args": [123456, { "text": "Hi!" }] }'
    ```

    List callable methods with `GET /v1/sdk/methods`.
  </Step>
</Steps>

## Next steps

<CardGroup cols={2}>
  <Card title="Core concepts" icon="lightbulb" href="/concepts">
    Accounts, connect attempts, and scopes — the nouns you'll use everywhere.
  </Card>

  <Card title="Connect an account" icon="link" href="/connect/overview">
    Embedded, login, and mobile flows.
  </Card>

  <Card title="Build something" icon="hammer" href="/guides/messaging">
    Use-case guides for messaging, fans, content, and earnings.
  </Card>

  <Card title="AI agents" icon="robot" href="/mcp/hosted">
    Drive accounts from MCP with your API key — no session env vars.
  </Card>
</CardGroup>
