Skip to content

Get a technique

GET
/techniques/{techniqueId}
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const technique = await client.techniques.retrieve({
techniqueId: '<techniqueId>',
});
console.log(technique);

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

Error responses use the standard error body.

techniqueId
required

Technique identifier or slug

string
>= 1 characters /^\S+$/

Technique identifier or slug

Technique returned.

Media type application/json
object
technique_id
required

Technique identifier

string
/^tech_\S+$/
name
required

Technique name

string
description

Technique description

string
run_cost
required

Cost per run in USD

number
inputs
required
Array<object>
object
id
required

Technique input or output identifier

string
name
required

Technique input or output display name

string
type
required

Technique input or output media type

string
Allowed values: imageUrl videoUrl audioUrl text documentUrl model3dUrl
description

Technique input or output description

string
specified_aspect_ratio

Required aspect ratio

string
specified_duration

Required duration in seconds

number
optional

When true, this input may be omitted when running the technique

boolean
allow_multiple

When true, multiple values may be provided for this input (one run per value)

boolean
accepts_element

When true, fill this input by passing an element id as the input value

boolean
outputs
required
Array<object>
object
id
required

Technique input or output identifier

string
name
required

Technique input or output display name

string
type
required

Technique input or output media type

string
Allowed values: imageUrl videoUrl audioUrl text documentUrl model3dUrl
description

Technique input or output description

string
specified_aspect_ratio

Required aspect ratio

string
specified_duration

Required duration in seconds

number
optional

When true, this input may be omitted when running the technique

boolean
allow_multiple

When true, multiple values may be provided for this input (one run per value)

boolean
accepts_element

When true, fill this input by passing an element id as the input value

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