FLORA API documentation
Call FLORA from your own code: authenticate with an API key, install the TypeScript SDK, make your first request, and find every API guide.
The FLORA API lets your own code do what you do on the canvas: run Techniques, start one-off generations, upload assets, and read projects, models and usage. Use it for scripts, back-end jobs and integrations; if you want an AI client such as Claude, ChatGPT or Cursor to drive FLORA for you, FLORA MCP is the easier path.
Base URL
https://app.flora.ai/api/v1Every endpoint takes and returns JSON, except direct file uploads, which use multipart/form-data.
Authentication
Create an API key in Settings → API Keys in FLORA and send it as a bearer token on every request:
Authorization: Bearer ak_XXXXKeys are shown once, carry per-workspace read, write and billing permissions, and must stay on your server. See Authentication for creating, rotating and revoking keys.
Install the SDK
npm install @flora-ai/flora@^0.21.1
export FLORA_API_KEY="ak_XXXX"The examples in these docs need @flora-ai/flora 0.21 or later. The SDK is a typed wrapper around the REST API. The TypeScript quickstart has the details, and the CLI quickstart covers the terminal.
Your first request
List your workspaces and the image models you can use, with each model's base price in US dollars:
Nothing here costs money. To run something, follow the TypeScript quickstart or start a generation.
Public ID prefixes
The API uses prefixed public IDs. Pass them exactly as returned; an ID with the wrong prefix fails with input_validation_error.
Workspace
ws_
GET /workspaces
Project
prj_
GET /projects?workspace_id=ws_...
Technique
tech_ (or use the slug)
GET /techniques
Run
run_
Run and generation responses
Asset
asset_
Asset responses
Organization
org_
organization_id on GET /workspaces
LoRA Style
sty_
POST /loras/train
Money
Prices and charges come back in US dollars. A Technique's run_cost, a run's charged_cost, a model's estimated_cost_usd and a generation quote's estimated_cost are all dollar amounts (0.04 means $0.04). If a workspace can't cover a run, the API returns 402 insufficient_credits; see Errors.
Documentation map
Quickstarts
TypeScript: install the SDK and run your first Technique.
CLI: run a Technique from the terminal.
Platform
Authentication: create, scope, rotate and revoke API keys.
Errors: every error code and how to recover.
Idempotency: retry requests without starting duplicate runs.
Webhooks: get a signed callback when a run finishes.
Resources
Assets: upload, retrieve, retry and attach media.
Feedback: report bugs and missing capabilities.
Generations: run a single model without a Technique.
Train and use LoRA Styles: train a Style and generate with it.
Models: list model IDs and prices.
Organization usage: read or export spend across workspaces.
Projects: create, list and read projects.
Techniques: read a Technique's inputs and start runs.
Workspaces: list the workspaces your key can reach.
Recipes
Generate a grid: run a Technique several times and lay out the results.
Iterate on outputs: feed favorite outputs back in as references.
Upload an asset: turn a local file into a FLORA URL for a run.
Batch from a CSV: process a spreadsheet with retries and backoff.
Reference
FLORA API reference: every endpoint, parameter and response.
Get help
Email [email protected] with the Flora-Request-Id response header, the endpoint and method, the error code and message, and the approximate time (UTC). See Errors.
Last updated
Was this helpful?