For the complete documentation index, see llms.txt. This page is also available as Markdown.

Get a node's document

Get a node's document with the FLORA API: GET /workspaces/{workspaceId}/projects/{projectId}/nodes/{nodeId}/document.

Returns the full authored content of a document-bearing node — a timeline's tracks, items and assets or a deck's slides and layers — together with its revision. The project graph endpoint carries only a summary because documents can reach a megabyte. Edit by reading the document, changing it, and sending the whole document back in a canvas changeset update with base_revision set to the revision read here. A node that carries no document (an image, a text node) is rejected; a timeline that has no document yet returns not_found with the write path in the message.

GET https://app.flora.ai/api/v1/workspaces/{workspaceId}/projects/{projectId}/nodes/{nodeId}/document
  • Auth: API key as a bearer token, Authorization: Bearer $FLORA_API_KEY. See Authentication.

  • TypeScript SDK: client.projects.canvas.getNodeDocument().

  • Operation ID: getCanvasNodeDocument.

Example

curl -X GET 'https://app.flora.ai/api/v1/workspaces/ws_abc123/projects/prj_abc123/nodes/n7/document' \
  -H "Authorization: Bearer $FLORA_API_KEY"
import { FloraClient } from '@flora-ai/flora';

const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });

const canvas = await client.projects.canvas.getNodeDocument({
  workspaceId: 'ws_abc123',
  projectId: 'prj_abc123',
  nodeId: 'n7',
});
console.log(canvas);

Path parameters

Name
Type
Required
Description

workspaceId

string

Yes

Workspace identifier. Pattern: ^ws_\S+$. Example: ws_abc123.

projectId

string

Yes

Project identifier. Pattern: ^prj_\S+$. Example: prj_abc123.

nodeId

string

Yes

The node's short id or UUID, as the project graph endpoint reports them. At least 1 character. Example: n7.

Responses

200: Node document returned.

Field
Type
Required
Description

project_id

string

Yes

Project identifier. Pattern: ^prj_\S+$. Example: prj_abc123.

id

string

Yes

Short node identifier. At least 1 character. Example: n7.

node_id

string

Yes

Canvas node UUID. At least 1 character. Example: 7f6ae6da-4a0e-4a2f-9c6a-2c1c6b8d1f21.

type

string

Yes

Node type in agent vocabulary. At least 1 character. Example: timeline.

revision

integer

Yes

Current document revision; pass as base_revision on a changeset update. Always 0 for a notes node: its body is plain canvas state rather than a revisioned draft, so base_revision does not apply to it.

updated_at

integer

No

Last document write, Unix milliseconds. Absent for Deck documents; 0 for a notes node, which keeps none.

document

object

Yes

Authored content of a document-bearing node, every field concrete. See the document shapes below.

document shapes

Field paths in this block are relative to document.

document takes one of 3 shapes, set by kind.

Shape 1: kind is timeline.

Field
Type
Required
Description

kind

string

Yes

Always timeline.

schema_version

integer

Yes

Document schema version; currently 1. Exactly 1.

fps

number

Yes

Frames per second of the composition. At least 0.

composition_width

integer

Yes

Even number of pixels. At least 0.

composition_height

integer

Yes

Even number of pixels. At least 0.

tracks

array of objects

Yes

Lanes, first is the bottom-most. 1 to 100 items.

tracks[].id

string

Yes

Caller-chosen identifier; survives verbatim and is how other fields refer to it. 1 to 200 characters.

tracks[].name

string

No

Display name of the lane. At most 200 characters.

tracks[].items

array of string

Yes

Item ids in this lane, bottom to top of the z-order. Every id must exist in items.

tracks[].hidden

boolean

Yes

tracks[].muted

boolean

Yes

items

map of object

Yes

Clips keyed by item id. At least one item is required. Keys: caller-chosen identifier; survives verbatim and is how other fields refer to it. 1 to 200 characters. See the document.items.{key} shapes below.

assets

map of object

Yes

