Authentication and scopes
API keys, what they can reach, and the scopes and presets that limit them.
Every request sends an API key in the x-api-key header:
curl https://api.remagica.com/api/v1/models -H "x-api-key: rmg_..."The MCP server that Claude connects to doesn't use API keys. You sign in with your Remagica account instead.
API keys
- Create keys in the app, in Settings under API keys. Any member of a workspace can create one. The key starts with
rmg_and is shown once, so copy it then. - A key belongs to the workspace, not to you. It spends the workspace's credits, what it makes belongs to the workspace, and it keeps working if the person who made it leaves.
- Nothing a key makes is personal. Projects, Library items and other things a key creates have workspace (team) visibility, because a key doesn't act as a person.
- Edit or revoke a key from the same list. You can change your own keys; owners and admins can change anyone's.
Expiry and rotation
- Expiry: when you create a key, pick never, 30, 90 or 365 days. The list shows how long a key has left. Once it expires, its calls get
401 UNAUTHORIZEDwith "This API key has expired. Create or rotate a key in Settings → API keys." - Rotation: open a key's ⋯ menu and pick Rotate. This creates a new key with the same name, scopes, allowlist and lifetime, and shows it once. The old key keeps working for 24 hours, or until it expires if that's sooner, so you have time to deploy the new one. A key can only be rotated once, and an expired key can't be rotated.
IP allowlists
You can limit a key to the addresses your servers call from. When you create or edit the key, list them one per line. Each line is an IPv4 or IPv6 address, or a CIDR range such as 203.0.113.0/24. A request from any other address gets 401 UNAUTHORIZED. Leave the list empty to allow any address.
API activity
Settings → API activity lists every request made with your workspace's keys: the time, key, method and path, status and IP. Request bodies and keys are never stored. You can filter by key, status and date, and export the list as CSV.
The list also records changes to keys and webhook endpoints. Owners and admins see everything; members see their own keys and their own changes. Events are kept for 90 days.
Each key's row in Settings also shows when it was last used, and from which IP.
What a key can reach
A key only reaches the public API: the endpoints in the API reference. It can never manage the workspace (members, groups, credit limits), billing, comments, the agent chat or the editor, whatever its scopes.
Within the public API, each endpoint needs one scope, shown on its reference page. A key holding that scope can call it.
- An endpoint a key can't reach at all answers
404 NOT_FOUND, as if it didn't exist. - An endpoint the key's scopes don't cover answers
403 FORBIDDEN, naming the scope it needs:This key needs workflows:run.
A few read-only endpoints need no key at all: GET /pricing, GET /capabilities and GET /node-types.
Presets
When you create a key, start from a preset, then add or remove scopes if you need to. API is the one to start with. Full access can delete things, so give it only to code you trust with that.
| Preset | What it's for | Scopes |
|---|---|---|
| API (recommended) | Generate, upload, make clips, run workflows and apps, and read the Library, templates and usage. | models:list generations:cancel generations:read generations:submit uploads:write clips:read clips:submit workflows:read workflows:run workflows:cancel apps:read apps:run library:read templates:read usage:read |
| Builder | API, plus building: edit projects, workflows, templates, apps and the Library. | models:list generations:cancel generations:read generations:submit uploads:write clips:read clips:submit workflows:read workflows:run workflows:cancel apps:read apps:run library:read templates:read usage:read projects:write workflows:write templates:write templates:use apps:write library:write |
| Generate only | Models, generations and uploads only. | models:list generations:cancel generations:read generations:submit uploads:write |
| Read-only | Read everything a key can read, change nothing. | apps:read brand:read clips:read generations:read library:read models:list projects:read references:read sprites:read templates:read usage:read webhooks:read workflows:read |
| Usage | The credit balance, history and usage, and the price list. | usage:read models:list |
| Full access (sensitive) | Every scope of the public API, deletes included. Never workspace admin or billing. | apps:publish apps:read apps:run apps:write brand:delete brand:read brand:write clips:read clips:submit generations:cancel generations:read generations:submit library:delete library:read library:share library:write models:list projects:delete projects:read projects:share projects:write references:delete references:read references:write sprites:read sprites:write templates:delete templates:read templates:use templates:write uploads:write usage:read webhooks:read webhooks:write workflows:cancel workflows:delete workflows:read workflows:run workflows:write |
Scopes
A scope is a resource and an action, like generations:submit. These are all the scopes, by resource.
Apps
| Scope | Allows |
|---|---|
apps:publish | Publish apps for the workspace or the community. |
apps:read | List and read apps and their runs. |
apps:run | Run apps. |
apps:write | Create, edit, remix and delete apps. |
Brand
| Scope | Allows |
|---|---|
brand:delete | Delete brand kits and moodboards. |
brand:read | List and read brand kits and moodboards. |
brand:write | Create and edit brand kits and moodboards. |
Clips
| Scope | Allows |
|---|---|
clips:read | List and read clip jobs, their clips and exports. |
clips:submit | Start clip jobs and re-export clips. |
Generations
| Scope | Allows |
|---|---|
generations:cancel | Stop generations in progress. |
generations:read | List and read generations and characters. |
generations:submit | Generate images, videos, audio and characters. |
Library
| Scope | Allows |
|---|---|
library:delete | Trash, restore and permanently delete Library items. |
library:read | List and read Library items, folders and labels. |
library:share | Read and change files' share links. |
library:write | Add, edit, move and label Library items and folders. |
Models
| Scope | Allows |
|---|---|
models:list | List models, their capabilities, node types and prices. |
Projects
| Scope | Allows |
|---|---|
projects:delete | Delete project folders. |
projects:read | List projects and their folders. |
projects:share | Share projects by link and copy shared ones. |
projects:write | Create, rename, duplicate and move projects and folders. |
References
| Scope | Allows |
|---|---|
references:delete | Delete references. |
references:read | List references, their previews and bookmarks, and the thumbnail reference library. |
references:write | Add references and bookmark them. |
Sprites
| Scope | Allows |
|---|---|
sprites:read | List and read Sprite Studio games, characters, Sprite DNA, outfits, actions, takes, master candidates, presets, drift reports and exports, estimate runs and follow the live feed. |
sprites:write | Create and edit Sprite Studio games, characters, outfits, actions and presets, draw masters, views and takes (spending credits), approve takes, edit, redraw, add and remove frames, pin storyboard sketches, fix drift and export. |
Templates
| Scope | Allows |
|---|---|
templates:delete | Delete templates. |
templates:read | List and read templates and presets. |
templates:use | Start projects from templates and keep presets' examples. |
templates:write | Save projects as templates. |
Uploads
| Scope | Allows |
|---|---|
uploads:write | Upload files, import them from links and sign their URLs. |
Usage
| Scope | Allows |
|---|---|
usage:read | Read the credit balance, history and usage. |
Webhooks
| Scope | Allows |
|---|---|
webhooks:read | List webhook endpoints and their deliveries. |
webhooks:write | Add, change and test webhook endpoints. |
Workflows
| Scope | Allows |
|---|---|
workflows:cancel | Stop workflow runs and results. |
workflows:delete | Delete workflows, revisions and results. |
workflows:read | Read workflows, revisions, runs and their files. |
workflows:run | Run workflows. |
workflows:write | Create and edit workflows and their revisions. |
Keep keys safe
- Keep keys on your server. Never ship one in a web page or a mobile app.
- Give each integration its own key with the fewest scopes it needs, so you can revoke one without breaking the rest.
- If a key leaks, revoke it in Settings straight away and create a new one.