Joint session with Vercel: How to build intelligent storefronts (May 15th)

Difference between API Requests and CDN Requests in Sanity

2 repliesLast updated: Nov 29, 2025

What is the difference between API Requests and CDN requests?
AI Update

The key difference between API requests and CDN requests in Sanity relates to whether your content is being fetched from the origin API or served from cached responses:

API Requests are direct queries to Sanity's Content Lake that bypass the cache. These requests:

CDN Requests are served from Sanity's API CDN at apicdn.sanity.io. These requests:

In Practice:

When you configure Sanity clients, the useCdn option controls this behavior. Setting useCdn: true (the default for production) routes requests through the API CDN, while useCdn: false makes direct API requests.

For most use cases, you'll want to use CDN requests for public-facing content to benefit from faster delivery and unlimited rate. You'd use direct API requests when you need guaranteed fresh data (like in the Studio or for authenticated content) or when working with draft content.

The API CDN also works with cache invalidation - when you publish content changes, Sanity automatically invalidates the relevant cached entries so users get updated content quickly.

Show original thread
2 replies

Was this answer helpful?

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.

Related contributions