Developer docs

Developer docs/API

Types

The JSON shapes that requests carry and replies return.

On this page: Replies · The project model · Media · Catalogue · Templates · Events · Errors

Every field is camelCase. A field marked optional may be absent from a reply; a request may leave it out.


Replies

VersionInfo

Reply to version.

FieldTypeMeaning
apiVersionstringThe contract, e.g. "0.2"
concatstringThe build’s version
dirs{config, data}The app’s directories, as paths
capabilitiesstring[]See overview

EditorView

Reply to every method that opens or changes a project.

FieldTypeMeaning
projectProjectThe whole project
canUndoboolThere is something to undo
canRedoboolThere is something to redo
settings{name, width, height, rateNum, rateDen}The project’s name and the active timeline’s frame and rate
createdIdstringoptional. The id the command just minted
{
  "project": { "…": "see Project" },
  "canUndo": true,
  "canRedo": false,
  "settings": { "name": "Reel", "width": 1920, "height": 1080, "rateNum": 30, "rateDen": 1 },
  "createdId": "c2"
}

ProjectInfo

One entry of project.list.

FieldTypeMeaning
pathstringThe project folder
namestringThe name in the title bar
width, heightintegerOutput size
rateNum, rateDenintegerFrame rate as a fraction
openedAtintegerMilliseconds since the epoch

Started

Reply to export.run.

FieldTypeMeaning
jobstring"j1", "j2", … Every event about this job carries it
pathstringThe project folder
outputstringThe file it will write

Written

Reply to preview.frame with output.

FieldType
pathstring, the file written
width, heightinteger

Picture

Reply to preview.frame without output.

FieldType
width, heightinteger
pngstring, the PNG as base64 (standard alphabet, padded)

Done

{}. The reply of methods with nothing to say beyond having worked.


The project model

What project.get returns as project, and what project.document writes to concat.json (plus a compatibility mirror; see project.document).

Project

FieldTypeMeaning
mediaMediaItem[]The bin, shared by all timelines
fonts{family, path}[]Fonts added from disk
timelinesTimeline[]In tab order. Always at least one
activeTimelineIdstringThe timeline commands act on

Timeline

FieldTypeMeaning
idstring"TL1" for the first, "tl…" after
namestringThe tab label
videoVideoSettingsThis timeline’s frame and rate
tracksTrack[]Top to bottom. Never empty
clipsClip[]In insertion order, not time order; sort by start yourself

VideoSettings

FieldTypeMeaning
width, heightintegerFrame size in pixels
rateNum, rateDenintegerFrame rate as a fraction: 30 fps is 30/1, 29.97 is 30000/1001

Track

FieldTypeMeaning
idstring"T1"–"T4" on the first timeline, "t…" after
visibleboolVideo on this track reaches the composite
mutedboolAudio on this track is silent

Clip

A clip as project.get returns it. Fields with a default are left out of the JSON when they hold it.

FieldTypeMeaning
idstring"c…". Survives splits (the head keeps it) and merges
trackIdstringThe lane
mediaIdstringEmpty for a text or layer clip
namestringDisplay label
kindstringvideo, audio, image, text, layer
startnumberSeconds from the start of the timeline
durationnumberSeconds on the timeline. Never below 1/60
sourceStartnumberIn-point: seconds into the media
volumenumberLinear gain, 1 is unity
fadeIn, fadeOutnumberAudio ramp seconds
scalenumberMultiplier over the fitted size
offsetX, offsetYnumberFractions of frame width / height from centred
rotationnumberDegrees, clockwise
stretchX, stretchYnumberoptional, default 1
opacitynumber0..1
speednumberPlayback rate; the curve’s mean when a curve is set
speedCurveSpeedPoint[]optional
keysClipKey[]optional. User keyframes, sorted by property then at
flipH, flipVbooloptional
blendstringoptional. multiply, screen, add, lighten, darken; absent is normal
cropCropoptional
cutoutCutoutoptional
preservePitchboolKeep pitch when speed ≠ 1
filtersAppliedFilter[]Audio chain, in order
videoEffectsAppliedFilter[]Video chain, in order
audioStreamintegeroptional. Which audio stream of the media plays
mutedbooloptional. True when the sound is detached
detachedFromstringoptional. On a detached audio clip: the video it came from
transitionInTransitionoptional
textTextStyleoptional. Present on a text clip

