@kinetune/cli 2.11.0 → 4.2.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.
Files changed (3) hide show
  1. package/README.md +45 -12
  2. package/dist/kinetune.mjs +1805 -487
  3. package/package.json +1 -1
package/dist/kinetune.mjs CHANGED
@@ -36,30 +36,6 @@ var CATEGORY_IDS = [
36
36
  "cyber",
37
37
  "dreamy"
38
38
  ];
39
- var CATEGORIES = {
40
- release: { label: "Release", description: "Bold announcement looks for a new single.", background: "image" },
41
- fall: { label: "Fall", description: "Warm autumn colors and cozy textures.", background: "image" },
42
- halloween: { label: "Halloween", description: "Spooky nights, pumpkins and fog.", background: "image" },
43
- christmas: { label: "Christmas", description: "Snowy, glowing holiday looks.", background: "image" },
44
- summer: { label: "Summer", description: "Sun, water and holiday energy.", background: "image" },
45
- valentines: { label: "Valentine's", description: "Romantic reds, roses and soft light.", background: "image" },
46
- mood: { label: "Mood", description: "Cinematic scenes with a lyric quote.", background: "image" },
47
- retro: { label: "Retro", description: "Vinyl, film grain and vintage type.", background: "image" },
48
- synthwave: { label: "Synthwave", description: "Neon sunsets and night drives.", background: "image" },
49
- street: { label: "Street", description: "Concrete, graffiti and grit.", background: "image" },
50
- nature: { label: "Nature", description: "Forests, mountains and open water.", background: "image" },
51
- luxury: { label: "Luxury", description: "Marble, gold and deep velvet.", background: "image" },
52
- abstract: { label: "Abstract", description: "Flowing color fields and gradients.", background: "gradient" },
53
- minimal: { label: "Minimal", description: "Quiet color and clean type.", background: "gradient" },
54
- neon: { label: "Neon", description: "Glowing color in the dark.", background: "gradient" },
55
- "pop-art": { label: "Pop art", description: "Loud patterns and graphic color.", background: "pattern" },
56
- "lo-fi": { label: "Lo-fi", description: "Cozy illustrated rooms, rainy windows and soft grain.", background: "image" },
57
- grunge: { label: "Grunge", description: "Torn paper, concrete and raw black-and-white grit.", background: "image" },
58
- cosmic: { label: "Cosmic", description: "Nebulae, planets and deep-space light.", background: "image" },
59
- cyber: { label: "Cyber", description: "Cyberpunk streets, screens and digital glitches.", background: "image" },
60
- dreamy: { label: "Dreamy", description: "Clouds, soft skies and hazy golden light.", background: "image" }
61
- };
62
- var categoryUsesImages = (id2) => CATEGORIES[id2].background === "image";
63
39
 
64
40
  // ../../node_modules/.pnpm/zod@4.6.5/node_modules/zod/v4/classic/external.js
65
41
  var external_exports = {};
