Get an action
Get an action with the FLORA API: GET /actions/{actionId}.
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.
GET https://app.flora.ai/api/v1/actions/{actionId}Auth: API key as a bearer token,
Authorization: Bearer $FLORA_API_KEY. See Authentication.TypeScript SDK:
client.actions.retrieve().Operation ID:
getAction.
Example
curl -X GET 'https://app.flora.ai/api/v1/actions/color-grade-image-browser' \
-H "Authorization: Bearer $FLORA_API_KEY"import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const action = await client.actions.retrieve({
actionId: 'color-grade-image-browser',
});
console.log(action);Path parameters
actionId
string
Yes
Action identifier. One of: 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, and 2 more.
Responses
200: Action returned.
action_id
string
Yes
Action identifier. One of: 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, and 2 more.
name
string
Yes
Action name. Example: Rotate Image.
description
string
Yes
Action description. Example: Rotate an image by a fixed angle..
language
string
Yes
Action runtime language. One of: javascript, python.
runtime
string
Yes
Where the action executes: a server sandbox (node, python) or the browser runtime (browser), which a host can also run live. One of: node, python, browser.
has_preview
boolean
Yes
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
charged_cost
number
Yes
Cost per execution in USD. At least 0.
inputs
array of objects
Yes
Action input slots
inputs[].name
string
Yes
Action input or output name. Example: image.
inputs[].type
string
Yes
Action input or output media type. One of: image, video, text, audio, model3d.
inputs[].dynamic
boolean
No
Deprecated alias for multiple: true. Mirrors multiple for back-compat.
inputs[].optional
boolean
No
Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).
inputs[].multiple
boolean or object
No
Many-connections form. true is unbounded shorthand; the object form sets explicit min/max bounds. See the inputs[].multiple shapes below.
outputs
array of objects
Yes
Action output slots
outputs[].name
string
Yes
Action input or output name. Example: image.
outputs[].type
string
Yes
Action input or output media type. One of: image, video, text, audio, model3d.
outputs[].dynamic
boolean
No
Deprecated alias for multiple: true. Mirrors multiple for back-compat.
outputs[].optional
boolean
No
Whether the slot allows zero connections in single-input mode. Ignored when multiple is the object form (use min: 0 there instead).
outputs[].multiple
boolean or object
No
Many-connections form. true is unbounded shorthand; the object form sets explicit min/max bounds. Same shape as inputs[].multiple.
params
array of objects
Yes
Action parameters
params[].key
string
Yes
Action parameter key. Example: angle.
params[].type
string
Yes
Action parameter control type. Example: select.
params[].label
string
No
Action parameter label. Example: Angle.
params[].info_tooltip
string
No
Action parameter description. Example: Rotation angle in degrees..
params[].default_value
any
No
Default parameter value
params[].available_values
array of objects
No
Allowed parameter values
params[].available_values[].value
string
Yes
params[].available_values[].label
string
Yes
params[].available_values[].description
string
No
params[].min_number_value
number
No
Lowest accepted number
params[].max_number_value
number
No
Highest accepted number
params[].number_step
number
No
Step between accepted numbers
params[].placeholder
string
No
Placeholder shown in an empty text control
params[].max_count
integer
No
For colorList controls: how many colors the value may hold. At least 0.
params[].visible_if
array of objects
No
Conditions under which a control is shown, all of which must hold. Keys are the snake_case keys of this same params list.
params[].visible_if[].key
string
Yes
Key of the parameter this condition reads
params[].visible_if[].equals
string or number or boolean
No
Show this parameter only when the other parameter equals this value
params[].visible_if[].not_equals
string or number or boolean
No
Show this parameter only when the other parameter differs from this value
params[].point2d_min
object
No
Per-axis minimum for point2d values
params[].point2d_min.x
number
No
Bound on the x axis
params[].point2d_min.y
number
No
Bound on the y axis
params[].point2d_min.z
number
No
Bound on the z axis (point3d only)
params[].point2d_max
object
No
Per-axis maximum for point2d values
params[].point2d_max.x
number
No
Bound on the x axis
params[].point2d_max.y
number
No
Bound on the y axis
params[].point2d_max.z
number
No
Bound on the z axis (point3d only)
params[].point2d_step
object
No
Per-axis step for point2d values
params[].point2d_step.x
number
No
Bound on the x axis
params[].point2d_step.y
number
No
Bound on the y axis
params[].point2d_step.z
number
No
Bound on the z axis (point3d only)
params[].point3d_min
object
No
Per-axis minimum for point3d values
params[].point3d_min.x
number
No
Bound on the x axis
params[].point3d_min.y
number
No
Bound on the y axis
params[].point3d_min.z
number
No
Bound on the z axis (point3d only)
params[].point3d_max
object
No
Per-axis maximum for point3d values
params[].point3d_max.x
number
No
Bound on the x axis
params[].point3d_max.y
number
No
Bound on the y axis
params[].point3d_max.z
number
No
Bound on the z axis (point3d only)
params[].point3d_step
object
No
Per-axis step for point3d values
params[].point3d_step.x
number
No
Bound on the x axis
params[].point3d_step.y
number
No
Bound on the y axis
params[].point3d_step.z
number
No
Bound on the z axis (point3d only)
code
string
Yes
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.
Errors
Every error has the same body: error.code, error.message, and error.fields on validation errors. See Errors for how to recover from each code.
400
invalid_json, input_validation_error
The body isn't valid JSON, or an input failed validation (fields lists each one).
401
unauthorized, invalid_api_key
The API key is missing, invalid or revoked.
402
insufficient_credits
The workspace balance is too low for this request.
403
forbidden, paid_plan_required
The key can't do this, or the workspace plan doesn't include it.
404
not_found
The resource doesn't exist or isn't visible to this key.
409
idempotency_duplicate, revision_conflict
Duplicate Idempotency-Key or a stale base_revision.
429
rate_limited
Too many requests. Back off and retry.
500
unknown_error, internal_error
Something failed on FLORA's side. Retry with backoff.
503
temporarily_unavailable
Authorization is temporarily unavailable. Retry later.
Last updated
Was this helpful?