API Keys
Create an API key
POST /api/keys - mint a new fm_ key with optional scopes and expiry; raw key returned once.
POST
Create an API key
scopesis optional; omit it for the default set. Unknown names fail withINVALID_SCOPES.expiresAtis optional; when provided it must parse as a date (INVALID_EXPIRY_DATE) and be in the future (EXPIRY_MUST_BE_FUTURE). Null means never expires.- At most 5 keys per account (
API_KEY_LIMIT_REACHED, 403).
Authorizations
FaceMode API key (fm_...).
Body
application/json
Human-friendly label for the key.
Optional expiry timestamp; must be in the future.
Optional scope list. Defaults to sessions:create, sessions:read, sessions:end, avatars:read, usage:read.
Granular permission attached to an API key.
Available options:
sessions:create, sessions:read, sessions:end, avatars:read, avatars:write, keys:read, keys:write, keys:delete, billing:read, billing:write, credits:read, usage:read Response
API key created. apiKey.key contains the raw key - shown only once.