Techniques
Find a FLORA Technique, read its inputs and price per run, start runs with the API, and poll or list them.
Techniques are reusable FLORA workflows. Each one defines the inputs it accepts, the outputs it returns, and its cost per run in US dollars, so your code can run the same workflow your team built on the canvas. Most are built in the Technique Builder; see Techniques for how they work in the app.
List Techniques
curl "https://app.flora.ai/api/v1/techniques?limit=5" \
-H "Authorization: Bearer $FLORA_API_KEY"Response:
{
"techniques": [
{
"technique_id": "tech_abc123",
"name": "CCTV Cam",
"description": "...",
"run_cost": 0.05,
"inputs": [{ "id": "input_image", "name": "Input Image", "type": "imageUrl" }],
"outputs": [{ "id": "output_image", "name": "Output Image", "type": "imageUrl" }]
}
],
"meta": { "next_cursor": null }
}Filter with workspace_id or query, and page with cursor. Without workspace_id, the list uses your key's default workspace.
Retrieve a Technique
Anywhere the API takes a Technique, you can pass its slug (the last part of its URL in FLORA, https://app.flora.ai/techniques/{slug}) or its tech_ ID:
run_cost is the price of one run in US dollars. Each input has an id, a type, and may be marked optional or allow_multiple.
Start a run
Send one entry per input, matching each id and type exactly:
The response includes a run_id, its status and a poll_url. Optional fields:
idempotency_key
Reusing the key in the same workspace returns the run it first created. See Idempotency
callback_url
An HTTPS URL that gets a signed callback when the run finishes. See Webhooks
If the workspace can't cover run_cost, the API returns 402 insufficient_credits and starts nothing.
Poll for the result
Read the run at its poll_url (GET /techniques/{slug}/runs/{runId}) until status is completed or failed. Each poll counts against your workspace's rate limit, so wait about 15 seconds between polls. Or skip polling with a webhook.
A completed run has outputs[] with a url each and its charged_cost in US dollars. A failed run has error_code and error_message. GET /technique-runs lists recent runs, newest first, filtered by workspace_id, project_id, technique_id or status.
Input types
text
Plain text
imageUrl
A public https:// image URL
videoUrl
A public https:// video URL
model3dUrl
A public https:// 3D model URL
Media URLs are passed to model providers to download, so they must be public HTTPS URLs; http://, localhost and private addresses are rejected. The most reliable choice is a FLORA asset URL: see Upload an asset.
Common endpoints
Common validation issues
Put the slug or
tech_ID in the path and match the retrievedinputsexactly. Every required input must be present, and input IDs the Technique doesn't have are rejected.Each input's
typemust match the Technique's:text,imageUrl,videoUrlormodel3dUrl.Media inputs must be public
https://URLs.
Notes
Inputs vary by Technique. Always read the Technique before you build a run payload.
Running Techniques from an AI client? See Run your team's Technique.
Last updated
Was this helpful?