Questions about request quotas and tag length in Sanity's presentation mode

2 replies
Last updated: May 29, 2024
Hey Sanity Team! I had 2 quick questions:1. In presentation mode, do the requests of my website I see in the preview pane count towards my quota? I know in the Studio, requests don't count towards it, but presentation mode is kind of both the Studio and presentation, so I'm not sure and couldn't find any documentation about it.
2. Is there a limit to the length of the
tag of a query? Nevermind, answered my own question by reaching the limit haha (75)
AI Update

Great questions! Let me address both:

1. Presentation Mode and API Quota

I don't have definitive documentation on whether Presentation mode preview pane requests count toward your API quota. Here's what I can tell you based on what's documented:

The Presentation Tool embeds your actual application in an iframe within Sanity Studio for live preview. When your website loads in that preview pane, it's making real HTTP requests to Sanity's API endpoints to fetch content - just like it would in production.

What we know for certain from the Request Logs documentation:

  • Studio requests are unmetered: Requests marked as studioRequest don't count toward API or bandwidth usage and don't incur costs
  • These Studio requests should be filtered out when doing cost analysis

However, the documentation doesn't explicitly clarify whether the iframe-embedded website preview in Presentation mode is tagged as studioRequest or counts as regular metered API requests.

To find out definitively, I'd recommend:

  1. Check your Request Logs (available in project settings under Usage)
  2. Look for requests made while using Presentation mode
  3. See if they're marked as studioRequest (unmetered) or appear as regular API/APICDN requests (metered)

This would give you a clear answer for your specific setup. You could also reach out to Sanity support for official clarification.

2. Query Tag Length Limit

Glad you figured this one out! Yes, the tag parameter has a 75-character limit. This is important when using request tags to track and analyze your API usage in the request logs. Keep your tags concise and meaningful within that constraint!

Since Presentation is happening inside of a pane in the Studio those requests do not count toward your quota!
Nice thanks!

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?