Media keyed by asset id. Every media item's asset_id must be a key here. Keys: caller-chosen identifier; survives verbatim and is how other fields refer to it. 1 to 200 characters. See the document.assets.{key} shapes below.

Shape 2: kind is deck. Authored Deck content: 1–200 slides, up to 256 layers per slide, and at most 4 MiB of UTF-8 JSON.

Field
Type
Required
Description

kind

string

Yes

Always deck.

schema_version

integer

Yes

Exactly 1.

slides

array of objects

Yes

1 to 200 items.

slides[].id

string

Yes

1 to 128 characters.

slides[].hidden

boolean

No

Default: false.

slides[].guides

object

No

Default: {"vertical": [], "horizontal": []}.

slides[].guides.vertical

array of number

Yes

At most 100 items.

slides[].guides.horizontal

array of number

Yes

At most 100 items.

slides[].document

object

Yes

slides[].document.schema_version

integer

Yes

Exactly 1.

slides[].document.frame

object

Yes

slides[].document.frame.pixel_width

integer

Yes

Exactly 1920.

slides[].document.frame.pixel_height

integer

Yes

Exactly 1080.

slides[].document.frame.fill

string

No

slides[].document.frame.margins

object

No

slides[].document.frame.margins.top

number

Yes

slides[].document.frame.margins.right

number

Yes

slides[].document.frame.margins.bottom

number

Yes

slides[].document.frame.margins.left

number

Yes

slides[].document.frame.content_offset

object

No

slides[].document.frame.content_offset.x

number

Yes

slides[].document.frame.content_offset.y

number

Yes

slides[].document.frame.crop_transform

map of JSON value

No

slides[].document.layer_order

array of string

Yes

At most 256 items.

slides[].document.layers

map of object

Yes

Keys: 1 to 128 characters. See the document.slides[].document.layers.{key} shapes below.

Shape 3: kind is notes.

Field
Type
Required
Description

kind

string

Yes

Always notes.

schema_version

integer

Yes

Document schema version; currently 1. Exactly 1.

text

string

Yes

The note body in full, plain text, newlines significant

document.items.{key} takes one of 7 shapes, set by type.

Fields every shape has:

Field
Type
Required
Description

items.{key}.id

string

Yes

Caller-chosen identifier; survives verbatim and is how other fields refer to it. 1 to 200 characters.

items.{key}.from

integer

Yes

Start frame on the composition timeline. Frames, not seconds. At least 0.

items.{key}.duration_in_frames

integer

Yes

Length in frames. The cut is never guessed from the media. At least 0.

items.{key}.top

number

Yes

Top edge in composition pixels

items.{key}.left

number

Yes

Left edge in composition pixels

items.{key}.width

number

Yes

Width in composition pixels. At least 0.

items.{key}.height

number

Yes

Height in composition pixels. At least 0.

items.{key}.opacity

number

Yes

0 to 1.

Fields that depend on the shape:

Shape 1: type is video.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always video.

items.{key}.asset_id

string

Yes

Key of a video asset in assets. 1 to 200 characters.

items.{key}.video_start_from_in_seconds

number

Yes

Offset into the source video where playback starts. Seconds. At least 0.

items.{key}.decibel_adjustment

number

Yes

Gain in dB; 0 leaves the source as is

items.{key}.playback_rate

number

Yes

Speed multiplier; 1 is real time. At least 0.

items.{key}.audio_fade_in_duration_in_seconds

number

Yes

At least 0.

items.{key}.audio_fade_out_duration_in_seconds

number

Yes

At least 0.

items.{key}.fade_in_duration_in_seconds

number

Yes

Visual fade-in length in seconds. At least 0.

items.{key}.fade_out_duration_in_seconds

number

Yes

Visual fade-out length in seconds. At least 0.

items.{key}.crop_left

number

Yes

Fraction of the item cropped from the left. 0 to 1.

items.{key}.crop_top

number

Yes

Fraction of the item cropped from the top. 0 to 1.

items.{key}.crop_right

number

Yes

