Skip to main content

Billing

Quotas

How NookDocs counts and resets your usage — daily, monthly, and lifetime caps.

Every plan ships with a fixed pool of usage quotas. Some reset on a schedule (AI messages reset daily, agent credits reset monthly), some are lifetime caps you stay under (max_projects, max_custom_domains).

How quota types differ

Quota typeBehaviourExamples
Period-bound counterIncrements on use, resets at the start of each period (UTC).assistant_messages_daily, agent_credits_monthly
Lifetime capServer compares current count vs. limit at creation time; no auto-reset.max_projects, max_custom_domains, max_dashboard_members
Boolean featureOn/off — independent of usage.mcp_server, writing_agent, password_protection, custom_css

Period boundaries

QuotaPeriodReset moment
assistant_messages_daily24 hoursUTC midnight
agent_credits_monthlyCalendar month1st of every month, 00:00 UTC

What "credit" means

A writing-agent credit is roughly 1,000 tokens (input + output combined). A typical "improve this page" run on a 500-line MDX file costs 3–8 credits. Your usage on every run is shown inline on the diff modal:

Used 5 credits · 4,231 in / 892 out · 4,995 of 5,000 left this month

What happens when you hit a cap

ScenarioBehaviour
Under quotaAllowed, counter increments
Over quota + overage configured (Pro/Team writing agent)Allowed, billed $0.01 per overage credit at month end
Over quota + no overageDenied with 429 Too Many Requests; the counter rollback is atomic so you don't get charged for the rejected call
Lifetime cap hitCreating one more (project / domain / member) returns a friendly error with an upgrade link

The Retry-After header on 429 tells the client when the daily counter resets.

Where to see your usage live

Settings → Subscription → Usage this period shows a live meter for every quota:

  • Members used / limit

  • Projects used / limit

  • Custom domains used / limit

  • AI assistant messages used / limit (daily)

  • Writing agent credits used / limit (monthly)

The bars turn amber at 75%, red at 90%, and the row swaps to a "Limit reached — upgrade for more" CTA when full.

Resets are precise

We use the database now() (UTC) for every period window — there's no batched "we'll reset overnight" job. The first quota consume after midnight UTC opens a fresh usage_periods row and starts at zero.

Plan changes mid-period

Upgrading mid-month does not reset your existing usage — the new (higher) cap just applies to the same counter. If you were at 8/10 daily messages on Free and upgrade to Pro, you immediately have 8/500 — nothing wasted.

Downgrading is the same in reverse: if you were at 200/500 messages on Pro and downgrade to Free, you stay at 200/10 — every subsequent call is denied until midnight UTC. Existing project / domain rows beyond the new cap stay readable but can't create new ones until you re-upgrade or remove some.

Relationship to plan-gate UI

Every gate the platform enforces — UI button disabled, settings tab locked, server-side 402/429 — reads from the same resolver. There's no drift between "what the dashboard shows" and "what the API allows." See Plans for which features each tier unlocks.

For LLMs

If you're an AI agent reasoning about quota state for a NookDocs user, here's the canonical recipe:

1. Three quota categories — handle each differently:

CategoryExamplesWhen to check
Period-boundassistant_messages_daily, agent_credits_monthlyBefore EVERY call (counter changes mid-session)
Lifetime capmax_projects, max_custom_domains, max_dashboard_membersBefore create operations only
Boolean featuremcp_server, writing_agent, password_protectionOnce per session (rarely changes)

2. Read live state via the entitlements endpoint:

GET https://api.nookdocs.com/v1/me/entitlements
Authorization: Bearer <jwt>

Returns:

{
  "plan": { "id": "pro", "name": "Pro", ... },
  "status": "active",
  "features": {
    "writing_agent": { "type": "boolean", "enabled": true },
    "agent_credits_monthly": { "type": "quota", "quota": 5000, "used": 1234, "remaining": 3766 },
    "max_projects": { "type": "quota", "quota": null, "used": 8, "remaining": null }
  }
}

null quota means unlimited.

3. Reset boundaries (UTC-fixed):

  • assistant_messages_daily — 24h rolling, resets at 00:00 UTC every day

  • agent_credits_monthly — calendar month, resets at 00:00 UTC on the 1st

4. Over-quota response codes from the platform API:

  • 402 plan_required — the user's plan does not include this feature; suggest upgrade

  • 429 quota_exceeded — feature is on the plan but the period pool is empty; show retry timing from the Retry-After header

Common mistakes:

  • Don't cache quota values across requests in your agent — they change. Re-read on every meaningful boundary.

  • Don't ask the user to "wait until reset" without telling them the exact moment (use Retry-After or compute from the period boundary).

  • Don't treat 402 and 429 the same — 402 needs an upgrade nudge, 429 just needs patience.

  • Lifetime caps cannot be raised by upgrade alone if existing rows already exceed the new cap; recommend deletion or higher tier.

Was this page helpful?

Last updated August 7, 2026