Skip to content

Techniques

Techniques are reusable FLORA workflows. Each technique defines the inputs it accepts, the outputs it returns, and the per-run cost in USD.

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

Response:

{
"techniques": [
{
"technique_id": "tech_...",
"slug": "cctv-cam",
"name": "CCTV Cam"
}
],
"meta": {
"limit": 5
}
}
Terminal window
curl https://app.flora.ai/api/v1/techniques/cctv-cam \
-H "Authorization: Bearer ak_XXXX"

Response fields include the technique ID, name, description, inputs, outputs, and run_cost (per-run cost in USD). The most important field for creating runs is inputs:

{
"technique_id": "tech_...",
"name": "CCTV Cam",
"run_cost": 0.05,
"inputs": [{ "id": "input_image", "name": "Input Image", "type": "imageUrl" }]
}

Match each input id and type exactly when creating a run.

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

The response includes a run_id and poll_url.

MethodPathDescription
GET/api/v1/techniques?limit=5List techniques
GET/api/v1/techniques/{slug}Retrieve a technique schema
POST/api/v1/techniques/{slug}/runsCreate a run for a technique
GET/api/v1/techniques/{slug}/runs/{runId}Poll a technique run
TypeValue
imageUrl or image_urlHTTPS image URL
videoUrl or video_urlHTTPS video URL
textPlain text prompt or content
  • For slug routes such as POST /techniques/{slug}/runs, use the technique slug in the path and match the retrieved inputs schema exactly.
  • For top-level run routes such as POST /runs/technique, pass technique_id from GET /techniques; it must start with tech_.
  • workspace_id is required for top-level technique runs and must start with ws_.
  • You can find a technique slug in the FLORA app URL: /techniques/{slug}.
  • Technique inputs vary by workflow. Always retrieve the technique before constructing a run payload.
  • Use idempotency_key when retrying client requests so duplicate submissions do not create duplicate work.
  • Technique runs are async and polling-only — streaming and webhooks aren’t available yet. Poll the returned poll_url every 2–5 seconds until the run reaches completed or failed.
  • Techniques are authored in FLORA’s visual workflow editor, not via the API. The API runs an existing technique by its slug.