Sanity
sanity.io
WebsitesSanity 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
- Manage Sanity with code: Blueprints let you have infrastructure-as-code level management for your Sanity resources.
- Blueprints introduction: Learn what Blueprints are, how they work, and how to get started.
- Project layout and monorepos: Lay out a Sanity project so Blueprints, Functions, and your application code coexist cleanly in monorepos.
- Deploy Blueprints with GitHub Actions: Use the official action to deploy your blueprints with GitHub Actions.
- Define a webhook with Blueprints: Blueprints allow you to define and manage your webhooks in code, then deploy them in a predictable manner.
- Define a CORS origin with Blueprints: Blueprints allow you to define and manage your CORS origins in code, then deploy them in a predictable manner.
- Define a robot token with Blueprints: Blueprints allow you to create robot tokens alongside other resources for use in the blueprint.
- Define a role with Blueprints: Use Blueprints to define a custom role in code alongside your project's other resources.
- Promote a stack to organization scope: Learn how to promote an existing project-scoped blueprint stack to organization scope to unlock scheduled functions.
- Blueprint configuration reference: Reference documentation for the Blueprint configuration files.
- Blueprints CLI command reference: Reference documentation for the Sanity CLI Blueprints command.
Functions
- Deploy custom functions to automate content operations: Sanity Functions enable you to execute custom logic whenever changes occur in your content—all without requiring your own infrastructure.
- Functions: Learn how to take advantage of Functions in your Sanity projects.
- Create a Document Function: Start building with Functions by deploying a new function to Sanity's infrastructure.
- Create a Media Library Asset Function: Start building a function that reacts to changes to a Media Library asset.
- Create a Sync Tag Invalidate Function: Build and deploy a new Sync Tag Invalidate function to Sanity's infrastructure.
- Create a Scheduled Function: Create your first scheduled function, a Sanity function that runs on a set schedule, with Blueprints.
- Manage function dependencies: Functions can be self-contained, or part of a larger ecosystem. Learn how to manage function dependencies in your projects.
- Testing functions locally: Simulate Functions locally with real data and an interactive playground.
- Configure @sanity/client in Functions: Learn to use the JavaScript client in a Sanity Function.
- Add environment variables to functions: Learn to add environment variables to Functions.
- Using robot tokens with Functions: Learn how to authenticate Sanity Functions using robot tokens defined with Blueprints.
- Functions cheat sheet: Common patterns and techniques for creating Functions.
- Function handler reference: Reference documentation for the shape of the function wrapper.
- Functions CLI command reference: Interact with and test your Sanity Functions from the CLI.
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
- HTTP API Reference: The HTTP API endpoints offer direct access to the same APIs used by the Sanity Client, Studio, and other apps to interact with Content Lake and the greater Sanity ecosystem.
- Actions API reference: Reference documentation for the Actions HTTP endpoint.
- Assets API reference: Upload images and files to Content Lake, and link Media Library assets to your dataset.
- Copy API reference: The Copy API, or Cloud Clone, lets you copy existing datasets.
- Backups API reference: Reference documentation for the Backups API.
- Doc API reference: Retrieve one or more documents by ID and bypass the caching layer.
- Export API reference: Reference documentation for the export HTTP endpoint.
- History API reference: Reference documentation for the History HTTP endpoint.
- Jobs API reference: Reference documentation for the Jobs HTTP endpoint.
- Listen API reference: Reference documentation for the Listen HTTP endpoint.
- Live Content API reference: Reference documentation for the Live HTTP endpoint.
- Mutation API reference: Reference documentation for the Mutatation HTTP reference.
- Query API reference: Reference documentation for the Query HTTP endpoint.
- Scheduling API reference: Reference documentation for the Scheduling HTTP endpoints.
- Webhooks API reference: Reference documentation for the Webhooks HTTP endpoints.
- Agent Actions: Reference documentation for the Agent Actions HTTP API.
- Embeddings Index API reference: Reference documentation for the Embeddings Index HTTP endpoints.
- Content Agent API reference: HTTP reference documentation for the Content Agent API
- Media Library API reference: HTTP endpoints reference for the Media Library API
- Access API reference: A centralized API to manage resource access control through roles and permissions.
- Projects API reference: Reference documentation for the projects HTTP endpoint.
- Roles API reference: Reference documentation for the Roles HTTP endpoints.
- User attributes API reference: Manage user attributes and attribute definitions to enable parameterized role-based access control
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
- Specifications: Specifications and standards used throughout the Sanity ecosystem and maintained by the Sanity team.
- GROQ syntax: Reference documentation for the GROQ syntax.
- GROQ data types: Data types supported by GROQ
- GROQ parameters: User-provided parameters in GROQ
- GROQ operators: A description of operators in GROQ
- GROQ Functions Reference: Reference documentation for GROQ functions.
- GROQ pipeline components: A description of GROQ pipeline components
- GROQ joins: A description of joining multiple documents in GROQ
- Function handler reference: Reference documentation for the shape of the function wrapper.
- Blueprint configuration reference: Reference documentation for the Blueprint configuration files.
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
- Sanity CLI: The sanity Command Line Interface (CLI) is a tool for interacting with the Sanity ecosystem from your terminal.
- CLI Configuration: Wrangle datasets and webhooks, initialise plugin boilerplate code, build and deploy—all from the command line
- Backups CLI command reference: Reference documentation for the sanity backups CLI command.
- Blueprints CLI command reference: Reference documentation for the Sanity CLI Blueprints command.
- Build CLI command reference: Builds the current Sanity configuration to a static bundle.
- Codemod CLI command reference: Runs a code modification script
- CORS CLI command reference: Interact with CORS-entries for your project
- Datasets CLI command reference: Interact with datasets in your project
- Debug: Gathers information on Sanity environment
- Deploy CLI command reference: Deploys a statically built Sanity studio
- Dev CLI command reference: Starts a development server for the Sanity Studio
- Docs CLI command reference: Browse, read, and search the Sanity documentation from the CLI.
- Documents CLI command reference: Interact with documents in your project
- Exec CLI command reference: Runs a script in Sanity context
- Functions CLI command reference: Interact with and test your Sanity Functions from the CLI.
- GraphQL CLI command reference: Deploy, delete and list GraphQL APIs for Sanity projects
- Help CLI command reference: Displays help information about Sanity
- Hooks CLI command reference: Interact with hooks in your project
- Init CLI command reference: Initialize a new Sanity project or plugin
- Install CLI command reference: Installs dependencies of the current project
- Learn CLI command reference: Reference documentation for the Sanity CLI learn command.
- Login CLI command reference: Authenticates against the Sanity.io API or a third-party identity provider via SAML SSO (Business / Enterprise plan feature).
- Logout CLI command reference: Logs out of the Sanity.io session
- Manage CLI command reference: Opens the Sanity project management UI
- Manifest CLI command reference: Extracts a JSON manifest for use with Sanity Canvas.
- MCP CLI command reference: Reference documentation for the Sanity CLI mcp command.
- Media CLI command reference: CLI reference documentation for the media command.
- Migrations CLI command reference: Create, list, and run content migrations
- OpenAPI CLI command reference: Command group with list and get subcommands for accessing Sanity OpenAPI specifications directly from the CLI.
- Preview CLI command reference: Starts a local web server for previewing production build
- Projects CLI command reference: Get information about projects for your logged in user
- Schemas CLI command reference: List, validate, extract, and deploy schema.
- Start CLI command reference: Alias of
sanity preview - Telemetry CLI command reference: Interact with telemetry settings for your logged in user
- TypeGen CLI command reference: Generate TypeScript type definition from a Studio schema and GROQ queries
- Undeploy CLI command reference: Removes the deployed studio from .sanity.studio.
- Users CLI command reference: Manage users of your project
- Versions CLI command reference: Shows the installed versions of Sanity CLI and core components
- Tokens CLI command reference: Create, inspect and manage tokens
Content Lake (Datastore)
- Store and query structured content: Sanity's Content Lake stores your content as structured data, making it queryable, referenceable, and ready for delivery to any channel.
- Technical limits: A list of data store limits.
- API Versioning: How to handle versioning in the Sanity API
- API CDN: Description of the CDN-distributed, cached version of the Sanity API.
- Datasets: Managing multiple datasets within a project
- Documents: Sanity stores your data, and some system data, in JSON documents.
- Drafts: How drafts work, and how you disable them
- IDs and Paths: How document IDs work, and what you can do with them
- Perspectives for Content Lake: Perform the same query but with different results based on the published or draft status of a document.
- Attribute limit: Everything about the attribute limit: what it is, how to avoid it, and what to do if you hit the limit on one of your projects.
- How to use Hot Swapping for datasets: Use aliases to swap datasets with no migrations or code changes
- How to use Cloud Clone for datasets: Copy a dataset inside Sanity's infrastructure using either the CLI or HTTP API.
- Backups: Sanity offers a backup feature for data recovery and auditing, available for enterprise plans, managed via Sanity CLI.
- Dataset Embeddings: Search your Content Lake by meaning, not just keywords.
- Hierarchy: Sanity’s hierarchy primitive lets you organise documents into a tree, similar to a file system.
- GROQ introduction: GROQ (Graph-Relational Object Queries) is Sanity's powerful query language designed to help you describe exactly what information your application needs.
- How Queries Work – GROQ: A tutorial on using the Sanity query language GROQ.
- Custom GROQ functions: Learn how to create your own GROQ functions.
- Query Cheat Sheet - GROQ: Data query examples.
- Search text content with GROQ: A guide to searching Sanity text content using GROQ, from basic text matching to advanced hybrid search that combines keyword and semantic strategies.
- The Vision Plugin: Quickly test your GROQ queries using this studio plugin
- GROQ syntax: Reference documentation for the GROQ syntax.
- GROQ feature support across Sanity: A summary of GROQ language support and limitations across different Sanity contexts.
- GraphQL: How to deploy and query GraphQL API for your Sanity projects
- GROQ and GraphQL: Why don't we use GraphQL as our primary query language, and what to do if you want a GraphQL API on your data
- Introduction to document mutations: Sanity's Content Lake offers a variety of methods for creating, editing, and deleting documents.
- Mutate documents with actions: The Actions API let you use the same system Sanity Studio uses to mutate documents in Content Lake.
- Transactions: How transactions for Content Lake work
- Patches: The valid patch types when using the direct HTTP mutations api.
- Document mutation patterns: Common patterns and snippets for mutating documents and data in the Sanity Content Lake.
- Assets: Sanity provides extensible UI for managing assets, and an API for dealing with storage, resizing and deletion.
- Upload, query, and delete assets: Programmatically manage assets in your project dataset.
- Image Metadata: This article takes a closer look at the types of metadata available for images, and the values they might return.
- Image transformations: Reference documentation for image transformations.
- International Image Interoperability Framework (IIIF) API reference: The International Image Interoperability Framework (IIIF) provides a standardized way of delivering and describing images shared on the web. This is the reference documentation for how you can interact with the asset pipeline using IIIF.
- Importing Data: How to go about importing data in bulk, including file and image assets.
- Restore a deleted dataset from a backup: Use an backup to restore a deleted dataset.
- Migrating your schema and content: How to migrate schema and content within a Sanity project
- Content migration cheat sheet: Common content migration patterns that can be run by the Sanity CLI
- Important considerations for schema and content migrations: How to derisk changes to your schema and plan for successful content migrations
- Schema validation and the Content Lake: Understand why schema validation only runs in Sanity Studio and what that means when writing data through the API or client libraries.
- Presenting and previewing content: Previewing changes to your content in a secure and high-fidelity setting before publishing is essential to a smooth editorial process.
- Live Content API: Documentation for the Live Content API, which allows you to deliver live, dynamic experiences to your users without the complexity and scalability challenges.
- Real-time Updates: How API clients can listen for data changes in realtime.
- GROQ-powered webhooks: Send custom HTTP requests when something in your content lake has changed. Use GROQ to define what should trigger a webhook and its payload.
- Webhook Best Practices: Learn best practices about configuration and handling of webhooks
- Webhooks API reference: Reference documentation for the Webhooks HTTP endpoints.
- Embeddings index introduction: Embeddings allow you to search for what your documents are about. Use the Embeddings Index API to build LLM agents or to enable semantic search.
- Create and query an embeddings index: To get started with using the embeddings index API, you first need to create an index.
- Embeddings Index CLI reference: Reference documentation of the Sanity Embeddings Index CLI to create and manage embeddings indexes for your content.
- Embeddings Index API reference: Reference documentation for the Embeddings Index HTTP endpoints.
- Access Your Data (CORS): Decide which domains can access your project data.
- Browser security & CORS: Best security practice when using access tokens when interacting with the API.
- Keeping your data safe: Best practices for access token security.
- Activity Feed
- Common Sanity document types: Reference documentation for common Sanity document shapes.
- Roles and permissions: API endpoints for managing roles and permissions
- URL Format: tl;dr: .api.sanity.io//
- Authentication: How to submit authenticated requests.
- Using JSONMatch: Rich ways to address specific values in Sanity.io documents
- IP addresses used by Sanity: Reference documentation for Sanity IP address ranges.
Next.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.
- Displaying content in Next.js: Query your content and render it in a Next.js app.
- 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.
Platform management
- Administer organizations, projects, datasets, and users: Control and configure your Sanity projects with tools for managing environments, deployment, backups, monitoring, and other operational aspects.
- Platform terminology: To understand how to share work among teams, familiarize yourself with core Sanity concepts that describe where the hard boundaries and connected features are.
- Plans and Payments: Learn how billing and quotas work for different plans.
- Projects, organizations, and billing: How to create, manage, and delete organizations.
- Understanding the Growth plan trial: The Growth plan trial lets you experience more of Sanity's additional capabilities for free for a limited period of time.
- Extending the Growth plan with paid add-ons: Add-ons lets you customize your Growth plan project further with enterprise-grade à la carte features.
- Sanity's non-profit plan: Sanity offers a heavily discounted non-profit plan for eligible non-profit organizations.
- How AI Credits work: Understand how AI credits are consumed and billed for Sanity AI tooling.
- Activity Feed
- Request logs: Learn how to set up Sanity to deliver detailed logs for API requests, enabling insights into content interaction and bandwidth usage.
- Request tags: Request tags in Sanity Log Delivery can be added to API and CDN requests for filtering and aggregating log data, supported by @sanity/client.
- Request logs data reference: The article explains the file format and data structure of the API request log feature, detailing the content and available data.
User guides
- User Guides: Practical, easy-to-follow guides that help content teams work efficiently across official Sanity applications.
- Meet the Dashboard: The central hub for all your content operations.
- Content operators quick start guide: Practical tips and instructions for managing your content within the Sanity ecosystem
- 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.
- Preview and page building: The Presentation tool in Sanity Studio provides a powerful visual editing experience for content creators.
- Content Releases user guide: Learn to use Content Releases to organize and schedule updates across multiple documents.
- Compare document versions: The document comparison view in Sanity Studio provides a side-by-side view of different document versions.
- History experience: Understanding retention time, and document history status
- Create and run instructions with AI Assist: How to create, run, and work with instructions for Sanity AI Assist.
- Common instructions for AI Assist: Instruction cheat sheet with common tasks that can be adopted to your specific use case.
- Media Library quick start guide: Practical tips and instructions for managing your media assets within the Sanity ecosystem
- Meet the library: Get to know Media Library's user interface.
- Introduction to Canvas: Canvas is a writing tool that empowers content creation with AI assistance and contextual notes. Craft informed, engaging content effortlessly.
- Content mapping for Canvas: Bridge the gap between Canvas and Studio with content mapping
- Roles: Sanity enforces user access control with roles. Roles help control resource access to datasets and documents.
- Content Agent quick start guide: Practical tips and instructions for managing content with the Content Agent
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
- Agent Actions: Agent Actions are dedicated interfaces for processing your content with AI and LLMs. Run them anywhere you can run code—in the cloud, in Studio, in migrations, and more.
- Agent Actions introduction: Get to know Agent Actions and how to start using them.
- Operations: Agent Actions allow advanced control of how they create or edit documents.
- Targets and paths: Use target to target specific parts of a document with Agent Actions
- Creating instructions: Learn more about instructions and style guides, and how to use them.
- Agent Actions patterns: Explore common patterns across all Agent Actions
- Enable references in Generate: Use references in Generate to populate fields and connect documents based on your instructions.
- Create images with Agent Actions: Configure your schema for AI-assisted image generation.
- Enable dates and datetimes in Agent Actions: Configure instructions to write to date and datetime fields.
- Generate quick start: Get started with Generate by writing your first instructions to create and modify documents.
- Generate cheat sheet: Common patterns and best practices for using Generate
- Translate quick start: Learn to translate documents with Agent Actions Translate.
- Translate cheat sheet: Common patterns and examples for using Translate.
- Transform quick start: Get started with Transform by writing your first instructions to modify documents.
- Transform cheat sheet: Common patterns and techniques for using Agent Actions Transform.
- Prompt quick start: Learn to send requests to the LLM using Agent Actions Prompt.
- Patch quick start: Make schema-aware patches with Agent Action Patch.
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
- Integrate Sanity with your Next.js app: Leverage the power of Next.js to serve your Sanity content.
- Sanity and Next.js: Build content-driven Next.js applications with Sanity. Covers the next-sanity toolkit, real-time editing, live content, caching, and starter resources.
- Configuring the Sanity client for Next.js: Complete reference for Sanity client configuration in Next.js, including useCdn, stega, tokens, defineLive, and per-request overrides.
- Embedding Sanity Studio in Next.js: Mount Sanity Studio as a route in your Next.js app using NextStudio from next-sanity/studio. Auto and manual installation, metadata, and route separation.
- Querying content in Next.js: Use the next-sanity library to write typed GROQ queries with defineQuery and fetch content in App Router or Pages Router.
- Rendering images in Next.js with next-sanity: Reference for the Image component and imageLoader exported from next-sanity/image. Wraps next/image with a Sanity CDN-aware loader.
- Add live content to your application: Learn to use the Live Content API with Next.js or your own integration for real-time content updates in your app.
- Caching and revalidation in Next.js: Manual caching strategies for Next.js + Sanity apps, including time-based, tag-based, and path-based revalidation with the sanityFetch helper.
- Sanity Live with Next.js Cache Components: Configure next-sanity v13 for Next.js Cache Components (cacheComponents: true). Covers the three-layer component pattern, defineLive setup, draft mode handling, and manual migration from earlier versions.
- Validating Sanity webhooks in Next.js: Set up webhook-based cache revalidation in Next.js using parseBody from next-sanity/webhook. Path-based and tag-based patterns for App Router and Pages Router.
- 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.
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
- APIs and SDKs: Build and manage the Sanity Operating System programmatically through our APIs and SDKs. Here you find documentation for functionality that sits on top of and outside of Content Lake (our datastore) and Compute and AI layers.
- Introduction to schemas: Learn how schemas define content structure across Sanity and design effective, evolving content models that grow with your business needs.
- Naming things: Requirements and suggestions for naming documents and fields
- Attribute limit: Everything about the attribute limit: what it is, how to avoid it, and what to do if you hit the limit on one of your projects.
- Schema: A schema describes the types of documents and fields editors may author in a Sanity Studio workspace.
- Schema Deployment: Deploy your schema into your dataset to enable deep integration between your content model and Sanity apps.
- Create an aspect: Create and deploy aspects for Media Library.
- Getting started with @sanity/client: Learn how to install and configure the official Sanity JavaScript client for querying and mutating content across different environments.
- Querying content with @sanity/client: Learn how to fetch content from your Sanity dataset using GROQ queries, perspectives, and document lookup methods with @sanity/client.
- Creating and updating documents with @sanity/client: Learn how to create, update, and patch documents with @sanity/client, including array manipulation, chained operations, and conditional updates.
- Working with assets in @sanity/client: Learn how to upload, query, and delete assets in both Content Lake and Media Library using the Sanity JavaScript client.
- Creating transactions with @sanity/client: Learn how to group multiple mutations into atomic transactions using @sanity/client, including chaining operations, inline patches, and clientless patterns.
- Deleting documents with @sanity/client: Learn how to delete documents by ID or by query using the Sanity JavaScript client.
- Content releases and versions with @sanity/client: Learn how to create releases, manage document versions, and schedule publishing using the Sanity JavaScript client.
- Listening to content updates with @sanity/client: Learn how to receive real-time content updates using the Sanity JavaScript client, with the Live Content API and query listeners.
- Request tags for filtering logs in @sanity/client: Learn how to use request tags to identify and filter API requests in your Sanity project's request logs for debugging and monitoring.
- Advanced client patterns with @sanity/client: Learn about mutation options, request cancellation, and other advanced patterns when using the Sanity JavaScript client.
- Command Line Interface (CLI): Build, deploy, init plugin boilerplate, run scripts, and wrangle datasets and webhooks, all from the command line
- CLI authentication: Before interacting with the Sanity CLI, you need to login.
- Importing Data: How to go about importing data in bulk, including file and image assets.
- CLI Configuration: Wrangle datasets and webhooks, initialise plugin boilerplate code, build and deploy—all from the command line
- Backups: Sanity offers a backup feature for data recovery and auditing, available for enterprise plans, managed via Sanity CLI.
- Sanity TypeGen: How to use Sanity TypeGen tooling to generate TypeScript definitions from Sanity Studio schemas and GROQ queries.
- Content Releases API: Programmatically manage Content Releases with the API and clients.
- Content Release API Cheat Sheet: Query and modify Content Releases using the API
- Presenting Images: Presenting images through the Sanity image pipeline
- Image transformations: Reference documentation for image transformations.
- Image Metadata: This article takes a closer look at the types of metadata available for images, and the values they might return.
- International Image Interoperability Framework (IIIF) API reference: The International Image Interoperability Framework (IIIF) provides a standardized way of delivering and describing images shared on the web. This is the reference documentation for how you can interact with the asset pipeline using IIIF.
- Asset CDN: Describes the CDN used for delivering assets
- Sanity Connect for Shopify: Setting up and configuring Sanity Connect for Shopify
- Custom sync handlers for Sanity Connect
- Sanity Connect for Shopify - Reference: Reference documentation and code examples to set up and configure Sanity Connect for Shopify
- Sanity Connect for Salesforce Commerce Cloud: Learn how to install and configure Sanity Connect for SFCC, sync your catalog into Sanity, and integrate enriched content into your storefront.
- Sanity Connect for SFCC configuration reference: Complete reference for configuring Sanity Connect for Salesforce Commerce Cloud, including site preferences, attribute mappings, and job parameters.
- Content Agent API: Build custom integrations with the Sanity Content Agent API.
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
- Help and troubleshooting: Here you'll find articles for troubleshooting errors, migrating versions, and more.
- Array contains multiple types that resolve to the same JSON type
- Studio Performance Issues Caused by legacy HTTP protocols: Learn how to resolve Sanity Studio performance issues caused by outdated HTTP protocols like HTTP/1.1 by enabling HTTP/2 or 3.
- Error: Value of type "object" is not allowed in this array field: Error message: "Invalid clipboard item 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: The API hitherto known as "deskTool" has been renamed "structureTool" in v3.24.1 of Sanity Studio.
- Invalid configuration for cross dataset reference: This help page contains links to resources on using cross dataset references.
- Missing or duplicate context error: Experiencing missing or duplicate context errors in Sanity Studio? This issue often arises from having multiple versions of the sanity package installed. Learn why this happens and get tips on cleaning up dependencies or using package manager overrides to resolve the problem in our detailed guide.
- React Compiler and Sanity: Learn how to use the React Compiler with Sanity Studio, React 18 & 19, and for publishing Sanity plugins. Improve performance and reduce manual memoization.
- 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: Get ready to upgrade Sanity Studio and official plugins to React 19.
- 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
studioHostandexternalStudioHostproperties deprecated: You can deploy more than a single studio or other Sanity-powered application. Learn how to use the right API to find out where they are located.- 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:
slugifyFnrenamed - Renamed plugin @sanity/date-input
- Specify API version when using custom document list filters
- Function Timeout: Resolve timeout errors in Sanity Functions by adjusting the timeout duration.
- Functions rate limit: Rate limiting helps prevent recursive functions from running indefinitely.
- Configuring typegen in Sanity CLI config: As of version 4.19.0 it is recommended to configure typegen through the Sanity CLI config.
- Studio v3 to v4: Upgrading to v4 adds Node.js 20 as a requirement and requires minimal, if any, changes in your apps.
- Email addresses show [email protection]: CDN security features can sometimes affect your content.
- Next.js 16 and SanityLive: avoiding request overages: Upgrading to Next.js 16 with SanityLive can multiply prefetch requests and ISR writes, leading to Sanity API overages. Workarounds and what to expect.
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
- Media Library: Media Library allows teams to manage assets in a centralized place. Upload, organize, and sort—then use them across your entire organization.
- Media Library introduction: Learn about Media Library, how to incorporate it into your workflow, and how to get started.
- Meet the library: Get to know Media Library's user interface.
- Asset Versions: Manage asset versions in Media Library
- Configure Studio: Enable Media Library in your Studios.
- Configure your library: Set up and configure your media library
- Create an aspect: Create and deploy aspects for Media Library.
- Add an aspect to an asset: Add aspects to an asset programmatically.
- Query aspects: Query aspects in the Media Library dataset.
- Aspect patterns: Common patterns for defining aspects
- Importing assets to Media Library: Import assets in bulk and automatically categorize with aspect data.
- Upload assets programmatically: Programmatically upload assets to your Media Library.
- Folders: Organize Media Library assets into a navigable hierarchy with folders.
- Link assets to documents: Linking an asset in the Media Library to a document in your project requires a few extra steps.
- Asset visibility: Control asset access using visibility settings and enable secure delivery using signed URLs.
- Container URLs : Container URLs provide a stable, shareable link to Media Library assets.
- Working with video: Learn how to handle video content in Sanity's Media Library.
- Migrate assets from Media Plugin to Media Library: Moving from Media Plugin to Media Library requires that you move your assets, re-link them to your documents, and update any references.
- Media Library API reference: HTTP endpoints reference for the Media Library API
- Media CLI command reference: CLI reference documentation for the media command.
- Media Library limits and usage details: Technical limits and details on included usage for the 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