# Send OnlyFans API Access to your agent
Hand the extracted package to your coding agent with a concrete install brief instead of figuring it out manually.
## Fast path
- Download the package from Yavira.
- Extract it into a folder your agent can access.
- Paste one of the prompts below and point your agent at the extracted folder.
## Suggested prompts
### New install

```text
I downloaded a skill package from Yavira. Read SKILL.md from the extracted folder and install it by following the included instructions. Then review README.md for any prerequisites, environment setup, or post-install checks. Tell me what you changed and call out any manual steps you could not complete.
```
### Upgrade existing

```text
I downloaded an updated skill package from Yavira. Read SKILL.md from the extracted folder, compare it with my current installation, and upgrade it while preserving any custom configuration unless the package docs explicitly say otherwise. Then review README.md for any prerequisites, environment setup, or post-install checks. Summarize what changed and any follow-up checks I should run.
```
## Machine-readable fields
```json
{
  "schemaVersion": "1.0",
  "item": {
    "slug": "onlyfans-api",
    "name": "OnlyFans API Access",
    "source": "tencent",
    "type": "skill",
    "category": "开发工具",
    "sourceUrl": "https://clawhub.ai/martingalovic/onlyfans-api",
    "canonicalUrl": "https://clawhub.ai/martingalovic/onlyfans-api",
    "targetPlatform": "OpenClaw"
  },
  "install": {
    "downloadUrl": "/downloads/onlyfans-api",
    "sourceDownloadUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=onlyfans-api",
    "sourcePlatform": "tencent",
    "targetPlatform": "OpenClaw",
    "packageFormat": "ZIP package",
    "primaryDoc": "SKILL.md",
    "includedAssets": [
      "README.md",
      "SKILL.md"
    ],
    "downloadMode": "redirect",
    "sourceHealth": {
      "source": "tencent",
      "slug": "onlyfans-api",
      "status": "healthy",
      "reason": "direct_download_ok",
      "recommendedAction": "download",
      "checkedAt": "2026-05-06T09:41:01.133Z",
      "expiresAt": "2026-05-13T09:41:01.133Z",
      "httpStatus": 200,
      "finalUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=onlyfans-api",
      "contentType": "application/zip",
      "probeMethod": "head",
      "details": {
        "probeUrl": "https://wry-manatee-359.convex.site/api/v1/download?slug=onlyfans-api",
        "contentDisposition": "attachment; filename=\"onlyfans-api-1.0.0.zip\"",
        "redirectLocation": null,
        "bodySnippet": null,
        "slug": "onlyfans-api"
      },
      "scope": "item",
      "summary": "Item download looks usable.",
      "detail": "Yavira can redirect you to the upstream package for this item.",
      "primaryActionLabel": "Download for OpenClaw",
      "primaryActionHref": "/downloads/onlyfans-api"
    },
    "validation": {
      "installChecklist": [
        "Use the Yavira download entry.",
        "Review SKILL.md after the package is downloaded.",
        "Confirm the extracted package contains the expected setup assets."
      ],
      "postInstallChecks": [
        "Confirm the extracted package includes the expected docs or setup files.",
        "Validate the skill or prompts are available in your target agent workspace.",
        "Capture any manual follow-up steps the agent could not complete."
      ]
    }
  },
  "links": {
    "detailUrl": "https://openagent3.xyz/skills/onlyfans-api",
    "downloadUrl": "https://openagent3.xyz/downloads/onlyfans-api",
    "agentUrl": "https://openagent3.xyz/skills/onlyfans-api/agent",
    "manifestUrl": "https://openagent3.xyz/skills/onlyfans-api/agent.json",
    "briefUrl": "https://openagent3.xyz/skills/onlyfans-api/agent.md"
  }
}
```
## Documentation

### OnlyFans API Skill

This skill queries the OnlyFansAPI.com platform to answer questions about OnlyFans agency analytics — revenue, model performance, and link conversion metrics.

### Prerequisites

The user must set the environment variable ONLYFANSAPI_API_KEY with their API key from https://app.onlyfansapi.com/api-keys.

If the key is not set, remind the user:

Export your OnlyFansAPI key:
  export ONLYFANSAPI_API_KEY="your_api_key_here"

### API Basics

Base URL: https://app.onlyfansapi.com
Auth header: Authorization: Bearer $ONLYFANSAPI_API_KEY
All dates use URL-encoded format: YYYY-MM-DD HH:MM:SS
If not specific time is specified use start of day or end of day (for date range ending date)
Pagination: use limit and offset query params. Check hasMore or _pagination.next_page in responses.
Whenever possible use User-Agent with value: OnlyFansAPI-Skill
Try your best to infer schema from the example response of the endpoint. Eg "data.total.total" for earnings scalar value from endpoint.

### 1. Get revenue of all models for the past N days

Steps:

List all connected accounts:
curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \\
  "https://app.onlyfansapi.com/api/accounts" | jq .

Each account object has "id" (e.g. "acct_xxx"), "onlyfans_username", and "display_name".