Fraction of the item cropped from the right. 0 to 1.

items.{key}.crop_bottom

number

Yes

Fraction of the item cropped from the bottom. 0 to 1.

items.{key}.border_radius

number

Yes

Corner radius in composition pixels. At least 0.

items.{key}.rotation

number

Yes

Rotation in degrees

items.{key}.keep_aspect_ratio

boolean

Yes

Shape 2: type is image.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always image.

items.{key}.asset_id

string

Yes

Key of an image asset in assets. 1 to 200 characters.

items.{key}.fade_in_duration_in_seconds

number

Yes

Visual fade-in length in seconds. At least 0.

items.{key}.fade_out_duration_in_seconds

number

Yes

Visual fade-out length in seconds. At least 0.

items.{key}.crop_left

number

Yes

Fraction of the item cropped from the left. 0 to 1.

items.{key}.crop_top

number

Yes

Fraction of the item cropped from the top. 0 to 1.

items.{key}.crop_right

number

Yes

Fraction of the item cropped from the right. 0 to 1.

items.{key}.crop_bottom

number

Yes

Fraction of the item cropped from the bottom. 0 to 1.

items.{key}.border_radius

number

Yes

Corner radius in composition pixels. At least 0.

items.{key}.rotation

number

Yes

Rotation in degrees

items.{key}.keep_aspect_ratio

boolean

Yes

Shape 3: type is gif.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always gif.

items.{key}.asset_id

string

Yes

Key of a gif asset in assets. 1 to 200 characters.

items.{key}.gif_start_from_in_seconds

number

Yes

At least 0.

items.{key}.playback_rate

number

Yes

At least 0.

items.{key}.fade_in_duration_in_seconds

number

Yes

Visual fade-in length in seconds. At least 0.

items.{key}.fade_out_duration_in_seconds

number

Yes

Visual fade-out length in seconds. At least 0.

items.{key}.crop_left

number

Yes

Fraction of the item cropped from the left. 0 to 1.

items.{key}.crop_top

number

Yes

Fraction of the item cropped from the top. 0 to 1.

items.{key}.crop_right

number

Yes

Fraction of the item cropped from the right. 0 to 1.

items.{key}.crop_bottom

number

Yes

Fraction of the item cropped from the bottom. 0 to 1.

items.{key}.border_radius

number

Yes

Corner radius in composition pixels. At least 0.

items.{key}.rotation

number

Yes

Rotation in degrees

items.{key}.keep_aspect_ratio

boolean

Yes

Shape 4: type is audio.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always audio.

items.{key}.asset_id

string

Yes

Key of an audio asset in assets. 1 to 200 characters.

items.{key}.audio_start_from_in_seconds

number

Yes

Offset into the source audio where playback starts. Seconds. At least 0.

items.{key}.decibel_adjustment

number

Yes

Gain in dB; 0 leaves the source as is

items.{key}.playback_rate

number

Yes

Speed multiplier; 1 is real time. At least 0.

items.{key}.audio_fade_in_duration_in_seconds

number

Yes

At least 0.

items.{key}.audio_fade_out_duration_in_seconds

number

Yes

At least 0.

Shape 5: type is solid.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always solid.

items.{key}.color

string

Yes

CSS color of the rectangle. At least 1 character.

items.{key}.fade_in_duration_in_seconds

number

Yes

Visual fade-in length in seconds. At least 0.

items.{key}.fade_out_duration_in_seconds

number

Yes

Visual fade-out length in seconds. At least 0.

items.{key}.border_radius

number

Yes

Corner radius in composition pixels. At least 0.

items.{key}.rotation

number

Yes

Rotation in degrees

items.{key}.keep_aspect_ratio

boolean

Yes

Shape 6: type is text.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always text.

items.{key}.text

string

Yes

At least 1 character.

items.{key}.color

string

Yes

CSS color. At least 1 character.

items.{key}.align

string

Yes

One of: left, center, right.

items.{key}.font_family

string

Yes

Google Fonts family name. At least 1 character.

