AI Ad Reviews
Automation and teams

Scoped API Keys and Spend: Sizing the Blast Radius per Key

A leaked read key can spend $0; a leaked generate key is limited only by your caps. Map read, generate and admin keys so each leak has a dollar ceiling.

With a generation API, a leaked key is a billing problem as well as a data problem. On Mantinea, a leaked read-scoped key can spend nothing. A leaked generate-scoped key can start up to 60 paid jobs a minute, which at 450 credits for a 30-second talking-actor ad is a theoretical $270 a minute, and the only ceiling is whatever spending cap you set on the workspace. Scoping keys correctly decides who can spend; caps decide how much. Done together, every key in your stack has a known worst case in dollars. Facts are from Mantinea's public docs as of November 2026 (the docs list which operations each scope allows) and prices from the 24 November 2026 list.

The three scopes and their worst case

ScopeForWorst case if leaked
ReadJob status, listing and fetching assets, client dashboards$0; it cannot start paid work
GenerateRenders, translations, edits, batchesUp to 60 paid starts a minute per key, stopped by workspace caps
AdminAccount setup and configuration an integration needs to changeChanges to the workspace itself; few services need it, and rarely

Give each service the lowest scope that does its job. A service that only reads should never hold a key that can spend.

How fast a generate key can spend

Job typeCredits per job60 starts in a minuteDollars
30 s narrated (3/s)905,400$54
30 s standard talking actor (15/s)45027,000$270
30 s lip-sync route (40/s)1,20072,000$720

Those are ceilings set by the rate limit (60 paid starts and 600 requests a minute per key), not predictions. They show why a cap matters more than a refund policy: failed or canceled jobs are refunded automatically, but successful jobs started by someone else's script are real spend.

A key map with a dollar ceiling on each row

ServiceScopeOne key perCeiling if leaked
Client dashboardReadClient$0
Webhook handler fetching resultsReadEnvironment$0
Feed worker submitting batchesGenerateClientThat client's share of the daily cap
Claude Code or CI test scriptsGenerateDeveloper or pipelineThe staging workspace's cap
Setup scriptsAdminOne leadNo credit spend; workspace changes

One key per client does two jobs. If one client's worker leaks its key, you revoke that key and nothing else stops. And because rate limits are per key, one client's launch day cannot use up another's throughput. API rate limits decoded covers the limits in detail.

Setting the caps that make the ceilings real

Workspace spending caps (daily, weekly, monthly), plus confirm-before-generate in the app, apply to every key. Size the daily cap from a normal day plus a buffer. An agency that spends about 6,000 credits on a busy day might set 7,500, so the worst day, leak included, is $75.

Give staging its own workspace and its own keys with a low cap, say 500 credits a day. Test scripts then have a $5 ceiling, which is enough to render a few 30-second test ads and not enough to hurt.

Inside generate-scoped code, wrap paid calls in an estimate_only check and refuse anything over a per-job budget. A started job reserves its quote and charges what ran, never more. See estimate_only explained.

Hygiene that keeps keys where they belong

  • Name keys for where they live ("acme-feed-worker-prod"), so you know what breaks when you revoke one
  • Never put a generate key in a browser; front-end code is public, so proxy through your backend with a read key
  • Separate staging keys pointing at a low-cap workspace
  • Revoke and reissue keys when a contractor leaves
  • Mask the authorization header in HTTP client logs
  • Send an idempotency key with every paid start, so a retry returns the original job instead of a second 450-credit render

MCP and people

The hosted MCP server at https://app.mantinea.com/mcp accepts OAuth 2.1 or an API key. People using Claude, ChatGPT, Cursor or VS Code should sign in with OAuth as themselves, so no key is handed out at all. For planning sessions that must not spend, connect https://app.mantinea.com/mcp?mode=estimate; tools quote instead of running, the MCP equivalent of a read key.

Keys are for machines and seats are for people. Mantinea has unlimited seats on every plan, so there is no cost reason to share a login or to give a person an admin key.

Setup checklist

  1. List every service that talks to the API.
  2. Mark each read, generate or admin by what it actually calls.
  3. Issue one key per service per client, or per environment for shared services.
  4. Set daily and monthly workspace caps from your real spend.
  5. Wrap generate calls in an estimate_only check.
  6. Record who owns each key and when it was last rotated.

The API, scoped keys and the MCP server are on every plan from $29 a month. The 14-day trial (1,000 credits, no card) is enough to set up the key map and test it before production.

The AI Ad Reviews editors

We turn AI ad tool pricing into dollars per ad, so you can compare plans without a spreadsheet of your own. We work from vendors' own pricing pages, docs and help centers, and date every price we quote. About us.