# Techniques

## Get a technique

`$ flora techniques retrieve`

**get** `/techniques/{techniqueId}`

Returns the public definition for one technique, including its input and output schema used to start runs.

### Parameters

- `--technique-id: string`

  Technique identifier or slug

### Returns

- `TechniqueGetResponse: object { inputs, name, outputs, 3 more }`

  - `inputs: array of object { id, name, type, 3 more }`

    - `id: string`

      Technique input or output identifier

    - `name: string`

      Technique input or output display name

    - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

      Technique input or output media type

      - `"imageUrl"`

      - `"videoUrl"`

      - `"audioUrl"`

      - `"text"`

      - `"documentUrl"`

    - `description: optional string`

      Technique input or output description

    - `specified_aspect_ratio: optional string`

      Required aspect ratio

    - `specified_duration: optional number`

      Required duration in seconds

  - `name: string`

    Technique name

  - `outputs: array of object { id, name, type, 3 more }`

    - `id: string`

      Technique input or output identifier

    - `name: string`

      Technique input or output display name

    - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

      Technique input or output media type

      - `"imageUrl"`

      - `"videoUrl"`

      - `"audioUrl"`

      - `"text"`

      - `"documentUrl"`

    - `description: optional string`

      Technique input or output description

    - `specified_aspect_ratio: optional string`

      Required aspect ratio

    - `specified_duration: optional number`

      Required duration in seconds

  - `run_cost: number`

    Cost per run in USD

  - `technique_id: string`

    Technique identifier

  - `description: optional string`

    Technique description

### Example

```cli
flora techniques retrieve \
  --api-key 'My API Key' \
  --technique-id art-directors-critique
```

#### Response

```json
{
  "inputs": [
    {
      "id": "prompt",
      "name": "Prompt",
      "type": "imageUrl",
      "description": "Describe the desired image.",
      "specified_aspect_ratio": "1:1",
      "specified_duration": 0
    }
  ],
  "name": "Editorial Image Grid",
  "outputs": [
    {
      "id": "prompt",
      "name": "Prompt",
      "type": "imageUrl",
      "description": "Describe the desired image.",
      "specified_aspect_ratio": "1:1",
      "specified_duration": 0
    }
  ],
  "run_cost": 0,
  "technique_id": "tech_abcd1234",
  "description": "Generate a cohesive editorial image grid."
}
```

## List techniques

`$ flora techniques list`

**get** `/techniques`

Returns reusable Flora techniques visible to the authenticated public API key. Use workspace_id, query, cursor, and limit to filter the catalog.

### Parameters

- `--cursor: optional string`

  Opaque cursor for fetching the next page

- `--limit: optional number`

  Maximum number of results to return

- `--query: optional string`

  Search query

- `--workspace-id: optional string`

  Workspace identifier

### Returns

- `unnamed_schema_0: object { meta, techniques }`

  - `meta: object { next_cursor, total_estimate }`

    - `next_cursor: string`

      Opaque cursor for fetching the next page

    - `total_estimate: optional number`

      Estimated total matching items

  - `techniques: array of object { inputs, name, outputs, 3 more }`

    - `inputs: array of object { id, name, type, 3 more }`

      - `id: string`

        Technique input or output identifier

      - `name: string`

        Technique input or output display name

      - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

        Technique input or output media type

        - `"imageUrl"`

        - `"videoUrl"`

        - `"audioUrl"`

        - `"text"`

        - `"documentUrl"`

      - `description: optional string`

        Technique input or output description

      - `specified_aspect_ratio: optional string`

        Required aspect ratio

      - `specified_duration: optional number`

        Required duration in seconds

    - `name: string`

      Technique name

    - `outputs: array of object { id, name, type, 3 more }`

      - `id: string`

        Technique input or output identifier

      - `name: string`

        Technique input or output display name

      - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

        Technique input or output media type

        - `"imageUrl"`

        - `"videoUrl"`

        - `"audioUrl"`

        - `"text"`

        - `"documentUrl"`

      - `description: optional string`

        Technique input or output description

      - `specified_aspect_ratio: optional string`

        Required aspect ratio

      - `specified_duration: optional number`

        Required duration in seconds

    - `run_cost: number`

      Cost per run in USD

    - `technique_id: string`

      Technique identifier

    - `description: optional string`

      Technique description