items.{key}.font_style

object

Yes

Font variant ("normal" or "italic") and CSS weight ("400", "700", …)

items.{key}.font_style.variant

string

Yes

At least 1 character.

items.{key}.font_style.weight

string

Yes

At least 1 character.

items.{key}.font_size

number

Yes

Font size in composition pixels. At least 0.

items.{key}.line_height

number

Yes

Line height as a multiplier. At least 0.

items.{key}.letter_spacing

number

Yes

Letter spacing in composition pixels

items.{key}.direction

string

Yes

One of: ltr, rtl.

items.{key}.stroke_width

number

Yes

Text outline width in composition pixels. At least 0.

items.{key}.stroke_color

string

Yes

CSS color. At least 1 character.

items.{key}.background

object or null

Yes

Rounded box painted behind the text, or null for none

items.{key}.background.color

string

Yes

At least 1 character.

items.{key}.background.horizontal_padding

number

Yes

At least 0.

items.{key}.background.border_radius

number

Yes

At least 0.

items.{key}.resize_on_edit

boolean

Yes

Editor behavior: true re-measures the box when the text changes

items.{key}.rotation

number

Yes

Rotation in degrees

items.{key}.fade_in_duration_in_seconds

number

Yes

Visual fade-in length in seconds. At least 0.

items.{key}.fade_out_duration_in_seconds

number

Yes

Visual fade-out length in seconds. At least 0.

Shape 7: type is captions.

Field
Type
Required
Description

items.{key}.type

string

Yes

Always captions.

items.{key}.asset_id

string

Yes

Key of a caption asset in assets. 1 to 200 characters.

items.{key}.color

string

Yes

CSS color. At least 1 character.

items.{key}.align

string

Yes

One of: left, center, right.

items.{key}.font_family

string

Yes

Google Fonts family name. At least 1 character.

items.{key}.font_style

object

Yes

Font variant ("normal" or "italic") and CSS weight ("400", "700", …)

items.{key}.font_style.variant

string

Yes

At least 1 character.

items.{key}.font_style.weight

string

Yes

At least 1 character.

items.{key}.font_size

number

Yes

Font size in composition pixels. At least 0.

items.{key}.line_height

number

Yes

Line height as a multiplier. At least 0.

items.{key}.letter_spacing

number

Yes

Letter spacing in composition pixels

items.{key}.direction

string

Yes

One of: ltr, rtl.

items.{key}.stroke_width

number

Yes

Text outline width in composition pixels. At least 0.

items.{key}.stroke_color

string

Yes

CSS color. At least 1 character.

items.{key}.highlight_color

string

Yes

CSS color of the word being spoken. At least 1 character.

items.{key}.page_duration_in_milliseconds

number

Yes

At least 0.

items.{key}.caption_start_in_seconds

number

Yes

At least 0.

items.{key}.max_lines

integer

Yes

At least 0.

items.{key}.rotation

number

Yes

items.{key}.fade_in_duration_in_seconds

number

Yes

Visual fade-in length in seconds. At least 0.

items.{key}.fade_out_duration_in_seconds

number

Yes

Visual fade-out length in seconds. At least 0.

document.assets.{key} takes one of 5 shapes, set by type.

Fields every shape has:

Field
Type
Required
Description

assets.{key}.id

string

Yes

Caller-chosen identifier; survives verbatim and is how other fields refer to it. 1 to 200 characters.

assets.{key}.filename

string

Yes

Display name in the editor. Defaults to the last path segment of media_url. At least 1 character.

assets.{key}.mime_type

string

Yes

Defaults from the asset type and the media_url extension. At least 1 character.

assets.{key}.source_node_id

string

No

Canvas node whose output seeded this asset, when known. Read-only.

Fields that depend on the shape:

Shape 1: type is video.

Field
Type
Required
Description

assets.{key}.type

string

Yes

Always video.

assets.{key}.media_url

string (uri)

Yes

Durable https URL of the media the renderer fetches. Flora's own asset URLs and any public https URL are accepted.

