Skip to content

Start an action run

POST
/runs/action
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const action = await client.actions.run({
action_id: '<action_id>',
workspace_id: 'ws_abc123',
project_id: 'prj_abc123',
inputs: [
{
type: 'image',
},
],
});
console.log(action);

Starts a headless prebuilt action run using raw action slugs such as rotate-image, workspace_id, project_id, and non-empty inputs. Direct action runs do not create or mutate canvas nodes. Mutating public API requests support an optional Idempotency-Key header for client retries; duplicate keys within two hours return idempotency_duplicate.

Error responses use the standard error body.

Media type application/json
Any of:
object
action_id
required
Allowed value: color-grade-image-browser
workspace_id
required

Workspace identifier. Use the public API ID returned by list workspaces; it must start with ws_.

string
/^ws_\S+$/
project_id
required

Project identifier. Use the public API ID returned by list projects; it must start with prj_. Used for ownership, billing, and run history. Direct action runs do not mutate the project canvas.

string
/^prj_\S+$/
inputs
required

Action inputs. Direct action runs are headless and read inputs from URLs/text rather than canvas edges.

Array<object>
>= 1 items
object
type
required

Action input type

string
Allowed values: image video audio text model3d
url

Input media URL

string format: uri
asset_id

Asset identifier for model3d inputs

string
/^asset_\S+$/
text

Input text value

string
name

Optional input name

string
params

Action parameters

object
warmth

Warmth

number
>= -0.5 <= 0.5
contrast

Contrast

number
>= 0.5 <= 2
saturation

Saturation

number
<= 2
brightness

Brightness

number
>= 0.5 <= 1.5
highlights

Highlights

number
>= -1 <= 1
shadows

Shadows

number
>= -1 <= 1
tint

Tint (Green-Magenta)

number
>= -1 <= 1
hue_shift

Hue Shift (deg)

number
>= -180 <= 180
advanced

Show additional controls

boolean
show_scope

Show Color Scope in preview

boolean

Action run started.

Media type application/json
object
run_id
required

Run identifier

string
/^run_\S+$/
type
required

Run type

string
Allowed values: generation technique action
model
Any of:
object
model_id
required

Model identifier

string
>= 1 characters
technique
Any of:
object
technique_id
required

Technique identifier

string
/^tech_\S+$/
name
required

Technique name

string
action
Any of:
object
action_id
required

Action identifier

string
Allowed values: color-grade-image-browser overlay-image-browser draw-image-browser pixel-remover-image-browser magic-eraser-image-browser crop-image-browser scene-3d-image-browser blur-image-browser change-image-ar-browser rotate-image-browser color-filter-image-browser color-tint-image-browser filter-color-image-browser duplicate-image-browser side-by-side-composite-browser add-shape-to-image-browser add-text-to-image-browser qr-code-generator-browser resize-image-browser shader-effect-browser split-text-browser find-and-replace-text-browser concat-text-browser ken-burns-video stitch-videos split-video extract-video-frames color-grade-video video-to-frame-grid boomerang-video reverse-video video-to-long-exposure video-effect color-filter-video speed-up-video slow-down-video duplicate-video greenscreen-video resize-video change-video-ar split-audio-from-video merge-audio-into-video
estimated_seconds
required
Any of:
integer
charged_cost
required

Cost charged in USD

number
poll_url
Any of:
string format: uri
project_id
Any of:

Project identifier

string
/^prj_\S+$/
canvas_url
Any of:
string format: uri
warnings

Warnings for accepted input (unknown parameters and applied preprocessing changes)

Array<object>
object
code
required

Stable warning code

string
message
required

Human-readable warning message

string
field

Feature or parameter the warning relates to

string
Example
{
"run_id": "run_abc123",
"type": "generation",
"model": {
"model_id": "t2i-flux-2-pro"
},
"technique": {
"technique_id": "tech_abcd1234"
},
"action": {
"action_id": "color-grade-image-browser"
},
"project_id": "prj_abc123"
}