Sanity

sanity.io
Websites

Sanity is a Content Operating System for the AI era. It provides the structured foundation, automation layer, and agentic context companies need to move…

llms.txt

Sanity

Sanity is a Content Operating System for the AI era. It provides the structured foundation, automation layer, and agentic context companies need to move faster, work smarter, and power every content experience—from websites to AI agents.

Docs

Blueprints

Functions

Canvas

  • Canvas: A place to author content that embraces the creative process and helps you deliver better and faster with seamless hand-off to your front end. Work with templates, an AI ghostwriter, and map content back to Studio.
  • Introduction to Canvas: A familiar writing tool that understands your content structure, so content can flow directly into the right Studio fields with a single click.
  • Writing in Canvas: Write and collaborate in Canvas with AI assistance, contextual notes, and real-time collaboration.
  • Keyboard shortcuts: Reference for Canvas keyboard shortcuts covering text formatting, document navigation, text selection, document management, collaboration, and Canvas-specific features.
  • Working with templates: Create reusable Canvas templates with pre-configured content types and field labels for repeatable content workflows.
  • Troubleshooting Canvas: Common issues writers run into when using Canvas, with suggested fixes.
  • Configure Canvas for your content: Make your Studio schema available in Canvas and configure how it surfaces to writers.

Build with AI

  • Build with AI: AI-powered tools to enhance your content and development workflows.
  • Get started with AI-powered Sanity development: Set up the Sanity Agent Toolkit and MCP server to help AI assistants generate high-quality Sanity code that follows established best practices.
  • Sanity MCP server: Connect AI to Sanity via MCP. Learn to install the server, link your IDE, and safely query or update content through developer and editor endpoints.
  • Agent Skills: Understand and use agent skills to help AI assistants generate high-quality Sanity code that follows established best practices.
  • Sanity Context: Sanity Context is a hosted Model Context Protocol (MCP) server that gives AI agents structured, read-only access to a Sanity dataset.
  • Add insights to Sanity Context: Sanity Context insights tracks and analyzes your agent conversations
  • Content Agent API: Build custom integrations with the Sanity Content Agent API.
  • Install and configure Sanity AI Assist: How to install and configure the AI Assist plugin for Sanity Studio.

HTTP API Reference

Libraries

  • Libraries and tooling: Integrate your content with applications and front end frameworks. Use specialized tooling for customization and working with content as data.
  • Embeddings Index CLI reference: Reference documentation of the Sanity Embeddings Index CLI to create and manage embeddings indexes for your content.

Specifications

