@deepraxis/cli 0.2.1-dev.924987f → 0.2.1-dev.95b8c6e
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/COMMANDS.md +6 -1
- package/dist/praxis.js +320 -5
- package/package.json +1 -1
package/COMMANDS.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Generated by `bun run commands`. DO NOT EDIT.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
530 HTTP operations; 532 commands including aliases.
|
|
6
6
|
|
|
7
7
|
Environment: `PRAXIS_ENV=develop|production` (dev package defaults to `develop`; stable package defaults to `production`). No `--env` option.
|
|
8
8
|
|
|
@@ -356,6 +356,7 @@ Handwritten commands: `login`, `logout`, `whoami`, `org list`, `org switch <orga
|
|
|
356
356
|
| `praxis api knowledge vector-store search <vector_store_id>` | `knowledge.vectorStores.search.create` | POST `/knowledge/v1/vector_stores/{vector_store_id}/search` | `--max-num-results`, `--rewrite-query`, `--next-page` |
|
|
357
357
|
| `praxis api knowledge vector-store segment get <chunk_id>` | `knowledge.vectorStores.segments.retrieve` | GET `/knowledge/v1/vector_stores/{vector_store_id}/segments/{chunk_id}` | `--vector-store` |
|
|
358
358
|
| `praxis api knowledge vector-store update <vector_store_id>` | `knowledge.vectorStores.update` | POST `/knowledge/v1/vector_stores/{vector_store_id}` | `--name` |
|
|
359
|
+
| `praxis api media generation capability list` | `media.generation.capabilities.list` | GET `/media/v1/generation/capabilities` | |
|
|
359
360
|
| `praxis api media library asset batch <library_id>` | `media.libraries.assets.batch` | POST `/media/v1/libraries/{library_id}/assets:batch` | `--reason` |
|
|
360
361
|
| `praxis api media library asset create` | `media.libraries.assets.create` | POST `/media/v1/libraries/{library_id}/assets` | `--library`, `--file`, `--public-id`, `--public-id-prefix`, `--display-name`, `--asset-folder`, `--use-filename`, `--unique-filename`, `--use-filename-as-display-name`, `--filename-override`, `--overwrite`, `--auto-tagging`, `--resource-type`, `--type` |
|
|
361
362
|
| `praxis api media library asset delete <asset_id>` | `media.libraries.assets.delete` | DELETE `/media/v1/libraries/{library_id}/assets/{asset_id}` | `--library` |
|
|
@@ -373,8 +374,12 @@ Handwritten commands: `login`, `logout`, `whoami`, `org list`, `org switch <orga
|
|
|
373
374
|
| `praxis api media library delivery-token create` | `media.libraries.deliveryTokens.create` | POST `/media/v1/libraries/{library_id}/delivery_tokens` | `--library`, `--acl`, `--expires-in` |
|
|
374
375
|
| `praxis api media library event list` | `media.libraries.events.list` | GET `/media/v1/libraries/{library_id}/events` | `--library`, `--after-seq`, `--before-seq`, `--order`, `--param-limit` |
|
|
375
376
|
| `praxis api media library folder list` | `media.libraries.folders.list` | GET `/media/v1/libraries/{library_id}/folders` | `--library`, `--parent` |
|
|
377
|
+
| `praxis api media library generation create` | `media.libraries.generations.create` | POST `/media/v1/libraries/{library_id}/generations` | `--library`, `--intent`, `--prompt`, `--count`, `--duration-seconds`, `--aspect-ratio`, `--model`, `--save`, `--asset-folder`, `--tags`, `--understanding` |
|
|
376
378
|
| `praxis api media library get <library_id>` | `media.libraries.retrieve` | GET `/media/v1/libraries/{library_id}` | |
|
|
379
|
+
| `praxis api media library job cancel <job_id>` | `media.libraries.jobs.cancel` | POST `/media/v1/libraries/{library_id}/jobs/{job_id}/cancel` | `--library` |
|
|
377
380
|
| `praxis api media library job get <job_id>` | `media.libraries.jobs.retrieve` | GET `/media/v1/libraries/{library_id}/jobs/{job_id}` | `--library` |
|
|
381
|
+
| `praxis api media library job list` | `media.libraries.jobs.list` | GET `/media/v1/libraries/{library_id}/jobs` | `--library`, `--status`, `--param-limit`, `--param-cursor` |
|
|
382
|
+
| `praxis api media library job output save create` | `media.libraries.jobs.outputs.save.create` | POST `/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save` | `--library`, `--job`, `--output`, `--public-id`, `--asset-folder`, `--tags`, `--understanding` |
|
|
378
383
|
| `praxis api media library list` | `media.libraries.list` | GET `/media/v1/libraries` | `--param-cursor`, `--param-limit`, `--labels`, `--status` |
|
|
379
384
|
| `praxis api media library purge <library_id>` | `media.libraries.purge.create` | POST `/media/v1/libraries/{library_id}/purge` | |
|
|
380
385
|
| `praxis api media library restore <library_id>` | `media.libraries.restore` | POST `/media/v1/libraries/{library_id}/restore` | |
|
package/dist/praxis.js
CHANGED
|
@@ -10162,6 +10162,12 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10162
10162
|
type: "integer",
|
|
10163
10163
|
required: false,
|
|
10164
10164
|
description: "Committed project revision from retrieve, state, timeline or execute; increases after each successful write."
|
|
10165
|
+
},
|
|
10166
|
+
{
|
|
10167
|
+
name: "loudness",
|
|
10168
|
+
type: "object",
|
|
10169
|
+
required: false,
|
|
10170
|
+
description: "Optional loudness normalization target; normalization adds analysis and rendering work."
|
|
10165
10171
|
}
|
|
10166
10172
|
]
|
|
10167
10173
|
}
|
|
@@ -10385,7 +10391,7 @@ Execution errors include error.details.prints containing output printed before f
|
|
|
10385
10391
|
resource: "cut.projects",
|
|
10386
10392
|
method: "execute",
|
|
10387
10393
|
summary: "Execute editing script",
|
|
10388
|
-
description: 'Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`\n\n### Script function reference\n\nFunctions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.\n\n```ts\nGetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;\nGetItem(id: ClipId): ItemView;\nFindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];\nGetMedia(ref: MediaRef): MediaInfo;\nGetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];\nGetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];\nListTransitions(): TransitionInfo[];\nListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };\nDelete(id: ClipId, o?: { ripple?: boolean }): void;\nJoin(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;\nUpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;\nDeleteJoin(id: JoinId): void;\nSplit(id: ClipId, at: number): ClipId;\nTrim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;\nMove(id: ClipId, start: number, track?: TrackId): void;\nRippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;\nAddTrack(kind: "video" | "audio" | "caption", init?: { name?: string }, index?: number): TrackId;\nUpdateTrack(id: TrackId, patch: TrackPatch): void;\nDeleteTrack(id: TrackId): void;\nSetSettings(patch: Partial<ProjectSettingsView>): void;\nAddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle>; maxChars?: number }): ClipId[];\nSetMarker(at: number, label: string): string;\nPrint(...values: unknown[]): void;\nPreview(at: number[]): void;\n```\n\n| Functions | Behavior and arguments |\n| --- | --- |\n| GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |\n| ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |\n| FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |\n| GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |\n| GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |\n| Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |\n| SetSpeed | Change video/audio rate in 0.25–4; keep is required. source preserves consumed source and changes length, duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |\n| Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |\n| Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |\n| RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |\n| AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb and style as appropriate to track kind. |\n| SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |\n| AddCaptionsFromTranscript | Create captions from an audio/video clip\'s kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |\n| SetMarker | Add a label at a timeline time and return its ID. |\n| Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result\'s frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |\n\n#### Joins between clips\n\nEndpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint\'s length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection\'s code and message, shorten or remove conflicting joins, and retry the saved edit.\n\nTransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use the catalog defaults. Unknown kinds and unknown or invalid parameters are rejected. Effects: dissolve (no parameters); dip (color black/white, default black); push and wipe (direction left/right/up/down, default left); wipe also has softness 0–1, default 0; iris has centerX/centerY 0–1, both default 0.5; blinds has integer count 2–64, default 8, and orientation vertical/horizontal, default vertical; blur has radius 0–100 pixels at 1080-pixel frame height, default 24. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\n\nMinimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.\n\n#### Insert fields (ItemInit)\n\nEvery item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.\n\n| type | Required fields beyond type/start | Optional fields |\n| --- | --- | --- |\n| video | media | length, sourceIn, playback, volumeDb, transform, fit, animate, transitionIn, transitionOut |\n| image | media, length | transform, fit, animate, transitionIn, transitionOut |\n| text | text, length | style, transform, reveal, animate, transitionIn, transitionOut |\n| color | color, length | transform, fill, animate, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, animate, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, fadeIn, fadeOut |\n| caption | text, length | — |\n\nVideo tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.\n\n| Field | Value |\n| --- | --- |\n| transform | Partial `{x, y, scale, rotation, opacity, crop, blur}`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is `{top,right,bottom,left}`. blur is 0–100 pixels at 1080-pixel frame height. |\n| style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |\n| animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of `{at: number, value: number, ease?: Ease}` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |\n| Ease | linear, in, out, inOut, `{bezier: [x1,y1,x2,y2]}` or `{spring: {stiffness, damping, mass?}}`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |\n| reveal | `{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |\n| fill | A color string (#RRGGBB or #RRGGBBAA), `{linear: {angle, stops: [{at,color}, ...]}}` or `{radial: {stops: [{at,color}, ...]}}`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |\n| shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |\n| transitionIn, transitionOut | `{kind, length: number}` at the clip\'s beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |\n\n#### Update fields (ItemPatchView)\n\nAll fields are optional; use only fields relevant to the item\'s type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, fill, stroke, shape, width, height, radius, transitionIn, transitionOut. Values and units match Insert. Set animate, reveal, fill, stroke, transitionIn or transitionOut to null to remove that effect; omitting a field preserves it. For example: `Update(id, {volumeDb: -12})` or `Update(id, {transitionIn: null})`.\n\n#### Speed, reverse and freeze\n\nVideo/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.\n\nUpdate of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.\n\nExample for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.\n\n#### Script names versus HTTP response names\n\nUse camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.\n\nUnrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection\'s #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.\n',
|
|
10394
|
+
description: 'Edit the current timeline atomically using synchronous JavaScript source. Read state or timeline first, then pass its revision as expected_revision to detect concurrent changes. Unlike Shotstack, execute applies script edits to a persistent project in one transaction. Provide script or a saved edit_id with literal edits, never both; failures roll back writes. A revision conflict while preparing the response may follow a committed edit: retrieve state before retrying. Minimal script after creating a project: `const t = AddTrack("video"); Insert(t, {type: "color", color: "#123456", start: 0, length: 3}); Print(t);`\n\n### Script function reference\n\nFunctions are synchronous globals; do not import them. `project` is the current project ID. TrackId and ClipId are strings returned by AddTrack and Insert or read from GetTimeline. JoinId is the string returned by Join or read from GetTimeline().joins. Reads see earlier writes in the same script.\n\n```ts\nGetTimeline(o?: { from?: number; to?: number; tracks?: TrackId[] }): TimelineView;\nGetItem(id: ClipId): ItemView;\nFindItems<T>(visit: (item: ItemView, ctx: { track: TrackView; index: number }) => T | undefined): T[];\nGetMedia(ref: MediaRef): MediaInfo;\nGetTranscript(ref: MediaRef, o?: { from?: number; to?: number }): Word[];\nGetAnalysis(ref: MediaRef, kind: AnalysisKind): Segment[];\nListTransitions(): TransitionInfo[];\nListEffects(): EffectInfo[];\nListTextStyles(): TextStylePreset[];\nListTextTemplates(): TextTemplate[];\nListAnimations(): { id: string; version: number; phase: "in" | "out" | "loop"; target: "any" | "text"; name: string; description: string; defaultDuration: number; params: { name: string; type: string; values?: string[]; default?: string | number; min?: number; max?: number; description: string }[] }[];\nListFonts(): { family: string; weights: number[]; scripts: ("latin"|"cjk")[]; source: "bundled"|"catalog" }[];\nInsert(track: TrackId, item: ItemInit, o?: { ripple?: boolean }): ClipId;\nUpdate(id: ClipId, patch: ItemPatchView): void;\nSetSpeed(id: ClipId, rate: number | { curve: { at: number; rate: number; ease?: Ease }[]; audio?: "mute" | "resample" }, o: { keep: "source" | "duration"; ripple?: boolean }): { length: number; sourceOut: number };\nDelete(id: ClipId, o?: { ripple?: boolean }): void;\nJoin(left: ClipId, right: ClipId, o: { length?: number; effect: TransitionInput }): JoinId;\nUpdateJoin(id: JoinId, patch: { length?: number; effect?: TransitionInput }): void;\nDeleteJoin(id: JoinId): void;\nSplit(id: ClipId, at: number): ClipId;\nTrim(id: ClipId, edge: "in" | "out", delta: number, o?: { ripple?: boolean }): void;\nMove(id: ClipId, start: number, track?: TrackId): void;\nRippleDeleteRange(from: number, to: number, tracks?: TrackId[]): void;\nAddTrack(kind: "video" | "audio" | "caption", init?: { name?: string; role?: "voice" | "music" | "sfx" }, index?: number): TrackId;\nUpdateTrack(id: TrackId, patch: TrackPatch): void;\nDeleteTrack(id: TrackId): void;\nSetSettings(patch: Partial<ProjectSettingsView>): void;\nAddCaptionsFromTranscript(track: TrackId, source: ClipId, o?: { style?: Partial<CaptionStyle> & { preset?: string }; maxChars?: number }): ClipId[];\nInsertTemplate(track: TrackId, o: { template: string; start: number; slots?: Record<string, string> }): ClipId[];\nAlignCaptions(trackId: TrackId, script: string): { replaced: number; added: number; deleted: number };\nSetMarker(at: number, label: string): string;\nPrint(...values: unknown[]): void;\nPreview(at: number[]): void;\n```\n\n| Functions | Behavior and arguments |\n| --- | --- |\n| GetTimeline, GetItem | Read compact item views: id, track, type, start, end, length, optional media, playback, sourceIn/sourceOut, text, effects, blend and offline reason. GetTimeline returns duration, tracks (id, kind, name, index, locked, items), and joins (id, track, left, right, length in seconds, normalized effect). from/to and tracks narrow the items and joins; joins are selected by their overlap window. |\n| ListEffects | Discover the shared visual-effect catalog with parameter types, ranges, defaults, cost and bounds. Effects are supported only on visual clips. |\n| ListTransitions | Discover the shared validation catalog: each entry contains kind (effect ID), name, description and params. Each parameter has name, type (enum/number/integer), default, description, enum values or numeric min/max. Use the returned kind and parameter names inside effect. |\n| ListAnimations | Discover animation presets. Each entry has id, version, phase (`in`, `out`, `loop`), target (`any`, `text`), name, description, defaultDuration (seconds), and params (name, type, values/default/min/max/description as applicable). A slot use is `{preset, duration?, ...params}`; duration is seconds. |\n| FindItems | Visit items with their track and index; return undefined to omit an item, any other value to collect it. |\n| GetMedia | Read metadata for `{libraryId, assetId}` in a bound library: kind, dimensions, fps, hasAudio and durationUs when available. durationUs is microseconds. |\n| GetTranscript, GetAnalysis | Read available transcript words or silence/filler/scenes segments. Transcript filter from/to is seconds; returned word and segment from/to values are source microseconds (divide by 1,000,000 for editing). Words contain text and optional speaker/filler; segments may include label/confidence. Request analysis first if unavailable. |\n| Insert, Update, Delete | Insert returns the new clip ID; Update changes supplied fields; Delete removes the clip. Optional ripple on Insert/Delete closes or opens space on the track. |\n| SetSpeed | Change video/audio rate in 0.25–4; keep is required. A `{curve: [{at, rate, ease?}, ...], audio?: "mute" | "resample"}` rate is forward-only and holds output duration fixed; pitch preservation is unavailable. Scalar rates: source preserves consumed source and changes length; duration preserves output length. Returns actual length and sourceOut in seconds. Optional ripple explicitly shifts same-track followers when keeping source; otherwise overlaps are rejected. |\n| Join, UpdateJoin, DeleteJoin | Join creates an overlap between two butt-adjacent visual clips on the same track and returns its ID. length defaults to 0.5 seconds; effect is required. The right clip and all same-track followers move left by length, shortening that track and potentially the project. UpdateJoin moves those followers by the difference in length; omitted fields are preserved. DeleteJoin moves them right to restore the butt cut. Other tracks stay in place. |\n| Split, Trim, Move | Split at a timeline position and return the new right-hand clip ID. Trim changes the in or out edge by delta seconds. Move sets the timeline start and optionally a new track. |\n| RippleDeleteRange | Delete a timeline interval and close its gap on the specified tracks, or all unlocked tracks when omitted. |\n| AddTrack, UpdateTrack, DeleteTrack | Add video/audio/caption tracks; index selects layer order (0 is top). TrackPatch supports name, locked, hidden, muted, gainDb, audio role (`voice`, `music`, `sfx`) and style as appropriate to track kind. |\n| SetSettings | Supply any of width/height (pixels), fps (frames per second), background (color). |\n| AddCaptionsFromTranscript | Create captions from an audio/video clip\'s kept words. Optional maxChars is 1–1000, default 16; style updates the caption track. Returns caption IDs. |\n| SetMarker | Add a label at a timeline time and return its ID. |\n| Print, Preview | Print appends text to prints. Preview requests up to eight times total per execute and puts images in the result\'s frames. Each url is an inline PNG data URL, not an HTTP image link. Decode the base64 payload to save an image. Codemode returns at most four images per call; request at most four times there. |\n\n#### Joins between clips\n\nEndpoints may be video, image, text, color or shape; audio and caption are rejected. Require 0 < length < each endpoint\'s length. Each clip allows at most one incoming and one outgoing join; their summed lengths cannot exceed its length. Three-input overlaps, nonadjacent endpoints and cross-track joins are rejected with OPS_REJECTED. Read the rejection\'s code and message, shorten or remove conflicting joins, and retry the saved edit.\n\nTransitionInput is an object with kind plus the parameters returned by ListTransitions; omitted parameters use catalog defaults. Unknown kinds and invalid parameters return INVALID_TRANSITION_PARAM with available parameters. Effects: dissolve; dip color black/white default black; push and wipe direction left/right/up/down default left; wipe softness 0–1 default 0; iris centerX/centerY 0–1 default 0.5; blinds integer count 2–64 default 8 and orientation vertical/horizontal default vertical; blur radius 0–100 pixels at 1080-pixel frame height default 24; zoom direction in/out default in, amount 0.1–3 default 1, blur 0–1 default 0.5; clock direction clockwise/counterclockwise default clockwise, startAngle 0–360 degrees default 0 (twelve o\'clock), softness 0–1 default 0; flash color white/black default white, intensity 0–1 default 1. Zoom blur uses up to eight radial samples per shot and is slower on server rendering. Join options and UpdateJoin patches accept only length and effect. Effect updates replace the effect object and apply defaults for omitted parameters.\n\nMinimal example on an existing visual track with adjacent clips left and right: `Print(ListTransitions()); const j = Join(left, right, {length: 0.5, effect: {kind: "dissolve"}}); Print(GetTimeline().joins); Preview([GetItem(right).start + 0.25]);` Use `UpdateJoin(j, {length: 0.8})` to adjust it in a later edit or `DeleteJoin(j)` to restore the cut. Preview uses server-rendered frames and includes joins. Per-clip transitionIn/transitionOut remain separate entrance/exit effects.\n\n#### Insert fields (ItemInit)\n\nEvery item requires `type` and `start`. Times used for editing are seconds and snap to the project frame rate: start, length, sourceIn, fadeIn/fadeOut, transition length, keyframe at, reveal delay/stagger/duration. Keyframe and reveal times are relative to the clip start. Video/audio may omit length to use the remaining source duration; other types require length.\n\n| type | Required fields beyond type/start | Optional fields |\n| --- | --- | --- |\n| video | media | length, sourceIn, playback, volumeDb, transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| image | media, length | transform, fit, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| text | text, length | style, transform, blend, reveal, animate, animation, effects, mask, transitionIn, transitionOut |\n| color | color, length | transform, fill, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| shape | shape, length, width, height, fill | radius, stroke, transform, blend, animate, animation, effects, mask, transitionIn, transitionOut |\n| audio | media | length, sourceIn, playback, volumeDb, gain, fadeIn, fadeOut |\n| caption | text, length | — |\n\nVisual Insert/Update also accepts `blend`: `normal` (default), `screen`, `multiply`, `overlay`, or `add`; set it to null in Update to clear it. During a Join overlap, both inputs render with normal blending. Video tracks accept video/image/text/color/shape; audio and caption tracks accept their corresponding type. Media is `{libraryId: string, assetId: string}` from a bound library. sourceIn defaults to 0, volumeDb to 0 dB, audio fades to 0 seconds. fit defaults to contain: contain fits the whole image, cover fills and crops, fill stretches, none keeps native dimensions.\n\n| Field | Value |\n| --- | --- |\n| transform | Partial `{x, y, scale, rotation, opacity, crop, blur}`. x/y are normalized canvas center coordinates (default 0.5); scale 1 is fitted size; rotation is degrees (default 0); opacity is 0–1 (default 1). crop is `{top,right,bottom,left}`. blur is 0–100 pixels at 1080-pixel frame height. |\n| style | Partial `{fontFamily, fontSize, fontWeight, color, fill, stroke, strokes, shadows, glow, background, align, maxWidth, position, margin}`. fill accepts a color or linear/radial gradient across the entire text bounding box. strokes draw outside to inside; at most 4, width 0–40. shadows accepts at most 4 `{color,x,y,blur}` entries; blur is 0–100. glow is `{color,radius,strength}` with radius 0–100 and strength 0–1. All dimensions use pixels at 1080 frame height and scale with the text. Glow and large shadow blur increase render time. Invalid colors or ranges return actionable INVALID_STYLE errors. `ListFonts()` discovers family, available weights, scripts and bundled/catalog source. Text and captions share the style fields; caption style additionally supports highlightColor and maxLines: 2. |\n| animate | An object keyed by x, y, scale, rotation, opacity or blur. Each value is an array of `{at: number, value: number, ease?: Ease}` sorted by at with distinct frame-snapped times. Values hold before the first and after the last keyframe, overriding the static transform. |\n| animation | `{in?: AnimationUse, out?: AnimationUse, loop?: AnimationUse}` on visual clips. Each use is `{preset: string, duration?: number, ...params}`; duration and parameter units follow `ListAnimations()`. Presets replace existing animate and reveal when applied. Update accepts `animation: null` to clear the preset and its generated effects. |\n| Ease | linear, in, out, inOut, `{bezier: [x1,y1,x2,y2]}` or `{spring: {stiffness, damping, mass?}}`. Easing shapes the segment arriving at that keyframe; springs may overshoot. |\n| reveal | `{by, delay?: number, stagger: number, duration: number, from: {y?, opacity?, scale?, blur?}, ease?: Ease}`. by selects char, word or line. Unit k starts at delay + k * stagger and takes duration seconds to reach its resting state; from.y is a fraction of font size. |\n| fill | A color string (#RRGGBB or #RRGGBBAA), `{linear: {angle, stops: [{at,color}, ...]}}` or `{radial: {stops: [{at,color}, ...]}}`. Stop positions are 0–1; angle is degrees, 0 left to right. On color clips, fill replaces color when supplied. |\n| shape, width, height, radius, stroke | shape is rect or ellipse. width/height are fractions of canvas width/height before scaling. radius rounds rect corners in pixels at 1080-pixel frame height. stroke is `{color: string, width: number}`. |\n| transitionIn, transitionOut | `{kind, length: number}` at the clip\'s beginning/end. length is seconds. fade changes opacity; dissolve blends; push_left/push_right move horizontally; wipe_left reveals horizontally. |\n\n#### Visual effects\n\n`effects` is an ordered stack of at most 8 catalog entries. Call `ListEffects()` to discover the catalog; unknown kinds return `UNKNOWN_EFFECT`, invalid names/values/keyframes return `INVALID_EFFECT_PARAM`, and stacks over 8 return `TOO_MANY_EFFECTS`. Entries include blur, color adjustment, vignette, film grain, chromatic aberration, pixelate, glitch, shake, flash, light leak and built-in `lut` looks; user `.cube` LUTs are not supported. `speed` is cycles per second. Effects run on CPU during export and increase render time. Parameters are discovered with ListEffects(). Catalog entries expose their own parameters through ListEffects(), including `blur` (`radius` 0–100, default 24) and `color_adjust`: `brightness`, `contrast`, `temperature`, and `tint` each range -1–1 (default 0), while `saturation` ranges 0–2 (default 1). Disabled entries are skipped. `color_adjust` uses an SDR-only Rec.709 adjustment matrix with no color management.\n\nNumeric and integer effect parameters accept `keyframes: {parameter: [{at, value, ease?}, ...]}`; times are seconds relative to the clip, snap to frames like `animate`, must be strictly increasing and within clip duration, and values follow that parameter\'s catalog range. Omitted parameters use catalog defaults. Trim and Split preserve effect keyframes with the same clip-local behavior as `animate`. There are no custom shaders.\n\n`blend` applies to the completed visual layer after its content, effects and `transform.blur`; `add` maps to Skia Plus. The default `normal` path adds no blend layer. During Join overlaps, blending is forced to normal because each input is composed on transparency.\n\n#### Update fields (ItemPatchView)\n\nAll fields are optional; use only fields relevant to the item\'s type. Supported fields: start, length, sourceIn, playback, volumeDb, transform, fit, text, style, color, fadeIn, fadeOut, animate, reveal, animation, fill, stroke, shape, width, height, radius, transitionIn, transitionOut, effects, blend, mask, gain. Values and units match Insert; set effects or blend to null to clear them. Set animation to null to clear the preset; set animate or reveal to null to remove that effect. Applying a preset replaces existing animate/reveal. Do not set animation together with animate or reveal in one Insert/Update call. Omit a field to preserve it.\n\n#### Animation presets\n\nDiscover the catalog with `ListAnimations()`. Its entries contain id, version, phase (`in`, `out`, `loop`), target (`any` or `text`), name, description, defaultDuration in seconds, and params. Slots may combine one in, one out and one loop preset. A loop runs only in the interval between in and out; if the same property is animated by multiple slots, loop occupies only that middle interval. Text-target presets are entrances. Their duration controls the rhythm per character/word/line, not the total reveal time. Out and loop presets apply to the whole clip, not per text unit.\n\nPresets replace the clip\'s existing animate and reveal when applied. The source preset is retained, so changing clip length or transform automatically regenerates its keyframes/reveal. If a clip becomes shorter, in/out durations shrink proportionally; when it grows, the requested durations are restored. Split keeps in on the left, out on the right, and loop on both. Writing animate or reveal directly detaches the preset; setting animation to null clears both source and generated effects. Insert/Update reject a call that supplies animation together with animate or reveal.\n\nErrors: UNKNOWN_ANIMATION (unknown preset), INVALID_ANIMATION_PARAM (invalid slot/parameter or frame/keyframe limit), ANIMATION_TOO_LONG (in+out exceed clip length), ANIMATION_TARGET_MISMATCH (text-only preset on a non-text or preset on non-visual clip), ANIMATION_PHASE_MISMATCH (preset in the wrong slot). Each animated property is limited to 600 keyframes; loop duration must be at least 4 frames. `ANIMATION_TOO_LONG` is avoided during later length changes by proportional fitting.\n\n#### Speed, reverse and freeze\n\nVideo/audio Insert and Update accept playback as `{kind: "rate", rate: number, direction: "forward" | "reverse", audio: "preservePitch" | "resample" | "mute"}` or `{kind: "freeze"}`. Rate is finite and inclusive 0.25–4. Omitted playback defaults to 1× forward with preservePitch; supply the complete rate object when changing playback. preservePitch keeps pitch, resample changes pitch with speed, mute removes audio. Reverse requires explicit audio: "mute"; preservePitch/resample are rejected with UNSUPPORTED_PLAYBACK rather than silently muted. Freeze holds sourceIn and is silent. GetItem/GetTimeline echo playback and the source interval in seconds; sourceOut is exclusive even for reverse and equals sourceIn for freeze.\n\nUpdate of playback keeps output length unless length is also supplied. SetSpeed preserves direction/audio, rejects frozen and non-video/audio clips, and requires keep: "source" or "duration". keep: "source" computes round(consumed source / new rate × fps) frames, falling back to floor if rounding would exceed the source end; the returned length/sourceOut are actual frame-rounded seconds. keep: "duration" keeps output length and changes source consumption. Length conflicts fail with OVERLAP; move/shorten the conflicting clip, keep duration, or explicitly use ripple: true to shift following clips on the same track. Source overflow fails with OUT_OF_SOURCE; rate limits fail with RATE_OUT_OF_RANGE. Unknown playback fields and SetSpeed options are rejected with UNKNOWN_FIELD; options only accept keep and boolean ripple.\n\nExample for an existing four-second video/audio clip id: `Print(SetSpeed(id, 0.5, {keep: "source"})); Print(SetSpeed(id, 2, {keep: "source"}));` returns lengths 8 then 2, keeping the same source interval. Reverse: `Update(id, {playback: {kind: "rate", rate: 1, direction: "reverse", audio: "mute"}})`. Freeze: `Update(id, {playback: {kind: "freeze"}})`. Ensure enough source remains for the chosen length/rate. Browser reverse playback currently displays a placeholder; server-rendered Preview/frames and exports support reverse normally. Speed-adjusted audio is generated asynchronously after the edit transaction commits; exports wait for that audio before rendering.\n\n#### Script names versus HTTP response names\n\nUse camelCase inside scripts, including nested objects. HTTP request/response JSON outside script source uses snake_case. Map media.library_id → media.libraryId, media.asset_id → media.assetId, source_in → sourceIn, volume_db → volumeDb, fade_in/fade_out → fadeIn/fadeOut, transition_in/transition_out → transitionIn/transitionOut, font_family/font_size/font_weight/max_width → fontFamily/fontSize/fontWeight/maxWidth, gain_db → gainDb, highlight_color/max_lines → highlightColor/maxLines. Fields such as animate, reveal, fill, stroke, at and length retain their spelling. GetTimeline/GetItem already return camelCase compact views; the expanded retrieveTimeline HTTP response is not an Insert object.\n\nUnrecognized script fields fail with OPS_REJECTED and rejection code UNKNOWN_FIELD; snake_case mistakes suggest the corresponding camelCase name. The error message lists each rejection\'s #opIndex, code and reason. Correct the named fields and retry the saved edit; do not assume an ignored field applied an effect.\n',
|
|
10389
10395
|
http: "POST",
|
|
10390
10396
|
path: "/cut/v1/projects/{project_id}:execute",
|
|
10391
10397
|
streaming: "no",
|
|
@@ -12613,6 +12619,18 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
12613
12619
|
],
|
|
12614
12620
|
query: []
|
|
12615
12621
|
},
|
|
12622
|
+
{
|
|
12623
|
+
resource: "media.generation.capabilities",
|
|
12624
|
+
method: "list",
|
|
12625
|
+
summary: "Get generation capabilities",
|
|
12626
|
+
description: "Read supported text-to-video intent, default model, duration and aspect-ratio limits, per-library concurrency and candidate retention. Generation is charged per second; unsaved candidates expire after 7 days.",
|
|
12627
|
+
http: "GET",
|
|
12628
|
+
path: "/media/v1/generation/capabilities",
|
|
12629
|
+
streaming: "no",
|
|
12630
|
+
pagination: false,
|
|
12631
|
+
pathParams: [],
|
|
12632
|
+
query: []
|
|
12633
|
+
},
|
|
12616
12634
|
{
|
|
12617
12635
|
resource: "media.libraries",
|
|
12618
12636
|
method: "list",
|
|
@@ -13524,11 +13542,155 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13524
13542
|
}
|
|
13525
13543
|
]
|
|
13526
13544
|
},
|
|
13545
|
+
{
|
|
13546
|
+
resource: "media.libraries.generations",
|
|
13547
|
+
method: "create",
|
|
13548
|
+
summary: "Create video generation",
|
|
13549
|
+
description: "Create a video.generate job. Generation is charged per second. The response is 202 with a queued Job; poll GET /media/v1/libraries/{library_id}/jobs/{job_id} until terminal, then save successful outputs. Unsaved candidate Files expire after 7 days.",
|
|
13550
|
+
http: "POST",
|
|
13551
|
+
path: "/media/v1/libraries/{library_id}/generations",
|
|
13552
|
+
streaming: "no",
|
|
13553
|
+
pagination: false,
|
|
13554
|
+
pathParams: [
|
|
13555
|
+
{
|
|
13556
|
+
name: "library_id",
|
|
13557
|
+
sdkName: "library_id",
|
|
13558
|
+
description: "Library ID returned by creation."
|
|
13559
|
+
}
|
|
13560
|
+
],
|
|
13561
|
+
query: [],
|
|
13562
|
+
body: {
|
|
13563
|
+
required: true,
|
|
13564
|
+
fields: [
|
|
13565
|
+
{
|
|
13566
|
+
name: "intent",
|
|
13567
|
+
type: "string",
|
|
13568
|
+
required: true,
|
|
13569
|
+
description: "Generation operation; v1 accepts only video.generate text-to-video requests."
|
|
13570
|
+
},
|
|
13571
|
+
{
|
|
13572
|
+
name: "prompt",
|
|
13573
|
+
type: "string",
|
|
13574
|
+
required: true,
|
|
13575
|
+
description: "Text prompt describing the video to generate."
|
|
13576
|
+
},
|
|
13577
|
+
{
|
|
13578
|
+
name: "count",
|
|
13579
|
+
type: "integer",
|
|
13580
|
+
required: false,
|
|
13581
|
+
description: "Number of videos to generate; defaults to 1 and must be from 1 to 4."
|
|
13582
|
+
},
|
|
13583
|
+
{
|
|
13584
|
+
name: "duration_seconds",
|
|
13585
|
+
type: "integer",
|
|
13586
|
+
required: false,
|
|
13587
|
+
description: "Requested video duration in seconds; Router validates the model-specific supported durations."
|
|
13588
|
+
},
|
|
13589
|
+
{
|
|
13590
|
+
name: "aspect_ratio",
|
|
13591
|
+
type: "string",
|
|
13592
|
+
required: false,
|
|
13593
|
+
description: "Requested output aspect ratio; defaults to 16:9 and Router validates model support."
|
|
13594
|
+
},
|
|
13595
|
+
{
|
|
13596
|
+
name: "model",
|
|
13597
|
+
type: "string",
|
|
13598
|
+
required: false,
|
|
13599
|
+
description: "Router model with video_generation capability; defaults to wan2.7-t2v."
|
|
13600
|
+
},
|
|
13601
|
+
{
|
|
13602
|
+
name: "save",
|
|
13603
|
+
type: "string",
|
|
13604
|
+
enum: [
|
|
13605
|
+
"candidate",
|
|
13606
|
+
"library"
|
|
13607
|
+
],
|
|
13608
|
+
required: false,
|
|
13609
|
+
description: "candidate keeps outputs temporary for explicit save calls; library saves successful outputs automatically."
|
|
13610
|
+
},
|
|
13611
|
+
{
|
|
13612
|
+
name: "asset_folder",
|
|
13613
|
+
type: "string",
|
|
13614
|
+
required: false,
|
|
13615
|
+
description: "Folder for assets saved automatically or by later save calls; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
|
|
13616
|
+
},
|
|
13617
|
+
{
|
|
13618
|
+
name: "tags",
|
|
13619
|
+
type: "array",
|
|
13620
|
+
itemType: "string",
|
|
13621
|
+
required: false,
|
|
13622
|
+
description: "Tags applied when an output becomes a library asset."
|
|
13623
|
+
},
|
|
13624
|
+
{
|
|
13625
|
+
name: "understanding",
|
|
13626
|
+
type: "string",
|
|
13627
|
+
enum: [
|
|
13628
|
+
"auto",
|
|
13629
|
+
"skip"
|
|
13630
|
+
],
|
|
13631
|
+
required: false,
|
|
13632
|
+
description: "Understanding behavior when a candidate is saved as an asset; defaults to auto."
|
|
13633
|
+
},
|
|
13634
|
+
{
|
|
13635
|
+
name: "references",
|
|
13636
|
+
type: "array",
|
|
13637
|
+
itemType: "object",
|
|
13638
|
+
required: false,
|
|
13639
|
+
description: "Not supported in v1; omit this field. Only text-to-video is currently available."
|
|
13640
|
+
}
|
|
13641
|
+
]
|
|
13642
|
+
}
|
|
13643
|
+
},
|
|
13644
|
+
{
|
|
13645
|
+
resource: "media.libraries.jobs",
|
|
13646
|
+
method: "list",
|
|
13647
|
+
summary: "List jobs",
|
|
13648
|
+
description: "List batch and video-generation jobs in a library. Filter by status and continue with next_cursor. Poll a generation Job until terminal, then save successful candidate outputs before they expire after 7 days.",
|
|
13649
|
+
http: "GET",
|
|
13650
|
+
path: "/media/v1/libraries/{library_id}/jobs",
|
|
13651
|
+
streaming: "no",
|
|
13652
|
+
pagination: true,
|
|
13653
|
+
pathParams: [
|
|
13654
|
+
{
|
|
13655
|
+
name: "library_id",
|
|
13656
|
+
sdkName: "library_id",
|
|
13657
|
+
description: "Library ID returned by creation."
|
|
13658
|
+
}
|
|
13659
|
+
],
|
|
13660
|
+
query: [
|
|
13661
|
+
{
|
|
13662
|
+
name: "status",
|
|
13663
|
+
type: "string",
|
|
13664
|
+
enum: [
|
|
13665
|
+
"queued",
|
|
13666
|
+
"running",
|
|
13667
|
+
"completed",
|
|
13668
|
+
"completed_with_errors",
|
|
13669
|
+
"failed",
|
|
13670
|
+
"cancelled"
|
|
13671
|
+
],
|
|
13672
|
+
required: false,
|
|
13673
|
+
description: "Filter jobs by their current status."
|
|
13674
|
+
},
|
|
13675
|
+
{
|
|
13676
|
+
name: "limit",
|
|
13677
|
+
type: "integer",
|
|
13678
|
+
required: false,
|
|
13679
|
+
description: "Maximum entries in this page, from 1 through 100; defaults to 100."
|
|
13680
|
+
},
|
|
13681
|
+
{
|
|
13682
|
+
name: "cursor",
|
|
13683
|
+
type: "string",
|
|
13684
|
+
required: false,
|
|
13685
|
+
description: "Job id from the previous page’s next_cursor; omit for the first page."
|
|
13686
|
+
}
|
|
13687
|
+
]
|
|
13688
|
+
},
|
|
13527
13689
|
{
|
|
13528
13690
|
resource: "media.libraries.jobs",
|
|
13529
13691
|
method: "retrieve",
|
|
13530
|
-
summary: "Get job
|
|
13531
|
-
description: "Read
|
|
13692
|
+
summary: "Get job",
|
|
13693
|
+
description: "Read the current batch or video-generation Job status and progress. For generation, inspect outputs and failures, then save successful candidates before their preview and save window expires after 7 days.",
|
|
13532
13694
|
http: "GET",
|
|
13533
13695
|
path: "/media/v1/libraries/{library_id}/jobs/{job_id}",
|
|
13534
13696
|
streaming: "no",
|
|
@@ -13542,11 +13704,96 @@ The default is return=minimal: success returns HTTP 201 with an empty body. Send
|
|
|
13542
13704
|
{
|
|
13543
13705
|
name: "job_id",
|
|
13544
13706
|
sdkName: "job_id",
|
|
13545
|
-
description: "
|
|
13707
|
+
description: "Job identifier returned by batch creation, video-generation creation or job listing; resolved within this library."
|
|
13546
13708
|
}
|
|
13547
13709
|
],
|
|
13548
13710
|
query: []
|
|
13549
13711
|
},
|
|
13712
|
+
{
|
|
13713
|
+
resource: "media.libraries.jobs",
|
|
13714
|
+
method: "cancel",
|
|
13715
|
+
summary: "Cancel job",
|
|
13716
|
+
description: "Cancel a queued or running generation job. Already completed outputs remain available to save; poll or read the returned Job to confirm its status.",
|
|
13717
|
+
http: "POST",
|
|
13718
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
13719
|
+
streaming: "no",
|
|
13720
|
+
pagination: false,
|
|
13721
|
+
pathParams: [
|
|
13722
|
+
{
|
|
13723
|
+
name: "library_id",
|
|
13724
|
+
sdkName: "library_id",
|
|
13725
|
+
description: "Library ID returned by creation."
|
|
13726
|
+
},
|
|
13727
|
+
{
|
|
13728
|
+
name: "job_id",
|
|
13729
|
+
sdkName: "job_id",
|
|
13730
|
+
description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
|
|
13731
|
+
}
|
|
13732
|
+
],
|
|
13733
|
+
query: []
|
|
13734
|
+
},
|
|
13735
|
+
{
|
|
13736
|
+
resource: "media.libraries.jobs.outputs.save",
|
|
13737
|
+
method: "create",
|
|
13738
|
+
summary: "Save generation output",
|
|
13739
|
+
description: "Save a successful candidate as a library asset. Candidate outputs expire after 7 days; save before expiry. Generation is charged per second when the job runs, not when an output is saved.",
|
|
13740
|
+
http: "POST",
|
|
13741
|
+
path: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
|
|
13742
|
+
streaming: "no",
|
|
13743
|
+
pagination: false,
|
|
13744
|
+
pathParams: [
|
|
13745
|
+
{
|
|
13746
|
+
name: "library_id",
|
|
13747
|
+
sdkName: "library_id",
|
|
13748
|
+
description: "Library ID returned by creation."
|
|
13749
|
+
},
|
|
13750
|
+
{
|
|
13751
|
+
name: "job_id",
|
|
13752
|
+
sdkName: "job_id",
|
|
13753
|
+
description: "Job identifier returned by batch or generation creation; the job is resolved within the specified library."
|
|
13754
|
+
},
|
|
13755
|
+
{
|
|
13756
|
+
name: "index",
|
|
13757
|
+
sdkName: "index",
|
|
13758
|
+
description: "Zero-based position of the candidate in the Job outputs array."
|
|
13759
|
+
}
|
|
13760
|
+
],
|
|
13761
|
+
query: [],
|
|
13762
|
+
body: {
|
|
13763
|
+
required: false,
|
|
13764
|
+
fields: [
|
|
13765
|
+
{
|
|
13766
|
+
name: "public_id",
|
|
13767
|
+
type: "string",
|
|
13768
|
+
required: false,
|
|
13769
|
+
description: "Delivery identifier for the saved asset; defaults to gen_<job_id>_<index> and is idempotent."
|
|
13770
|
+
},
|
|
13771
|
+
{
|
|
13772
|
+
name: "asset_folder",
|
|
13773
|
+
type: "string",
|
|
13774
|
+
required: false,
|
|
13775
|
+
description: "Destination folder for the saved asset; defaults to the library root. New path segments containing U+FFFD or consisting only of question marks are rejected with INVALID_PARAMS; send UTF-8 names. Existing affected folders remain readable and assets can be moved out."
|
|
13776
|
+
},
|
|
13777
|
+
{
|
|
13778
|
+
name: "tags",
|
|
13779
|
+
type: "array",
|
|
13780
|
+
itemType: "string",
|
|
13781
|
+
required: false,
|
|
13782
|
+
description: "Tags to apply to the saved asset."
|
|
13783
|
+
},
|
|
13784
|
+
{
|
|
13785
|
+
name: "understanding",
|
|
13786
|
+
type: "string",
|
|
13787
|
+
enum: [
|
|
13788
|
+
"auto",
|
|
13789
|
+
"skip"
|
|
13790
|
+
],
|
|
13791
|
+
required: false,
|
|
13792
|
+
description: "Understanding behavior for the saved asset; defaults to auto."
|
|
13793
|
+
}
|
|
13794
|
+
]
|
|
13795
|
+
}
|
|
13796
|
+
},
|
|
13550
13797
|
{
|
|
13551
13798
|
resource: "media.libraries.purge",
|
|
13552
13799
|
method: "create",
|
|
@@ -27704,6 +27951,59 @@ var mediaListUnderstandingsByLibrary = (options) => (options.client ?? client).g
|
|
|
27704
27951
|
url: "/media/v1/libraries/{library_id}/understandings",
|
|
27705
27952
|
...options
|
|
27706
27953
|
});
|
|
27954
|
+
var mediaCreateGeneration = (options) => (options.client ?? client).post({
|
|
27955
|
+
security: [{
|
|
27956
|
+
key: "media-BearerAuth",
|
|
27957
|
+
scheme: "bearer",
|
|
27958
|
+
type: "http"
|
|
27959
|
+
}],
|
|
27960
|
+
url: "/media/v1/libraries/{library_id}/generations",
|
|
27961
|
+
...options,
|
|
27962
|
+
headers: {
|
|
27963
|
+
"Content-Type": "application/json",
|
|
27964
|
+
...options.headers
|
|
27965
|
+
}
|
|
27966
|
+
});
|
|
27967
|
+
var mediaListJobs = (options) => (options.client ?? client).get({
|
|
27968
|
+
security: [{
|
|
27969
|
+
key: "media-BearerAuth",
|
|
27970
|
+
scheme: "bearer",
|
|
27971
|
+
type: "http"
|
|
27972
|
+
}],
|
|
27973
|
+
url: "/media/v1/libraries/{library_id}/jobs",
|
|
27974
|
+
...options
|
|
27975
|
+
});
|
|
27976
|
+
var mediaCancelJob = (options) => (options.client ?? client).post({
|
|
27977
|
+
security: [{
|
|
27978
|
+
key: "media-BearerAuth",
|
|
27979
|
+
scheme: "bearer",
|
|
27980
|
+
type: "http"
|
|
27981
|
+
}],
|
|
27982
|
+
url: "/media/v1/libraries/{library_id}/jobs/{job_id}/cancel",
|
|
27983
|
+
...options
|
|
27984
|
+
});
|
|
27985
|
+
var mediaSaveGenerationOutput = (options) => (options.client ?? client).post({
|
|
27986
|
+
security: [{
|
|
27987
|
+
key: "media-BearerAuth",
|
|
27988
|
+
scheme: "bearer",
|
|
27989
|
+
type: "http"
|
|
27990
|
+
}],
|
|
27991
|
+
url: "/media/v1/libraries/{library_id}/jobs/{job_id}/outputs/{index}/save",
|
|
27992
|
+
...options,
|
|
27993
|
+
headers: {
|
|
27994
|
+
"Content-Type": "application/json",
|
|
27995
|
+
...options.headers
|
|
27996
|
+
}
|
|
27997
|
+
});
|
|
27998
|
+
var mediaGetGenerationCapabilities = (options) => (options?.client ?? client).get({
|
|
27999
|
+
security: [{
|
|
28000
|
+
key: "media-BearerAuth",
|
|
28001
|
+
scheme: "bearer",
|
|
28002
|
+
type: "http"
|
|
28003
|
+
}],
|
|
28004
|
+
url: "/media/v1/generation/capabilities",
|
|
28005
|
+
...options
|
|
28006
|
+
});
|
|
27707
28007
|
var getSandboxV1Sandboxes = (options) => (options?.client ?? client).get({
|
|
27708
28008
|
querySerializer: { parameters: { state: { array: { explode: false } } } },
|
|
27709
28009
|
security: [
|
|
@@ -30154,6 +30454,11 @@ function createKnowledge(transport) {
|
|
|
30154
30454
|
}
|
|
30155
30455
|
function createMedia(transport) {
|
|
30156
30456
|
return {
|
|
30457
|
+
generation: {
|
|
30458
|
+
capabilities: {
|
|
30459
|
+
list: bind(transport, mediaGetGenerationCapabilities)
|
|
30460
|
+
}
|
|
30461
|
+
},
|
|
30157
30462
|
libraries: {
|
|
30158
30463
|
assets: {
|
|
30159
30464
|
batch: bind(transport, mediaBatchAssets),
|
|
@@ -30190,7 +30495,17 @@ function createMedia(transport) {
|
|
|
30190
30495
|
folders: {
|
|
30191
30496
|
list: bind(transport, mediaListFolders)
|
|
30192
30497
|
},
|
|
30498
|
+
generations: {
|
|
30499
|
+
create: bind(transport, mediaCreateGeneration)
|
|
30500
|
+
},
|
|
30193
30501
|
jobs: {
|
|
30502
|
+
cancel: bind(transport, mediaCancelJob),
|
|
30503
|
+
list: bindPage(transport, mediaListJobs),
|
|
30504
|
+
outputs: {
|
|
30505
|
+
save: {
|
|
30506
|
+
create: bind(transport, mediaSaveGenerationOutput)
|
|
30507
|
+
}
|
|
30508
|
+
},
|
|
30194
30509
|
retrieve: bind(transport, mediaGetJob)
|
|
30195
30510
|
},
|
|
30196
30511
|
list: bindPage(transport, mediaListLibraries),
|
|
@@ -33594,7 +33909,7 @@ function startProgress(ctx, write = (text) => writeOutput({ stderr: text })) {
|
|
|
33594
33909
|
}
|
|
33595
33910
|
|
|
33596
33911
|
// src/main.ts
|
|
33597
|
-
var version = "0.2.1-dev.
|
|
33912
|
+
var version = "0.2.1-dev.95b8c6e";
|
|
33598
33913
|
var commands = commandTree(operations);
|
|
33599
33914
|
var manual = [...workflows.map((w) => w.words), [API_WORD]];
|
|
33600
33915
|
function route(argv) {
|