Read the current AI credit allowance

View as Markdown

AI credits are Researchly messages sent in Researchly’s current billing period; the cap comes from the caller’s tier and resetAt is Researchly’s period end.

Authentication

AuthorizationBearer

User bearer token: Clerk session JWT, Clerk OAuth access token, or Clerk API key

Response headers

X-RateLimit-Limitinteger

Requests allowed per client IP in the current rate-limit window.

X-RateLimit-Remaininginteger

Requests left before the tightest applicable rate-limit bucket rejects.

X-RateLimit-Resetinteger

Seconds until the exhausted rate-limit bucket admits another request; 0 when none is exhausted.

Response

OK
resetAtdatetime
usedinteger
limitinteger or nullOptional

Cap for the period; absent when the tier meters without a cap

remaininginteger or nullOptional

Cap minus used, never negative; absent when there is no cap

Errors

400
Bad Request Error
401
Unauthorized Error
403
Forbidden Error
406
Not Acceptable Error
422
Unprocessable Entity Error
429
Too Many Requests Error
500
Internal Server Error
503
Service Unavailable Error