@kinetune/cli 0.9.0 → 0.10.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # Kinetune CLI
2
2
 
3
- The command line for [Kinetune](https://kinetune.com): lyric videos and Spotify Canvas loops from your songs, for people, scripts and local AI agents (Claude Code, Codex, Cursor…). Every command prints JSON when its output is piped.
3
+ The command line for [Kinetune](https://kinetune.com): lyric videos, Spotify Canvas loops and AI music videos from your songs, for people, scripts and local AI agents (Claude Code, Codex, Cursor…). Every command prints JSON when its output is piped.
4
4
 
5
5
  Full docs: https://kinetune.com/developers#cli
6
6
 
@@ -50,6 +50,48 @@ kinetune videos download VIDEO_ID
50
50
 
51
51
  `kinetune create …` never spends credits without asking: pass `--yes`, or `--max-credits N` to refuse anything pricier.
52
52
 
53
+ ## Music videos
54
+
55
+ The song's artist performs a music video, lip-synced, made from their photos, so add photos of the artist first.
56
+ `--model` picks one of Kinetune's music video models (`one-take` by default: one continuous take, 1 to 10 minutes, about
57
+ 5 minutes to make per minute of song); `GET /options` lists each with what it makes. The price follows the length
58
+ (the whole song or a section) and the quality, one of those `GET /options` lists for the model: `--quality 768p` (default) or `1080p`,
59
+ the same video sharper for about twice the credits.
60
+
61
+ The artist kit holds their outfits and the workspace's places and props, each with an @handle a brief can mention:
62
+ `kinetune kit add --kind prop --name "Chrome mic" --stock-id ID --crop '{"x":0.3,"y":0.2,"w":0.25,"h":0.4}'` (or
63
+ `--file ./mic.jpg --rights-confirmed`), then `--direction "the @chrome-mic in hand"`: a mentioned piece is used exactly
64
+ as it is, and the director designs the rest. `--scenes '{"mode":"stock"}'` sets the places it leaves open in real ones
65
+ the director finds (empty of people, the artist put into them); `kinetune plans swap-place --plan-id PLAN_ID --place 1 --stock-id ID`
66
+ changes one place's photo. Words in (parentheses) in the lyrics are backing vocals, sung off camera.
67
+
68
+ Design the shoot first if you like: `kinetune lookbook design` with the same brief (free) returns the director's
69
+ outfits, places and props; `kinetune lookbook render LOOKBOOK_ID --credits N` draws them for the price it shows, and
70
+ `--lookbook-id LOOKBOOK_ID` plans from the pieces you keep.
71
+
72
+ Plan it first, for free: the director's concept and one shot per 15-second clip with its lyrics, in about a
73
+ minute. Rewrite it with a note until it's right, then quote and create with its plan id: the video is made from
74
+ exactly that plan.
75
+
76
+ ```bash
77
+ kinetune artists photos add ARTIST_ID --photos ./nova-1.jpg ./nova-2.jpg --rights-confirmed
78
+ kinetune plan music-video --song-id SONG_ID --category cinematic --aspect-ratio 16:9 --trim '{"start_seconds":32,"end_seconds":96}'
79
+ kinetune plan music-video --song-id SONG_ID --revise '{"plan_id":"PLAN_ID","note":"night instead of day, more city lights"}'
80
+ kinetune plans get PLAN_ID
81
+ kinetune quote music-video --song-id SONG_ID --plan-id PLAN_ID
82
+ kinetune create music-video --song-id SONG_ID --plan-id PLAN_ID # quotes first and asks
83
+ kinetune videos wait VIDEO_ID --timeout 10800
84
+ ```
85
+
86
+ `--cast '{"face_photo_id":"photo_…","outfit_photo_id":"photo_…"}'` picks the two photos the artist is kept from:
87
+ a sharp face with the mouth visible, and the outfit worn throughout (leave either out and the director picks; one
88
+ photo can be both). `kinetune artists photos add ARTIST_ID --photos ./look.jpg --rights-confirmed --hidden` uploads
89
+ a photo for one music video only: it stays off the artist's photos, and its id works in `--cast`. Without
90
+ `--plan-id`, the director plans the video while it is made.
91
+
92
+ Categories: `performance` (default), `cinematic`, `story`, `surreal`. Styles: `natural`, `film`, `golden-hour`,
93
+ `neon-night`, `noir`, `vintage`, `dreamy`; leave `--style` out and the director picks one.
94
+
53
95
  ## The song's own lyrics
54
96
 
55
97
  Every song is transcribed, and a transcription can mishear a word. Give the song its lyrics (plain text, Suno
package/dist/kinetune.mjs CHANGED
@@ -20359,6 +20359,10 @@ var DisplaySchema = external_exports.object({
20359
20359
  }).strict();
20360
20360
  var DEFAULT_DISPLAY = { title: true, artist: true, cover: true, lyrics: true, badges: true };
20361
20361
 
20362
+ // ../video-types/src/kit.ts
20363
+ var KIT_KINDS = ["outfit", "place", "prop"];
20364
+ var KIT_HANDLE = /^[a-z0-9][a-z0-9-]{0,39}$/;
20365
+
20362
20366
  // ../video-types/src/index.ts
20363
20367
  var MAX_VARIATIONS = 4;
20364
20368
  var variations = external_exports.number().int().min(1).max(MAX_VARIATIONS).default(1);
@@ -20468,8 +20472,8 @@ var CANVAS_MAX_SECONDS = 8;
20468
20472
  var CANVAS_SOURCE_IDS = ["ai-video", "ai-image", "stock-photo", "stock-video"];
20469
20473
  var CANVAS_SOURCES = {
20470
20474
  "ai-video": { label: "AI video", description: "An image made from your cover\u2019s world, brought to life by a video model.", kind: "video", source: "generated" },
20471
- "ai-image": { label: "AI image", description: "An image made from your cover\u2019s world, moved by our motion engine.", kind: "image", source: "generated" },
20472
- "stock-photo": { label: "Stock photo", description: "A stock photo moved by our motion engine.", kind: "image", source: "stock" },
20475
+ "ai-image": { label: "AI image", description: "An image made from your cover\u2019s world, moved by our motion model.", kind: "image", source: "generated" },
20476
+ "stock-photo": { label: "Stock photo", description: "A stock photo moved by our motion model.", kind: "image", source: "stock" },
20473
20477
  "stock-video": { label: "Stock video", description: "A stock clip cut into a seamless loop.", kind: "video", source: "stock" }
20474
20478
  };
20475
20479
  var CANVAS_QUALITIES = ["standard", "high"];
@@ -20493,12 +20497,111 @@ var CanvasRequestSchema = external_exports.object({
20493
20497
  if (value.stock_id && CANVAS_SOURCES[value.source].source !== "stock")
20494
20498
  ctx.addIssue({ code: "custom", path: ["stock_id"], message: "stock_id goes with the stock-photo and stock-video sources" });
20495
20499
  });
20496
- var VideoRequestSchema = external_exports.discriminatedUnion("type", [LyricVideoRequestSchema, CanvasRequestSchema]);
20500
+ var MUSIC_VIDEO_CATEGORY_IDS = ["performance", "intercut", "cinematic", "story", "surreal"];
20501
+ var MUSIC_VIDEO_CATEGORIES = {
20502
+ performance: { label: "Performance", description: "The artist sings to camera in one place that suits the song." },
20503
+ intercut: { label: "Performance & story", description: "The artist sings to camera, cut against them living the song\u2019s story." },
20504
+ cinematic: { label: "Cinematic", description: "A performance with a moving camera that travels through a location." },
20505
+ story: { label: "Story", description: "The artist acts out the song\u2019s story while singing it, in one continuous take." },
20506
+ surreal: { label: "Surreal", description: "The world around the artist transforms with the song, dreamlike and impossible." }
20507
+ };
20508
+ var MUSIC_VIDEO_STYLE_IDS = ["natural", "film", "golden-hour", "neon-night", "noir", "vintage", "dreamy"];
20509
+ var MUSIC_VIDEO_STYLES = {
20510
+ natural: { label: "Natural", description: "True-to-life color and light." },
20511
+ film: { label: "Film", description: "35 mm film: grain, soft contrast and rich color." },
20512
+ "golden-hour": { label: "Golden hour", description: "Warm, low sunlight and long shadows." },
20513
+ "neon-night": { label: "Neon night", description: "Night with colored neon and wet reflections." },
20514
+ noir: { label: "Noir", description: "High-contrast black and white." },
20515
+ vintage: { label: "Vintage", description: "A faded retro grade with period detail." },
20516
+ dreamy: { label: "Dreamy", description: "Soft haze, glow and pastel light." }
20517
+ };
20518
+ var MUSIC_VIDEO_QUALITY_IDS = ["480p", "768p", "1080p"];
20519
+ var DEFAULT_MUSIC_VIDEO_QUALITY = "768p";
20520
+ var MUSIC_VIDEO_CAST_SLOTS = ["face", "outfit"];
20521
+ var MUSIC_VIDEO_MODEL_IDS = ["one-take"];
20522
+ var DEFAULT_MUSIC_VIDEO_MODEL = "one-take";
20523
+ var MUSIC_VIDEO_MODELS = {
20524
+ "one-take": {
20525
+ label: "One Take",
20526
+ description: "One continuous, lip-synced shot of the artist from two photos: the face and the outfit.",
20527
+ clip: { fps: 24, frames: 360, context: 0 },
20528
+ minSeconds: 60,
20529
+ maxSeconds: 600,
20530
+ formats: ["9:16", "16:9", "1:1"],
20531
+ cast: ["face", "outfit"],
20532
+ kit: { outfits: 6, places: 6, props: 8, perClip: 7 },
20533
+ categories: MUSIC_VIDEO_CATEGORY_IDS,
20534
+ styles: MUSIC_VIDEO_STYLE_IDS
20535
+ }
20536
+ };
20537
+ var ARTIST_PHOTOS_PER_UPLOAD = 20;
20538
+ var ArtistPhotoIdSchema = external_exports.string().regex(/^photo_[0-9a-f-]{36}$/, "An artist photo id (photo_\u2026)");
20539
+ var MusicVideoPlanIdSchema = external_exports.string().regex(/^plan_[0-9a-f-]{36}$/, "A music video plan id (plan_\u2026)");
20540
+ var LookbookIdSchema = external_exports.string().regex(/^lookbook_[0-9a-f-]{36}$/, "A lookbook id (lookbook_\u2026)");
20541
+ var MusicVideoCastSchema = external_exports.object({ face_photo_id: ArtistPhotoIdSchema.optional(), outfit_photo_id: ArtistPhotoIdSchema.optional() }).strict();
20542
+ var MUSIC_VIDEO_SCENE_MODES = ["invent", "stock"];
20543
+ var MusicVideoScenesSchema = external_exports.object({ mode: external_exports.enum(MUSIC_VIDEO_SCENE_MODES) }).strict();
20544
+ var KitItemIdSchema = external_exports.string().regex(/^kit_[0-9a-f-]{36}$/, "A kit piece id (kit_\u2026)");
20545
+ var KitHandleSchema = external_exports.string().regex(KIT_HANDLE, "Lowercase letters, digits and hyphens, at most 40");
20546
+ var CropRectSchema = external_exports.object({ x: external_exports.number().min(0).max(1), y: external_exports.number().min(0).max(1), w: external_exports.number().min(0.02).max(1), h: external_exports.number().min(0.02).max(1) }).strict().refine((c) => c.x + c.w <= 1.0001 && c.y + c.h <= 1.0001, { message: "The crop must stay inside the image" });
20547
+ var KitItemCreateSchema = external_exports.object({
20548
+ kind: external_exports.enum(KIT_KINDS),
20549
+ name: external_exports.string().trim().min(1).max(60),
20550
+ handle: KitHandleSchema.optional(),
20551
+ description: external_exports.string().trim().max(300).optional(),
20552
+ crop: CropRectSchema.optional()
20553
+ }).strict();
20554
+ var KitItemUpdateSchema = external_exports.object({
20555
+ name: external_exports.string().trim().min(1).max(60).optional(),
20556
+ handle: KitHandleSchema.optional(),
20557
+ description: external_exports.string().trim().max(300).nullable().optional(),
20558
+ crop: CropRectSchema.optional()
20559
+ }).strict().refine((v) => Object.keys(v).length > 0, { message: "Nothing to change" });
20560
+ var musicVideoBrief = {
20561
+ model: external_exports.enum(MUSIC_VIDEO_MODEL_IDS).default(DEFAULT_MUSIC_VIDEO_MODEL),
20562
+ category: external_exports.enum(MUSIC_VIDEO_CATEGORY_IDS).default("performance"),
20563
+ style: external_exports.enum(MUSIC_VIDEO_STYLE_IDS).optional(),
20564
+ aspect_ratio: AspectRatioSchema.default("9:16"),
20565
+ trim: TrimSchema.optional(),
20566
+ direction: external_exports.string().trim().max(2e3).optional(),
20567
+ cast: MusicVideoCastSchema.optional(),
20568
+ scenes: MusicVideoScenesSchema.default({ mode: "invent" }),
20569
+ // Design the shoot: the lookbook whose kept pieces the video uses, like the kit pieces the direction mentions.
20570
+ lookbook_id: LookbookIdSchema.optional()
20571
+ };
20572
+ var MUSIC_VIDEO_BRIEF_FIELDS = Object.keys(musicVideoBrief);
20573
+ var CAST_FIELDS = { face: "face_photo_id", outfit: "outfit_photo_id" };
20574
+ var fitsModel = (value, ctx) => {
20575
+ const model = MUSIC_VIDEO_MODELS[value.model];
20576
+ const issue2 = (path4, message) => ctx.addIssue({ code: "custom", path: [path4], message });
20577
+ if (!model.categories.includes(value.category)) issue2("category", `${model.label} doesn\u2019t make ${MUSIC_VIDEO_CATEGORIES[value.category].label} videos`);
20578
+ if (value.style && !model.styles.includes(value.style)) issue2("style", `${model.label} doesn\u2019t make the ${MUSIC_VIDEO_STYLES[value.style].label} look`);
20579
+ if (!model.formats.includes(value.aspect_ratio)) issue2("aspect_ratio", `${model.label} makes ${model.formats.join(", ")}`);
20580
+ if (value.trim && value.trim.end_seconds - value.trim.start_seconds > model.maxSeconds + 1e-6) issue2("trim", `A music video is at most ${model.maxSeconds / 60} minutes: pick a shorter section`);
20581
+ if (value.trim && value.trim.end_seconds - value.trim.start_seconds < model.clip.frames / model.clip.fps - 1e-6) issue2("trim", `A music video is at least ${model.minSeconds / 60} minute: pick a longer section`);
20582
+ if (value.scenes && value.scenes.mode !== "invent" && !model.kit.places) issue2("scenes", `${model.label} invents every place`);
20583
+ for (const slot of MUSIC_VIDEO_CAST_SLOTS) if (value.cast?.[CAST_FIELDS[slot]] && !model.cast.includes(slot)) issue2("cast", `${model.label} takes no ${slot} photo`);
20584
+ };
20585
+ var MusicVideoPlanRequestSchema = external_exports.object({
20586
+ song_id: common.song_id,
20587
+ ...musicVideoBrief,
20588
+ revise: external_exports.object({ plan_id: MusicVideoPlanIdSchema, note: external_exports.string().trim().min(1).max(1e3) }).strict().optional()
20589
+ }).strict().superRefine(fitsModel);
20590
+ var MusicVideoRequestSchema = external_exports.object({
20591
+ type: external_exports.literal("music-video"),
20592
+ ...common,
20593
+ ...musicVideoBrief,
20594
+ plan_id: MusicVideoPlanIdSchema.optional(),
20595
+ // How sharp it is made; not part of the plan (the treatment and shots are the same in every quality).
20596
+ quality: external_exports.enum(MUSIC_VIDEO_QUALITY_IDS).default(DEFAULT_MUSIC_VIDEO_QUALITY)
20597
+ }).strict().superRefine(fitsModel);
20598
+ var VideoRequestSchema = external_exports.discriminatedUnion("type", [LyricVideoRequestSchema, CanvasRequestSchema, MusicVideoRequestSchema]);
20497
20599
 
20498
20600
  // ../api-spec/src/queue.ts
20499
20601
  var minutes = (seconds) => Math.max(1, Math.round(seconds / 60));
20500
20602
  function queueLabel(queue) {
20501
20603
  if (queue.reason === "plan_limit") return queue.position && queue.position > 1 ? `#${queue.position} in line` : "Next in line";
20604
+ if (queue.reason === "generator_capacity") return queue.position && queue.position > 1 ? `Generators busy \xB7 #${queue.position} in line` : "Generators busy \xB7 next in line";
20502
20605
  return queue.estimated_wait_seconds != null ? `Machines busy \xB7 about ${minutes(queue.estimated_wait_seconds)} min` : "Machines busy";
20503
20606
  }
20504
20607
 
@@ -20526,10 +20629,13 @@ var search = (q) => ({
20526
20629
  });
20527
20630
  var httpsUrl = (what) => external_exports.string().url().max(2e3).describe(`A public https URL of ${what}`);
20528
20631
  var LYRICS = "The song\u2019s lyrics as text: plain (Suno-style [Verse]/[Chorus] tags and (x2) marks are fine), or the contents of an SRT, WebVTT or LRC file. Every word is still timed from the audio: your text fixes misheard words and sets where lines break in videos. A part sung again (a chorus) can be written once; lyrics that don\u2019t match what\u2019s sung, or cover only part of it, are refused";
20632
+ var KIT_ABOUT = "The kit is what a music video is made from besides the artist\u2019s photos: outfits (an artist\u2019s), places and props (the workspace\u2019s, for every artist). Each has a name and an @handle; a music video brief (direction) that mentions @handle uses that piece exactly as it is, and the director designs the rest.";
20529
20633
  var NEEDS_PLAN = "Needs an active plan (402 plan_required without one; get_account: plan.active) and room in its storage (402 storage_full when it would not fit; get_account: storage).";
20530
20634
  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.";
20531
20635
  var { type: _lyricType, quote_id: _lyricQuote, ...lyricShape } = LyricVideoRequestSchema.shape;
20532
20636
  var { type: _canvasType, quote_id: _canvasQuote, ...canvasShape } = CanvasRequestSchema.shape;
20637
+ var { type: _musicType, quote_id: _musicQuote, ...musicShape } = MusicVideoRequestSchema.shape;
20638
+ var CAST_DESCRIPTION = "The two photos the artist is kept from: face_photo_id (a sharp face, mouth visible) and outfit_photo_id (the outfit and body worn throughout); either left out, the director picks it. One photo can be both; hidden photos (add_artist_photos hidden) work too";
20533
20639
  var QUOTE_ID = external_exports.string().uuid().describe("The quote_id from the matching quote: the request must be identical");
20534
20640
  var METADATA = external_exports.record(external_exports.string(), external_exports.unknown()).optional().describe("Your own JSON (an order id, for example): kept with the video and returned in its request. Quote and create with the same value");
20535
20641
  var CALLBACK = external_exports.string().max(2e3).optional().describe("An https URL to POST the finished video to (signed; see Callbacks). Quote and create with the same value");
@@ -20559,13 +20665,81 @@ var canvasInput = external_exports.object({
20559
20665
  seconds: canvasShape.seconds.describe("Canvas length in whole seconds, 5\u20138 (default 8). Spotify loops it, so no part of the song is chosen"),
20560
20666
  variations: canvasShape.variations.describe("1\u20134 different Canvases")
20561
20667
  });
20668
+ var DIRECTION = 'Optional notes for the director (a place, an era, a story idea, a mood). Mention kit pieces by @handle (list_kit): "@nina-kazora in the @blue-set on the @rooftop, the @chrome-mic in hand"; a mentioned piece is used exactly as it is and the director designs the rest. An unknown handle answers 400';
20669
+ var LOOKBOOK_ID = "A lookbook (design_music_video_shoot) whose kept, drawn pieces the video uses like the kit pieces the direction mentions; its idea leads the director";
20670
+ var musicVideoInput = external_exports.object({
20671
+ ...musicShape,
20672
+ song_id: songId.describe("The song; its artist performs the video and needs photos (add_artist_photos)"),
20673
+ callback_url: CALLBACK,
20674
+ metadata: METADATA,
20675
+ model: musicShape.model.describe("The music video model: one-take (default; one continuous, lip-synced take of the artist). get_options lists the models with the categories, styles, formats and length each makes"),
20676
+ scenes: musicShape.scenes.describe(`Where it is set besides the places the direction mentions from the kit: {"mode":"invent"} (default: the director imagines the others) or {"mode":"stock"} (it finds a real stock photo of each place it writes, empty of people, and the artist is put into it), up to the model's kit.places in all`),
20677
+ category: musicShape.category.describe("performance (default: sings to camera in one place), intercut (performance cut against the artist living the song's story), cinematic (a moving camera through a location), story (acts out the song's story in one take) or surreal (the world transforms with the song). get_options lists the ones each model makes"),
20678
+ style: musicShape.style.describe("Optional look: natural, film, golden-hour, neon-night, noir, vintage or dreamy. Omit it and the director picks one from the cover"),
20679
+ aspect_ratio: musicShape.aspect_ratio.describe('The one format of the file: "9:16" (default, vertical), "16:9" (wide) or "1:1" (square)'),
20680
+ trim: musicShape.trim.describe("Perform only this section of the song (1 to 10 minutes); omitted, the whole song (1 to 10 minutes long). The price follows its length"),
20681
+ direction: musicShape.direction.describe(DIRECTION),
20682
+ lookbook_id: musicShape.lookbook_id.describe(LOOKBOOK_ID),
20683
+ cast: musicShape.cast.describe(CAST_DESCRIPTION),
20684
+ plan_id: musicShape.plan_id.describe("Make the video from this plan (plan_music_video): its brief replaces the one sent, so send song_id and plan_id. Omitted, the director plans it while it is made"),
20685
+ quality: musicShape.quality.describe("The resolution it is made at: one of the qualities get_options lists for the model (768p by default; 1080p is the same video sharper for about twice the credits); not part of the plan, so a plan is made in any quality. get_options lists each model's qualities with about how long each takes; credits.music_video.models has a minute by model and quality"),
20686
+ variations: musicShape.variations.describe("1\u20134 different music videos")
20687
+ });
20688
+ var musicVideoPlanInput = external_exports.object({
20689
+ ...MusicVideoPlanRequestSchema.shape,
20690
+ song_id: songId.describe("The song; its artist performs the video and needs photos (add_artist_photos)"),
20691
+ model: musicShape.model.describe("The music video model: one-take (default; one continuous, lip-synced take of the artist). get_options lists the models with the categories, styles, formats and length each makes"),
20692
+ scenes: musicShape.scenes.describe(`Where it is set besides the places the direction mentions from the kit: {"mode":"invent"} (default: the director imagines the others) or {"mode":"stock"} (it finds a real stock photo of each place it writes, empty of people, and the artist is put into it), up to the model's kit.places in all`),
20693
+ category: musicShape.category.describe("performance (default), intercut, cinematic, story or surreal"),
20694
+ style: musicShape.style.describe("Optional look: natural, film, golden-hour, neon-night, noir, vintage or dreamy; omitted, the director picks one from the cover"),
20695
+ aspect_ratio: musicShape.aspect_ratio.describe('"9:16" (default), "16:9" or "1:1"'),
20696
+ trim: musicShape.trim.describe("Only this section of the song (1 to 10 minutes); omitted, the whole song (1 to 10 minutes long)"),
20697
+ direction: musicShape.direction.describe(DIRECTION),
20698
+ lookbook_id: musicShape.lookbook_id.describe(LOOKBOOK_ID),
20699
+ cast: musicShape.cast.describe(CAST_DESCRIPTION),
20700
+ revise: MusicVideoPlanRequestSchema.shape.revise.describe('Rewrite an earlier plan of this song: {"plan_id":"plan_\u2026","note":"what to change"} (the next draft)')
20701
+ });
20702
+ var MusicVideoPlanSchema = external_exports.looseObject({
20703
+ id: external_exports.string(),
20704
+ song_id: external_exports.string(),
20705
+ draft: external_exports.number().int().describe("1 for the first plan, n+1 for a rewrite"),
20706
+ revision_of: external_exports.string().nullable(),
20707
+ note: external_exports.string().nullable(),
20708
+ brief: external_exports.record(external_exports.string(), external_exports.unknown()).describe("What it was planned from: model, category, style, aspect_ratio, trim, direction, cast"),
20709
+ title: external_exports.string().nullable().describe("The film's name, as the director titled it"),
20710
+ concept: external_exports.string(),
20711
+ style: external_exports.string(),
20712
+ clips: external_exports.number().int(),
20713
+ cast: external_exports.object({ face_photo_id: external_exports.string(), outfit_photo_id: external_exports.string() }).describe("The photos it keeps the artist from"),
20714
+ world: external_exports.object({ setting: external_exports.string(), wardrobe: external_exports.string(), light: external_exports.string() }).describe("What every shot keeps"),
20715
+ places: external_exports.array(external_exports.object({
20716
+ index: external_exports.number().int(),
20717
+ description: external_exports.string(),
20718
+ kit: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }).nullable(),
20719
+ photo: external_exports.object({ stock_id: external_exports.string(), thumbnail_url: external_exports.string(), credit: external_exports.record(external_exports.string(), external_exports.unknown()).nullable() }).nullable()
20720
+ })).describe("The real places it is set in: kit pieces (kit), or stock photos the director found (photo); neither: no usable photo was found, so it is imagined. Empty: every place is imagined"),
20721
+ outfits: external_exports.array(external_exports.object({ index: external_exports.number().int(), kit: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }), description: external_exports.string() })).describe("The kit outfits it uses"),
20722
+ props: external_exports.array(external_exports.object({ index: external_exports.number().int(), kit: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }), description: external_exports.string() })).describe("The kit props it uses"),
20723
+ shots: external_exports.array(external_exports.object({
20724
+ index: external_exports.number().int(),
20725
+ start_seconds: external_exports.number(),
20726
+ end_seconds: external_exports.number(),
20727
+ section: external_exports.string().nullable(),
20728
+ lyrics: external_exports.string().describe('What is sung in this clip, line breaks as " / "'),
20729
+ summary: external_exports.string().describe("What we see"),
20730
+ places: external_exports.array(external_exports.number().int()).describe("The places it happens in (numbers into places)"),
20731
+ outfit: external_exports.number().int().nullable().describe("The kit outfit worn (a number into outfits), or null: the outfit photo\u2019s"),
20732
+ props: external_exports.array(external_exports.number().int()).describe("The kit props seen (numbers into props)")
20733
+ })),
20734
+ created_at: external_exports.string()
20735
+ });
20562
20736
  var QUOTE_FIRST = "Always quote first and tell the user the credits before creating; credits are reserved at creation and charged only when the video is delivered.";
