Troubleshooting
Solutions for the most common errors you'll encounter when using the gateway.
401 — INVALID_API_KEY
The API key was not recognized or has been revoked.
Steps to fix:
- 1. Go to API Keys and confirm the key has status Active (not Revoked)
- 2. Check the request header name is
X-API-Key, notAuthorization - 3. Confirm the key belongs to the same organization as the model you are accessing
- 4. If you recently rotated the key, update all integrations to use the new key
402 — INSUFFICIENT_CREDITS
Your credit balance is lower than the cost of the requested endpoint.
Steps to fix:
- 1. Check remaining credits on the Dashboard overview or Billing page
- 2. Top up via Billing → Top-up Credits, or upgrade to a plan with a higher monthly quota
- 3. Credits reset at the start of each billing cycle — check when your cycle renews
Credits not reserved
402 — NO_SUBSCRIPTION
The organization has no active subscription.
Steps to fix:
- 1. Go to Billing in the dashboard
- 2. Subscribe to any plan — the Free plan is available at no cost
429 — RATE_LIMIT_EXCEEDED
Too many requests in the current 60-second window.
Steps to fix:
- 1. Check your plan's limit in the
_meta._rate_limits.limit_minuteresponse field - 2. Spread requests across the minute window, or upgrade to a plan with a higher rate limit
- 3. Implement exponential backoff in your integration:
async function requestWithRetry(fn, maxRetries = 3) {
for (let i = 0; i < maxRetries; i++) {
try {
return await fn()
} catch (err) {
if (err?.response?.status === 429 && i < maxRetries - 1) {
const delayMs = Math.pow(2, i) * 1000
await new Promise(r => setTimeout(r, delayMs))
} else {
throw err
}
}
}
}502 — Model Session Expired
The connected model's OnlyFans session has expired. Sessions expire after extended inactivity or when OnlyFans invalidates them server-side. The error body says "code": "OF_API_ERROR" and "upstream_status": 401: OnlyFans answered 401 for the model, not for your API key.
Steps to fix:
- 1. Go to Models in the dashboard
- 2. Find the affected model — it will show status Disconnected
- 3. Click the reconnect (↺) button and re-enter the OnlyFans credentials
- 4. Wait 15–30 seconds for the new session to be established
502 — OnlyFans is rate limiting the model (upstream_status 429)
OnlyFans slowed down this model's session: the answer is a 502 with code: OF_API_ERROR and upstream_status: 429. It is not your plan's limit (that one is a 429 with RATE_LIMIT_EXCEEDED). It tends to happen when many calls for the same model follow each other quickly, for example paging through a long list.
Steps to fix:
- 1. Wait
retry_afterseconds (also theRetry-Afterheader) if the answer has it, otherwise a few seconds - 2. Ask for the same thing again: when paging, the same
offset - 3. If it keeps happening, slow the loop down (a pause between pages) or spread the models you read over time
Failed requests cost nothing
502 — Request Signing Failure
The internal signing service could not sign the request. This is typically a temporary infrastructure issue.
Steps to fix:
- 1. Wait a few seconds and retry the request
- 2. If the error persists for more than a few minutes, contact support
Signing errors are not billable
500 — UNKNOWN_ERROR and SSL_ERROR
A failure on our side or while connecting to OnlyFans. Read the error text: if it says reconnect required (no session data, or the session could not be read), the model has no usable session.
Steps to fix:
- 1. If the text says reconnect required, reconnect the model from Models in the dashboard
- 2. Otherwise retry the request after a pause — most 500 errors are transient
- 3. If the error is consistent for a specific endpoint + model combination, contact support with the
trace_id
504 — TIMEOUT
OnlyFans did not answer in time. The request may have reached OnlyFans. For a read, retry after a pause.
For a write (a send) the result is unknown, so do not resend blindly. Look for that fan's message in /api/query first, and send again only if it is not there. A message that timed out has no tags (we write them after OnlyFans confirms), so match it on fan, text and time. An Idempotency-Key does not make a resend after a timeout safe:
- 1. If we already had OnlyFans' answer and only the reply to you was lost, the same key returns the stored answer (header
Idempotency-Replayed: true) and nothing is sent. - 2. After a timeout we do not know the result. The same key within 2 minutes gets
409 IDEMPOTENCY_KEY_IN_FLIGHTand nothing is sent. After 2 minutes the same key with the same body is sent again, so a message OnlyFans had delivered goes out twice. - 3. If OnlyFans answered with an error (
502 OF_API_ERROR,502 SIGN_ERROR), the key is cleared and a retry with it runs fresh. - 4. A key is kept 24 hours from first use, per API key, and must be a UUID (
400 INVALID_IDEMPOTENCY_KEY). The same key with a different body (model, fan, text, media, price, giphy, locked text, previews, reply-to, isForward) gets409 IDEMPOTENCY_KEY_REUSED_WITH_DIFFERENT_BODY. A change in the tags alone is not detected.
Contacting support
Every error body has a trace_id, and every response has the same id in the X-Trace-Id header. Send it with the endpoint, the model id and the time (with the time zone): with the id we find the request in our logs, including what OnlyFans answered. See Error Handling.