Get an action
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const action = await client.actions.retrieve({ actionId: '<actionId>',});console.log(action);curl -X GET 'https://app.flora.ai/api/v1/actions/<actionId>' \ -H 'Authorization: Bearer $FLORA_API_KEY'Returns metadata and source for one released prebuilt Flora action. Action identifiers are raw slugs such as rotate-image, not action-prefixed IDs. A browser-runtime action with has_preview can be mounted live from its code.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Action identifier
Action identifier
Responses
Section titled “ Responses ”Action returned.
object
Action identifier
Action name
Action description
Action runtime language
Where the action executes: a server sandbox (node, python) or the browser runtime (browser), which a host can also run live
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
Cost per execution in USD
Action input slots
object
Action input or output name
Action input or output media type
Deprecated alias for multiple: true. Mirrors multiple for back-compat.
Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).
Action output slots
object
Action input or output name
Action input or output media type
Deprecated alias for multiple: true. Mirrors multiple for back-compat.
Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).
Action parameters
object
Action parameter key
Action parameter control type
Action parameter label
Action parameter description
Default parameter value
Allowed parameter values
object
Lowest accepted number
Highest accepted number
Step between accepted numbers
Placeholder shown in an empty text control
For colorList controls: how many colors the value may hold
Conditions under which a control is shown, all of which must hold. Keys are the snake_case keys of this same params list.
Per-axis minimum for point2d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis maximum for point2d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis step for point2d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis minimum for point3d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis maximum for point3d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
Per-axis step for point3d values
object
Bound on the x axis
Bound on the y axis
Bound on the z axis (point3d only)
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.
Example
{ "action_id": "color-grade-image-browser", "name": "Rotate Image", "description": "Rotate an image by a fixed angle.", "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." } ]}