Install Jentic One Beta
Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the Usage API, 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-usage-api" | 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-usage-api" | 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 Usage API.
Get a usage snapshot for a project, media-library, organization, or context, with each metric's value and latest timestamp
Pull usage history between from and to dates, aggregated by day, month, or year
Compute cumulative usage with cumulative and cumulative_period, for example a daily running total that resets each month
Limit the response to named metrics through the comma-separated metrics parameter, such as apicdnrequests,documents,assets
GET STARTED
Break organization AI metrics such as content-agent-queries, ai-usage, and embeddings-writes down per user with the user scope
Compare against the previous billing window by setting snapshotPeriod to previousPeriod
Patterns agents use Usage API for, with concrete tasks.
★ AI agent watching plan usage
An agent that keeps an eye on a Sanity bill searches Jentic for 'get Sanity project usage', loads the getResourceSnapshot operation, and requests apirequests, apicdnrequests, documents, and assets for the current month. It compares the values with the previous window by repeating the call with snapshotPeriod set to previousPeriod and flags a sharp rise, with the Sanity token injected at call time.
Call GET /v2026-09-01/usage/{resourceType}/{resourceId}/snapshot with resourceType project, resourceId abc123, and metrics apirequests,apicdnrequests,documents,assets, then report each value
Usage trend reporting
Finance or engineering leads want to see how usage grows over time. The history operation returns metrics between from and to dates aggregated by day, month, or year. A day period accepts at most 90 days and a month period at most 24 calendar months, and setting cumulative to true turns counter metrics into a running total.
Call GET /v2026-09-01/usage/{resourceType}/{resourceId}/history with resourceType organization, resourceId or0Bc1hcJ, period month, from 2025-01-01, and to 2025-12-31
Per-user AI usage in an organization
When AI features drive cost, it helps to know who is using them. The scoped snapshot and history operations accept the user scope on organizations and return per-user values for metrics such as content-agent-queries, content-agent-actions, ai-usage, embeddings-writes, and embeddings-reads. Other metrics and resource types return no scoped data.
Call GET /v2026-09-01/usage/{resourceType}/{resourceId}/{scope}/snapshot with resourceType organization, scope user, and metrics ai-usage,content-agent-queries, then rank users by ai-usage
4 endpoints — the sanity usage api reports how much of each metered resource a sanity project, media library, organization, or context has consumed.
METHOD
PATH
DESCRIPTION
/v2026-09-01/usage/{resourceType}/{resourceId}/snapshot
Get a usage snapshot
/v2026-09-01/usage/{resourceType}/{resourceId}/history
Get usage history over a date range
/v2026-09-01/usage/{resourceType}/{resourceId}/{scope}/snapshot
Get a per-user usage snapshot
/v2026-09-01/usage/{resourceType}/{resourceId}/{scope}/history
Get per-user usage history
/v2026-09-01/usage/{resourceType}/{resourceId}/snapshot
Get a usage snapshot
/v2026-09-01/usage/{resourceType}/{resourceId}/history
Get usage history over a date range
/v2026-09-01/usage/{resourceType}/{resourceId}/{scope}/snapshot
Get a per-user usage snapshot
/v2026-09-01/usage/{resourceType}/{resourceId}/{scope}/history
Get per-user usage history
What agents get from Jentic-routed access to this vendor.
Setup
Wiring the Sanity Usage API by hand means sending a bearer token, encoding resourceType and resourceId in the path, and working within period-dependent range limits that return 400 when exceeded. 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 resource type and ID in the URL path (/usage/{resourceType}/{resourceId}/...), so a rule can pin your agent to one project or organization. Every operation is a read, so the agent can report usage but cannot change any setting through this API.
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 'get Sanity project usage' or 'show Sanity usage history', and Jentic returns the getResourceSnapshot or getResourceHistory operation with its path and query parameters.
Alternatives and complements available in the Jentic catalogue.
Specific to using Usage API through Jentic.
What authentication does the Sanity Usage API use?
Per its OpenAPI spec, the Sanity Usage API uses a bearer token in the Authorization header, declared with a JWT bearer format, on all four operations. Through Jentic the Sanity token is stored by your own instance and attached at call time, so it stays out of the agent's context.
Which resource types does the Sanity Usage API support?
The resourceType path parameter accepts project, media-library, organization, or context, and any other value is rejected with a 400. For context, the resourceId is the owning organization's ID.
How far back can I request Sanity usage history?
It depends on the period. A day period accepts at most 90 days between from and to, a month period at most 24 calendar months, and a year period is unlimited. Without from, history starts 30 days before today, and exceeding a limit returns a 400.
What are the rate limits for the Sanity Usage API?
The OpenAPI spec does not specify rate limits. Check the Sanity documentation at https://www.sanity.io/docs for current API limits for your plan.
Is there a Sanity MCP server?
You don't need an MCP server to give your agent the Sanity Usage API. Jentic connects it directly from the API Directory: import it, store your Sanity token once, and your agent calls the snapshot or history operation when it needs usage numbers.
How do I check Sanity project usage through Jentic?
Search Jentic for 'get Sanity project usage', load the getResourceSnapshot operation, and execute GET /v2026-09-01/usage/{resourceType}/{resourceId}/snapshot with resourceType project and your project ID. 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 Usage API?
Yes. A rule that allows only GET /v2026-09-01/usage/project/abc123/snapshot and its history twin lets a reporting agent read one project's numbers without seeing organization-wide or per-user usage. Every call it makes is logged.
For Agents
Read Sanity usage metrics such as API requests, CDN requests, documents, and assets for a project or organization, as a snapshot or as daily, monthly, or yearly history.
Use for: How many API CDN requests has my Sanity project used this month?, Get the document and asset counts for project abc123, Show daily API request history for the last 30 days, Which users in my organization used the most ai-usage this month?
Not supported: Does not change plans, set usage limits, or return billing invoices. Use for reading Sanity usage metrics only.
The Sanity Usage API reports how much of each metered resource a Sanity project, media library, organization, or context has consumed. A snapshot call returns a map of metric names such as apirequests, apicdnrequests, documents, or assets to their value for a day, month, or year, along with the latest timestamp recorded for each metric. A history call returns the same metrics over a date range, aggregated by period and optionally as a running total. For organizations, scoped calls break AI and embeddings metrics such as ai-usage and embeddings-reads down per user.
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>