### Example

```cli
flora techniques list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "techniques": [
    {
      "technique_id": "tech_art-directors-critique",
      "name": "Art Director's Critique",
      "description": "Analyze, critique, and redesign any creative asset.",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_auto-translate",
      "name": "Auto Translate",
      "description": "Translate text in images instantly",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_book-drop",
      "name": "Book Drop",
      "description": "Mocks up front and back book covers",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_cctv-cam",
      "name": "CCTV Cam",
      "description": "Any face, CCTV style",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_character-lock",
      "name": "Character Lock",
      "description": "One character, 6 different angles",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_cinematic-movie-generator",
      "name": "Cinematic Movie Stills",
      "description": "Generate film-quality scene stills",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_color-mapping",
      "name": "Segment Mapper",
      "description": "Color-codes every element in your image",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_color-transfer",
      "name": "Color Transfer",
      "description": "Apply color grading from any reference",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_earth-zoom-out",
      "name": "Earth Zoom Out",
      "description": "Zoom out to space from any scene",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_facade-swap",
      "name": "Facade Swap",
      "description": "Reskin buildings with new materials",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_fit-checks",
      "name": "Fit Check",
      "description": "Extract outfits & swap onto new looks",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_glam-shots",
      "name": "Glam Shots",
      "description": "Create polished makeup ads instantly",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_icon-pack",
      "name": "Icon Pack",
      "description": "Generate matched icon sets from a prompt",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_live-like-an-amsterdammer",
      "name": "Live like an Amsterdammer",
      "description": "Places you into everyday Amsterdam scenes",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_location-scouter",
      "name": "Location Scout",
      "description": "Scouts five views from a single location",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_logo-stylist",
      "name": "Logo Stylist",
      "description": "Stylize any logo with a new visual twist",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_memoji-me",
      "name": "Memoji Me",
      "description": "Turn any face into a custom memoji",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_moodboard-maker",
      "name": "Mood Board Maker",
      "description": "Eclectic mood board from a photo",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_mugshot",
      "name": "Mugshot",
      "description": "Turn any portrait into a mugshot",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_palette-pull",
      "name": "Palette Pull",
      "description": "Extract color palettes from any image",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_product-animator",
      "name": "Product Animator",
      "description": "Animate your product",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_product-lookbook-grid",
      "name": "Product Lookbook Grid",
      "description": "Turn products into styled grid layouts",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_product-motion",
      "name": "Product Motion",
      "description": "Animate product shots in one click",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_quick-reframe",
      "name": "Layout Resizer",
      "description": "Resize layouts for any aspect ratio",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_relight-technique",
      "name": "Relighting",
      "description": "Relights your photo",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_room-render",
      "name": "Room Render",
      "description": "Turn floor plans into realistic rooms",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_seamless-transition",
      "name": "Seamless Transition",
      "description": "Animate between any two frames",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_sigil",
      "name": "Sigil",
      "description": "Turns any image into an animated glyph",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_sketch-to-garment",
      "name": "Garment Sketch",
      "description": "One sketch, one final garment.",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_studio-blur",
      "name": "Studio Blur",
      "description": "Add pro depth-of-field blur to photos",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_studio-shot",
      "name": "Studio Shot",
      "description": "Turns any product into a studio-lit shoot",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_tarot-pull",
      "name": "Tarot Pull",
      "description": "Custom illustrated tarot card readings",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_texture-matchers",
      "name": "Texture Match",
      "description": "Replicate textures & colors across assets",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_turn-any-product-into-4-ad-visuals",
      "name": "Turn any product into 4 ad visuals",
      "description": "Make a full ad campaign from 1 product",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_ugc-creation",
      "name": "UGC Creator",
      "description": "Casual, phone-shot clips of your product",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_video-scene-builder",
      "name": "Video Scene Builder",
      "description": "Compose video scenes from still assets",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_wireframe",
      "name": "Photo Wireframe",
      "description": "Turn any photo into a clean wireframe",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    },
    {
      "technique_id": "tech_wonder-fy",
      "name": "Wonder(fy)",
      "description": "Apply Wonder's cinematic style to images",
      "run_cost": 0,
      "inputs": [],
      "outputs": []
    }
  ],
  "meta": {
    "next_cursor": null
  }
}
```

