A single all-powerful API key is convenient for about a week. Then it ends up in a dashboard's environment file, a contractor's laptop and a CI log, and every one of those places can start paid renders on your account. With a generation API, a leaked key exposes your data and can also run up your bill.
Mantinea's public API uses scoped keys with three levels: read, generate and admin. This post explains what each is for, how to split keys across services and clients, and how scopes work alongside the platform's other cost controls. Facts come from Mantinea's public docs as of November 2026; the docs list exactly which operations each scope allows, so check them when you set permissions.
The three scopes in plain terms
Read. For code that looks but doesn't spend. Typical uses: checking job status, listing and fetching assets, showing a client dashboard of what's been made.
Generate. For code that starts paid work: renders, translations, edits, batches. This is the key that costs money when it's misused, so it's the one to guard.
Admin. For managing the account's setup rather than making ads, for example configuration that your integration needs to change. Few services need it, and most of those need it rarely.
As a rule of thumb, give each service the lowest scope that lets it do its job. If a service only reads, a leaked key can't spend a credit.
A key map for a typical agency stack
Here's how an agency with a few integrations might split keys:
| Service | What it does | Scope | One key per |
|---|---|---|---|
| Client dashboard | Shows job status and finished ads | Read | Client |
| Feed worker | Submits batches when products change | Generate | Client |
| Claude Code / CI scripts | Renders test packs on demand | Generate | Developer or pipeline |
| Webhook handler | Fetches results after events | Read | Environment |
| Setup scripts | Changes integration configuration | Admin | Kept by one lead |
Why per client? Two reasons.
- Blast radius. If one client's worker leaks its key, you revoke one key and nothing else stops.
- Rate limits are per key. The API allows 600 requests and 60 paid starts per minute per key. Separate keys mean one client's launch day can't eat another client's throughput. API rate limits decoded covers this in more detail.
Scopes are one layer of cost control
Scopes decide who can spend. Mantinea has other layers that decide how much:
estimate_onlyon every paid call. Generate-scoped code can quote a job before starting it, and your code can refuse anything over budget. See estimate_only explained.- Workspace spending caps. Daily, weekly or monthly limits, plus confirm-before-generate in the app. Even a valid generate key hits the cap.
- Reserve, then settle. A started job reserves its quote and you pay what actually ran, never more than the reserve.
- Automatic refunds on failed or canceled jobs.
Together they mean a misbehaving script with a generate key has a ceiling. Without a cap, the ceiling is your balance.
Practical hygiene
None of this is unique to Mantinea, but it's worth writing down for the team:
- Name keys for where they live. "acme-feed-worker-prod" tells you what breaks when you revoke it.
- Never put a generate key in a browser. Front-end code is public. If a page needs to show assets, proxy through your backend with a read key.
- Separate environments. Staging gets its own keys. Point staging at a workspace with a low spending cap.
- Rotate on staff changes. When a contractor leaves, revoke the keys they had and issue new ones.
- Keep secrets out of logs. Mask the authorization header in your HTTP client's logging.
- Pair keys with idempotency keys. A retry with the same idempotency key returns the original job instead of starting a new paid render, so a flaky network doesn't double your bill.
What about MCP?
The hosted MCP server at https://app.mantinea.com/mcp accepts OAuth 2.1 or an API key. For people using Claude, ChatGPT, Cursor or VS Code interactively, OAuth is the better choice: they sign in as themselves and you don't hand out a key at all.
For planning sessions that shouldn't spend, connect the estimate-only URL (https://app.mantinea.com/mcp?mode=estimate). Tools quote instead of running, which is the MCP equivalent of handing someone a read key.
Seats vs keys
Keys are for machines; seats are for people. Mantinea includes unlimited seats on every plan, so there's no reason to share one login across a team or to give a person an admin key because adding a seat costs money. Give people seats in the app and give services scoped keys.
A setup checklist
- List every service that talks to the API.
- Mark each as read, generate or admin based on what it actually calls.
- Issue one key per service per client (or per environment for shared services).
- Set a workspace spending cap that matches your monthly budget.
- Wrap generate calls in an
estimate_onlycheck. - Document who owns each key and when it was last rotated.
The API, scoped keys and the MCP server are on every Mantinea plan from $29 a month, and the 14-day trial (1,000 credits, no card) is enough to set up the key map and test it before production.