Skip to content

Sanity

Overview

Sanity is the Content Operating System built for modern development workflows. Start with a simple API and Studio, then add automation, AI, and custom workflows as your needs grow. Unlike traditional CMSes focused at web publishing, Sanity provides the infrastructure for your entire content operation.

This integration connects your Vercel project to Sanity and provisions the environment variables you need to get started.

Preview
Instructions
Adding the integration

This integration connects your Sanity project to Vercel and provisions environment variables for your project.

Environment Variables:

VariableDescription
NEXT_PUBLIC_SANITY_PROJECT_IDYour Sanity project ID (client-safe)
NEXT_PUBLIC_SANITY_DATASETYour dataset name (client-safe)
SANITY_API_READ_TOKENAPI token for reading draft content
SANITY_API_WRITE_TOKENAPI token for writing content

Additional aliases are also provisioned: SANITY_API_PROJECT_ID, SANITY_STUDIO_PROJECT_ID, SANITY_API_DATASET, SANITY_STUDIO_DATASET.

Getting Started

After connecting the integration, run the following in your Next.js project:

npx sanity@latest init --dataset production --typescript --template clean

This installs next-sanity, configures your Sanity client, and embeds Sanity Studio at /studio in your app.

When prompted:

  • Select the Sanity project you connected to your Vercel project
  • Select **Yes

Starter Templates

View all templates
Get started with Vercel and Sanity today.
A Sanity-powered blog with native content editing and instant previews.