API Keys โ
API keys in FFmate let scripts and applications communicate with the FFmate REST API using their own credentials instead of the basic auth username and password. Each application gets only the access it needs, and its key can be rotated or deleted without affecting anyone else.
API keys only work on an FFmate instance started with the --basic-auth flag.
Each API key has the access level read or write. For example, a monitoring dashboard gets an API key with read access, so it can list tasks but not create or delete them. A render farm scheduler that creates tasks gets write access. See Access Levels.
If an API key is leaked, rotate it to get a new key. The previous key stops working at once, and the API key keeps its name and access level.
API keys can be deleted at any time. Deleting an API key only affects the applications that use it. Basic auth and all other API keys keep working.
In a cluster, API keys are saved in the shared database, so they work on every FFmate instance.
Note
To make sure API keys work on every FFmate instance in a cluster, start all of them with the --basic-auth flag.
Using an API Key โ
To authenticate a request to the FFmate REST API with an API key, set the X-API-Key header:
curl 'http://localhost:3000/api/v1/tasks' \
-H 'X-API-Key: ffm_f2paiZBrDmnXE3TOTSNMatx1nvdxglc5DiNGGuWXf7A'API keys work on every protected endpoint, for example /api/v1/tasks, /api/v1/presets and /metrics. If a request has both an API key and basic auth credentials, FFmate only checks the API key.
Note
- An unknown, rotated or deleted key gets
401with{"error":"invalid api key"}. - A key without the access level an endpoint needs gets
403with{"error":"api key has insufficient access for this route"}.
Access Levels โ
The access level restricts which endpoints an API key can call:
| Endpoints | read access | write access |
|---|---|---|
GET on /api/v1/tasks, /api/v1/batches, /api/v1/presets, /api/v1/watchfolders, /api/v1/webhooks, /api/v1/clients and /api/v1/settings | allowed | allowed |
POST, PUT, PATCH and DELETE on /api/v1/tasks, /api/v1/batches, /api/v1/presets, /api/v1/watchfolders, /api/v1/webhooks, /api/v1/settings and /api/v1/debug | 403 | allowed |
Every endpoint under /api/v1/apikeys | 403 | 403 |
All other protected endpoints, e.g. /metrics | allowed | allowed |
An API key with read access can list and view tasks, presets, watchfolders and webhooks. Creating, changing, canceling, restarting or deleting them needs an API key with write access.
API keys can't manage API keys. Creating, listing, rotating and deleting them requires basic auth.
Note
An API key with write access can create tasks, presets and watchfolders, and these can run commands on the computer FFmate runs on. Only give write access to applications that are allowed to do that.
Creating an API Key โ
To create an API key, send a POST request to /api/v1/apikeys using basic auth:
curl -X POST 'http://localhost:3000/api/v1/apikeys' \
-u 'admin:a-long-random-password' \
-H 'Content-Type: application/json' \
-d '{
"name": "Render farm scheduler",
"access": "write"
}'FFmate returns the new API key. The full key is in key:
{
"createdAt": "2026-11-11T15:39:02.46341+01:00",
"updatedAt": "2026-11-11T15:39:02.46341+01:00",
"uuid": "f3388e7d-87ab-40b7-9fd6-4a1ab643ba61",
"name": "Render farm scheduler",
"access": "write",
"prefix": "ffm_f2paiZBr",
"key": "ffm_f2paiZBrDmnXE3TOTSNMatx1nvdxglc5DiNGGuWXf7A"
}This response is the only time FFmate shows the full key. FFmate doesn't store the key itself, so a lost key can't be shown again. To get a new one, rotate the API key.
Note
Requests without a name, or with an access other than read or write, are rejected with 422.
๐ก Tip: To create an API key in the Web UI, see Creating an API Key.
API Key Properties โ
name[mandatory] โ Says who or what uses the key, e.g.Render farm scheduler. Up to 255 characters. Different API keys can have the same name.access[mandatory] โreadorwrite. See Access Levels.
The response adds these read-only fields:
uuidโ Identifies the API key in the endpoints below.prefixโ The first 12 characters of the key, e.g.ffm_f2paiZBr. Every key starts withffm_, and the rest of the prefix changes when the API key is rotated.keyโ The full key. FFmate returns it only when an API key is created or rotated.createdAtandupdatedAtโ When the API key was created and last changed. Rotating a key changesupdatedAt.
Listing API Keys โ
To list all API keys, send a GET request to /api/v1/apikeys:
curl 'http://localhost:3000/api/v1/apikeys?page=0&perPage=100' \
-u 'admin:a-long-random-password'page[optional] โ The page to return, starting at0. Default:0.perPage[optional] โ How many API keys one page holds. Up to100. Default:100.
FFmate returns a JSON array of API keys, newest first, without key. The X-Total response header holds the total number of API keys.
[
{
"createdAt": "2026-11-11T15:39:02.46341+01:00",
"updatedAt": "2026-11-11T15:39:02.46341+01:00",
"uuid": "f3388e7d-87ab-40b7-9fd6-4a1ab643ba61",
"name": "Render farm scheduler",
"access": "write",
"prefix": "ffm_f2paiZBr"
}
]๐ก Tip: To see all API keys in the Web UI, see API Keys.
Getting an API Key โ
To get one API key, send a GET request to /api/v1/apikeys/{uuid}:
curl 'http://localhost:3000/api/v1/apikeys/f3388e7d-87ab-40b7-9fd6-4a1ab643ba61' \
-u 'admin:a-long-random-password'FFmate returns the API key without the full key:
{
"createdAt": "2026-11-11T15:39:02.46341+01:00",
"updatedAt": "2026-11-11T15:39:02.46341+01:00",
"uuid": "f3388e7d-87ab-40b7-9fd6-4a1ab643ba61",
"name": "Render farm scheduler",
"access": "write",
"prefix": "ffm_f2paiZBr"
}If no API key has this uuid, FFmate responds with 400 and the message api key for given uuid not found.
Rotating an API Key โ
Rotating generates a new key for an existing API key. Its uuid, name and access stay the same. To rotate an API key, send a POST request to /api/v1/apikeys/{uuid}/rotate:
curl -X POST 'http://localhost:3000/api/v1/apikeys/f3388e7d-87ab-40b7-9fd6-4a1ab643ba61/rotate' \
-u 'admin:a-long-random-password'FFmate returns the API key with the new key:
{
"createdAt": "2026-11-11T15:39:02.46341+01:00",
"updatedAt": "2026-11-12T09:14:27.10523+01:00",
"uuid": "f3388e7d-87ab-40b7-9fd6-4a1ab643ba61",
"name": "Render farm scheduler",
"access": "write",
"prefix": "ffm_Q7xKp2Lm",
"key": "ffm_Q7xKp2LmVt9RbN4sWcYhE1oJdZ6uAfG3iTnPq8vXkM0"
}Note
As soon as an API key is rotated, every application that still uses the previous key stops working at once.
If no API key has this uuid, FFmate responds with 400 and the message api key for given uuid not found.
๐ก Tip: To rotate an API key in the Web UI, see Rotating an API Key.
Deleting an API Key โ
To delete an API key, send a DELETE request to /api/v1/apikeys/{uuid}:
curl -X DELETE 'http://localhost:3000/api/v1/apikeys/f3388e7d-87ab-40b7-9fd6-4a1ab643ba61' \
-u 'admin:a-long-random-password'FFmate responds with 204 No Content.
Note
As soon as an API key is deleted, every application that still uses it stops working at once.
If no API key has this uuid, FFmate responds with 400 and the message api key for given uuid not found.
๐ก Tip: To delete an API key in the Web UI, see Deleting an API Key.