Visual Editing

  • Visual Editing: Visual Editing lets content creators see their changes live and edit content directly from the webpage. Think of it as a bridge between your Sanity Studio and your website. Your content team can view drafts, click and drag elements to edit them, and see changes in real-time.
  • Visual editing: Framework quickstarts, a framework-agnostic conceptual series, and task-focused guides for specific features.
  • Visual Editing with Next.js App Router: Set up visual editing between Sanity Studio and a Next.js App Router frontend, including the Sanity client, Draft Mode, Visual Editing, and Live Content.
  • Visual Editing with Next.js Pages Router: Get started with Sanity Visual Editing in a new or existing Next.js application using the Pages Router.
  • Visual Editing with Nuxt: Get started with Sanity Visual Editing in a new or existing Nuxt application.
  • Visual Editing with SvelteKit: Get started with Sanity Visual Editing in a new or existing SvelteKit application.
  • Visual Editing with React Router/Remix : Get started with Sanity Visual Editing in a new or existing React Router (Remix) application.
  • Visual Editing with React Native: Get started with Sanity Visual Editing in a new or existing React Native application using the Sanity React Loader.
  • Visual Editing with Astro: Configure Sanity’s Presentation Tool, draft mode, and visual editing overlays to work with an Astro 6 server-rendered frontend.
  • Visual editing architecture overview: Understand how Sanity's visual editing works across six architectural layers: content source maps, stega encoding, overlays, live updates, preview mode, and the Presentation Tool.
  • Configuring the Presentation Tool: Configure the Presentation Tool: previewUrl, document location resolvers, allowed origins, components, and navigation for multi-environment setups.
  • Client setup and stega for visual editing: Configure the Sanity client for visual editing: stega encoding, Content Source Maps, perspectives, and secure token handling.
  • Implementing draft mode: Implement secure draft mode from scratch using @sanity/preview-url-secret and standard Web APIs, with draft mode cookies, validation, and framework-agnostic endpoints.
  • Live preview content updates: Build real-time content updates using the core-loader, Fetcher interface, enableLiveMode(), and the Live Content API for progressive enhancement.
  • Overlays and click-to-edit: Enable overlays with enableVisualEditing(), understand the five content detection methods, integrate your router, and handle refreshes when content changes.
  • Build a complete visual editing integration: Build a complete framework-agnostic visual editing integration step-by-step with Vite and a Node.js HTTP server.
  • Custom overlay components and controls: Visual editing overlays can be extended with custom React components for direct in-app content editing and displaying content metadata.
  • Customizing preview header and navigation: Learn to customize the preview header in Sanity Studio's Presentation tool, enabling users to interact with overlays and toggle features.
  • Enabling drag and drop for Visual Editing: Core concepts for enabling drag and drop functionality within the Presentation tool
  • Create Studio edit intent links: Learn how to construct URLs that open specific documents and fields in Sanity Studio for custom editorial interfaces and preview environments.
  • Presentation Resolver API: Programatically generate shortcuts from document forms to relevant routes in the Presentation tool
  • useOptimistic: Instantly update UI with mutation results created directly in an application whilst awaiting updated content from Content Lake.
  • Content Source Maps: Content source maps allow tools to annotate content with metadata and use it to connect tools to content.
  • Vercel protection bypass: Bypass protection for automation is a Vercel feature for bypassing authenticated deployments. It requires additional setup to use with Presentation and Studio.
  • Troubleshooting Visual Editing

Use Sanity with Astro

  • Integrate Sanity with your Astro app: Astro and Sanity pair to offer fast static pages, visual editing, and the flexibility to build with components from a variety of frameworks.
  • Sanity and Astro: Build content-driven Astro websites with Sanity. Covers the @sanity/astro integration, Visual Editing, Portable Text, image handling, and starter resources.
  • Configuring @sanity/astro: Reference for Sanity integration configuration in Astro. Covers integration options, the sanity:client virtual module, environment variables, and more.
  • Embedding Sanity Studio in Astro: Mount Sanity Studio as a route in your Astro application. Covers studioBasePath configuration, CORS setup, multiple workspaces, and known issues.
  • Querying content in Astro: Fetch Sanity content in Astro with GROQ queries. Covers basic fetching, dynamic routes, TypeGen, parameterized queries, and the loadQuery helper
  • Images and Portable Text in Astro: Render Sanity images with @sanity/image-url and rich text with astro-portabletext in your Astro components.
  • Static and server rendering in Astro: Choose the right rendering mode for your Astro + Sanity project.
  • Visual Editing with Astro: Configure Sanity’s Presentation Tool, draft mode, and visual editing overlays to work with an Astro 6 server-rendered frontend.

CLI reference

Content Lake (Datastore)

Next.js quick start

Platform management

User guides

Astro quick start

  • Setting up your studio: Quickstart for getting up and running with Sanity from scratch.
  • Defining a schema: The Sanity Studio can only interact with documents in a dataset for which it has schema types registered in its configuration. It currently has none.
  • Querying content with GROQ: Content from Sanity is typically fetched as JSON from your hosted dataset using the GROQ query language.
  • Displaying content in an Astro front end: You’ve configured your Studio with a post document type and learned how to query from your hosted dataset. Before deploying the Studio, let’s query and display this content on the front-end framework of your choice.
  • Deploying Studio and inviting editors: Your Sanity Studio is still only running on your local computer. It's time to deploy and get it into the hands of other content editors.

Agent Actions

Sanity Studio quick start

  • Setting up your studio: Quickstart for getting up and running with Sanity from scratch.
  • Defining a schema: The Sanity Studio can only interact with documents in a dataset for which it has schema types registered in its configuration. It currently has none.
  • Querying content with GROQ: Content from Sanity is typically fetched as JSON from your hosted dataset using the GROQ query language.
  • Deploying Studio and inviting editors: Your Sanity Studio is still only running on your local computer. It's time to deploy and get it into the hands of other content editors.