assets.{key}.width

number

Yes

Native media width in pixels. At least 0.

assets.{key}.height

number

Yes

Native media height in pixels. At least 0.

assets.{key}.duration_in_seconds

number

Yes

At least 0.

assets.{key}.has_audio_track

boolean

Yes

Shape 2: type is image.

Field
Type
Required
Description

assets.{key}.type

string

Yes

Always image.

assets.{key}.media_url

string (uri)

Yes

Durable https URL of the media the renderer fetches. Flora's own asset URLs and any public https URL are accepted.

assets.{key}.width

number

Yes

Native media width in pixels. At least 0.

assets.{key}.height

number

Yes

Native media height in pixels. At least 0.

Shape 3: type is gif.

Field
Type
Required
Description

assets.{key}.type

string

Yes

Always gif.

assets.{key}.media_url

string (uri)

Yes

Durable https URL of the media the renderer fetches. Flora's own asset URLs and any public https URL are accepted.

assets.{key}.width

number

Yes

Native media width in pixels. At least 0.

assets.{key}.height

number

Yes

Native media height in pixels. At least 0.

assets.{key}.duration_in_seconds

number

Yes

At least 0.

Shape 4: type is audio.

Field
Type
Required
Description

assets.{key}.type

string

Yes

Always audio.

assets.{key}.media_url

string (uri)

Yes

Durable https URL of the media the renderer fetches. Flora's own asset URLs and any public https URL are accepted.

assets.{key}.duration_in_seconds

number

Yes

At least 0.

Shape 5: type is caption.

Field
Type
Required
Description

assets.{key}.type

string

Yes

Always caption.

assets.{key}.captions

array of objects

Yes

At least 1 item.

assets.{key}.captions[].text

string

Yes

assets.{key}.captions[].start_ms

number

Yes

At least 0.

assets.{key}.captions[].end_ms

number

Yes

At least 0.

assets.{key}.captions[].timestamp_ms

number or null

No

assets.{key}.captions[].confidence

number or null

No

document.slides[].document.layers.{key} takes one of 3 shapes, set by content_type.

Fields every shape has:

Field
Type
Required
Description

slides[].document.layers.{key}.id

string

Yes

1 to 128 characters.

slides[].document.layers.{key}.name

string

No

Default: "".

slides[].document.layers.{key}.visible

boolean

No

Default: true.

slides[].document.layers.{key}.locked

boolean

No

slides[].document.layers.{key}.transform

object

Yes

slides[].document.layers.{key}.transform.position

object

Yes

slides[].document.layers.{key}.transform.position.x

number

Yes

slides[].document.layers.{key}.transform.position.y

number

Yes

slides[].document.layers.{key}.transform.scale

object

Yes

Dimensionless size multipliers. Text uses frame.pixel_width by round(font_size * 7.5) as its reference box (font_size defaults to 144); shapes use 512 by 512; media uses its resolved source dimensions. Divide the desired pixel width and height by the reference dimensions. For a 1200 by 240 text box at font_size 96 on a 1920-wide frame, use x: 0.625, y: 0.3333333333333333.

slides[].document.layers.{key}.transform.scale.x

number

Yes

slides[].document.layers.{key}.transform.scale.y

number

Yes

slides[].document.layers.{key}.transform.rotation

number

No

slides[].document.layers.{key}.transform.opacity

number

No

0 to 1.

slides[].document.layers.{key}.blend_mode

string

No

One of: normal, dissolve, darken, multiply, color-burn, linear-burn, darker-color, lighten, screen, color-dodge, linear-dodge, lighter-color, overlay, soft-light, hard-light, vivid-light, linear-light, pin-light, hard-mix, difference, exclusion, subtract, divide, hue, saturation, color, luminosity.

slides[].document.layers.{key}.fill

string

No

slides[].document.layers.{key}.adjustments

map of number

No

Fields that depend on the shape:

Shape 1: content_type is text.

Field
Type
Required
Description

slides[].document.layers.{key}.content_type

