Authentication
Create, scope, use, rotate and revoke FLORA API keys, and keep them safe on your server.
The FLORA API uses bearer-token authentication with API keys. Every request carries your key in the Authorization header:
Authorization: Bearer ak_XXXXConnecting an AI client such as Claude, ChatGPT or Cursor? Use FLORA MCP instead. It signs you in with OAuth, so you don't paste a key into the client. See FLORA MCP authentication.
Create a key
Sign in to FLORA.
Open Settings → API Keys. If your workspace belongs to an organization, open Settings, choose the workspace under Workspaces, and select API Keys under Security.
Click Create API Key, give it a name, and choose the workspaces it can reach and its permissions in each.
Copy the key from the API Key Created dialog right away. It isn't shown again.
Store it in a secrets manager or an environment variable such as
FLORA_API_KEY.
Workspace admins can always create keys. Whether editors can depends on two settings:
Allow editors to create API keys, under Access & Permissions in the workspace's settings, lets editors create keys for that workspace.
Only admins can create API keys, under Settings → Workspaces → All → API key access, overrides every workspace in an organization. While it's on, editors can't create keys in any of the organization's workspaces, and the workspace setting is locked. Keys that already exist keep working. Only organization admins see this setting.
The same dialog shows the webhook signing secret (whsec_...) for each workspace the key covers. Keep it if you plan to use webhooks.
If API Keys is missing from Settings or asks you to upgrade, your plan doesn't include API access. See How FLORA pricing works.
Permissions
You choose permissions per workspace when you create the key. They're independent: write doesn't imply read.
Read
List and get endpoints: Techniques, projects, workspaces, assets, models, runs
Write
Create, update and delete; uploads; starting generations and Technique runs (billed to the workspace in US dollars)
Billing
Organization usage and usage exports for the organization that owns the workspace
GET /workspaces lists the workspaces where the key has read. A Technique list without workspace_id uses the key's default workspace; pass workspace_id to list another workspace the key covers. Keys created before per-workspace permissions existed keep full access to their original workspace.
What a key can't do:
Manage billing, plans or members. Use the FLORA app.
Open an agent session on a project (
POST /projects/{projectId}/agent-session) if the key carries per-workspace permissions. Use OAuth, or a key created before per-workspace permissions existed.
A request outside the key's permissions returns 403 forbidden. See Errors.
Active key limit
You can hold up to five active API keys, and their workspaces may overlap. To rotate a key without downtime:
Create the new key.
Switch your applications to it.
Revoke the old key.
Use the key
Request IDs
Every response includes a Flora-Request-Id header that identifies the call in FLORA's logs. Capture it with curl -i:
Include it whenever you contact support about a specific request.
Revoke a key
In API Keys, click Revoke next to the key. It stops working right away: later requests with it return 401 with the code unauthorized or invalid_api_key. Revoking can't be undone; create a new key to restore access.
Suspected compromise
If you think a key has leaked:
Revoke it right away in FLORA.
Create a new key and update your applications.
Email [email protected] so FLORA can review recent activity on the old key.
If the key reached a public repo, treat it as compromised even after you scrub the history, because secret scanners may already have copied it.
Security best practices
Server-side only. Never ship a key in a mobile app, a single-page app, or anything a user downloads.
Environment variables or a secrets manager. Never hard-code keys.
Least privilege. Give each key only the workspaces and permissions it needs. A reporting job needs read or billing, not write.
Separate environments. Use different keys, and ideally different workspaces, for staging and production.
Rotate regularly, for example every 90 days, even without a known leak.
Related
Errors:
401 unauthorized,401 invalid_api_keyand403 forbidden.Idempotency: retry safely without duplicate runs.
FLORA MCP authentication: OAuth for AI clients.
Last updated
Was this helpful?