Questions about API request limits and payment for a project using NextJS in production.

2 replies
Last updated: Sep 22, 2023
Hello!We have a project running in production using NextJS (we launched this week), and due to a wrong configuration (revalidation frequency), we’re seeing this very clear message about the quota exceeded about the API Requests. Nothing wrong with it, we messed it up in our config.

But, what isn’t clear to us is when we will be blocked completely.
1. How much time do we have to apply for the payment until a full lock of the API requests?
2. On what date are the counters reset to zero again?
3. Can we pay for example this month and the next one maybe don’t? depending on the usage needed every month? This is because we don’t expect to reach the limits of the free tier again the next month…. at least, not for now
Thank you all!
AI Update

I understand your concern about the quota situation! Let me address your questions, though I need to be transparent that I couldn't find specific documentation about some of the exact policies you're asking about.

What I can tell you based on available information:

Sanity operates on a pay-as-you-go model for usage beyond the free tier. When you exceed your free tier limits, you're billed for the overage rather than being immediately blocked. The Growth Plan explicitly mentions "pay-as-you-go for higher usage," which suggests the platform is designed to scale with your needs rather than hard-stop your service.

Regarding your specific questions:

  1. When will you be blocked? - I wasn't able to find specific documentation about the exact timeline for when API access gets blocked due to unpaid overages. This is something you should contact Sanity support about directly for an accurate answer, as it likely involves their billing policies.

  2. When do counters reset? - While monthly billing cycles are standard for SaaS platforms, I couldn't find official documentation confirming the exact reset date for Sanity's API request counters. This is another detail worth confirming with support.

  3. Can you pay month-to-month? - Yes! The pay-as-you-go model means you're only charged for what you actually use in a given month. If you fix your revalidation config and stay within free tier limits next month, you shouldn't have charges. There's no requirement to maintain a paid subscription continuously.

For your Next.js revalidation issue:

Since you identified the problem as revalidation frequency, consider using Sanity Functions to trigger on-demand revalidation only when content actually changes. This is much more efficient than time-based revalidation and is the modern recommended approach. Functions can listen to document changes and call your Next.js revalidation endpoint only when needed, dramatically reducing unnecessary API requests.

My recommendation: Contact Sanity support directly through your project dashboard or at support@sanity.io to get definitive answers about your specific billing situation and timeline. They'll be able to see your account status and give you exact dates and policies that I couldn't verify in the documentation.

The counter resets at the first of the month, so you should see it go down to zero on October 1. Your bill also will not be due until that date.
I’m unclear on when a project gets blocked due to nonpayment. I believe it happens if you’re 30 days or more in arrears. We do send warnings before shutting down your API access, though.

You’re only billed for your usage in a given month so if you’ve figured out your config you may very well not have any overages in the future.
Awesome! Thank you for the clear responses! it helped me alot!

Sanity – Build the way you think, not the way your CMS thinks

Sanity is the developer-first content operating system that gives you complete control. Schema-as-code, GROQ queries, and real-time APIs mean no more workarounds or waiting for deployments. Free to start, scale as you grow.

Was this answer helpful?