# Sanity — card for AI agents

Hosted content database with real-time editing, APIs, and AI-powered content agent.

Maker: Sanity · category: Databases and backends

## Price (official page)
- Free tier: 20 seats, 2 datasets, 10k documents, 250k API requests/month, 1000 AI credits/month
- Free tier terms: free allowance · monthly · amount: 250k API requests (read from the wording above and the pricing page; empty = not stated)
- Paid from $15/month
- Usage price: $1 per 25k API requests, $1 per 250k CDN requests, $0.05 per AI credit, $1 per 1M function invocations
- Pricing page: https://www.sanity.io/pricing (checked 2026-10-09)
- Note: Added automatically: its SDK was in 14 of the public agent repos we sampled when it was added; a hosted MCP server in the official MCP Registry. Prices read from the official pricing page.

## Connect
- Official MCP server: yes
- npm: `npm install @sanity/client`
- Repository: https://github.com/sanity-io/client

## For AI agents on Sanity's own site (AgentGid check 2026-11-13: 4 of 6)
- llms.txt: https://www.sanity.io/llms.txt
- Docs pages as Markdown: 2% of the pages llms.txt lists
- OpenAPI description: none found at the usual places
- Official MCP server: yes · official SDK: yes · status page: no
- robots.txt lets AI assistants (ChatGPT-User, Claude-User) read the site: yes

