Authentication
All API calls are authenticated with an API key passed in the X-API-Key request header. Keys are generated from the dashboard and tied to your organization's credit balance.
Dashboard login is separate
The dashboard at dev-dashboard.onlyfans-api.ai uses its own session-based login. That is not the same as API authentication — you do not need to implement login flows in your integration. Just use your API key.
Get an API Key
01
Sign in to the dashboard
Go to dev-dashboard.onlyfans-api.ai and log in to your account.
02
Open API Keys
Navigate to API Keys in the sidebar and click "Create new key". Give it a descriptive name like "Production" or "Analytics Bot".
03
Copy the key immediately
The full key value is shown only once at creation. Copy it and store it securely — you cannot retrieve it again.
Keep your key secret
API keys grant full proxy access under your organization's credit balance. Never expose them in client-side JavaScript, public repos, or logs. Use environment variables.
Using Your API Key
Pass the key in the X-API-Key header on every request. No token exchange, no OAuth — just the key.
curl "/api/models/MODEL_UUID/users/me" \
-H "X-API-Key: sk_live_abc123def456..."Required Headers
| Header | Required | Format |
|---|---|---|
X-API-Key | Yes | sk_live_... |
Content-Type | POST only | application/json |
Authentication Errors
Missing key
JSON
HTTP 401 Unauthorized
{
"error": "No API key provided. Pass X-API-Key in the request header.",
"code": "NO_API_KEY"
}Invalid or revoked key
JSON
HTTP 401 Unauthorized
{
"error": "The provided API key is invalid or has been revoked.",
"code": "INVALID_API_KEY"
}No active subscription
JSON
HTTP 402 Payment Required
{
"error": "Your organization does not have an active subscription.",
"code": "NO_SUBSCRIPTION"
}