Skip to content

Get a canvas action

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

Describes one canvas action node: its declared inputs, outputs and parameter controls (for a custom action, parsed from its code), the parameter values stored on the node, and the nodes wired into it.

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

Canvas action.

Media type application/json
object
project_id
required

Project identifier

string
/^prj_\S+$/
node_id
required

Canvas action node UUID

string
>= 1 characters
short_id
required
Any of:
string
action_id
required
Any of:

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
custom
required

True when the node runs its own code rather than a prebuilt action

boolean
name
required

Action name

string
description
required

Action description

string
language
required

Action source language

string
Allowed values: javascript python
runtime
required

Where the action executes: a server sandbox (node, python) or the browser runtime (browser), which a host can also run live

string
Allowed values: node python browser
has_preview
required

True when the code is a browser-runtime module exporting preview, so a host can mount it live and re-render edits without a run

boolean
code
required
Any of:

The action’s source. For a browser-runtime action, mount it in the FLORA action runtime frame for a live preview; a run replays the same code on the server.

string
tool_state
Any of:
charged_cost
required

Cost per execution in USD

number
locked
required

True when the node is locked and cannot be run or edited

boolean
inputs
required

Action input slots

Array<object>
object
name
required

Action input or output name

string
type
required

Action input or output media type

string
Allowed values: image video text audio model3d
dynamic

Deprecated alias for multiple: true. Mirrors multiple for back-compat.

boolean
optional

Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).

boolean
multiple
Any of:
outputs
required

Action output slots

Array<object>
object
name
required

Action input or output name

string
type
required

Action input or output media type

string
Allowed values: image video text audio model3d
dynamic

Deprecated alias for multiple: true. Mirrors multiple for back-compat.

boolean
optional

Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).

boolean
multiple
Any of:
params
required

Action parameters (snake_case keys)

Array<object>
object
key
required

Action parameter key

string
type
required

Action parameter control type

string
label

Action parameter label

string
info_tooltip

Action parameter description

string
default_value

Default parameter value

available_values

Allowed parameter values

Array<object>
object
value
required
string
label
required
string
description
string
min_number_value

Lowest accepted number

number
max_number_value

Highest accepted number

number
number_step

Step between accepted numbers

number
placeholder

Placeholder shown in an empty text control

string
max_count

For colorList controls: how many colors the value may hold

integer
visible_if

Conditions under which a control is shown, all of which must hold. Keys are the snake_case keys of this same params list.

Array<object>
object
key
required

Key of the parameter this condition reads

string
equals
Any of:
string
not_equals
Any of:
string
point2d_min

Per-axis minimum for point2d values

object
x

Bound on the x axis

number
y

Bound on the y axis

number
z

Bound on the z axis (point3d only)

number
point2d_max

Per-axis maximum for point2d values

object
x

Bound on the x axis

number
y

Bound on the y axis

number
z

Bound on the z axis (point3d only)

number
point2d_step

Per-axis step for point2d values

object
x

Bound on the x axis

number
y

Bound on the y axis

number
z

Bound on the z axis (point3d only)

number
point3d_min

Per-axis minimum for point3d values

object
x

Bound on the x axis

number
y

Bound on the y axis

number
z

Bound on the z axis (point3d only)

number
point3d_max

Per-axis maximum for point3d values

object
x

Bound on the x axis

number
y

Bound on the y axis

number
z

Bound on the z axis (point3d only)

number
point3d_step

Per-axis step for point3d values

object
x

Bound on the x axis

number
y

Bound on the y axis

number
z

Bound on the z axis (point3d only)

number
param_values
required

Parameter values stored on the node, keyed like params[].key; defaults apply for missing keys

object
key
additional properties
any
connected_inputs
required

Nodes wired into this action, in edge order

Array<object>
object
node_id
required

Short id (n7) or UUID of the connected node

string
label
required
Any of:
string
type
required
Any of:
string
Allowed values: image video text audio model3d
url
required
Any of:
string
text
required
Any of:
string
canvas_url
required

Project canvas URL

string format: uri
Example
{
"project_id": "prj_abc123",
"node_id": "4d2f7c7e-1b1a-4c7f-9e1d-5b9d1f3b2c10",
"action_id": "color-grade-image-browser",
"name": "Poster palette",
"language": "javascript",
"runtime": "node",
"inputs": [
{
"name": "image",
"type": "image",
"multiple": true
}
],
"outputs": [
{
"name": "image",
"type": "image",
"multiple": true
}
],
"params": [
{
"key": "angle",
"type": "select",
"label": "Angle",
"info_tooltip": "Rotation angle in degrees."
}
],
"connected_inputs": [
{
"node_id": "n3",
"type": "image"
}
]
}