---
title: Techniques | FLORA API
description: Discover technique schemas and start technique runs.
---

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

## List techniques

Terminal window

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

Response:

```
{
  "techniques": [
    {
      "technique_id": "tech_...",
      "slug": "cctv-cam",
      "name": "CCTV Cam"
    }
  ],
  "meta": {
    "limit": 5
  }
}
```

## Retrieve a technique

Terminal window

```
curl https://app.flora.ai/api/v1/techniques/cctv-cam \
  -H "Authorization: Bearer sk_live_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.

## Start a technique run by slug

Terminal window

```
curl -X POST https://app.flora.ai/api/v1/techniques/cctv-cam/runs \
  -H "Authorization: Bearer sk_live_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`.

## Common endpoints

| Method | Path                                     | Description                  |
| ------ | ---------------------------------------- | ---------------------------- |
| GET    | `/api/v1/techniques?limit=5`             | List techniques              |
| GET    | `/api/v1/techniques/{slug}`              | Retrieve a technique schema  |
| POST   | `/api/v1/techniques/{slug}/runs`         | Create a run for a technique |
| GET    | `/api/v1/techniques/{slug}/runs/{runId}` | Poll a technique run         |

## Input types

| Type                      | Value                        |
| ------------------------- | ---------------------------- |
| `imageUrl` or `image_url` | HTTPS image URL              |
| `videoUrl` or `video_url` | HTTPS video URL              |
| `text`                    | Plain text prompt or content |

## Common validation issues

- 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_`.

## Notes

- 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](https://app.flora.ai), not via the API. The API runs an existing technique by its slug.
