Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Export HTTP Endpoint, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.
Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.
Step 1: Jentic One Host machine
# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsanity.io%2Fsanity-export" | shStep 2: Agent machine
# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fsanity.io%2Fsanity-export" | sh
jentic register # connects your agent to your Jentic One instanceJentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.
What an agent can do with Export HTTP Endpoint API.
Stream every non-deleted document in a dataset as NDJSON with exportDataset
Limit the export to exact document types with types, adding sanity.imageAsset or sanity.fileAsset to include asset documents
Resume large exports in cursor mode by passing the nextCursor value from the previous stream
Detect a failed export by checking the last NDJSON line for an error object
GET STARTED
Include drafts, release versions, and system documents by sending a token that can read them
Patterns agents use Export HTTP Endpoint API for, with concrete tasks.
★ AI agent content snapshot
An agent analysing or migrating a site's content often needs the whole dataset in one pass. Through Jentic the agent searches for 'export a Sanity dataset', loads the exportDataset operation, and requests the dataset with the types it needs while the Sanity token is injected at call time. It then checks the final line for an error object or a nextCursor before treating the export as done.
GET /data/export/production with types post,author and read the NDJSON stream, then confirm the last line has no error key
Resumable export of a large dataset
Datasets with tens of thousands of documents can time out mid-stream. Setting nextCursor to an empty string starts cursor mode, where each request runs for up to 30 seconds and ends with a nextCursor object, and the export is complete when a stream ends with neither a nextCursor nor an error object.
GET /data/export/production with nextCursor set to an empty string, then repeat with each returned nextCursor until a stream ends without one
Typed exports for migration
Moving one content type to another system rarely needs the full dataset. The types parameter takes a comma-separated list of exact _type values, with no wildcards, so a migration can pull just articles and their image asset documents.
GET /data/export/production with types article,sanity.imageAsset and save the stream as an .ndjson file
1 endpoints — the sanity export api streams every non-deleted document in a dataset as newline-delimited json, including drafts, release versions, and asset documents the caller can access.
METHOD
PATH
DESCRIPTION
/data/export/{dataset}
Export documents in a dataset as NDJSON
/data/export/{dataset}
Export documents in a dataset as NDJSON
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Sanity Export API by hand means templating the projectId and apiVersion into the host, parsing an NDJSON stream, following nextCursor in cursor mode, and checking the final line for an error object. Through Jentic you install once, import it from the API Directory, store the token once, and your agent calls it.
Permission scoping
Sanity puts the dataset in the URL path (/data/export/{dataset}), so a rule can pin your agent to exporting one dataset such as staging. The single operation is a read, and the token's own access decides whether drafts and release versions are included.
Credential isolation
Your Sanity token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.
Intent-based discovery
Agents search Jentic by intent such as 'export a Sanity dataset' or 'download all Sanity documents', and Jentic returns the exportDataset operation with its types and nextCursor parameters.
Alternatives and complements available in the Jentic catalogue.
Specific to using Export HTTP Endpoint API through Jentic.
What authentication does the Sanity Export API use?
Per its OpenAPI spec, the Sanity Export API accepts a bearer token in the Authorization header, and the token is optional. Without one, the export contains only publicly available documents, and a private dataset returns 200 with an empty stream. With a token, it contains the documents that token can access; through Jentic the token is stored by your own instance and attached at call time.
How do I know a Sanity export completed?
Check the last line of the stream. If an error happens after the first document, the status stays 200 and the stream ends with an error object. In cursor mode, a trailing nextCursor object means more documents remain; the export is complete when a stream ends with neither.
Should I use the Export API or the Sanity CLI?
The spec recommends the sanity datasets export CLI command or the @sanity/export npm package in most cases, since they download assets, can exclude drafts, and follow cursors for you. Use the HTTP endpoint when you need the raw NDJSON stream directly.
What are the rate limits for the Sanity Export API?
The OpenAPI spec does not specify rate limits. In cursor mode each request runs for up to 30 seconds before returning a cursor. Check https://www.sanity.io/docs for current API limits for your plan.
Is there a Sanity Export MCP server?
You don't need an MCP server to give your agent the Sanity Export API. Jentic connects it directly from the API Directory: import it, store your Sanity token once, and your agent calls exportDataset when it needs a dataset snapshot.
How do I export a Sanity dataset through Jentic?
Search Jentic for 'export a Sanity dataset', load the exportDataset operation, and execute GET /data/export/{dataset}, optionally with types and nextCursor. To run it on your own infrastructure, install Jentic One from its GitHub repo.
Can I limit what my agent is allowed to do with the Sanity Export API?
Yes. A rule that allows only GET /data/export/staging lets the agent pull full snapshots of staging while the production dataset stays out of reach. The operation is read-only, and every call it makes is logged.
For Agents
Stream all documents in a Sanity dataset as NDJSON, filtered by document type, with cursor mode to resume large exports.
Use for: Export all blog posts and authors from the production dataset, I need a full NDJSON dump of my Sanity dataset, Download every image asset document in the dataset, Continue the export from where the last cursor left off
Not supported: Does not download asset files, import documents, or restore backups. Use for streaming a Sanity dataset's documents as NDJSON only.
The Sanity Export API streams every non-deleted document in a dataset as newline-delimited JSON, including drafts, release versions, and asset documents the caller can access. The export reflects the dataset as it was when the request started, and the types parameter narrows it to specific document types such as post, author, or sanity.imageAsset. For large datasets, cursor mode returns documents ordered by _id in time-boxed batches that end with a nextCursor object to resume from. An error after streaming begins keeps the 200 status and ends the stream with an error object, so the last line must be checked before an export counts as complete.
This API is usable in Jentic One now. Its AI-readiness score against Jentic's framework shows where it stands today and where improvements would make it even easier for agents to use.
Base layer of spec validity and structural soundness.
Aggregated quality score from linter diagnostics, weighted by severity.
Percentage of `$ref` references that resolve successfully.
Checks whether the API description parses successfully and conforms to its declared specification (e.g., OpenAPI).
Structural correctness score based on schema issues using logarithmic dampening.
Clarity, completeness, and ingestion readiness for developers and tooling.
How richly the API is illustrated with examples.
Percentage of examples that conform to their schemas.
Percentage of operations with complete response definitions (success, client error, server error).
Health of API ingestion, bundling, and resolution within Jentic pipelines.
Semantic breadth, depth, and agent comprehension for AI systems.
Coverage of descriptions across API elements.
Coverage of RFC 9457 Problem Details for error responses.
Coverage, uniqueness, and casing consistency of operationIds for AI inference.
Coverage of summaries across operations/tags/info.
Functional utility, complexity comfort, and AI orchestration readiness.
Agent comfort level based on API operational and structural complexity.
Trust, risk posture, and security compliance.
Average quality of security schemes based on authentication method strength (weakest link for OAuth2).
Findability, semantic richness, and reasoning readiness.
Clarity and depth of descriptions across API elements.
Score it yourself
Every API in the directory is allowlisted, so you can re-score it with no key required.
npx @jentic/api-scorecard-cli score <openapi-url>