Dashboard

  • Dashboard: The dashboard is your one-stop content operations hub. All your organization's studios and custom apps in one shared space.
  • Meet the Dashboard: The central hub for all your content operations.
  • Set up and configure Dashboard: Get started with Sanity Dashboard, the central hub of all your content operations.

Use Sanity with Next.js

Nuxt.js quick start

  • Setting up your studio: Quickstart for getting up and running with Sanity from scratch.
  • Defining a schema: The Sanity Studio can only interact with documents in a dataset for which it has schema types registered in its configuration. It currently has none.
  • Querying content with GROQ: Content from Sanity is typically fetched as JSON from your hosted dataset using the GROQ query language.
  • Displaying content in a Nuxt.js front end: You’ve configured your Studio with a post document type and learned how to query from your hosted dataset. Before deploying the Studio, let’s query and display this content on the front-end framework of your choice.
  • Deploying Studio and inviting editors: Your Sanity Studio is still only running on your local computer. It's time to deploy and get it into the hands of other content editors.

APIs and SDKs

Content Agent

  • Content Agent: Sanity Content Agent is an AI assistant that helps you work with content across your Sanity projects—without writing code or GROQ queries.
  • Get started with Sanity Content Agent: Sanity Content Agent is an AI assistant that helps you work with content across your Sanity projects.
  • How AI Credits work: Understand how AI credits are consumed and billed for Sanity AI tooling.
  • Content Agent for Slack: Use the Sanity Content Agent directly in Slack. Search, create, and update content in your Sanity projects through conversation, without leaving your workspace.
  • Content Agent API: Build custom integrations with the Sanity Content Agent API.

App SDK

  • Build custom applications on Sanity: Create tailored content applications with our App SDK, providing the tools needed to build custom interfaces and workflows on top of the Sanity platform.
  • App SDK Quickstart Guide: Get up and running quickly with the Sanity App SDK by following this step-by-step guide!
  • App SDK introduction: Get a high-level intro to the Sanity Software Development Kit (SDK)
  • Installation: Learn how to bootstrap a new custom application using the Sanity SDK.
  • Configuration: Learn how to connect your custom app to your Sanity content
  • App SDK deployment: Learn how to deploy your custom application to your organization dashboard.
  • Document Handles: Document Handles are a central concept in the Sanity App SDK, and are important to understand when working with many of the SDK’s React hooks.
  • React Hooks: Meet some of the most important hooks from the React SDK package.
  • React Suspense: Learn how the Sanity App SDK uses established React patterns to facilitate working with live content.
  • Authentication with the App SDK: Learn about the mechanisms that enable authentication when building with the App SDK.
  • App SDK best practices: Opinionated patterns and guidance for building custom apps with the Sanity App SDK
  • Fetching and handling content: Learn about the central concepts and hooks for pulling content from your Sanity project into your custom app.
  • Editing documents: Explore different methods and patterns for editing documents with the App SDK.
  • Using Sanity UI with the App SDK: How to integrate @sanity/ui, or any other UI library, in your app.
  • Using Tailwind with the App SDK: Learn how to use Tailwind in your custom apps built on Sanity, powered by the App SDK.
  • App SDK and TypeGen: Learn how to use Sanity TypeGen with the App SDK for increased type safety and improved developer experience.

