ManifoldGen API keys can be limited to specific scopes, expire, and be rotated or revoked through the API. The account's original sk-mg- key keeps working with every usage scope, so existing integrations do not change.
Authentication
Send the key as Authorization: Bearer sk-mg-... or X-API-Key: sk-mg-.... Keys are stored as SHA-256 hashes. The secret is returned once, when a key is created or rotated, and cannot be retrieved later.
Scopes
GET https://manifoldgen.com/api/keys/scopes (no key needed) lists the catalog:
generate:image— image generation and editing, image editor, background removalgenerate:video— video generation and editing, Studio video tools, video estimatesgenerate:audio— music, sound effects, speech, captions, transcriptiongenerate:tools— hosted production tools (Blender, vectorize, 3D), Studio projects and uploads, forecasting, safetytrain:lora— LoRA training datasets, uploads and jobsgallery:read— the account's private gallery and audio libraryjobs:read— list and read jobs;jobs:write— retry, cancel, delete jobscredits:read— balance, billing history, referralsaccount:write— email, password, settings, billing portal; also the default for any unlisted routemcp— connect to https://manifoldgen.com/api/mcp; each tool call also needs the scope of its operation (generate_media needs the scope of the requested service, get_job and list_jobs needjobs:read)keys:manage— the management key scope
POST /api/service is scoped by service: image services need generate:image, video services generate:video, music, sfx and speech generate:audio, lora_training needs train:lora, and production tools need generate:tools.
Management key
A key with keys:manage can list, create, rotate and revoke keys, and does nothing else unless it was also given usage scopes. Ordinary keys, including the original account key used from scripts, get 403 insufficient_scope on /api/keys. The signed-in account page can also manage keys. Create the management key there, store it separately from keys used by workers.
Endpoints
GET /api/keys/scopes— public scope catalogGET /api/keys/me— the calling key:id,name,scopes,expires_at,is_managementGET /api/keys— management; lists keys without secretsPOST /api/keyswith{"name","scopes":[...],"expires_in_days"?}— management; returns the newsecretoncePOST /api/keys/{id}/rotatewith{"grace_seconds"?}— management; default 0, maximum 86400; returns a newsecretwith the same name, scopes and expiry, and the old key stops working after the grace periodDELETE /api/keys/{id}— management; revokes immediately
curl -X POST https://manifoldgen.com/api/keys \
-H "Authorization: Bearer $MANAGEMENT_KEY" -H "Content-Type: application/json" \
-d '{"name":"render worker","scopes":["generate:video","jobs:read"],"expires_in_days":90}'
Errors
Errors are JSON: {"error":{"code","message","hint","required_scope"}}; required_scope appears on scope errors.
401withWWW-Authenticate: Bearer— codesmissing_api_key,invalid_api_key,api_key_revoked,api_key_expired403withWWW-Authenticate: Bearer error="insufficient_scope", scope="<needed>"— the key is valid but lacksrequired_scope; create or rotate to a key that has it
Frequently Asked Questions
Can a key create keys with more scopes than it has?
Only management keys and the signed-in account can create keys, and ordinary keys cannot reach the endpoint at all.
Does rotating the original account key affect scoped keys?
No. The account page rotation still replaces the original key immediately; scoped keys are separate.
How do I roll a key without downtime?
Rotate with grace_seconds (for example 3600), deploy the new secret, and the old key expires on its own.