@@ -1352,8 +1328,8 @@ function base64urlToUint8Array(base64url3) {
1352
1328
  function uint8ArrayToBase64url(bytes) {
1353
1329
  return uint8ArrayToBase64(bytes).replace(/\+/g, "-").replace(/\//g, "_").replace(/=/g, "");
1354
1330
  }
1355
- function hexToUint8Array(hex5) {
1356
- const cleanHex = hex5.replace(/^0x/, "");
1331
+ function hexToUint8Array(hex6) {
1332
+ const cleanHex = hex6.replace(/^0x/, "");
1357
1333
  if (cleanHex.length % 2 !== 0) {
1358
1334
  throw new Error("Invalid hex string length");
1359
1335
  }
@@ -1771,18 +1747,18 @@ function treeifyError(error62, mapper = (issue2) => issue2.message) {
1771
1747
  }
1772
1748
  function toDotPath(_path) {
1773
1749
  const segs = [];
1774
- const path4 = _path.map((seg) => typeof seg === "object" ? seg.key : seg);
1775
- for (const seg of path4) {
1776
- if (typeof seg === "number")
1777
- segs.push(`[${seg}]`);
1778
- else if (typeof seg === "symbol")
1779
- segs.push(`[${JSON.stringify(String(seg))}]`);
1780
- else if (/[^\w$]/.test(seg))
1781
- segs.push(`[${JSON.stringify(seg)}]`);
1750
+ const path4 = _path.map((seg2) => typeof seg2 === "object" ? seg2.key : seg2);
1751
+ for (const seg2 of path4) {
1752
+ if (typeof seg2 === "number")
1753
+ segs.push(`[${seg2}]`);
1754
+ else if (typeof seg2 === "symbol")
1755
+ segs.push(`[${JSON.stringify(String(seg2))}]`);
1756
+ else if (/[^\w$]/.test(seg2))
1757
+ segs.push(`[${JSON.stringify(seg2)}]`);
1782
1758
  else {
1783
1759
  if (segs.length)
1784
1760
  segs.push(".");
1785
- segs.push(seg);
1761
+ segs.push(seg2);
1786
1762
  }
1787
1763
  }
1788
1764
  return segs.join("");
@@ -3640,15 +3616,15 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3640
3616
  const syms = normalized.symbolKeys;
3641
3617
  const doc = new Doc(["payload", "ctx"], { shape, inst, memo: memo2, syms });
3642
3618
  const parseStr = (k) => `shape[${k}]._zod.run({ value: input[${k}], issues: [] }, ctx)`;
3643
- const prefixStr = (id2, k) => `
3644
- let ${id2}_ab = false;
3645
- for (let i = 0; i < ${id2}.issues.length; i++) {
3646
- const iss = ${id2}.issues[i];
3619
+ const prefixStr = (id3, k) => `
3620
+ let ${id3}_ab = false;
3621
+ for (let i = 0; i < ${id3}.issues.length; i++) {
3622
+ const iss = ${id3}.issues[i];
3647
3623
  iss.path = iss.path ? [${k}, ...iss.path] : [${k}];
3648
3624
  payload.issues.push(iss);
3649
- if (iss.continue !== true) ${id2}_ab = true;
3625
+ if (iss.continue !== true) ${id3}_ab = true;
3650
3626
  }
3651
- if (${id2}_ab && ctx && ctx.abortEarly) {
3627
+ if (${id3}_ab && ctx && ctx.abortEarly) {
3652
3628
  payload.value = newResult;
3653
3629
  return payload;
3654
3630
  }`;
@@ -3662,34 +3638,34 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3662
3638
  for (const key of normalized.allKeys) {
3663
3639
  if (key === "__proto__")
3664
3640
  continue;
3665
- const id2 = ids[key];
3641
+ const id3 = ids[key];
3666
3642
  const k = typeof key === "symbol" ? `syms[${syms.indexOf(key)}]` : esc(key);
3667
3643
  const isPresent = `${k} in input`;
3668
3644
  const schema = shape[key];
3669
3645
  const optin = schema?._zod?.optin;
3670
3646
  const isOptionalIn = optin !== void 0;
3671
3647
  const isOptionalOut = schema?._zod?.optout === "optional";
3672
- doc.write(`const ${id2} = ${parseStr(k)};`);
3648
+ doc.write(`const ${id3} = ${parseStr(k)};`);
3673
3649
  if (isOptionalIn && isOptionalOut) {
3674
- const assign = optin === "optional" ? `${id2}_present` : `${id2}.value !== undefined || ${id2}_present`;
3650
+ const assign = optin === "optional" ? `${id3}_present` : `${id3}.value !== undefined || ${id3}_present`;
3675
3651
  doc.write(`
3676
- const ${id2}_present = ${isPresent};
3677
- if (!${id2}.issues.length || ${id2}_present) {
3678
- if (${id2}.issues.length) {${prefixStr(id2, k)}
3652
+ const ${id3}_present = ${isPresent};
3653
+ if (!${id3}.issues.length || ${id3}_present) {
3654
+ if (${id3}.issues.length) {${prefixStr(id3, k)}
3679
3655
  }
3680
3656
 
3681
3657
  if (${assign}) {
3682
- newResult[${k}] = ${id2}.value;
3658
+ newResult[${k}] = ${id3}.value;
3683
3659
  }
3684
3660
  }
3685
3661
 
3686
3662
  `);
3687
3663
  } else if (!isOptionalIn) {
3688
3664
  doc.write(`
3689
- const ${id2}_present = ${isPresent};
3690
- if (${id2}.issues.length) {${prefixStr(id2, k)}
3665
+ const ${id3}_present = ${isPresent};
3666
+ if (${id3}.issues.length) {${prefixStr(id3, k)}
3691
3667
  }
3692
- if (!${id2}_present && !${id2}.issues.length) {
3668
+ if (!${id3}_present && !${id3}.issues.length) {
3693
3669
  payload.issues.push({
3694
3670
  code: "invalid_type",
3695
3671
  expected: "nonoptional",
@@ -3702,22 +3678,22 @@ var $ZodObjectJIT = /* @__PURE__ */ $constructor("$ZodObjectJIT", (inst, def) =>
3702
3678
  }
3703
3679
  }
3704
3680
 
3705
- if (${id2}_present) {
3706
- newResult[${k}] = ${id2}.value;
3681
+ if (${id3}_present) {
3682
+ newResult[${k}] = ${id3}.value;
3707
3683
  }
3708
3684
 
3709
3685
  `);
3710
3686
  } else {
3711
3687
  doc.write(`
3712
- if (${id2}.issues.length) {${prefixStr(id2, k)}
3688
+ if (${id3}.issues.length) {${prefixStr(id3, k)}
3713
3689
  }
3714
3690
  `);
3715
3691
  if (optin === "defaulted") {
3716
- doc.write(`newResult[${k}] = ${id2}.value;`);
3692
+ doc.write(`newResult[${k}] = ${id3}.value;`);
3717
3693
  } else {
3718
3694
  doc.write(`
3719
- if (${id2}.value !== undefined || ${isPresent}) {
3720
- newResult[${k}] = ${id2}.value;
3695
+ if (${id3}.value !== undefined || ${isPresent}) {
3696
+ newResult[${k}] = ${id3}.value;
3721
3697
  }
3722
3698
  `);
3723
3699
  }
@@ -15735,26 +15711,26 @@ function extractDefs(ctx, schema) {
15735
15711
  return;
15736
15712
  const idToSchema = /* @__PURE__ */ new Map();
15737
15713
  for (const entry of ctx.seen.entries()) {
15738
- const id2 = ctx.metadataRegistry.get(entry[0])?.id;
15739
- if (id2) {
15740
- const existing = idToSchema.get(id2);
15714
+ const id3 = ctx.metadataRegistry.get(entry[0])?.id;
15715
+ if (id3) {
15716
+ const existing = idToSchema.get(id3);
15741
15717
  if (existing && existing !== entry[0]) {
15742
- throw new Error(`Duplicate schema id "${id2}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
15718
+ throw new Error(`Duplicate schema id "${id3}" detected during JSON Schema conversion. Two different schemas cannot share the same id when converted together.`);
15743
15719
  }
15744
- idToSchema.set(id2, entry[0]);
15720
+ idToSchema.set(id3, entry[0]);
15745
15721
  }
15746
15722
  }
15747
15723
  const makeURI = (entry) => {
15748
15724
  const defsSegment = ctx.target === "draft-2020-12" ? "$defs" : "definitions";
15749
15725
  if (ctx.external) {
15750
15726
  const externalId = ctx.external.registry.get(entry[0])?.id;
15751
- const uriGenerator = ctx.external.uri ?? ((id3) => id3);
15727
+ const uriGenerator = ctx.external.uri ?? ((id4) => id4);
15752
15728
  if (externalId) {
15753
15729
  return { ref: uriGenerator(externalId) };
15754
15730
  }
15755
- const id2 = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
15756
- entry[1].defId = id2;
15757
- return { defId: id2, ref: `${uriGenerator("__shared")}#/${defsSegment}/${encodeJSONPointerSegment(id2)}` };
15731
+ const id3 = entry[1].defId ?? entry[1].schema.id ?? `schema${ctx.counter++}`;
15732
+ entry[1].defId = id3;
15733
+ return { defId: id3, ref: `${uriGenerator("__shared")}#/${defsSegment}/${encodeJSONPointerSegment(id3)}` };
15758
15734
  }
15759
15735
  const uriPrefix = `#`;
15760
15736
  const defUriPrefix = `${uriPrefix}/${defsSegment}/`;
@@ -15802,8 +15778,8 @@ Set the \`cycles\` parameter to \`"ref"\` to resolve cyclical schemas with defs.
15802
15778
  continue;
15803
15779
  }
15804
15780
  }
15805
- const id2 = ctx.metadataRegistry.get(entry[0])?.id;
15806
- if (id2) {
15781
+ const id3 = ctx.metadataRegistry.get(entry[0])?.id;
15782
+ if (id3) {
15807
15783
  extractToDef(entry);
15808
15784
  continue;
15809
15785
  }
@@ -16036,10 +16012,10 @@ function finalize(ctx, schema) {
16036
16012
  } else {
16037
16013
  }
16038
16014
  if (ctx.external?.uri) {
16039
- const id2 = ctx.external.registry.get(schema)?.id;
16040
- if (!id2)
16015
+ const id3 = ctx.external.registry.get(schema)?.id;
16016
+ if (!id3)
16041
16017
  throw new Error("Schema is missing an `id` property");
16042
- result.$id = ctx.external.uri(id2);
16018
+ result.$id = ctx.external.uri(id3);
16043
16019
  }
16044
16020
  assignProps(result, root.defId ? root.schema : root.def ?? root.schema);
16045
16021
  const rootMetaId = ctx.metadataRegistry.get(schema)?.id;
@@ -16293,9 +16269,9 @@ var numberProcessor = (schema, ctx, _json, params) => {
16293
16269
  json2.type = isInt ? "integer" : "number";
16294
16270
  const exMin = typeof exclusiveMinimum === "number" && exclusiveMinimum >= (minimum ?? Number.NEGATIVE_INFINITY);
16295
16271
  const exMax = typeof exclusiveMaximum === "number" && exclusiveMaximum <= (maximum ?? Number.POSITIVE_INFINITY);
16296
- const legacy = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
16272
+ const legacy2 = ctx.target === "draft-04" || ctx.target === "openapi-3.0";
16297
16273
  if (exMin) {
16298
- if (legacy) {
16274
+ if (legacy2) {
16299
16275
  json2.minimum = exclusiveMinimum;
16300
16276
  json2.exclusiveMinimum = true;
16301
16277
  } else {
@@ -16305,7 +16281,7 @@ var numberProcessor = (schema, ctx, _json, params) => {
16305
16281
  json2.minimum = minimum;
16306
16282
  }
16307
16283
  if (exMax) {
16308
- if (legacy) {
16284
+ if (legacy2) {
16309
16285
  json2.maximum = exclusiveMaximum;
16310
16286
  json2.exclusiveMaximum = true;
16311
16287
  } else {
@@ -16645,7 +16621,7 @@ function stringifyKeyNames(bySchema, json2, visited) {
16645
16621
  const values = json2.enum ?? (json2.const !== void 0 ? [json2.const] : void 0);
16646
16622
  if (!numericType && !values?.some((v) => typeof v === "number"))
16647
16623
  return json2;
16648
- const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id: id2, ...rest } = json2;
16624
+ const { minimum, maximum, exclusiveMinimum, exclusiveMaximum, multipleOf, format, id: id3, ...rest } = json2;
16649
16625
  if (rest.enum)
16650
16626
  rest.enum = rest.enum.map((v) => typeof v === "number" ? String(v) : v);
16651
16627
  else if (typeof rest.const === "number")
@@ -19729,6 +19705,118 @@ function date4(params) {
19729
19705
  return _coercedDate(ZodDate, params);
19730
19706
  }
19731
19707
 
19708
+ // ../composition/src/song.ts
19709
+ var SPECTRUM_BANDS = 32;
19710
+ var SECTION_TYPES = ["intro", "verse", "chorus", "drop", "bridge", "outro"];
19711
+ var FRAME_BYTES = 5 + SPECTRUM_BANDS;
19712
+
19713
+ // ../composition/src/clips.ts
19714
+ var CUT_DENSITIES = ["one", "fewer", "even", "more"];
19715
+ var MAX_CLIP_SOURCES = 50;
19716
+ var TRANSITIONS = {
19717
+ slam: { name: "Bass slam", kind: "hit" },
19718
+ zoom: { name: "Zoom punch", kind: "blend" },
19719
+ flash: { name: "Flash", kind: "hit" },
19720
+ glitch: { name: "Glitch", kind: "hit" },
19721
+ whip: { name: "Whip", kind: "blend" },
19722
+ stack: { name: "Stack", kind: "blend" },
19723
+ spin: { name: "Spin", kind: "hit" },
19724
+ shutter: { name: "Shutter", kind: "blend" },
19725
+ ink: { name: "Ink", kind: "blend" },
19726
+ dissolve: { name: "Beat dissolve", kind: "blend" },
19727
+ wipe: { name: "Word wipe", kind: "blend" },
19728
+ stretch: { name: "Stretch", kind: "blend" },
19729
+ warp: { name: "Lens warp", kind: "blend" },
19730
+ flare: { name: "Flare", kind: "blend" },
19731
+ leak: { name: "Light leak", kind: "blend" },
19732
+ impact: { name: "Impact frame", kind: "hit" },
19733
+ strobe: { name: "Strobe", kind: "hit" },
19734
+ slip: { name: "Film slip", kind: "blend" },
19735
+ slice: { name: "Slice", kind: "blend" },
19736
+ grid: { name: "Grid", kind: "blend" }
19737
+ };
19738
+ var TRANSITION_IDS = Object.keys(TRANSITIONS);
19739
+ var CLIP_ENTRANCES = ["cut", ...TRANSITION_IDS];
19740
+ var TRANSITION_STYLES = {
19741
+ auto: null,
19742
+ impact: ["slam", "zoom", "flash", "impact", "strobe", "glitch", "spin"],
19743
+ flash: ["flash", "flare", "leak", "strobe", "shutter", "impact"],
19744
+ smooth: ["dissolve", "ink", "whip", "stack", "stretch", "warp", "leak"],
19745
+ none: []
19746
+ };
19747
+ var TRANSITION_STYLE_IDS = Object.keys(TRANSITION_STYLES);
19748
+ var JOIN_SECONDS = { min: 0.07, max: 1, default: 0.6 };
19749
+ var TRANSITION_DIRECTIONS = ["left", "right", "up", "down"];
19750
+ var GRADES = {
19751
+ clean: { name: "Clean", filter: "none" },
19752
+ vivid: { name: "Vivid", filter: "saturate(1.55) contrast(1.08)" },
19753
+ punch: { name: "Punch", filter: "contrast(1.35) saturate(1.2)" },
19754
+ warm: { name: "Warm", filter: "sepia(.28) saturate(1.25) brightness(1.03)" },
19755
+ cool: { name: "Cool", filter: "hue-rotate(-14deg) saturate(.92) brightness(1.04)" },
19756
+ golden: { name: "Golden hour", filter: "sepia(.45) saturate(1.4) brightness(1.06)" },
19757
+ blue: { name: "Blue hour", filter: "hue-rotate(-28deg) saturate(1.1) brightness(.92)" },
19758
+ tangerine: { name: "Tangerine", filter: "sepia(.35) hue-rotate(-12deg) saturate(1.6)" },
19759
+ teal: { name: "Teal & orange", filter: "contrast(1.12) saturate(1.35) hue-rotate(-6deg)" },
19760
+ faded: { name: "Faded film", filter: "contrast(.82) brightness(1.1) saturate(.75)" },
19761
+ matte: { name: "Matte", filter: "contrast(.78) brightness(1.06)" },
19762
+ silver: { name: "Silver", filter: "grayscale(.7) contrast(1.1)" },
19763
+ deep: { name: "Deep blacks", filter: "contrast(1.45) brightness(.9)" },
19764
+ glow: { name: "Glow", filter: "brightness(1.15) contrast(.92) saturate(1.1)" },
19765
+ vhs: { name: "VHS", filter: "saturate(1.3) contrast(.9) hue-rotate(6deg)" },
19766
+ super8: { name: "Super 8", filter: "sepia(.4) contrast(1.1) saturate(1.15)" },
19767
+ halation: { name: "Halation", filter: "brightness(1.1) saturate(1.25) contrast(1.05)" },
19768
+ bleach: { name: "Bleach bypass", filter: "saturate(.45) contrast(1.4)" },
19769
+ dream: { name: "Dream", filter: "brightness(1.15) saturate(1.1) contrast(.9)" },
19770
+ duotone: { name: "Duotone", filter: "grayscale(1) sepia(1) hue-rotate(250deg) saturate(3)" },
19771
+ cross: { name: "Cross process", filter: "hue-rotate(20deg) saturate(1.5) contrast(1.15)" },
19772
+ noir: { name: "Noir", filter: "grayscale(1) contrast(1.5)" },
19773
+ poster: { name: "Poster", filter: "contrast(2) saturate(1.6)" },
19774
+ night: { name: "Night vision", filter: "grayscale(1) sepia(1) hue-rotate(70deg) saturate(4) brightness(1.1)" },
19775
+ infrared: { name: "Infrared", filter: "invert(.85) hue-rotate(180deg) saturate(1.6)" },
19776
+ cctv: { name: "CCTV", filter: "grayscale(1) contrast(1.3) brightness(1.1)" },
19777
+ thermal: { name: "Thermal", filter: "grayscale(1) invert(1) sepia(1) hue-rotate(300deg) saturate(6)" }
19778
+ };
19779
+ var GRADE_IDS = Object.keys(GRADES);
19780
+ var GRADE_AMOUNT = { min: 0, max: 1, default: 1, step: 0.05 };
19781
+ var CLIP_SHAPES = ["both", "tall", "wide"];
19782
+ var CLIP_FILLS = ["cover", "blur", "bars"];
19783
+ var CLIP_SPEEDS = [0.5, 0.75, 1, 1.5, 2];
19784
+ var ClipMoodIdSchema = external_exports.string().regex(/^[a-z0-9][a-z0-9-]{1,39}$/, "A mood id (lowercase letters, digits and dashes)");
19785
+ var ClipFolderIdSchema = external_exports.string().regex(/^folder_[0-9a-f-]{36}$/, "A clip folder id (folder_\u2026)");
19786
+ var ClipIdSchema = external_exports.string().regex(/^clip_[0-9a-f-]{36}$/, "A clip id (clip_\u2026)");
19787
+ var ClipLookIdSchema = external_exports.string().regex(/^look_[A-Za-z0-9_-]{1,100}$/, "A Look id (look_\u2026)");
19788
+ var ClipSourcesSchema = external_exports.object({
19789
+ moods: external_exports.array(ClipMoodIdSchema).max(MAX_CLIP_SOURCES).default([]),
19790
+ folders: external_exports.array(ClipFolderIdSchema).max(MAX_CLIP_SOURCES).default([]),
19791
+ looks: external_exports.array(ClipLookIdSchema).max(MAX_CLIP_SOURCES).optional()
19792
+ }).strict().refine((s) => s.moods.length + s.folders.length + (s.looks?.length ?? 0) >= 1, { message: "Name at least one mood, folder or Look" }).refine((s) => s.moods.length + s.folders.length + (s.looks?.length ?? 0) <= MAX_CLIP_SOURCES, { message: `At most ${MAX_CLIP_SOURCES} moods, folders and Looks together` });
19793
+ var TransitionsSchema = external_exports.object({
19794
+ style: external_exports.enum(TRANSITION_STYLE_IDS).default("auto"),
19795
+ amount: external_exports.number().min(0).max(1).default(0.5),
19796
+ feel: external_exports.number().min(0).max(1).default(0.5),
19797
+ off: external_exports.array(external_exports.enum(TRANSITION_IDS)).max(TRANSITION_IDS.length).default([]),
19798
+ seed: external_exports.number().int().min(0).max(2 ** 31 - 1).default(1)
19799
+ }).strict();
19800
+ var EditClipSchema = external_exports.object({
19801
+ clip_id: ClipIdSchema,
19802
+ /** Where it starts in the video (s). */
19803
+ at: external_exports.number().min(0).max(3600),
19804
+ /** Where in the clip it starts playing (s). */
19805
+ in: external_exports.number().min(0).max(600),
19806
+ /** How long it shows (s): until the next clip. */
19807
+ duration: external_exports.number().min(0.1).max(3600),
19808
+ transition: external_exports.enum(CLIP_ENTRANCES),
19809
+ /** Set on the timeline for this join: the transition's length (s), where it travels, how hard it hits (0–1, 0.5 = as designed). */
19810
+ transition_seconds: external_exports.number().min(JOIN_SECONDS.min).max(JOIN_SECONDS.max).optional(),
19811
+ direction: external_exports.enum(TRANSITION_DIRECTIONS).optional(),
19812
+ intensity: external_exports.number().min(0).max(1).optional()
19813
+ }).strict();
19814
+ var EditSchema = external_exports.object({
19815
+ seed: external_exports.number().int().min(0).max(2 ** 31 - 1),
19816
+ density: external_exports.enum(CUT_DENSITIES),
19817
+ clips: external_exports.array(EditClipSchema).min(1).max(6e3)
19818
+ }).strict();
19819
+
19732
19820
  // ../composition/src/fonts.ts
19733
19821
  var FONTS = {
19734
19822
  inter: { family: "Inter", kind: "sans", weights: [300, 500, 700, 800] },
@@ -19779,12 +19867,30 @@ var FONTS = {
19779
19867
  "pirata-one": { family: "Pirata One", kind: "display", weights: [400] }
19780
19868
  };
19781
19869
  var FONT_IDS = Object.keys(FONTS);
19782
- var LYRIC_FONT_IDS = FONT_IDS.filter((id2) => ["sans", "condensed", "serif", "mono"].includes(FONTS[id2].kind) && id2 !== "abril-fatface");
19870
+ var LYRIC_FONT_IDS = FONT_IDS.filter((id3) => ["sans", "condensed", "serif", "mono"].includes(FONTS[id3].kind) && id3 !== "abril-fatface");
19783
19871
 
19784
- // ../composition/src/song.ts
19785
- var SPECTRUM_BANDS = 32;
19786
- var SECTION_TYPES = ["intro", "verse", "chorus", "drop", "bridge", "outro"];
19787
- var FRAME_BYTES = 5 + SPECTRUM_BANDS;
19872
+ // ../composition/src/effects.ts
19873
+ var EFFECTS = {
19874
+ "light-leak": { name: "Light leak", group: "light" },
19875
+ "god-rays": { name: "God rays", group: "light" },
19876
+ glow: { name: "Glow", group: "light" },
19877
+ vignette: { name: "Vignette", group: "light" },
19878
+ "film-burn": { name: "Film burn", group: "film" },
19879
+ "film-grain": { name: "Film grain", group: "film" },
19880
+ "old-footage": { name: "Old footage", group: "film" },
19881
+ shake: { name: "Shake", group: "camera" },
19882
+ mirror: { name: "Mirror", group: "camera" },
19883
+ blur: { name: "Blur in/out", group: "camera" },
19884
+ vhs: { name: "VHS", group: "digital" },
19885
+ glitch: { name: "Glitch", group: "digital" },
19886
+ "rgb-split": { name: "RGB split", group: "digital" }
19887
+ };
19888
+ var EFFECT_IDS = Object.keys(EFFECTS);
19889
+ var MAX_EFFECTS = 3;
19890
+ var DEFAULT_EFFECT_AMOUNT = 0.6;
19891
+ var EffectSchema = external_exports.object({ id: external_exports.enum(EFFECT_IDS), amount: external_exports.number().min(0).max(1).default(DEFAULT_EFFECT_AMOUNT) }).strict();
19892
+ var EffectsSchema = external_exports.array(EffectSchema).max(MAX_EFFECTS).refine((list) => new Set(list.map((e) => e.id)).size === list.length, { message: "Each effect once" });
19893
+ var TAU = Math.PI * 2;
19788
19894
 
19789
19895
  // ../composition/src/visualizers/engine-ids.ts
19790
19896
  var VIZZ_ENGINE_IDS = [
@@ -19952,6 +20058,11 @@ var SHORT_SPECS = {
19952
20058
  ink: "muted",
19953
20059
  motion: { shadow: S(0, 2, 8, 0.5) }
19954
20060
  },
20061
+ // The phrase packed into a solid block of heavy caps as it is sung: two words a row, each stretched or squeezed so the
20062
+ // pair fills the block's width; rows of different heights stack down with no gaps.
20063
+ slab: { filter: "bold", mode: "word", effect: "slab", face: F("archivo-black", 400, { upper: true }), size: 0.2, fit: 0.82, ink: "text", motion: { shadow: S(0, 2, 8, 0.35) } },
20064
+ // One heavy word at a time, every word stretched or squeezed to the same width: short words go wide, long ones tall.
20065
+ stamp: { filter: "bold", mode: "word", effect: "stamp", face: F("archivo-black", 400, { upper: true }), size: 0.22, fit: 0.78, ink: "text", motion: { shadow: S(0, 2, 8, 0.35) } },
19955
20066
  // Layered
19956
20067
  whisper: {
19957
20068
  filter: "layered",
@@ -20172,7 +20283,7 @@ var L = (lyrics) => ({
20172
20283
  var FX = (fx = {}) => ({ shake: 0, zoom: 0, flash: 0, rgb: 0, glitch: 0, ...fx });
20173
20284
  var SP = (style = "none", spectrum = {}) => ({ style, placement: "bottom", size: 1, opacity: 0.8, ...spectrum });
20174
20285
  var FIN = (finish = {}) => ({ grain: 0, vignette: 0.3, leak: 0, dust: 0, droplets: 0, scanlines: false, letterbox: false, ...finish });
20175
- var short = (id2, label, description, fx) => ({
20286
+ var short = (id3, label, description, fx) => ({
20176
20287
  label,
20177
20288
  description,
20178
20289
  lyrics: L({ layout: "short", reveal: "pop", exit: "fade", effect: "none" }),
@@ -20180,8 +20291,8 @@ var short = (id2, label, description, fx) => ({
20180
20291
  spectrum: SP(),
20181
20292
  finish: FIN({ vignette: 0.25 }),
20182
20293
  player: "none",
20183
- fonts: [SHORT_SPECS[id2].face.font],
20184
- short: SHORT_SPECS[id2].filter
20294
+ fonts: [SHORT_SPECS[id3].face.font],
20295
+ short: SHORT_SPECS[id3].filter
20185
20296
  });
20186
20297
  var CONDENSED = ["bebas-neue", "anton", "oswald", "barlow-condensed", "big-shoulders-display", "archivo-black", "league-spartan"];
20187
20298
  var LYRIC_STYLES = {
@@ -20493,7 +20604,7 @@ var LYRIC_STYLES = {
20493
20604
  },
20494
20605
  behind: {
20495
20606
  label: "Behind",
20496
- description: "Giant words stacked behind the subject of your photo, the subject standing in front of them.",
20607
+ description: "Giant words stacked behind the singer or subject of your clips, who stands in front of them.",
20497
20608
  lyrics: L({ layout: "stack", reveal: "rise", exit: "fade", emphasis: "accent", size: 1.3, position: "upper", place: "behind" }),
20498
20609
  fx: FX({ zoom: 0.15 }),
20499
20610
  spectrum: SP(),
@@ -20524,6 +20635,8 @@ var LYRIC_STYLES = {
20524
20635
  circuit: short("circuit", "Circuit", "Neon condensed caps that flicker on like a sign.", FX({ rgb: 0.15 })),
20525
20636
  spark: short("spark", "Spark", "The line in bold caps; the sung word glows.", FX()),
20526
20637
  loose: short("loose", "Loose", "The line spread across loose rows, plain and lowercase.", FX()),
20638
+ slab: short("slab", "Slab", "The line packed into a solid block of heavy caps, each word stretched to fill its row.", FX({ zoom: 0.15 })),
20639
+ stamp: short("stamp", "Stamp", "One heavy word at a time, every word stretched to the same width.", FX({ zoom: 0.15 })),
20527
20640
  whisper: short("whisper", "Whisper", "Neighbouring words layered: one huge in cyan, the other whispered on top in italics.", FX()),
20528
20641
  tiles: short("tiles", "Tiles", "A phrase stacked four times down the frame, folding into a ladder; then wide single words.", FX()),
20529
20642
  nested: short("nested", "Nested", "Slanted heavy caps; red key words rise in with scattered copies of themselves.", FX()),
@@ -20541,10 +20654,10 @@ var LYRIC_STYLES = {
20541
20654
  sway: short("sway", "Sway", "The line in bold caps; the sung word lights up.", FX())
20542
20655
  };
20543
20656
  var LYRIC_STYLE_IDS = Object.keys(LYRIC_STYLES);
20544
- var SHORT_FAMILY = LYRIC_STYLE_IDS.filter((id2) => LYRIC_STYLES[id2].short);
20545
- function styleParts(id2) {
20546
- const s = LYRIC_STYLES[id2];
20547
- return { style: id2, lyrics: { ...s.lyrics }, fx: { ...s.fx }, spectrum: { ...s.spectrum }, finish: { ...s.finish }, player: s.player, hero: s.hero ?? "none" };
20657
+ var SHORT_FAMILY = LYRIC_STYLE_IDS.filter((id3) => LYRIC_STYLES[id3].short);
20658
+ function styleParts(id3) {
20659
+ const s = LYRIC_STYLES[id3];
20660
+ return { style: id3, lyrics: { ...s.lyrics }, fx: { ...s.fx }, spectrum: { ...s.spectrum }, finish: { ...s.finish }, player: s.player, hero: s.hero ?? "none" };
20548
20661
  }
20549
20662
 
20550
20663
  // ../composition/src/look.ts
@@ -20554,6 +20667,7 @@ var AspectRatioSchema = external_exports.enum(ASPECT_RATIOS);
20554
20667
  var hex3 = external_exports.string().regex(/^#[0-9a-fA-F]{6}$/, "6-digit hex color");
20555
20668
  var FontIdSchema = external_exports.enum(FONT_IDS);
20556
20669
  var HEADLINES = ["none", "new-release", "out-now", "coming-soon", "listen-now"];
20670
+ var TITLE_CARDS = ["ends", "breaks", "label"];
20557
20671
  var LayoutRecipeSchema = external_exports.object({
20558
20672
  arrangement: external_exports.enum(["stack", "split", "hero"]),
20559
20673
  align: external_exports.enum(["center", "start"]),
@@ -20635,6 +20749,23 @@ var BackgroundSchema = external_exports.discriminatedUnion("kind", [
20635
20749
  external_exports.object({
20636
20750
  kind: external_exports.literal("visualizer"),
20637
20751
  ground: hex3
20752
+ }).strict(),
20753
+ // Clips cut on the beat (clips.ts): short clips from library moods and the person's folders; each video has its own Edit
20754
+ // (which clip plays when), so a Look with clips makes a new cut for every song. The Look keeps the recipe: where the clips
20755
+ // come from, how often they cut, how they meet, their grade (and its strength, 1 when left out), the effects over the picture and how
20756
+ // a clip of the other shape fills the frame.
20757
+ external_exports.object({
20758
+ kind: external_exports.literal("clips"),
20759
+ sources: ClipSourcesSchema,
20760
+ density: external_exports.enum(CUT_DENSITIES),
20761
+ transitions: TransitionsSchema,
20762
+ grade: external_exports.enum(GRADE_IDS),
20763
+ grade_amount: external_exports.number().min(0).max(1).optional(),
20764
+ effects: EffectsSchema.optional(),
20765
+ shape: external_exports.enum(CLIP_SHAPES),
20766
+ fill: external_exports.enum(CLIP_FILLS),
20767
+ speed: external_exports.union(CLIP_SPEEDS.map((v) => external_exports.literal(v))),
20768
+ dim: external_exports.number().min(0).max(0.8)
20638
20769
  }).strict()
20639
20770
  ]);
20640
20771
  var LookSpecSchema = external_exports.object({
@@ -20693,8 +20824,12 @@ var DisplaySchema = external_exports.object({
20693
20824
  cover: external_exports.boolean().default(true),
20694
20825
  lyrics: external_exports.boolean().default(true),
20695
20826
  badges: external_exports.boolean().default(true),
20827
+ censor: external_exports.boolean().optional(),
20828
+ // swear words show their vowels as * (the song is untouched); omitted: off
20696
20829
  headline: external_exports.enum(HEADLINES).optional(),
20697
20830
  // omitted: the Look's default
20831
+ title_card: external_exports.enum(TITLE_CARDS).optional(),
20832
+ // omitted: "ends" over clips, else "breaks" (TITLE_CARDS)
20698
20833
  cover_scale: scale("cover_scale", DISPLAY_SCALES.cover).optional(),
20699
20834
  // omitted: 1
20700
20835
  text_scale: scale("text_scale", DISPLAY_SCALES.text).optional(),
@@ -20768,7 +20903,7 @@ var OutroDesignSchema = external_exports.object({
20768
20903
  /** How the footage meets the card as it comes in: nothing more than its entrance, or a flash, a glitch or a film burn. */
20769
20904
  transition: external_exports.enum(OUTRO_TRANSITIONS)
20770
20905
  }).strict();
20771
- var OutroDisplaySchema = DisplaySchema.omit({ lyrics: true, headline: true });
20906
+ var OutroDisplaySchema = DisplaySchema.omit({ lyrics: true, headline: true, title_card: true });
20772
20907
 
20773
20908
  // ../composition/src/visualizers/choice-schema.ts
20774
20909
  var VisualKeySchema = external_exports.string().regex(/^[A-Za-z0-9-]+\/[a-z0-9-]+$/, 'A visual key from GET /v1/options (visualizers), like "liquid/amber-aurora"');
@@ -20779,9 +20914,78 @@ var VisualChoiceSchema = external_exports.object({
20779
20914
  sections: external_exports.partialRecord(external_exports.enum(SECTION_TYPES), VisualKeySchema).optional()
20780
20915
  }).strict();
20781
20916
 
20917
+ // ../composition/src/background-motion.ts
20918
+ var DIRECTIONS = {
20919
+ center: [0, 0],
20920
+ up: [0, -1],
20921
+ down: [0, 1],
20922
+ left: [-1, 0],
20923
+ right: [1, 0],
20924
+ "up-left": [-Math.SQRT1_2, -Math.SQRT1_2],
20925
+ "up-right": [Math.SQRT1_2, -Math.SQRT1_2],
20926
+ "down-left": [-Math.SQRT1_2, Math.SQRT1_2],
20927
+ "down-right": [Math.SQRT1_2, Math.SQRT1_2]
20928
+ };
20929
+
20930
+ // ../composition/src/stock.ts
20931
+ var STOCK_PROVIDERS = {
20932
+ pexels: { name: "Pexels", url: "https://www.pexels.com", kinds: ["photo", "video"] },
20933
+ // Pixabay's API serves photos at most 1280 px: too small for a background, so only its videos are offered.
20934
+ pixabay: { name: "Pixabay", url: "https://pixabay.com", kinds: ["video"] }
20935
+ };
20936
+ var STOCK_PROVIDER_IDS = Object.keys(STOCK_PROVIDERS);
20937
+ var STOCK_ITEM_ID_PATTERN = new RegExp(`^(?:(${STOCK_PROVIDER_IDS.join("|")}):)?\\d{1,20}$`);
20938
+
20939
+ // ../composition/src/clips-editor.ts
20940
+ var VISUAL_ENERGIES = [{ value: "all", label: "All" }, { value: "calm", label: "Calm" }, { value: "medium", label: "Medium" }, { value: "bold", label: "Bold" }];
20941
+ var CLIP_SORTS = [{ value: "best", label: "Best first" }, { value: "newest", label: "Newest" }, { value: "length", label: "Length" }];
20942
+ var CLIP_BROWSE_SHAPES = [{ value: "both", label: "Both" }, { value: "tall", label: "Tall" }, { value: "wide", label: "Wide" }];
20943
+
20944
+ // ../composition/src/canvas-frame.ts
20945
+ var CANVAS_SPEEDS = [0.25, ...CLIP_SPEEDS];
20946
+ var CANVAS_CROSSFADE = { min: 0.25, max: 2, default: 0.75, step: 0.05 };
20947
+ var CANVAS_CAMERAS = ["still", "push", "pull"];
20948
+ var CANVAS_FILLS = [...CLIP_FILLS, "colour"];
20949
+ var CANVAS_ROTATIONS = [0, 90, 180, 270];
20950
+ var CANVAS_ZOOM = { min: 1, max: 3 };
20951
+ var HEX_COLOUR = /^#[0-9a-fA-F]{6}$/;
20952
+ var DEFAULT_CANVAS_FRAME = { crossfade: CANVAS_CROSSFADE.default, camera: "still", fade: false, x: 0, y: 0, zoom: 1, rotate: 0, colour: null, steady: false };
20953
+
20954
+ // ../composition/src/canvas-settings.ts
20955
+ var CANVAS_SECONDS = { min: 3, max: 8, default: 8 };
20956
+ var CANVAS_VISUAL_KEY = /^[A-Za-z0-9-]+\/[a-z0-9-]+$/;
20957
+ var CanvasLookSchema = external_exports.object({
20958
+ loop: external_exports.enum(["drift", "rebound", "cuts"]).default("drift"),
20959
+ seconds: external_exports.number().min(CANVAS_SECONDS.min).max(CANVAS_SECONDS.max).default(CANVAS_SECONDS.default),
20960
+ cut: external_exports.enum(["hard", "smooth"]).default("hard"),
20961
+ crossfade: external_exports.number().min(CANVAS_CROSSFADE.min).max(CANVAS_CROSSFADE.max).default(CANVAS_CROSSFADE.default),
20962
+ camera: external_exports.enum(CANVAS_CAMERAS).default("still"),
20963
+ fade: external_exports.boolean().default(false),
20964
+ fill: external_exports.enum(CANVAS_FILLS).default("blur"),
20965
+ fill_colour: external_exports.string().regex(HEX_COLOUR, "A colour like #1a1a1a").nullable().default(null),
20966
+ speed: external_exports.number().refine((v) => CANVAS_SPEEDS.includes(v), { message: `speed is one of ${CANVAS_SPEEDS.join(", ")}` }).default(1),
20967
+ grade: external_exports.enum(GRADE_IDS).default("clean"),
20968
+ grade_amount: external_exports.number().min(GRADE_AMOUNT.min).max(GRADE_AMOUNT.max).default(GRADE_AMOUNT.default),
20969
+ effects: EffectsSchema.default([]),
20970
+ light: external_exports.string().regex(CANVAS_VISUAL_KEY, "A visual key from GET /v1/options (canvas.visuals)").nullable().default(null),
20971
+ atmosphere: external_exports.enum(OVERLAYS).default("none")
20972
+ }).strict().refine((v) => v.fill !== "colour" || v.fill_colour, { message: "A colour fill needs fill_colour", path: ["fill_colour"] });
20973
+
20782
20974
  // ../video-types/src/kit.ts
20783
20975
  var KIT_KINDS = ["outfit", "place", "prop"];
20784
- var KIT_ANGLES = ["three-quarter", "side", "low"];
20976
+ var KIT_ANGLES = ["wide", "three-quarter", "side", "reverse", "corner", "low", "high", "overhead", "detail", "framed"];
20977
+ var KIT_ANGLE_LINES = {
20978
+ wide: "The whole set, pulled far back",
20979
+ "three-quarter": "Round to one side, in depth",
20980
+ side: "Across it, in profile",
20981
+ reverse: "Turned round, facing the other way",
20982
+ corner: "From a far corner, on the diagonal",
20983
+ low: "Near the floor, looking up",
20984
+ high: "From up high, looking down",
20985
+ overhead: "Straight down from above",
20986
+ detail: "Close on one object or texture",
20987
+ framed: "Through a doorway or something near"
20988
+ };
20785
20989
  var KIT_HANDLE = /^[a-z0-9][a-z0-9-]{0,39}$/;
20786
20990
  var SHOT_SIZES = ["close", "medium", "wide"];
20787
20991
  var SHOT_ANGLES = ["front", "three-quarter", "side", "low", "high", "over-shoulder", "back"];
@@ -20925,47 +21129,30 @@ var CoverRedrawSchema = external_exports.object({ cover_id: external_exports.str
20925
21129
  // ../video-types/src/index.ts
20926
21130
  var MAX_VARIATIONS = 4;
20927
21131
  var variations = external_exports.number().int().min(1).max(MAX_VARIATIONS).default(1);
20928
- var BACKGROUND_TIERS = ["standard", "high", "ultra"];
20929
21132
  var MIN_TRIM_SECONDS = 8;
20930
21133
  var TrimSchema = external_exports.object({
20931
21134
  start_seconds: external_exports.number().min(0),
20932
21135
  end_seconds: external_exports.number().positive()
20933
21136
  }).strict().refine((v) => v.end_seconds > v.start_seconds, { message: "end_seconds must be greater than start_seconds" }).refine((v) => v.end_seconds - v.start_seconds >= MIN_TRIM_SECONDS - 1e-6, { message: `The trimmed section must be at least ${MIN_TRIM_SECONDS} seconds` });
20934
- var FREE_VIDEO_MAX_SECONDS = 60;
20935
- var FREE_VIDEO_RULE = `Your free video is one lyric video of your free song, up to ${FREE_VIDEO_MAX_SECONDS} seconds of it, with a Look from the library, in one format.`;
20936
- var BACKGROUND_SOURCE_IDS = ["ai-image", "ai-video", "stock-photo", "stock-video", "upload-photo", "upload-video", "designed", "visualizer"];
20937
- var MEDIA_BACKGROUND_SOURCES = ["ai-image", "ai-video", "stock-photo", "stock-video", "upload-photo", "upload-video"];
20938
- var BACKGROUND_SOURCES2 = {
20939
- "ai-image": { label: "AI image", description: "An image made for this Look, moving slowly across the song.", kind: "image", source: "generated" },
20940
- "ai-video": { label: "AI video loop", description: "An AI image brought to life as a seamless loop.", kind: "video", source: "generated" },
20941
- "stock-photo": { label: "Stock photo", description: "A stock photo, picked by the director or by you.", kind: "image", source: "stock" },
20942
- "stock-video": { label: "Stock video", description: "A stock clip made into a seamless loop.", kind: "video", source: "stock" },
20943
- "upload-photo": { label: "Your photo", description: "A photo you upload, moving slowly across the song.", kind: "image", source: "upload" },
20944
- "upload-video": { label: "Your video", description: "A clip you upload, made into a seamless loop.", kind: "video", source: "upload" },
20945
- designed: { label: "Designed", description: "A moving gradient or pattern the director designs for your song.", kind: null, source: null },
20946
- visualizer: { label: "Visualizer", description: "No picture: a visual that moves with your music fills the frame behind the words.", kind: null, source: null }
20947
- };
20948
- var MAX_BACKGROUND_SCENES = 4;
20949
- var SINGLE_SCENE_STYLES = ["behind", "screen"];
20950
- var StockIdSchema = external_exports.string().regex(/^\d{1,20}$/, "A stock photo or video id (digits)");
21137
+ var StockIdSchema = external_exports.string().regex(STOCK_ITEM_ID_PATTERN, "A stock photo or video id (from search_stock)");
20951
21138
  var KitItemIdSchema = external_exports.string().regex(/^kit_[0-9a-f-]{36}$/, "A kit piece id (kit_\u2026)");
20952
- var BACKGROUND_REFERENCES = ["none", "stock"];
20953
- var BackgroundRequestSchema = external_exports.object({
20954
- source: external_exports.enum(BACKGROUND_SOURCE_IDS).optional(),
20955
- quality: external_exports.enum(BACKGROUND_TIERS).default("high"),
20956
- /** The uploaded photo or video (POST /backgrounds) for the upload-photo and upload-video sources. */
20957
- upload_id: external_exports.string().min(1).max(120).optional(),
20958
- /** How many scenes an AI image background has (1 by default). */
20959
- scenes: external_exports.number().int().min(1).max(MAX_BACKGROUND_SCENES).optional(),
20960
- /** The stock photo or video (GET /stock) for the stock-photo and stock-video sources; omitted, the director searches and picks. */
20961
- stock_id: StockIdSchema.optional(),
20962
- /** "stock" grounds an AI image or AI video background in real stock photos (references only); "none" by default. */
20963
- references: external_exports.enum(BACKGROUND_REFERENCES).optional()
21139
+ var ClipsBackgroundRequestSchema = external_exports.object({
21140
+ kind: external_exports.literal("clips"),
21141
+ sources: ClipSourcesSchema,
21142
+ density: external_exports.enum(CUT_DENSITIES).default("even"),
21143
+ transitions: TransitionsSchema.default(() => TransitionsSchema.parse({})),
21144
+ grade: external_exports.enum(GRADE_IDS).default("clean"),
21145
+ grade_amount: external_exports.number().min(GRADE_AMOUNT.min).max(GRADE_AMOUNT.max).default(GRADE_AMOUNT.default),
21146
+ effects: EffectsSchema.default([]),
21147
+ shape: external_exports.enum(CLIP_SHAPES).default("both"),
21148
+ fill: external_exports.enum(CLIP_FILLS).default("blur"),
21149
+ speed: external_exports.number().refine((v) => CLIP_SPEEDS.includes(v), { message: `speed is one of ${CLIP_SPEEDS.join(", ")}` }).default(1)
21150
+ }).strict();
21151
+ var BackgroundChoiceSchema = external_exports.discriminatedUnion("kind", [ClipsBackgroundRequestSchema, external_exports.object({ kind: external_exports.literal("visualizer") }).strict()]);
21152
+ var EditRequestSchema = external_exports.object({
21153
+ seed: external_exports.number().int().min(0).max(2 ** 31 - 1).optional(),
21154
+ clips: external_exports.array(EditClipSchema).min(1).max(6e3).optional()
20964
21155
  }).strict();
20965
- var BACKGROUND_UPLOAD_LIMITS = {
20966
- image: { maxBytes: 25 * 1024 * 1024, minShortSide: 720, types: ["image/jpeg", "image/png", "image/webp"] },
20967
- video: { maxBytes: 300 * 1024 * 1024, minShortSide: 720, minSeconds: 4, maxSeconds: 180, types: ["video/mp4", "video/quicktime", "video/webm"] }
20968
- };
20969
21156
  var UPLOAD_CONTENT_TYPES = ["audio/mpeg", "audio/wav", "audio/mp4", "image/jpeg", "image/png", "image/webp", "video/mp4", "video/quicktime", "video/webm"];
20970
21157
  var UPLOAD_MAX_BYTES = 300 * 1024 * 1024;
20971
21158
  var UploadCreateSchema = external_exports.object({
@@ -20973,25 +21160,13 @@ var UploadCreateSchema = external_exports.object({
20973
21160
  content_type: external_exports.enum(UPLOAD_CONTENT_TYPES),
20974
21161
  size_bytes: external_exports.number().int().min(1).max(UPLOAD_MAX_BYTES)
20975
21162
  }).strict();
20976
- var isUploadSource = (source) => BACKGROUND_SOURCES2[source].source === "upload";
20977
- var backgroundSourcesFor = (category) => categoryUsesImages(category) ? [...MEDIA_BACKGROUND_SOURCES, "designed", "visualizer"] : ["designed", ...MEDIA_BACKGROUND_SOURCES, "visualizer"];
20978
- var backgroundSourceFor = (category, background) => background.source ?? backgroundSourcesFor(category)[0];
20979
- var LOOK_FEATURE_ARTIST_MODES = ["never", "always"];
20980
- var CANVAS_FEATURE_ARTIST_MODES = ["auto", "always", "never"];
20981
- var LookRequestSchema = external_exports.discriminatedUnion("mode", [
20982
- external_exports.object({
20983
- mode: external_exports.literal("new"),
20984
- category: external_exports.enum(CATEGORY_IDS),
20985
- background: BackgroundRequestSchema.default({ quality: "high" }),
20986
- visibility: external_exports.enum(["private", "public"]).default("private"),
20987
- direction: external_exports.string().trim().max(2e3).optional(),
20988
- feature_artist: external_exports.enum(LOOK_FEATURE_ARTIST_MODES).default("never"),
20989
- lyric_style: external_exports.enum(LYRIC_STYLE_IDS).optional(),
20990
- /** The visual the person picked (GET /v1/options visualizers); omitted: the director picks one per section. */
20991
- visual: VisualChoiceSchema.optional()
20992
- }).strict(),
20993
- 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(), visual: VisualChoiceSchema.optional() }).strict()
20994
- ]);
21163
+ var LookRequestSchema = external_exports.object({
21164
+ id: external_exports.string().min(1).max(120).optional(),
21165
+ lyric_style: external_exports.enum(LYRIC_STYLE_IDS).optional(),
21166
+ behind: external_exports.boolean().optional(),
21167
+ visual: VisualChoiceSchema.optional(),
21168
+ background: BackgroundChoiceSchema.optional()
21169
+ }).strict();
20995
21170
  var common = {
20996
21171
  song_id: external_exports.string().min(1).max(120),
20997
21172
  variations,
@@ -21002,79 +21177,151 @@ var common = {
21002
21177
  var LyricVideoRequestSchema = external_exports.object({
21003
21178
  type: external_exports.literal("lyric-video"),
21004
21179
  ...common,
21005
- look: LookRequestSchema,
21180
+ look: LookRequestSchema.default({}),
21006
21181
  aspect_ratios: external_exports.array(AspectRatioSchema).min(1).max(3).refine((v) => new Set(v).size === v.length, { message: "aspect_ratios must be unique" }).default(["9:16"]),
21007
21182
  display: DisplaySchema.default(DEFAULT_DISPLAY),
21008
- trim: TrimSchema.optional()
21183
+ trim: TrimSchema.optional(),
21184
+ /** A clips video's Edit: its seed, or its clips as previewed. */
21185
+ edit: EditRequestSchema.optional()
21009
21186
  }).strict().superRefine((value, ctx) => {
21010
- if (value.look.mode === "existing" && value.variations > 1) ctx.addIssue({ code: "custom", path: ["variations"], message: "variations is only available with a new Look" });
21011
- if (value.look.mode === "new" && value.look.background.source) {
21012
- const allowed = backgroundSourcesFor(value.look.category);
21013
- if (!allowed.includes(value.look.background.source)) ctx.addIssue({
21014
- code: "custom",
21015
- path: ["look", "background", "source"],
21016
- message: `The ${value.look.category} category takes ${allowed.map((s) => `"${s}"`).join(", ")}`
21017
- });
21018
- }
21019
- if (value.look.mode === "new") {
21020
- const upload = value.look.background.source ? isUploadSource(value.look.background.source) : false;
21021
- 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" });
21022
- 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" });
21023
- if (value.look.background.stock_id && BACKGROUND_SOURCES2[backgroundSourceFor(value.look.category, value.look.background)].source !== "stock")
21024
- ctx.addIssue({ code: "custom", path: ["look", "background", "stock_id"], message: "stock_id goes with the stock-photo and stock-video sources" });
21025
- if (upload && value.look.visibility === "public") ctx.addIssue({ code: "custom", path: ["look", "visibility"], message: "A Look with your own background stays private" });
21026
- if (value.look.background.references === "stock" && BACKGROUND_SOURCES2[backgroundSourceFor(value.look.category, value.look.background)].source !== "generated")
21027
- ctx.addIssue({ code: "custom", path: ["look", "background", "references"], message: "references goes with the ai-image and ai-video sources" });
21028
- else if (value.look.background.references === "stock" && value.look.feature_artist !== "always")
21029
- ctx.addIssue({ code: "custom", path: ["look", "background", "references"], message: 'references "stock" goes with feature_artist "always": the stock photo is the place the artist is shown in' });
21030
- if ((value.look.background.scenes ?? 1) > 1 && backgroundSourceFor(value.look.category, value.look.background) !== "ai-image")
21031
- ctx.addIssue({ code: "custom", path: ["look", "background", "scenes"], message: "More than one scene is only available with an AI image background" });
21032
- if ((value.look.background.scenes ?? 1) > 1 && SINGLE_SCENE_STYLES.includes(value.look.lyric_style ?? ""))
21033
- ctx.addIssue({ code: "custom", path: ["look", "background", "scenes"], message: `The ${value.look.lyric_style} lyric style takes a single scene` });
21034
- }
21035
- if (value.look.mode === "new" && value.look.feature_artist === "always") {
21036
- if (BACKGROUND_SOURCES2[backgroundSourceFor(value.look.category, value.look.background)].source !== "generated")
21037
- ctx.addIssue({ code: "custom", path: ["look", "feature_artist"], message: "Only an AI image or AI video background can show the artist" });
21038
- 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" });
21039
- if (value.look.visibility === "public") ctx.addIssue({ code: "custom", path: ["look", "feature_artist"], message: "A Look that shows the artist stays private" });
21040
- }
21187
+ if (value.edit?.clips && value.variations > 1) ctx.addIssue({ code: "custom", path: ["edit", "clips"], message: "An edit with its clips listed makes one video" });
21188
+ if (value.variations > 1 && value.look.background?.kind !== "clips") ctx.addIssue({ code: "custom", path: ["variations"], message: "variations go with a clips background (each one draws other clips)" });
21041
21189
  });
21042
- var CANVAS_MIN_SECONDS = 5;
21043
- var CANVAS_MAX_SECONDS = 8;
21044
- var CANVAS_SOURCE_IDS = ["ai-video", "ai-image", "stock-photo", "stock-video"];
21045
- var CANVAS_SOURCES = {
21046
- "ai-video": { label: "AI video", description: "An image made for your song, brought to life by a video model.", kind: "video", source: "generated" },
21047
- "ai-image": { label: "AI image", description: "An image made for your song, moved by our motion model.", kind: "image", source: "generated" },
21048
- "stock-photo": { label: "Stock photo", description: "A stock photo moved by our motion model.", kind: "image", source: "stock" },
21049
- "stock-video": { label: "Stock video", description: "A stock clip cut into a seamless loop.", kind: "video", source: "stock" }
21050
- };
21051
- var CANVAS_QUALITIES = ["standard", "high"];
21052
- var CANVAS_RESOLUTIONS = ["720p", "1080p"];
21053
- var CANVAS_INSPIRATIONS = ["cover", "song"];
21054
- var CANVAS_STYLES = ["cinematic", "dreamy", "abstract", "surreal", "retro", "minimal", "dark", "vibrant", "nature", "urban"];
21055
- var CanvasRequestSchema = external_exports.object({
21190
+ var CANVAS_MIN_SECONDS = CANVAS_SECONDS.min;
21191
+ var CANVAS_MAX_SECONDS = CANVAS_SECONDS.max;
21192
+ var CANVAS_LOOPS = ["drift", "rebound", "cuts"];
21193
+ var CANVAS_CUT_STYLES = ["hard", "smooth"];
21194
+ var CANVAS_STILL_MOTIONS = ["push", "drift", "still"];
21195
+ var GENERATE_STYLES = ["calm", "cinematic", "dreamy", "intense"];
21196
+ var CANVAS_GENERATE_VIDEO = ["standard", "high"];
21197
+ var GENERATE_FROM = ["song", "cover"];
21198
+ var CANVAS_MAX_STOCK_IDS = 3;
21199
+ var CanvasVisualKeySchema = external_exports.string().regex(CANVAS_VISUAL_KEY, "A visual key from GET /v1/options (canvas.visuals)");
21200
+ var SecondsSchema = external_exports.number().min(CANVAS_MIN_SECONDS).max(CANVAS_MAX_SECONDS).refine((v) => Math.abs(v * 10 - Math.round(v * 10)) < 1e-6, { message: "seconds in tenths" });
21201
+ var CanvasPictureSchema = external_exports.discriminatedUnion("kind", [
21202
+ // Clips: the sources the loop draws from (omitted: the song's own moods, by rules), and any Pexels items to bring in first.
21203
+ // How they sit and move: Drift's crossfade (s), a camera move (Cuts and Rebound), a fade through black at the loop point (Cuts), where
21204
+ // the picture sits (x, y from -1 to 1) and its zoom, a quarter turn, the fill (colour: bars in fill_colour) and a steadied copy of each clip.
21205
+ external_exports.object({
21206
+ kind: external_exports.literal("clips"),
21207
+ sources: ClipSourcesSchema.optional(),
21208
+ stock_ids: external_exports.array(StockIdSchema).min(1).max(CANVAS_MAX_STOCK_IDS).optional(),
21209
+ grade: external_exports.enum(GRADE_IDS).default("clean"),
21210
+ grade_amount: external_exports.number().min(GRADE_AMOUNT.min).max(GRADE_AMOUNT.max).default(GRADE_AMOUNT.default),
21211
+ fill: external_exports.enum(CANVAS_FILLS).default("blur"),
21212
+ fill_colour: external_exports.string().regex(HEX_COLOUR, "A colour like #1a1a1a").optional(),
21213
+ speed: external_exports.number().refine((v) => CANVAS_SPEEDS.includes(v), { message: `speed is one of ${CANVAS_SPEEDS.join(", ")}` }).default(1),
21214
+ cut: external_exports.enum(CANVAS_CUT_STYLES).default("hard"),
21215
+ crossfade: external_exports.number().min(CANVAS_CROSSFADE.min).max(CANVAS_CROSSFADE.max).default(CANVAS_CROSSFADE.default),
21216
+ camera: external_exports.enum(CANVAS_CAMERAS).default("still"),
21217
+ fade: external_exports.boolean().default(false),
21218
+ framing: external_exports.object({ x: external_exports.number().min(-1).max(1).default(0), y: external_exports.number().min(-1).max(1).default(0), zoom: external_exports.number().min(CANVAS_ZOOM.min).max(CANVAS_ZOOM.max).default(1) }).strict().default({ x: 0, y: 0, zoom: 1 }),
21219
+ rotate: external_exports.union(CANVAS_ROTATIONS.map((v) => external_exports.literal(v))).default(0),
21220
+ steady: external_exports.boolean().default(false)
21221
+ }).strict().refine((v) => v.fill !== "colour" || v.fill_colour, { message: "A colour fill needs fill_colour", path: ["fill_colour"] }),
21222
+ // The song's cover, moving.
21223
+ external_exports.object({ kind: external_exports.literal("cover"), motion: external_exports.enum(CANVAS_STILL_MOTIONS).default("push") }).strict(),
21224
+ // A visualizer (GET /options canvas.visuals: calm and medium) over the cover's own colours, blurred. Omitted: one picked for the song.
21225
+ external_exports.object({ kind: external_exports.literal("visualizer"), preset: CanvasVisualKeySchema.optional() }).strict(),
21226
+ // One call, no editor: a picture generated for this Canvas (it also lands in the workspace's AI folder), from the song or the
21227
+ // cover's world, with the artist or a cast character, as a video made to loop or a still (video null). model: the video model it is
21228
+ // made with (GET /options video_models.canvas, one of its ids); omitted, the Canvas default. video: standard or high before models
21229
+ // were named (high: the dearest offered), kept for older callers; any non-null value means a video.
21230
+ external_exports.object({
21231
+ kind: external_exports.literal("generate"),
21232
+ prompt: external_exports.string().trim().min(3).max(500).optional(),
21233
+ from: external_exports.enum(GENERATE_FROM).default("song"),
21234
+ with: external_exports.union([external_exports.enum(["none", "artist"]), KitItemIdSchema]).default("none"),
21235
+ video: external_exports.enum(CANVAS_GENERATE_VIDEO).nullable().default("standard"),
21236
+ model: external_exports.string().trim().min(1).max(160).optional(),
21237
+ /** How it moves and feels, as Generate's Style. */
21238
+ style: external_exports.enum(GENERATE_STYLES).default("calm")
21239
+ }).strict().refine((v) => !(v.model && v.video === null), { message: "A model makes a video: leave video unset, or drop model for a still", path: ["model"] })
21240
+ ]);
21241
+ var CanvasLightSchema = external_exports.object({ preset: CanvasVisualKeySchema }).strict();
21242
+ var CanvasRequestShape = external_exports.object({
21056
21243
  type: external_exports.literal("canvas"),
21057
21244
  ...common,
21058
- source: external_exports.enum(CANVAS_SOURCE_IDS).default("ai-video"),
21059
- quality: external_exports.enum(CANVAS_QUALITIES).default("standard"),
21060
- resolution: external_exports.enum(CANVAS_RESOLUTIONS).default("1080p"),
21061
- style: external_exports.enum(CANVAS_STYLES).optional(),
21062
- direction: external_exports.string().trim().max(2e3).optional(),
21063
- inspiration: external_exports.enum(CANVAS_INSPIRATIONS).default("song"),
21064
- feature_artist: external_exports.enum(CANVAS_FEATURE_ARTIST_MODES).default("auto"),
21065
- // Who may appear (feature_artist auto or always): a character of a Creator workspace's cast, whose projects have none of their
21066
- // own. Omitted: the song's artist's character.
21067
- performer: KitItemIdSchema.optional(),
21068
- seconds: external_exports.number().int().min(CANVAS_MIN_SECONDS).max(CANVAS_MAX_SECONDS).default(CANVAS_MAX_SECONDS),
21069
- /** The stock photo or video (GET /stock) for the stock sources; omitted, the director searches and picks. */
21070
- stock_id: StockIdSchema.optional()
21071
- }).strict().superRefine((value, ctx) => {
21072
- if (value.feature_artist === "always" && CANVAS_SOURCES[value.source].source === "stock")
21073
- ctx.addIssue({ code: "custom", path: ["feature_artist"], message: "Only an AI image or AI video Canvas can show the artist" });
21074
- if (value.performer && (value.feature_artist === "never" || CANVAS_SOURCES[value.source].source === "stock"))
21075
- ctx.addIssue({ code: "custom", path: ["performer"], message: "A performer goes with an AI image or AI video Canvas that may show someone (feature_artist auto or always)" });
21076
- if (value.stock_id && CANVAS_SOURCES[value.source].source !== "stock")
21077
- ctx.addIssue({ code: "custom", path: ["stock_id"], message: "stock_id goes with the stock-photo and stock-video sources" });
21245
+ picture: CanvasPictureSchema.default({ kind: "clips", grade: "clean", grade_amount: GRADE_AMOUNT.default, fill: "blur", speed: 1, cut: "hard", crossfade: CANVAS_CROSSFADE.default, camera: "still", fade: false, framing: { x: 0, y: 0, zoom: 1 }, rotate: 0, steady: false }),
21246
+ loop: external_exports.enum(CANVAS_LOOPS).default("drift"),
21247
+ seconds: SecondsSchema.default(CANVAS_MAX_SECONDS),
21248
+ /** The clips, as the editor planned and previewed them (times from the loop's start); or the seed they are drawn with. */
21249
+ edit: EditRequestSchema.optional(),
21250
+ light: CanvasLightSchema.nullable().default(null),
21251
+ atmosphere: external_exports.enum(OVERLAYS).default("none"),
21252
+ /** Effects over the whole loop (GET /options effects), up to three, each with a strength; they repeat with the loop, no seam. */
21253
+ effects: EffectsSchema.default([])
21254
+ }).strict();
21255
+ var DraftCut = external_exports.number().int().min(1).max(6e3);
21256
+ var VideoDraftEditShape = external_exports.object({
21257
+ type: external_exports.enum(["lyric-video", "canvas"]).default("lyric-video"),
21258
+ reset: external_exports.boolean().optional(),
21259
+ look_id: external_exports.string().min(1).max(120).optional(),
21260
+ lyric_style: external_exports.enum(LYRIC_STYLE_IDS).nullable().optional(),
21261
+ behind: external_exports.boolean().nullable().optional(),
21262
+ visual: external_exports.string().min(1).max(120).nullable().optional(),
21263
+ picture: external_exports.enum(["clips", "visualizer", "cover"]).optional(),
21264
+ sources: external_exports.object({
21265
+ moods: external_exports.array(external_exports.string().min(1).max(80)).max(40).optional(),
21266
+ folders: external_exports.array(external_exports.string().min(1).max(80)).max(40).optional(),
21267
+ looks: external_exports.array(external_exports.string().min(1).max(120)).max(40).optional()
21268
+ }).strict().optional(),
21269
+ density: external_exports.enum(CUT_DENSITIES).optional(),
21270
+ transitions: external_exports.object({ style: TransitionsSchema.shape.style.unwrap().optional(), amount: external_exports.number().min(0).max(1).optional(), feel: external_exports.number().min(0).max(1).optional() }).strict().optional(),
21271
+ grade: external_exports.enum(GRADE_IDS).optional(),
21272
+ grade_amount: external_exports.number().min(GRADE_AMOUNT.min).max(GRADE_AMOUNT.max).optional(),
21273
+ effects: EffectsSchema.optional(),
21274
+ shape: external_exports.enum(CLIP_SHAPES).optional(),
21275
+ fill: external_exports.enum(CANVAS_FILLS).optional(),
21276
+ speed: external_exports.number().refine((v) => CANVAS_SPEEDS.includes(v), { message: `speed is one of ${CANVAS_SPEEDS.join(", ")}` }).optional(),
21277
+ shuffle: external_exports.boolean().optional(),
21278
+ seed: external_exports.number().int().min(0).max(2 ** 31 - 1).optional(),
21279
+ replace: external_exports.array(external_exports.object({ cut: DraftCut, clip_id: external_exports.string().regex(/^clip_[0-9a-f-]{36}$/) }).strict()).max(200).optional(),
21280
+ joins: external_exports.array(external_exports.object({
21281
+ cut: DraftCut,
21282
+ transition: external_exports.enum(CLIP_ENTRANCES),
21283
+ seconds: external_exports.number().min(JOIN_SECONDS.min).max(JOIN_SECONDS.max).optional(),
21284
+ direction: external_exports.enum(TRANSITION_DIRECTIONS).optional(),
21285
+ intensity: external_exports.number().min(0).max(1).optional()
21286
+ }).strict()).max(200).optional(),
21287
+ starts: external_exports.array(external_exports.object({ cut: DraftCut, at: external_exports.number().min(0).max(600).nullable() }).strict()).max(200).optional(),
21288
+ format: external_exports.enum(["9:16", "16:9"]).optional(),
21289
+ trim: external_exports.object({ start_seconds: external_exports.number().min(0), end_seconds: external_exports.number().positive() }).strict().nullable().optional(),
21290
+ display: DisplaySchema.partial().optional(),
21291
+ loop: external_exports.enum(CANVAS_LOOPS).optional(),
21292
+ seconds: SecondsSchema.optional(),
21293
+ cut: external_exports.enum(CANVAS_CUT_STYLES).optional(),
21294
+ motion: external_exports.enum(CANVAS_STILL_MOTIONS).optional(),
21295
+ light: external_exports.string().min(1).max(120).nullable().optional(),
21296
+ atmosphere: external_exports.enum(OVERLAYS).optional(),
21297
+ frame: external_exports.object({
21298
+ crossfade: external_exports.number().min(CANVAS_CROSSFADE.min).max(CANVAS_CROSSFADE.max).optional(),
21299
+ camera: external_exports.enum(CANVAS_CAMERAS).optional(),
21300
+ fade: external_exports.boolean().optional(),
21301
+ x: external_exports.number().min(-1).max(1).optional(),
21302
+ y: external_exports.number().min(-1).max(1).optional(),
21303
+ zoom: external_exports.number().min(CANVAS_ZOOM.min).max(CANVAS_ZOOM.max).optional(),
21304
+ rotate: external_exports.union(CANVAS_ROTATIONS.map((r) => external_exports.literal(r))).optional(),
21305
+ colour: external_exports.string().regex(HEX_COLOUR).nullable().optional(),
21306
+ steady: external_exports.boolean().optional()
21307
+ }).strict().optional()
21308
+ }).strict();
21309
+ function checkVideoDraftEdit(v, ctx) {
21310
+ if (v.type === "lyric-video") {
21311
+ for (const key of ["loop", "seconds", "cut", "motion", "light", "atmosphere", "frame"]) if (v[key] !== void 0) ctx.addIssue({ code: "custom", path: [key], message: `${key} is for a Canvas (type canvas)` });
21312
+ if (v.picture === "cover") ctx.addIssue({ code: "custom", path: ["picture"], message: "A lyric video's picture is clips or visualizer" });
21313
+ } else {
21314
+ for (const key of ["look_id", "lyric_style", "behind", "density", "shape", "joins", "format", "trim", "display"]) if (v[key] !== void 0) ctx.addIssue({ code: "custom", path: [key], message: `${key} is for a lyric video` });
21315
+ }
21316
+ }
21317
+ var VideoDraftEditSchema = VideoDraftEditShape.superRefine(checkVideoDraftEdit);
21318
+ var CANVAS_LEGACY_SUNSET = "2027-02-18";
21319
+ var CanvasRequestSchema = CanvasRequestShape.superRefine((value, ctx) => {
21320
+ if (value.edit?.clips && value.variations > 1) ctx.addIssue({ code: "custom", path: ["edit", "clips"], message: "An edit with its clips listed makes one Canvas" });
21321
+ if (value.edit && value.picture.kind !== "clips") ctx.addIssue({ code: "custom", path: ["edit"], message: "edit goes with a clips picture" });
21322
+ if (value.loop !== "drift" && value.picture.kind !== "clips" && !(value.picture.kind === "generate" && value.picture.video && value.loop === "rebound"))
21323
+ ctx.addIssue({ code: "custom", path: ["loop"], message: "rebound and cuts go with a clips picture (rebound also with a generated video)" });
21324
+ if (value.variations > 1 && value.picture.kind !== "clips") ctx.addIssue({ code: "custom", path: ["variations"], message: "variations go with a clips picture (each one draws other clips)" });
21078
21325
  });
21079
21326
  var MUSIC_VIDEO_CATEGORY_IDS = [
21080
21327
  "performance",
@@ -21151,24 +21398,24 @@ var MUSIC_VIDEO_QUALITIES = {
21151
21398
  var PERSON_SLOTS = 2;
21152
21399
  var shotRoom = (model, people = 1) => Math.max(0, model.shot.references - Math.min(people, model.shot.people) * PERSON_SLOTS);
21153
21400
  function kindsFor(model) {
21154
- return MUSIC_VIDEO_CATEGORY_IDS.filter((id2) => {
21155
- const needs = MUSIC_VIDEO_CATEGORIES[id2].needs;
21401
+ return MUSIC_VIDEO_CATEGORY_IDS.filter((id3) => {
21402
+ const needs = MUSIC_VIDEO_CATEGORIES[id3].needs;
21156
21403
  if (!needs) return true;
21157
21404
  return (!needs.sings || model.performances.includes("sings")) && (!needs.plays || model.performances.includes("plays")) && (!needs.onScreen || model.onScreen.includes(needs.onScreen)) && (!needs.ability || model.abilities.includes(needs.ability)) && (!needs.keyframes || model.keyframes.start && model.keyframes.end);
21158
21405
  });
21159
21406
  }
21160
- var looksFor = (model) => MUSIC_VIDEO_STYLE_IDS.filter((id2) => {
21161
- const needs = MUSIC_VIDEO_STYLES[id2].needs;
21407
+ var looksFor = (model) => MUSIC_VIDEO_STYLE_IDS.filter((id3) => {
21408
+ const needs = MUSIC_VIDEO_STYLES[id3].needs;
21162
21409
  return !needs || model.abilities.includes(needs.ability);
21163
21410
  });
21164
21411
  var withCatalog = (model) => ({ ...model, categories: kindsFor(model), styles: looksFor(model) });
21165
21412
  var MUSIC_VIDEO_MODEL_IDS = ["one-take", "seedance-2-0", "seedance-2-0-fast", "seedance-2-0-mini", "seedance-2-5"];
21166
21413
  var MUSIC_VIDEO_LENGTH_BOUNDS = { min: 8, max: 1800 };
21167
21414
  var DEFAULT_MUSIC_VIDEO_MODEL = "one-take";
21168
- function seedance(label, id2, qualities) {
21415
+ function seedance(label, id3, qualities) {
21169
21416
  return {
21170
21417
  label,
21171
- description: MUSIC_VIDEO_MODEL_GUIDES[id2].bestFor,
21418
+ description: MUSIC_VIDEO_MODEL_GUIDES[id3].bestFor,
21172
21419
  qualities,
21173
21420
  defaultQuality: "720p",
21174
21421
  formats: ["9:16", "16:9", "1:1"],
@@ -21200,7 +21447,6 @@ var MUSIC_VIDEO_MODELS = {
21200
21447
  "seedance-2-5": { ...seedance("Seedance 2.5", "seedance-2-5", ["480p", "720p", "1080p"]) }
21201
21448
  };
21202
21449
  var MusicVideoPlanIdSchema = external_exports.string().regex(/^plan_[0-9a-f-]{36}$/, "A music video plan id (plan_\u2026)");
21203
- var LookbookIdSchema = external_exports.string().regex(/^lookbook_[0-9a-f-]{36}$/, "A lookbook id (lookbook_\u2026)");
21204
21450
  var CastingIdSchema = external_exports.string().regex(/^casting_[0-9a-f-]{36}$/, "A casting id (casting_\u2026)");
21205
21451
  var MusicVideoLookIdSchema = external_exports.string().regex(/^mvlook_[0-9a-f-]{36}$/, "A music video Look id (mvlook_\u2026)");
21206
21452
  var MusicVideoCastSchema = external_exports.object({ outfit_kit: external_exports.string().regex(/^[a-z0-9-]{1,40}$/, "A kit outfit\u2019s handle").optional() }).strict();
@@ -21269,8 +21515,6 @@ var musicVideoBrief = {
21269
21515
  // Who else may be on screen: only the people given (exact), or the director may cast more (director; omitted: director).
21270
21516
  cast_mode: external_exports.enum(MUSIC_VIDEO_CAST_MODES).optional(),
21271
21517
  scenes: MusicVideoScenesSchema.default({ mode: "invent" }),
21272
- // The lookbook whose kept pieces the video uses, like the kit pieces the direction mentions.
21273
- lookbook_id: LookbookIdSchema.optional(),
21274
21518
  // How the shots meet: cuts (between lines, like an edit; no pictures), or continuous takes, where the director carries a
21275
21519
  // shot on into the next through one picture drawn for the join (priced per picture).
21276
21520
  takes: external_exports.enum(MUSIC_VIDEO_TAKES).default("cuts"),
@@ -21305,10 +21549,14 @@ var fitsModel = (value, ctx) => {
21305
21549
  var MusicVideoPlanRequestSchema = external_exports.object({
21306
21550
  song_id: common.song_id,
21307
21551
  ...musicVideoBrief,
21308
- revise: external_exports.object({ plan_id: MusicVideoPlanIdSchema, note: external_exports.string().trim().min(1).max(1e3) }).strict().optional()
21552
+ // Required where a shot list is written (POST /music-video-plans); the brief alone is read without it elsewhere.
21553
+ credits: external_exports.number().int().min(0).max(1e5).optional(),
21554
+ revise: external_exports.object({ plan_id: MusicVideoPlanIdSchema, note: external_exports.string().trim().min(1).max(1e3) }).strict().optional(),
21555
+ // false: answer at once (202) with the shot list being written, read shot by shot at GET /music-video-plan-writes/{id} until it
21556
+ // is ready (its plan_id); true (default): wait for the shot list, a minute or more.
21557
+ wait: external_exports.boolean().optional()
21309
21558
  }).strict().superRefine(fitsModel);
21310
- var { lookbook_id: _lookbook, ...castingBrief } = musicVideoBrief;
21311
- var MusicVideoCastingRequestSchema = external_exports.object({ song_id: common.song_id, ...castingBrief }).strict().superRefine(fitsModel);
21559
+ var MusicVideoCastingRequestSchema = external_exports.object({ song_id: common.song_id, ...musicVideoBrief }).strict().superRefine(fitsModel);
21312
21560
  var MusicVideoRequestSchema = external_exports.object({
21313
21561
  type: external_exports.literal("music-video"),
21314
21562
  ...common,
@@ -21321,9 +21569,6 @@ var MusicVideoRequestSchema = external_exports.object({
21321
21569
  // Omitted: the model's default quality (MUSIC_VIDEO_MODELS[].defaultQuality), filled in below, so a parsed request always has one:
21322
21570
  // optional when parsed, typed as always there.
21323
21571
  quality: external_exports.enum(MUSIC_VIDEO_QUALITY_IDS).optional(),
21324
- // Ordered without a plan: the director first designs the shoot (the outfits, places and props the brief leaves open) and draws
21325
- // each as a picture the shots are given, priced per picture drawn (the quote counts the most it may draw).
21326
- design_shoot: external_exports.boolean().default(false),
21327
21572
  // An outro after the video's last shot (on its last frame, held, the song playing on): the release card (cover, title, artist, streaming badges, as display shows them),
21328
21573
  // designed by the director, or a saved lyric video Look's card as it is (look_id). Omitted: none. Free with the video; not part
21329
21574
  // of the plan.
@@ -21336,8 +21581,7 @@ var MusicVideoRequestSchema = external_exports.object({
21336
21581
  }).strict().overwrite((value) => ({ ...value, quality: value.quality ?? MUSIC_VIDEO_MODELS[value.model].defaultQuality })).superRefine(fitsModel).superRefine((value, ctx) => {
21337
21582
  const model = MUSIC_VIDEO_MODELS[value.model];
21338
21583
  if (value.quality && !model.qualities.includes(value.quality)) ctx.addIssue({ code: "custom", path: ["quality"], message: `${model.label} is made in ${model.qualities.map((q) => MUSIC_VIDEO_QUALITIES[q].label).join(", ")}` });
21339
- if (value.design_shoot && (value.plan_id || value.lookbook_id)) ctx.addIssue({ code: "custom", path: ["design_shoot"], message: "A plan or a lookbook already has its shoot: leave design_shoot out" });
21340
- if (value.refinish && (value.plan_id || value.design_shoot || value.variations > 1)) ctx.addIssue({ code: "custom", path: ["refinish"], message: "Finishing a video again takes only its song_id, its outro and one variation" });
21584
+ if (value.refinish && (value.plan_id || value.variations > 1)) ctx.addIssue({ code: "custom", path: ["refinish"], message: "Finishing a video again takes only its song_id, its outro and one variation" });
21341
21585
  if (value.casting_id && (value.plan_id || value.refinish)) ctx.addIssue({ code: "custom", path: ["casting_id"], message: "A plan already has its people: leave casting_id out" });
21342
21586
  if (value.casting_id && castModeOf(value) === "exact") ctx.addIssue({ code: "custom", path: ["casting_id"], message: "Only who you picked is in it (cast_mode exact): leave casting_id out" });
21343
21587
  if (value.test && !value.plan_id) ctx.addIssue({ code: "custom", path: ["test"], message: "A test is made from a plan: send its plan_id" });
@@ -21348,6 +21592,215 @@ var VideoRequestSchema = external_exports.discriminatedUnion("type", [LyricVideo
21348
21592
  // ../api-spec/src/song-brief.ts
21349
21593
  var SONG_BRIEF_LIMITS = { theme: 400, tone: 80, story: 1200, setting: 300, section: 60, feeling: 240, sections: 40 };
21350
21594
 
21595
+ // ../api-spec/src/artist-pages.ts
21596
+ var seg = (re) => (url2) => url2.pathname.match(re)?.[1] ?? null;
21597
+ var PLATFORMS = [
21598
+ { id: "apple_music", name: "Apple Music", category: "listen", icon: "applemusic", color: "#FA243C", hosts: ["music.apple.com", "itunes.apple.com"], externalId: seg(/\/artist\/(?:[^/]+\/)?(\d+)/) },
21599
+ { id: "spotify", name: "Spotify", category: "listen", icon: "spotify", color: "#1DB954", hosts: ["open.spotify.com"], externalId: seg(/\/artist\/([A-Za-z0-9]{22})/) },
21600
+ { id: "youtube_music", name: "YouTube Music", category: "listen", icon: "youtubemusic", color: "#FF0000", hosts: ["music.youtube.com"], externalId: seg(/\/channel\/([\w-]+)/) },
21601
+ { id: "amazon_music", name: "Amazon Music", category: "listen", icon: null, color: "#25D1DA", hosts: ["music.amazon.com", "music.amazon.ca", "music.amazon.co.uk", "music.amazon.de", "music.amazon.fr"], externalId: seg(/\/artists\/([A-Z0-9]+)/) },
21602
+ { id: "deezer", name: "Deezer", category: "listen", icon: "deezer", color: "#A238FF", hosts: ["deezer.com"], externalId: seg(/\/artist\/(\d+)/) },
21603
+ { id: "tidal", name: "TIDAL", category: "listen", icon: "tidal", color: "#000000", hosts: ["tidal.com", "listen.tidal.com"], externalId: seg(/\/artist\/(\d+)/) },
21604
+ { id: "soundcloud", name: "SoundCloud", category: "listen", icon: "soundcloud", color: "#FF5500", hosts: ["soundcloud.com"], externalId: seg(/^\/([\w-]+)\/?$/) },
21605
+ { id: "bandcamp", name: "Bandcamp", category: "store", icon: "bandcamp", color: "#408294", hosts: ["bandcamp.com"] },
21606
+ { id: "audiomack", name: "Audiomack", category: "listen", icon: "audiomack", color: "#FFA200", hosts: ["audiomack.com"], externalId: seg(/^\/([\w-]+)\/?$/) },
21607
+ { id: "shazam", name: "Shazam", category: "listen", icon: "shazam", color: "#0088FF", hosts: ["shazam.com"], externalId: seg(/\/artist\/(?:[^/]+\/)?(\d+)/) },
21608
+ { id: "pandora", name: "Pandora", category: "listen", icon: "pandora", color: "#224099", hosts: ["pandora.com"] },
21609
+ { id: "qobuz", name: "Qobuz", category: "listen", icon: null, color: "#000000", hosts: ["qobuz.com"] },
21610
+ { id: "anghami", name: "Anghami", category: "listen", icon: null, color: "#A800FF", hosts: ["anghami.com"] },
21611
+ { id: "boomplay", name: "Boomplay", category: "listen", icon: null, color: "#0A6AF2", hosts: ["boomplay.com", "boomplaymusic.com"] },
21612
+ { id: "napster", name: "Napster", category: "listen", icon: null, color: "#000000", hosts: ["napster.com"] },
21613
+ { id: "iheartradio", name: "iHeartRadio", category: "listen", icon: null, color: "#C6002B", hosts: ["iheart.com"] },
21614
+ { id: "youtube", name: "YouTube", category: "video", icon: "youtube", color: "#FF0000", hosts: ["youtube.com", "youtu.be"], externalId: seg(/\/(?:channel\/([\w-]+)|@[\w.-]+)/) },
21615
+ { id: "twitch", name: "Twitch", category: "video", icon: "twitch", color: "#9146FF", hosts: ["twitch.tv"], externalId: seg(/^\/([\w]+)\/?$/) },
21616
+ { id: "vimeo", name: "Vimeo", category: "video", icon: null, color: "#1AB7EA", hosts: ["vimeo.com"] },
21617
+ { id: "instagram", name: "Instagram", category: "social", icon: "instagram", color: "#E4405F", hosts: ["instagram.com"], externalId: seg(/^\/([\w.]+)\/?$/) },
21618
+ { id: "tiktok", name: "TikTok", category: "social", icon: "tiktok", color: "#000000", hosts: ["tiktok.com"], externalId: seg(/^\/@([\w.]+)\/?$/) },
21619
+ { id: "twitter", name: "X", category: "social", icon: "x", color: "#000000", hosts: ["twitter.com", "x.com"], externalId: seg(/^\/(\w+)\/?$/) },
21620
+ { id: "facebook", name: "Facebook", category: "social", icon: "facebook", color: "#0866FF", hosts: ["facebook.com", "fb.com"] },
21621
+ { id: "threads", name: "Threads", category: "social", icon: "threads", color: "#000000", hosts: ["threads.net", "threads.com"], externalId: seg(/^\/@([\w.]+)\/?$/) },
21622
+ { id: "bluesky", name: "Bluesky", category: "social", icon: "bluesky", color: "#1185FE", hosts: ["bsky.app"], externalId: seg(/^\/profile\/([\w.:-]+)/) },
21623
+ { id: "snapchat", name: "Snapchat", category: "social", icon: null, color: "#FFFC00", hosts: ["snapchat.com"] },
21624
+ { id: "discord", name: "Discord", category: "social", icon: null, color: "#5865F2", hosts: ["discord.gg", "discord.com"] },
21625
+ { id: "patreon", name: "Patreon", category: "store", icon: "patreon", color: "#000000", hosts: ["patreon.com"] },
21626
+ { id: "bandsintown", name: "Bandsintown", category: "live", icon: "bandsintown", color: "#00CEC8", hosts: ["bandsintown.com"], externalId: seg(/\/a\/(\d+)/) },
21627
+ { id: "songkick", name: "Songkick", category: "live", icon: "songkick", color: "#F80046", hosts: ["songkick.com"], externalId: seg(/\/artists\/(\d+)/) },
21628
+ { id: "ticketmaster", name: "Ticketmaster", category: "live", icon: "ticketmaster", color: "#026CDF", hosts: ["ticketmaster.com", "ticketmaster.ca", "ticketmaster.co.uk"], externalId: seg(/\/artist\/(\d+)/) },
21629
+ { id: "dice", name: "DICE", category: "live", icon: null, color: "#000000", hosts: ["dice.fm"] },
21630
+ { id: "setlistfm", name: "Setlist.fm", category: "live", icon: null, color: "#000000", hosts: ["setlist.fm"] },
21631
+ { id: "genius", name: "Genius", category: "info", icon: "genius", color: "#000000", hosts: ["genius.com"] },
21632
+ { id: "discogs", name: "Discogs", category: "info", icon: "discogs", color: "#333333", hosts: ["discogs.com"], externalId: seg(/\/artist\/(\d+)/) },
21633
+ { id: "musicbrainz", name: "MusicBrainz", category: "info", icon: "musicbrainz", color: "#BA478F", hosts: ["musicbrainz.org"], externalId: seg(/\/artist\/([0-9a-f-]{36})/) },
21634
+ { id: "wikipedia", name: "Wikipedia", category: "info", icon: "wikipedia", color: "#000000", hosts: ["wikipedia.org"] },
21635
+ { id: "wikidata", name: "Wikidata", category: "info", icon: null, color: "#006699", hosts: ["wikidata.org"] },
21636
+ { id: "lastfm", name: "Last.fm", category: "info", icon: "lastdotfm", color: "#D51007", hosts: ["last.fm"] },
21637
+ { id: "allmusic", name: "AllMusic", category: "info", icon: null, color: "#000000", hosts: ["allmusic.com"] },
21638
+ { id: "linktree", name: "Linktree", category: "other", icon: "linktree", color: "#43E55E", hosts: ["linktr.ee"] },
21639
+ { id: "website", name: "Website", category: "other", icon: null, color: "#3A3A44", hosts: [] }
21640
+ ];
21641
+ var BY_ID = new Map(PLATFORMS.map((p) => [p.id, p]));
21642
+ var LINK_URL_MAX = 2e3;
21643
+ var LINK_SOURCES = ["apple", "discovered", "manual"];
21644
+ var ArtistLinkSchema = external_exports.object({
21645
+ id: external_exports.string(),
21646
+ platform: external_exports.string().describe("The service: apple_music, spotify, instagram, tiktok, youtube, website, \u2026 (a new service keeps its own id)"),
21647
+ platform_name: external_exports.string(),
21648
+ category: external_exports.enum(["listen", "social", "video", "live", "info", "store", "other"]),
21649
+ url: external_exports.string(),
21650
+ external_id: external_exports.string().nullable(),
21651
+ title: external_exports.string().nullable().describe("A title the artist gave it, shown instead of the service name"),
21652
+ source: external_exports.enum(LINK_SOURCES).describe("apple: from the Apple Music connection; discovered: found automatically; manual: added by the artist"),
21653
+ confirmed: external_exports.boolean().describe("The artist said this profile is theirs"),
21654
+ state: external_exports.enum(["shown", "hidden"]).describe("hidden: kept but not on the page"),
21655
+ position: external_exports.number().int(),
21656
+ discovered_at: external_exports.string().nullable(),
21657
+ updated_at: external_exports.string()
21658
+ });
21659
+ var DISCOVERY_STATES = ["idle", "running", "found", "not_found", "failed"];
21660
+ var ArtistDiscoverySchema = external_exports.object({
21661
+ state: external_exports.enum(DISCOVERY_STATES).describe("running: looking now; found: profiles were found (new ones unconfirmed); not_found: none yet (looked again weekly); failed: try again"),
21662
+ at: external_exports.string().nullable(),
21663
+ new_links: external_exports.number().int().describe("Found links not confirmed yet")
21664
+ });
21665
+ var RESERVED_WORDS = [
21666
+ "admin",
21667
+ "administrator",
21668
+ "official",
21669
+ "support",
21670
+ "help",
21671
+ "api",
21672
+ "app",
21673
+ "settings",
21674
+ "staff",
21675
+ "kinetune",
21676
+ "kine",
21677
+ "lyrc",
21678
+ "null",
21679
+ "undefined",
21680
+ "me",
21681
+ "you",
21682
+ "www",
21683
+ "mail",
21684
+ "email",
21685
+ "root",
21686
+ "system",
21687
+ "about",
21688
+ "account",
21689
+ "login",
21690
+ "logout",
21691
+ "signin",
21692
+ "signup",
21693
+ "register",
21694
+ "search",
21695
+ "explore",
21696
+ "home",
21697
+ "new",
21698
+ "edit",
21699
+ "page",
21700
+ "pages",
21701
+ "artist",
21702
+ "artists",
21703
+ "creator",
21704
+ "creators",
21705
+ "music",
21706
+ "video",
21707
+ "videos",
21708
+ "song",
21709
+ "songs",
21710
+ "press",
21711
+ "status",
21712
+ "security",
21713
+ "legal",
21714
+ "billing",
21715
+ "pay",
21716
+ "checkout",
21717
+ "terms",
21718
+ "privacy",
21719
+ "refunds",
21720
+ "pricing",
21721
+ "developers",
21722
+ "docs",
21723
+ "blog",
21724
+ "showcase",
21725
+ "looks",
21726
+ "styles",
21727
+ "tools",
21728
+ "guides",
21729
+ "compare",
21730
+ "for",
21731
+ "v",
21732
+ "og",
21733
+ "go",
21734
+ "sitemap",
21735
+ "robots",
21736
+ "favicon",
21737
+ "static",
21738
+ "assets",
21739
+ "media",
21740
+ "contact",
21741
+ "welcome",
21742
+ "oauth",
21743
+ "mcp",
21744
+ "embed",
21745
+ "org",
21746
+ "demos",
21747
+ "samples",
21748
+ "marketing",
21749
+ "webhooks",
21750
+ "whats-new",
21751
+ "whatsnew",
21752
+ "apple",
21753
+ "applemusic"
21754
+ ];
21755
+ var RESERVED_HANDLES = /* @__PURE__ */ new Set([...RESERVED_WORDS, ...PLATFORMS.flatMap((p) => [p.id, p.id.replace(/_/g, ""), p.name.toLowerCase().replace(/[^a-z0-9]/g, "")])]);
21756
+ var PAGE_THEMES = ["stage", "paper", "neon", "studio"];
21757
+ var PAGE_FONTS = ["anton", "fraunces", "unbounded", "bebas", "archivo", "playfair"];
21758
+ var PAGE_BUTTONS = ["solid", "outline", "pill"];
21759
+ var PAGE_LAYOUTS = ["column", "split"];
21760
+ var hex5 = external_exports.string().regex(/^#[0-9a-f]{6}$/i, "A colour like #f0a845");
21761
+ var id = external_exports.string().min(1).max(80);
21762
+ var sectionBase = { id: external_exports.string().min(1).max(40), visible: external_exports.boolean().default(true), title: external_exports.string().trim().max(60).nullable().default(null) };
21763
+ var PageSectionSchema = external_exports.discriminatedUnion("type", [
21764
+ external_exports.object({
21765
+ ...sectionBase,
21766
+ type: external_exports.literal("out_now"),
21767
+ release: external_exports.enum(["newest", "pinned"]).default("newest"),
21768
+ pinned_release_id: id.nullable().default(null).describe("A catalog release id (collection) when release is pinned"),
21769
+ plays: external_exports.enum(["video", "cover"]).default("video"),
21770
+ video_id: id.nullable().default(null).describe("The Kinetune video that plays; null picks the newest finished one of that song"),
21771
+ buttons: external_exports.array(external_exports.string().max(40)).max(6).default(["spotify", "apple_music", "youtube_music"]).describe("Platform ids of the listen buttons under it")
21772
+ }),
21773
+ external_exports.object({ ...sectionBase, type: external_exports.literal("listen"), platforms: external_exports.array(external_exports.string().max(40)).max(20).default([]).describe("Platform ids in order; empty shows every shown listen link"), style: external_exports.enum(["buttons", "icons"]).default("buttons") }),
21774
+ external_exports.object({ ...sectionBase, type: external_exports.literal("videos"), items: external_exports.array(external_exports.discriminatedUnion("kind", [
21775
+ external_exports.object({ kind: external_exports.literal("kinetune"), video_id: id }),
21776
+ external_exports.object({ kind: external_exports.literal("embed"), url: external_exports.string().max(LINK_URL_MAX) })
21777
+ ])).max(24).default([]), layout: external_exports.enum(["row", "grid", "one"]).default("row") }),
21778
+ external_exports.object({ ...sectionBase, type: external_exports.literal("releases"), mode: external_exports.enum(["all", "picked"]).default("all"), picked: external_exports.array(id).max(60).default([]), hidden: external_exports.array(id).max(200).default([]), count: external_exports.union([external_exports.literal(4), external_exports.literal(8), external_exports.literal(0)]).default(8).describe("How many to show; 0 shows all") }),
21779
+ external_exports.object({ ...sectionBase, type: external_exports.literal("links"), links: external_exports.array(id).max(30).default([]).describe("Ids of the artist's links, in order"), big: id.nullable().default(null).describe("The one link drawn big") }),
21780
+ external_exports.object({ ...sectionBase, type: external_exports.literal("about"), text: external_exports.string().max(4e3).default("") }),
21781
+ external_exports.object({ ...sectionBase, type: external_exports.literal("looks") })
21782
+ ]);
21783
+ var PageDocSchema = external_exports.object({
21784
+ theme: external_exports.enum(PAGE_THEMES).default("stage"),
21785
+ accent: hex5.nullable().default(null).describe("null uses the theme's accent"),
21786
+ background: external_exports.discriminatedUnion("kind", [external_exports.object({ kind: external_exports.literal("color"), color: hex5 }), external_exports.object({ kind: external_exports.literal("photo") })]).nullable().default(null),
21787
+ font: external_exports.enum(PAGE_FONTS).nullable().default(null),
21788
+ buttons: external_exports.enum(PAGE_BUTTONS).nullable().default(null),
21789
+ layout: external_exports.enum(PAGE_LAYOUTS).nullable().default(null),
21790
+ name: external_exports.string().trim().min(1).max(80).nullable().default(null).describe("The name shown; null uses the artist's name"),
21791
+ photo: external_exports.discriminatedUnion("source", [external_exports.object({ source: external_exports.literal("picture") }), external_exports.object({ source: external_exports.literal("upload"), key: external_exports.string().max(300) }), external_exports.object({ source: external_exports.literal("video"), video_id: id, seconds: external_exports.number().min(0).max(3600) })]).default({ source: "picture" }),
21792
+ genres: external_exports.array(external_exports.string().trim().min(1).max(40)).max(5).default([]),
21793
+ place: external_exports.string().trim().max(60).default(""),
21794
+ social: external_exports.array(id).max(8).default([]).describe("Ids of the links shown as icons under the name; empty shows the shown social links"),
21795
+ sections: external_exports.array(PageSectionSchema).max(20),
21796
+ tracking: external_exports.object({
21797
+ ga4: external_exports.string().regex(/^G-[A-Z0-9]{4,12}$/, "A Google Analytics 4 measurement ID like G-ABC123XYZ").nullable().default(null),
21798
+ meta_pixel: external_exports.string().regex(/^\d{8,20}$/, "A Meta Pixel ID (digits)").nullable().default(null),
21799
+ tiktok_pixel: external_exports.string().regex(/^[A-Z0-9]{10,30}$/, "A TikTok Pixel ID").nullable().default(null)
21800
+ }).default({ ga4: null, meta_pixel: null, tiktok_pixel: null }).describe("The artist's own tracking IDs (plans only); pixels load after the fan accepts")
21801
+ });
21802
+ var PageDocPatchSchema = external_exports.object(Object.fromEntries(Object.entries(PageDocSchema.shape).map(([key, schema]) => [key, (schema instanceof external_exports.ZodDefault ? schema.unwrap() : schema).optional()])));
21803
+
21351
21804
  // ../api-spec/src/versioning.ts
21352
21805
  var API_VERSION = 1;
21353
21806
  var deprecationNote = (d) => `Deprecated since ${d.since}${d.use ? `: use ${d.use} instead` : ""}. It stops working on ${d.sunset}.`;
@@ -21373,11 +21826,11 @@ var SCOPE_DESCRIPTIONS = {
21373
21826
  "organizations:write": "Create workspaces you own, and rename or switch the type of one you own or run"
21374
21827
  };
21375
21828
  var ARTIST_LINK_KINDS = ["apple_music", "spotify", "youtube", "instagram", "tiktok", "website"];
21376
- var id = (what) => external_exports.string().min(1).max(120).describe(`The ${what} id`);
21377
- var songId = id("song");
21378
- var artistId = id("artist");
21379
- var lookId = id("Look");
21380
- var videoId = id("video");
21829
+ var id2 = (what) => external_exports.string().min(1).max(120).describe(`The ${what} id`);
21830
+ var songId = id2("song");
21831
+ var artistId = id2("artist");
21832
+ var lookId = id2("Look");
21833
+ var videoId = id2("video");
21381
21834
  var IDEA_ID = external_exports.string().regex(/^idea_[A-Za-z0-9]{1,40}$/).describe("The idea id (idea_\u2026)");
21382
21835
  var search = (q) => ({
21383
21836
  q: external_exports.string().max(100).optional().describe(q),
@@ -21424,28 +21877,39 @@ var lyricInput = external_exports.object({
21424
21877
  song_id: songId,
21425
21878
  callback_url: CALLBACK,
21426
21879
  metadata: METADATA,
21427
- 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 (any category takes any background.source, "designed" being a free moving gradient the director draws; 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 stock photo or clip 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. visual (both modes, optional) picks the visual that moves with the music: {"preset":"liquid/amber-aurora"} for the whole song, "sections":{"chorus":"\u2026"} for some sections, or {"preset":"none"} for no visual; keys from get_options visualizers.presets; omit it and the director picks per section. background.source "visualizer" has no picture: the visual fills the frame behind the words (free). 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. background.references "stock" (AI image or AI video, default "none") with feature_artist "always" makes the background one real stock photo of a place the director picks, with the artist put into it and restyled a little for the Look; no extra cost. The singer is left out unless asked: feature_artist "always" (default "never") makes them the subject of the background, recognizable from their character (list_characters; start_character makes one); 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`),
21880
+ look: lyricShape.look.describe(`Which Look and what to change. {"id":"look_\u2026"} uses a saved Look (list_looks); left out, Kinetune picks one for the song by rules (get_song_draft shows which, with its picture). Change any part: "lyric_style" (get_options lyric_styles), "behind" (true: big words go behind the subject of the clips, a person or a solid figure, which stands in front of them; only the lyric styles get_options marks behind: true take it, others keep their words in front; the behind style has it on, false turns it off), "visual" (get_options visualizers), and "background": {"kind":"clips","sources":{"moods":["euphoria"],"folders":["folder_\u2026"]},"density":"even","transitions":{"style":"auto","amount":0.5,"feel":0.5},"grade":"clean","grade_amount":1,"effects":[{"id":"film-grain","amount":0.5}],"shape":"both","fill":"blur","speed":1} for short clips cut on the beat (moods: get_options clip_moods, the Looks collection among them; folders: list_clip_folders; looks: Look ids whose own picture plays as clips, as a Look made before clips does; transitions, grades and densities: get_options; grade_amount: the grade's strength 0\u20131, default 1; effects: up to three from get_options effects, each with an amount 0\u20131, drawn over the clips across the song), or {"kind":"visualizer"} for a visual that fills the frame. Left out, the Look keeps its own picture. No AI designs anything: a lyric video costs its per-video price and render only (quote_lyric_video shows both)`),
21428
21881
  aspect_ratios: lyricShape.aspect_ratios.describe('Formats to render, each its own file: "9:16" (vertical), "16:9" (wide), "1:1" (square)'),
21429
- 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"),
21882
+ display: lyricShape.display.describe("Which elements show (title, artist, cover, lyrics, badges, headline) and their sizes. title_card: when a kinetic lyric style shows its big title card instead of the small label: ends (before the first line and after the last; the default over clips), breaks (also every break of 3 s or more; the default otherwise) or label (never). censor: true shows swear words with their vowels as * (the song is untouched). A Look whose picture shows an artist needs cover false"),
21430
21883
  trim: lyricShape.trim.describe("Render only this section of the song (at least 8 seconds). Best: a part from get_song_analysis (parts[]: its start and end never cut a word)"),
21431
- variations: lyricShape.variations.describe("1\u20134 different New Looks, one video each (an Existing Look renders one)")
21884
+ variations: lyricShape.variations.describe("1\u20134 videos with a clips picture, each drawing other clips (the next seed); one otherwise"),
21885
+ edit: lyricShape.edit.describe(`A clips picture's cut: {"seed":7} draws the clips (same seed, same video; another seed, other clips on the same cuts), or "clips" lists them exactly as a studio previewed them (list_clips and @kinetune/composition planEdit: {clip_id, at, in, duration, transition}, each cut where you want it, each clip from where you want it to start); a clip may also set its own transition's transition_seconds (0.07\u20131), direction (left, right, up, down: whip, stack, wipe, slip, slice) and intensity (0\u20131, 0.5 as designed: hits, zooms, flashes, warps); one variation only`)
21432
21886
  });
21887
+ var legacy = (schema, use) => schema.optional().meta({ deprecated: true, "x-sunset": CANVAS_LEGACY_SUNSET }).describe(`Deprecated: use ${use}. Stops working on ${CANVAS_LEGACY_SUNSET}.`);
21888
+ var CANVAS_LEGACY_INPUT = {
21889
+ source: legacy(external_exports.enum(["ai-video", "ai-image", "stock-photo", "stock-video"]), "picture (generate for ai-video and ai-image, clips for stock)"),
21890
+ quality: legacy(external_exports.enum(["standard", "high"]), "picture.video"),
21891
+ resolution: legacy(external_exports.enum(["720p", "1080p"]), "nothing (a Canvas is always 1080 \xD7 1920)"),
21892
+ style: legacy(external_exports.enum(["cinematic", "dreamy", "abstract", "surreal", "retro", "minimal", "dark", "vibrant", "nature", "urban"]), "picture.prompt, or a clips picture's grade"),
21893
+ direction: legacy(external_exports.string().max(2e3), "picture.prompt"),
21894
+ inspiration: legacy(external_exports.enum(["cover", "song"]), "picture.from"),
21895
+ feature_artist: legacy(external_exports.enum(["auto", "always", "never"]), "picture.with"),
21896
+ performer: legacy(KitItemIdSchema, "picture.with"),
21897
+ stock_id: legacy(StockIdSchema, "picture.stock_ids")
21898
+ };
21433
21899
  var canvasInput = external_exports.object({
21434
21900
  ...canvasShape,
21435
21901
  song_id: songId,
21436
21902
  callback_url: CALLBACK,
21437
21903
  metadata: METADATA,
21438
- source: canvasShape.source.describe("ai-video (default), ai-image, stock-photo or stock-video"),
21439
- stock_id: canvasShape.stock_id.describe("With a stock source: the stock photo or video (search_stock with seconds) to use instead of the director's pick"),
21440
- quality: canvasShape.quality.describe("AI video model tier: standard or high"),
21441
- resolution: canvasShape.resolution.describe("1080p (1080\xD71920) or 720p"),
21442
- style: canvasShape.style.describe("Optional visual style"),
21443
- direction: canvasShape.direction.describe("Optional mood, motifs or references"),
21444
- inspiration: canvasShape.inspiration.describe("Where the idea comes from: song (default; what the song means and how it sounds lead, the colors kept close to the cover, when there is one, so the two sit together in the player) or cover (the cover art's world, colors and motifs, brought to life; a song without a cover always uses song)"),
21445
- performer: canvasShape.performer.describe("A Creator workspace only: the character (list_characters with for_artist_id: one in the song's project's kit or one another project shared) who may appear, with feature_artist auto or always on an AI source. Omitted: the song's artist's character"),
21446
- feature_artist: canvasShape.feature_artist.describe(`Whether the Canvas shows the artist: auto (the director decides), always or never (AI sources; "always" needs the artist's character: list_characters, start_character makes one)`),
21447
- seconds: canvasShape.seconds.describe("Canvas length in whole seconds, 5\u20138 (default 8). Spotify loops it, so no part of the song is chosen"),
21448
- variations: canvasShape.variations.describe("1\u20134 different Canvases")
21904
+ picture: canvasShape.picture.describe(`What the Canvas shows. {"kind":"clips"} (the default): clips from library moods and the workspace's folders, "sources":{"moods":["euphoria"],"folders":["folder_\u2026"]} (left out: the song's own moods, by rules: get_song_draft with type canvas shows them), "stock_ids" (up to 3 Pexels videos from search_stock, brought into the Pexels folder first), "grade" (get_options grades) and "grade_amount" (its strength, 0\u20131; default 1), "fill" (blur, cover, bars or colour for a clip of the other shape; colour takes "fill_colour":"#rrggbb"), "speed" (0.25\u20132, get_options canvas.speeds), "cut" (hard or smooth, for a cuts loop), "crossfade" (drift: 0.25\u20132 seconds of the footage after the loop blended over its start; default 0.75), "camera" (still, push or pull: a slow push in or pull out over each cut, or in and back out over a rebound; a drift stays still), "fade" (cuts: fade through black at the loop point), "framing" ({"x":-1\u20261,"y":-1\u20261,"zoom":1\u20263}: where the picture sits and how far it is zoomed; x 1 shows its left edge, y 1 its top), "rotate" (0, 90, 180 or 270 degrees, clockwise) and "steady" (true: each clip plays a stabilised copy, made once; get_clip_steady shows it). {"kind":"cover","motion":"push"|"drift"|"still"}: the song's cover, moving. {"kind":"visualizer","preset":"sphericalShader/ring-bowl"}: a calm or medium visual, 3D or Liquid (get_options canvas.visuals). {"kind":"generate","prompt":"\u2026","from":"song"|"cover","with":"none"|"artist"|"kit_\u2026","video":"standard"|"high"|null,"model":"\u2026","style":"calm"|"cinematic"|"dreamy"|"intense"}: a picture generated for this Canvas in the same order (from the song's brief or the cover's world, with the artist or a cast character; a video made to loop by a model from get_options video_models with loops, or a still when video is null; style shapes how it looks and moves, calm by default), priced in the quote and kept in the AI folder. No AI decides anything else`),
21905
+ loop: canvasShape.loop.describe("How it loops: drift (default: one clip that flows into itself with no seam), rebound (one clip forward, then backward) or cuts (two or three clips, calm cuts, never flashing). rebound and cuts go with a clips picture (rebound also with a generated video)"),
21906
+ seconds: canvasShape.seconds.describe("3\u20138 seconds in tenths (default 8). Spotify plays it on a loop of its own, out of time with the song, so no part of the song is chosen"),
21907
+ edit: canvasShape.edit.describe(`A clips picture's clips: {"seed":7} draws them, or "clips" lists them as the editor previewed them ({clip_id, at, in, duration, transition}, times from the loop's start; "in" is where in its clip each one starts, so a drift or rebound plays the part of the clip you chose: get_clip_loop finds where it loops best); one variation only`),
21908
+ light: canvasShape.light.describe(`Light over the picture: {"preset":"polar-curves/halo-ring"}, a visual from get_options canvas.visuals with over_picture true (3D in the cover's colours, Liquid in its own); null for none`),
21909
+ atmosphere: canvasShape.atmosphere.describe("Something drifting over the picture: none (default), snow, leaves, petals, embers, sparkles, rain, confetti, hearts or dust (get_options canvas.atmospheres)"),
21910
+ effects: canvasShape.effects.describe('Effects over the whole loop, any picture: up to three of get_options effects (light-leak, god-rays, glow, vignette, film-burn, film-grain, old-footage, shake, mirror, blur, vhs, glitch, rgb-split), each once, as [{"id":"light-leak","amount":0.6}] with an amount 0\u20131 (default 0.6). They repeat with the loop, no seam. Default none'),
21911
+ variations: canvasShape.variations.describe("1\u20134 different Canvases with a clips picture (each draws other clips)"),
21912
+ ...CANVAS_LEGACY_INPUT
21449
21913
  });
21450
21914
  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. Mention characters by @handle (list_characters) to put them in the shots beside the performer (those in the song's artist's kit and those other artists shared, list_characters with for_artist_id; the song's artist's own too when another character performs; in a story with a cast, they are the cast): "@mia-torres dances behind her in the last chorus". An unknown handle, or another artist's piece they haven't shared, answers 400. Pin a change to a moment with a sentence that says on "<words sung>" (on every "\u2026" for each time they are sung) or at m:ss (the song's time), for example: On "Drop it" cut to @rooftop-club. / @grandma appears on "She said yes". / At 1:05 the lights go out. A shot starts exactly there (the plan has one more shot when the usual cut runs over it), set in the first kit place the sentence names, with the characters it names appearing in it (and not in the shot before); shots[].cue shows it. Words the section doesn't sing, or two moments under 2 seconds apart, answer 400`;
21451
21915
  var LOOK_ID = "A music video Look (list_music_video_looks: one made public, or the workspace's own) the video follows: its treatment leads the director and its places and props join the kit. Send its category, style, takes and lipsync too (or your own)";
@@ -21453,21 +21917,19 @@ var LIPSYNC = '"auto" (default: the director has the artist sing the important l
21453
21917
  var KIT_ONLY = "Only what the kit's pictures show: no place, prop, person or lighting change beyond them (every shot in one of the kit's places, lit as in its picture; only the props and the people the brief names). Omitted: on when the brief mentions a kit piece by @handle (an outfit, a place or a prop), off otherwise; send false to let the director add to the kit";
21454
21918
  var CAST_MODE = `Who else may be on screen besides the performer and people: "director" (default when left out: the director may cast up to 3 more, each drawn as a character sheet only after the user says yes: cast_music_video) or "exact" (only who was picked; the song's other people are carried by the scene, an empty chair or a coat left out, never shown). Nobody appears on screen without a character sheet; with nobody cast, crowds and dancers are faceless. A cast-story video with "exact" needs people`;
21455
21919
  var CASTING_ID = `Ordered without a plan: a casting (cast_music_video) the user said yes to in full. Its people still proposed are drawn inside the order (the quote's "New cast" line, at the character sheet price each; only those drawn are charged), kept in the song artist's kit as AI-made and added to people. Not with plan_id or cast_mode exact`;
21456
- 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";
21457
21920
  var musicVideoInput = external_exports.object({
21458
21921
  ...musicShape,
21459
21922
  song_id: songId.describe("The song; its artist performs the video and needs their character (list_characters; start_character makes one), unless performer names another character"),
21460
21923
  callback_url: CALLBACK,
21461
21924
  metadata: METADATA,
21462
21925
  model: musicShape.model.describe("The music video model: one-take (default; MiniMax H3 Max), seedance-2-0, seedance-2-0-fast, seedance-2-0-mini or seedance-2-5. get_options lists the models offered to you with the categories, styles, formats, takes and length each makes, and guide: what each is best for, its strengths, weaknesses and public benchmark scores. When the person hasn't named a model, suggest the kind's recommended_model (get_options music_video.categories) with its best_for line and the price difference between models from quotes, and let them choose any"),
21463
- 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`),
21926
+ 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; the photos are searched and picked in one era and style, world.look, so the places belong together), up to the model's kit.places in all`),
21464
21927
  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) or surreal (the world transforms with the song). get_options lists the ones each model makes"),
21465
21928
  style: musicShape.style.describe("Optional visual style, how it is rendered: natural, film, golden-hour, neon-night, noir, vintage, dreamy, super-8, vhs, documentary, glossy-pop, indie, cyberpunk, y2k, lofi, painterly, anime or clay (get_options lists the ones each model makes). Omit it and the director picks one from the cover"),
21466
21929
  aspect_ratio: musicShape.aspect_ratio.describe('The one format of the file: "9:16" (default, vertical), "16:9" (wide) or "1:1" (square)'),
21467
21930
  takes: musicShape.takes.describe(`How the shots meet: "cuts" (default: shots meet with a cut between the song's lines, like an edit) or "continuous" (the director may carry a shot on into the next through a picture drawn of the moment they meet, priced per picture; the quote before a plan counts every join, the plan's quote only the ones it draws)`),
21468
21931
  trim: musicShape.trim.describe("Perform only this section of the song (15 seconds to 10 minutes); omitted, the whole song (15 seconds to 10 minutes long). The price follows its length. Best: a part from get_song_analysis (parts[]: its start and end never cut a word)"),
21469
21932
  direction: musicShape.direction.describe(DIRECTION),
21470
- lookbook_id: musicShape.lookbook_id.describe(LOOKBOOK_ID),
21471
21933
  look_id: musicShape.look_id.describe(LOOK_ID),
21472
21934
  lipsync: musicShape.lipsync.describe(LIPSYNC),
21473
21935
  kit_only: musicShape.kit_only.describe(KIT_ONLY),
@@ -21481,21 +21943,19 @@ var musicVideoInput = external_exports.object({
21481
21943
  variations: musicShape.variations.describe("1\u20134 different music videos"),
21482
21944
  outro: musicShape.outro.describe("Optional: end on a release card after the last shot, the song playing on under it (the delivered video is up to 5 seconds longer; the director designs it for the video, or look_id: a lyric video Look from list_looks whose card is used as it is). display: title, artist, cover, badges (true/false) and optional cover_scale, text_scale, artist_scale, spacing_scale. Free with the video"),
21483
21945
  refinish: musicShape.refinish.describe("Finish a delivered music video again with another outro, or none (send song_id, refinish.video_id and outro or not; one variation): no shot is made again (its kept shots are joined again under the song), only setup and delivery are charged. Needs the video's revisable_until ahead"),
21484
- test: musicShape.test.describe("With plan_id: test the plan before the whole video. Only its test shots are made (the first chorus, else the sung section with the most lead words; whole shots, about 20 seconds at most), at 480p whatever quality is sent, with the plan's seeds and pictures, for a fraction of the price. The quote and get_video say which shots and seconds (test). It is an ordinary video marked as a test: no outro, one variation, never revised. Then order the whole video from the same plan_id without test"),
21485
- design_shoot: musicShape.design_shoot.describe("Without a plan: the director first designs the shoot (the outfits, places and props the brief leaves open) and draws each as a picture every shot is given. The quote counts the most pictures it may draw; only those drawn are charged")
21946
+ test: musicShape.test.describe("With plan_id: test the plan before the whole video. Only its test shots are made (the first chorus, else the sung section with the most lead words; whole shots, about 20 seconds at most), at 480p whatever quality is sent, with the plan's seeds and pictures, for a fraction of the price. The quote and get_video say which shots and seconds (test). It is an ordinary video marked as a test: no outro, one variation, never revised. Then order the whole video from the same plan_id without test")
21486
21947
  });
21487
21948
  var musicVideoPlanInput = external_exports.object({
21488
21949
  ...MusicVideoPlanRequestSchema.shape,
21489
21950
  song_id: songId.describe("The song; its artist performs the video and needs their character (list_characters; start_character makes one), unless performer names another character"),
21490
21951
  model: musicShape.model.describe("The music video model: one-take (default; MiniMax H3 Max), seedance-2-0, seedance-2-0-fast, seedance-2-0-mini or seedance-2-5. get_options lists the models offered to you with the categories, styles, formats, takes and length each makes, and guide: what each is best for, its strengths, weaknesses and public benchmark scores. When the person hasn't named a model, suggest the kind's recommended_model (get_options music_video.categories) with its best_for line and the price difference between models from quotes, and let them choose any"),
21491
- 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`),
21952
+ 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; the photos are searched and picked in one era and style, world.look, so the places belong together), up to the model's kit.places in all`),
21492
21953
  category: musicShape.category.describe("performance (default), intercut, cinematic, story or surreal"),
21493
21954
  style: musicShape.style.describe("Optional visual style (get_options: music_video.styles); omitted, the director picks one from the cover"),
21494
21955
  aspect_ratio: musicShape.aspect_ratio.describe('"9:16" (default), "16:9" or "1:1"'),
21495
21956
  takes: musicShape.takes.describe(`How the shots meet: "cuts" (default: shots meet with a cut between the song's lines, like an edit) or "continuous" (the director may carry a shot on into the next through a picture drawn of the moment they meet, priced per picture; the quote before a plan counts every join, the plan's quote only the ones it draws)`),
21496
21957
  trim: musicShape.trim.describe("Only this section of the song (15 seconds to 10 minutes); omitted, the whole song (15 seconds to 10 minutes long). Best: a part from get_song_analysis (parts[]: its start and end never cut a word)"),
21497
21958
  direction: musicShape.direction.describe(DIRECTION),
21498
- lookbook_id: musicShape.lookbook_id.describe(LOOKBOOK_ID),
21499
21959
  look_id: musicShape.look_id.describe(LOOK_ID),
21500
21960
  lipsync: musicShape.lipsync.describe(LIPSYNC),
21501
21961
  kit_only: musicShape.kit_only.describe(KIT_ONLY),
@@ -21503,7 +21963,9 @@ var musicVideoPlanInput = external_exports.object({
21503
21963
  performer: musicShape.performer.describe(PERFORMER),
21504
21964
  cast: musicShape.cast.describe(CAST_DESCRIPTION),
21505
21965
  cast_mode: musicShape.cast_mode.describe(CAST_MODE),
21506
- revise: MusicVideoPlanRequestSchema.shape.revise.describe(`Rewrite an earlier plan of this song: {"plan_id":"plan_\u2026","note":"what to change"} (the next draft). It keeps that plan's brief (model, format, style, direction, people, section\u2026): send song_id and revise alone, or with only the brief fields to change`)
21966
+ credits: external_exports.number().int().min(0).max(1e5).describe("The price the user agreed to: list_music_video_drafts price.credits for this song (a rewrite costs the same). A different price answers 409 with the current one (price); without enough credits, 402. Held while it is written, charged once it is saved, nothing when it fails"),
21967
+ revise: MusicVideoPlanRequestSchema.shape.revise.describe(`Rewrite an earlier plan of this song: {"plan_id":"plan_\u2026","note":"what to change"} (the next draft). It keeps that plan's brief (model, format, style, direction, people, section\u2026): send song_id and revise alone, or with only the brief fields to change`),
21968
+ wait: MusicVideoPlanRequestSchema.shape.wait.describe("true (default): answer with the shot list once written (a minute or more). false: answer at once (202) with the shot list being written (id, status writing); read it with get_music_video_plan_write every second or two, its shots arriving as they are written, until status is ready (plan_id) or failed (error). Asking again for the same brief while it is written returns the same one")
21507
21969
  });
21508
21970
  var MusicVideoPlanSchema = external_exports.looseObject({
21509
21971
  id: external_exports.string(),
@@ -21511,7 +21973,8 @@ var MusicVideoPlanSchema = external_exports.looseObject({
21511
21973
  draft: external_exports.number().int().describe("1 for the first plan, n+1 for a rewrite"),
21512
21974
  revision_of: external_exports.string().nullable(),
21513
21975
  note: external_exports.string().nullable(),
21514
- brief: external_exports.record(external_exports.string(), external_exports.unknown()).describe("What it was planned from: model, category, style, aspect_ratio, trim, direction, on_screen, performer, cast"),
21976
+ brief: external_exports.record(external_exports.string(), external_exports.unknown()).describe("What it was planned from: model, category, style, aspect_ratio, trim, direction, on_screen, performer, cast. brief.model is the model it is made with"),
21977
+ written_for: external_exports.string().nullable().optional().describe("The model the director wrote it for: brief.model, or another one when the shot list was moved to brief.model (switch_music_video_model)"),
21515
21978
  title: external_exports.string().nullable().describe("The film's name, as the director titled it"),
21516
21979
  concept: external_exports.string(),
21517
21980
  style: external_exports.string(),
@@ -21522,19 +21985,27 @@ var MusicVideoPlanSchema = external_exports.looseObject({
21522
21985
  character: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }),
21523
21986
  name: external_exports.string(),
21524
21987
  wardrobe: external_exports.string(),
21525
- outfit: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }).nullable().optional().describe("The kit outfit they wear throughout (drawn on their sheet by the lookbook, or picked in the brief); null: the director dresses them")
21988
+ outfit: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }).nullable().optional().describe("The kit outfit they wear throughout (picked in the brief); null: the director dresses them")
21526
21989
  })).optional().describe("The other characters in its shots (mentioned by @handle in direction: the artist's own and those other artists shared), each in one outfit throughout"),
21527
21990
  on_screen: external_exports.enum(["artist", "cast", "none"]).optional().describe("Who is on screen: the artist, a cast or no one"),
21528
21991
  revision: external_exports.object({ video_id: external_exports.string(), shots: external_exports.array(external_exports.number().int()), asked: external_exports.array(external_exports.number().int()).optional().describe("The shots the artist asked to change, each rewritten from its note (shots adds those carried straight on from them)") }).nullable().describe("A revision of a delivered music video (revise_music_video_shot): that video, and the shots made again (the others are reused as they were); null for a plan of a new video"),
21529
- world: external_exports.object({ setting: external_exports.string(), wardrobe: external_exports.string(), light: external_exports.string() }).describe("What every shot keeps"),
21992
+ world: external_exports.object({ setting: external_exports.string(), look: external_exports.string().nullable().optional().describe('The era and style every place of the video shares ("modern minimalist", "1970s retro"): its places are found and drawn in it so they belong together; null on shot lists written before 2026-11-23'), wardrobe: external_exports.string(), light: external_exports.string() }).describe("What every shot keeps"),
21530
21993
  places: external_exports.array(external_exports.object({
21531
21994
  index: external_exports.number().int(),
21532
21995
  description: external_exports.string(),
21533
21996
  kit: external_exports.object({ id: external_exports.string(), name: external_exports.string(), handle: external_exports.string() }).nullable(),
21534
- 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()
21535
- })).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"),
21997
+ 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(),
21998
+ drawn: external_exports.boolean().optional().describe("A place drawn as a picture (no kit piece or photo): a place the director wrote, or an angle. list_music_video_pictures shows its picture once drawn"),
21999
+ angle: external_exports.object({
22000
+ of: external_exports.number().int().describe("The place it is an angle of (places[].index)"),
22001
+ from: external_exports.number().int().nullable().describe("The angle beside it that it is drawn from too, or null"),
22002
+ kind: external_exports.enum(KIT_ANGLES).nullable().describe("The kind of angle. New values may be added"),
22003
+ camera: external_exports.string().describe("Where the camera stands, in the director's words")
22004
+ }).nullable().optional().describe("An angle of another place: the same set from another camera position, which shots cut to for coverage; null for a place")
22005
+ })).describe("The places it is set in: kit pieces (kit), stock photos the director found (photo), places drawn as pictures (drawn), and the angles of each (angle). Empty: every place is imagined (plans made before drawn places)"),
21536
22006
  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"),
21537
22007
  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"),
22008
+ designed_props: external_exports.array(external_exports.object({ index: external_exports.number().int().describe("Numbered after the kit props"), name: external_exports.string(), description: external_exports.string() })).optional().describe("The props the director designed (no kit piece), numbered after props: each drawn from its words as a picture of the object alone (list_music_video_pictures)"),
21538
22009
  joins: external_exports.number().int().describe("In a continuous take, the joins drawn as pictures (priced per picture); 0 otherwise"),
21539
22010
  shots: external_exports.array(external_exports.object({
21540
22011
  index: external_exports.number().int(),
@@ -21545,7 +22016,7 @@ var MusicVideoPlanSchema = external_exports.looseObject({
21545
22016
  summary: external_exports.string().describe("What we see"),
21546
22017
  places: external_exports.array(external_exports.number().int()).describe("The places it happens in (numbers into places)"),
21547
22018
  outfit: external_exports.number().int().nullable().describe("The kit outfit worn (a number into outfits), or null: the world's wardrobe (world.wardrobe)"),
21548
- props: external_exports.array(external_exports.number().int()).describe("The kit props seen (numbers into props)"),
22019
+ props: external_exports.array(external_exports.number().int()).describe("The props seen (numbers into props, then designed_props)"),
21549
22020
  people: external_exports.array(external_exports.number().int()).optional().describe("The other characters in the shot, as they stand (numbers into people)"),
21550
22021
  continues: external_exports.boolean().describe("It carries straight on from the shot before (a continuous take), with no cut"),
21551
22022
  performance: external_exports.enum(MUSIC_VIDEO_PERFORMANCES).describe("sings: the artist sings it on camera (lip-synced); plays: they play an instrument to it; over: the song plays over the shot and nobody sings on camera. New values may be added"),
@@ -21612,14 +22083,14 @@ var VideoSchema = external_exports.looseObject({
21612
22083
  request: external_exports.record(external_exports.string(), external_exports.unknown()).describe("What the video was made from, with your metadata"),
21613
22084
  look_id: external_exports.string().nullable(),
21614
22085
  look: external_exports.record(external_exports.string(), external_exports.unknown()).nullable(),
21615
- canvas: external_exports.record(external_exports.string(), external_exports.unknown()).nullable().optional().describe("A Canvas: its design and, for stock, the credit to show"),
22086
+ canvas: external_exports.record(external_exports.string(), external_exports.unknown()).nullable().optional().describe("A Canvas: what it was made from (picture, loop, seconds) and, for stock, the credit to show"),
21616
22087
  music_video: external_exports.object({
21617
22088
  title: external_exports.string().nullable(),
21618
22089
  concept: external_exports.string().describe("The idea, in a sentence or three"),
21619
22090
  style: external_exports.string().describe("The visual style it was made in (the one asked for, or the director's pick)"),
21620
22091
  clips: external_exports.number().int().describe("How many clips it is generated in"),
21621
22092
  on_screen: external_exports.enum(["artist", "cast", "none"]).optional().describe("Who is on screen: the artist, a cast or no one"),
21622
- world: external_exports.object({ setting: external_exports.string(), wardrobe: external_exports.string(), light: external_exports.string() }),
22093
+ world: external_exports.object({ setting: external_exports.string(), look: external_exports.string().nullable().optional().describe('The era and style every place of the video shares ("modern minimalist", "1970s retro"): its places are found and drawn in it so they belong together; null on shot lists written before 2026-11-23'), wardrobe: external_exports.string(), light: external_exports.string() }),
21623
22094
  shots: external_exports.array(external_exports.object({
21624
22095
  index: external_exports.number().int(),
21625
22096
  start_seconds: external_exports.number(),
@@ -21657,7 +22128,7 @@ var OPERATIONS = [
21657
22128
  group: "account",
21658
22129
  title: "Get the account",
21659
22130
  summary: "Who you are signed in as, the organization (workspace) and its credit balance",
21660
- description: "Returns the organization the credentials act for (the workspace, as the app calls it; type artist holds one artist, label a roster, creator projects), how they authenticate and their scopes, the credit balance (available, monthly, top-ups) and its plan, if any: active says whether it lets the workspace create (without an active plan, creating answers 402 plan_required), storage (used_bytes against limit_bytes: an upload or new video that does not fit answers 402 storage_full, and deleting videos or archiving songs frees space at once), where it is billed, when the period ends, and a downgrade or interval switch waiting for the renewal as scheduled_change. Without a plan, free_song says where the person's one free song stands (signed in as them, never with an API key, where it is null, as it is with a plan): available (upload one song now, with create_song; it plays in the Looks), unverified (they confirm their email first), used (its song_id and title, and video: available true while its one free video is still to make, video_id once it is) or taken (it went to another workspace or account). The free video is a lyric video of the free song with an existing Look (look.mode existing) in one aspect ratio, of at most " + FREE_VIDEO_MAX_SECONDS + " seconds of it (a trim: a part of a longer song), quoted and created as usual: it holds no credits; anything else answers 402 plan_required. Monthly credits reset every month; top-ups never expire. On the organization, " + IMAGE_FALLBACK + " Check it before creating anything.",
22131
+ description: "Returns the organization the credentials act for (the workspace, as the app calls it; type artist holds one artist, label a roster, creator projects), how they authenticate and their scopes, the credit balance (available, monthly, top-ups) and its plan, if any: active says whether it lets the workspace create (without an active plan, creating answers 402 plan_required), storage (used_bytes against limit_bytes: an upload or new video that does not fit answers 402 storage_full, and deleting videos or archiving songs frees space at once), limits.clip_sources (how many clip sources, library moods and your folders together, one clips video may draw from on this plan; more answers 402 plan_required), where it is billed, when the period ends, and a downgrade or interval switch waiting for the renewal as scheduled_change. Without a plan, free_song says where the person stands on the Free plan (signed in as them, never with an API key, where it is null, as it is with a plan): songs_per_month new songs, videos_per_month lyric videos and canvases_per_month Canvases a month, starting again at resets_at (UTC months). state is this month's free song: available (upload it now, with create_song), unverified (they confirm their email first), used (its song_id and title) or taken (it went to another workspace or account). video and canvas, once the workspace has a free song: each kind's made and left this month, available while left is above 0. A free video is a lyric video of one of the workspace's free songs in one aspect ratio, of at most video_max_seconds of it (a trim: a part of a longer song), or a Canvas of it from clips, the cover or a visualizer (not a generated picture), quoted and created as usual: it holds no credits; anything else answers 402 plan_required. Monthly credits reset every month; top-ups never expire. On the organization, " + IMAGE_FALLBACK + " Check it before creating anything.",
21661
22132
  method: "GET",
21662
22133
  path: "/api/v1/account",
21663
22134
  scopes: ["videos:read", "music:read", "library:read"],
@@ -21673,7 +22144,7 @@ var OPERATIONS = [
21673
22144
  group: "account",
21674
22145
  title: "Send a file from your computer",
21675
22146
  summary: "A signed upload URL for a local file, and the file_url to use it",
21676
- description: `For an agent that has a file on the person's computer but can only pass URLs (the CLI sends files itself): returns upload_url, where you PUT the file's bytes within an hour with the headers given, e.g. curl -X PUT -H "content-type: image/png" --upload-file desk.png "<upload_url>"; then pass file_url in any *_url field within a day: create_song (audio_url, cover_art_url), add_kit_piece (file_url), start_character (photo_urls), upload_background (file_url), set_artist_image (image_url). That field checks the file like an upload (format, size, rights) and keeps its own copy; this one is deleted after a day. size_bytes must be the file's exact size (up to ${UPLOAD_MAX_BYTES / 1024 / 1024} MB), content_type its type. Up to 100 files a day; without a plan, only a free song's audio and cover.`,
22147
+ description: `For an agent that has a file on the person's computer but can only pass URLs (the CLI sends files itself): returns upload_url, where you PUT the file's bytes within an hour with the headers given, e.g. curl -X PUT -H "content-type: image/png" --upload-file desk.png "<upload_url>"; then pass file_url in any *_url field within a day: create_song (audio_url, cover_art_url), add_kit_piece (file_url), start_character (photo_urls), import_clips (file_url, into a clip folder), set_artist_image (image_url). That field checks the file like an upload (format, size, rights) and keeps its own copy; this one is deleted after a day. size_bytes must be the file's exact size (up to ${UPLOAD_MAX_BYTES / 1024 / 1024} MB), content_type its type. Up to 100 files a day; without a plan, only a free song's audio and cover.`,
21677
22148
  method: "POST",
21678
22149
  path: "/api/v1/uploads",
21679
22150
  scopes: ["music:write", "videos:write"],
@@ -21694,8 +22165,8 @@ var OPERATIONS = [
21694
22165
  id: "options.get",
21695
22166
  group: "account",
21696
22167
  title: "List the options",
21697
- summary: "Video types, Look categories, background sources, formats and the current credit prices",
21698
- description: "Everything a request can choose from, with the credit table (plans and credit_packs: the plan catalog the app shows, each plan's monthly credits, limits, features and shelf, its prices in cents and the app's highlighted one, and each pack's credits and price; reference only, nothing is bought through the API; music_video.categories: each kind, with demos, the real music videos of it Kinetune chose: one per model (model: its id) and a fallback (model null) for a model without its own; each with sound in video_url, a few silent seconds from its poster moment hover_seconds in hover_url, its poster in still_url, made_with: the model and quality it was made with, and story: its brief, the director's idea and its shots; signed for about a week. Show the one for the model in hand, else the fallback; demo is the fallback alone, as before. music_video.styles: each visual style (how the video is rendered), with its one picture: image_url (512 px square WebP) and thumbnail_url (160 px); its demo and demos are deprecated (still given until 2027-05-05: use image_url). music_video.models[].guide: what each model is best for (best_for), its strengths and weaknesses, the kinds it suits, its sharpest resolution (max_quality), public benchmark scores (board, entry, score, source, url, date) and page_url, the page comparing them; music_video.categories[].recommended_model: the offered model to suggest for that kind when the person hasn't named one. The catalog is set by Kinetune's admins and can change; a subscription keeps what it was bought with. credits.character_sheet: what drawing one character sheet costs now (draw_character_sheet). credits.cover: what a round of covers costs now, counts by how many (1 to 4), and redraw, one cover redrawn with a note (make_cover, redraw_cover). credits.examples: what a lyric video of a song_seconds song costs now in one 9:16 format, by how its Look is made (saved_look, new_look, new_look_ai_video), and clips: the same for the parts of a song people post (seconds: 15, 30, 60). Use it to pick a category or source and to explain prices.",
22168
+ summary: "Video types, lyric styles, clip moods, formats and the current credit prices",
22169
+ description: "Everything a request can choose from, with the credit table (plans and credit_packs: the plan catalog the app shows, each plan's monthly credits, limits, features and shelf, its prices in cents and the app's highlighted one, and each pack's credits and price; reference only, nothing is bought through the API; music_video.categories: each kind, with demos, the real music videos of it Kinetune chose: one per model (model: its id) and a fallback (model null) for a model without its own; each with sound in video_url, a few silent seconds from its poster moment hover_seconds in hover_url, its poster in still_url, made_with: the model and quality it was made with, and story: its brief, the director's idea and its shots; signed for about a week. Show the one for the model in hand, else the fallback; demo is the fallback alone, as before. music_video.styles: each visual style (how the video is rendered), with its one picture: image_url (512 px square WebP) and thumbnail_url (160 px); its demo and demos are deprecated (still given until 2027-05-05: use image_url). music_video.models[].guide: what each model is best for (best_for), its strengths and weaknesses, the kinds it suits, its sharpest resolution (max_quality), public benchmark scores (board, entry, score, source, url, date) and page_url, the page comparing them; music_video.categories[].recommended_model: the offered model to suggest for that kind when the person hasn't named one. The catalog is set by Kinetune's admins and can change; a subscription keeps what it was bought with. credits.character_sheet: what drawing one character sheet costs now (draw_character_sheet). credits.cover: what a round of covers costs now, counts by how many (1 to 4), and redraw, one cover redrawn with a note (make_cover, redraw_cover). credits.examples: what a lyric video of a song_seconds song costs now in one 9:16 format, as lyric_video, and clips: the same for the parts of a song people post (seconds: 15, 30, 60). clip_moods: Stock, the clip collections Kinetune keeps for everyone (free): each with id, name, group (kinetune or stock) and group_name, the heading people see (Feelings: moods, mostly tall; Places & textures: real footage), clips (how many are ready), tall and wide (how many of each shape) and poster_url; browse_clip_mood looks inside one. Use it to pick a category or source and to explain prices.",
21699
22170
  method: "GET",
21700
22171
  path: "/api/v1/options",
21701
22172
  scopes: ["videos:read", "music:read", "library:read"],
@@ -21788,7 +22259,7 @@ var OPERATIONS = [
21788
22259
  method: "POST",
21789
22260
  path: "/api/v1/artists",
21790
22261
  scopes: ["music:write", "videos:write"],
21791
- input: external_exports.object({ name: external_exports.string().trim().min(1).max(200).describe("The artist name") }),
22262
+ input: external_exports.object({ name: external_exports.string().trim().min(1).max(200).describe("The artist name"), catalog_artist_id: external_exports.string().regex(/^\d{1,15}$/).optional(), catalog_confirmed: external_exports.boolean().optional().describe("Set true after the user confirms they manage the selected artist") }),
21792
22263
  readOnly: false,
21793
22264
  destructive: false,
21794
22265
  idempotent: false,
@@ -21825,6 +22296,7 @@ var OPERATIONS = [
21825
22296
  artist_id: artistId,
21826
22297
  name: external_exports.string().trim().min(1).max(200).optional().describe("The new name"),
21827
22298
  catalog_artist_id: external_exports.string().regex(/^\d{1,15}$/).nullable().optional().describe("Their catalog profile id (find_artist_in_catalog), or null to unlink"),
22299
+ catalog_confirmed: external_exports.boolean().optional().describe("Required and true when connecting a catalog profile"),
21828
22300
  spotify_artist_id: external_exports.string().max(200).nullable().optional().describe("Their Spotify artist id or open.spotify.com/artist link, or null"),
21829
22301
  links: external_exports.record(external_exports.enum(ARTIST_LINK_KINDS), external_exports.string().max(500).nullable()).optional().describe("Their pages by site: apple_music, spotify, youtube, instagram, tiktok, website (https); null removes one")
21830
22302
  }),
@@ -21840,7 +22312,7 @@ var OPERATIONS = [
21840
22312
  group: "artists",
21841
22313
  title: "Find an artist\u2019s released songs",
21842
22314
  summary: "Search the music catalog for an artist by name, to link their released songs",
21843
- description: "The public music catalog (Apple Music\u2019s; no account or login): each match with its id, name, song_count, newest_release and up to five covers of their releases (picture_url, covers), so the user can tell which profile is theirs. Search by the full name they release under (partial names often miss), or pass their Apple Music artist link. Then link_artist with the id the user confirms. Only for the user\u2019s own music: they must own or have the rights to the songs they bring in.",
22315
+ description: "The public music catalog (Apple Music\u2019s; no account or login): each match with its id, name, song_count, newest_release and up to five covers of their releases (picture_url, covers), so the user can tell which profile is theirs. Search by the full name they release under (exact matches only), or pass their Apple Music artist link. Then link_artist with the id the user confirms. Only for the user\u2019s own music: they must own or have the rights to the songs they bring in.",
21844
22316
  method: "GET",
21845
22317
  path: "/api/v1/catalog/artists",
21846
22318
  scopes: ["music:read", "videos:read"],
@@ -21857,17 +22329,17 @@ var OPERATIONS = [
21857
22329
  group: "artists",
21858
22330
  title: "Link an artist to their released songs",
21859
22331
  summary: "Set the artist\u2019s catalog profile, once: their released songs are then listed to import",
21860
- description: "catalog_artist_id from find_artist_in_catalog, confirmed by the user. Also sets their Apple Music link (links.apple_music) unless one is set. Linking again replaces it; unlink with update_artist catalog_artist_id null. Then list_released_songs and import_songs.",
22332
+ description: "Available to Artist and Label workspaces. Send catalog_artist_id from find_artist_in_catalog with catalog_confirmed=true after the user confirms they manage the selected profile. The artist names must match exactly. Also sets their Apple Music link (links.apple_music) unless one is set. Linking again replaces it; unlink with update_artist catalog_artist_id null. Then list_released_songs and import_songs.",
21861
22333
  method: "POST",
21862
22334
  path: "/api/v1/artists/{artist_id}/catalog",
21863
22335
  scopes: ["music:write", "videos:write"],
21864
- input: external_exports.object({ artist_id: artistId, catalog_artist_id: external_exports.string().regex(/^\d{1,15}$/).describe("Their catalog profile id (find_artist_in_catalog)") }),
22336
+ input: external_exports.object({ artist_id: artistId, catalog_artist_id: external_exports.string().regex(/^\d{1,15}$/).describe("Their catalog profile id (find_artist_in_catalog)"), catalog_confirmed: external_exports.boolean().optional().describe("Set true after the user confirms they manage the selected artist") }),
21865
22337
  readOnly: false,
21866
22338
  destructive: false,
21867
22339
  idempotent: true,
21868
22340
  cli: ["artists", "link"],
21869
22341
  mcp: "link_artist",
21870
- example: { artist_id: "artist_\u2026", catalog_artist_id: "6803333408" }
22342
+ example: { artist_id: "artist_\u2026", catalog_artist_id: "6803333408", catalog_confirmed: true }
21871
22343
  },
21872
22344
  {
21873
22345
  id: "artists.archive",
@@ -21923,6 +22395,254 @@ var OPERATIONS = [
21923
22395
  cli: ["artists", "image", "remove"],
21924
22396
  mcp: "remove_artist_image"
21925
22397
  },
22398
+ /* Artist pages and profiles (docs/features/08-artist-page.md) */
22399
+ {
22400
+ id: "artists.profiles.list",
22401
+ group: "artists",
22402
+ title: "List an artist\u2019s profiles",
22403
+ summary: "The artist\u2019s links on other services, with the automatic search\u2019s state",
22404
+ description: "Their profiles on music, social, video and ticket services (several per service allowed), in the order the page shows them. source: apple (from the Apple Music connection), discovered (found automatically; new ones have confirmed false until the user says they are theirs) or manual (added). state: shown or hidden. discovery.state: running, found, not_found (nothing found yet; looked again weekly), failed (try discover_artist_profiles again) or idle. Never trust a discovered profile the user has not confirmed: only confirmed ones (and the ones added by hand) are on the page. removed: the ones the user removed (searches never add them again); update_artist_profile state shown brings one back.",
22405
+ method: "GET",
22406
+ path: "/api/v1/artists/{artist_id}/profiles",
22407
+ scopes: ["music:read", "videos:read"],
22408
+ input: external_exports.object({ artist_id: artistId }),
22409
+ readOnly: true,
22410
+ destructive: false,
22411
+ idempotent: true,
22412
+ cli: ["artists", "profiles", "list"],
22413
+ mcp: "list_artist_profiles",
22414
+ output: { name: "ArtistProfiles", schema: external_exports.object({ profiles: external_exports.array(ArtistLinkSchema), removed: external_exports.array(ArtistLinkSchema), discovery: ArtistDiscoverySchema }) }
22415
+ },
22416
+ {
22417
+ id: "artists.profiles.confirm_all",
22418
+ group: "artists",
22419
+ title: "Add every found profile",
22420
+ summary: "Say every profile the automatic search found is the artist\u2019s",
22421
+ description: "Confirms every discovered profile still waiting (confirmed false, shown): they go on the page at once. Only when the user says all of them are theirs. Answers how many and the list.",
22422
+ method: "POST",
22423
+ path: "/api/v1/artists/{artist_id}/profiles/confirm",
22424
+ scopes: ["music:write", "videos:write"],
22425
+ input: external_exports.object({ artist_id: artistId }),
22426
+ readOnly: false,
22427
+ destructive: false,
22428
+ idempotent: true,
22429
+ cli: ["artists", "profiles", "confirm-all"],
22430
+ mcp: "confirm_all_artist_profiles"
22431
+ },
22432
+ {
22433
+ id: "artists.profiles.add",
22434
+ group: "artists",
22435
+ title: "Add a profile",
22436
+ summary: "Add one of the artist\u2019s links (any service; it is recognised from the address)",
22437
+ description: 'Any https link: the service is recognised from the address (platform overrides it; it must then be on that service\u2019s site). Added links are confirmed. title replaces the service name on the page (e.g. "Tour dates"). 409 when the same link is already there.',
22438
+ method: "POST",
22439
+ path: "/api/v1/artists/{artist_id}/profiles",
22440
+ scopes: ["music:write", "videos:write"],
22441
+ input: external_exports.object({ artist_id: artistId, url: external_exports.string().min(3).max(2e3).describe("The link (https)"), platform: external_exports.string().max(40).optional().describe("The service id when the address alone doesn\u2019t say it"), title: external_exports.string().max(80).optional().describe("A title shown instead of the service name") }),
22442
+ readOnly: false,
22443
+ destructive: false,
22444
+ idempotent: false,
22445
+ cli: ["artists", "profiles", "add"],
22446
+ mcp: "add_artist_profile",
22447
+ output: { name: "ArtistProfile", schema: ArtistLinkSchema },
22448
+ example: { artist_id: "artist_\u2026", url: "https://www.instagram.com/novalane" }
22449
+ },
22450
+ {
22451
+ id: "artists.profiles.reorder",
22452
+ group: "artists",
22453
+ title: "Order the profiles",
22454
+ summary: "Put the artist\u2019s profiles in a new order",
22455
+ description: "order: profile ids, first to last; profiles left out keep their place after them.",
22456
+ method: "PATCH",
22457
+ path: "/api/v1/artists/{artist_id}/profiles",
22458
+ scopes: ["music:write", "videos:write"],
22459
+ input: external_exports.object({ artist_id: artistId, order: external_exports.array(external_exports.string().max(60)).max(200).describe("Profile ids in order") }),
22460
+ readOnly: false,
22461
+ destructive: false,
22462
+ idempotent: true,
22463
+ cli: ["artists", "profiles", "order"],
22464
+ mcp: "reorder_artist_profiles"
22465
+ },
22466
+ {
22467
+ id: "artists.profiles.update",
22468
+ group: "artists",
22469
+ title: "Change a profile",
22470
+ summary: "Confirm, hide, show, retitle or correct one of the artist\u2019s profiles",
22471
+ description: "Send only what changes. confirmed true: the user says this found profile is theirs. state hidden keeps it off the page; state shown on a removed profile brings it back. A corrected url or a title marks it as the user\u2019s own: automatic searches leave it alone from then on.",
22472
+ method: "PATCH",
22473
+ path: "/api/v1/artists/{artist_id}/profiles/{profile_id}",
22474
+ scopes: ["music:write", "videos:write"],
22475
+ input: external_exports.object({ artist_id: artistId, profile_id: id2("profile"), url: external_exports.string().max(2e3).optional(), title: external_exports.string().max(80).nullable().optional(), state: external_exports.enum(["shown", "hidden"]).optional(), confirmed: external_exports.boolean().optional(), position: external_exports.number().int().min(0).optional() }),
22476
+ readOnly: false,
22477
+ destructive: false,
22478
+ idempotent: true,
22479
+ cli: ["artists", "profiles", "update"],
22480
+ mcp: "update_artist_profile",
22481
+ output: { name: "ArtistProfile", schema: ArtistLinkSchema }
22482
+ },
22483
+ {
22484
+ id: "artists.profiles.remove",
22485
+ group: "artists",
22486
+ title: "Remove a profile",
22487
+ summary: "Remove one of the artist\u2019s profiles for good",
22488
+ description: "It leaves the page, and automatic searches never add the same link again; it stays listed in removed, and update_artist_profile state shown brings it back. To keep it but not show it, update_artist_profile state hidden.",
22489
+ method: "DELETE",
22490
+ path: "/api/v1/artists/{artist_id}/profiles/{profile_id}",
22491
+ scopes: ["music:write", "videos:write"],
22492
+ input: external_exports.object({ artist_id: artistId, profile_id: id2("profile") }),
22493
+ readOnly: false,
22494
+ destructive: true,
22495
+ idempotent: true,
22496
+ cli: ["artists", "profiles", "remove"],
22497
+ mcp: "remove_artist_profile"
22498
+ },
22499
+ {
22500
+ id: "artists.profiles.discover",
22501
+ group: "artists",
22502
+ title: "Find the artist\u2019s profiles",
22503
+ summary: "Look for the artist\u2019s profiles on other services again, from their Apple Music connection",
22504
+ description: "Runs in the background (answers 202 with discovery.state running): a few seconds later list_artist_profiles shows what was found, new ones unconfirmed. Needs the Apple Music connection (link_artist) or a confirmed Spotify profile (409 not_connected otherwise). Profiles the user added, edited or removed are never changed. Connecting Apple Music starts one by itself.",
22505
+ method: "POST",
22506
+ path: "/api/v1/artists/{artist_id}/profiles/discover",
22507
+ scopes: ["music:write", "videos:write"],
22508
+ input: external_exports.object({ artist_id: artistId }),
22509
+ readOnly: false,
22510
+ destructive: false,
22511
+ idempotent: true,
22512
+ cli: ["artists", "profiles", "discover"],
22513
+ mcp: "discover_artist_profiles"
22514
+ },
22515
+ {
22516
+ id: "artists.page.get",
22517
+ group: "artists",
22518
+ title: "Get the artist page",
22519
+ summary: "The artist\u2019s page at kinetune.com/@handle: its address, status and draft",
22520
+ description: 'Available to Artist and Label workspaces. status: no_handle (claim one with claim_artist_handle), draft (never published), live, unpublished, in_review (a staff check before an artist with a large audience goes live) or offline (the workspace is a Creator one). has_changes: the draft differs from what fans see. draft: the page as edited (theme, look, name, photo, genres, place, social icons, sections). extras: the plan includes a year of stats, no "Made with Kinetune" and the artist\u2019s own tracking.',
22521
+ method: "GET",
22522
+ path: "/api/v1/artists/{artist_id}/page",
22523
+ scopes: ["music:read", "videos:read"],
22524
+ input: external_exports.object({ artist_id: artistId }),
22525
+ readOnly: true,
22526
+ destructive: false,
22527
+ idempotent: true,
22528
+ cli: ["artists", "page", "get"],
22529
+ mcp: "get_artist_page"
22530
+ },
22531
+ {
22532
+ id: "artists.page.update",
22533
+ group: "artists",
22534
+ title: "Edit the artist page",
22535
+ summary: "Change the page\u2019s draft: look, photo, genres, sections, featured music and videos",
22536
+ description: "Send only the fields that change; sections replaces the whole list (their order is the page\u2019s). Section types: out_now (release newest or pinned; plays video or cover; buttons: service ids), listen (platforms in order), videos (items: kinetune video_id of a finished video of this artist, or embed url on YouTube, Vimeo or TikTok), releases (all or picked; hidden release ids; count 4, 8 or 0 for all), links (profile ids from list_artist_profiles; big: one drawn big), about (text), looks. Fans see changes only after publish_artist_page. tracking (GA4, Meta Pixel, TikTok Pixel ids) needs a plan with the page extras (402).",
22537
+ method: "PATCH",
22538
+ path: "/api/v1/artists/{artist_id}/page",
22539
+ scopes: ["music:write", "videos:write"],
22540
+ input: PageDocPatchSchema.extend({ artist_id: artistId }),
22541
+ readOnly: false,
22542
+ destructive: true,
22543
+ idempotent: true,
22544
+ cli: ["artists", "page", "update"],
22545
+ mcp: "update_artist_page",
22546
+ example: { artist_id: "artist_\u2026", theme: "paper", genres: ["Alt-pop"], place: "Montr\xE9al" }
22547
+ },
22548
+ {
22549
+ id: "artists.page.preview",
22550
+ group: "artists",
22551
+ title: "Preview the artist page",
22552
+ summary: "The draft as fans will see it once published",
22553
+ description: "The same shape as the live page: the artist, the resolved look, social icons and every section with its releases, videos and links.",
22554
+ method: "GET",
22555
+ path: "/api/v1/artists/{artist_id}/page/preview",
22556
+ scopes: ["music:read", "videos:read"],
22557
+ input: external_exports.object({ artist_id: artistId }),
22558
+ readOnly: true,
22559
+ destructive: false,
22560
+ idempotent: true,
22561
+ cli: ["artists", "page", "preview"],
22562
+ mcp: "preview_artist_page"
22563
+ },
22564
+ {
22565
+ id: "artists.page.publish",
22566
+ group: "artists",
22567
+ title: "Publish the artist page",
22568
+ summary: "Put the draft live at kinetune.com/@handle",
22569
+ description: "Owners and admins. Needs an address (claim_artist_handle) and the Apple Music connection or at least one song. One live page per Apple Music artist across Kinetune (409 claimed). An artist with a large audience goes to in_review first. Ask the user before publishing.",
22570
+ method: "POST",
22571
+ path: "/api/v1/artists/{artist_id}/page/publish",
22572
+ scopes: ["music:write", "videos:write"],
22573
+ input: external_exports.object({ artist_id: artistId }),
22574
+ readOnly: false,
22575
+ destructive: false,
22576
+ idempotent: true,
22577
+ cli: ["artists", "page", "publish"],
22578
+ mcp: "publish_artist_page"
22579
+ },
22580
+ {
22581
+ id: "artists.page.unpublish",
22582
+ group: "artists",
22583
+ title: "Unpublish the artist page",
22584
+ summary: "Take the page offline (everything is kept)",
22585
+ description: "Owners and admins. The address, draft and stats are kept; publishing again brings it back.",
22586
+ method: "POST",
22587
+ path: "/api/v1/artists/{artist_id}/page/unpublish",
22588
+ scopes: ["music:write", "videos:write"],
22589
+ input: external_exports.object({ artist_id: artistId }),
22590
+ readOnly: false,
22591
+ destructive: true,
22592
+ idempotent: true,
22593
+ cli: ["artists", "page", "unpublish"],
22594
+ mcp: "unpublish_artist_page"
22595
+ },
22596
+ {
22597
+ id: "artists.page.stats",
22598
+ group: "artists",
22599
+ title: "Artist page stats",
22600
+ summary: "Views, visitors, clicks and click rate, by day, service, link and referrer",
22601
+ description: "days: the period, up to 30 without the page extras (max_days says the limit), a year with them. Visitors are counted once a day without cookies; nothing personal is kept.",
22602
+ method: "GET",
22603
+ path: "/api/v1/artists/{artist_id}/page/stats",
22604
+ scopes: ["music:read", "videos:read"],
22605
+ input: external_exports.object({ artist_id: artistId, days: external_exports.number().int().min(1).max(365).optional().describe("The period in days (default 30)") }),
22606
+ readOnly: true,
22607
+ destructive: false,
22608
+ idempotent: true,
22609
+ cli: ["artists", "page", "stats"],
22610
+ mcp: "get_artist_page_stats"
22611
+ },
22612
+ {
22613
+ id: "artists.handle.claim",
22614
+ group: "artists",
22615
+ title: "Claim the page address",
22616
+ summary: "Claim or change the artist page\u2019s address (kinetune.com/@handle)",
22617
+ description: 'Owners and admins. 3 to 30 lowercase letters, numbers, "." and "_"; case doesn\u2019t matter. check_handle first. When the address is the caller\u2019s own username (problem yours), take_from_profile true moves it here and their creator profile gets a new username. A changed address forwards for 90 days; it can change 3 times in 30 days.',
22618
+ method: "POST",
22619
+ path: "/api/v1/artists/{artist_id}/handle",
22620
+ scopes: ["music:write", "videos:write"],
22621
+ input: external_exports.object({ artist_id: artistId, handle: external_exports.string().min(3).max(31).describe("The address, without kinetune.com/@"), take_from_profile: external_exports.boolean().optional().describe("Move your own username here") }),
22622
+ readOnly: false,
22623
+ destructive: false,
22624
+ idempotent: true,
22625
+ cli: ["artists", "page", "claim"],
22626
+ mcp: "claim_artist_handle",
22627
+ example: { artist_id: "artist_\u2026", handle: "novalane" }
22628
+ },
22629
+ {
22630
+ id: "handles.check",
22631
+ group: "artists",
22632
+ title: "Check a page address",
22633
+ summary: "Whether kinetune.com/@handle is free, with suggestions",
22634
+ description: "available, or problem: invalid, reserved, taken, or yours (it is your own username, which can move to the page: claim_artist_handle take_from_profile). artist_id makes the artist\u2019s own current address count as free and suggestions come from their name.",
22635
+ method: "GET",
22636
+ path: "/api/v1/handles/{handle}",
22637
+ scopes: ["music:read", "videos:read"],
22638
+ input: external_exports.object({ handle: external_exports.string().min(1).max(60).describe("The address to check"), artist_id: artistId.optional() }),
22639
+ readOnly: true,
22640
+ destructive: false,
22641
+ idempotent: true,
22642
+ cli: ["artists", "page", "check"],
22643
+ mcp: "check_handle",
22644
+ example: { handle: "novalane" }
22645
+ },
21926
22646
  /* The artist kit */
21927
22647
  {
21928
22648
  id: "characters.list",
@@ -22174,7 +22894,7 @@ var OPERATIONS = [
22174
22894
  method: "GET",
22175
22895
  path: "/api/v1/kit/{kit_id}",
22176
22896
  scopes: ["music:read", "videos:read"],
22177
- input: external_exports.object({ kit_id: id("kit piece") }),
22897
+ input: external_exports.object({ kit_id: id2("kit piece") }),
22178
22898
  readOnly: true,
22179
22899
  destructive: false,
22180
22900
  idempotent: true,
@@ -22186,19 +22906,19 @@ var OPERATIONS = [
22186
22906
  group: "artists",
22187
22907
  title: "Change a kit piece",
22188
22908
  summary: "Rename it, change its handle or description, crop it again, or share it",
22189
- description: "crop is cut again from the image the piece was added from. kept true keeps another angle of a place that is pending (a brief can mention it then). shared: offer it (a character too) to every other artist's songs (true), or keep it to its own artist's (false); it stays in its own artist's kit either way. ai_made, on a character only: an AI-made person who looks like no real person (true), or a real one (false); a person who passed a face check is real (withdraw it first). Plans already made keep the pieces as they were planned.",
22909
+ description: "crop is cut again from the image the piece was added from. kept true keeps a pending piece: another angle of a place, or a picture drawn for a shot list (a brief can mention it then). shared: offer it (a character too) to every other artist's songs (true), or keep it to its own artist's (false); it stays in its own artist's kit either way. ai_made, on a character only: an AI-made person who looks like no real person (true), or a real one (false); a person who passed a face check is real (withdraw it first). Plans already made keep the pieces as they were planned.",
22190
22910
  method: "PATCH",
22191
22911
  path: "/api/v1/kit/{kit_id}",
22192
22912
  scopes: ["music:write", "videos:write"],
22193
22913
  input: external_exports.object({
22194
- kit_id: id("kit piece"),
22914
+ kit_id: id2("kit piece"),
22195
22915
  name: external_exports.string().trim().min(1).max(60).optional(),
22196
22916
  handle: KitHandleSchema.optional(),
22197
22917
  description: external_exports.string().trim().max(300).nullable().optional(),
22198
22918
  crop: CropRectSchema.optional().describe("The new rectangle, in fractions of the source image"),
22199
22919
  ai_made: external_exports.boolean().optional().describe("A character only: an AI-made person (true) or a real one (false)"),
22200
22920
  shared: external_exports.boolean().optional().describe("Offer it to every other artist\u2019s songs too (true), or only its own artist\u2019s (false)"),
22201
- kept: external_exports.literal(true).optional().describe("Another angle of a place that is pending (draw_place_angles): keep it in the kit. To leave it out, delete it")
22921
+ kept: external_exports.literal(true).optional().describe("A pending piece (another angle of a place, draw_place_angles, or a shot list's picture, draw_music_video_pictures): keep it in the kit. To leave it out, delete it")
22202
22922
  }),
22203
22923
  readOnly: false,
22204
22924
  destructive: false,
@@ -22215,7 +22935,7 @@ var OPERATIONS = [
22215
22935
  method: "DELETE",
22216
22936
  path: "/api/v1/kit/{kit_id}",
22217
22937
  scopes: ["music:write", "videos:write"],
22218
- input: external_exports.object({ kit_id: id("kit piece") }),
22938
+ input: external_exports.object({ kit_id: id2("kit piece") }),
22219
22939
  readOnly: false,
22220
22940
  destructive: true,
22221
22941
  idempotent: true,
@@ -22226,14 +22946,14 @@ var OPERATIONS = [
22226
22946
  id: "kit.angles",
22227
22947
  group: "artists",
22228
22948
  title: "Draw other angles of a place",
22229
- summary: "The same set from three-quarter, side or low, each a new place (spends credits)",
22230
- description: `A place only. Without confirm: the price (credits per angle and the total), nothing drawn; tell the user, then send confirm true after their go (and credits: the total shown; a different price answers 409 with the current quote). Each angle is one picture of the same place, its layout, props, colours and light, from another side, empty of people, drawn in about a minute; it comes back as a new place in the same artist's kit (owned and shared like the place), named "<place> \xB7 side", with angle_of (the first place of its set) and angle. A new angle is pending: the user keeps it (update_kit_piece with kept true) or leaves it out (delete_kit_piece); a brief can mention it once kept. A brief that mentions places of one set gets them as one set: the director cuts between the angles. Credits are held, then charged for each picture drawn (failed lists any that couldn't be, not charged). ${NEEDS_PLAN}`,
22949
+ summary: "The same set from the angles you pick (wide, reverse, low, overhead\u2026), each a new place (spends credits)",
22950
+ description: `A place only. Pick one or more angles from a photographer's range: ${KIT_ANGLES.map((a) => `${a} (${KIT_ANGLE_LINES[a].toLowerCase()})`).join(", ")}. Without confirm: the price (credits per angle and the total), nothing drawn; tell the user, then send confirm true after their go (and credits: the total shown; a different price answers 409 with the current quote). Each angle is one picture of the same place, its layout, props, colours and light, from a camera position worked out for this place (a new composition, not the photo nudged), empty of people, drawn in about a minute; it comes back as a new place in the same artist's kit (owned and shared like the place), named "<place> \xB7 side", with angle_of (the first place of its set) and angle. A new angle is pending: the user keeps it (update_kit_piece with kept true) or leaves it out (delete_kit_piece); a brief can mention it once kept. A brief that mentions places of one set gets them as one set: the director cuts between the angles. Credits are held, then charged for each picture drawn (failed lists any that couldn't be, not charged). ${NEEDS_PLAN}`,
22231
22951
  method: "POST",
22232
22952
  path: "/api/v1/kit/{kit_id}/angles",
22233
22953
  scopes: ["videos:write"],
22234
22954
  input: external_exports.object({
22235
- kit_id: id("place (kit piece)"),
22236
- angles: external_exports.array(external_exports.enum(KIT_ANGLES)).min(1).max(3).optional().describe("Which sides: three-quarter, side, low (default: all three)"),
22955
+ kit_id: id2("place (kit piece)"),
22956
+ angles: external_exports.array(external_exports.enum(KIT_ANGLES)).min(1).max(KIT_ANGLES.length).optional().describe(`Which angles, one or more of ${KIT_ANGLES.join(", ")} (default: three-quarter, side and low). New values may be added`),
22237
22957
  confirm: external_exports.boolean().optional().describe("true: draw them (spends credits); left out: only the price"),
22238
22958
  credits: external_exports.number().int().positive().optional().describe("With confirm: the total price shown, so a changed price is refused")
22239
22959
  }),
@@ -22242,7 +22962,7 @@ var OPERATIONS = [
22242
22962
  idempotent: false,
22243
22963
  cli: ["kit", "angles"],
22244
22964
  mcp: "draw_place_angles",
22245
- example: { angles: ["three-quarter", "side", "low"], confirm: true, credits: 54 }
22965
+ example: { angles: ["reverse", "low", "overhead"], confirm: true, credits: 54 }
22246
22966
  },
22247
22967
  /* Songs */
22248
22968
  {
@@ -22300,7 +23020,7 @@ var OPERATIONS = [
22300
23020
  group: "songs",
22301
23021
  title: "List an artist\u2019s released songs",
22302
23022
  summary: "The linked artist\u2019s songs in the music catalog, each saying whether it is already in Kinetune",
22303
- description: "Newest release first; an EP or album\u2019s tracks in order. Each has id (the track_id to import), title, release (name, kind single, ep or album, date; a date of null is announced, not out yet), track_number, duration_seconds, cover_url (up to 3000 px), song_id when it is already in the workspace (uploaded or imported) and import while it is being imported (status, error). q narrows them to a title or release. The artist must be linked first (409 artist_not_linked: find_artist_in_catalog, then link_artist).",
23023
+ description: "Newest release first; an EP or album\u2019s tracks in order. other_version marks a remix, live take or similar, or a song on someone else\u2019s release (a compilation, a soundtrack): show those after the artist\u2019s own. Slices of DJ mixes are left out (they have no audio of their own). Each has id (the track_id to import), title, release (name, kind single, ep or album, date; a date of null is announced, not out yet), track_number, duration_seconds, cover_url (up to 3000 px), song_id when it is already in the workspace, possible_duplicates for close title and duration matches, and import while it is being imported (status, error). q narrows them to a title or release. The artist must be linked first (409 artist_not_linked: find_artist_in_catalog, then link_artist).",
22304
23024
  method: "GET",
22305
23025
  path: "/api/v1/artists/{artist_id}/releases",
22306
23026
  scopes: ["music:read", "videos:read"],
@@ -22316,11 +23036,15 @@ var OPERATIONS = [
22316
23036
  group: "songs",
22317
23037
  title: "Import released songs",
22318
23038
  summary: "Bring in released songs of a linked artist by their track ids, without uploading",
22319
- description: `Each track (list_released_songs: id) becomes an import: Kinetune fetches the song\u2019s audio (about half a minute each), then the song is made with the release\u2019s title and cover and analyzed like an upload; poll get_song_import or list_song_imports (status queued, fetching, done with song_id, or failed with why). A song we can\u2019t fetch fails, and the user adds the file to it instead (add_song_import_audio). Songs already in the workspace or being imported are skipped (skipped: track_id and reason). Up to 50 at once, and a daily number per workspace (429 daily_limit). Only the user\u2019s own songs: confirm they own or have the rights to them. ${NEEDS_PLAN} Without a plan, the user\u2019s free song covers one import.`,
23039
+ description: `Each track (list_released_songs: id) becomes an import: Kinetune fetches the song\u2019s audio (about half a minute each), then the song is made with the release\u2019s title and cover and analyzed like an upload; poll get_song_import or list_song_imports (status queued, fetching, done with song_id, or failed with why). A song we can\u2019t fetch fails, and the user adds the file to it instead (add_song_import_audio). Songs already in the workspace or being imported are skipped (skipped: track_id and reason). Up to 50 at once, and a daily number per workspace (429 daily_limit). Only the user\u2019s own songs: confirm they own or have the rights to them. ${NEEDS_PLAN} Without a plan, the user\u2019s free song of the month covers one import.`,
22320
23040
  method: "POST",
22321
23041
  path: "/api/v1/song-imports",
22322
23042
  scopes: ["music:write", "videos:write"],
22323
- input: external_exports.object({ artist_id: artistId, track_ids: external_exports.array(external_exports.string().regex(/^\d{1,15}$/)).min(1).max(50).describe("The released songs\u2019 ids (list_released_songs)") }),
23043
+ input: external_exports.object({
23044
+ artist_id: artistId,
23045
+ track_ids: external_exports.array(external_exports.string().regex(/^\d{1,15}$/)).min(1).max(50).describe("The released songs\u2019 ids (list_released_songs)"),
23046
+ distinct_track_ids: external_exports.array(external_exports.string()).max(50).optional().describe("Selected releases the user confirmed are distinct from possible duplicates")
23047
+ }),
22324
23048
  readOnly: false,
22325
23049
  destructive: false,
22326
23050
  idempotent: false,
@@ -22398,7 +23122,7 @@ var OPERATIONS = [
22398
23122
  group: "songs",
22399
23123
  title: "Get a song",
22400
23124
  summary: "One song and its analysis status",
22401
- description: `${COVER_SIZES} analysis.lyrics.status says whose words its videos show: "transcribed" (as heard), "checked" (your lyrics, timed from the audio; corrected, added and kept count what checking did), "waiting" (your lyrics, checked once the analysis finishes) or "mismatch" (your lyrics didn\u2019t match what\u2019s sung, so the transcription is used). brief: what the song is about as every director reads it (theme, tone, story, mood_arc by section, setting), null before the analysis; status writing while it is written (a song analysed without one has it started by this call: get it again in half a minute), edited true once the user corrected it (edit_song_brief).`,
23125
+ description: `${COVER_SIZES} analysis.lyrics.status says whose words its videos show: "transcribed" (as heard), "checked" (your lyrics, timed from the audio; corrected, added and kept count what checking did; edited_at once words were fixed by hand with set_song_words), "waiting" (your lyrics, checked once the analysis finishes) or "mismatch" (your lyrics didn\u2019t match what\u2019s sung, so the transcription is used). brief: what the song is about as every director reads it (theme, tone, story, mood_arc by section, setting), null before the analysis; status writing while it is written in the background (get it again in half a minute), edited true once the user corrected it (edit_song_brief).`,
22402
23126
  method: "GET",
22403
23127
  path: "/api/v1/songs/{song_id}",
22404
23128
  scopes: ["music:read", "videos:read"],
@@ -22656,6 +23380,64 @@ var OPERATIONS = [
22656
23380
  cli: ["songs", "clear-lyrics"],
22657
23381
  mcp: "clear_song_lyrics"
22658
23382
  },
23383
+ {
23384
+ id: "songs.set_words",
23385
+ group: "songs",
23386
+ title: "Set a song\u2019s timed words",
23387
+ summary: "Fix words and their timing by hand: text, start, end and line breaks",
23388
+ description: "The song\u2019s words as the videos show them, edited by hand: get them from get_song_analysis (words), change what is wrong (a word\u2019s text, where it starts or ends, line: true on the first word of each line, a word removed or added) and send them all back. Sorted by start, never overlapping, inside the song, up to 5000 words of 1 to 60 characters. Saved as they are (nothing is timed again): analysis.lyrics.edited_at says when, and set_song_lyrics or clear_song_lyrics later times every word from the audio again. A video can censor swear words on its own (display.censor). Videos made from then on use them; videos already made stay as they are. 409 while the song is being analysed.",
23389
+ method: "POST",
23390
+ path: "/api/v1/songs/{song_id}/words",
23391
+ scopes: ["music:write", "videos:write"],
23392
+ input: external_exports.object({ song_id: songId, words: external_exports.array(external_exports.object({
23393
+ text: external_exports.string().min(1).max(60),
23394
+ start: external_exports.number().min(0).describe("Seconds into the song"),
23395
+ end: external_exports.number().describe("Seconds into the song, after start"),
23396
+ line: external_exports.boolean().optional().describe("true on the first word of a line"),
23397
+ backing: external_exports.boolean().optional().describe("Sung by other voices, not the lead (kept from the analysis)")
23398
+ }).strict()).min(1).max(5e3).describe("Every word of the song, in order") }),
23399
+ readOnly: false,
23400
+ destructive: true,
23401
+ idempotent: true,
23402
+ cli: ["songs", "set-words"],
23403
+ mcp: "set_song_words"
23404
+ },
23405
+ {
23406
+ id: "songs.transcription_price",
23407
+ group: "songs",
23408
+ title: "Price of transcribing a song again",
23409
+ summary: "What listening to a song again costs, in credits",
23410
+ description: "credits: what transcribe_song costs now for this song (it follows the song\u2019s length and the transcription model in use).",
23411
+ method: "GET",
23412
+ path: "/api/v1/songs/{song_id}/transcription",
23413
+ scopes: ["music:read", "videos:read"],
23414
+ input: external_exports.object({ song_id: songId }),
23415
+ readOnly: true,
23416
+ destructive: false,
23417
+ idempotent: true,
23418
+ cli: ["songs", "transcription-price"],
23419
+ mcp: "get_transcription_price"
23420
+ },
23421
+ {
23422
+ id: "songs.transcribe",
23423
+ group: "songs",
23424
+ title: "Transcribe a song again",
23425
+ summary: "Listen to a song again, for a few credits",
23426
+ description: 'Costs credits: tell the user the price (get_transcription_price) and send it as credits only after their go. The song is listened to again with Kinetune\u2019s current transcription model, in language when given (the language it is sung in, e.g. "fr"; use it when the words came out in the wrong language). Their own lyrics (set_song_lyrics) stay and are timed to the new hearing; without them, the new words are the song\u2019s. Timing fixed by hand (set_song_words) is replaced. Takes up to a minute or two. 409 with the new price when credits differ, 402 without enough credits, 422 when no words were heard (nothing charged), 429 when it was just done.',
23427
+ method: "POST",
23428
+ path: "/api/v1/songs/{song_id}/transcription",
23429
+ scopes: ["music:write", "videos:write"],
23430
+ input: external_exports.object({
23431
+ song_id: songId,
23432
+ credits: external_exports.number().int().min(0).optional().describe("The price you were shown (get_transcription_price)"),
23433
+ language: external_exports.string().max(20).nullable().optional().describe('The language it is sung in, e.g. "fr"; omitted: the one the analysis found')
23434
+ }),
23435
+ readOnly: false,
23436
+ destructive: true,
23437
+ idempotent: false,
23438
+ cli: ["songs", "transcribe"],
23439
+ mcp: "transcribe_song"
23440
+ },
22659
23441
  {
22660
23442
  id: "songs.edit_brief",
22661
23443
  group: "songs",
@@ -22677,7 +23459,7 @@ var OPERATIONS = [
22677
23459
  })).max(SONG_BRIEF_LIMITS.sections).optional().describe("How the feeling moves through the song, section by section: replaces the whole list")
22678
23460
  }),
22679
23461
  readOnly: false,
22680
- destructive: false,
23462
+ destructive: true,
22681
23463
  idempotent: true,
22682
23464
  cli: ["songs", "edit-brief"],
22683
23465
  mcp: "edit_song_brief",
@@ -22707,7 +23489,7 @@ var OPERATIONS = [
22707
23489
  group: "looks",
22708
23490
  title: "List Looks",
22709
23491
  summary: "Browse Official, Community and your own Looks",
22710
- 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.`,
23492
+ description: "A Look is a complete, reusable lyric-video design: colours, type, lyric style, layout, visual and its picture. Pass its id as look.id, and change any part in the order. 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.",
22711
23493
  method: "GET",
22712
23494
  path: "/api/v1/looks",
22713
23495
  scopes: ["library:read", "videos:read"],
@@ -22732,7 +23514,7 @@ var OPERATIONS = [
22732
23514
  group: "looks",
22733
23515
  title: "Get a Look",
22734
23516
  summary: "One Look with its design and preview images",
22735
- 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).",
23517
+ description: "spec.background is the Look's picture: clips (a Look made before clips plays its own photo or loop as clips: sources.looks, get_look_clips) or the visualizer. backgrounds.portrait and backgrounds.landscape are the pictures such a Look was first made with, kept for its earlier videos; backgrounds.previews has 480 px wide copies of them for thumbnails (null for a Look without one).",
22736
23518
  method: "GET",
22737
23519
  path: "/api/v1/looks/{look_id}",
22738
23520
  scopes: ["library:read", "videos:read"],
@@ -22743,6 +23525,22 @@ var OPERATIONS = [
22743
23525
  cli: ["looks", "get"],
22744
23526
  mcp: "get_look"
22745
23527
  },
23528
+ {
23529
+ id: "looks.clips",
23530
+ group: "looks",
23531
+ title: "Get a Look's clips",
23532
+ summary: "The clips a clips Look cuts its picture from, to preview it",
23533
+ description: "For a Look whose picture is clips: its stock feelings' clips (and its folders' for its own workspace; someone else's Look never shows its owner's footage), each with its length, shape, energy, a light preview copy and what it shows: subject (null until it is analysed: each clip, once and for everyone, the first time analyze_clips asks for it or a video is made with it: faces, each box as fractions of the poster x, y, w, h, which text keeps clear; aspect; and mask, the subject's silhouette, when it has a matte), subject_clear (whether it has a clear subject, a person or a solid figure, words can go behind; null until analysed), matte_url (null, or an MP4 holding the clip and its subject's mask side by side, or one over the other for a wide clip: made for a clear subject once words go behind it, then the words go behind the subject) and still_url and depth_url (a photo clip's picture and its depth map, white is near: it moves in 3D; null until analysed). Plan a preview cut from them with @kinetune/composition planEdit, as the editor does. Empty for a Look with another kind of picture.",
23534
+ method: "GET",
23535
+ path: "/api/v1/looks/{look_id}/clips",
23536
+ scopes: ["library:read", "videos:read"],
23537
+ input: external_exports.object({ look_id: lookId }),
23538
+ readOnly: true,
23539
+ destructive: false,
23540
+ idempotent: true,
23541
+ cli: ["looks", "clips"],
23542
+ mcp: "get_look_clips"
23543
+ },
22746
23544
  {
22747
23545
  id: "looks.rename",
22748
23546
  group: "looks",
@@ -22792,67 +23590,521 @@ var OPERATIONS = [
22792
23590
  mcp: "set_look_visibility"
22793
23591
  },
22794
23592
  {
22795
- id: "backgrounds.upload",
23593
+ id: "looks.save",
22796
23594
  group: "looks",
22797
- title: "Upload a background",
22798
- summary: "Upload your own photo or video, or use one of your music videos, to design a New Look around",
22799
- description: `Photo: JPEG, PNG or WebP, at least 720 px on the short side, up to 25 MB. Video: MP4, MOV or WebM, 4\u2013180 seconds, at least 720 px on the short side, up to 300 MB; it becomes a seamless loop of up to 20 s. Only with the rights to use it. Or video_id: one of this workspace's delivered music videos (list_videos with type music-video and the song's song_id), copied in as a video background (no rights_confirmed needed); the answer's music_video names its song and section (trim). preview_url is a still (a photo, or a video's poster) and video_url the video itself (null for a photo), both signed for about a week. A lyric video with it must be of that song: it takes that section (send that trim, or leave trim out), and the music video plays once from its first frame in step with the lyrics, with its own sound. Then quote a lyric video with look {"mode":"new","category":"\u2026","background":{"source":"upload-photo" or "upload-video","upload_id":"\u2026"},"visibility":"private"}. ${NEEDS_PLAN}`,
23595
+ title: "Save as Look",
23596
+ summary: "Save a Look with your changes as your own Look",
23597
+ description: "A private Look made from a saved one (from_id) with the changes you send: lyric_style, behind, visual and background (as in create_lyric_video's look). Keeping the picture of the Look it was made from copies it. Then pass its id as look.id.",
22800
23598
  method: "POST",
22801
- path: "/api/v1/backgrounds",
23599
+ path: "/api/v1/looks",
22802
23600
  scopes: ["library:write", "videos:write"],
22803
23601
  input: external_exports.object({
22804
- file_url: httpsUrl("the photo or video").optional(),
22805
- video_id: external_exports.string().uuid().optional().describe("One of your delivered music videos, instead of a file: it then plays in step with its song\u2019s lyrics, with its own sound"),
22806
- rights_confirmed: external_exports.literal(true).optional().describe("You have the rights to use this photo or video (required with a file or file_url)")
23602
+ name: external_exports.string().trim().min(2).max(60).describe("Its name"),
23603
+ from_id: lookId.describe("The Look it starts from"),
23604
+ lyric_style: lyricShape.look.unwrap().shape.lyric_style,
23605
+ behind: lyricShape.look.unwrap().shape.behind,
23606
+ visual: lyricShape.look.unwrap().shape.visual,
23607
+ background: lyricShape.look.unwrap().shape.background
22807
23608
  }),
22808
- files: [{ field: "file", urlField: "file_url", accept: ["image/jpeg", "image/png", "image/webp", "video/mp4", "video/quicktime", "video/webm"], description: "Your photo or video" }],
22809
23609
  readOnly: false,
22810
23610
  destructive: false,
22811
23611
  idempotent: false,
22812
- cli: ["backgrounds", "upload"],
22813
- mcp: "upload_background"
23612
+ cli: ["looks", "save"],
23613
+ mcp: "save_look"
22814
23614
  },
23615
+ /* The person's draft: what an agent builds, the card plays and the editor opens */
22815
23616
  {
22816
- id: "stock.search",
23617
+ id: "songs.video_draft.get",
22817
23618
  group: "looks",
22818
- title: "Search stock media",
22819
- summary: "Find stock photos or clips to use as a background",
22820
- 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.`,
23619
+ title: "Open the video draft",
23620
+ summary: "The person's lyric video or Canvas draft for a song: its clips, cut and exact request",
23621
+ description: "The draft the studio's editor keeps for this song (one per person and kind; when there is none, the one the song's rules make, saved on its first change: id and editor_url are null until then). Answers the Look, lyric style, picture, sources (Stock moods, folders), recipe (density, transitions, grade, effects, shape, fill, speed), seed, format and section, and cuts: every clip of the cut in order (cut 1, 2, \u2026; its time, clip_id, source, poster_url and the transition into it). request is exactly what it makes: pass it to quote_lyric_video or quote_canvas, then create with the quote_id. editor_url opens it in the editor. Change it with edit_video_draft. Free (no AI).",
22821
23622
  method: "GET",
22822
- path: "/api/v1/stock",
22823
- scopes: ["videos:read", "videos:write", "library:read"],
22824
- input: external_exports.object({
22825
- kind: external_exports.enum(["photo", "video"]).describe("photo for stock-photo, video for stock-video"),
22826
- q: external_exports.string().trim().min(1).max(100).describe('Search words, e.g. "foggy pine forest"'),
22827
- orientation: external_exports.enum(["portrait", "landscape"]).optional().describe("Default portrait"),
22828
- page: external_exports.number().int().min(1).max(50).optional().describe("Default 1; next_page says whether there are more"),
22829
- 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")
22830
- }),
23623
+ path: "/api/v1/songs/{song_id}/video-draft",
23624
+ scopes: ["videos:read", "videos:write"],
23625
+ input: external_exports.object({ song_id: songId, type: external_exports.enum(["lyric-video", "canvas"]).optional().describe("lyric-video (default) or canvas") }),
22831
23626
  readOnly: true,
22832
23627
  destructive: false,
22833
23628
  idempotent: true,
22834
- cli: ["stock", "search"],
22835
- mcp: "search_stock",
22836
- example: { kind: "photo", q: "foggy pine forest", orientation: "portrait" }
23629
+ cli: ["drafts", "get"],
23630
+ mcp: "get_video_draft",
23631
+ example: { song_id: "song_\u2026", type: "lyric-video" }
22837
23632
  },
22838
- /* Quotes and videos */
22839
23633
  {
22840
- id: "quotes.lyric_video",
22841
- group: "videos",
22842
- title: "Quote a lyric video",
22843
- summary: "The exact credits for a lyric video, before anything is charged",
22844
- description: `Returns quote_id, credits (total), credits_per_video and a breakdown, and free: true when, without a plan, it is the free song's free video (create_video then holds no credits). ${QUOTE_FIRST} A quote is valid for 30 minutes.`,
22845
- method: "POST",
22846
- path: "/api/v1/quotes",
22847
- scopes: ["videos:write", "videos:read"],
22848
- input: lyricInput,
22849
- fixed: { type: "lyric-video" },
23634
+ id: "songs.video_draft.edit",
23635
+ group: "looks",
23636
+ title: "Change the video draft",
23637
+ summary: "Change the person's lyric video or Canvas draft: Look, clips, a clip at a cut, transitions, grade, effects, format",
23638
+ description: "Changes the draft get_video_draft answers, as the editor would, and saves it: the person sees the same draft in the editor (with no change, it only saves it, for editor_url). Send only what changes. Clips: sources (Stock mood ids from get_options clip_moods or browse_clip_mood; the workspace's folders from list_clip_folders, where the person's own uploads and the clips cut from their links land: import_clips), shuffle (other clips on the same cuts), replace [{cut, clip_id}] (one clip at a cut, e.g. one found with similar_clips or list_clips), joins [{cut, transition, seconds, direction, intensity}] (the transition into a cut: get_options transitions, or cut), starts [{cut, at}] (where in its clip a cut starts). Look: look_id, lyric_style, behind, visual. Recipe: density, transitions {style, amount, feel}, grade, grade_amount, effects, shape, fill, speed. format 9:16 or 16:9, trim (null: the whole song), display. Canvas (type canvas): picture clips|cover|visualizer, loop, seconds, cut, motion, visual, light, atmosphere, frame, effects. reset true starts over from the song's rules draft. A change to sources, density, shape, speed, seed, format or section plans a new cut and lets go of clips put in by hand. Answers the draft (cuts, request) like get_video_draft. Free (no AI); only making the video costs, after a quote and the person's yes.",
23639
+ method: "PATCH",
23640
+ path: "/api/v1/songs/{song_id}/video-draft",
23641
+ scopes: ["videos:write"],
23642
+ input: external_exports.object({ song_id: songId, ...VideoDraftEditShape.shape }).superRefine(checkVideoDraftEdit),
23643
+ readOnly: false,
23644
+ destructive: false,
23645
+ idempotent: false,
23646
+ cli: ["drafts", "edit"],
23647
+ mcp: "edit_video_draft",
23648
+ example: { song_id: "song_\u2026", type: "lyric-video", replace: [{ cut: 5, clip_id: "clip_\u2026" }], joins: [{ cut: 6, transition: "whip" }] }
23649
+ },
23650
+ /* Clips */
23651
+ {
23652
+ id: "songs.draft",
23653
+ group: "looks",
23654
+ title: "Get a song's draft lyric video",
23655
+ summary: "The Look and clips picture Kinetune picks for a song, at once and without AI",
23656
+ description: "look_id (an Official Look), background (a clips picture: moods, density, transitions, grade, shape, fill, speed) and edit.seed, picked by rules from the song (what it is about, its tempo and loudness). A create_lyric_video without look.id makes exactly this. With type canvas: the song's draft Canvas instead (picture: its clips sources and grade, loop drift, seconds 8, edit.seed), what a create_canvas with a clips picture and no sources makes. Change anything before creating.",
23657
+ method: "GET",
23658
+ path: "/api/v1/songs/{song_id}/draft",
23659
+ scopes: ["videos:read", "videos:write"],
23660
+ input: external_exports.object({ song_id: songId, type: external_exports.enum(["lyric-video", "canvas"]).optional().describe("lyric-video (default) or canvas") }),
23661
+ readOnly: true,
23662
+ destructive: false,
23663
+ idempotent: true,
23664
+ cli: ["songs", "draft"],
23665
+ mcp: "get_song_draft"
23666
+ },
23667
+ {
23668
+ id: "clips.list",
23669
+ group: "looks",
23670
+ title: "List clips",
23671
+ summary: "The clips of library moods and your folders, to plan a clips video's cut",
23672
+ description: "The ready clips (1\u20135 s each) of as many sources together as your plan allows (get_account limits.clip_sources; more answers 402 plan_required): library moods (get_options clip_moods), your folders (list_clip_folders) and Looks' own pictures (looks: a Look made before clips keeps its picture, its photo or loop, as clips of its own, usable wherever the Look is). Each has id, source, cut_from (the source video it was cut from: pieces sharing one look alike), duration_seconds, width, height, energy (how much it moves, 0\u20131), brightness, preview_url (a light MP4), poster_url, subject (null until it is analysed: each clip, once and for everyone, the first time analyze_clips asks for it or a video is made with it: faces, each box as fractions of the poster x, y, w, h, which text keeps clear; aspect; and mask, the subject's silhouette, when it has a matte), subject_clear (whether it has a clear subject, a person or a solid figure, words can go behind; null until analysed), matte_url (null, or an MP4 holding the clip and its subject's mask side by side, or one over the other for a wide clip: made for a clear subject once words go behind it, then the words go behind the subject) and still_url and depth_url (a photo clip's picture and its depth map, white is near: it moves in 3D; null until analysed), loop_score (how well it loops as a Canvas drift, 0\u2013100; 60 and up loops well) and strip_url (ten frames along it, side by side); both null until measured, shortly after import. Send edit.seed and Kinetune draws the clips (with words behind the subject, clips with a clear subject under the sung lines), or plan the cut yourself and send edit.clips.",
23673
+ method: "GET",
23674
+ path: "/api/v1/clips",
23675
+ scopes: ["videos:read", "videos:write", "library:read"],
23676
+ input: external_exports.object({
23677
+ moods: external_exports.string().trim().max(260).optional().describe('Mood ids, comma-separated, e.g. "city,golden"'),
23678
+ folders: external_exports.string().trim().max(300).optional().describe("Folder ids, comma-separated"),
23679
+ looks: external_exports.string().trim().max(600).optional().describe("Look ids whose own picture plays as clips (a Look made before clips: its background.sources.looks), comma-separated")
23680
+ }),
23681
+ readOnly: true,
23682
+ destructive: false,
23683
+ idempotent: true,
23684
+ cli: ["clips", "list"],
23685
+ mcp: "list_clips",
23686
+ example: { moods: "city" }
23687
+ },
23688
+ {
23689
+ id: "clip_moods.browse",
23690
+ group: "looks",
23691
+ title: "Browse a Stock collection",
23692
+ summary: "The clips inside one Stock collection, a page at a time",
23693
+ description: "Stock is the clip library Kinetune keeps for everyone, free: collections in two groups, Feelings (moods, mostly tall, with Looks: every Official and Community Look's own picture) and Places & textures (real footage). get_options clip_moods lists them. This answers one collection (id, name, group, tall and wide: how many of each shape) and a page of its clips, each with id, width, height, duration_seconds, energy (how much it moves, 0\u20131), brightness, color (its main colour, hex), poster_url, preview_url (a light MP4), credit (who filmed it, where a stock site asks for it), loop_score (how well it loops as a Canvas drift, 0\u2013100, null until measured) and strip_url (frames along it, side by side). shape keeps tall or wide clips only; energy keeps the collection's calmest, middle or liveliest third; sort is best (liveliest first), newest or length. total is how many match, next_offset the next page's offset (null on the last). Pick clips for a video by naming the collection in look.background.sources.moods, or plan the cut with their ids (edit.clips). No credits.",
23694
+ method: "GET",
23695
+ path: "/api/v1/clip-moods/{mood_id}",
23696
+ scopes: ["videos:read", "videos:write", "library:read"],
23697
+ input: external_exports.object({
23698
+ mood_id: ClipMoodIdSchema.describe('A Stock collection id (get_options clip_moods), e.g. "city"'),
23699
+ shape: external_exports.enum(CLIP_BROWSE_SHAPES.map((s) => s.value)).optional().describe("both (default), tall or wide"),
23700
+ energy: external_exports.enum(VISUAL_ENERGIES.map((e) => e.value)).optional().describe("all (default), calm, medium or bold: the collection's own thirds"),
23701
+ sort: external_exports.enum(CLIP_SORTS.map((s) => s.value)).optional().describe("best (default, liveliest first), newest or length (longest first)"),
23702
+ offset: external_exports.number().int().min(0).max(1e5).optional().describe("Where the page starts (next_offset of the last page); default 0"),
23703
+ limit: external_exports.number().int().min(1).max(120).optional().describe("Clips a page, 1\u2013120; default 60")
23704
+ }),
23705
+ readOnly: true,
23706
+ destructive: false,
23707
+ idempotent: true,
23708
+ cli: ["clips", "browse"],
23709
+ mcp: "browse_clip_mood",
23710
+ example: { mood_id: "city", shape: "tall", sort: "best" }
23711
+ },
23712
+ {
23713
+ id: "clips.rebound",
23714
+ group: "looks",
23715
+ title: "A clip as a Rebound",
23716
+ summary: "A clip played forward, then backward: the file a Canvas Rebound loops",
23717
+ description: "9:16, from at for half seconds at speed, then the same backward. Cached beside the clip (the first call takes a few seconds); the render uses the same file, so a Canvas with loop rebound plays exactly what this shows. Answers {url}, signed for a day. No AI and no credits.",
23718
+ method: "GET",
23719
+ path: "/api/v1/clips/{clip_id}/rebound",
23720
+ scopes: ["videos:read", "videos:write"],
23721
+ input: external_exports.object({
23722
+ clip_id: external_exports.string().regex(/^clip_[0-9a-f-]{36}$/).describe("A clip id (clip_\u2026; browse_clip_mood, get_clip_folder or list_clips)"),
23723
+ at: external_exports.number().min(0).max(600).optional().describe("Where in the clip it starts, in seconds; default 0"),
23724
+ half: external_exports.number().min(1.5).max(4).describe("How long it plays forward, 1.5\u20134 seconds (the loop is twice that)"),
23725
+ speed: external_exports.number().min(0.25).max(2).optional().describe("0.25\u20132; default 1"),
23726
+ steady: external_exports.boolean().optional().describe("true: from the clip's stabilised copy (a Canvas with steady on)")
23727
+ }),
23728
+ readOnly: true,
23729
+ destructive: false,
23730
+ idempotent: true,
23731
+ cli: ["clips", "rebound"],
23732
+ mcp: "get_clip_rebound"
23733
+ },
23734
+ {
23735
+ id: "clips.steady",
23736
+ group: "looks",
23737
+ title: "A clip, steadied",
23738
+ summary: "A clip with handheld shake smoothed out: the file a Canvas with steady on plays",
23739
+ description: "The clip stabilised (two passes of ffmpeg vidstab), cached beside the clip (the first call takes a few seconds); the render uses the same file, so a Canvas with steady on plays exactly what this shows. Answers {url}, signed for a day. No AI and no credits.",
23740
+ method: "GET",
23741
+ path: "/api/v1/clips/{clip_id}/steady",
23742
+ scopes: ["videos:read", "videos:write"],
23743
+ input: external_exports.object({ clip_id: external_exports.string().regex(/^clip_[0-9a-f-]{36}$/).describe("A clip id (clip_\u2026; browse_clip_mood, get_clip_folder or list_clips)") }),
23744
+ readOnly: true,
23745
+ destructive: false,
23746
+ idempotent: true,
23747
+ cli: ["clips", "steady"],
23748
+ mcp: "get_clip_steady"
23749
+ },
23750
+ {
23751
+ id: "clips.loop",
23752
+ group: "looks",
23753
+ title: "Where a clip loops best",
23754
+ summary: "Best spot: where in a clip a Canvas drift window loops best, and its loop score",
23755
+ description: "For a window of span seconds that crossfades seam seconds into its start (both in the clip's own time: a drift plays seconds + crossfade of picture at its speed), the start in the clip whose ends look most alike, steady and with no cut inside, and its loop score 0\u2013100. Put the start in the Canvas edit's clips[0].in. Answers {start, score, measured}; a clip not measured yet answers start 0 and score null. Each clip's own score (for a default 8-second drift) is loop_score on list_clips, browse_clip_mood and get_clip_folder. No AI and no credits.",
23756
+ method: "GET",
23757
+ path: "/api/v1/clips/{clip_id}/loop",
23758
+ scopes: ["videos:read", "videos:write"],
23759
+ input: external_exports.object({
23760
+ clip_id: external_exports.string().regex(/^clip_[0-9a-f-]{36}$/).describe("A clip id (clip_\u2026; browse_clip_mood, get_clip_folder or list_clips)"),
23761
+ span: external_exports.number().min(0.5).max(60).describe("How much of the clip the window plays before the loop point, in seconds of the clip"),
23762
+ seam: external_exports.number().min(0).max(4).optional().describe("How much more it plays into the crossfade, in seconds of the clip; default 0.75")
23763
+ }),
23764
+ readOnly: true,
23765
+ destructive: false,
23766
+ idempotent: true,
23767
+ cli: ["clips", "loop"],
23768
+ mcp: "get_clip_loop"
23769
+ },
23770
+ {
23771
+ id: "clips.similar",
23772
+ group: "looks",
23773
+ title: "More like this",
23774
+ summary: "Clips that look and move like one clip, from Stock and your folders",
23775
+ description: "Up to limit clips (default 24) from every Stock collection and your own folders that look and move like this one: the same collection or folder counts, then how lively, how bright and the colour, so a clip from another collection can match. Clips cut from the same video show once. Each has the fields of browse_clip_mood plus source (the collection or folder it is in). No AI and no credits. The clip must be in Stock or one of your folders (404 otherwise).",
23776
+ method: "GET",
23777
+ path: "/api/v1/clips/{clip_id}/similar",
23778
+ scopes: ["videos:read", "videos:write", "library:read"],
23779
+ input: external_exports.object({
23780
+ clip_id: external_exports.string().regex(/^clip_[0-9a-f-]{36}$/).describe("A clip id (clip_\u2026; browse_clip_mood, get_clip_folder or list_clips)"),
23781
+ limit: external_exports.number().int().min(1).max(48).optional().describe("How many, 1\u201348; default 24")
23782
+ }),
23783
+ readOnly: true,
23784
+ destructive: false,
23785
+ idempotent: true,
23786
+ cli: ["clips", "similar"],
23787
+ mcp: "similar_clips"
23788
+ },
23789
+ {
23790
+ id: "clips.delete",
23791
+ group: "looks",
23792
+ title: "Delete a clip",
23793
+ summary: "Remove one of your clips",
23794
+ description: "Videos already made with it keep it.",
23795
+ method: "DELETE",
23796
+ path: "/api/v1/clips/{clip_id}",
23797
+ scopes: ["videos:write", "library:write"],
23798
+ input: external_exports.object({ clip_id: external_exports.string().regex(/^clip_[0-9a-f-]{36}$/).describe("A clip id (clip_\u2026)") }),
23799
+ readOnly: false,
23800
+ destructive: true,
23801
+ idempotent: true,
23802
+ cli: ["clips", "delete"],
23803
+ mcp: "delete_clip"
23804
+ },
23805
+ {
23806
+ id: "clips.move",
23807
+ group: "looks",
23808
+ title: "Move clips",
23809
+ summary: "Move some of your clips into another of your folders",
23810
+ description: "clip_ids: your own clips (from get_clip_folder; library clips belong to no folder and never move), folder_id: one of your folders (list_clip_folders). Answers how many moved. Videos already made keep their clips.",
23811
+ method: "POST",
23812
+ path: "/api/v1/clips/move",
23813
+ scopes: ["videos:write", "library:write"],
23814
+ input: external_exports.object({ clip_ids: external_exports.array(external_exports.string().max(80)).min(1).max(200).describe("Clip ids (clip_\u2026), 1\u2013200"), folder_id: external_exports.string().max(80).describe("The folder to move them into (folder_\u2026)") }),
23815
+ readOnly: false,
23816
+ destructive: false,
23817
+ idempotent: true,
23818
+ cli: ["clips", "move"],
23819
+ mcp: "move_clips",
23820
+ example: { clip_ids: ["clip_\u2026"], folder_id: "folder_\u2026" }
23821
+ },
23822
+ {
23823
+ id: "clips.analyze",
23824
+ group: "looks",
23825
+ title: "Analyse clips",
23826
+ summary: "Find the subject and faces of clips a preview shows",
23827
+ description: "For a preview you plan yourself (planEdit): send the clip_ids it shows, and behind: true when its words go behind the subject. Each not yet analysed is analysed in the background, once (a few seconds): its subject and faces, a photo's depth map, and with behind its matte when it has a clear subject. list_clips answers what it found once done; a clip analysed once stays analysed, for everyone. At most daily_limit new clips of your own a day (Stock clips don't count) (limited: true held some back until tomorrow); a video made with clips analyses them anyway, with no limit, so you never need this to make one. Free. Answers pending (the clips still being analysed), limited and daily_limit.",
23828
+ method: "POST",
23829
+ path: "/api/v1/clips/analyze",
23830
+ scopes: ["videos:write", "library:write"],
23831
+ input: external_exports.object({ clip_ids: external_exports.array(external_exports.string().max(80)).min(1).max(200).describe("The clips the preview shows (clip_\u2026), 1\u2013200"), behind: external_exports.boolean().optional().describe("Words go behind the subject: make the mattes too") }),
23832
+ readOnly: false,
23833
+ destructive: false,
23834
+ idempotent: true,
23835
+ cli: ["clips", "analyze"],
23836
+ mcp: "analyze_clips",
23837
+ example: { clip_ids: ["clip_\u2026"], behind: true }
23838
+ },
23839
+ {
23840
+ id: "clips.generate",
23841
+ group: "looks",
23842
+ title: "Generate clips",
23843
+ summary: "New pictures or short video clips into your AI folder, from your words, the song or its cover",
23844
+ description: "The only paid part of a lyric video's or a Canvas's picture. Send prompt (or from with song_id: the song's brief, or the cover's world with the cover as the model's reference), kind (image or video), shape (tall or wide), count (1\u20134), and optionally with (the artist, or a cast character's kit id: their character sheet keeps them recognizable), quality (standard or high video) and loop (a video that starts and ends on the same frame, kept whole: a seamless Drift for a Canvas). Without credits it answers the price ({quote: {credits, per_item_credits}}) and the prompt it will use, and with from song three ideas built from the song's brief (ideas: each a title, a line, 2\u20133 tags, a prompt, the first best: true; no extra AI call, none while the song has no brief): offer them, and send the picked idea's prompt as prompt; show it, and with the user's yes send the same with credits: they are held and the clips are made in the background. get_clip_folder on the returned folder_id shows each one on its way (imports: status queued, working or failed; stage drawing, animating or cutting; expected_seconds), and each is charged only once it is a clip (a failed one is given back; retry_clip_import tries it again).",
23845
+ method: "POST",
23846
+ path: "/api/v1/clips/generate",
23847
+ scopes: ["videos:write"],
23848
+ input: external_exports.object({
23849
+ prompt: external_exports.string().trim().min(3).max(500).optional().describe('What it shows, e.g. "a diner at 3am, rain on the window". Optional with from'),
23850
+ kind: external_exports.enum(["image", "video"]),
23851
+ shape: external_exports.enum(["tall", "wide"]).optional().describe("Default tall"),
23852
+ count: external_exports.number().int().min(1).max(4).optional().describe("Default 1"),
23853
+ song_id: songId.optional().describe("The song it is for (with from or with)"),
23854
+ from: external_exports.enum(["song", "cover"]).optional().describe("Start from the song (its brief) or the cover's world"),
23855
+ with: external_exports.string().max(60).optional().describe("none (default), artist (the song's artist's character) or a cast character's kit id (kit_\u2026)"),
23856
+ model: external_exports.string().optional().describe("Video only: the video model, one of the ids get_options lists in video_models.clips (by its real name, each with its price for one clip). Left out: the default, the first listed"),
23857
+ quality: external_exports.enum(["standard", "high"]).optional().describe("Video only, before models were named: standard is the default model, high the dearest offered. Ignored with model"),
23858
+ loop: external_exports.boolean().optional().describe("Video only: made to loop (starts and ends on the same frame)"),
23859
+ style: external_exports.enum(GENERATE_STYLES).optional().describe("How it moves and feels: calm, cinematic, dreamy or intense (shapes the motion, camera and pace). Left out: as the prompt says"),
23860
+ credits: external_exports.number().int().min(1).optional().describe("The quoted credits, to make them; left out, only the price")
23861
+ }),
23862
+ readOnly: false,
23863
+ destructive: false,
23864
+ idempotent: false,
23865
+ cli: ["clips", "generate"],
23866
+ mcp: "generate_clips"
23867
+ },
23868
+ {
23869
+ id: "clip_imports.retry",
23870
+ group: "looks",
23871
+ title: "Try a clip import again",
23872
+ summary: "Try a failed link, upload, stock or generated clip again",
23873
+ description: "For an import get_clip_folder lists as failed. A generated one holds its credits again (at today's price) before it is made.",
23874
+ method: "POST",
23875
+ path: "/api/v1/clip-imports/{import_id}",
23876
+ scopes: ["videos:write"],
23877
+ input: external_exports.object({ import_id: external_exports.string().regex(/^import_[0-9a-f-]{36}$/).describe("The import id (import_\u2026)") }),
23878
+ fixed: { action: "retry" },
23879
+ readOnly: false,
23880
+ destructive: false,
23881
+ idempotent: true,
23882
+ cli: ["clips", "retry-import"],
23883
+ mcp: "retry_clip_import"
23884
+ },
23885
+ {
23886
+ id: "clip_imports.dismiss",
23887
+ group: "looks",
23888
+ title: "Dismiss a failed clip import",
23889
+ summary: "Take a failed import's tile out of its folder",
23890
+ description: "For an import get_clip_folder lists as failed, when it isn't worth trying again (retry_clip_import). Nothing is charged.",
23891
+ method: "DELETE",
23892
+ path: "/api/v1/clip-imports/{import_id}",
23893
+ scopes: ["videos:write"],
23894
+ input: external_exports.object({ import_id: external_exports.string().regex(/^import_[0-9a-f-]{36}$/).describe("The import id (import_\u2026)") }),
23895
+ readOnly: false,
23896
+ destructive: true,
23897
+ idempotent: true,
23898
+ cli: ["clips", "dismiss-import"],
23899
+ mcp: "dismiss_clip_import"
23900
+ },
23901
+ {
23902
+ id: "clip_folders.list",
23903
+ group: "looks",
23904
+ title: "List your clip folders",
23905
+ summary: "Your clip folders with how many clips each holds",
23906
+ description: "My footage: each folder with id, name, kind (user: yours, where links, uploads, cut videos and stock you found land; ai: what you generate), clips, importing (on their way) and poster_url.",
23907
+ method: "GET",
23908
+ path: "/api/v1/clip-folders",
23909
+ scopes: ["videos:read", "videos:write", "library:read"],
23910
+ input: external_exports.object({}),
23911
+ readOnly: true,
23912
+ destructive: false,
23913
+ idempotent: true,
23914
+ cli: ["clip-folders", "list"],
23915
+ mcp: "list_clip_folders"
23916
+ },
23917
+ {
23918
+ id: "clip_folders.create",
23919
+ group: "looks",
23920
+ title: "Make a clip folder",
23921
+ summary: "A new folder for your clips",
23922
+ description: "A folder in My footage, by name. Anything can be imported into it (import_clips): a link, a file or a stock video found with search_stock.",
23923
+ method: "POST",
23924
+ path: "/api/v1/clip-folders",
23925
+ scopes: ["videos:write", "library:write"],
23926
+ input: external_exports.object({ name: external_exports.string().trim().min(1).max(60).describe('Its name, e.g. "On stage"') }),
23927
+ readOnly: false,
23928
+ destructive: false,
23929
+ idempotent: false,
23930
+ cli: ["clip-folders", "create"],
23931
+ mcp: "create_clip_folder"
23932
+ },
23933
+ {
23934
+ id: "clip_folders.get",
23935
+ group: "looks",
23936
+ title: "Get a clip folder",
23937
+ summary: "A folder's clips and the imports still on their way",
23938
+ description: "clips (as list_clips) and imports (status queued, working or failed with error; done ones leave the list).",
23939
+ method: "GET",
23940
+ path: "/api/v1/clip-folders/{folder_id}",
23941
+ scopes: ["videos:read", "videos:write", "library:read"],
23942
+ input: external_exports.object({ folder_id: external_exports.string().regex(/^folder_[0-9a-f-]{36}$/).describe("A clip folder id (folder_\u2026; list_clip_folders)") }),
23943
+ readOnly: true,
23944
+ destructive: false,
23945
+ idempotent: true,
23946
+ cli: ["clip-folders", "get"],
23947
+ mcp: "get_clip_folder"
23948
+ },
23949
+ {
23950
+ id: "clip_folders.rename",
23951
+ group: "looks",
23952
+ title: "Rename a clip folder",
23953
+ summary: "Rename one of your clip folders",
23954
+ description: "",
23955
+ method: "PATCH",
23956
+ path: "/api/v1/clip-folders/{folder_id}",
23957
+ scopes: ["videos:write", "library:write"],
23958
+ input: external_exports.object({ folder_id: external_exports.string().regex(/^folder_[0-9a-f-]{36}$/).describe("A clip folder id (folder_\u2026; list_clip_folders)"), name: external_exports.string().trim().min(1).max(60) }),
23959
+ readOnly: false,
23960
+ destructive: false,
23961
+ idempotent: true,
23962
+ cli: ["clip-folders", "rename"],
23963
+ mcp: "rename_clip_folder"
23964
+ },
23965
+ {
23966
+ id: "clip_folders.delete",
23967
+ group: "looks",
23968
+ title: "Delete a clip folder",
23969
+ summary: "Remove a folder and its clips",
23970
+ description: "Videos already made with its clips keep them.",
23971
+ method: "DELETE",
23972
+ path: "/api/v1/clip-folders/{folder_id}",
23973
+ scopes: ["videos:write", "library:write"],
23974
+ input: external_exports.object({ folder_id: external_exports.string().regex(/^folder_[0-9a-f-]{36}$/).describe("A clip folder id (folder_\u2026; list_clip_folders)") }),
23975
+ readOnly: false,
23976
+ destructive: true,
23977
+ idempotent: true,
23978
+ cli: ["clip-folders", "delete"],
23979
+ mcp: "delete_clip_folder"
23980
+ },
23981
+ {
23982
+ id: "clip_folders.import",
23983
+ group: "looks",
23984
+ title: "Import clips",
23985
+ summary: "Cut a video into clips in one of your folders: a link, a file or a stock video",
23986
+ description: "One of: url (a YouTube, TikTok or Instagram link, up to 20 minutes), file_url (a video or photo sent with create_upload) or stock_id (a stock video from search_stock: it lands in this folder of yours, like any other source). Kinetune cuts it at every scene change into clips of 1\u20135 s, in the background (get_clip_folder shows it on its way). Only use clips you have the rights to. Free with an active plan (402 plan_required without one; get_account: plan.active); counts toward your storage.",
23987
+ method: "POST",
23988
+ path: "/api/v1/clip-folders/{folder_id}/imports",
23989
+ scopes: ["videos:write", "library:write"],
23990
+ input: external_exports.object({
23991
+ folder_id: external_exports.string().regex(/^folder_[0-9a-f-]{36}$/).describe("A clip folder id (folder_\u2026; list_clip_folders)"),
23992
+ url: external_exports.string().url().max(2e3).optional().describe("A YouTube, TikTok or Instagram link"),
23993
+ file_url: httpsUrl("a video or photo").optional(),
23994
+ stock_id: StockIdSchema.optional().describe("A stock video id (search_stock kind video)")
23995
+ }),
23996
+ readOnly: false,
23997
+ destructive: false,
23998
+ idempotent: false,
23999
+ cli: ["clip-folders", "import"],
24000
+ mcp: "import_clips"
24001
+ },
24002
+ {
24003
+ id: "canvas_presets.list",
24004
+ group: "looks",
24005
+ title: "List your Canvas presets",
24006
+ summary: "Your saved Canvas looks, the latest saved first",
24007
+ description: "Each with id, name and look: loop, seconds, cut, crossfade, camera, fade, fill (and fill_colour), speed, grade and grade_amount, effects, light and atmosphere. A look holds no clips or song: to use one, send its fields in a Canvas request (picture fields for the clips settings, loop, seconds, light as {preset}, atmosphere and effects at the top).",
24008
+ method: "GET",
24009
+ path: "/api/v1/canvas-presets",
24010
+ scopes: ["videos:read", "videos:write"],
24011
+ input: external_exports.object({}),
24012
+ readOnly: true,
24013
+ destructive: false,
24014
+ idempotent: true,
24015
+ cli: ["canvas-presets", "list"],
24016
+ mcp: "list_canvas_presets"
24017
+ },
24018
+ {
24019
+ id: "canvas_presets.save",
24020
+ group: "looks",
24021
+ title: "Save a Canvas preset",
24022
+ summary: "Keep a Canvas look under a name for the next Canvas",
24023
+ description: "name (1\u201360 characters) and look (as list_canvas_presets shows it; fields left out take their defaults). The same name again replaces that preset's look. Up to 50 a workspace. Free.",
24024
+ method: "POST",
24025
+ path: "/api/v1/canvas-presets",
24026
+ scopes: ["videos:write"],
24027
+ input: external_exports.object({ name: external_exports.string().trim().min(1).max(60).describe('Its name, e.g. "Night drive"'), look: CanvasLookSchema }),
24028
+ readOnly: false,
24029
+ destructive: true,
24030
+ idempotent: false,
24031
+ cli: ["canvas-presets", "save"],
24032
+ mcp: "save_canvas_preset",
24033
+ example: { name: "Night drive", look: { loop: "drift", seconds: 8, crossfade: 1, grade: "noir", grade_amount: 0.7, effects: [{ id: "film-grain", amount: 0.5 }], atmosphere: "dust" } }
24034
+ },
24035
+ {
24036
+ id: "canvas_presets.rename",
24037
+ group: "looks",
24038
+ title: "Rename a Canvas preset",
24039
+ summary: "Rename one of your Canvas presets",
24040
+ description: "",
24041
+ method: "PATCH",
24042
+ path: "/api/v1/canvas-presets/{preset_id}",
24043
+ scopes: ["videos:write"],
24044
+ input: external_exports.object({ preset_id: external_exports.string().regex(/^preset_[0-9a-f-]{36}$/).describe("A Canvas preset id (preset_\u2026; list_canvas_presets)"), name: external_exports.string().trim().min(1).max(60) }),
24045
+ readOnly: false,
24046
+ destructive: false,
24047
+ idempotent: true,
24048
+ cli: ["canvas-presets", "rename"],
24049
+ mcp: "rename_canvas_preset"
24050
+ },
24051
+ {
24052
+ id: "canvas_presets.delete",
24053
+ group: "looks",
24054
+ title: "Delete a Canvas preset",
24055
+ summary: "Remove one of your Canvas presets",
24056
+ description: "Canvases already made with it keep their look.",
24057
+ method: "DELETE",
24058
+ path: "/api/v1/canvas-presets/{preset_id}",
24059
+ scopes: ["videos:write"],
24060
+ input: external_exports.object({ preset_id: external_exports.string().regex(/^preset_[0-9a-f-]{36}$/).describe("A Canvas preset id (preset_\u2026; list_canvas_presets)") }),
24061
+ readOnly: false,
24062
+ destructive: true,
24063
+ idempotent: true,
24064
+ cli: ["canvas-presets", "delete"],
24065
+ mcp: "delete_canvas_preset"
24066
+ },
24067
+ {
24068
+ id: "stock.search",
24069
+ group: "looks",
24070
+ title: "Search stock media",
24071
+ summary: "Find stock photos or clips for your clip folders, a Canvas or a kit piece",
24072
+ description: `24 results a page. Pass a video's id to import_clips (stock_id) to cut it into your clips, or an item's id as a Canvas's stock_id to use it instead of the director's pick, and credit its creator (credit: author, author_url, source_url and provider, the site it comes from) wherever you show it. Results come from every stock site Kinetune is set up with: ids from the first are digits, others are prefixed ("pixabay:123"); pass them as given. 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.`,
24073
+ method: "GET",
24074
+ path: "/api/v1/stock",
24075
+ scopes: ["videos:read", "videos:write", "library:read"],
24076
+ input: external_exports.object({
24077
+ kind: external_exports.enum(["photo", "video"]).describe("photo or video"),
24078
+ q: external_exports.string().trim().min(1).max(100).describe('Search words, e.g. "foggy pine forest"'),
24079
+ orientation: external_exports.enum(["portrait", "landscape"]).optional().describe("Default portrait"),
24080
+ page: external_exports.number().int().min(1).max(50).optional().describe("Default 1; next_page says whether there are more"),
24081
+ seconds: external_exports.number().int().min(5).max(8).optional().describe("Clips for a Canvas of this length (5\u20138); omit otherwise")
24082
+ }),
24083
+ readOnly: true,
24084
+ destructive: false,
24085
+ idempotent: true,
24086
+ cli: ["stock", "search"],
24087
+ mcp: "search_stock",
24088
+ example: { kind: "photo", q: "foggy pine forest", orientation: "portrait" }
24089
+ },
24090
+ /* Quotes and videos */
24091
+ {
24092
+ id: "quotes.lyric_video",
24093
+ group: "videos",
24094
+ title: "Quote a lyric video",
24095
+ summary: "The exact credits for a lyric video, before anything is charged",
24096
+ description: `Returns quote_id, credits (total), credits_per_video and a breakdown, and free: true when, without a plan, it is one of the month's free videos (create_video then holds no credits). ${QUOTE_FIRST} A quote is valid for 30 minutes.`,
24097
+ method: "POST",
24098
+ path: "/api/v1/quotes",
24099
+ scopes: ["videos:write", "videos:read"],
24100
+ input: lyricInput,
24101
+ fixed: { type: "lyric-video" },
22850
24102
  readOnly: true,
22851
24103
  destructive: false,
22852
24104
  idempotent: true,
22853
24105
  cli: ["quote", "lyric-video"],
22854
24106
  mcp: "quote_lyric_video",
22855
- example: { song_id: "song_\u2026", look: { mode: "new", category: "synthwave", background: { source: "ai-image", quality: "high" } }, aspect_ratios: ["9:16", "16:9"] }
24107
+ example: { song_id: "song_\u2026", look: { background: { kind: "clips", sources: { moods: ["city"], folders: [] } } }, aspect_ratios: ["9:16", "16:9"] }
22856
24108
  },
22857
24109
  {
22858
24110
  id: "quotes.canvas",
@@ -22870,14 +24122,14 @@ var OPERATIONS = [
22870
24122
  idempotent: true,
22871
24123
  cli: ["quote", "canvas"],
22872
24124
  mcp: "quote_canvas",
22873
- example: { song_id: "song_\u2026", source: "ai-video", style: "dreamy" }
24125
+ example: { song_id: "song_\u2026", picture: { kind: "clips", sources: { moods: ["euphoria"], folders: [] } }, loop: "cuts", seconds: 8 }
22874
24126
  },
22875
24127
  {
22876
24128
  id: "music_video_plans.create",
22877
24129
  group: "videos",
22878
24130
  title: "Write a music video shot list",
22879
- summary: "The director's shot list for a music video, the idea and every shot, before anything is charged",
22880
- description: "Free (a limited number an hour). Takes about a minute. Returns a plan: the concept, the character it keeps the artist from, and its shots (cut between the song's lines, up to about 14 seconds each) with their lyrics and how each comes in (a cut, or carrying on in a continuous take). 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.",
24131
+ summary: "The director's shot list for a music video, the idea and every shot (spends credits)",
24132
+ description: "Costs credits, and so does every rewrite with revise: tell the user the price (list_music_video_drafts price.credits) and send it as credits only after their go (a limited number an hour). A video made from it has no creative direction line in its quote: the shot list was paid for. Takes a minute or more (wait false answers at once with the shot list being written, read shot by shot with get_music_video_plan_write). Returns a plan: the concept, the character it keeps the artist from, and its shots (cut between the song's lines, up to about 14 seconds each) with their lyrics and how each comes in (a cut, or carrying on in a continuous take). 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.",
22881
24133
  method: "POST",
22882
24134
  path: "/api/v1/music-video-plans",
22883
24135
  scopes: ["videos:write"],
@@ -22890,12 +24142,29 @@ var OPERATIONS = [
22890
24142
  output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema },
22891
24143
  example: { song_id: "song_\u2026", category: "cinematic", aspect_ratio: "9:16", trim: { start_seconds: 32, end_seconds: 96 } }
22892
24144
  },
24145
+ {
24146
+ id: "music_video_plans.write",
24147
+ group: "videos",
24148
+ title: "Read a shot list being written",
24149
+ summary: "A shot list the director is writing (plan_music_video with wait false): its shots as they are written",
24150
+ description: "status: writing, ready or failed. phase: writing, revising (rewriting it to pass the checks) or finishing. title and concept once written; shots: every shot's start_seconds, end_seconds, section and lyrics from the start, and its summary once written (null until then). Once ready, plan_id is the shot list (get_music_video_plan); once failed, error says why (nothing is charged). price.credits: what it costs, charged once ready. One whose writing was cut off reads as failed. The song's shot lists being written are also listed by list_music_video_drafts (writing).",
24151
+ method: "GET",
24152
+ path: "/api/v1/music-video-plan-writes/{write_id}",
24153
+ scopes: ["videos:read", "videos:write"],
24154
+ input: external_exports.object({ write_id: external_exports.string().regex(/^write_[0-9a-f-]{36}$/).describe("The shot list being written (write_\u2026), from plan_music_video with wait false") }),
24155
+ readOnly: true,
24156
+ destructive: false,
24157
+ idempotent: true,
24158
+ cli: ["plans", "writing"],
24159
+ mcp: "get_music_video_plan_write",
24160
+ example: { write_id: "write_\u2026" }
24161
+ },
22893
24162
  {
22894
24163
  id: "music_video_plans.swap_place",
22895
24164
  group: "videos",
22896
24165
  title: "Change a place's photo",
22897
24166
  summary: "Another stock photo for one of a plan's places",
22898
- description: "Returns the next draft: the same shot list, set in this photo (no director call, free). Pick a photo of the same kind of place, with no people, from search_stock.",
24167
+ description: "Returns the next draft: the same shot list, set in this photo (no director call, free). Pick a photo of the same kind of place, with no people, from search_stock, in the look its other places share (world.look) so they still belong together.",
22899
24168
  method: "PATCH",
22900
24169
  path: "/api/v1/music-video-plans/{plan_id}/places/{place}",
22901
24170
  scopes: ["videos:write"],
@@ -22907,217 +24176,207 @@ var OPERATIONS = [
22907
24176
  mcp: "swap_music_video_place",
22908
24177
  output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema }
22909
24178
  },
22910
- /* Casting */
22911
- {
22912
- id: "music_video_castings.create",
22913
- group: "videos",
22914
- title: "Cast a music video",
22915
- summary: "The director proposes who else is in it: up to 3 new people, each drawn as a character sheet only after a yes",
22916
- description: `Optional, after the idea and before the lookbook and the shot list (nobody appears on screen without a character sheet). Free (a limited number an hour), a few seconds: returns a casting whose people (at most ${CASTING_MAX_PEOPLE}, never more than the model's room in a shot beside the performer and the people already given) each have a role, a first name, what they do (does), a description their sheet is drawn from, and about how many shots they are in. With cast_mode exact, nobody on screen or no room, it proposes nobody (status ready, people []), without a director call. Show each person with price.per_person (price.credits for all); the user may drop anyone, edit a description, or put a kit character in that role instead; then draw_music_video_cast after their yes, or order the video with casting_id to draw them inside the order. Same brief as plan_music_video. Needs an active plan (402 plan_required without one; get_account: plan.active).`,
22917
- method: "POST",
22918
- path: "/api/v1/music-video-castings",
22919
- scopes: ["videos:write"],
22920
- input: musicVideoPlanInput.omit({ revise: true, lookbook_id: true }),
22921
- readOnly: false,
22922
- destructive: false,
22923
- idempotent: false,
22924
- cli: ["casting", "propose"],
22925
- mcp: "cast_music_video",
22926
- example: { song_id: "song_\u2026", category: "story", direction: "She leaves him at the station" }
22927
- },
22928
24179
  {
22929
- id: "music_video_castings.get",
24180
+ id: "music_video_plans.check_model",
22930
24181
  group: "videos",
22931
- title: "Get a casting",
22932
- summary: "A casting's people as proposed, then as drawn",
22933
- description: "status: proposed (not drawn), drawing (their sheets are drawn: check back in about a minute), ready or failed. Each person: index, name, role, does, description, shots, state (proposed, declined, drawing, kept: drawn and in the song artist's kit; chosen: a kit character in that role; failed, with error) and character once kept or chosen. price.per_person is a sheet's price; charged is what was spent. people_for_brief, once ready: the {character, does} entries to add to people in plan_music_video, design_music_video_shoot and create_music_video.",
24182
+ title: "Check another model for a shot list",
24183
+ summary: "Whether a shot list can be kept with another video model, and what changes",
24184
+ description: "Nothing is saved or charged. Every model makes the same kind of shot list, so one usually moves as it is: can_switch says whether this one can (problems: why not, so it has to be written again with plan_music_video for that model); needs: what the model needs before the video can be paid for (a face check for a real person, a new character sheet its provider would take), which can be done after switching; changes: how the video is made differently with it (lip-sync, continuous takes, whole seconds, a drawn frame it can't open on), to tell the user before they pay; qualities: the resolutions it is offered in. Then switch_music_video_model after the user's yes.",
22934
24185
  method: "GET",
22935
- path: "/api/v1/music-video-castings/{casting_id}",
22936
- scopes: ["videos:read"],
22937
- input: external_exports.object({ casting_id: CastingIdSchema.describe("The casting id (casting_\u2026)") }),
24186
+ path: "/api/v1/music-video-plans/{plan_id}/model",
24187
+ scopes: ["videos:read", "videos:write"],
24188
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)"), model: external_exports.enum(MUSIC_VIDEO_MODEL_IDS).describe("The model to check (get_options music_video.models[].id)") }),
22938
24189
  readOnly: true,
22939
24190
  destructive: false,
22940
24191
  idempotent: true,
22941
- cli: ["casting", "get"],
22942
- mcp: "get_music_video_casting"
24192
+ cli: ["plans", "check-model"],
24193
+ mcp: "check_music_video_model",
24194
+ example: { plan_id: "plan_\u2026", model: "seedance-2-5" }
22943
24195
  },
22944
24196
  {
22945
- id: "music_video_castings.draw",
24197
+ id: "music_video_plans.switch_model",
22946
24198
  group: "videos",
22947
- title: "Draw a music video's cast",
22948
- summary: "Draws the people the user kept as character sheets (spends credits)",
22949
- description: `Only after the user's yes to the people and the price. people: the ones kept, by index (the others are declined), each with an edited name or description if the user changed it, or character: a kit character's handle (list_characters) in that role instead, free. An empty list keeps it to the artist (nobody else is cast). credits must be price.per_person times the people drawn (0 when none is); another price answers 409 with the current one. Each description is read first like start_character's describe mode (one made-up adult, never a real or famous person: 422 naming the person's index). One hold for all; each sheet is drawn plain (base clothes, the person only: the video dresses them later), charged once it passes its check, and kept in the song artist's kit as AI-made, not shared. Poll get_music_video_casting until ready, then add people_for_brief to people. Needs an active plan (402 plan_required without one; get_account: plan.active).`,
24199
+ title: "Switch a shot list's model",
24200
+ summary: "Keeps a shot list with another video model: the same shots, idea, people and frames",
24201
+ description: `Free, no director call. Returns the next draft (note "Made with \u2026"), made with that model: the same concept, shots, characters, places and drawn frames, each shot prompted for the new model; written_for keeps the model the director wrote it for. Quote and order with the new plan id (a test is made with it at 480p); a quote, test or video of the earlier draft keeps its own model. 409 with switch (as check_music_video_model) when the shot list can't be kept with that model. Check first and tell the user its changes and needs.`,
22950
24202
  method: "POST",
22951
- path: "/api/v1/music-video-castings/{casting_id}/draw",
24203
+ path: "/api/v1/music-video-plans/{plan_id}/model",
22952
24204
  scopes: ["videos:write"],
22953
- input: external_exports.object({
22954
- casting_id: CastingIdSchema.describe("The casting id"),
22955
- credits: CastingDrawSchema.shape.credits.describe("The price shown: price.per_person \xD7 the people drawn"),
22956
- people: CastingDrawSchema.shape.people.describe('The people kept: [{"index":1},{"index":2,"description":"\u2026"},{"index":3,"character":"mia-torres"}]; [] keeps it to the artist')
22957
- }),
24205
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)"), model: external_exports.enum(MUSIC_VIDEO_MODEL_IDS).describe("The model to make it with") }),
22958
24206
  readOnly: false,
22959
24207
  destructive: false,
22960
- idempotent: false,
22961
- cli: ["casting", "draw"],
22962
- mcp: "draw_music_video_cast"
24208
+ idempotent: true,
24209
+ cli: ["plans", "switch-model"],
24210
+ mcp: "switch_music_video_model",
24211
+ output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema },
24212
+ example: { plan_id: "plan_\u2026", model: "seedance-2-5" }
22963
24213
  },
24214
+ /* Versions */
22964
24215
  {
22965
- id: "music_video_castings.delete",
24216
+ id: "music_video_plans.versions",
22966
24217
  group: "videos",
22967
- title: "Delete a casting",
22968
- summary: "Deletes a casting; the people already kept stay in the kit",
22969
- description: "Not while its people are drawn (409).",
22970
- method: "DELETE",
22971
- path: "/api/v1/music-video-castings/{casting_id}",
22972
- scopes: ["videos:write"],
22973
- input: external_exports.object({ casting_id: CastingIdSchema.describe("The casting id (casting_\u2026)") }),
22974
- readOnly: false,
22975
- destructive: true,
24218
+ title: "List a shot list's versions",
24219
+ summary: "Every version of a shot list, oldest first",
24220
+ description: "Each rewrite, place photo change, angle left out or model switch writes a new version of the same shot list. versions: each its id (a plan id: get_music_video_plan opens it, and quote_music_video / create_music_video take it as plan_id), number, the note it was written from, created_at, shots, and video (a video was made from it, so it stays). current: the number of plan_id among them.",
24221
+ method: "GET",
24222
+ path: "/api/v1/music-video-plans/{plan_id}/versions",
24223
+ scopes: ["videos:read"],
24224
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("Any version of the shot list (plan_\u2026)") }),
24225
+ readOnly: true,
24226
+ destructive: false,
22976
24227
  idempotent: true,
22977
- cli: ["casting", "delete"],
22978
- mcp: "delete_music_video_casting"
24228
+ cli: ["plans", "versions"],
24229
+ mcp: "list_music_video_versions"
22979
24230
  },
22980
- /* The lookbook */
22981
24231
  {
22982
- id: "music_video_lookbooks.create",
24232
+ id: "music_video_plans.delete_version",
22983
24233
  group: "videos",
22984
- title: "Design a music video lookbook",
22985
- summary: "The director designs the outfits, places and props the brief leaves to it as pictures, before the shot list",
22986
- description: `Optional, before the shot list (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}`,
22987
- method: "POST",
22988
- path: "/api/v1/music-video-lookbooks",
24234
+ title: "Delete a version of a shot list",
24235
+ summary: "Removes one version; the others stay",
24236
+ description: "Only a version no video was made from (409 otherwise). The versions written from it are then written from the one before it. Its pictures stay (opening frames and place pictures are kept by what they show). Answers the versions left. To delete the whole shot list, delete_music_video_plan.",
24237
+ method: "DELETE",
24238
+ path: "/api/v1/music-video-plans/{plan_id}/versions/{version_id}",
22989
24239
  scopes: ["videos:write"],
22990
- input: musicVideoPlanInput.omit({ revise: true, lookbook_id: true }),
24240
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("Any version of the shot list (plan_\u2026)"), version_id: MusicVideoPlanIdSchema.describe("The version to delete (versions[].id)") }),
22991
24241
  readOnly: false,
22992
- destructive: false,
22993
- idempotent: false,
22994
- cli: ["lookbook", "design"],
22995
- mcp: "design_music_video_shoot",
22996
- example: { song_id: "song_\u2026", category: "story", direction: "@nina-kazora in the @blue-set" }
24242
+ destructive: true,
24243
+ idempotent: true,
24244
+ cli: ["plans", "delete-version"],
24245
+ mcp: "delete_music_video_version"
22997
24246
  },
24247
+ /* A shot list's pictures */
22998
24248
  {
22999
- id: "music_video_lookbooks.get",
24249
+ id: "music_video_plans.pictures",
23000
24250
  group: "videos",
23001
- title: "Get a lookbook",
23002
- summary: "A lookbook with its pictures as they are drawn",
23003
- 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).",
24251
+ title: "List a shot list's pictures",
24252
+ summary: "Every picture a shot list draws (places, angles, outfits on its people, designed props), with each once drawn",
24253
+ description: "What a shot list's shots are made from that is drawn, each one picture: its places drawn from words and the angles of its places (kind place or angle: place, places[].index; angle), the outfits drawn on its people (kind outfit: the performer in outfits[].index, null for world.wardrobe; kind person: people[].index), and the props the director designed (kind prop: props[].index, those with designed true). key names each (place:3, outfit:1, outfit:world, person:1, prop:2); credits what drawing it costs now; image_url and thumbnail_url once drawn (signed for 7 days; null until then); kit_item_id the piece it waits as in the artist's kit. undrawn: the keys not drawn yet; credits: what drawing them all costs. Those not drawn are drawn while the video is made, in its quote; one drawn here is reused by the video, a later version, a revision and another model while what it shows is unchanged. Every drawn picture also waits in the song artist's kit (pending) until the user keeps it (update_kit_piece kept true) or leaves it out (delete_kit_piece).",
23004
24254
  method: "GET",
23005
- path: "/api/v1/music-video-lookbooks/{lookbook_id}",
24255
+ path: "/api/v1/music-video-plans/{plan_id}/pictures",
23006
24256
  scopes: ["videos:read"],
23007
- input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id (lookbook_\u2026)") }),
24257
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)") }),
23008
24258
  readOnly: true,
23009
24259
  destructive: false,
23010
24260
  idempotent: true,
23011
- cli: ["lookbook", "get"],
23012
- mcp: "get_music_video_lookbook"
24261
+ cli: ["plans", "pictures"],
24262
+ mcp: "list_music_video_pictures"
23013
24263
  },
23014
24264
  {
23015
- id: "music_video_lookbooks.update",
24265
+ id: "music_video_plans.draw_pictures",
23016
24266
  group: "videos",
23017
- title: "Save a lookbook to the kit or not",
23018
- summary: "Whether its kept pieces join the kit when a video is planned from it",
23019
- 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.",
23020
- method: "PATCH",
23021
- path: "/api/v1/music-video-lookbooks/{lookbook_id}",
24267
+ title: "Draw a shot list's pictures",
24268
+ summary: "Draws a shot list's places, angles, outfits and props, to see them before the video (spends credits)",
24269
+ description: `Without confirm: what drawing them costs (pictures to be drawn with each one's credits, and credits, the total), nothing drawn; tell the user, then send confirm true after their go with credits, the total shown (a different price answers 409 with the current one). pictures: the keys to draw (list_music_video_pictures), with the places an angle is drawn from that aren't yet; left out, every one not drawn yet. redraw true draws the ones named again (paid again; the earlier picture stays in the kit). Takes about a minute; charged for each picture drawn (failed lists any that couldn't be, not charged). Each waits in the song artist's kit to be kept. Answers like list_music_video_pictures. ${NEEDS_PLAN}`,
24270
+ method: "POST",
24271
+ path: "/api/v1/music-video-plans/{plan_id}/pictures",
23022
24272
  scopes: ["videos:write"],
23023
- input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id"), save_to_kit: external_exports.boolean() }),
24273
+ input: external_exports.object({
24274
+ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)"),
24275
+ pictures: external_exports.array(external_exports.string().regex(/^(place|outfit|person|prop):(\d+|world)$/)).min(1).max(40).optional().describe("The pictures to draw (pictures[].key: place:3, outfit:1, outfit:world, person:1, prop:2); left out: every one not drawn yet"),
24276
+ redraw: external_exports.boolean().optional().describe("true: draw the ones named again (paid again)"),
24277
+ confirm: external_exports.boolean().optional().describe("true: draw them (spends credits); left out: only the price"),
24278
+ credits: external_exports.number().int().min(0).optional().describe("With confirm: the total price shown")
24279
+ }),
23024
24280
  readOnly: false,
23025
24281
  destructive: false,
23026
- idempotent: true,
23027
- cli: ["lookbook", "update"],
23028
- mcp: "update_music_video_lookbook"
24282
+ idempotent: false,
24283
+ cli: ["plans", "draw-pictures"],
24284
+ mcp: "draw_music_video_pictures",
24285
+ example: { plan_id: "plan_\u2026", confirm: true, credits: 54 }
23029
24286
  },
23030
24287
  {
23031
- id: "music_video_lookbooks.delete",
24288
+ id: "music_video_plans.drop_angle",
23032
24289
  group: "videos",
23033
- title: "Delete a lookbook",
23034
- summary: "Deletes a lookbook nothing was made from, with its pictures",
23035
- description: "Only a lookbook no shot list or video was made from (those keep theirs: 409), and not while its pictures are drawn (409). Pictures already drawn are not refunded.",
24290
+ title: "Leave an angle out of a shot list",
24291
+ summary: "The next draft without one set angle: its shots go back to the place's own picture",
24292
+ description: "Returns the next draft (free, no director call): the shots shot from that angle are shot from its place's picture (or the angle it was drawn from), the rest unchanged. Only an angle (places[].angle not null).",
23036
24293
  method: "DELETE",
23037
- path: "/api/v1/music-video-lookbooks/{lookbook_id}",
24294
+ path: "/api/v1/music-video-plans/{plan_id}/angles/{place}",
23038
24295
  scopes: ["videos:write"],
23039
- input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id (lookbook_\u2026)") }),
23040
- readOnly: false,
23041
- destructive: true,
23042
- idempotent: true,
23043
- cli: ["lookbook", "delete"],
23044
- mcp: "delete_music_video_lookbook"
23045
- },
23046
- {
23047
- id: "music_video_lookbooks.render",
23048
- group: "videos",
23049
- title: "Draw a lookbook",
23050
- summary: "Draws the pieces not drawn yet (spends credits)",
23051
- 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.",
23052
- method: "POST",
23053
- path: "/api/v1/music-video-lookbooks/{lookbook_id}/render",
23054
- scopes: ["videos:write"],
23055
- input: external_exports.object({ lookbook_id: LookbookIdSchema.describe("The lookbook id"), credits: external_exports.number().int().positive().describe("The price shown (price.draw.credits)") }),
24296
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)"), place: external_exports.number().int().min(1).describe("The angle's number (places[].index)") }),
23056
24297
  readOnly: false,
23057
24298
  destructive: false,
23058
24299
  idempotent: false,
23059
- cli: ["lookbook", "render"],
23060
- mcp: "render_music_video_lookbook"
24300
+ cli: ["plans", "drop-angle"],
24301
+ mcp: "drop_music_video_angle",
24302
+ output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema }
23061
24303
  },
24304
+ /* Casting */
23062
24305
  {
23063
- id: "music_video_lookbooks.redesign",
24306
+ id: "music_video_castings.create",
23064
24307
  group: "videos",
23065
- title: "Redesign a lookbook",
23066
- summary: "Redesigns the director's pieces with a note and draws them again (spends credits)",
23067
- description: "The user's own pieces stay. credits: price.redesign.credits.",
24308
+ title: "Cast a music video",
24309
+ summary: "The director proposes who else is in it: up to 3 new people, each drawn as a character sheet only after a yes",
24310
+ description: `Optional, after the idea and before the shot list (nobody appears on screen without a character sheet). Free (a limited number an hour), a few seconds: returns a casting whose people (at most ${CASTING_MAX_PEOPLE}, never more than the model's room in a shot beside the performer and the people already given) each have a role, a first name, what they do (does), a description their sheet is drawn from, and about how many shots they are in. With cast_mode exact, nobody on screen or no room, it proposes nobody (status ready, people []), without a director call. Show each person with price.per_person (price.credits for all); the user may drop anyone, edit a description, or put a kit character in that role instead; then draw_music_video_cast after their yes, or order the video with casting_id to draw them inside the order. Same brief as plan_music_video. Needs an active plan (402 plan_required without one; get_account: plan.active).`,
23068
24311
  method: "POST",
23069
- path: "/api/v1/music-video-lookbooks/{lookbook_id}/redesign",
24312
+ path: "/api/v1/music-video-castings",
23070
24313
  scopes: ["videos:write"],
23071
- 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)") }),
24314
+ input: musicVideoPlanInput.omit({ revise: true, credits: true }),
23072
24315
  readOnly: false,
23073
24316
  destructive: false,
23074
24317
  idempotent: false,
23075
- cli: ["lookbook", "redesign"],
23076
- mcp: "redesign_music_video_lookbook"
24318
+ cli: ["casting", "propose"],
24319
+ mcp: "cast_music_video",
24320
+ example: { song_id: "song_\u2026", category: "story", direction: "She leaves him at the station" }
23077
24321
  },
23078
24322
  {
23079
- id: "music_video_lookbooks.keep",
24323
+ id: "music_video_castings.get",
23080
24324
  group: "videos",
23081
- title: "Keep or leave out a lookbook piece",
23082
- summary: "Whether a piece goes into the video",
23083
- description: "",
23084
- method: "PATCH",
23085
- path: "/api/v1/music-video-lookbooks/{lookbook_id}/pieces/{piece}",
23086
- scopes: ["videos:write"],
23087
- 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() }),
23088
- readOnly: false,
24325
+ title: "Get a casting",
24326
+ summary: "A casting's people as proposed, then as drawn",
24327
+ description: "status: proposed (not drawn), drawing (their sheets are drawn: check back in about a minute), ready or failed. Each person: index, name, role, does, description, shots, state (proposed, declined, drawing, kept: drawn and in the song artist's kit; chosen: a kit character in that role; failed, with error) and character once kept or chosen. price.per_person is a sheet's price; charged is what was spent. people_for_brief, once ready: the {character, does} entries to add to people in plan_music_video, design_music_video_shoot and create_music_video.",
24328
+ method: "GET",
24329
+ path: "/api/v1/music-video-castings/{casting_id}",
24330
+ scopes: ["videos:read"],
24331
+ input: external_exports.object({ casting_id: CastingIdSchema.describe("The casting id (casting_\u2026)") }),
24332
+ readOnly: true,
23089
24333
  destructive: false,
23090
24334
  idempotent: true,
23091
- cli: ["lookbook", "keep"],
23092
- mcp: "keep_music_video_lookbook_piece"
24335
+ cli: ["casting", "get"],
24336
+ mcp: "get_music_video_casting"
23093
24337
  },
23094
24338
  {
23095
- id: "music_video_lookbooks.redraw",
24339
+ id: "music_video_castings.draw",
23096
24340
  group: "videos",
23097
- title: "Redraw a lookbook piece",
23098
- summary: "Draws one of the director's pieces again, with an optional note (spends credits)",
23099
- description: "credits: price.credits_per_picture.",
24341
+ title: "Draw a music video's cast",
24342
+ summary: "Draws the people the user kept as character sheets (spends credits)",
24343
+ description: `Only after the user's yes to the people and the price. people: the ones kept, by index (the others are declined), each with an edited name or description if the user changed it, or character: a kit character's handle (list_characters) in that role instead, free. An empty list keeps it to the artist (nobody else is cast). credits must be price.per_person times the people drawn (0 when none is); another price answers 409 with the current one. Each description is read first like start_character's describe mode (one made-up adult, never a real or famous person: 422 naming the person's index). One hold for all; each sheet is drawn plain (base clothes, the person only: the video dresses them later), charged once it passes its check, and kept in the song artist's kit as AI-made, not shared. Poll get_music_video_casting until ready, then add people_for_brief to people. Needs an active plan (402 plan_required without one; get_account: plan.active).`,
23100
24344
  method: "POST",
23101
- path: "/api/v1/music-video-lookbooks/{lookbook_id}/pieces/{piece}/redraw",
24345
+ path: "/api/v1/music-video-castings/{casting_id}/draw",
23102
24346
  scopes: ["videos:write"],
23103
24347
  input: external_exports.object({
23104
- lookbook_id: LookbookIdSchema.describe("The lookbook id"),
23105
- piece: external_exports.number().int().min(1).describe("The piece's number"),
23106
- note: external_exports.string().trim().min(1).max(500).optional().describe('What to change: "warmer light, nobody else"'),
23107
- credits: external_exports.number().int().positive().describe("The price shown (price.credits_per_picture)")
24348
+ casting_id: CastingIdSchema.describe("The casting id"),
24349
+ credits: CastingDrawSchema.shape.credits.describe("The price shown: price.per_person \xD7 the people drawn"),
24350
+ people: CastingDrawSchema.shape.people.describe('The people kept: [{"index":1},{"index":2,"description":"\u2026"},{"index":3,"character":"mia-torres"}]; [] keeps it to the artist')
23108
24351
  }),
23109
24352
  readOnly: false,
23110
24353
  destructive: false,
23111
24354
  idempotent: false,
23112
- cli: ["lookbook", "redraw"],
23113
- mcp: "redraw_music_video_lookbook_piece"
24355
+ cli: ["casting", "draw"],
24356
+ mcp: "draw_music_video_cast"
24357
+ },
24358
+ {
24359
+ id: "music_video_castings.delete",
24360
+ group: "videos",
24361
+ title: "Delete a casting",
24362
+ summary: "Deletes a casting; the people already kept stay in the kit",
24363
+ description: "Not while its people are drawn (409).",
24364
+ method: "DELETE",
24365
+ path: "/api/v1/music-video-castings/{casting_id}",
24366
+ scopes: ["videos:write"],
24367
+ input: external_exports.object({ casting_id: CastingIdSchema.describe("The casting id (casting_\u2026)") }),
24368
+ readOnly: false,
24369
+ destructive: true,
24370
+ idempotent: true,
24371
+ cli: ["casting", "delete"],
24372
+ mcp: "delete_music_video_casting"
23114
24373
  },
23115
24374
  {
23116
24375
  id: "music_video_plans.delete",
23117
24376
  group: "videos",
23118
24377
  title: "Delete a shot list",
23119
24378
  summary: "Deletes a shot list no video was made from, with every draft of it",
23120
- description: "Deletes the shot list with the drafts it was rewritten from and into, and their drawn frames. One a video was made from (or a delivered video's revision) stays with it: 409.",
24379
+ description: "Deletes the shot list with every version of it (list_music_video_versions; delete_music_video_version deletes one). Opening frames drawn for it stay. One a video was made from (or a delivered video's revision) stays with it: 409.",
23121
24380
  method: "DELETE",
23122
24381
  path: "/api/v1/music-video-plans/{plan_id}",
23123
24382
  scopes: ["videos:write"],
@@ -23132,8 +24391,8 @@ var OPERATIONS = [
23132
24391
  id: "music_video_plans.list",
23133
24392
  group: "videos",
23134
24393
  title: "List music video drafts",
23135
- summary: "A song's music videos in the making: shot lists not made yet and lookbooks not used yet",
23136
- description: "The latest draft of each shot list of the song that no video was made from, and the lookbooks no shot list was written from, from the last 30 days, newest first. Pick one up with get_music_video_plan or get_music_video_lookbook.",
24394
+ summary: "A song's shot lists not made yet, and what writing one costs",
24395
+ description: "price.credits: what writing a shot list (plan_music_video) costs now, and rewriting one from a note. plans: the latest draft of each shot list of the song that no video was made from, from the last 30 days, newest first; pick one up with get_music_video_plan. writing: the shot lists still being written for you.",
23137
24396
  method: "GET",
23138
24397
  path: "/api/v1/music-video-plans",
23139
24398
  scopes: ["videos:read"],
@@ -23178,6 +24437,22 @@ var OPERATIONS = [
23178
24437
  cli: ["plans", "frames"],
23179
24438
  mcp: "list_music_video_frames"
23180
24439
  },
24440
+ {
24441
+ id: "music_video_plans.storyboard",
24442
+ group: "videos",
24443
+ title: "Show the storyboard",
24444
+ summary: "A shot list as a storyboard: every shot with its picture, the cast's outfits and what drawing the rest costs",
24445
+ description: "In one call, what the studio's Shot list shows: the concept and every shot (its time, lyrics and what happens) with the picture it is made from so far (its opening frame, else its first place drawn, else that place's stock photo; null when none is drawn yet), the outfits on its people, pictures (undrawn keys and what drawing them costs: draw_music_video_pictures) and frames (one frame's price and the shots a Draw all would draw: draw_music_video_frame). The video's price is a quote: quote_music_video with the plan_id (and test true for the chorus test). In chat apps that draw cards it draws the storyboard with the price and Make it. Read only, free.",
24446
+ method: "GET",
24447
+ path: "/api/v1/music-video-plans/{plan_id}/storyboard",
24448
+ scopes: ["videos:read", "videos:write"],
24449
+ input: external_exports.object({ plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)") }),
24450
+ readOnly: true,
24451
+ destructive: false,
24452
+ idempotent: true,
24453
+ cli: ["plans", "storyboard"],
24454
+ mcp: "show_music_video_plan"
24455
+ },
23181
24456
  {
23182
24457
  id: "music_video_plans.draw_frame",
23183
24458
  group: "videos",
@@ -23189,9 +24464,11 @@ var OPERATIONS = [
23189
24464
  scopes: ["videos:write"],
23190
24465
  input: external_exports.object({
23191
24466
  plan_id: MusicVideoPlanIdSchema.describe("The plan id (plan_\u2026)"),
23192
- shot: external_exports.number().int().min(1).describe("The shot's number (shots[].index)"),
23193
- credits: external_exports.number().int().positive().describe("The price shown (list_music_video_frames: price.credits)")
23194
- }),
24467
+ shot: external_exports.number().int().min(1).optional().describe("One shot's number (shots[].index)"),
24468
+ all: external_exports.literal(true).optional().describe("Draw every frame not drawn yet at once, as the studio's Draw all does (in the background: list_music_video_frames batch shows it); send shots and credits with it"),
24469
+ shots: external_exports.array(external_exports.number().int().positive()).min(1).max(100).optional().describe("With all: the shots list_music_video_frames gives in batch_shots"),
24470
+ credits: external_exports.number().int().positive().describe("The price shown: one frame's price.credits, or with all, price.credits \xD7 batch_shots")
24471
+ }).refine((v) => v.all ? Boolean(v.shots) && v.shot === void 0 : v.shot !== void 0 && v.shots === void 0, { message: "Send shot, or all with shots" }),
23195
24472
  readOnly: false,
23196
24473
  destructive: true,
23197
24474
  idempotent: false,
@@ -23466,6 +24743,44 @@ var OPERATIONS = [
23466
24743
  cli: ["videos", "delete"],
23467
24744
  mcp: "delete_video"
23468
24745
  },
24746
+ {
24747
+ id: "video_drafts.list",
24748
+ group: "videos",
24749
+ title: "List video drafts",
24750
+ summary: "Videos started in the studio and not made yet, newest first (kept 30 days)",
24751
+ description: "The person's own drafts in this workspace: one per song and kind of video (lyric-video, canvas, music-video), with the step it was left on and when. Starting the same kind again for a song opens its draft. They are made in the studio on web and app; to make a video here, quote and create it.",
24752
+ method: "GET",
24753
+ path: "/api/v1/video-drafts",
24754
+ scopes: ["videos:read", "videos:write"],
24755
+ input: external_exports.object({}),
24756
+ readOnly: true,
24757
+ destructive: false,
24758
+ idempotent: true,
24759
+ cli: ["drafts", "list"],
24760
+ mcp: "list_video_drafts"
24761
+ },
24762
+ {
24763
+ id: "video_drafts.delete",
24764
+ group: "videos",
24765
+ title: "Delete video drafts",
24766
+ summary: "Delete one draft, or every draft (of a song or a kind)",
24767
+ description: "Only when the user asks. id: that draft. Without id, all: true deletes every one of the person's drafts in this workspace, only a song's with song_id, only a kind with type: tell the user how many (list_video_drafts) and ask first. Videos already made are never touched. Answers deleted, how many.",
24768
+ method: "DELETE",
24769
+ path: "/api/v1/video-drafts",
24770
+ scopes: ["videos:write"],
24771
+ input: external_exports.object({
24772
+ id: external_exports.uuid().optional().describe("The draft id (list_video_drafts)"),
24773
+ all: external_exports.literal(true).optional().describe("Without id: every draft, narrowed by song_id or type"),
24774
+ song_id: songId.optional().describe("With all: only this song's drafts"),
24775
+ type: external_exports.enum(["lyric-video", "canvas", "music-video"]).optional().describe("With all: only drafts of this kind")
24776
+ }),
24777
+ readOnly: false,
24778
+ destructive: true,
24779
+ idempotent: true,
24780
+ cli: ["drafts", "delete"],
24781
+ mcp: "delete_video_drafts",
24782
+ example: { all: true }
24783
+ },
23469
24784
  {
23470
24785
  id: "videos.share",
23471
24786
  group: "videos",
@@ -27143,16 +28458,16 @@ function chosenWorkspace(config2, named = process.env.KINETUNE_ORGANIZATION) {
27143
28458
  const wanted = named?.trim();
27144
28459
  if (!wanted) return null;
27145
28460
  const stored = Object.entries(config2.workspaces ?? {});
27146
- const found = stored.find(([id2]) => id2 === wanted) ?? stored.find(([, w]) => w.name.toLowerCase() === wanted.toLowerCase());
28461
+ const found = stored.find(([id3]) => id3 === wanted) ?? stored.find(([, w]) => w.name.toLowerCase() === wanted.toLowerCase());
27147
28462
  if (found) return found[0];
27148
- throw new WorkspaceNotSignedIn(`Not signed in to ${wanted}${stored.length ? ` (signed in to: ${stored.map(([id2, w]) => `${w.name} ${id2}`).join(", ")})` : ""}. Run \`kinetune auth login --organization ${wanted}\`.`);
28463
+ throw new WorkspaceNotSignedIn(`Not signed in to ${wanted}${stored.length ? ` (signed in to: ${stored.map(([id3, w]) => `${w.name} ${id3}`).join(", ")})` : ""}. Run \`kinetune auth login --organization ${wanted}\`.`);
27149
28464
  }
27150
28465
  var WorkspaceNotSignedIn = class extends Error {
27151
28466
  };
27152
28467
  var signInOf = (config2, organization) => organization ? config2.workspaces?.[organization]?.auth : config2.auth;
27153
28468
  function withSignIn(config2, organization, auth) {
27154
28469
  const previous = signInOf(config2, organization), same = (other) => Boolean(previous && other && secretOf(other) === secretOf(previous));
27155
- const workspaces = config2.workspaces && Object.fromEntries(Object.entries(config2.workspaces).map(([id2, w]) => [id2, id2 === organization || same(w.auth) ? { ...w, auth } : w]));
28470
+ const workspaces = config2.workspaces && Object.fromEntries(Object.entries(config2.workspaces).map(([id3, w]) => [id3, id3 === organization || same(w.auth) ? { ...w, auth } : w]));
27156
28471
  return { ...config2, ...workspaces ? { workspaces } : {}, ...organization === null || same(config2.auth) ? { auth } : {} };
27157
28472
  }
27158
28473
  var secretOf = (auth) => auth.type === "oauth" ? auth.access_token : auth.api_key;
@@ -27307,7 +28622,7 @@ async function revoke(config2, auth = config2.auth) {
27307
28622
  // package.json
27308
28623
  var package_default = {
27309
28624
  name: "@kinetune/cli",
27310
- version: "2.11.0",
28625
+ version: "4.2.0",
27311
28626
  description: "Command line for Kinetune: lyric videos, Spotify Canvas loops and AI music videos from your songs, for people and AI agents.",
27312
28627
  license: "MIT",
27313
28628
  homepage: "https://kinetune.com/developers#cli",
@@ -27495,7 +28810,7 @@ MCP tool: ${op.mcp} REST: ${op.method} ${op.path}`);
27495
28810
  if (type === "boolean" || p.const === true) {
27496
28811
  cmd.addOption(new Option(`--${kebab(name)}`, desc || name));
27497
28812
  if (type === "boolean" && p.default === void 0) cmd.addOption(new Option(`--no-${kebab(name)}`, `Send ${name} false`));
27498
- } else if (type === "array" && p.items?.type !== "object") cmd.addOption(new Option(`--${kebab(name)} <values...>`, desc).argParser((v, prev) => [...prev ?? [], ...v.split(",")]));
28813
+ } else if (type === "array" && p.items?.type !== "object" && !p.items?.anyOf && !p.items?.oneOf) cmd.addOption(new Option(`--${kebab(name)} <values...>`, desc).argParser((v, prev) => [...prev ?? [], ...v.split(",")]));
27499
28814
  else if (type === "number" || type === "integer") cmd.addOption(new Option(`--${kebab(name)} <number>`, desc).argParser(Number));
27500
28815
  else if (type === "object" || type === "json" || type === "array") cmd.addOption(new Option(`--${kebab(name)} <json>`, `${desc} (JSON)`).argParser((v) => {
27501
28816
  try {
@@ -27506,6 +28821,8 @@ MCP tool: ${op.mcp} REST: ${op.method} ${op.path}`);
27506
28821
  }));
27507
28822
  else cmd.addOption(new Option(`--${kebab(name)} <value>`, desc));
27508
28823
  }
28824
+ const deprecated = new Set(Object.entries(props).filter(([, prop]) => prop.deprecated || unwrapNullable(prop).schema.deprecated).map(([name]) => `--${kebab(name)}`));
28825
+ for (const option of cmd.options) if (deprecated.has(option.long ?? "")) option.hideHelp();
27509
28826
  for (const name of op.textFiles ?? []) cmd.option(`--${kebab(name)}-file <file>`, `${props[name]?.description ?? name}: read from a file (or - for stdin)`);
27510
28827
  cmd.option("--input <file>", "The whole input as JSON (a file, or - for stdin); flags override it");
27511
28828
  cmd.addOption(WORKSPACE_OPTION());
@@ -27582,17 +28899,18 @@ function program2() {
27582
28899
  });
27583
28900
  const GROUP_DESCRIPTIONS = {
27584
28901
  " uploads": "A signed upload URL for a file (for tools that pass URLs; the CLI sends files itself)",
27585
- " artists": "Artists and their image",
28902
+ " artists": "Artists, their image, their page and their profiles",
28903
+ " artists profiles": "The artist's links on other services: list, add, order, change, remove, find again",
28904
+ " artists page": "The artist page at kinetune.com/@handle: address, draft, preview, publish, stats",
27586
28905
  " songs": "Songs: upload, list, analysis",
27587
28906
  " looks": "Looks: reusable lyric-video designs",
27588
28907
  " quote": "Exact credits for a lyric video, Canvas or music video, before anything is charged",
27589
28908
  " create": "Create a lyric video, Canvas or music video (quotes first and asks unless --yes)",
27590
28909
  " videos": "Videos: status, wait, download, cancel",
27591
- " plan": "Plan a music video before paying: the director's concept and shots, free",
28910
+ " plan": "Plan a music video: the director's concept and shots, for the credits plans list shows",
27592
28911
  " plans": "Music video plans made earlier",
27593
28912
  " kit": "The artist kit: outfits, places and props a music video brief mentions by @handle",
27594
28913
  " casting": "Who else is in a music video: the director proposes people, each drawn as a character sheet after your yes",
27595
- " lookbook": "Design a music video shoot: the director's outfits, places and props as pictures, before the plan",
27596
28914
  " covers": "Cover art: Kinetune makes covers for a song (quote first), every cover kept; use, redraw or delete one"
27597
28915
  };
27598
28916
  const groups = /* @__PURE__ */ new Map();
@@ -27633,7 +28951,7 @@ function program2() {
27633
28951
  auth.command("list").description("The workspaces you are signed in to; --organization picks one for a command").action(async () => {
27634
28952
  const config2 = await loadConfig();
27635
28953
  const active = Object.entries(config2.workspaces ?? {}).find(([, w]) => config2.auth && JSON.stringify(w.auth) === JSON.stringify(config2.auth))?.[0];
27636
- print({ items: Object.entries(config2.workspaces ?? {}).map(([id2, w]) => ({ id: id2, name: w.name, type: w.auth.type === "oauth" ? "sign-in" : "api key", status: id2 === active ? "default" : "" })) });
28954
+ print({ items: Object.entries(config2.workspaces ?? {}).map(([id3, w]) => ({ id: id3, name: w.name, type: w.auth.type === "oauth" ? "sign-in" : "api key", status: id3 === active ? "default" : "" })) });
27637
28955
  });
27638
28956
  auth.command("status").description("The workspace, its plan, how you are signed in and the credit balance").addOption(WORKSPACE_OPTION()).action(async () => print(await call(operation("account.get"), {})));
27639
28957
  auth.command("token").description("Print the current bearer token (for curl or other tools)").addOption(WORKSPACE_OPTION()).action(async () => {
@@ -27642,16 +28960,16 @@ function program2() {
27642
28960
  auth.command("logout").description("Forget the stored credentials (and revoke the OAuth tokens); --organization: only that workspace's").addOption(WORKSPACE_OPTION()).action(async () => {
27643
28961
  const config2 = await loadConfig();
27644
28962
  if (workspace) {
27645
- let id2;
28963
+ let id3;
27646
28964
  try {
27647
- id2 = chosenWorkspace(config2, workspace);
28965
+ id3 = chosenWorkspace(config2, workspace);
27648
28966
  } catch (error62) {
27649
28967
  if (error62 instanceof WorkspaceNotSignedIn) throw new UsageError(error62.message);
27650
28968
  throw error62;
27651
28969
  }
27652
- const gone = config2.workspaces[id2];
28970
+ const gone = config2.workspaces[id3];
27653
28971
  await revoke(config2, gone.auth);
27654
- const { [id2]: _, ...rest } = config2.workspaces;
28972
+ const { [id3]: _, ...rest } = config2.workspaces;
27655
28973
  const isDefault = JSON.stringify(config2.auth) === JSON.stringify(gone.auth);
27656
28974
  const next = Object.values(rest)[0];
27657
28975
  await saveConfig({ ...config2, workspaces: rest, ...isDefault ? { auth: next?.auth } : {} });