Get a node's document
import { FloraClient } from '@flora-ai/flora';
const client = new FloraClient({ apiKey: process.env['FLORA_API_KEY'] });
const canva = await client.projects.canvas.getNodeDocument({ workspaceId: '<workspaceId>', projectId: '<projectId>', nodeId: '<nodeId>',});console.log(canva);curl -X GET 'https://app.flora.ai/api/v1/workspaces/<workspaceId>/projects/<projectId>/nodes/<nodeId>/document' \ -H 'Authorization: Bearer $FLORA_API_KEY'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.
Error responses use the standard error body.
Authorizations
Section titled “Authorizations ”Parameters
Section titled “ Parameters ”Path Parameters
Section titled “Path Parameters ”Workspace identifier
Workspace identifier
Project identifier
Project identifier
The node’s short id or UUID, as the project graph endpoint reports them
The node’s short id or UUID, as the project graph endpoint reports them
Responses
Section titled “ Responses ”Node document returned.
object
Project identifier
Short node identifier
Canvas node UUID
Node type in agent vocabulary
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.
Last document write, Unix milliseconds. Absent for Deck documents; 0 for a notes node, which keeps none.
object
Document schema version; currently 1
Frames per second of the composition
Even number of pixels
Even number of pixels
Lanes, first is the bottom-most
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Display name of the lane
Item ids in this lane, bottom to top of the z-order. Every id must exist in items.
Clips keyed by item id. At least one item is required.
object
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
Key of a video asset in assets
Offset into the source video where playback starts. Seconds.
Gain in dB; 0 leaves the source as is
Speed multiplier; 1 is real time
Visual fade-in length in seconds
Visual fade-out length in seconds
Fraction of the item cropped from the left
Fraction of the item cropped from the top
Fraction of the item cropped from the right
Fraction of the item cropped from the bottom
Corner radius in composition pixels
Rotation in degrees
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
Key of an image asset in assets
Visual fade-in length in seconds
Visual fade-out length in seconds
Fraction of the item cropped from the left
Fraction of the item cropped from the top
Fraction of the item cropped from the right
Fraction of the item cropped from the bottom
Corner radius in composition pixels
Rotation in degrees
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
Key of a gif asset in assets
Visual fade-in length in seconds
Visual fade-out length in seconds
Fraction of the item cropped from the left
Fraction of the item cropped from the top
Fraction of the item cropped from the right
Fraction of the item cropped from the bottom
Corner radius in composition pixels
Rotation in degrees
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
Key of an audio asset in assets
Offset into the source audio where playback starts. Seconds.
Gain in dB; 0 leaves the source as is
Speed multiplier; 1 is real time
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
CSS color of the rectangle
Visual fade-in length in seconds
Visual fade-out length in seconds
Corner radius in composition pixels
Rotation in degrees
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
CSS color
Google Fonts family name
Font variant (“normal” or “italic”) and CSS weight (“400”, “700”, …)
object
Font size in composition pixels
Line height as a multiplier
Letter spacing in composition pixels
Text outline width in composition pixels
CSS color
Editor behavior: true re-measures the box when the text changes
Rotation in degrees
Visual fade-in length in seconds
Visual fade-out length in seconds
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Start frame on the composition timeline. Frames, not seconds.
Length in frames. The cut is never guessed from the media.
Top edge in composition pixels
Left edge in composition pixels
Width in composition pixels
Height in composition pixels
Key of a caption asset in assets
CSS color
Google Fonts family name
Font variant (“normal” or “italic”) and CSS weight (“400”, “700”, …)
object
Font size in composition pixels
Line height as a multiplier
Letter spacing in composition pixels
Text outline width in composition pixels
CSS color
CSS color of the word being spoken
Visual fade-in length in seconds
Visual fade-out length in seconds
Media keyed by asset id. Every media item’s asset_id must be a key here.
object
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Display name in the editor. Defaults to the last path segment of media_url.
Defaults from the asset type and the media_url extension.
Canvas node whose output seeded this asset, when known. Read-only.
Durable https URL of the media the renderer fetches. Flora’s own asset URLs and any public https URL are accepted.
Native media width in pixels
Native media height in pixels
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Display name in the editor. Defaults to the last path segment of media_url.
Defaults from the asset type and the media_url extension.
Canvas node whose output seeded this asset, when known. Read-only.
Durable https URL of the media the renderer fetches. Flora’s own asset URLs and any public https URL are accepted.
Native media width in pixels
Native media height in pixels
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Display name in the editor. Defaults to the last path segment of media_url.
Defaults from the asset type and the media_url extension.
Canvas node whose output seeded this asset, when known. Read-only.
Durable https URL of the media the renderer fetches. Flora’s own asset URLs and any public https URL are accepted.
Native media width in pixels
Native media height in pixels
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Display name in the editor. Defaults to the last path segment of media_url.
Defaults from the asset type and the media_url extension.
Canvas node whose output seeded this asset, when known. Read-only.
Durable https URL of the media the renderer fetches. Flora’s own asset URLs and any public https URL are accepted.
object
Caller-chosen identifier; survives verbatim and is how other fields refer to it
Display name in the editor. Defaults to the last path segment of media_url.
Defaults from the asset type and the media_url extension.
Canvas node whose output seeded this asset, when known. Read-only.
Authored Deck content: 1–200 slides, up to 256 layers per slide, and at most 4 MiB of UTF-8 JSON.
object
object
object
object
object
object
object
object
object
object
object
object
object
object
object
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.
object
object
Typography only; the rendered text or live binding belongs in content.
object
object
object
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.
object
object
object
object
object
object
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.
object
object
object
object
object
object
object
object
object
object
Document schema version; currently 1
The note body in full, plain text, newlines significant
Example
{ "project_id": "prj_abc123", "id": "n7", "node_id": "7f6ae6da-4a0e-4a2f-9c6a-2c1c6b8d1f21", "type": "timeline", "document": { "kind": "timeline", "items": { "additionalProperty": { "type": "video" } }, "assets": { "additionalProperty": { "type": "video" } } }}