Studio

  • Studio: Sanity Studio is an open-source, real-time collaborative content workbench where developers define content models using JavaScript objects. The Studio automatically generates a powerful editing environment based on these definitions, while offering extensive customization options through a React-based framework to tailor the editorial experience to your specific workflows.
  • Installation: How to install and initiate a new Sanity Studio project
  • Project Structure: The file structure of a typical Sanity Studio project
  • Development: Learn how the default local development environment for Sanity Studio works
  • Hosting and deployment: How to deploy Sanity Studio, either on your own or using our hosted service.
  • Embedding Sanity Studio
  • Upgrading Sanity Studio: How to upgrade Sanity Studio
  • Environment Variables: You can use environment variables to dynamically configure the Studio depending on what context it‘s in.
  • Using TypeScript in Sanity Studio: How to use TypeScript with Sanity Studio
  • Understanding the latest version of Sanity: Learn about the latest features and improvements in the newest version of Sanity.
  • System requirements: Network, browser, and infrastructure requirements for running Sanity Studio in managed environments.
  • Configuration: Sanity Studio lets you quickly get up and running by configuring it with simple JavaScript or TypeScript.
  • Workspaces: Learn about working with multiple workspaces within a single studio setup
  • Schemas and Forms: Schemas are the main mechanism for describing your content and how to interact with it in the studio.
  • Conditional fields: How to make field visibility conditional, based on other fields' values or on information about the current user.
  • Field Groups: Organize your content editing experience by grouping fields together under tabs.
  • List Previews: Configure and customize how documents are displayed within Sanity Studio's document lists.
  • Connected Content: Structured content is connected. It's what enables reusing and repurposing the same chunk of content in different contexts, and it's how you enable your content to be treated as data. The Content Lake has some unique capabilities that make connected, structured content not only possible but pleasant to work with both programmatically through APIs and in the studio. This article aims to unpack how to use and think about references. While it has some technical language and concepts, you should be able to tag along, even if you aren't super familiar with JavaScript, JSON, or GROQ, our primary query language.
  • Validation: Describes how to validate documents within the content studio.
  • Initial Value Templates: Define an initial value for a new document created in Sanity Studio.
  • Cross Dataset References: All you need to know about creating references across datasets.
  • Sort Orders
  • Incoming reference decoration: Display incoming references directly in a document's form, without storing the data as part of the document.
  • Block Content: Block content allows you to create a rich text experience tailored to the needs of your content.
  • Configure the Portable Text Editor: Set up and configure the Portable Text Editor with decorators, annotations, and block content.
  • Customize the Portable Text Editor: Customization guidelines and examples to tailor the Portable Text editor to your needs.
  • Create a Portable Text behavior plugin: Use behavior plugins to add custom interactions to the Portable Text block editor in Studio.
  • Add Portable Text Editor plugins to Studio: Use official and community-built Portable Text Editor plugins in your studio.
  • Common Portable Text Editor patterns: This series of practical examples shows how to customize block content and the Portable Text Editor in Sanity Studio.
  • Studio customization: With Studio customization, you can transform the default editing experience into one that matches your team's needs.
  • Custom component for Sanity Studio: Change the look and feel of your studio and craft tailor-made editorial interactions.
  • Custom authentication: The Studio can be configured to use your own login solution rather than the standard ones by supplying the auth provider details in your studio configuration.
  • Custom asset sources: How to add custom asset sources for Sanity Studio.
  • Introduction to Custom Diff Components: Customizing how changes between two versions of a data structure are displayed within the Sanity Studio.
  • Form Components: The Form Components API lets you customize the look and feel of the fields in your studio individually, or at a root level that will affect every field in the studio.
  • How form paths work: Learn more about form paths, their structure, and their role as unique references to specific values in Sanity documents.
  • Icons: Use icons for types to display in the creation dialogue and when you're missing an media preview.
  • Favicons: A "favicon" appears in places such as browser tabs, URL field and browser bookmarks. Learn how to replace the default Sanity icon with your own.
  • Localizing Sanity Studio: Sanity Studio supports UI localization via plugins. Users can install languages, override translations, and contribute to localization.
  • New Document Options: Customize the new document creation experience for creators in Sanity Studio.
  • Studio Components: The studio components API allows you to customize the UI of your Sanity Studio.
  • Studio search configuration: Global search for Sanity Studio allows content search, can hide specific documents, and allows custom field weighting.
  • Focus and UI state in custom inputs: Learn more about handling UI disclosure elements. Manage focus and UI state in custom UI input elements.
  • From input components to real-time safe patches: Learn more about real-time safe patches, with recommendations to safely sync changes between front and back ends.
  • Sanity UI: Keep your custom studio elements consistent with built-in UI components.
  • Studio Tools: A tool is a top-level view in the Sanity Studio application that you can access through its menu bar.
  • Create a custom Studio tool: Add bespoke functionality to Studio with a custom tool.
  • Tools cheat sheet: Common code snippets to help customize the Studio tool experience.
  • Theming: Learn how to customize the styling and branding of your studio
  • The Dashboard tool for Sanity Studio: How to set up and configure the Dashboard tool for Sanity Studio
  • Installing and configuring widgets: How to install and configure widgets for the Dashboard tool for Sanity Studio
  • Document actions: Introduction to building custom document actions.
  • Release Actions: Create custom actions that display alongside the default Content Release actions.
  • Custom document badges: Introduction to implementing your own document badges.
  • Localization: Localize your content
  • Content Releases Configuration: Configure Content Releases in Sanity Studio
  • Enable and configure Comments: Learn how to enable and configure the Comments feature in Sanity Studio.
  • Configuring Tasks: Learn how to enable, configure, and use the Tasks feature in Sanity Studio for effective team collaboration on content creation.
  • Scheduled drafts: Scheduled drafts allows you to schedule single-document releases for a time in the future.
  • Scheduled publishing (deprecated): Schedule your content for future publication and organize upcoming releases – no custom tasks or serverless functions required!
  • Manage Studio notifications: Manage your Sanity Studio notifications from the user account settings page.
  • Structure tool and Structure builder: The Structure tool is included with Sanity Studio and allows you to customize the experience of creating, browsing, and managing documents.
  • Get started with Structure Builder API: This is an introduction to important concepts for the Structure Builder API.
  • Set up Structure Builder to override the default list view: In this article, we'll explore how to initialize Structure Builder and override the default title of the "Content" list.
  • Create a link to a single edit page in your main document type list: In this article, we'll explore how to add a link to a single document from the main document type list.
  • Manually group items in a pane: In this article, we'll manually group a few singleton "site setting" documents.
  • Dynamically group list items with a GROQ filter: In this article, we'll use the documentList() method to dynamically group documents with a GROQ filter.
  • Create custom document views with Structure Builder: In this article, we'll look at adding a custom document view to view the JSON data for our posts.
  • Structure Builder cheat sheet: The Structure Builder is a powerful – but complex – set of methods. There are a few commonly used methods which you are likely to need in your projects, and they are presented here in quick copy-and-paste friendly form.
  • Structure tool: Customize the document browsing and management experience in Sanity Studio with the Structure tool.
  • Structure Builder API Reference: Overview of different methods in the Structure Builder API
  • Studio Plugins: Plugins allow you to extend and customize Sanity Studio with additional functionality.
  • Installing and configuring plugins: Learn how to extend and customize Sanity Studio with plugins.
  • Developing plugins: Package plugins in a reusable and sharable way.
  • Publishing plugins: Publish a plugin for distribution
  • Internationalizing plugins: This article provides a guide for plugin authors to add localization capabilities to their Sanity Studio plugins.
  • Plugins API: Extend the capabilities of your studio using plugins
  • Install and configure Sanity AI Assist: How to install and configure the AI Assist plugin for Sanity Studio.
  • Content translation with AI Assist: How to set up and use AI Assist for content translations for documents and fields.
  • Custom field actions: Set up and use custom field actions in AI Assist to add Agent Actions or other custom actions to the document or field action menus.
  • Field action patterns: Examples and best practices for using AI Assist custom field actions.
  • Comments for Sanity Studio: Learn to use Comments in Sanity Studio for effective collaboration, including leaving comments, @mentions, and resolving comments.
  • Tasks for Sanity Studio: Learn to use Sanity Studio's tasks for collaboration, assign tasks, comment on tasks, and resolve tasks for efficient content creation.
  • Copy and paste fields: How to copy and paste fields and documents within your Sanity Studio.
  • Compare document versions: The document comparison view in Sanity Studio provides a side-by-side view of different document versions.
  • Content Releases user guide: Learn to use Content Releases to organize and schedule updates across multiple documents.
  • Scheduled drafts user guide: Learn to schedule individual drafts and browse scheduled drafts in the releases interface.
  • View incoming references: The incoming references interface displays documents that reference the active document.
  • Sanity Studio keyboard shortcuts: Complete reference guide to keyboard shortcuts in Sanity Studio for navigation, document editing, and tool-specific actions.
  • Schema: A schema describes the types of documents and fields editors may author in a Sanity Studio workspace.
  • Array: Schema type for arrays of other types.
  • Block: Schema type for block which provides a rich text editor for block content.
  • Boolean: Schema type reference for expressing truthy values.
  • Cross Dataset Reference: A schema type for referencing documents in another dataset within the same project.
  • Date: Schema type reference for the Date type.
  • Datetime: The schema type for expressing an exact date and time.
  • Document: Schema type reference for expressing documents.
  • File: Schema type reference for the File type.
  • Geopoint: Schema type reference for the geopoint type.
  • Global Document Reference: Schema type reference documentation for Global Document References.
  • Image: Schema type for uploading, selecting, and editing images.
  • Number: Schema type reference for the Number type.
  • Object: Schema type to create custom types to use in a document.
  • Reference: A schema type for referencing other documents.
  • Slug: A schema type for slugs is typically used to create unique URLs.
  • Span: Schema type reference for the Span type.
  • String: A schema type for strings and a selectable lists of strings.
  • Text: Schema type reference for the Text type.
  • URL: Schema type reference for the URL type.
  • Asset Source API: As part of the Form API you can define custom asset sources for both file and image inputs.
  • Configuration API: The Configuration API in Sanity Studio v3 is the primary mechanism that allows you to customize the studio.
  • Document API: The document configuration API enables adding actions/badges to your studio, setting defaults for new documents, and defining a URL resolver.
  • Document Badges API: Reference documentation for the document badges.
  • Document Actions reference: Add custom operations to documents.
  • Form API: The form API lets you customize the rendering of form components and specify options for asset sources in your studio.
  • Form Components: The Form Components API will let you override default form widgets with your own custom components.
  • Studio React Hooks: The sanity package provides utility hooks for creating custom components in your studio, with a variety of available hooks.
  • Structure Tool API: How to use the Structure Tool API to configure your structure tool(s).
  • Studio Components Reference: The Studio Components API lets you override parts of the Studio UI with custom React components.
  • Studio tools reference: A Studio Tool is a top-level view that you can access through the menu bar.
  • Initial Value Templates: Reference documentation for the Initial Value Templates API.

