Operations

Plans & billing

Four tiers — Free, Pro, Team, Enterprise. Each tier sets your monthly token quota, requests-per-minute ceiling, max API keys, organization limits, and feature flags. Paid tiers are billed in INR via Razorpay.

Tier comparison

All numbers below come straight from saas/app/core/plans.py — that file is the single source of truth.

LimitFreeProTeamEnterprise
Price (monthly)₹0₹1,599₹3,999Custom
Output tokens / month100,0002,000,00010,000,000Unlimited
Requests / minute201203001,000
Max API keys21050200
Organizations01550
Members per org525200
Custom rules5502001,000
Smart detectionYesYesYes
Auto-compress inputYesYesYes
Max request body100 KB1 MB5 MB10 MB
Quota counts output tokens
The monthly quota tracks outputtokens generated by the upstream model. Input tokens you send are not counted toward your mintoken plan limit — they're billed by the upstream provider on your own key.

Free

Free is meant for evaluation and small side projects. You get 100,000 output tokens per month, 20 requests per minute, and up to 2 API keys. Smart detection and auto-compress-input are gated to paid tiers — Free always uses the default full intensity unless you set it explicitly per key.

  • No credit card to sign up.
  • No organization features (solo only).
  • Hard 100 KB request body cap.

Pro — ₹1,599 / month

Pro is the working-developer tier. 2,000,000 output tokens per month, 120 RPM, 10 keys, 1 organization with up to 5 members, and the full compression feature surface — smart detection picks the right intensity for each request automatically, and auto-compress-input compresses large prompts before forwarding.

Team — ₹3,999 / month

Team is for small companies and agencies. 10,000,000 output tokens per month, 300 RPM, 50 keys, and up to 5 organizations of 25 members each. Same feature flags as Pro — the difference is headroom.

Enterprise

Enterprise removes the monthly token cap, lifts RPM to 1,000, and scales to 200 keys, 50 organizations, and 200 members per org. Pricing is per-deal — email support@mintoken.in to scope it.

How limits are enforced

  • Tokens / month — counted per organization (or per user on Free). Exceeded: 429 token quota exceeded until the next billing cycle.
  • Requests / minute — sliding window per API key. Exceeded: 429 Too Many Requests with Retry-After.
  • Max API keys — checked at key creation. Exceeded: 403 plan limit reached.
  • Request body — checked before forward. Exceeded: 413 Payload Too Large.

See Rate limits for the full header reference and Errors for the response shapes.

Upgrading via Razorpay

Paid plans are billed monthly in INR through Razorpay. The simplest path is the billing page in the dashboard — pick a plan, complete checkout, your account flips on payment verification. Behind the scenes:

# 1. Create a Razorpay order from the dashboard or API
curl -X POST https://api.mintoken.dev/v1/billing/razorpay/order \
  -H "Authorization: Bearer <supabase-jwt>" \
  -H "Content-Type: application/json" \
  -d '{"plan": "pro"}'

# Response:
# { "order_id": "order_…", "amount": 159900, "currency": "INR", "key_id": "rzp_…" }

# 2. Open Razorpay Checkout in the browser using the returned order_id.
#    On success Razorpay returns razorpay_payment_id + signature.

# 3. Verify the payment server-side
curl -X POST https://api.mintoken.dev/v1/billing/razorpay/verify \
  -H "Authorization: Bearer <supabase-jwt>" \
  -H "Content-Type: application/json" \
  -d '{
    "plan": "pro",
    "razorpay_order_id": "order_…",
    "razorpay_payment_id": "pay_…",
    "razorpay_signature": "…"
  }'

# On verify success, the user's profile.plan flips to "pro" and the
# new quota is live on the very next request.

What happens after verify

  • The signature is checked against your Razorpay key secret server-side — only a valid HMAC flips the plan.
  • On success, profiles.plan is updated to pro or team and the new quota applies on the next request — no key rotation needed.
  • A Razorpay webhook is the source of truth for renewals and refunds; the synchronous verify call is just for instant UX.
Test mode keys are safe
On your dashboard you can switch billing to Razorpay test mode. Test keys never charge a real card and won't flip your plan in production.

Downgrades and cancellations

Cancel anytime from the dashboard. Your paid plan stays active until the end of the current billing cycle, then drops to Free. Existing API keys keep working — only the quota tightens. Usage above the new Free ceiling returns 429 token quota exceeded until the next cycle resets.

Zero-spend protection
Mintoken never auto-charges overage. When you hit your monthly token cap, requests fail fast — there is no surprise end-of-month bill. Upgrade explicitly to raise the ceiling.