# Runs

## Start a technique run

`$ flora techniques:runs create`

**post** `/techniques/{techniqueId}/runs`

Starts a run for a specific technique using the backward-compatible nested route. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

### Parameters

- `--technique-id: string`

  Technique identifier or slug

- `--input: array of object { id, type, value }`

  Technique inputs

- `--mode: "async" or "stream"`

  Technique run execution mode

- `--callback-url: optional string`

  HTTPS callback URL for asynchronous run completion notifications

- `--idempotency-key: optional string`

  Idempotency key for safely retrying requests

### Returns

- `TechniqueRunNewResponse: object { created_at, progress, run_id, 8 more }`

  - `created_at: number`

  - `progress: number`

  - `run_id: string`

    Run identifier

  - `status: "pending" or "running" or "completed" or "failed"`

    - `"pending"`

    - `"running"`

    - `"completed"`

    - `"failed"`

  - `charged_cost: optional number`

    Cost charged in USD

  - `completed_at: optional number`

  - `error_code: optional string`

    Machine-readable run error code

  - `error_message: optional string`

    Human-readable run error message

  - `outputs: optional array of object { output_id, type, url }`

    - `output_id: string`

      Run output identifier

    - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

      Run output media type

      - `"imageUrl"`

      - `"videoUrl"`

      - `"audioUrl"`

      - `"text"`

      - `"documentUrl"`

    - `url: string`

      Run output URL or text content

  - `poll_url: optional string`

    URL to poll pending/running runs or fetch completed/failed run details.

  - `started_at: optional number`

### Example

```cli
flora techniques:runs create \
  --api-key 'My API Key' \
  --technique-id art-directors-critique \
  --input '{id: id, type: text, value: value}' \
  --mode async
```

#### Response

```json
{
  "created_at": 0,
  "progress": 0,
  "run_id": "run_abc123",
  "status": "pending",
  "charged_cost": 0,
  "completed_at": 0,
  "error_code": "provider_error",
  "error_message": "The provider failed to complete the generation.",
  "outputs": [
    {
      "output_id": "output_1",
      "type": "imageUrl",
      "url": "https://media.flora.ai/output.png"
    }
  ],
  "poll_url": "https://example.com",
  "started_at": 0
}
```

## List technique run history

`$ flora techniques:runs list`

**get** `/technique-runs`

Lists technique run history for the authenticated caller, including pending, running, completed, and failed technique runs. Results are newest first and can be filtered by workspace_id, project_id, technique_id, and status. Each item includes poll_url; use it to poll pending/running technique runs and to fetch completed or failed run details and outputs.

### Parameters

- `--cursor: optional string`

  Opaque cursor for fetching the next page

- `--limit: optional number`

  Maximum number of results to return

- `--project-id: optional string`

  Project identifier

- `--status: optional "pending" or "running" or "completed" or "failed"`

  Run status filter

- `--technique-id: optional string`

  Technique identifier

- `--workspace-id: optional string`

  Workspace identifier

### Returns