Help articles

Developer Documentation

  • A very short introduction: Sanity is The Content Operating System for the AI era—the intelligent backend for companies building AI content operations at scale.

React Router (Remix) quick start

  • Setting up your studio: Quickstart for getting up and running with Sanity from scratch.
  • Defining a schema: The Sanity Studio can only interact with documents in a dataset for which it has schema types registered in its configuration. It currently has none.
  • Querying content with GROQ: Content from Sanity is typically fetched as JSON from your hosted dataset using the GROQ query language.
  • Displaying content in a React Router front end: You’ve configured your Studio with a post document type and learned how to query from your hosted dataset. Before deploying the Studio, let’s query and display this content on the front-end framework of your choice.
  • Deploying Studio and inviting editors: Your Sanity Studio is still only running on your local computer. It's time to deploy and get it into the hands of other content editors.

Media Library

Developer guides

  • Developer guides: Official implementation guides from the Sanity team
  • Get started with AI-powered Sanity development: Set up the Sanity Agent Toolkit and MCP server to help AI assistants generate high-quality Sanity code that follows established best practices.
  • Paginating with GROQ: Learn efficient pagination in GROQ using cursor-based filtering instead of array slicing. Covers tiebreakers for non-unique fields and batch processing.
  • [High perfo

… [truncated — open the raw llms.txt above for the full file]

Related

llmtxt.app – AI SEO & Search Engine Optimization Directory

/llms.txt
635 tokens
/llms-full.txt
2,429 tokens
Websites

A proposal to standardise on using an /llms.txt file to provide information to help LLMs use a website at inference time.

/llms.txt
318 tokens
Websites

/llms.txt
33,874 tokens
/llms-full.txt
3,770,473 tokens
Websites

/llms.txt
1,164 tokens
/llms-full.txt
1,167 tokens
Websites

About Matt Rickard.

/llms.txt
515,931 tokens
/llms-full.txt
515,931 tokens
Websites

/llms.txt
628 tokens
Websites

Evan Boehs — personal website.

/llms.txt
265 tokens
Websites

This very website you're looking at right now!

/llms.txt
48 tokens
Websites