For each account, get earnings:
START=$(date -u -v-7d '+%Y-%m-%d+00%%3A00%%3A00')  # macOS
# Linux: START=$(date -u -d '7 days ago' '+%Y-%m-%d+00%%3A00%%3A00')
END=$(date -u '+%Y-%m-%d+23%%3A59%%3A59')

curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \\
  "https://app.onlyfansapi.com/api/{account_id}/statistics/statements/earnings?start_date=$START&end_date=$END&type=total" | jq .

Response fields:

data.total — net earnings
data.gross — gross earnings
data.chartAmount — daily earnings breakdown array
data.delta — percentage change vs. prior period



Summarize: Present a table of each model's display name, username, net revenue, and gross revenue. Sum the totals.

### 2. Which model is performing the best

Use the same workflow as above. Rank models by data.total (net earnings) descending. The model with the highest value is the best performer.

Optionally also pull the statistics overview for richer context:

curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \\
  "https://app.onlyfansapi.com/api/{account_id}/statistics/overview?start_date=$START&end_date=$END" | jq .

This adds subscriber counts, visitor stats, post/message earnings breakdown.

### 3. Which Free Trial Link has the highest conversion rate (subscribers → spenders)

List free trial links:
curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \\
  "https://app.onlyfansapi.com/api/{account_id}/trial-links?limit=100&offset=0&sort=desc&field=subscribe_counts&synchronous=true" | jq .

Key response fields per link:

id, trialLinkName, url
claimCounts — total subscribers who claimed the trial
clicksCounts — total clicks
revenue.total — total revenue from this link
revenue.spendersCount — number of subscribers who spent money
revenue.revenuePerSubscriber — average revenue per subscriber



Calculate conversion rate:
conversion_rate = spendersCount / claimCounts

Rank links by conversion rate descending.


Present results as a table: link name, claims, spenders, conversion rate, total revenue.

### 4. Which Tracking Link has the highest conversion rate

List tracking links:
curl -s -H "Authorization: Bearer $ONLYFANSAPI_API_KEY" \\
  "https://app.onlyfansapi.com/api/{account_id}/tracking-links?limit=100&offset=0&sort=desc&sortby=claims&synchronous=true" | jq .

Key response fields per link:

id, campaignName, campaignUrl
subscribersCount — total subscribers from this link
clicksCount — total clicks
revenue.total — total revenue
revenue.spendersCount — subscribers who spent
revenue.revenuePerSubscriber — avg revenue per subscriber
revenue.revenuePerClick — avg revenue per click



Calculate conversion rate:
conversion_rate = revenue.spendersCount / subscribersCount



Present results as a table: campaign name, subscribers, spenders, conversion rate, total revenue, revenue per subscriber.

### 5. Which Free Trial / Tracking Link made the most money

Use the same listing endpoints above. Sort by revenue.total descending. Present the top links with their name, type (trial vs. tracking), total revenue, and subscriber/spender counts.

### Multi-Account (Agency) Queries

For agency-level queries that span all models, always:

First fetch all accounts via GET /api/accounts
Loop through each account and gather the relevant data
Aggregate and present combined results with per-model breakdowns

### Earnings Type Filters

When querying GET /api/{account}/statistics/statements/earnings, the type parameter filters by category:

total — all earnings combined
subscribes — subscription revenue
tips — tips received
post — paid post revenue
messages — paid message revenue
stream — stream revenue

### When In Doubt

If you are unsure about an endpoint, parameter, response format, or how to accomplish a specific task with the OnlyFans API, consult the official documentation at https://docs.onlyfansapi.com. The site contains full API reference details, guides, and examples for all available endpoints. Always check the docs before guessing.

### Error Handling

If ONLYFANSAPI_API_KEY is not set, stop and ask the user to configure it.
If an API call returns a non-200 status, show the error message and HTTP status code.
If _meta._rate_limits.remaining_minute or remaining_day is 0, warn the user about rate limits.
If an account has "is_authenticated": false, note that the account needs re-authentication.

### Output Formatting

Always present data in markdown tables for readability.
Include currency values formatted to 2 decimal places.
When showing percentages (conversion rates, deltas), format as XX.X%.
For multi-model summaries, include a Total row at the bottom.
## Trust
- Source: tencent
- Verification: Indexed source record
- Publisher: martingalovic
- Version: 1.0.0
## Source health
- Status: healthy
- Item download looks usable.
- Yavira can redirect you to the upstream package for this item.
- Health scope: item
- Reason: direct_download_ok
- Checked at: 2026-05-06T09:41:01.133Z
- Expires at: 2026-05-13T09:41:01.133Z
- Recommended action: Download for OpenClaw
## Links
- [Detail page](https://openagent3.xyz/skills/onlyfans-api)
- [Send to Agent page](https://openagent3.xyz/skills/onlyfans-api/agent)
- [JSON manifest](https://openagent3.xyz/skills/onlyfans-api/agent.json)
- [Markdown brief](https://openagent3.xyz/skills/onlyfans-api/agent.md)
- [Download page](https://openagent3.xyz/downloads/onlyfans-api)