Usage

Get Credit Usage

Changed on

Break your team's credit spend down by day, account or endpoint.

Data is computed by OnlyFansAPI from your request logs and credit ledger, and is rolled up once a night shortly after midnight UTC. Yesterday is therefore the most recent complete day; pass include_today=true to additionally get today's spend aggregated live, bearing in mind those figures are provisional until the rollup runs.

Totals reconcile with your credit ledger: spend that is not attributable to a single API call (webhook deliveries, data exports, media processing) is reported with a null endpoint and a null account.

If the API key is restricted to a subset of your accounts, only those accounts' usage is included. Spend that carries no account attribution is still reported, since it belongs to the team rather than to any one account.

This endpoint is free - calling it costs 0 credits. It is rate limited to 30 requests per minute, independently of your plan's usual rate limit.

get/api/usage/credits

Request

  • Base URL
    https://app.onlyfansapi.com
  • URL
    https://app.onlyfansapi.com/api/usage/credits
  • Auth
    HTTP bearer

Query parameters

fromstring

First day to include (Y-m-d, inclusive). Defaults to 29 days before to. Must be a valid date in the format <code>Y-m-d</code>.

Example:2026-07-09
tostring

Last day to include (Y-m-d, inclusive). Defaults to yesterday, or today when include_today is set. May not be in the future, and the range may not exceed 366 days. Must be a valid date in the format <code>Y-m-d</code>. Must be a date before or equal to <code>today</code>.

Example:2026-08-06
group_by'day' | 'account' | 'endpoint'

The dimension to group usage by. Default day.

Example:endpoint
account_idstring

Only include usage attributable to this account. Usage that is not tied to a single account (webhooks, data exports, media processing) is excluded when this filter is set. Must not be greater than 255 characters.

Example:acct_abc123
include_todayboolean

Include today, aggregated live from request logs instead of from the nightly rollup. Today's figures are provisional and may change until the rollup runs. Default false.

Example:true

Response

Success

Example response

{
  "data": {
    "from": "2026-07-09",
    "to": "2026-08-06",
    "group_by": "endpoint",
    "includes_today": false,
    "totals": {
      "credits": 18420,
      "requests": 17650
    },
    "results": [
      {
        "endpoint": "api/{account}/chats/{chat_id}/messages",
        "credit_type": "api_request",
        "credits": 9200,
        "requests": 9200
      },
      {
        "endpoint": "api/{account}/chats",
        "credit_type": "api_request",
        "credits": 4100,
        "requests": 4100
      },
      {
        "endpoint": "api/{account}/media/upload",
        "credit_type": "media_upload",
        "credits": 2600,
        "requests": 520
      },
      {
        "endpoint": null,
        "credit_type": "webhook",
        "credits": 1800,
        "requests": 0
      },
      {
        "endpoint": "api/profiles/{username}",
        "credit_type": "profile_search",
        "credits": 620,
        "requests": 620
      },
      {
        "endpoint": null,
        "credit_type": "data_export",
        "credits": 100,
        "requests": 0
      },
      {
        "endpoint": "api/{account}/me",
        "credit_type": "api_request",
        "credits": 0,
        "requests": 3210
      }
    ]
  },
  "_meta": {
    "_credits": {
      "used": 0,
      "balance": 9500,
      "note": "Always"
    },
    "_cache": {
      "is_cached": false,
      "note": "Cache disabled for this endpoint"
    },
    "_rate_limits": {
      "limit_minute": 60,
      "limit_day": null,
      "remaining_minute": 56,
      "remaining_day": null,
      "notice": ""
    }
  }
}

Changes