@kinetune/cli 0.2.0 → 0.4.0
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/README.md +9 -0
- package/dist/kinetune.mjs +188 -26
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -45,6 +45,15 @@ kinetune songs list --status ready --sort newest # analyzed songs, late
|
|
|
45
45
|
kinetune songs list --artist-id ARTIST_ID --offset 50 # the next page of one artist's songs
|
|
46
46
|
```
|
|
47
47
|
|
|
48
|
+
## Looks
|
|
49
|
+
|
|
50
|
+
```bash
|
|
51
|
+
kinetune looks list --scope official --lyric-style neon # browse
|
|
52
|
+
kinetune looks list --artist-id ARTIST_ID # leave out Looks that show another artist
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
A New Look leaves the singer out unless you ask: `"feature_artist":"always"` in the look (AI image or AI video, private, with `"cover":false` in display) makes them the subject of the background.
|
|
56
|
+
|
|
48
57
|
## For agents and scripts
|
|
49
58
|
|
|
50
59
|
- Path ids are arguments, fields are flags, `--input file.json` (or `-` for stdin) takes the whole request.
|
package/dist/kinetune.mjs
CHANGED
|
@@ -19797,16 +19797,18 @@ var VIZZ_ENGINE_IDS = [
|
|
|
19797
19797
|
// ../composition/src/lyric-styles.ts
|
|
19798
19798
|
var LYRIC_STAGES = ["showcase", "kinetic"];
|
|
19799
19799
|
var LYRIC_LAYOUTS = ["line", "stack", "word", "scatter", "typewriter", "cascade", "subtitle", "chat"];
|
|
19800
|
-
var
|
|
19801
|
-
var
|
|
19800
|
+
var SHADER_REVEALS = ["burn", "ink", "smoke", "particles", "drip"];
|
|
19801
|
+
var LYRIC_REVEALS = ["fade", "rise", "pop", "blur", "slide", "drop", "flip", "glitch", "wipe", "type", ...SHADER_REVEALS];
|
|
19802
|
+
var LYRIC_EXITS = ["fade", "blur", "rise", "scale", "glitch", "cut", ...SHADER_REVEALS];
|
|
19802
19803
|
var LYRIC_EFFECTS = ["fill", "glow", "scale", "lift", "color", "none"];
|
|
19803
19804
|
var LYRIC_EMPHASES = ["none", "accent", "box", "underline", "size", "font"];
|
|
19804
19805
|
var LYRIC_MATERIALS = ["solid", "glow", "outline", "shadow", "extrude", "chrome", "gradient", "grunge"];
|
|
19805
19806
|
var LYRIC_POSITIONS = ["center", "upper", "lower"];
|
|
19807
|
+
var LYRIC_PLACES = ["front", "behind", "screen"];
|
|
19806
19808
|
var SPECTRUM_STYLES = ["none", "bars", "mirror", "line", "wave", "dots", "circle"];
|
|
19807
19809
|
var SPECTRUM_PLACEMENTS = ["bottom", "center", "top"];
|
|
19808
19810
|
var PLAYER_STYLES = ["none", "bar", "card", "minimal"];
|
|
19809
|
-
var HERO_KINDS = ["none", "vinyl", "album", "tv", "cube"];
|
|
19811
|
+
var HERO_KINDS = ["none", "vinyl", "album", "tv", "cube", "cassette", "phone", "glass"];
|
|
19810
19812
|
var amount = external_exports.number().min(0).max(1);
|
|
19811
19813
|
var LyricsSchema = external_exports.object({
|
|
19812
19814
|
stage: external_exports.enum(LYRIC_STAGES),
|
|
@@ -19819,7 +19821,11 @@ var LyricsSchema = external_exports.object({
|
|
|
19819
19821
|
panel: external_exports.enum(["none", "soft", "solid"]),
|
|
19820
19822
|
size: external_exports.number().min(0.7).max(1.5),
|
|
19821
19823
|
// × the layout's own size
|
|
19822
|
-
position: external_exports.enum(LYRIC_POSITIONS)
|
|
19824
|
+
position: external_exports.enum(LYRIC_POSITIONS),
|
|
19825
|
+
// Where the lyrics sit: in front of everything; behind the photo's subject (a cut-out of the
|
|
19826
|
+
// plate is drawn over them); or on a screen inside the generated scene (corner-pinned onto it).
|
|
19827
|
+
// Without the cut-out or the screen they stay in front.
|
|
19828
|
+
place: external_exports.enum(LYRIC_PLACES)
|
|
19823
19829
|
}).strict();
|
|
19824
19830
|
var FxSchema = external_exports.object({
|
|
19825
19831
|
shake: amount,
|
|
@@ -19847,6 +19853,8 @@ var FinishSchema = external_exports.object({
|
|
|
19847
19853
|
// drifting warm light leaks
|
|
19848
19854
|
dust: amount,
|
|
19849
19855
|
// specks and scratches
|
|
19856
|
+
droplets: amount,
|
|
19857
|
+
// rain on the glass in front of the frame, drops running down
|
|
19850
19858
|
scanlines: external_exports.boolean(),
|
|
19851
19859
|
// CRT lines and a faint flicker
|
|
19852
19860
|
letterbox: external_exports.boolean()
|
|
@@ -19863,11 +19871,12 @@ var L = (lyrics) => ({
|
|
|
19863
19871
|
panel: "none",
|
|
19864
19872
|
size: 1,
|
|
19865
19873
|
position: "center",
|
|
19874
|
+
place: "front",
|
|
19866
19875
|
...lyrics
|
|
19867
19876
|
});
|
|
19868
19877
|
var FX = (fx = {}) => ({ shake: 0, zoom: 0, flash: 0, rgb: 0, glitch: 0, ...fx });
|
|
19869
19878
|
var SP = (style = "none", spectrum = {}) => ({ style, placement: "bottom", size: 1, opacity: 0.8, ...spectrum });
|
|
19870
|
-
var FIN = (finish = {}) => ({ grain: 0, vignette: 0.3, leak: 0, dust: 0, scanlines: false, letterbox: false, ...finish });
|
|
19879
|
+
var FIN = (finish = {}) => ({ grain: 0, vignette: 0.3, leak: 0, dust: 0, droplets: 0, scanlines: false, letterbox: false, ...finish });
|
|
19871
19880
|
var CONDENSED = ["bebas-neue", "anton", "oswald", "barlow-condensed", "big-shoulders-display", "archivo-black", "league-spartan"];
|
|
19872
19881
|
var LYRIC_STYLES = {
|
|
19873
19882
|
showcase: {
|
|
@@ -20080,6 +20089,112 @@ var LYRIC_STYLES = {
|
|
|
20080
20089
|
hero: "cube",
|
|
20081
20090
|
fonts: CONDENSED
|
|
20082
20091
|
},
|
|
20092
|
+
cassette: {
|
|
20093
|
+
label: "Boombox",
|
|
20094
|
+
description: "A 3D boombox whose display scrolls your lyrics while the tape turns.",
|
|
20095
|
+
lyrics: L({ layout: "typewriter", reveal: "type", exit: "cut", effect: "color", material: "glow" }),
|
|
20096
|
+
fx: FX({ zoom: 0.15 }),
|
|
20097
|
+
spectrum: SP(),
|
|
20098
|
+
finish: FIN({ grain: 0.3, vignette: 0.5, leak: 0.2 }),
|
|
20099
|
+
player: "none",
|
|
20100
|
+
hero: "cassette",
|
|
20101
|
+
fonts: ["space-mono"]
|
|
20102
|
+
},
|
|
20103
|
+
phone: {
|
|
20104
|
+
label: "Phone",
|
|
20105
|
+
description: "Your lyrics arriving as messages on a 3D phone.",
|
|
20106
|
+
lyrics: L({ layout: "chat", reveal: "pop", exit: "fade", effect: "none" }),
|
|
20107
|
+
fx: FX({ zoom: 0.1 }),
|
|
20108
|
+
spectrum: SP(),
|
|
20109
|
+
finish: FIN({ vignette: 0.45, grain: 0.1 }),
|
|
20110
|
+
player: "none",
|
|
20111
|
+
hero: "phone"
|
|
20112
|
+
},
|
|
20113
|
+
glass: {
|
|
20114
|
+
label: "Glass",
|
|
20115
|
+
description: "Iridescent glass shapes drifting over your lyrics and bending them.",
|
|
20116
|
+
lyrics: L({ layout: "line", reveal: "blur", exit: "blur", effect: "color", size: 1.1 }),
|
|
20117
|
+
fx: FX({ zoom: 0.15 }),
|
|
20118
|
+
spectrum: SP(),
|
|
20119
|
+
finish: FIN({ vignette: 0.45, grain: 0.12 }),
|
|
20120
|
+
player: "none",
|
|
20121
|
+
hero: "glass",
|
|
20122
|
+
fonts: CONDENSED
|
|
20123
|
+
},
|
|
20124
|
+
embers: {
|
|
20125
|
+
label: "Embers",
|
|
20126
|
+
description: "Lines burn in from glowing edges and burn away to ash.",
|
|
20127
|
+
lyrics: L({ layout: "line", reveal: "burn", exit: "burn", effect: "color", size: 1.05 }),
|
|
20128
|
+
fx: FX({ zoom: 0.2, flash: 0.1 }),
|
|
20129
|
+
spectrum: SP(),
|
|
20130
|
+
finish: FIN({ grain: 0.3, vignette: 0.55 }),
|
|
20131
|
+
player: "none"
|
|
20132
|
+
},
|
|
20133
|
+
ink: {
|
|
20134
|
+
label: "Ink",
|
|
20135
|
+
description: "Words bleed in like ink in water, then wash away.",
|
|
20136
|
+
lyrics: L({ layout: "line", reveal: "ink", exit: "ink", effect: "fill", size: 1.05 }),
|
|
20137
|
+
fx: FX(),
|
|
20138
|
+
spectrum: SP(),
|
|
20139
|
+
finish: FIN({ grain: 0.2, vignette: 0.35 }),
|
|
20140
|
+
player: "none"
|
|
20141
|
+
},
|
|
20142
|
+
smoke: {
|
|
20143
|
+
label: "Smoke",
|
|
20144
|
+
description: "Lyrics form out of smoke and drift away.",
|
|
20145
|
+
lyrics: L({ layout: "line", reveal: "smoke", exit: "smoke", effect: "glow", material: "glow" }),
|
|
20146
|
+
fx: FX({ zoom: 0.1 }),
|
|
20147
|
+
spectrum: SP(),
|
|
20148
|
+
finish: FIN({ leak: 0.2, grain: 0.2, vignette: 0.5 }),
|
|
20149
|
+
player: "none"
|
|
20150
|
+
},
|
|
20151
|
+
stardust: {
|
|
20152
|
+
label: "Stardust",
|
|
20153
|
+
description: "Each line swarms together out of glowing particles and blows away.",
|
|
20154
|
+
lyrics: L({ layout: "line", reveal: "particles", exit: "particles", effect: "color", material: "glow" }),
|
|
20155
|
+
fx: FX({ zoom: 0.15 }),
|
|
20156
|
+
spectrum: SP(),
|
|
20157
|
+
finish: FIN({ vignette: 0.5, grain: 0.1 }),
|
|
20158
|
+
player: "none"
|
|
20159
|
+
},
|
|
20160
|
+
drip: {
|
|
20161
|
+
label: "Drip",
|
|
20162
|
+
description: "Chromatic letters that smear and drip down, splitting on the beat.",
|
|
20163
|
+
lyrics: L({ layout: "line", reveal: "drip", exit: "drip", effect: "color", size: 1.1 }),
|
|
20164
|
+
fx: FX({ rgb: 0.45, glitch: 0.15, zoom: 0.2 }),
|
|
20165
|
+
spectrum: SP(),
|
|
20166
|
+
finish: FIN({ grain: 0.25, vignette: 0.45 }),
|
|
20167
|
+
player: "none",
|
|
20168
|
+
fonts: CONDENSED
|
|
20169
|
+
},
|
|
20170
|
+
rain: {
|
|
20171
|
+
label: "Rainy window",
|
|
20172
|
+
description: "Lyrics behind a window streaked with rain.",
|
|
20173
|
+
lyrics: L({ layout: "line", reveal: "blur", exit: "blur", effect: "color" }),
|
|
20174
|
+
fx: FX(),
|
|
20175
|
+
spectrum: SP(),
|
|
20176
|
+
finish: FIN({ droplets: 0.8, vignette: 0.45, grain: 0.15 }),
|
|
20177
|
+
player: "none"
|
|
20178
|
+
},
|
|
20179
|
+
screen: {
|
|
20180
|
+
label: "On screen",
|
|
20181
|
+
description: "Your lyrics typed on a screen inside the scene: a phone, a monitor, a billboard.",
|
|
20182
|
+
lyrics: L({ layout: "typewriter", reveal: "type", exit: "cut", effect: "color", material: "glow", place: "screen" }),
|
|
20183
|
+
fx: FX({ rgb: 0.1 }),
|
|
20184
|
+
spectrum: SP(),
|
|
20185
|
+
finish: FIN({ grain: 0.2, vignette: 0.4 }),
|
|
20186
|
+
player: "none"
|
|
20187
|
+
},
|
|
20188
|
+
behind: {
|
|
20189
|
+
label: "Behind",
|
|
20190
|
+
description: "Giant words stacked behind the subject of your photo, the subject standing in front of them.",
|
|
20191
|
+
lyrics: L({ layout: "stack", reveal: "rise", exit: "fade", emphasis: "accent", size: 1.3, position: "upper", place: "behind" }),
|
|
20192
|
+
fx: FX({ zoom: 0.15 }),
|
|
20193
|
+
spectrum: SP(),
|
|
20194
|
+
finish: FIN({ grain: 0.15, vignette: 0.35 }),
|
|
20195
|
+
player: "none",
|
|
20196
|
+
fonts: CONDENSED
|
|
20197
|
+
},
|
|
20083
20198
|
"big-type": {
|
|
20084
20199
|
label: "Big type",
|
|
20085
20200
|
description: "Giant gradient words stacking up, with a spectrum along the floor.",
|
|
@@ -20125,7 +20240,7 @@ var ShotSchema = external_exports.object({
|
|
|
20125
20240
|
}).strict();
|
|
20126
20241
|
var OVERLAYS = ["none", "snow", "leaves", "petals", "embers", "sparkles", "rain", "confetti", "hearts", "dust"];
|
|
20127
20242
|
var PATTERNS = ["stripes", "dots", "grid", "waves", "checker", "sunburst", "halftone", "zigzag"];
|
|
20128
|
-
var BACKGROUND_MOTIONS = ["still", "zoom-in", "zoom-out", "ken-burns", "tilt"];
|
|
20243
|
+
var BACKGROUND_MOTIONS = ["still", "zoom-in", "zoom-out", "ken-burns", "tilt", "parallax"];
|
|
20129
20244
|
var MOTION_DIRECTIONS = ["center", "up", "down", "left", "right", "up-left", "up-right", "down-left", "down-right"];
|
|
20130
20245
|
var BACKGROUND_SOURCES = ["generated", "stock", "upload"];
|
|
20131
20246
|
var backgroundMedia = {
|
|
@@ -20144,7 +20259,10 @@ var BackgroundSchema = external_exports.discriminatedUnion("kind", [
|
|
|
20144
20259
|
kind: external_exports.literal("image"),
|
|
20145
20260
|
...backgroundMedia,
|
|
20146
20261
|
motion: external_exports.enum(BACKGROUND_MOTIONS),
|
|
20147
|
-
direction: external_exports.enum(MOTION_DIRECTIONS)
|
|
20262
|
+
direction: external_exports.enum(MOTION_DIRECTIONS),
|
|
20263
|
+
// Scene sequences (generated): the prompts of the shots after the first, which cut on the song's
|
|
20264
|
+
// sections (see sceneAt).
|
|
20265
|
+
scenes: external_exports.array(external_exports.string().min(10).max(1e3)).min(1).max(3).optional()
|
|
20148
20266
|
}).strict(),
|
|
20149
20267
|
// A seamless loop (its still is the first and last frame) that repeats under the whole song. It
|
|
20150
20268
|
// only pulses with the beat; the blur is baked into the stored loop.
|
|
@@ -20252,17 +20370,24 @@ var MEDIA_BACKGROUND_SOURCES = ["ai-image", "ai-video", "stock-photo", "stock-vi
|
|
|
20252
20370
|
var BACKGROUND_SOURCES2 = {
|
|
20253
20371
|
"ai-image": { label: "AI image", description: "An image made for this Look, moving slowly across the song.", kind: "image", source: "generated" },
|
|
20254
20372
|
"ai-video": { label: "AI video loop", description: "An AI image brought to life as a seamless loop.", kind: "video", source: "generated" },
|
|
20255
|
-
"stock-photo": { label: "Stock photo", description: "A photo picked
|
|
20373
|
+
"stock-photo": { label: "Stock photo", description: "A Pexels photo, picked by the director or by you.", kind: "image", source: "stock" },
|
|
20256
20374
|
"stock-video": { label: "Stock video", description: "A Pexels clip made into a seamless loop.", kind: "video", source: "stock" },
|
|
20257
20375
|
"upload-photo": { label: "Your photo", description: "A photo you upload, moving slowly across the song.", kind: "image", source: "upload" },
|
|
20258
20376
|
"upload-video": { label: "Your video", description: "A clip you upload, made into a seamless loop.", kind: "video", source: "upload" },
|
|
20259
20377
|
designed: { label: "Designed", description: "A drawn gradient or pattern.", kind: null, source: null }
|
|
20260
20378
|
};
|
|
20379
|
+
var MAX_BACKGROUND_SCENES = 4;
|
|
20380
|
+
var SINGLE_SCENE_STYLES = ["behind", "screen"];
|
|
20381
|
+
var StockIdSchema = external_exports.string().regex(/^\d{1,20}$/, "A Pexels photo or video id (digits)");
|
|
20261
20382
|
var BackgroundRequestSchema = external_exports.object({
|
|
20262
20383
|
source: external_exports.enum(BACKGROUND_SOURCE_IDS).optional(),
|
|
20263
20384
|
quality: external_exports.enum(BACKGROUND_TIERS).default("high"),
|
|
20264
20385
|
/** The uploaded photo or video (POST /backgrounds) for the upload-photo and upload-video sources. */
|
|
20265
|
-
upload_id: external_exports.string().min(1).max(120).optional()
|
|
20386
|
+
upload_id: external_exports.string().min(1).max(120).optional(),
|
|
20387
|
+
/** How many scenes an AI image background has (1 by default). */
|
|
20388
|
+
scenes: external_exports.number().int().min(1).max(MAX_BACKGROUND_SCENES).optional(),
|
|
20389
|
+
/** The Pexels photo or video (GET /stock) for the stock-photo and stock-video sources; omitted, the director searches and picks. */
|
|
20390
|
+
stock_id: StockIdSchema.optional()
|
|
20266
20391
|
}).strict();
|
|
20267
20392
|
var BACKGROUND_UPLOAD_LIMITS = {
|
|
20268
20393
|
image: { maxBytes: 25 * 1024 * 1024, minShortSide: 720, types: ["image/jpeg", "image/png", "image/webp"] },
|
|
@@ -20271,8 +20396,8 @@ var BACKGROUND_UPLOAD_LIMITS = {
|
|
|
20271
20396
|
var isUploadSource = (source) => BACKGROUND_SOURCES2[source].source === "upload";
|
|
20272
20397
|
var backgroundSourcesFor = (category) => categoryUsesImages(category) ? MEDIA_BACKGROUND_SOURCES : ["designed"];
|
|
20273
20398
|
var backgroundSourceFor = (category, background) => background.source ?? backgroundSourcesFor(category)[0];
|
|
20274
|
-
var
|
|
20275
|
-
var
|
|
20399
|
+
var LOOK_FEATURE_ARTIST_MODES = ["never", "always"];
|
|
20400
|
+
var CANVAS_FEATURE_ARTIST_MODES = ["auto", "always", "never"];
|
|
20276
20401
|
var LookRequestSchema = external_exports.discriminatedUnion("mode", [
|
|
20277
20402
|
external_exports.object({
|
|
20278
20403
|
mode: external_exports.literal("new"),
|
|
@@ -20280,7 +20405,7 @@ var LookRequestSchema = external_exports.discriminatedUnion("mode", [
|
|
|
20280
20405
|
background: BackgroundRequestSchema.default({ quality: "high" }),
|
|
20281
20406
|
visibility: external_exports.enum(["private", "public"]).default("private"),
|
|
20282
20407
|
direction: external_exports.string().trim().max(2e3).optional(),
|
|
20283
|
-
feature_artist:
|
|
20408
|
+
feature_artist: external_exports.enum(LOOK_FEATURE_ARTIST_MODES).default("never"),
|
|
20284
20409
|
lyric_style: external_exports.enum(LYRIC_STYLE_IDS).optional()
|
|
20285
20410
|
}).strict(),
|
|
20286
20411
|
external_exports.object({ mode: external_exports.literal("existing"), id: external_exports.string().min(1).max(120), lyric_style: external_exports.enum(LYRIC_STYLE_IDS).optional() }).strict()
|
|
@@ -20313,11 +20438,18 @@ var LyricVideoRequestSchema = external_exports.object({
|
|
|
20313
20438
|
const upload = value.look.background.source ? isUploadSource(value.look.background.source) : false;
|
|
20314
20439
|
if (upload && !value.look.background.upload_id) ctx.addIssue({ code: "custom", path: ["look", "background", "upload_id"], message: "Upload the photo or video first (POST /backgrounds) and pass its id" });
|
|
20315
20440
|
if (!upload && value.look.background.upload_id) ctx.addIssue({ code: "custom", path: ["look", "background", "upload_id"], message: "upload_id goes with the upload-photo and upload-video sources" });
|
|
20441
|
+
if (value.look.background.stock_id && BACKGROUND_SOURCES2[backgroundSourceFor(value.look.category, value.look.background)].source !== "stock")
|
|
20442
|
+
ctx.addIssue({ code: "custom", path: ["look", "background", "stock_id"], message: "stock_id goes with the stock-photo and stock-video sources" });
|
|
20316
20443
|
if (upload && value.look.visibility === "public") ctx.addIssue({ code: "custom", path: ["look", "visibility"], message: "A Look with your own background stays private" });
|
|
20444
|
+
if ((value.look.background.scenes ?? 1) > 1 && backgroundSourceFor(value.look.category, value.look.background) !== "ai-image")
|
|
20445
|
+
ctx.addIssue({ code: "custom", path: ["look", "background", "scenes"], message: "More than one scene is only available with an AI image background" });
|
|
20446
|
+
if ((value.look.background.scenes ?? 1) > 1 && SINGLE_SCENE_STYLES.includes(value.look.lyric_style ?? ""))
|
|
20447
|
+
ctx.addIssue({ code: "custom", path: ["look", "background", "scenes"], message: `The ${value.look.lyric_style} lyric style takes a single scene` });
|
|
20317
20448
|
}
|
|
20318
20449
|
if (value.look.mode === "new" && value.look.feature_artist === "always") {
|
|
20319
20450
|
if (BACKGROUND_SOURCES2[backgroundSourceFor(value.look.category, value.look.background)].source !== "generated")
|
|
20320
20451
|
ctx.addIssue({ code: "custom", path: ["look", "feature_artist"], message: "Only an AI image or AI video background can show the artist" });
|
|
20452
|
+
if (value.display.cover) ctx.addIssue({ code: "custom", path: ["look", "feature_artist"], message: "Switch off the cover to show the artist: the cover would hide them" });
|
|
20321
20453
|
if (value.look.visibility === "public") ctx.addIssue({ code: "custom", path: ["look", "feature_artist"], message: "A Look that shows the artist stays private" });
|
|
20322
20454
|
}
|
|
20323
20455
|
});
|
|
@@ -20341,11 +20473,15 @@ var CanvasRequestSchema = external_exports.object({
|
|
|
20341
20473
|
resolution: external_exports.enum(CANVAS_RESOLUTIONS).default("1080p"),
|
|
20342
20474
|
style: external_exports.enum(CANVAS_STYLES).optional(),
|
|
20343
20475
|
direction: external_exports.string().trim().max(2e3).optional(),
|
|
20344
|
-
feature_artist:
|
|
20345
|
-
seconds: external_exports.number().int().min(CANVAS_MIN_SECONDS).max(CANVAS_MAX_SECONDS).default(CANVAS_MAX_SECONDS)
|
|
20476
|
+
feature_artist: external_exports.enum(CANVAS_FEATURE_ARTIST_MODES).default("auto"),
|
|
20477
|
+
seconds: external_exports.number().int().min(CANVAS_MIN_SECONDS).max(CANVAS_MAX_SECONDS).default(CANVAS_MAX_SECONDS),
|
|
20478
|
+
/** The Pexels photo or video (GET /stock) for the stock sources; omitted, the director searches and picks. */
|
|
20479
|
+
stock_id: StockIdSchema.optional()
|
|
20346
20480
|
}).strict().superRefine((value, ctx) => {
|
|
20347
20481
|
if (value.feature_artist === "always" && CANVAS_SOURCES[value.source].source === "stock")
|
|
20348
20482
|
ctx.addIssue({ code: "custom", path: ["feature_artist"], message: "Only an AI image or AI video Canvas can show the artist" });
|
|
20483
|
+
if (value.stock_id && CANVAS_SOURCES[value.source].source !== "stock")
|
|
20484
|
+
ctx.addIssue({ code: "custom", path: ["stock_id"], message: "stock_id goes with the stock-photo and stock-video sources" });
|
|
20349
20485
|
});
|
|
20350
20486
|
var VideoRequestSchema = external_exports.discriminatedUnion("type", [LyricVideoRequestSchema, CanvasRequestSchema]);
|
|
20351
20487
|
|
|
@@ -20370,6 +20506,7 @@ var search = (q) => ({
|
|
|
20370
20506
|
offset: external_exports.number().int().min(0).optional().describe("How many results to skip")
|
|
20371
20507
|
});
|
|
20372
20508
|
var httpsUrl = (what) => external_exports.string().url().max(2e3).describe(`A public https URL of ${what}`);
|
|
20509
|
+
var COVER_SIZES = "cover_art.url is the cover at up to 1536 px (JPEG; width and height describe it), preview_url a 640 px and thumbnail_url a 160 px WebP. Image links are signed for 7 days and stay the same all day, so they can be cached.";
|
|
20373
20510
|
var { type: _lyricType, quote_id: _lyricQuote, ...lyricShape } = LyricVideoRequestSchema.shape;
|
|
20374
20511
|
var { type: _canvasType, quote_id: _canvasQuote, ...canvasShape } = CanvasRequestSchema.shape;
|
|
20375
20512
|
var QUOTE_ID = external_exports.string().uuid().describe("The quote_id from the matching quote: the request must be identical");
|
|
@@ -20380,9 +20517,9 @@ var lyricInput = external_exports.object({
|
|
|
20380
20517
|
song_id: songId,
|
|
20381
20518
|
callback_url: CALLBACK,
|
|
20382
20519
|
metadata: METADATA,
|
|
20383
|
-
look: lyricShape.look.describe(
|
|
20520
|
+
look: lyricShape.look.describe(`{"mode":"existing","id":"look_\u2026"} to reuse a saved Look (add "lyric_style" to render it in another lyric style, at no extra cost), or {"mode":"new","category":"\u2026","lyric_style":"\u2026","background":{"source":"ai-image","quality":"high"},"visibility":"private","direction":"\u2026"} to have one designed (background.source "upload-photo"/"upload-video" with background.upload_id from upload_background designs it around your own media; such a Look stays private. "stock-photo"/"stock-video" with background.stock_id from search_stock uses that Pexels item instead of the director's pick). lyric_style (optional, from get_options) sets how the lyrics are presented and animated: block-stack, punch, player, neon, terminal, cinematic\u2026 Omit it and the director picks one. background.scenes (2\u20134, AI image only) makes that many shots of the same world that cut on the song's sections, each priced like the first. The singer is left out unless asked: feature_artist "always" (default "never") makes them the subject of the background, recognizable from their artist photos (add_artist_photos); it needs an AI image or AI video background, a private Look and display.cover false (the cover would hide them), and that Look then only serves this artist's songs. A saved Look that shows an artist (featured_artist) only serves that artist's songs, also with display.cover false`),
|
|
20384
20521
|
aspect_ratios: lyricShape.aspect_ratios.describe('Formats to render, each its own file: "9:16" (vertical), "16:9" (wide), "1:1" (square)'),
|
|
20385
|
-
display: lyricShape.display.describe("Which elements show (title, artist, cover, lyrics, badges, headline) and their sizes"),
|
|
20522
|
+
display: lyricShape.display.describe("Which elements show (title, artist, cover, lyrics, badges, headline) and their sizes. cover must be false to show the artist in the background"),
|
|
20386
20523
|
trim: lyricShape.trim.describe("Render only this section of the song (at least 8 seconds)"),
|
|
20387
20524
|
variations: lyricShape.variations.describe("1\u20134 different New Looks, one video each (an Existing Look renders one)")
|
|
20388
20525
|
});
|
|
@@ -20392,11 +20529,12 @@ var canvasInput = external_exports.object({
|
|
|
20392
20529
|
callback_url: CALLBACK,
|
|
20393
20530
|
metadata: METADATA,
|
|
20394
20531
|
source: canvasShape.source.describe("ai-video (default), ai-image, stock-photo or stock-video"),
|
|
20532
|
+
stock_id: canvasShape.stock_id.describe("With a stock source: the Pexels photo or video (search_stock with seconds) to use instead of the director's pick"),
|
|
20395
20533
|
quality: canvasShape.quality.describe("AI video model tier: standard or high"),
|
|
20396
20534
|
resolution: canvasShape.resolution.describe("1080p (1080\xD71920) or 720p"),
|
|
20397
20535
|
style: canvasShape.style.describe("Optional visual style"),
|
|
20398
20536
|
direction: canvasShape.direction.describe("Optional mood, motifs or references; the concept still comes from the cover"),
|
|
20399
|
-
feature_artist:
|
|
20537
|
+
feature_artist: canvasShape.feature_artist.describe('Whether the Canvas shows the artist: auto (the director decides), always or never (AI sources; needs artist photos for "always")'),
|
|
20400
20538
|
seconds: canvasShape.seconds.describe("Canvas length in whole seconds, 5\u20138 (default 8). Spotify loops it, so no part of the song is chosen"),
|
|
20401
20539
|
variations: canvasShape.variations.describe("1\u20134 different Canvases")
|
|
20402
20540
|
});
|
|
@@ -20522,7 +20660,7 @@ var OPERATIONS = [
|
|
|
20522
20660
|
group: "artists",
|
|
20523
20661
|
title: "Set the artist picture",
|
|
20524
20662
|
summary: "Choose which photo is the artist\u2019s picture, and how it is cropped to a square",
|
|
20525
|
-
description: "The picture
|
|
20663
|
+
description: "The picture (image_url on the artist, a 512 px square) is cut from one of the artist\u2019s photos; the photo itself is unchanged. The first photo becomes the picture automatically, centered. crop is in fractions of the photo (its url): x/y the top-left corner, size the side relative to the photo\u2019s short side; leave it out to center.",
|
|
20526
20664
|
method: "POST",
|
|
20527
20665
|
path: "/api/v1/artists/{artist_id}/picture",
|
|
20528
20666
|
scopes: ["music:write", "videos:write"],
|
|
@@ -20544,7 +20682,7 @@ var OPERATIONS = [
|
|
|
20544
20682
|
group: "artists",
|
|
20545
20683
|
title: "List artist photos",
|
|
20546
20684
|
summary: "The artist\u2019s photos (identity references, up to 6)",
|
|
20547
|
-
description: "Photos keep the artist recognizable when a Look or Canvas shows them; the cover art stays the creative source.",
|
|
20685
|
+
description: "Photos keep the artist recognizable when a Look or Canvas shows them; the cover art stays the creative source. url is the photo upright at up to 1536 px (what the AI receives; width and height describe it), thumbnail_url a copy 320 px on its short side for grids.",
|
|
20548
20686
|
method: "GET",
|
|
20549
20687
|
path: "/api/v1/artists/{artist_id}/photos",
|
|
20550
20688
|
scopes: ["music:read", "videos:read"],
|
|
@@ -20560,7 +20698,7 @@ var OPERATIONS = [
|
|
|
20560
20698
|
group: "artists",
|
|
20561
20699
|
title: "Add artist photos",
|
|
20562
20700
|
summary: "Upload one or more photos of the artist (JPEG, PNG or WebP)",
|
|
20563
|
-
description: "Up to 6 per artist, at least 512 px on the short side, up to 15 MB each. Only with the rights to use them (rights_confirmed). They are identity references only: never shown publicly or used as they are.",
|
|
20701
|
+
description: "Up to 6 per artist, at least 512 px on the short side, up to 15 MB each. Only with the rights to use them (rights_confirmed). They are identity references only: never shown publicly or used as they are. Each is kept upright at up to 1536 px, with a small thumbnail; the uploaded file itself is not kept.",
|
|
20564
20702
|
method: "POST",
|
|
20565
20703
|
path: "/api/v1/artists/{artist_id}/photos",
|
|
20566
20704
|
scopes: ["music:write", "videos:write"],
|
|
@@ -20598,7 +20736,7 @@ var OPERATIONS = [
|
|
|
20598
20736
|
group: "songs",
|
|
20599
20737
|
title: "List songs",
|
|
20600
20738
|
summary: "Songs with their cover, duration and analysis status",
|
|
20601
|
-
description:
|
|
20739
|
+
description: `A song must be analyzed (analysis.status "ready") before videos can be made. 50 per page by default: pass q to search, and limit/offset to page. ${COVER_SIZES}`,
|
|
20602
20740
|
method: "GET",
|
|
20603
20741
|
path: "/api/v1/songs",
|
|
20604
20742
|
scopes: ["music:read", "videos:read"],
|
|
@@ -20619,7 +20757,7 @@ var OPERATIONS = [
|
|
|
20619
20757
|
group: "songs",
|
|
20620
20758
|
title: "Upload a song",
|
|
20621
20759
|
summary: "Add a song: master audio and square cover art",
|
|
20622
|
-
description: 'Audio: MP3, WAV or M4A up to 250 MB. Cover: a square JPEG or PNG, 1000\u20136000 px (3000\xD73000 recommended), up to 20 MB. The song is analyzed next (lyrics, beats, sections): poll get_song until analysis.status is "ready", usually about a minute.',
|
|
20760
|
+
description: 'Audio: MP3, WAV or M4A up to 250 MB. Cover: a square JPEG or PNG, 1000\u20136000 px (3000\xD73000 recommended), up to 20 MB; it is kept at 1536, 640 and 160 px, not as uploaded. The song is analyzed next (lyrics, beats, sections): poll get_song until analysis.status is "ready", usually about a minute.',
|
|
20623
20761
|
method: "POST",
|
|
20624
20762
|
path: "/api/v1/songs",
|
|
20625
20763
|
scopes: ["music:write", "videos:write"],
|
|
@@ -20645,7 +20783,7 @@ var OPERATIONS = [
|
|
|
20645
20783
|
group: "songs",
|
|
20646
20784
|
title: "Get a song",
|
|
20647
20785
|
summary: "One song and its analysis status",
|
|
20648
|
-
description:
|
|
20786
|
+
description: COVER_SIZES,
|
|
20649
20787
|
method: "GET",
|
|
20650
20788
|
path: "/api/v1/songs/{song_id}",
|
|
20651
20789
|
scopes: ["music:read", "videos:read"],
|
|
@@ -20726,7 +20864,7 @@ var OPERATIONS = [
|
|
|
20726
20864
|
group: "looks",
|
|
20727
20865
|
title: "List Looks",
|
|
20728
20866
|
summary: "Browse Official, Community and your own Looks",
|
|
20729
|
-
description:
|
|
20867
|
+
description: `A Look is a complete, reusable lyric-video design. Pass its id as {"mode":"existing","id":\u2026} to reuse it exactly. A Look that shows an artist (featured_artist) is private and only serves that artist's songs: choosing for a song, pass its artist_id to leave out Looks that show another artist.`,
|
|
20730
20868
|
method: "GET",
|
|
20731
20869
|
path: "/api/v1/looks",
|
|
20732
20870
|
scopes: ["library:read", "videos:read"],
|
|
@@ -20734,6 +20872,7 @@ var OPERATIONS = [
|
|
|
20734
20872
|
scope: external_exports.enum(["all", "official", "community", "mine"]).optional().describe("Which library; default all"),
|
|
20735
20873
|
category: external_exports.string().max(40).optional().describe("A category id from get_options"),
|
|
20736
20874
|
lyric_style: external_exports.string().max(40).optional().describe("A lyric style id from get_options (how the lyrics move)"),
|
|
20875
|
+
artist_id: artistId.optional().describe("The artist of the song you are choosing for: Looks that show another artist are left out"),
|
|
20737
20876
|
q: external_exports.string().max(100).optional().describe("Search words"),
|
|
20738
20877
|
sort: external_exports.enum(["newest", "popular"]).optional(),
|
|
20739
20878
|
limit: external_exports.number().int().min(1).max(100).optional(),
|
|
@@ -20750,7 +20889,7 @@ var OPERATIONS = [
|
|
|
20750
20889
|
group: "looks",
|
|
20751
20890
|
title: "Get a Look",
|
|
20752
20891
|
summary: "One Look with its design and preview images",
|
|
20753
|
-
description: "",
|
|
20892
|
+
description: "backgrounds.portrait and backgrounds.landscape are the background plates the video uses; backgrounds.previews has 480 px wide copies of them for thumbnails (null for a Look without a photo or video background).",
|
|
20754
20893
|
method: "GET",
|
|
20755
20894
|
path: "/api/v1/looks/{look_id}",
|
|
20756
20895
|
scopes: ["library:read", "videos:read"],
|
|
@@ -20826,6 +20965,29 @@ var OPERATIONS = [
|
|
|
20826
20965
|
cli: ["backgrounds", "upload"],
|
|
20827
20966
|
mcp: "upload_background"
|
|
20828
20967
|
},
|
|
20968
|
+
{
|
|
20969
|
+
id: "stock.search",
|
|
20970
|
+
group: "looks",
|
|
20971
|
+
title: "Search stock media",
|
|
20972
|
+
summary: "Find Pexels photos or clips to use as a stock background",
|
|
20973
|
+
description: `24 results a page. Pass an item's id as look.background.stock_id (source "stock-photo" or "stock-video") or as a Canvas's stock_id to use it instead of the director's pick, and credit the photographer (credit) wherever you show it. orientation: portrait for 9:16 and 1:1, landscape when 16:9 is among the formats (a Canvas is portrait). Clips too short for the loop are left out: pass seconds for a Canvas. thumbnail_url is a 480 px still, preview_url a 1280 px one (the photo, or the clip's poster), preview_video_url a small MP4 of a clip.`,
|
|
20974
|
+
method: "GET",
|
|
20975
|
+
path: "/api/v1/stock",
|
|
20976
|
+
scopes: ["videos:read", "videos:write", "library:read"],
|
|
20977
|
+
input: external_exports.object({
|
|
20978
|
+
kind: external_exports.enum(["photo", "video"]).describe("photo for stock-photo, video for stock-video"),
|
|
20979
|
+
q: external_exports.string().trim().min(1).max(100).describe('Search words, e.g. "foggy pine forest"'),
|
|
20980
|
+
orientation: external_exports.enum(["portrait", "landscape"]).optional().describe("Default portrait"),
|
|
20981
|
+
page: external_exports.number().int().min(1).max(50).optional().describe("Default 1; next_page says whether there are more"),
|
|
20982
|
+
seconds: external_exports.number().int().min(5).max(8).optional().describe("Clips for a Canvas of this length (5\u20138); omit for a Look's loop")
|
|
20983
|
+
}),
|
|
20984
|
+
readOnly: true,
|
|
20985
|
+
destructive: false,
|
|
20986
|
+
idempotent: true,
|
|
20987
|
+
cli: ["stock", "search"],
|
|
20988
|
+
mcp: "search_stock",
|
|
20989
|
+
example: { kind: "photo", q: "foggy pine forest", orientation: "portrait" }
|
|
20990
|
+
},
|
|
20829
20991
|
/* Quotes and videos */
|
|
20830
20992
|
{
|
|
20831
20993
|
id: "quotes.lyric_video",
|
|
@@ -24597,7 +24759,7 @@ async function revoke(config2) {
|
|
|
24597
24759
|
// package.json
|
|
24598
24760
|
var package_default = {
|
|
24599
24761
|
name: "@kinetune/cli",
|
|
24600
|
-
version: "0.
|
|
24762
|
+
version: "0.4.0",
|
|
24601
24763
|
description: "Command line for Kinetune: lyric videos and Spotify Canvas loops from your songs, for people and AI agents.",
|
|
24602
24764
|
license: "MIT",
|
|
24603
24765
|
homepage: "https://kinetune.com/developers#cli",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@kinetune/cli",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0",
|
|
4
4
|
"description": "Command line for Kinetune: lyric videos and Spotify Canvas loops from your songs, for people and AI agents.",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"homepage": "https://kinetune.com/developers#cli",
|