Skip to content

Run a canvas action

POST
/projects/{projectId}/actions/{nodeId}/run
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const action = await client.projects.actions.run({
projectId: '<projectId>',
nodeId: '<nodeId>',
params: {},
state: '<state>',
});
console.log(action);

Runs an existing canvas action node, prebuilt or custom, through the action execution workflow. Pass params to update the node’s stored parameter values first; the run uses the merged values.

Error responses use the standard error body.

projectId
required

Project identifier

string
/^prj_\S+$/

Project identifier

nodeId
required

Canvas action node identifier: the persisted short id (n7) or the node UUID

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

Canvas action node identifier: the persisted short id (n7) or the node UUID

Media type application/json
object
params

Parameter values to store on the node before running, merged key by key into the values it already holds (a named key is overwritten, omitted keys survive). Keys as GET /projects/{projectId}/actions/{nodeId} lists them.

object
key
additional properties
any
state

Interaction state committed by the action’s live preview (JSON, at most 256 KiB), replayed by the run exactly as the canvas replays a node’s own state. Only meaningful for browser-runtime actions; omit otherwise.

Example generated
{
"params": {},
"state": "example"
}

Canvas 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"
}