Skip to content
For the complete documentation index, see llms.txt. This page is also available as Markdown.

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/v1

Every 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_XXXX

Keys 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.

API keys are available on workspaces whose plan includes API access. If API Keys is missing from Settings or asks you to upgrade, see How FLORA pricing works.

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.

Resource
Prefix
Where to get it

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

Recipes

Reference

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?