Skip to main content

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.

The API never returns HTML error pages or ad-hoc JSON to programmatic clients. Every error is a RFC 9457 problem document — a stable machine contract that tells a caller what failed, whether to retry, and what to do next. This is what makes errors agent-friendly: an AI client can branch on the fields without parsing prose.

The shape

HTTP/1.1 410 Gone
content-type: application/problem+json
cache-control: no-store
link: <https://onlyfanskit.dev/problems/account-disconnected>; rel="type"

{
  "type":      "https://onlyfanskit.dev/problems/account-disconnected",
  "title":     "Account session is no longer valid",
  "status":    410,
  "detail":    "Reconnect the account to continue.",
  "code":      "account-disconnected",
  "retryable": false
}
Core members type, title, and status are always present. type is a stable URI you can branch on — it won’t change once shipped.

Agent extensions

When relevant, problems carry extra members so you can react without parsing prose:
FieldMeaning
codeStable slug — matches the last segment of type.
retryabletrue if retrying after backoff may succeed.
retryAfterSecSeconds to wait before retrying (pairs with Retry-After).
reasonQuota / auth classification (org_rpm, account_write_rpm, …).
limit, currentPresent on quota problems.
upstreamCode, upstreamMessageThe raw OnlyFans error, when relaying one.

Common statuses

StatusWhen
400Invalid request, or OnlyFans rejected the credentials.
401Missing or invalid API key.
402Plan doesn’t allow the action (e.g. minting extra keys).
403Missing scope, or a creator-only endpoint called from a fan account.
404Account, attempt, or method not found.
410Account session is no longer valid — reconnect the account.
412Reauthentication needs stored credentials the account doesn’t have.
429Rate limit — see Rate limiting.
502A call to OnlyFans failed; see detail and upstream*.
503A required dependency isn’t available — retry later.

Handling in the SDK

In the SDK, non-2xx responses throw OnlyFansAPIError. See Handling errors for the pattern and what the common OnlyFans responses mean.