A clip fresh from addClip:

{
  "id": "c2",
  "trackId": "T1",
  "mediaId": "m1",
  "name": "take1.mp4",
  "kind": "video",
  "start": 0.0,
  "duration": 6.12,
  "sourceStart": 0.0,
  "volume": 1.0,
  "fadeIn": 0.0,
  "fadeOut": 0.0,
  "scale": 1.0,
  "offsetX": 0.0,
  "offsetY": 0.0,
  "rotation": 0.0,
  "opacity": 1.0,
  "speed": 1.0,
  "preservePitch": true,
  "filters": [],
  "videoEffects": []
}

MediaItem

One entry of the bin. The probe’s findings are stored, so a project opens meaningfully even when the file is missing.

FieldTypeMeaning
idstring"m…", never re-issued
pathstringAbsolute path. Also the duplicate check
namestringDisplay name, normally the file’s basename
durationnumberoptional. Seconds, when the container says
kindstringvideo, audio, image
width, heightintegeroptional
frameRatenumberoptional. Decimal, for display
frameRateFractionstringoptional. Exact, e.g. "30000/1001"
videoCodec, audioCodecstringoptional
hasAudioboolThe file carries sound
audioTracksAudioTrack[]optional. Every audio stream, in file order
placeholderbooloptional. True for a template slot
colorRangestringoptional. limited or full: the levels the picture is read as, over the file’s own tag. Absent means “as tagged”. Set with setMediaColorRange
originstringoptional. speech for a file the speech sheet read aloud. Absent for an import. The bin shelves a file with an origin under Generated, not with the imports

AudioTrack

FieldType
indexinteger, the stream’s index in the file
codecstring
channelsinteger
sampleRateinteger
titlestring, optional
languagestring, optional

AppliedFilter

One link of an effect chain, in filters or videoEffects.

FieldTypeMeaning
idstringA package id from catalogue.list, e.g. "concat.gaussian-blur"
paramsobjectParameter key → number. Missing keys mean the package’s defaults
enabledbooloptional, default true. False bypasses without losing settings
keysobjectoptional. Parameter key → ParamKey[] ({at, value, ease}) for animated parameters
{ "id": "concat.gaussian-blur", "params": { "radius": 4 }, "enabled": true }

Every parameter is stored as a number, whatever its type in the catalogue: a bool is 0 or 1, an enum is one of its values, a color is packed RGBA, a point is two keys <key>.x and <key>.y in 0..1.

Transition

FieldTypeMeaning
idstringA transition package id, e.g. "concat.dissolve", "concat.push", "concat.clock-wipe"
durationnumberSeconds, default 1

TextStyle

A title’s styling. Sizes are fractions of the frame, so a title made at 1080p exports right at 4K. In a command you send only the fields you change; the rest take these defaults.

FieldTypeDefaultMeaning
contentstring"Your text"The words, newlines included
fontFamilystring"\"Cabinet Grotesk\""CSS-style family name, quoted where needed. May name an added font
fontSizenumber0.09Cap height as a fraction of frame height
fontWeightnumber700100..=900
italicboolfalse
colorstring"#ffffff"CSS hex
alignstring"center"left, center, right. Also which point of the block the clip’s position pins
opacitynumber10..=1, multiplied with the clip’s
strokeWidthnumber0Outline as a fraction of frame height; 0 is none
strokeColorstring"#000000"
shadowbooltrueA drop shadow
backgroundstring""A background colour behind the text, #rrggbb[aa], its alpha the opacity; empty is none
backgroundRadiusnumber0.0135The background’s corner radius as a fraction of frame height; 0 is square
backgroundPaddingXnumber0.0315The background’s air either side of the words, as a fraction of frame height; ignored on an axis maxWidth sizes
backgroundPaddingYnumber0.018The same above and below; ignored when maxHeight sizes the box
lineHeightnumber1.2Multiple of the font size; floored at 0.5
trackingnumber0Extra letter spacing, in frame-height fractions
maxWidthnumber0Wrap width as a fraction of frame width; 0 is no wrap
maxHeightnumber0Box height as a fraction of frame height; 0 is the words’ own

Crop