## A year of price history (Internet Archive copies of the pricing page, read by rules)
- Months read: 11 (2025-10 to 2026-10) of https://www.sanity.io/pricing
- Lowest $/month figure on the page: $299 in 2025-10, $299 in 2026-10
- 2026-06: free plan no longer shown (archived copy: https://web.archive.org/web/20260606011835/https://www.sanity.io/pricing)
- 2026-07: no longer shown $1399/mo (archived copy: https://web.archive.org/web/20260713083452/https://www.sanity.io/pricing)
- A figure is any "$X/month" on the page (plans, seats and add-ons alike); open the archived copy to see which plan it is.

## Price history in AgentGid's catalog (since 2026-10-09)
- Changes recorded: 0 (a vendor price change or an editor's correction; the evidence archive keeps the pricing page of each date)

## Other APIs in this category
- MongoDB Atlas: https://agentgid.com/apis/mongodb/agent.md
- DuckDB: https://agentgid.com/apis/duckdb/agent.md
- Redis: https://agentgid.com/apis/redis/agent.md
- Firebase: https://agentgid.com/apis/firebase/agent.md
- Upstash Redis: https://agentgid.com/apis/upstash/agent.md

## Links
- AgentGid page: https://agentgid.com/apis/sanity/


## Sanity: hosted content for sites, edited by your team

Sanity keeps the text, pictures and other content of your website or app in an online store, with an editing screen your team can shape to fit. Your site asks Sanity for the content it shows, and editors change it without touching code. The free plan covers small projects; paid plans charge per editor seat.

### Where to use it
- Blog or marketing site editors can update: Your team writes and edits posts and landing pages in the editing screen, and the site picks up the changes.
- Pictures cut to size by editors: Editors upload one photo and mark its focus point; each page asks for the exact size it needs and the crop follows the editor's choice.
- Product catalog for a shop: Keep product descriptions, pictures and categories in one place and show them on your shop, your app and in emails.
- Preview pages before publishing: Editors see the page as it will look while they type, and publish when it is ready.
- Let your AI assistant manage content: Connect Claude Code or Cursor to your project so the assistant can read, create and update content for you.
- Site in several languages: Store each page in every language you support and let translators work in the same editing screen. (idea, not from the official pages)

### How to start
- Create a Sanity project and its editing app (Studio); the command signs you in through the browser if needed.

```
npx sanity@latest init --yes --project-name "<project name>" --dataset-default --template clean --typescript --output-path studio
```

- Install the client in your site and allow your site's address under CORS in the project settings.

```
npm install @sanity/client
```

- Query your content with GROQ (example from the client README).

```
import {createClient} from '@sanity/client'

export const client = createClient({
  projectId: 'your-project-id',
  dataset: 'your-dataset-name',
  useCdn: true,
  apiVersion: '2025-02-06',
})

const posts = await client.fetch('*[_type == "post"]')
```


### License
The hosted content store is a paid service with a free plan, and you keep the rights to your content. The editing app and the client libraries are open source under the MIT license.

### Good to know
- On the free plan datasets are public, so anyone who knows the project ID can read published content.
- Uploaded files and images are always reachable by anyone with their link, even in a private dataset.
- Never put a token in code that runs in the browser; a token with write access can delete all your content.
- The free plan stops at its monthly quotas; paying for extra use needs the Growth plan at $15 per seat a month.
- Your site can read the project only from addresses you allow in the CORS settings.

Checked 2026-11-10 against: https://www.sanity.io/, https://www.sanity.io/pricing, https://www.sanity.io/llms.txt, https://www.sanity.io/legal/tos, https://www.sanity.io/legal/dpa, https://www.sanity.io/security, https://www.sanity.io/docs/llms.txt, https://www.sanity.io/docs/llms/content-lake.txt, https://www.sanity.io/docs/llms/http-reference.txt, https://www.sanity.io/docs/llms/ai.txt, https://www.sanity.io/docs/content-lake.md, https://www.sanity.io/docs/http-reference/query.md, https://www.sanity.io/docs/content-lake/technical-limits.md, https://www.sanity.io/docs/content-lake/api-cdn.md, https://www.sanity.io/docs/content-lake/http-auth.md, https://www.sanity.io/docs/content-lake/keeping-your-data-safe.md, https://www.sanity.io/docs/content-lake/cors.md, https://www.sanity.io/docs/content-lake/datasets.md, https://www.sanity.io/docs/content-lake/groq-introduction.md, https://www.sanity.io/docs/apis-and-sdks/image-urls.md, https://www.sanity.io/docs/ai/mcp-server.md, https://www.sanity.io/docs/getting-started/ai-coding-agents.md, https://www.sanity.io/docs/getting-started/projects-without-an-account.md, https://github.com/sanity-io/client/blob/main/README.md, https://github.com/sanity-io/image-url/blob/main/README.md, https://registry.npmjs.org/@sanity/client/latest, https://registry.npmjs.org/@sanity/image-url/latest, https://registry.npmjs.org/sanity/latest

### Mistakes to avoid
- Don't: Setting apiVersion from today's date at runtime (new Date()). → Do: Hard-code an apiVersion date string such as '2025-02-06'. (The README warns a dynamic value may break the app at a random point in the future.)
- Don't: Putting a robot token in browser code to read drafts or private data. → Do: Keep the token on the server (route handler, server component) and send only the results to the browser. (Tokens bundled into front-end code leak; a write token can delete all data.)
- Don't: Reading every page from api.sanity.io during heavy traffic. → Do: Set useCdn true for end-user reads; use the uncached API for webhooks, previews and static builds. (Cached CDN reads are not rate limited and are cheaper in quota.)
- Don't: Treating an empty result from a private dataset as "no content". → Do: Check that the request carries a token with read access. (Private datasets answer unauthenticated queries with 200 and an empty result.)
- Don't: Storing private files (contracts, invoices) as dataset assets and relying on a private dataset. → Do: Use Media Library asset visibility or host such files yourself. (Dataset assets stay public to anyone with the link.)

### Questions
- Is there a free plan? Yes, $0 forever with up to 20 seats, 2 public datasets and 10,000 documents.
- Does my website need a key to read content? Not for published content in a public dataset. Drafts and private datasets need a token, used only on the server.
- Why does my private dataset return an empty list? Requests without a token to a private dataset get an empty answer, not an error.
- Who owns the content I put in Sanity? You do; Sanity uses it to provide the service and may build anonymous statistics from it.
- Where is my content stored? In the EU/EEA, the US or another Sanity region set per customer, on Google Cloud.

---
AgentGid's catalog is curated: every entry was checked against the maker's official pages (registry, repository, license and pricing pages) on the date shown; a license value shows the quote it stands on wherever AgentGid has one. Usage numbers come from AgentGid's own scan of public repositories set up for AI coding agents. Claims by makers are reported, not tested by AgentGid.