- `unnamed_schema_1: object { meta, technique_runs }`

  - `meta: object { next_cursor, total_estimate }`

    - `next_cursor: string`

      Opaque cursor for fetching the next page

    - `total_estimate: optional number`

      Estimated total matching items

  - `technique_runs: array of object { created_at, progress, project_id, 12 more }`

    - `created_at: number`

    - `progress: number`

    - `project_id: string`

      Project identifier

    - `run_id: string`

      Run identifier

    - `status: "pending" or "running" or "completed" or "failed"`

      - `"pending"`

      - `"running"`

      - `"completed"`

      - `"failed"`

    - `technique: object { name, technique_id }`

      - `name: string`

        Technique name

      - `technique_id: string`

        Technique identifier

    - `technique_run_id: string`

      Run identifier

    - `workspace_id: string`

      Workspace identifier

    - `charged_cost: optional number`

      Cost charged in USD

    - `completed_at: optional number`

    - `error_code: optional string`

      Machine-readable run error code

    - `error_message: optional string`

      Human-readable run error message

    - `outputs: optional array of object { output_id, type, url }`

      - `output_id: string`

        Run output identifier

      - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

        Run output media type

        - `"imageUrl"`

        - `"videoUrl"`

        - `"audioUrl"`

        - `"text"`

        - `"documentUrl"`

      - `url: string`

        Run output URL or text content

    - `poll_url: optional string`

      URL to poll pending/running runs or fetch completed/failed run details.

    - `started_at: optional number`

### Example

```cli
flora techniques:runs list \
  --api-key 'My API Key'
```

#### Response

```json
{
  "meta": {
    "next_cursor": "eyJvZmZzZXQiOjIwfQ",
    "total_estimate": 0
  },
  "technique_runs": [
    {
      "created_at": 0,
      "progress": 0,
      "project_id": "prj_abc123",
      "run_id": "run_abc123",
      "status": "pending",
      "technique": {
        "name": "name",
        "technique_id": "tech_abcd1234"
      },
      "technique_run_id": "run_abc123",
      "workspace_id": "ws_abc123",
      "charged_cost": 0,
      "completed_at": 0,
      "error_code": "provider_error",
      "error_message": "The provider failed to complete the generation.",
      "outputs": [
        {
          "output_id": "output_1",
          "type": "imageUrl",
          "url": "https://media.flora.ai/output.png"
        }
      ],
      "poll_url": "https://example.com",
      "started_at": 0
    }
  ]
}
```

## Get a technique run

`$ flora techniques:runs retrieve`

**get** `/techniques/{techniqueId}/runs/{runId}`

Returns status, progress, outputs, and error details for a technique run when it is accessible to the authenticated public API key.

### Parameters

- `--technique-id: string`

  Technique identifier or slug

- `--run-id: string`

  Run identifier

### Returns

- `TechniqueRunGetResponse: object { created_at, progress, run_id, 8 more }`

  - `created_at: number`

  - `progress: number`

  - `run_id: string`

    Run identifier

  - `status: "pending" or "running" or "completed" or "failed"`

    - `"pending"`

    - `"running"`

    - `"completed"`

    - `"failed"`

  - `charged_cost: optional number`

    Cost charged in USD

  - `completed_at: optional number`

  - `error_code: optional string`

    Machine-readable run error code

  - `error_message: optional string`

    Human-readable run error message

  - `outputs: optional array of object { output_id, type, url }`

    - `output_id: string`

      Run output identifier

    - `type: "imageUrl" or "videoUrl" or "audioUrl" or 2 more`

      Run output media type

      - `"imageUrl"`

      - `"videoUrl"`

      - `"audioUrl"`

      - `"text"`

      - `"documentUrl"`

    - `url: string`

      Run output URL or text content

  - `poll_url: optional string`

    URL to poll pending/running runs or fetch completed/failed run details.

  - `started_at: optional number`

### Example

```cli
flora techniques:runs retrieve \
  --api-key 'My API Key' \
  --technique-id art-directors-critique \
  --run-id run_abc123
```

#### Response

```json
{
  "created_at": 0,
  "progress": 0,
  "run_id": "run_abc123",
  "status": "pending",
  "charged_cost": 0,
  "completed_at": 0,
  "error_code": "provider_error",
  "error_message": "The provider failed to complete the generation.",
  "outputs": [
    {
      "output_id": "output_1",
      "type": "imageUrl",
      "url": "https://media.flora.ai/output.png"
    }
  ],
  "poll_url": "https://example.com",
  "started_at": 0
}
```