Fractions of the source taken off each edge: {left, top, right, bottom}, each 0..=0.9, with at least a tenth of the picture left.

Cutout

FieldTypeMeaning
modestringauto (the model’s mask) or custom (the mask plus strokes)
subjectstringoptional, default auto. person, object, or auto (person if found, else object)
feathernumberEdge softness as a fraction of picture width
strokesStroke[]optional. Corrections, in order

Stroke

FieldTypeMeaning
toolstringsmartBrush, brush, smartEraser, eraser
sizenumberDiameter as a fraction of picture width
points[x, y][]Fractions of the source picture, [0, 0] top-left
atnumberoptional. Source second the stroke was painted at

ClipKey

FieldTypeMeaning
propertystringscale, offsetX, offsetY, rotation, opacity, volume
atnumber0..=1 of the clip’s length
valuenumberIn the property’s own units
ease[x1, y1, x2, y2]A cubic bezier; default linear [0, 0, 1, 1]

SpeedPoint

{at, speed}: at a fraction 0..=1 of the clip, speed source seconds per timeline second there.

NewMedia

A probed file, as addMedia, fillSlot, replaceClipMedia and freezeFrame take it. The same fields as MediaItem minus id and placeholder: path, name, duration, kind, width, height, frameRate, frameRateFraction, videoCodec, audioCodec, hasAudio, audioTracks, and origin (optional; leave it out for an import).


Media

MediaSummary

Reply to media.probe.

FieldTypeMeaning
pathstringThe file, as given
durationnumberoptional. Container duration in seconds
kindstringvideo, audio, image
videoVideoStreamInfooptional. The first video stream
audioAudioStreamInfooptional. The first audio stream, what a clip plays unless it names another
audioTracksAudioStreamInfo[]Every audio stream, in file order

VideoStreamInfo: index, codec, width, height, frameRate (decimal), frameRateFraction (exact, e.g. "30/1"), and colorRange (limited or full, present only when the file says; a file that says nothing is played as limited).

AudioStreamInfo: index, codec, sampleRate, channels, title, language.


Catalogue

PackageInfo

One entry of catalogue.list.

FieldTypeMeaning
idstringauthor.name, e.g. "concat.gaussian-blur". What a chain stores
namestringThe catalogue card’s title
kindstringeffect, filter, audio, transition, generator
categorystringThe shelf the card sits on
descriptionstringOne sentence
intensitystringoptional. The parameter the simple view shows as its one slider
paramsParamInfo[]In inspector order

ParamInfo

FieldTypeMeaning
keystringWhat params stores it under
labelstringThe control’s label
typestringfloat, int, bool, enum, color, point
min, maxnumberThe range
defaultnumberThe value an untouched control means
stepnumberSlider increment; 0 is continuous
unitstringShown after the number
animateboolCan carry keyframes
valuesnumber[]For enum: the values the document may hold
labelsstring[]For enum: the name of each value, in values order

Templates

TemplateInfo

FieldTypeMeaning
pathstringThe bundle folder. What template.instantiate takes
namestring
width, heightintegerOutput size
rateNum, rateDenintegerFrame rate
slotsSlotInfo[]In the order they first appear on the timeline
hasPosterboolThe bundle carries poster.jpg

SlotInfo

FieldTypeMeaning
mediaIdstringThe placeholder’s id. What a fill names
namestringAs the creator labelled it
kindstringvideo, audio, image: what the slot wants
secondsnumberTimeline seconds the slot covers

Events

Every event carries job and path. As a bare object the tag is event; in the JSON-RPC envelope the tag becomes the notification’s method and the rest its params.

cutout.progress

FieldTypeMeaning
mediaIdstringThe media being analysed
fetchingboolTrue while a model downloads, false while it runs
fractionnumber0..=1

export.progress

FieldTypeMeaning
frameintegerFrames done
totalintegerFrames in total
stagestringvideo, audio, mux

export.done

FieldType
outputstring, the file written
width, heightinteger

export.failed

FieldType
errorApiError; code is cancelled when export.cancel stopped it

Errors

ApiError

FieldTypeMeaning
codestringOne of the codes in the overview
messagestringThe sentence a person would be shown

In the JSON-RPC envelope: {"code": <number>, "message": "…", "data": {"code": "<name>"}}.

Edit this page on GitHub