string

Yes

Always text.

slides[].document.layers.{key}.content

object

Yes

See the document.slides[].document.layers.{key}.content shapes below.

slides[].document.layers.{key}.text_data

object

No

Typography only; the rendered text or live binding belongs in content. Default: {}.

slides[].document.layers.{key}.text_data.font_family

string

No

slides[].document.layers.{key}.text_data.font_size

number

No

At least 0.

slides[].document.layers.{key}.text_data.text_color

string

No

slides[].document.layers.{key}.text_data.font_weight

number

No

1 to 1000.

slides[].document.layers.{key}.text_data.font_style

string

No

One of: normal, italic.

slides[].document.layers.{key}.text_data.text_align

string

No

One of: left, center, right.

slides[].document.layers.{key}.text_data.text_vertical_align

string

No

One of: top, middle, bottom.

slides[].document.layers.{key}.text_data.line_height

number or null

No

At least 0.

slides[].document.layers.{key}.text_data.letter_spacing

number

No

slides[].document.layers.{key}.text_data.kerning

map of number

No

slides[].document.layers.{key}.text_data.custom_font_id

string

No

slides[].document.layers.{key}.text_data.auto_width

boolean

No

Shape 2: content_type is shape.

Field
Type
Required
Description

slides[].document.layers.{key}.content_type

string

Yes

Always shape.

slides[].document.layers.{key}.primitive

string

Yes

One of: square, circle, triangle.

slides[].document.layers.{key}.shape_color

string

Yes

slides[].document.layers.{key}.line

object

No

slides[].document.layers.{key}.line.cap

string

No

Always round.

slides[].document.layers.{key}.corner_radius

number

No

At least 0.

Shape 3: content_type is image.

Field
Type
Required
Description

slides[].document.layers.{key}.content_type

string

Yes

Always image.

slides[].document.layers.{key}.source

object

Yes

See the document.slides[].document.layers.{key}.source shapes below.

slides[].document.layers.{key}.source_dimensions

object

No

slides[].document.layers.{key}.source_dimensions.width

number

Yes

At least 0.

slides[].document.layers.{key}.source_dimensions.height

number

Yes

At least 0.

slides[].document.layers.{key}.fit

string

No

One of: contain, cover, stretch.

slides[].document.layers.{key}.video

object

No

slides[].document.layers.{key}.video.autoplay

boolean

No

slides[].document.layers.{key}.model3d

object

No

slides[].document.layers.{key}.model3d.view_state

map of JSON value

No

slides[].document.layers.{key}.model3d.auto_rotate

boolean

No

document.slides[].document.layers.{key}.content takes one of 2 shapes, set by kind.

Shape 1: kind is node_output.

Field
Type
Required
Description

slides[].document.layers.{key}.content.kind

string

Yes

Always node_output.

slides[].document.layers.{key}.content.node_id

string

Yes

Source node UUID or short id in this project, or a node ref declared in the same request. Read responses use UUIDs. 1 to 128 characters.

slides[].document.layers.{key}.content.output_key

string

No

Shape 2: kind is inline.

Field
Type
Required
Description

slides[].document.layers.{key}.content.kind

string

Yes

Always inline.

slides[].document.layers.{key}.content.text

string

Yes

document.slides[].document.layers.{key}.source takes one of 2 shapes, set by kind.

Shape 1: kind is node_output.

Field
Type
Required
Description

slides[].document.layers.{key}.source.kind

string

Yes

Always node_output.

slides[].document.layers.{key}.source.node_id

string

Yes

Source node UUID or short id in this project, or a node ref declared in the same request. Read responses use UUIDs. 1 to 128 characters.

slides[].document.layers.{key}.source.output_key

string

No

Shape 2: kind is asset.

Field
Type
Required
Description

slides[].document.layers.{key}.source.kind

string

Yes

Always asset.

slides[].document.layers.{key}.source.asset_id

string

Yes

Flora asset id (asset_…). 1 to 128 characters.

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.

Status
Code
Meaning

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?