Sanity llms.txt · AI Docs Browser · mdream

[llms.txt Tools](https://mdream.dev/llms-txt/sanity/llms-txt)

# Sanity llms.txt

Browse Sanity documentation as markdown. Click any page in the sidebar to view it, or copy the full llms.txt for your AI tools.

www.sanity.io/llms.txt

[Raw llms.txt](https://www.sanity.io/docs/llms.txt) [Raw llms-full.txt](https://www.sanity.io/llms-full.txt)

Copy Markdown [](https://www.sanity.io/llms.txt)

llms.txt

Docs

Manage Sanity with code

Blueprints introduction

Project layout and monorepos

Promote a stack to organization scope

Deploy Blueprints from CI

Deploy Blueprints with GitHub Actions

Define a webhook with Blueprints

Define a CORS origin with Blueprints

Define a robot token with Blueprints

Define a role with Blueprints

Blueprint configuration reference

Blueprints CLI command reference

Deploy custom functions to automate content operations

Functions

Create a Document Function

Create a Media Library Asset Function

Create a Sync Tag Invalidate Function

Create a Scheduled Function

Manage function dependencies

Testing functions locally

Configure @sanity/client in Functions

Add environment variables to functions

Using robot tokens with Functions

Functions cheat sheet

Function handler reference

Functions CLI command reference

Canvas

Introduction to Canvas

Writing in Canvas

Keyboard shortcuts

Working with templates

Troubleshooting Canvas

Configure Canvas for your content

Build with AI

Get started

Sanity MCP server

Agent Skills

Sanity Context

Add insights to Sanity Context

Sanity Context patterns and best practices

Content Agent API

Install and configure Sanity AI Assist

HTTP API Reference

Actions API reference

Assets API reference

Copy API reference

Backups API reference

Doc API reference

Export API reference

History API reference

Jobs API reference

Listen API reference

Live Content API reference

Mutation API reference

Query API reference

Scheduling API reference

Webhooks API reference

Agent Actions

Embeddings Index API reference

Content Agent API reference

Media Library API reference

Applications API Reference

Access API reference

Projects API reference

Roles API reference

User attributes API reference

Activity Log API Reference

Libraries and tooling

Embeddings Index CLI reference

Specifications

GROQ syntax

GROQ data types

GROQ parameters

GROQ operators

GROQ functions reference

GROQ pipeline components

GROQ joins

Function handler reference

Blueprint configuration reference

Visual Editing

Visual editing

Visual Editing with Next.js App Router

Visual Editing with Next.js Pages Router

Visual Editing with Nuxt

Visual Editing with SvelteKit

Visual Editing with React Router/Remix

Visual Editing with React Native

Visual Editing with Astro

Visual editing architecture overview

Configuring the Presentation Tool

Client setup and stega for visual editing

Implementing draft mode

Live preview content updates

Overlays and click-to-edit

Build a complete visual editing integration

Custom overlay components and controls

Customizing preview header and navigation

Enabling drag and drop for Visual Editing

Create Studio edit intent links

Presentation Resolver API

useOptimistic

Content Source Maps

Vercel protection bypass

Troubleshooting Visual Editing

Integrate Sanity with your Astro app

Sanity and Astro

Configuring @sanity/astro

Embedding Sanity Studio in Astro

Querying content in Astro

Images and Portable Text in Astro

Static and server rendering in Astro

Visual Editing with Astro

Sanity CLI

CLI Configuration

Backups CLI command reference

Blueprints CLI command reference

Build CLI command reference

Codemod CLI command reference

CORS CLI command reference

Datasets CLI command reference

Debug CLI command reference

Deploy CLI command reference

Dev CLI command reference

Docs CLI command reference

Documents CLI command reference

Exec CLI command reference

Functions CLI command reference

GraphQL CLI command reference

Help CLI command reference

Hooks CLI command reference

Init CLI command reference

Install CLI command reference

Learn CLI command reference

Login CLI command reference

Logout CLI command reference

Manage CLI command reference

Manifest CLI command reference

MCP CLI command reference

Media CLI command reference

Migrations CLI command reference

OpenAPI CLI command reference

Preview CLI command reference

Projects CLI command reference

Schemas CLI command reference

Start CLI command reference

Telemetry CLI command reference

TypeGen CLI command reference

Undeploy CLI command reference

Users CLI command reference

Versions CLI command reference

Tokens CLI command reference

Skills

Store and query structured content

Technical limits

API Versioning

API CDN

Datasets

Documents

Drafts

IDs and paths

Perspectives for Content Lake

Attribute limit

How to use Hot Swapping for datasets

How to use Cloud Clone for datasets

Backups

Dataset Embeddings

Hierarchy

GROQ introduction

How GROQ queries work

Custom GROQ functions

GROQ query cheat sheet

Search text content with GROQ

The Vision plugin

GROQ syntax

GROQ feature support across Sanity

GraphQL

GROQ for GraphQL developers

Introduction to document mutations

Mutate documents with actions

Transactions

Patches

Document mutation patterns

Assets

Upload, query, and delete assets

Image metadata

Image transformations

International Image Interoperability Framework (IIIF) API reference

Importing data

Restore a deleted dataset from a backup

Migrating your schema and content

Content migration cheat sheet

Important considerations for schema and content migrations

Schema validation and the Content Lake

Presenting and previewing content

Live Content API

Real-time updates

GROQ-powered webhooks

Webhook Best Practices

Webhooks API reference

Embeddings index introduction

Create and query an embeddings index

Embeddings Index CLI reference

Embeddings Index API reference

Access your data (CORS)

CORS and browser security

Keeping your data safe

Activity Feed

Roles and permissions

Build a custom role with the Access API

Roles

Common Sanity document types

URL format

Authentication and tokens

JSONMatch

IP addresses used by Sanity

Setting up your studio

Defining a schema

Displaying content in Next.js

Deploying Studio and inviting editors

Administer organizations, projects, datasets, and users

Platform terminology

Plans and payments

Projects, organizations, and billing

Understanding the Growth plan trial

Extending the Growth plan with paid add-ons

Sanity's non-profit plan

How AI Credits work

Activity Feed

Request logs

Request tags

Request logs data reference

User Guides

Meet the Dashboard

Content operators quick start guide

Comments for Sanity Studio

Tasks for Sanity Studio

Copy and paste fields

Preview and page building

Content Releases user guide

Compare document versions

History experience

Create and run instructions with AI Assist

Common instructions for AI Assist

Media Library quick start guide

Meet the library

Introduction to Canvas

Content mapping for Canvas

Roles

Content Agent quick start guide

Setting up your studio

Defining a schema

Querying content with GROQ

Displaying content in an Astro front end

Deploying Studio and inviting editors

Agent Actions

Agent Actions introduction

Operations

Targets and paths

Creating instructions

Agent Actions patterns

Enable references in Generate

Create images with Agent Actions

Enable dates and datetimes in Agent Actions

Generate quick start

Generate cheat sheet

Translate quick start

Translate cheat sheet

Transform quick start

Transform cheat sheet

Prompt quick start

Patch quick start

Setting up your studio

Defining a schema

Querying content with GROQ

Deploying Studio and inviting editors

Dashboard

Meet the Dashboard

Set up and configure Dashboard

Integrate Sanity with your Next.js app

Sanity and Next.js

Configuring the Sanity client for Next.js

Embedding Sanity Studio in Next.js

Querying content in Next.js

Rendering images in Next.js with next-sanity

Add live content to your application

Caching and revalidation in Next.js

Sanity Live with Next.js Cache Components

Validating Sanity webhooks in Next.js

Visual Editing with Next.js App Router

Visual Editing with Next.js Pages Router

Setting up your studio

Defining a schema

Querying content with GROQ

Displaying content in a Nuxt.js front end

Deploying Studio and inviting editors

APIs and SDKs

Introduction to schemas

Naming things

Attribute limit

Schema

Schema Deployment

Create an aspect

Getting started with @sanity/client

Querying content with @sanity/client

Creating and updating documents with @sanity/client

Working with assets in @sanity/client

Creating transactions with @sanity/client

Deleting documents with @sanity/client

Content releases and versions with @sanity/client

Listening to content updates with @sanity/client

Request tags for filtering logs in @sanity/client

Advanced client patterns with @sanity/client

Command Line Interface (CLI)

CLI authentication

Importing data

CLI Configuration

Backups

Sanity TypeGen

Content Releases API

Content Release API Cheat Sheet

Presenting images

Image transformations

Image metadata

International Image Interoperability Framework (IIIF) API reference

Asset CDN

Sanity Connect for Shopify

Custom sync handlers for Sanity Connect

Sanity Connect for Shopify - Reference

Sanity Connect for Salesforce Commerce Cloud

Sanity Connect for SFCC configuration reference

Content Agent API

Content Agent

Get started with Sanity Content Agent

How AI Credits work

Content Agent for Slack

Content Agent API

Build custom applications on Sanity

App SDK Quickstart Guide

App SDK introduction

Installation

Configuration

App SDK deployment

Document Handles

React Hooks

React Suspense

Authentication with the App SDK

App SDK best practices

Fetching and handling content

Editing documents

Using Sanity UI with the App SDK

Using Tailwind with the App SDK

App SDK and TypeGen

Editorial Workflows

Studio

Installation

Studio project structure

Studio development

Hosting and deployment

Embedding Sanity Studio

Upgrading Sanity Studio

Environment variables

Using TypeScript in Sanity Studio

Understanding the latest version of Sanity

System requirements

Configuration

Workspaces

Schemas and forms

Conditional fields

Field groups

List previews

Connected content

Validation

Initial Value Templates

Cross-dataset references

Sort orders

Incoming reference decoration

Block Content

Configure the Portable Text Editor

Customize the Portable Text Editor

Create a Portable Text behavior plugin

Add Portable Text Editor plugins to Studio

Common Portable Text Editor patterns

Studio customization

Custom components for Sanity Studio

Custom authentication

Custom asset sources

Introduction to Custom Diff Components

Form components

How form paths work

Icons

Favicons

Localizing Sanity Studio

New Document Options

Studio components

Studio search configuration

Focus and UI state in custom inputs

From input components to real-time safe patches

Sanity UI

Studio Tools

Create a custom Studio tool

Tools cheat sheet

Theming

The Dashboard tool for Sanity Studio

Installing and configuring widgets

Document actions

Release Actions

Custom document badges

Localization

Content Releases Configuration

Enable and configure Comments

Configuring Tasks

Scheduled drafts

Scheduled publishing (deprecated)

Manage Studio notifications

Structure tool and Structure builder

Get started with Structure Builder API

Set up Structure Builder to override the default list view

Create a link to a single edit page in your main document type list

Manually group items in a pane

Dynamically group list items with a GROQ filter

Create custom document views with Structure Builder

Structure Builder cheat sheet

Structure tool

Structure Builder API Reference

Studio Plugins

Installing and configuring plugins

Developing plugins

Publishing plugins

Internationalizing plugins

Plugins API

Install and configure Sanity AI Assist

Content translation with AI Assist

Custom field actions

Field action patterns

Comments for Sanity Studio

Tasks for Sanity Studio

Copy and paste fields

Compare document versions

Content Releases user guide

Scheduled drafts user guide

View incoming references

Sanity Studio keyboard shortcuts

Schema

Array

Block

Boolean

Cross Dataset Reference

Date

Datetime

Document

File

Geopoint

Global Document Reference

Image

Number

Object

Reference

Slug

Span

String

Text

URL

Asset Source API

Configuration API

Document API

Document Badges API

Document Actions reference

Form API

Form components API reference

Studio React Hooks

Structure Tool API

Studio components reference

Studio tools reference

Initial Value Templates API reference

Help and troubleshooting

Array contains multiple types that resolve to the same JSON type

Studio Performance Issues Caused by legacy HTTP protocols

Error: Value of type "object" is not allowed in this array field

AVIF

Experimental feature: Spaces

Client API CDN configuration

Total attribute count exceeds limit

Desk is now Structure

Invalid configuration for cross dataset reference

Missing or duplicate context error

React Compiler and Sanity

Specify API version for studio client

Why give schema types a title?

Array type has a invalid value for property "of"

React 19 and Sanity

Schema: Lift anonymous object types

Reference type has a invalid value for property "to"

Incorrect location for reference options

Invalid part syntax

Asset metadata field

Warning: userStore.currentUser is deprecated

CLI errors

Renamed plugin sanity-plugin-vision

Part name format

Array member type name is the same as a global type

Changes in block schema customization properties

How to migrate from date to richDate

Invalid shape of predefined choices

JS Client: Promise Polyfill

Introducing the document type

Unable to get a ref to an input component

Outdated modules

Upgrade studio packages

Block Content rendering: Image materializing

Structure: Document schema type required

Parts: Declare vs implement

Incorrect options declaration in reference

Block type cannot be used outside of array

Structure: Node ID required

Structure: List items must be an array

Installing Node.js

Structure: Action or intent required

Object type has a invalid value for fields

studioHost and externalStudioHost properties deprecated

Schema type is ES Module but imported through require

Structure: Invalid list item

Structure: Query provided where filter is expected

Structure: List item IDs must be unique

Given type name is a reserved type

Structure: Schema type not found

API versioning

Migrating the legacy webhook behavior to GROQ-powered Webhooks

Schema type is invalid

Input component is missing a required prop

Structure: Title is required

Structure: Filter is required

Import: Asset file does not exist

Input component is missing a required method

Implementing non-overridable part

Structure: Item returned no child

How to migrate your block text schema for the new definition of inline objects

Structure: Schema type is required

How to migrate from blocks spans to block children

Array type cannot contain array member

Using tokens in the browser

GraphQL

Array member type name conflicts with built-in type

Source vs. compiled paths

Import: Asset has different target than source

Using global studio client without specifying API version

Structure: Action and intent are mutually exclusive

Upgrade React

Plugin is missing a sanity.json file

Structure: Document ID required

Incompatible combination of params and filter

Using listener with tokens is not supported in browsers

Schema type is missing a required property

API versioning in Javascript Client

Upgrade version of studio package

Slug: slugifyFn renamed

Renamed plugin @sanity/date-input

Specify API version when using custom document list filters

Function Timeout

Functions rate limit

Configuring typegen in Sanity CLI config

Studio v3 to v4

Email addresses show [email protection]

Next.js 16 and SanityLive: avoiding request overages

A very short introduction

Quickstart: AI coding agents

Quickstart: AI app builders

Setting up your studio

Defining a schema

Querying content with GROQ

Displaying content in a React Router front end

Deploying Studio and inviting editors

Media Library

Media Library introduction

Meet the library

Asset Versions

Configure your studios and CLI to use Media Library

Create an aspect

Add an aspect to an asset

Query aspects

Aspect patterns

Importing assets to Media Library

Upload assets programmatically

Folders

Link assets to documents

Asset visibility

Container URLs

Working with video

Migrate assets from Media Plugin to Media Library

Media Library API reference

Media CLI command reference

Media Library limits and usage details

Developer guides

Get started

Paginating with GROQ

High-performance GROQ

Setting up single sign-on with SAML

Third-Party Login (Deprecated)

Set up SSO authentication with SAML and Azure/Entra ID

Set up SSO authentication with SAML and PingIdentity

Set up SSO authentication with SAML and JumpCloud

Reconcile users against internal systems

Restrict Access to Specific Documents

Setting up a Default Relay State for IdP Initiated - SAML Logins

Scalable navigation patterns

An opinionated guide to Sanity Studio

Browsing Content How You Want with Structure Builder

Deciding on fields and relationships

Create richer array item previews

Dynamic folder structure using the currentUser and workflow states

Create a time duration object field

Level up Your Edit Modal with Next/Previous Navigation Buttons for Array Items

Create a “coupon generator” string field input

Managing redirects with Sanity

Create a document form progress component

Create an array input field with selectable templates

Creating a Parent/Child Taxonomy

Create interactive array items for featured elements

Create a visual string selector field input

Create a survey rating number field input

How to use structured content for page building

Create a recycling bin for deleted documents via Sanity Functions

Add live content to your application

Forms with Sanity

Vercel integration

Build your blog with Astro and Sanity

How to implement front-end search with Sanity

Displaying Sanity content in Shopify

Sanity Connect for Shopify

Custom sync handlers for Sanity Connect

Cookie consent integrations with Sanity

Integrating external data sources with Sanity

Build email marketing campaigns with Sanity and Klaviyo

Developing with Next.js on GitHub Codespaces

Add analytics to Sanity Studio

How to pitch Sanity.io to your team

Sanity's non-profit plan

Agencies: Navigating the Spring 2025 Organization Changes

How to generate massive amounts of demo content for Sanity

How to implement Multi-tenancy with Sanity

GROQ-Powered Webhooks – Intro to Filters

GROQ-Powered Webhooks – Intro to Projections

Presenting Portable Text

Add Inline blocks for the Portable Text Editor

Beginners guide to Portable Text

How to add custom YouTube blocks to Portable Text

Converting Inline Styles to Sanity Block Decorators

Adding things to Portable Text - From block content schema to React component

Change the height of a Portable Text Editor (PTE) using a custom input component

Create your own Sanity template

Community Code of Conduct

Migrating plugins to support Content Releases

Getting started with Sanity

A very short introduction

What is AI-powered content operations?

Quickstart: AI coding agents

Quickstart: AI app builders

## What is Sanity's llms.txt?

Sanity publishes an `/llms.txt` file that provides AI systems with a structured index of its documentation. It follows the [llms.txt specification](https://llmstxt.org), organizing links to guides, API references, and tutorials under section headings so that LLMs like ChatGPT, Claude, and Gemini can quickly understand what Sanity offers and where to find details.

Issues

Spec

1

Sections

656

Links

114.1 KB

Size

~29.2k

Tokens

Sections: Docs

## Add Sanity Docs to Your AI Assistant

Select your tool to see how to add Sanity's llms.txt as a documentation source.

Cursor

 Windsurf

 Claude Code

 ChatGPT

 Zed

 Copilot

1. 1

   Open any chat or composer panel
2. 2

   Type @Docs and select "Add new doc"
3. 3

   Paste the URL: https://www.sanity.io/llms.txt
4. 4

   Wait for the green dot (indexing complete)
5. 5

   Reference @Docs in chat when asking about Sanity

Cursor crawls the URL and indexes all subpages. Add a trailing slash to index child pages too.

## Spec Compliance 31 errors

## Frequently Asked Questions

Where is Sanity's llms.txt file?

Sanity publishes its llms.txt at https://www.sanity.io/llms.txt. This file provides a structured, markdown-formatted index of Sanity's documentation that AI systems can consume to understand the project's APIs, guides, and references.

How do I use Sanity's llms.txt with AI coding assistants?

Copy the llms.txt content and paste it into your AI assistant (Cursor, Windsurf, Claude, ChatGPT) as context. This gives the AI an accurate map of Sanity's documentation so it can provide better code suggestions and answers about Sanity.

What does Sanity's llms.txt contain?

Sanity's llms.txt contains 1 sections and 656 documentation links in 114.1 KB (~29.2k tokens). Key sections include Docs.

How many tokens does Sanity's llms.txt use?

The concise llms.txt index is approximately 29.2k tokens (114.1 KB). Most AI assistants can fit this within their context window. For the full expanded documentation, look for an llms-full.txt variant which embeds all content inline.

What is Sanity?

The Composable Content Cloud. Sanity's llms.txt file helps AI systems understand this by providing a structured overview of its documentation, making it easier for developers to get accurate AI-assisted help when working with Sanity.

Can I generate an llms.txt for my own project?

Yes. Use the free llms.txt generator at mdream.dev/tools/llms-txt/generator to crawl your site and produce a spec-compliant llms.txt file. You can also validate existing files with the llms.txt validator.

## Browse More llms.txt Files

[Tauri Build tiny, fast binaries for all major desktop and mobile platforms](https://mdream.dev/llms-txt/sanity/llms-txt/tauri) [Payload The best way to build a modern backend + admin UI](https://mdream.dev/llms-txt/sanity/llms-txt/payload) [Cursor The AI code editor](https://mdream.dev/llms-txt/sanity/llms-txt/cursor) [AWS Amazon Web Services documentation](https://mdream.dev/llms-txt/sanity/llms-txt/aws) [Linear A purpose-built tool for planning and building products](https://mdream.dev/llms-txt/sanity/llms-txt/linear) [Docker Container platform for developers](https://mdream.dev/llms-txt/sanity/llms-txt/docker) [PostHog Open-source product analytics platform](https://mdream.dev/llms-txt/sanity/llms-txt/posthog) [Expo An open-source React Native framework](https://mdream.dev/llms-txt/sanity/llms-txt/expo)

[View all 99 projects ](https://mdream.dev/llms-txt/sanity/llms-txt)

## Related Tools

[<h3>llms.txt Generator</h3>Generate an llms.txt for your own project.](https://mdream.dev/llms-txt/sanity/tools/llms-txt/generator) [<h3>llms.txt Validator</h3>Validate your llms.txt against the official spec.](https://mdream.dev/llms-txt/sanity/tools/llms-txt/validator)

© 2026 [Harlan Wilton](https://github.com/harlan-zw) · [MIT](https://github.com/harlan-zw/mdream/blob/main/license)

[GitHub](https://github.com/harlan-zw/mdream) [Discord](https://discord.com/invite/275MBUBvgP)