20563
20737
  var VideoOutputSchema = external_exports.looseObject({
20564
20738
  aspect_ratio: external_exports.enum(["9:16", "16:9", "1:1"]).describe("The format of this file"),
20565
20739
  url: external_exports.string().optional().describe("The full-quality file"),
20566
20740
  download_url: external_exports.string().optional().describe("The full-quality file, saved under a readable name"),
20567
20741
  web_url: external_exports.string().optional().describe("A 720p copy, for playback"),
20568
- poster_url: external_exports.string().optional().describe("A still of the video: for a lyric video one whole lyric line on screen (the hook when it can be), for a Canvas its first frame"),
20742
+ poster_url: external_exports.string().optional().describe("A still of the video: for a lyric video one whole lyric line on screen (the hook when it can be), for a Canvas its first frame, for a music video a frame of its first seconds"),
20569
20743
  poster_seconds: external_exports.number().nullable().describe("Where poster_url was cut, in seconds from the start of this file (a trimmed clip counts from its own start): the cover frame offset for a post that takes one instead of an image (TikTok). Null for videos made before it was kept"),
20570
20744
  url_expires_in_seconds: external_exports.number().int().optional().describe("How long the links stay valid"),
20571
20745
  duration_seconds: external_exports.number().nullable().optional(),
@@ -20574,13 +20748,13 @@ var VideoOutputSchema = external_exports.looseObject({
20574
20748
  web_size_bytes: external_exports.number().int().nullable().optional()
20575
20749
  });
20576
20750
  var VideoQueueSchema = external_exports.object({
20577
- reason: external_exports.enum(["plan_limit", "render_capacity"]).describe("plan_limit: the organization already makes as many videos at once as its plan allows, so this one starts when one of them finishes. render_capacity: every render machine is busy, so parts of this video wait their turn (higher plans get a larger share of the machines)"),
20578
- position: external_exports.number().int().nullable().describe("plan_limit: its place among the organization's waiting videos (1 starts next); null otherwise"),
20751
+ reason: external_exports.enum(["plan_limit", "render_capacity", "generator_capacity"]).describe("plan_limit: the organization already makes as many videos at once as its plan allows, so this one starts when one of them finishes (AI music videos have a limit of their own: half the plan's, rounded up). render_capacity: every render machine is busy, so parts of this video wait their turn (higher plans get a larger share of the machines). generator_capacity: every music video generator is busy, so this music video starts generating when one is free"),
20752
+ position: external_exports.number().int().nullable().describe("plan_limit: its place among the organization's waiting videos (1 starts next); generator_capacity: its place among the music videos waiting for a generator; null otherwise"),
20579
20753
  estimated_wait_seconds: external_exports.number().int().nullable().describe("render_capacity: about how long until all of it is rendering, in seconds; null otherwise")
20580
20754
  });
20581
20755
  var VideoSchema = external_exports.looseObject({
20582
20756
  id: external_exports.string(),
20583
- type: external_exports.enum(["lyric-video", "canvas"]),
20757
+ type: external_exports.enum(["lyric-video", "canvas", "music-video"]),
20584
20758
  variation: external_exports.number().int(),
20585
20759
  variation_count: external_exports.number().int(),
20586
20760
  quote_id: external_exports.string().nullable(),
@@ -20594,6 +20768,15 @@ var VideoSchema = external_exports.looseObject({
20594
20768
  look_id: external_exports.string().nullable(),
20595
20769
  look: external_exports.record(external_exports.string(), external_exports.unknown()).nullable(),
20596
20770
  canvas: external_exports.record(external_exports.string(), external_exports.unknown()).nullable().optional().describe("A Canvas: its design and, for stock, the credit to show"),
20771
+ music_video: external_exports.object({
20772
+ title: external_exports.string().nullable(),
20773
+ concept: external_exports.string().describe("The idea, in a sentence or three"),
20774
+ style: external_exports.string().describe("The visual style it was made in (the one asked for, or the director's pick)"),
20775
+ clips: external_exports.number().int().describe("How many clips it is generated in"),
20776
+ cast: external_exports.object({ face_photo_id: external_exports.string(), outfit_photo_id: external_exports.string() }).describe("The artist photos it keeps the artist from: the face, and the outfit and body"),
20777
+ world: external_exports.object({ setting: external_exports.string(), wardrobe: external_exports.string(), light: external_exports.string() }),
20778
+ shots: external_exports.array(external_exports.object({ index: external_exports.number().int(), start_seconds: external_exports.number(), end_seconds: external_exports.number(), section: external_exports.string().nullable(), lyrics: external_exports.string(), summary: external_exports.string() })).describe("Each clip's beat, timed from the start of the video")
20779
+ }).nullable().optional().describe("A music video's plan, once the director made it (null before)"),
20597
20780
  quoted_credits: external_exports.number().nullable(),
20598
20781
  charged_credits: external_exports.number().nullable(),
20599
20782
  error: external_exports.string().nullable(),
@@ -20801,7 +20984,7 @@ var OPERATIONS = [
20801
20984
  id: "artist_photos.list",
20802
20985
  group: "artists",
20803
20986
  title: "List artist photos",
20804
- summary: "The artist\u2019s photos (identity references, up to 6)",
20987
+ summary: "The artist\u2019s photos (identity references)",
20805
20988
  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.",
20806
20989
  method: "GET",
20807
20990
  path: "/api/v1/artists/{artist_id}/photos",
@@ -20818,14 +21001,15 @@ var OPERATIONS = [
20818
21001
  group: "artists",
20819
21002
  title: "Add artist photos",
20820
21003
  summary: "Upload one or more photos of the artist (JPEG, PNG or WebP)",
20821
- 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. ${NEEDS_PLAN}`,
21004
+ description: `As many as your plan's storage holds (up to 20 an upload), at least 512 px on the short side, up to 15 MB each. hidden keeps them off the artist's photos, for photos meant for one music video only (pass their ids in its cast). 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. ${NEEDS_PLAN}`,
20822
21005
  method: "POST",
20823
21006
  path: "/api/v1/artists/{artist_id}/photos",
20824
21007
  scopes: ["music:write", "videos:write"],
20825
21008
  input: external_exports.object({
20826
21009
  artist_id: artistId,
20827
- photo_urls: external_exports.array(httpsUrl("a photo")).min(1).max(6).optional().describe("Public https URLs of the photos (or upload files with the CLI)"),
20828
- rights_confirmed: external_exports.literal(true).describe("You have the rights to use these photos of the artist")
21010
+ photo_urls: external_exports.array(httpsUrl("a photo")).min(1).max(ARTIST_PHOTOS_PER_UPLOAD).optional().describe("Public https URLs of the photos (or upload files with the CLI)"),
21011
+ rights_confirmed: external_exports.literal(true).describe("You have the rights to use these photos of the artist"),
21012
+ hidden: external_exports.boolean().optional().describe("true: only for a music video, kept off the artist's photos (default false)")
20829
21013
  }),
20830
21014
  files: [{ field: "photos", urlField: "photo_urls", multiple: true, accept: ["image/jpeg", "image/png", "image/webp"], description: "Photos of the artist" }],
20831
21015
  readOnly: false,
@@ -20850,6 +21034,105 @@ var OPERATIONS = [
20850
21034
  cli: ["artists", "photos", "delete"],
20851
21035
  mcp: "delete_artist_photo"
20852
21036
  },
21037
+ /* The artist kit */
21038
+ {
21039
+ id: "kit.list",
21040
+ group: "artists",
21041
+ title: "List the kit",
21042
+ summary: "Outfits, places and props a music video brief can mention",
21043
+ description: `${KIT_ABOUT} With artist_id: the workspace's places and props and that artist's outfits (what a brief for their song can mention); without it, every artist's outfits too. url is the piece cropped, up to 1536 px (what the AI receives; width and height describe it), thumbnail_url a 320 px copy, source_url the image the crop is a rectangle of.`,
21044
+ method: "GET",
21045
+ path: "/api/v1/kit",
21046
+ scopes: ["music:read", "videos:read"],
21047
+ input: external_exports.object({ artist_id: artistId.optional().describe("Only the workspace\u2019s pieces and this artist\u2019s outfits"), kind: external_exports.enum(KIT_KINDS).optional().describe("outfit, place or prop") }),
21048
+ readOnly: true,
21049
+ destructive: false,
21050
+ idempotent: true,
21051
+ cli: ["kit", "list"],
21052
+ mcp: "list_kit"
21053
+ },
21054
+ {
21055
+ id: "kit.add",
21056
+ group: "artists",
21057
+ title: "Add a kit piece",
21058
+ summary: "An outfit, place or prop from an image, a link or a stock photo, cropped",
21059
+ description: `${KIT_ABOUT} An outfit needs artist_id; a place or prop is the workspace's. The image is an upload or file_url (JPEG, PNG or WebP, at least 512 px on its short side, up to 15 MB, with rights_confirmed) or a stock_id from search_stock (credited, no rights needed). crop keeps a rectangle of it (fractions; at least 256 px on its short side), for a prop cut out of a bigger photo. handle follows the name (Blue set \u2192 blue-set; -2 when taken) unless given. ${NEEDS_PLAN}`,
21060
+ method: "POST",
21061
+ path: "/api/v1/kit",
21062
+ scopes: ["music:write", "videos:write"],
21063
+ input: external_exports.object({
21064
+ kind: external_exports.enum(KIT_KINDS).describe("outfit (an artist\u2019s), place or prop (the workspace\u2019s)"),
21065
+ name: external_exports.string().trim().min(1).max(60).describe("What it is called, e.g. Blue set"),
21066
+ artist_id: artistId.optional().describe("The artist an outfit belongs to (outfits only)"),
21067
+ handle: KitHandleSchema.optional().describe("Its @handle (default: from the name)"),
21068
+ description: external_exports.string().trim().max(300).optional().describe("What it is, for the director (a stock photo\u2019s caption by default)"),
21069
+ crop: CropRectSchema.optional().describe('The rectangle to keep, in fractions of the image: {"x","y","w","h"}; the whole image when omitted'),
21070
+ file_url: httpsUrl("the image").optional().describe("A public https URL of the image (or upload a file with the CLI)"),
21071
+ stock_id: StockIdSchema.optional().describe("A stock photo id from search_stock instead of an image"),
21072
+ rights_confirmed: external_exports.literal(true).optional().describe("You have the rights to use the image (needed for an upload or file_url)")
21073
+ }),
21074
+ files: [{ field: "file", urlField: "file_url", accept: ["image/jpeg", "image/png", "image/webp"], description: "The image of the piece" }],
21075
+ readOnly: false,
21076
+ destructive: false,
21077
+ idempotent: false,
21078
+ cli: ["kit", "add"],
21079
+ mcp: "add_kit_piece",
21080
+ example: { kind: "prop", name: "Chrome mic", stock_id: "1105666", crop: { x: 0.3, y: 0.2, w: 0.25, h: 0.4 } }
21081
+ },
21082
+ {
21083
+ id: "kit.get",
21084
+ group: "artists",
21085
+ title: "Get a kit piece",
21086
+ summary: "One outfit, place or prop",
21087
+ description: "",
21088
+ method: "GET",
21089
+ path: "/api/v1/kit/{kit_id}",
21090
+ scopes: ["music:read", "videos:read"],
21091
+ input: external_exports.object({ kit_id: id("kit piece") }),
21092
+ readOnly: true,
21093
+ destructive: false,
21094
+ idempotent: true,
21095
+ cli: ["kit", "get"],
21096
+ mcp: "get_kit_piece"
21097
+ },
21098
+ {
21099
+ id: "kit.update",
21100
+ group: "artists",
21101
+ title: "Change a kit piece",
21102
+ summary: "Rename it, change its handle or description, or crop it again",
21103
+ description: "crop is cut again from the image the piece was added from. Plans already made keep the pieces as they were planned.",
21104
+ method: "PATCH",
21105
+ path: "/api/v1/kit/{kit_id}",
21106
+ scopes: ["music:write", "videos:write"],
21107
+ input: external_exports.object({
21108
+ kit_id: id("kit piece"),
21109
+ name: external_exports.string().trim().min(1).max(60).optional(),
21110
+ handle: KitHandleSchema.optional(),
21111
+ description: external_exports.string().trim().max(300).nullable().optional(),
21112
+ crop: CropRectSchema.optional().describe("The new rectangle, in fractions of the source image")
21113
+ }),
21114
+ readOnly: false,
21115
+ destructive: false,
21116
+ idempotent: true,
21117
+ cli: ["kit", "update"],
21118
+ mcp: "update_kit_piece"
21119
+ },
21120
+ {
21121
+ id: "kit.delete",
21122
+ group: "artists",
21123
+ title: "Delete a kit piece",
21124
+ summary: "Remove an outfit, place or prop",
21125
+ description: "A plan that used it can\u2019t be made any more: plan again.",
21126
+ method: "DELETE",
21127
+ path: "/api/v1/kit/{kit_id}",
21128
+ scopes: ["music:write", "videos:write"],
21129
+ input: external_exports.object({ kit_id: id("kit piece") }),
21130
+ readOnly: false,
21131
+ destructive: true,
21132
+ idempotent: true,
21133
+ cli: ["kit", "delete"],
21134
+ mcp: "delete_kit_piece"
21135
+ },
20853
21136
  /* Songs */
20854
21137
  {
20855
21138
  id: "songs.list",
@@ -21180,6 +21463,195 @@ var OPERATIONS = [
21180
21463
  mcp: "quote_canvas",
21181
21464
  example: { song_id: "song_\u2026", source: "ai-video", style: "dreamy" }
21182
21465
  },
21466
+ {
21467
+ id: "music_video_plans.create",
21468
+ group: "videos",
21469
+ title: "Plan a music video",
21470
+ summary: "The director's treatment and shots for a music video, before anything is charged",
21471
+ description: "Free (a limited number an hour). Takes about a minute. Returns a plan: the concept, the face and outfit photos, and one shot per 15-second clip with its lyrics. Show it to the user, rewrite it with revise until they like it, then quote_music_video and create_music_video with its plan_id.",
21472
+ method: "POST",
21473
+ path: "/api/v1/music-video-plans",
21474
+ scopes: ["videos:write"],
21475
+ input: musicVideoPlanInput,
21476
+ readOnly: false,
21477
+ destructive: false,
21478
+ idempotent: false,
21479
+ cli: ["plan", "music-video"],
21480
+ mcp: "plan_music_video",
21481
+ output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema },
21482
+ example: { song_id: "song_\u2026", category: "cinematic", aspect_ratio: "9:16", trim: { start_seconds: 32, end_seconds: 96 } }
21483
+ },
21484
+ {
21485
+ id: "music_video_plans.swap_place",
21486
+ group: "videos",
21487
+ title: "Change a place's photo",
21488
+ summary: "Another stock photo for one of a plan's places",
21489
+ description: "Returns the next draft: the same treatment and shots, set in this photo (no director call, free). Pick a photo of the same kind of place, with no people, from search_stock.",
21490
+ method: "PATCH",
21491
+ path: "/api/v1/music-video-plans/{plan_id}/places/{place}",
21492
+ scopes: ["videos:write"],
21493
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)"), place: external_exports.number().int().min(1).describe("The place's number (places[].index)"), stock_id: StockIdSchema.describe("A stock photo id from search_stock") }),
21494
+ readOnly: false,
21495
+ destructive: false,
21496
+ idempotent: true,
21497
+ cli: ["plans", "swap-place"],
21498
+ mcp: "swap_music_video_place",
21499
+ output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema }
21500
+ },
21501
+ /* Design the shoot */
21502
+ {
21503
+ id: "music_video_lookbooks.create",
21504
+ group: "videos",
21505
+ title: "Design a music video shoot",
21506
+ summary: "The director designs the outfits, places and props the brief leaves to it, before the plan",
21507
+ description: `Optional, before plan_music_video. Free to design (a limited number an hour), about a minute: returns a lookbook whose pieces are the brief's own kit pieces (yours, used as they are) and the director's designs (an outfit drawn on the artist, a place drawn empty, a prop alone), not drawn yet. price.draw.credits is what drawing them costs: tell the user, then render_music_video_lookbook after their go. Same brief as plan_music_video. ${NEEDS_PLAN}`,
21508
+ method: "POST",
21509
+ path: "/api/v1/music-video-lookbooks",
21510
+ scopes: ["videos:write"],
21511
+ input: musicVideoPlanInput.omit({ revise: true, lookbook_id: true }),
21512
+ readOnly: false,
21513
+ destructive: false,
21514
+ idempotent: false,
21515
+ cli: ["lookbook", "design"],
21516
+ mcp: "design_music_video_shoot",
21517
+ example: { song_id: "song_\u2026", category: "story", direction: "@nina-kazora in the @blue-set" }
21518
+ },
21519
+ {
21520
+ id: "music_video_lookbooks.get",
21521
+ group: "videos",
21522
+ title: "Get a lookbook",
21523
+ summary: "A lookbook with its pictures as they are drawn",
21524
+ description: "status is proposed (not drawn), rendering (being drawn: check back in about a minute), ready or failed. Each piece has its picture (image_url) once drawn, kept (true unless left out) and whether it is yours. price: per picture, to draw the rest (draw) and to redesign the director's pieces (redesign).",
21525
+ method: "GET",
21526
+ path: "/api/v1/music-video-lookbooks/{lookbook_id}",
21527
+ scopes: ["videos:read"],
21528
+ input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id (lookbook_\u2026)") }),
21529
+ readOnly: true,
21530
+ destructive: false,
21531
+ idempotent: true,
21532
+ cli: ["lookbook", "get"],
21533
+ mcp: "get_music_video_lookbook"
21534
+ },
21535
+ {
21536
+ id: "music_video_lookbooks.update",
21537
+ group: "videos",
21538
+ title: "Save a lookbook to the kit or not",
21539
+ summary: "Whether its kept pieces join the kit when a video is planned from it",
21540
+ description: "save_to_kit true (default): the kept pieces become kit pieces of the workspace and the artist; false: they are used for that video only.",
21541
+ method: "PATCH",
21542
+ path: "/api/v1/music-video-lookbooks/{lookbook_id}",
21543
+ scopes: ["videos:write"],
21544
+ input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id"), save_to_kit: external_exports.boolean() }),
21545
+ readOnly: false,
21546
+ destructive: false,
21547
+ idempotent: true,
21548
+ cli: ["lookbook", "update"],
21549
+ mcp: "update_music_video_lookbook"
21550
+ },
21551
+ {
21552
+ id: "music_video_lookbooks.render",
21553
+ group: "videos",
21554
+ title: "Draw a lookbook",
21555
+ summary: "Draws the pieces not drawn yet (spends credits)",
21556
+ description: "credits is the price the user agreed to (price.draw.credits); a different price answers 409 with the current one. The credits are held, then charged as pictures are drawn; one that fails isn't charged. Poll get_music_video_lookbook until status is ready.",
21557
+ method: "POST",
21558
+ path: "/api/v1/music-video-lookbooks/{lookbook_id}/render",
21559
+ scopes: ["videos:write"],
21560
+ input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id"), credits: external_exports.number().int().positive().describe("The price shown (price.draw.credits)") }),
21561
+ readOnly: false,
21562
+ destructive: false,
21563
+ idempotent: false,
21564
+ cli: ["lookbook", "render"],
21565
+ mcp: "render_music_video_lookbook"
21566
+ },
21567
+ {
21568
+ id: "music_video_lookbooks.redesign",
21569
+ group: "videos",
21570
+ title: "Redesign a lookbook",
21571
+ summary: "Redesigns the director's pieces with a note and draws them again (spends credits)",
21572
+ description: "The user's own pieces stay. credits: price.redesign.credits.",
21573
+ method: "POST",
21574
+ path: "/api/v1/music-video-lookbooks/{lookbook_id}/redesign",
21575
+ scopes: ["videos:write"],
21576
+ input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id"), note: external_exports.string().trim().min(1).max(1e3).describe("What to change"), credits: external_exports.number().int().positive().describe("The price shown (price.redesign.credits)") }),
21577
+ readOnly: false,
21578
+ destructive: false,
21579
+ idempotent: false,
21580
+ cli: ["lookbook", "redesign"],
21581
+ mcp: "redesign_music_video_lookbook"
21582
+ },
21583
+ {
21584
+ id: "music_video_lookbooks.keep",
21585
+ group: "videos",
21586
+ title: "Keep or leave out a lookbook piece",
21587
+ summary: "Whether a piece goes into the video",
21588
+ description: "",
21589
+ method: "PATCH",
21590
+ path: "/api/v1/music-video-lookbooks/{lookbook_id}/pieces/{piece}",
21591
+ scopes: ["videos:write"],
21592
+ input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id"), piece: external_exports.number().int().min(1).describe("The piece's number (pieces[].index)"), kept: external_exports.boolean() }),
21593
+ readOnly: false,
21594
+ destructive: false,
21595
+ idempotent: true,
21596
+ cli: ["lookbook", "keep"],
21597
+ mcp: "keep_music_video_lookbook_piece"
21598
+ },
21599
+ {
21600
+ id: "music_video_lookbooks.redraw",
21601
+ group: "videos",
21602
+ title: "Redraw a lookbook piece",
21603
+ summary: "Draws one of the director's pieces again, with an optional note (spends credits)",
21604
+ description: "credits: price.credits_per_picture.",
21605
+ method: "POST",
21606
+ path: "/api/v1/music-video-lookbooks/{lookbook_id}/pieces/{piece}/redraw",
21607
+ scopes: ["videos:write"],
21608
+ input: external_exports.object({
21609
+ lookbook_id: LookbookIdSchema.describe("The lookbook id"),
21610
+ piece: external_exports.number().int().min(1).describe("The piece's number"),
21611
+ note: external_exports.string().trim().min(1).max(500).optional().describe('What to change: "warmer light, nobody else"'),
21612
+ credits: external_exports.number().int().positive().describe("The price shown (price.credits_per_picture)")
21613
+ }),
21614
+ readOnly: false,
21615
+ destructive: false,
21616
+ idempotent: false,
21617
+ cli: ["lookbook", "redraw"],
21618
+ mcp: "redraw_music_video_lookbook_piece"
21619
+ },
21620
+ {
21621
+ id: "music_video_plans.get",
21622
+ group: "videos",
21623
+ title: "Get a music video plan",
21624
+ summary: "A plan made earlier",
21625
+ description: "",
21626
+ method: "GET",
21627
+ path: "/api/v1/music-video-plans/{plan_id}",
21628
+ scopes: ["videos:read"],
21629
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)") }),
21630
+ readOnly: true,
21631
+ destructive: false,
21632
+ idempotent: true,
21633
+ cli: ["plans", "get"],
21634
+ mcp: "get_music_video_plan",
21635
+ output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema }
21636
+ },
21637
+ {
21638
+ id: "quotes.music_video",
21639
+ group: "videos",
21640
+ title: "Quote a music video",
21641
+ summary: "The exact credits for an AI music video, before anything is charged",
21642
+ description: `Returns quote_id, credits and a breakdown; the price follows the section's length (clips of about 15 seconds). The song's artist performs it, so the artist needs photos. ${QUOTE_FIRST}`,
21643
+ method: "POST",
21644
+ path: "/api/v1/quotes",
21645
+ scopes: ["videos:write", "videos:read"],
21646
+ input: musicVideoInput,
21647
+ fixed: { type: "music-video" },
21648
+ readOnly: true,
21649
+ destructive: false,
21650
+ idempotent: true,
21651
+ cli: ["quote", "music-video"],
21652
+ mcp: "quote_music_video",
21653
+ example: { song_id: "song_\u2026", category: "cinematic", aspect_ratio: "9:16", trim: { start_seconds: 32, end_seconds: 96 } }
21654
+ },
21183
21655
  {
21184
21656
  id: "videos.create_lyric_video",
21185
21657
  group: "videos",
@@ -21214,16 +21686,40 @@ var OPERATIONS = [
21214
21686
  cli: ["create", "canvas"],
21215
21687
  mcp: "create_canvas"
21216
21688
  },
21689
+ {
21690
+ id: "videos.create_music_video",
21691
+ group: "videos",
21692
+ title: "Create a music video",
21693
+ summary: "Make the music video a quote priced (spends credits)",
21694
+ description: `Send the same request as the quote plus its quote_id. Returns the video ids at once; poll get_video until status is completed. It takes about 5 minutes for a minute of song, longer for the whole song. ${NEEDS_PLAN}`,
21695
+ method: "POST",
21696
+ path: "/api/v1/videos",
21697
+ scopes: ["videos:write"],
21698
+ input: musicVideoInput.extend({ quote_id: QUOTE_ID }),
21699
+ fixed: { type: "music-video" },
21700
+ readOnly: false,
21701
+ destructive: false,
21702
+ idempotent: true,
21703
+ cli: ["create", "music-video"],
21704
+ mcp: "create_music_video"
21705
+ },
21217
21706
  {
21218
21707
  id: "videos.list",
21219
21708
  group: "videos",
21220
21709
  title: "List videos",
21221
21710
  summary: "Videos, newest first, with status and thumbnails",
21222
- description: "Each video's outputs carry aspect_ratio, poster_url, poster_seconds and web_url (for thumbnails and previews); get_video has the download links. A video that is waiting has queue: why (plan_limit or render_capacity), its place in line or about how long.",
21711
+ description: "A page at a time (limit, default 50): next_cursor is null on the last page, otherwise pass it as cursor for the next one with the same filters. counts says how many videos match song_id, artist_id and q: all, and by type (lyric_video, canvas, music_video). Each video's outputs carry aspect_ratio, poster_url, poster_seconds and web_url (for thumbnails and previews); get_video has the download links. A video that is waiting has queue: why (plan_limit or render_capacity), its place in line or about how long.",
21223
21712
  method: "GET",
21224
21713
  path: "/api/v1/videos",
21225
21714
  scopes: ["videos:read"],
21226
- input: external_exports.object({ song_id: songId.optional().describe("Only this song\u2019s videos"), type: external_exports.enum(["lyric-video", "canvas"]).optional(), limit: external_exports.number().int().min(1).max(100).optional() }),
21715
+ input: external_exports.object({
21716
+ song_id: songId.optional().describe("Only this song\u2019s videos"),
21717
+ artist_id: artistId.optional().describe("Only videos of this artist\u2019s songs"),
21718
+ type: external_exports.enum(["lyric-video", "canvas", "music-video"]).optional(),
21719
+ q: external_exports.string().trim().min(1).max(100).optional().describe("Search the song title, artist name, Look name or video id"),
21720
+ limit: external_exports.number().int().min(1).max(100).optional(),
21721
+ cursor: external_exports.string().min(1).max(200).optional().describe("next_cursor from the previous page")
21722
+ }),
21227
21723
  readOnly: true,
21228
21724
  destructive: false,
21229
21725
  idempotent: true,
@@ -21235,7 +21731,7 @@ var OPERATIONS = [
21235
21731
  group: "videos",
21236
21732
  title: "Get a video",
21237
21733
  summary: "Status, progress, credits and, when completed, the download links",
21238
- description: "status is queued, processing, completed, failed or cancelled. While it waits, queue says why: plan_limit (the organization already makes as many videos at once as its plan allows; position is its place in line) or render_capacity (every render machine is busy; estimated_wait_seconds is about how long). Completed videos have outputs with download_url (full quality), web_url (720p) and poster_url, signed for 7 days. A lyric video's poster is a frame with one whole lyric line on screen (the hook when it can be), ready to set as the thumbnail where you post it; a Canvas's is its first frame. poster_seconds says where in that file the poster was cut, for posts that take a cover frame offset instead of an image (TikTok); null on videos made before it was kept. Failed videos have error and error_code; AI_VIDEO_UNAVAILABLE means the AI video couldn\u2019t be made for a reason on our side, so make it again later.",
21734
+ description: "status is queued, processing, completed, failed or cancelled. While it waits, queue says why: plan_limit (the organization already makes as many videos at once as its plan allows; position is its place in line) or render_capacity (every render machine is busy; estimated_wait_seconds is about how long). Completed videos have outputs with download_url (full quality), web_url (720p) and poster_url, signed for 7 days. A lyric video's poster is a frame with one whole lyric line on screen (the hook when it can be), ready to set as the thumbnail where you post it; a Canvas's is its first frame; a music video's a frame of its first seconds. poster_seconds says where in that file the poster was cut, for posts that take a cover frame offset instead of an image (TikTok); null on videos made before it was kept. Failed videos have error and error_code; AI_VIDEO_UNAVAILABLE means the AI video couldn\u2019t be made for a reason on our side, so make it again later.",
21239
21735
  method: "GET",
21240
21736
  path: "/api/v1/videos/{video_id}",
21241
21737
  scopes: ["videos:read"],
@@ -21407,7 +21903,7 @@ function openApiDocument(input2) {
21407
21903
  }
21408
21904
  return {
21409
21905
  openapi: "3.1.0",
21410
- info: { title: "Kinetune API", version: input2.version ?? "1", description: "Lyric videos and Spotify Canvas loops from your songs. The same operations power the app, the MCP server, the CLI and the n8n node." },
21906
+ info: { title: "Kinetune API", version: input2.version ?? "1", description: "Lyric videos, Spotify Canvas loops and AI music videos from your songs. The same operations power the app, the MCP server, the CLI and the n8n node." },
21411
21907
  servers: [{ url: input2.serverUrl }],
21412
21908
  components: { securitySchemes: {
21413
21909
  bearer: { type: "http", scheme: "bearer", description: "An organization API key (kt_live_\u2026) or an OAuth access token" },
@@ -24960,8 +25456,8 @@ async function revoke(config2) {
24960
25456
  // package.json
24961
25457
  var package_default = {
24962
25458
  name: "@kinetune/cli",
24963
- version: "0.9.0",
24964
- description: "Command line for Kinetune: lyric videos and Spotify Canvas loops from your songs, for people and AI agents.",
25459
+ version: "0.10.0",
25460
+ description: "Command line for Kinetune: lyric videos, Spotify Canvas loops and AI music videos from your songs, for people and AI agents.",
24965
25461
  license: "MIT",
24966
25462
  homepage: "https://kinetune.com/developers#cli",
24967
25463
  keywords: [
@@ -25032,6 +25528,8 @@ function print(data) {
25032
25528
  const rows = [keys, ...items.map((i) => keys.map((k) => k === "progress" && i.queue ? queueLabel(i.queue) : cell(i[k])))];
25033
25529
  const widths = keys.map((_, c) => Math.min(48, Math.max(...rows.map((r) => r[c].length))));
25034
25530
  for (const row of rows) process.stdout.write(row.map((v, c) => v.slice(0, widths[c]).padEnd(widths[c])).join(" ") + "\n");
25531
+ const next = data.next_cursor;
25532
+ if (next) say(`More: run it again with --cursor ${next}`);
25035
25533
  return;
25036
25534
  }
25037
25535
  process.stdout.write(JSON.stringify(data, null, 2) + "\n");
@@ -25191,7 +25689,7 @@ async function waitFor(videoId2, timeoutSeconds) {
25191
25689
  }
25192
25690
  }
25193
25691
  function program2() {
25194
- const root = new Command("kinetune").version(VERSION).description("Lyric videos and Spotify Canvas loops from your songs. Every command prints JSON for scripts and AI agents.").option("--json", "Always print JSON").hook("preAction", (cmd) => {
25692
+ const root = new Command("kinetune").version(VERSION).description("Lyric videos, Spotify Canvas loops and AI music videos from your songs. Every command prints JSON for scripts and AI agents.").option("--json", "Always print JSON").hook("preAction", (cmd) => {
25195
25693
  forceJson = Boolean(cmd.opts().json);
25196
25694
  });
25197
25695
  const GROUP_DESCRIPTIONS = {
@@ -25199,9 +25697,13 @@ function program2() {
25199
25697
  " artists photos": "Artist photos (identity references)",
25200
25698
  " songs": "Songs: upload, list, analysis",
25201
25699
  " looks": "Looks: reusable lyric-video designs",
25202
- " quote": "Exact credits for a video, before anything is charged",
25203
- " create": "Create a video (quotes first and asks unless --yes)",
25204
- " videos": "Videos: status, wait, download, cancel"
25700
+ " quote": "Exact credits for a lyric video, Canvas or music video, before anything is charged",
25701
+ " create": "Create a lyric video, Canvas or music video (quotes first and asks unless --yes)",
25702
+ " videos": "Videos: status, wait, download, cancel",
25703
+ " plan": "Plan a music video before paying: the director's concept and shots, free",
25704
+ " plans": "Music video plans made earlier",
25705
+ " kit": "The artist kit: outfits, places and props a music video brief mentions by @handle",
25706
+ " lookbook": "Design a music video shoot: the director's outfits, places and props as pictures, before the plan"
25205
25707
  };
25206
25708
  const groups = /* @__PURE__ */ new Map();
25207
25709
  const group = (names) => {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@kinetune/cli",
3
- "version": "0.9.0",
4
- "description": "Command line for Kinetune: lyric videos and Spotify Canvas loops from your songs, for people and AI agents.",
3
+ "version": "0.10.0",
4
+ "description": "Command line for Kinetune: lyric videos, Spotify Canvas loops and AI music videos from your songs, for people and AI agents.",
5
5
  "license": "MIT",
6
6
  "homepage": "https://kinetune.com/developers#cli",
7
7
  "keywords": [