Skip to content
FLORA DocsGo to app
Get started

Getting Started

Start using the FLORA API to run techniques programmatically.

The FLORA API lets you interact with your creative canvas programmatically. Let’s walk through an example of how to use it to look up a technique, inspect its inputs, submit a run, and poll for results.

Base URL: https://app.flora.ai

  1. Sign in to FLORA.
  2. Open Settings > API Keys, or go directly to https://app.flora.ai/projects?openSettings=true&initialTab=apiKeys.
  3. Click Create API Key, give it a name, and copy the secret immediately. It is shown only once.
  4. You can only have one active key at a time. To rotate keys, revoke the old key first.

Use the key in every request:

Authorization: Bearer sk_live_XXXX

Every technique has a slug: a short, URL-safe identifier. You can find it in the URL when you open a technique in FLORA:

https://app.flora.ai/techniques/portrait-enhancer
^^^^^^^^^^^^^^^^^^
this is the slug

You can also list techniques:

Terminal window
curl "https://app.flora.ai/api/v1/techniques?limit=5" \
-H "Authorization: Bearer sk_live_XXXX"

Any technique you’ve built with the technique builder or that is available in your techniques dashboard can be used via the API.

Before running a technique, fetch its details to see the required inputs, expected outputs, and credit cost:

Terminal window
curl https://app.flora.ai/api/v1/techniques/{slug} \
-H "Authorization: Bearer sk_live_XXXX"

Example response:

{
"techniqueId": "abc123...",
"name": "Portrait Enhancer",
"description": "Enhance portrait photos with AI",
"runCost": 5,
"inputs": [
{ "id": "input_image", "name": "Input Image", "type": "imageUrl" }
],
"outputs": [
{ "id": "output_image", "name": "Output Image", "type": "imageUrl" }
]
}

Use the inputs array to build your run request. Match each input id and type exactly.

Terminal window
curl -X POST https://app.flora.ai/api/v1/techniques/{slug}/runs \
-H "Authorization: Bearer sk_live_XXXX" \
-H "Content-Type: application/json" \
-d '{
"inputs": [
{ "id": "input_image", "type": "imageUrl", "value": "https://example.com/photo.jpg" }
],
"mode": "async"
}'

Response:

{
"runId": "j57abc...",
"createdAt": 1710000000000,
"status": "pending",
"progress": 0,
"pollUrl": "https://app.flora.ai/api/v1/techniques/{slug}/runs/j57abc..."
}
Terminal window
curl https://app.flora.ai/api/v1/techniques/{slug}/runs/{runId} \
-H "Authorization: Bearer sk_live_XXXX"

Poll every 2–5 seconds until status is completed or failed.

{
"runId": "j57abc...",
"status": "completed",
"progress": 100,
"createdAt": 1710000000000,
"startedAt": 1710000001000,
"completedAt": 1710000030000,
"chargedCost": 5,
"outputs": [
{ "outputId": "output_image", "type": "imageUrl", "url": "https://ik.imagekit.io/flora/..." }
]
}
MethodPathDescription
GET/api/v1/workspacesList workspaces available to your API key
GET/api/v1/projects?workspace_id={workspace_id}List projects in a workspace
POST/api/v1/assetsCreate an asset or reserve a signed upload
GET/api/v1/models?type=imageList available models
GET/api/v1/techniques/{slug}Get technique details, inputs, outputs, and cost
POST/api/v1/techniques/{slug}/runsCreate and start a technique run
GET/api/v1/techniques/{slug}/runs/{runId}Poll technique run status and results
FieldRequiredNotes
inputsYesMust match the technique’s expected inputs: count, IDs, and types
inputs[].idYesInput identifier from the technique’s inputs array
inputs[].typeYesUsually imageUrl, videoUrl, or text
inputs[].valueYesURL for images/videos, or text content
modeYesUse "async"
idempotency_keyNoPrevents duplicate runs on retry; the same key returns the existing run

Only HTTPS URLs are accepted (https://, not http://).

Supported hosts include Flora media, Google Cloud Storage, Amazon S3, and ImageKit URLs.

StatusMeaning
pendingQueued
runningIn progress; progress shows 0–100%
completedDone; check outputs and chargedCost
failedCheck errorCode and errorMessage

Errors return an object like { "error": { "code": "...", "message": "..." } }.

CodeHTTPMeaning
unauthorized401Missing auth header
invalid_api_key401Bad or revoked key
invalid_json400Malformed request body
input_validation_error400Wrong inputs for this technique
not_found404Bad resource ID, technique slug, or run ID
insufficient_credits402Out of credits
forbidden403Your key cannot perform this action
  • Async polling only: no streaming or webhooks yet.
  • Output URLs are long-lived but not permanent. Download anything you need to keep.
  • One API key can be active at a time.
  • The technique builder is in beta. Build techniques in FLORA’s visual workflow editor, then call them via the API using their slug.

If you need help, send us the request ID from the response headers. You can capture headers with curl -i:

Terminal window
curl -i https://app.flora.ai/api/v1/techniques/cctv-cam \
-H "Authorization: Bearer sk_live_XXXX"

Include the request ID, the endpoint you called, and the approximate time of the request when you contact support.