@kinetune/cli 2.3.0 → 2.9.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +100 -10
- package/dist/kinetune.mjs +698 -98
- package/package.json +1 -1
package/dist/kinetune.mjs
CHANGED
|
@@ -20431,7 +20431,13 @@ var OutroDisplaySchema = DisplaySchema.omit({ lyrics: true, headline: true });
|
|
|
20431
20431
|
|
|
20432
20432
|
// ../video-types/src/kit.ts
|
|
20433
20433
|
var KIT_KINDS = ["outfit", "place", "prop"];
|
|
20434
|
+
var KIT_ANGLES = ["three-quarter", "side", "low"];
|
|
20434
20435
|
var KIT_HANDLE = /^[a-z0-9][a-z0-9-]{0,39}$/;
|
|
20436
|
+
var SHOT_SIZES = ["close", "medium", "wide"];
|
|
20437
|
+
var SHOT_ANGLES = ["front", "three-quarter", "side", "low", "high", "over-shoulder", "back"];
|
|
20438
|
+
var SHOT_MOVES = ["push-in", "pull-out", "arc", "tilt", "dolly", "handheld", "locked-off"];
|
|
20439
|
+
var CHARACTER_DESCRIPTION_MIN = 10;
|
|
20440
|
+
var CHARACTER_DESCRIPTION_MAX = 600;
|
|
20435
20441
|
|
|
20436
20442
|
// ../video-types/src/model-guide.ts
|
|
20437
20443
|
var AA_T2V = { board: "Artificial Analysis \xB7 Text to video with audio", source: "Artificial Analysis Video Arena", url: "https://artificialanalysis.ai/video/leaderboard/text-to-video" };
|
|
@@ -20490,6 +20496,82 @@ var MUSIC_VIDEO_MODEL_GUIDES = {
|
|
|
20490
20496
|
}
|
|
20491
20497
|
};
|
|
20492
20498
|
|
|
20499
|
+
// ../video-types/src/visual-styles.ts
|
|
20500
|
+
var MUSIC_VIDEO_STYLE_IDS = [
|
|
20501
|
+
"natural",
|
|
20502
|
+
"film",
|
|
20503
|
+
"golden-hour",
|
|
20504
|
+
"neon-night",
|
|
20505
|
+
"noir",
|
|
20506
|
+
"vintage",
|
|
20507
|
+
"dreamy",
|
|
20508
|
+
"super-8",
|
|
20509
|
+
"vhs",
|
|
20510
|
+
"documentary",
|
|
20511
|
+
"glossy-pop",
|
|
20512
|
+
"indie",
|
|
20513
|
+
"cyberpunk",
|
|
20514
|
+
"y2k",
|
|
20515
|
+
"lofi",
|
|
20516
|
+
"painterly",
|
|
20517
|
+
"anime",
|
|
20518
|
+
"clay"
|
|
20519
|
+
];
|
|
20520
|
+
|
|
20521
|
+
// ../video-types/src/cover-art.ts
|
|
20522
|
+
var COVER_STYLE_IDS = ["auto", "portrait", "snapshot", "film-still", "object", "place", "painted", "illustrated", "cartoon", "anime", "collage", "3d", "graphic", "type"];
|
|
20523
|
+
var COVER_VIBE_IDS = ["dark", "sad", "romantic", "aggressive", "luxury", "aesthetic", "urban", "hood", "space", "surreal", "vintage"];
|
|
20524
|
+
var COVER_VIBES_MAX = 2;
|
|
20525
|
+
var COVER_WORDS = ["none", "title", "artist_title"];
|
|
20526
|
+
var COVER_ARTIST_MODES = ["auto", "always", "never"];
|
|
20527
|
+
var COVER_COUNT = { min: 1, max: 4, default: 1 };
|
|
20528
|
+
var COVER_IDEA_MAX = 500;
|
|
20529
|
+
var COVER_NOTE_MAX = 500;
|
|
20530
|
+
var COVER_FONTS = {
|
|
20531
|
+
anton: "Anton",
|
|
20532
|
+
"bebas-neue": "Bebas Neue",
|
|
20533
|
+
"archivo-black": "Archivo Black",
|
|
20534
|
+
"big-shoulders-display": "Big Shoulders",
|
|
20535
|
+
oswald: "Oswald",
|
|
20536
|
+
"barlow-condensed": "Barlow Condensed",
|
|
20537
|
+
inter: "Inter",
|
|
20538
|
+
montserrat: "Montserrat",
|
|
20539
|
+
syne: "Syne",
|
|
20540
|
+
unbounded: "Unbounded",
|
|
20541
|
+
"dm-serif-display": "DM Serif Display",
|
|
20542
|
+
"playfair-display": "Playfair Display",
|
|
20543
|
+
"instrument-serif": "Instrument Serif",
|
|
20544
|
+
"bodoni-moda": "Bodoni Moda",
|
|
20545
|
+
fraunces: "Fraunces",
|
|
20546
|
+
"abril-fatface": "Abril Fatface",
|
|
20547
|
+
"cormorant-garamond": "Cormorant Garamond",
|
|
20548
|
+
"permanent-marker": "Permanent Marker",
|
|
20549
|
+
caveat: "Caveat",
|
|
20550
|
+
"space-mono": "Space Mono",
|
|
20551
|
+
righteous: "Righteous",
|
|
20552
|
+
shrikhand: "Shrikhand",
|
|
20553
|
+
"rubik-mono-one": "Rubik Mono One",
|
|
20554
|
+
monoton: "Monoton"
|
|
20555
|
+
};
|
|
20556
|
+
var COVER_FONT_IDS = Object.keys(COVER_FONTS);
|
|
20557
|
+
var CoverLookSchema = external_exports.object({
|
|
20558
|
+
colors: external_exports.array(external_exports.string().regex(/^#[0-9a-fA-F]{6}$/)).min(1).max(3),
|
|
20559
|
+
font: external_exports.string().min(1).max(40).refine((f) => f in COVER_FONTS, "font is one of the cover typefaces (GET /options: cover_art.fonts)")
|
|
20560
|
+
}).strict();
|
|
20561
|
+
var CoverRequestSchema = external_exports.object({
|
|
20562
|
+
song_id: external_exports.string().min(1),
|
|
20563
|
+
count: external_exports.number().int().min(COVER_COUNT.min).max(COVER_COUNT.max).default(COVER_COUNT.default),
|
|
20564
|
+
style: external_exports.enum(COVER_STYLE_IDS).default("auto"),
|
|
20565
|
+
vibes: external_exports.array(external_exports.enum(COVER_VIBE_IDS)).max(COVER_VIBES_MAX).default([]).refine((v) => new Set(v).size === v.length, "vibes repeat"),
|
|
20566
|
+
artist: external_exports.enum(COVER_ARTIST_MODES).default("auto"),
|
|
20567
|
+
idea: external_exports.string().trim().max(COVER_IDEA_MAX).optional(),
|
|
20568
|
+
words: external_exports.enum(COVER_WORDS).default("none"),
|
|
20569
|
+
/** Overrides the artist's look for this round (it becomes theirs when a cover from it is used). */
|
|
20570
|
+
look: CoverLookSchema.optional(),
|
|
20571
|
+
credits: external_exports.number().int().positive()
|
|
20572
|
+
}).strict().refine((r) => r.style !== "type" || r.words !== "none", { message: "The Type style needs words: title, or artist and title", path: ["words"] });
|
|
20573
|
+
var CoverRedrawSchema = external_exports.object({ cover_id: external_exports.string().min(1), note: external_exports.string().trim().min(1).max(COVER_NOTE_MAX), credits: external_exports.number().int().positive() }).strict();
|
|
20574
|
+
|
|
20493
20575
|
// ../video-types/src/index.ts
|
|
20494
20576
|
var MAX_VARIATIONS = 4;
|
|
20495
20577
|
var variations = external_exports.number().int().min(1).max(MAX_VARIATIONS).default(1);
|
|
@@ -20531,6 +20613,13 @@ var BACKGROUND_UPLOAD_LIMITS = {
|
|
|
20531
20613
|
image: { maxBytes: 25 * 1024 * 1024, minShortSide: 720, types: ["image/jpeg", "image/png", "image/webp"] },
|
|
20532
20614
|
video: { maxBytes: 300 * 1024 * 1024, minShortSide: 720, minSeconds: 4, maxSeconds: 180, types: ["video/mp4", "video/quicktime", "video/webm"] }
|
|
20533
20615
|
};
|
|
20616
|
+
var UPLOAD_CONTENT_TYPES = ["audio/mpeg", "audio/wav", "audio/mp4", "image/jpeg", "image/png", "image/webp", "video/mp4", "video/quicktime", "video/webm"];
|
|
20617
|
+
var UPLOAD_MAX_BYTES = 300 * 1024 * 1024;
|
|
20618
|
+
var UploadCreateSchema = external_exports.object({
|
|
20619
|
+
filename: external_exports.string().trim().min(1).max(200).regex(/^[^/\\\u0000-\u001f]+$/, "A file name, without folders"),
|
|
20620
|
+
content_type: external_exports.enum(UPLOAD_CONTENT_TYPES),
|
|
20621
|
+
size_bytes: external_exports.number().int().min(1).max(UPLOAD_MAX_BYTES)
|
|
20622
|
+
}).strict();
|
|
20534
20623
|
var isUploadSource = (source) => BACKGROUND_SOURCES2[source].source === "upload";
|
|
20535
20624
|
var backgroundSourcesFor = (category) => categoryUsesImages(category) ? [...MEDIA_BACKGROUND_SOURCES, "designed"] : ["designed", ...MEDIA_BACKGROUND_SOURCES];
|
|
20536
20625
|
var backgroundSourceFor = (category, background) => background.source ?? backgroundSourcesFor(category)[0];
|
|
@@ -20616,7 +20705,7 @@ var CanvasRequestSchema = external_exports.object({
|
|
|
20616
20705
|
resolution: external_exports.enum(CANVAS_RESOLUTIONS).default("1080p"),
|
|
20617
20706
|
style: external_exports.enum(CANVAS_STYLES).optional(),
|
|
20618
20707
|
direction: external_exports.string().trim().max(2e3).optional(),
|
|
20619
|
-
inspiration: external_exports.enum(CANVAS_INSPIRATIONS).default("
|
|
20708
|
+
inspiration: external_exports.enum(CANVAS_INSPIRATIONS).default("song"),
|
|
20620
20709
|
feature_artist: external_exports.enum(CANVAS_FEATURE_ARTIST_MODES).default("auto"),
|
|
20621
20710
|
// Who may appear (feature_artist auto or always): a character of a Creator workspace's cast, whose projects have none of their
|
|
20622
20711
|
// own. Omitted: the song's artist's character.
|
|
@@ -20673,26 +20762,6 @@ var MUSIC_VIDEO_CATEGORIES = {
|
|
|
20673
20762
|
band: { label: "Band", description: "The whole band performs the song together.", needs: { ability: "ensemble" } },
|
|
20674
20763
|
action: { label: "Action", description: "A chase toward one goal, cut fast to the song, the performer singing between.", needs: { ability: "action" } }
|
|
20675
20764
|
};
|
|
20676
|
-
var MUSIC_VIDEO_STYLE_IDS = [
|
|
20677
|
-
"natural",
|
|
20678
|
-
"film",
|
|
20679
|
-
"golden-hour",
|
|
20680
|
-
"neon-night",
|
|
20681
|
-
"noir",
|
|
20682
|
-
"vintage",
|
|
20683
|
-
"dreamy",
|
|
20684
|
-
"super-8",
|
|
20685
|
-
"vhs",
|
|
20686
|
-
"documentary",
|
|
20687
|
-
"glossy-pop",
|
|
20688
|
-
"indie",
|
|
20689
|
-
"cyberpunk",
|
|
20690
|
-
"y2k",
|
|
20691
|
-
"lofi",
|
|
20692
|
-
"painterly",
|
|
20693
|
-
"anime",
|
|
20694
|
-
"clay"
|
|
20695
|
-
];
|
|
20696
20765
|
var MUSIC_VIDEO_STYLES = {
|
|
20697
20766
|
natural: { label: "Natural", description: "True-to-life color and light." },
|
|
20698
20767
|
film: { label: "Film", description: "35 mm film: grain, soft contrast and rich color." },
|
|
@@ -20777,6 +20846,7 @@ var MUSIC_VIDEO_MODELS = {
|
|
|
20777
20846
|
};
|
|
20778
20847
|
var MusicVideoPlanIdSchema = external_exports.string().regex(/^plan_[0-9a-f-]{36}$/, "A music video plan id (plan_\u2026)");
|
|
20779
20848
|
var LookbookIdSchema = external_exports.string().regex(/^lookbook_[0-9a-f-]{36}$/, "A lookbook id (lookbook_\u2026)");
|
|
20849
|
+
var CastingIdSchema = external_exports.string().regex(/^casting_[0-9a-f-]{36}$/, "A casting id (casting_\u2026)");
|
|
20780
20850
|
var MusicVideoLookIdSchema = external_exports.string().regex(/^mvlook_[0-9a-f-]{36}$/, "A music video Look id (mvlook_\u2026)");
|
|
20781
20851
|
var MusicVideoCastSchema = external_exports.object({ outfit_kit: external_exports.string().regex(/^[a-z0-9-]{1,40}$/, "A kit outfit\u2019s handle").optional() }).strict();
|
|
20782
20852
|
var MUSIC_VIDEO_SCENE_MODES = ["invent", "stock"];
|
|
@@ -20799,9 +20869,30 @@ var KitItemUpdateSchema = external_exports.object({
|
|
|
20799
20869
|
/** A character only: it shows an AI-made person (looks like no real person) or a real one. */
|
|
20800
20870
|
ai_made: external_exports.boolean().optional(),
|
|
20801
20871
|
/** Offered to every other artist's studio too (true), or only its own artist's (false). */
|
|
20802
|
-
shared: external_exports.boolean().optional()
|
|
20872
|
+
shared: external_exports.boolean().optional(),
|
|
20873
|
+
/** Another angle of a place, waiting (pending): keep it in the kit. Leaving it out is deleting it. */
|
|
20874
|
+
kept: external_exports.literal(true).optional()
|
|
20803
20875
|
}).strict().refine((v) => Object.keys(v).length > 0, { message: "Nothing to change" });
|
|
20804
20876
|
var MusicVideoPersonSchema = external_exports.object({ character: KitHandleSchema, does: external_exports.string().trim().min(1).max(300).optional(), outfit: KitHandleSchema.optional() }).strict();
|
|
20877
|
+
var MUSIC_VIDEO_CAST_MODES = ["exact", "director"];
|
|
20878
|
+
var castModeOf = (brief) => brief.cast_mode ?? "director";
|
|
20879
|
+
var CASTING_MAX_PEOPLE = 3;
|
|
20880
|
+
var CastingPersonSchema = external_exports.object({
|
|
20881
|
+
name: external_exports.string().trim().min(1).max(30),
|
|
20882
|
+
role: external_exports.string().trim().min(1).max(80),
|
|
20883
|
+
does: external_exports.string().trim().min(1).max(300),
|
|
20884
|
+
description: external_exports.string().trim().min(CHARACTER_DESCRIPTION_MIN).max(CHARACTER_DESCRIPTION_MAX),
|
|
20885
|
+
shots: external_exports.number().int().min(1).max(200)
|
|
20886
|
+
}).strict();
|
|
20887
|
+
var CastingDrawSchema = external_exports.object({
|
|
20888
|
+
credits: external_exports.number().int().min(0),
|
|
20889
|
+
people: external_exports.array(external_exports.object({
|
|
20890
|
+
index: external_exports.number().int().min(1).max(CASTING_MAX_PEOPLE),
|
|
20891
|
+
name: external_exports.string().trim().min(1).max(30).optional(),
|
|
20892
|
+
description: external_exports.string().trim().min(CHARACTER_DESCRIPTION_MIN).max(CHARACTER_DESCRIPTION_MAX).optional(),
|
|
20893
|
+
character: KitHandleSchema.optional()
|
|
20894
|
+
}).strict()).max(CASTING_MAX_PEOPLE).refine((list) => new Set(list.map((p) => p.index)).size === list.length, { message: "Each person once" })
|
|
20895
|
+
}).strict();
|
|
20805
20896
|
var musicVideoBrief = {
|
|
20806
20897
|
model: external_exports.enum(MUSIC_VIDEO_MODEL_IDS).default(DEFAULT_MUSIC_VIDEO_MODEL),
|
|
20807
20898
|
category: external_exports.enum(MUSIC_VIDEO_CATEGORY_IDS).default("performance"),
|
|
@@ -20820,6 +20911,8 @@ var musicVideoBrief = {
|
|
|
20820
20911
|
// The people besides the performer (one entry a character, in the shots' room for people), each with what they do if the artist
|
|
20821
20912
|
// says; the director decides the rest. direction may mention them too.
|
|
20822
20913
|
people: external_exports.array(MusicVideoPersonSchema).max(8).refine((list) => new Set(list.map((p) => p.character)).size === list.length, { message: "Each person once" }).optional(),
|
|
20914
|
+
// Who else may be on screen: only the people given (exact), or the director may cast more (director; omitted: director).
|
|
20915
|
+
cast_mode: external_exports.enum(MUSIC_VIDEO_CAST_MODES).optional(),
|
|
20823
20916
|
scenes: MusicVideoScenesSchema.default({ mode: "invent" }),
|
|
20824
20917
|
// The lookbook whose kept pieces the video uses, like the kit pieces the direction mentions.
|
|
20825
20918
|
lookbook_id: LookbookIdSchema.optional(),
|
|
@@ -20829,7 +20922,10 @@ var musicVideoBrief = {
|
|
|
20829
20922
|
// Whether the artist sings on camera: the director decides, or never (the song plays over every shot).
|
|
20830
20923
|
lipsync: external_exports.enum(MUSIC_VIDEO_LIPSYNC).default("auto"),
|
|
20831
20924
|
// A music video Look (made public by someone, or the workspace's own) whose direction, places and props the video follows.
|
|
20832
|
-
look_id: MusicVideoLookIdSchema.optional()
|
|
20925
|
+
look_id: MusicVideoLookIdSchema.optional(),
|
|
20926
|
+
// Only what the kit's pictures show: no other place, prop, person or lighting change (kitOnlyOf). Omitted: on when the brief
|
|
20927
|
+
// mentions a kit piece.
|
|
20928
|
+
kit_only: external_exports.boolean().optional()
|
|
20833
20929
|
};
|
|
20834
20930
|
var MUSIC_VIDEO_BRIEF_FIELDS = Object.keys(musicVideoBrief);
|
|
20835
20931
|
var onScreenOf = (brief) => brief.on_screen ?? MUSIC_VIDEO_CATEGORIES[brief.category]?.needs?.onScreen ?? "artist";
|
|
@@ -20837,7 +20933,7 @@ var fitsModel = (value, ctx) => {
|
|
|
20837
20933
|
const model = MUSIC_VIDEO_MODELS[value.model];
|
|
20838
20934
|
const issue2 = (path4, message) => ctx.addIssue({ code: "custom", path: [path4], message });
|
|
20839
20935
|
if (!model.categories.includes(value.category)) issue2("category", `${model.label} doesn\u2019t make ${MUSIC_VIDEO_CATEGORIES[value.category].label} videos`);
|
|
20840
|
-
if (value.style && !model.styles.includes(value.style)) issue2("style", `${model.label} doesn\u2019t make the ${MUSIC_VIDEO_STYLES[value.style].label}
|
|
20936
|
+
if (value.style && !model.styles.includes(value.style)) issue2("style", `${model.label} doesn\u2019t make the ${MUSIC_VIDEO_STYLES[value.style].label} visual style`);
|
|
20841
20937
|
if (!model.formats.includes(value.aspect_ratio)) issue2("aspect_ratio", `${model.label} makes ${model.formats.join(", ")}`);
|
|
20842
20938
|
if (value.trim && value.trim.end_seconds - value.trim.start_seconds > MUSIC_VIDEO_LENGTH_BOUNDS.max + 1e-6) issue2("trim", `A music video is at most ${MUSIC_VIDEO_LENGTH_BOUNDS.max / 60} minutes: pick a shorter section`);
|
|
20843
20939
|
if (value.trim && value.trim.end_seconds - value.trim.start_seconds < MUSIC_VIDEO_LENGTH_BOUNDS.min - 1e-6) issue2("trim", `A music video is at least ${MUSIC_VIDEO_LENGTH_BOUNDS.min} seconds: pick a longer section`);
|
|
@@ -20848,6 +20944,7 @@ var fitsModel = (value, ctx) => {
|
|
|
20848
20944
|
if (on !== "artist" && value.performer) issue2("performer", `Nobody performs in a video ${on === "cast" ? "with a cast (mention its characters in direction)" : "with no one on screen"}: leave performer out`);
|
|
20849
20945
|
if (value.takes === "continuous" && !(model.keyframes.start && model.keyframes.end)) issue2("takes", `${model.label} makes no continuous takes`);
|
|
20850
20946
|
if (value.people?.length && on === "none") issue2("people", "Nobody is on screen in this video: leave people out, or put a cast on screen");
|
|
20947
|
+
if (value.cast_mode === "exact" && on === "cast" && !value.people?.length) issue2("people", "Pick the people in it, or let the director cast (cast_mode director)");
|
|
20851
20948
|
if (value.lipsync === "never" && MUSIC_VIDEO_CATEGORIES[value.category].needs?.sings) issue2("lipsync", `A ${MUSIC_VIDEO_CATEGORIES[value.category].label} video is sung on camera: choose another kind, or let the director decide`);
|
|
20852
20949
|
};
|
|
20853
20950
|
var MusicVideoPlanRequestSchema = external_exports.object({
|
|
@@ -20855,11 +20952,16 @@ var MusicVideoPlanRequestSchema = external_exports.object({
|
|
|
20855
20952
|
...musicVideoBrief,
|
|
20856
20953
|
revise: external_exports.object({ plan_id: MusicVideoPlanIdSchema, note: external_exports.string().trim().min(1).max(1e3) }).strict().optional()
|
|
20857
20954
|
}).strict().superRefine(fitsModel);
|
|
20955
|
+
var { lookbook_id: _lookbook, ...castingBrief } = musicVideoBrief;
|
|
20956
|
+
var MusicVideoCastingRequestSchema = external_exports.object({ song_id: common.song_id, ...castingBrief }).strict().superRefine(fitsModel);
|
|
20858
20957
|
var MusicVideoRequestSchema = external_exports.object({
|
|
20859
20958
|
type: external_exports.literal("music-video"),
|
|
20860
20959
|
...common,
|
|
20861
20960
|
...musicVideoBrief,
|
|
20862
20961
|
plan_id: MusicVideoPlanIdSchema.optional(),
|
|
20962
|
+
// Ordered without a plan: the director's casting (POST /music-video-castings) the person said yes to: its proposed people are drawn
|
|
20963
|
+
// inside the order (priced in its quote), kept in the song artist's kit and added to the brief's people.
|
|
20964
|
+
casting_id: CastingIdSchema.optional(),
|
|
20863
20965
|
// How sharp it is made; not part of the plan (the treatment and shots are the same in every quality).
|
|
20864
20966
|
// Omitted: the model's default quality (MUSIC_VIDEO_MODELS[].defaultQuality), filled in below, so a parsed request always has one:
|
|
20865
20967
|
// optional when parsed, typed as always there.
|
|
@@ -20872,15 +20974,25 @@ var MusicVideoRequestSchema = external_exports.object({
|
|
|
20872
20974
|
// of the plan.
|
|
20873
20975
|
outro: external_exports.object({ display: OutroDisplaySchema, look_id: external_exports.string().min(1).max(120).optional() }).strict().optional(),
|
|
20874
20976
|
// Finishing a delivered music video again (its kept, un-outro'd master), only its outro changed: no shot is made, no plan.
|
|
20875
|
-
refinish: external_exports.object({ video_id: external_exports.string().uuid() }).strict().optional()
|
|
20977
|
+
refinish: external_exports.object({ video_id: external_exports.string().uuid() }).strict().optional(),
|
|
20978
|
+
// A test of a plan before the whole video: only its test shots (the chorus's first, about 20 seconds), at TEST_QUALITY whatever
|
|
20979
|
+
// quality is sent, with the plan's seeds and pictures. An ordinary video marked as a test: never revised, no outro.
|
|
20980
|
+
test: external_exports.boolean().optional()
|
|
20876
20981
|
}).strict().overwrite((value) => ({ ...value, quality: value.quality ?? MUSIC_VIDEO_MODELS[value.model].defaultQuality })).superRefine(fitsModel).superRefine((value, ctx) => {
|
|
20877
20982
|
const model = MUSIC_VIDEO_MODELS[value.model];
|
|
20878
20983
|
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(", ")}` });
|
|
20879
20984
|
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" });
|
|
20880
20985
|
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" });
|
|
20986
|
+
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" });
|
|
20987
|
+
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" });
|
|
20988
|
+
if (value.test && !value.plan_id) ctx.addIssue({ code: "custom", path: ["test"], message: "A test is made from a plan: send its plan_id" });
|
|
20989
|
+
if (value.test && (value.outro || value.refinish || value.variations > 1)) ctx.addIssue({ code: "custom", path: ["test"], message: "A test is one video without an outro: leave outro, refinish and variations out" });
|
|
20881
20990
|
});
|
|
20882
20991
|
var VideoRequestSchema = external_exports.discriminatedUnion("type", [LyricVideoRequestSchema, CanvasRequestSchema, MusicVideoRequestSchema]);
|
|
20883
20992
|
|
|
20993
|
+
// ../api-spec/src/song-brief.ts
|
|
20994
|
+
var SONG_BRIEF_LIMITS = { theme: 400, tone: 80, story: 1200, setting: 300, section: 60, feeling: 240, sections: 40 };
|
|
20995
|
+
|
|
20884
20996
|
// ../api-spec/src/versioning.ts
|
|
20885
20997
|
var API_VERSION = 1;
|
|
20886
20998
|
var deprecationNote = (d) => `Deprecated since ${d.since}${d.use ? `: use ${d.use} instead` : ""}. It stops working on ${d.sunset}.`;
|
|
@@ -20916,13 +21028,32 @@ var search = (q) => ({
|
|
|
20916
21028
|
limit: external_exports.number().int().min(1).max(100).optional().describe("Results per page, 1-100 (default 50)"),
|
|
20917
21029
|
offset: external_exports.number().int().min(0).optional().describe("How many results to skip")
|
|
20918
21030
|
});
|
|
20919
|
-
var httpsUrl = (what) => external_exports.string().url().max(2e3).describe(`A public https URL of ${what}`);
|
|
21031
|
+
var httpsUrl = (what) => external_exports.string().url().max(2e3).describe(`A public https URL of ${what} (a file on your computer: create_upload, then its file_url)`);
|
|
21032
|
+
var UploadSchema = external_exports.looseObject({
|
|
21033
|
+
upload_url: external_exports.string().describe("PUT the file's bytes here, with the headers below, within the hour"),
|
|
21034
|
+
method: external_exports.literal("PUT"),
|
|
21035
|
+
headers: external_exports.record(external_exports.string(), external_exports.string()).describe("Send these with the PUT (content-type); content-length must be size_bytes"),
|
|
21036
|
+
file_url: external_exports.string().describe("Once the file is sent: pass it in the *_url field (audio_url, cover_art_url, file_url, photo_urls, image_url) within a day"),
|
|
21037
|
+
upload_expires_at: external_exports.string(),
|
|
21038
|
+
file_expires_at: external_exports.string(),
|
|
21039
|
+
uploads_per_day: external_exports.number().int()
|
|
21040
|
+
});
|
|
21041
|
+
var SongBriefSchema = external_exports.looseObject({
|
|
21042
|
+
status: external_exports.enum(["writing", "ready"]).describe("writing: being written (the fields are null until ready)"),
|
|
21043
|
+
theme: external_exports.string().nullable().describe("What the song is about, in a sentence"),
|
|
21044
|
+
tone: external_exports.string().nullable().describe("Its register, in a few words"),
|
|
21045
|
+
story: external_exports.string().nullable().describe("The story or situation under the words (null for a mood piece)"),
|
|
21046
|
+
mood_arc: external_exports.array(external_exports.object({ section: external_exports.string(), feeling: external_exports.string() })).describe("How the feeling moves through it, section by section"),
|
|
21047
|
+
setting: external_exports.string().nullable().describe("An era, a place or a scene it evokes (null when none)"),
|
|
21048
|
+
edited: external_exports.boolean().describe("The user corrected it: directors read their version, and nothing replaces it until rewrite_song_brief"),
|
|
21049
|
+
updated_at: external_exports.string().nullable()
|
|
21050
|
+
});
|
|
20920
21051
|
var LYRICS = "The song\u2019s lyrics as text: plain (Suno-style [Verse]/[Chorus] tags and (x2) marks are fine), or the contents of an SRT, WebVTT or LRC file. Every word is still timed from the audio: your text fixes misheard words and sets where lines break in videos, and its section tags set the song\u2019s sections (a chorus sung once is still a chorus). A part sung again (a chorus) can be written once; lyrics that don\u2019t match what\u2019s sung, or cover only part of it, are refused";
|
|
20921
21052
|
var KIT_ABOUT = "The kit is what a music video is made from besides the artist\u2019s character: outfits, places and props. Each is in one artist\u2019s kit (owner_artist_id, a project in a Creator workspace; an outfit\u2019s is its artist_id) and serves their songs; shared true offers it to every other artist\u2019s songs too (owner_name says whose it is). Each has a name and an @handle unique in the workspace; a music video brief (direction) that mentions @handle uses that piece exactly as it is, and the director designs the rest.";
|
|
20922
21053
|
var NEEDS_PLAN = "Needs an active plan (402 plan_required without one; get_account: plan.active) and room in its storage (402 storage_full when it would not fit; get_account: storage).";
|
|
20923
21054
|
var PICTURE_CROP = external_exports.object({ x: external_exports.number().min(0).max(1), y: external_exports.number().min(0).max(1), size: external_exports.number().min(0.1).max(1) }).optional();
|
|
20924
|
-
var IMAGE_FALLBACK = "image_url is the picture uploaded for it (null without one); while it has none, image_fallback is the cover of its newest song still there (song_id, preview_url 640 px and thumbnail_url 160 px WebP), to show in its place, or null without a song. It is read-only, never saved as the picture, and follows the newest song (a new song or an archived one changes it).";
|
|
20925
|
-
var COVER_SIZES = "cover_art.url is the cover at up to 1536 px (JPEG; width and height describe it), preview_url a 640 px and thumbnail_url a 160 px WebP. Image links are signed for 7 days and stay the same all day, so they can be cached.";
|
|
21055
|
+
var IMAGE_FALLBACK = "image_url is the picture uploaded for it (null without one); while it has none, image_fallback is the cover of its newest song still there that has one (song_id, preview_url 640 px and thumbnail_url 160 px WebP), to show in its place, or null without such a song. It is read-only, never saved as the picture, and follows the newest song (a new song or an archived one changes it).";
|
|
21056
|
+
var COVER_SIZES = "cover_art.url is the cover at up to 1536 px (JPEG; width and height describe it), preview_url a 640 px and thumbnail_url a 160 px WebP; cover_art is null for a song without cover art (it is optional). Image links are signed for 7 days and stay the same all day, so they can be cached.";
|
|
20926
21057
|
var { type: _lyricType, quote_id: _lyricQuote, ...lyricShape } = LyricVideoRequestSchema.shape;
|
|
20927
21058
|
var { type: _canvasType, quote_id: _canvasQuote, ...canvasShape } = CanvasRequestSchema.shape;
|
|
20928
21059
|
var { type: _musicType, quote_id: _musicQuote, ...musicShape } = MusicVideoRequestSchema.shape;
|
|
@@ -20954,15 +21085,18 @@ var canvasInput = external_exports.object({
|
|
|
20954
21085
|
resolution: canvasShape.resolution.describe("1080p (1080\xD71920) or 720p"),
|
|
20955
21086
|
style: canvasShape.style.describe("Optional visual style"),
|
|
20956
21087
|
direction: canvasShape.direction.describe("Optional mood, motifs or references"),
|
|
20957
|
-
inspiration: canvasShape.inspiration.describe("Where the idea comes from:
|
|
21088
|
+
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)"),
|
|
20958
21089
|
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"),
|
|
20959
21090
|
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)`),
|
|
20960
21091
|
seconds: canvasShape.seconds.describe("Canvas length in whole seconds, 5\u20138 (default 8). Spotify loops it, so no part of the song is chosen"),
|
|
20961
21092
|
variations: canvasShape.variations.describe("1\u20134 different Canvases")
|
|
20962
21093
|
});
|
|
20963
|
-
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`;
|
|
21094
|
+
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`;
|
|
20964
21095
|
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)";
|
|
20965
21096
|
var LIPSYNC = '"auto" (default: the director has the artist sing the important lines on camera) or "never" (nobody sings on camera; the song plays over every shot). A kind sung on camera (lyric-led) refuses "never"; an instrumental song never lip-syncs';
|
|
21097
|
+
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";
|
|
21098
|
+
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`;
|
|
21099
|
+
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`;
|
|
20966
21100
|
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";
|
|
20967
21101
|
var musicVideoInput = external_exports.object({
|
|
20968
21102
|
...musicShape,
|
|
@@ -20972,7 +21106,7 @@ var musicVideoInput = external_exports.object({
|
|
|
20972
21106
|
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"),
|
|
20973
21107
|
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`),
|
|
20974
21108
|
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"),
|
|
20975
|
-
style: musicShape.style.describe("Optional
|
|
21109
|
+
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"),
|
|
20976
21110
|
aspect_ratio: musicShape.aspect_ratio.describe('The one format of the file: "9:16" (default, vertical), "16:9" (wide) or "1:1" (square)'),
|
|
20977
21111
|
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)`),
|
|
20978
21112
|
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)"),
|
|
@@ -20980,14 +21114,18 @@ var musicVideoInput = external_exports.object({
|
|
|
20980
21114
|
lookbook_id: musicShape.lookbook_id.describe(LOOKBOOK_ID),
|
|
20981
21115
|
look_id: musicShape.look_id.describe(LOOK_ID),
|
|
20982
21116
|
lipsync: musicShape.lipsync.describe(LIPSYNC),
|
|
21117
|
+
kit_only: musicShape.kit_only.describe(KIT_ONLY),
|
|
20983
21118
|
on_screen: musicShape.on_screen.describe(ON_SCREEN_DESCRIPTION),
|
|
20984
21119
|
performer: musicShape.performer.describe(PERFORMER),
|
|
20985
21120
|
cast: musicShape.cast.describe(CAST_DESCRIPTION),
|
|
20986
|
-
|
|
21121
|
+
cast_mode: musicShape.cast_mode.describe(CAST_MODE),
|
|
21122
|
+
casting_id: musicShape.casting_id.describe(CASTING_ID),
|
|
21123
|
+
plan_id: musicShape.plan_id.describe("Make the video from this plan (plan_music_video): its brief (model, kind, visual style, format, section\u2026) replaces the one sent, so send song_id and plan_id; quality left out is the plan's model's default. Omitted, the director plans it while it is made"),
|
|
20987
21124
|
quality: musicShape.quality.describe("The resolution it is made at: one of the qualities get_options lists for the model (left out, the model's default_quality: 768p for MiniMax H3 Max, 720p for Seedance; a sharper one is the same video for more credits); not part of the plan, so a plan is made in any quality. get_options lists each model's qualities with about how long each takes; credits.music_video.models has a minute by model and quality"),
|
|
20988
21125
|
variations: musicShape.variations.describe("1\u20134 different music videos"),
|
|
20989
21126
|
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"),
|
|
20990
|
-
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, only setup and delivery are charged. Needs the video's revisable_until ahead"),
|
|
21127
|
+
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"),
|
|
21128
|
+
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"),
|
|
20991
21129
|
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")
|
|
20992
21130
|
});
|
|
20993
21131
|
var musicVideoPlanInput = external_exports.object({
|
|
@@ -20996,7 +21134,7 @@ var musicVideoPlanInput = external_exports.object({
|
|
|
20996
21134
|
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"),
|
|
20997
21135
|
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`),
|
|
20998
21136
|
category: musicShape.category.describe("performance (default), intercut, cinematic, story or surreal"),
|
|
20999
|
-
style: musicShape.style.describe("Optional
|
|
21137
|
+
style: musicShape.style.describe("Optional visual style (get_options: music_video.styles); omitted, the director picks one from the cover"),
|
|
21000
21138
|
aspect_ratio: musicShape.aspect_ratio.describe('"9:16" (default), "16:9" or "1:1"'),
|
|
21001
21139
|
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)`),
|
|
21002
21140
|
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)"),
|
|
@@ -21004,10 +21142,12 @@ var musicVideoPlanInput = external_exports.object({
|
|
|
21004
21142
|
lookbook_id: musicShape.lookbook_id.describe(LOOKBOOK_ID),
|
|
21005
21143
|
look_id: musicShape.look_id.describe(LOOK_ID),
|
|
21006
21144
|
lipsync: musicShape.lipsync.describe(LIPSYNC),
|
|
21145
|
+
kit_only: musicShape.kit_only.describe(KIT_ONLY),
|
|
21007
21146
|
on_screen: musicShape.on_screen.describe(ON_SCREEN_DESCRIPTION),
|
|
21008
21147
|
performer: musicShape.performer.describe(PERFORMER),
|
|
21009
21148
|
cast: musicShape.cast.describe(CAST_DESCRIPTION),
|
|
21010
|
-
|
|
21149
|
+
cast_mode: musicShape.cast_mode.describe(CAST_MODE),
|
|
21150
|
+
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`)
|
|
21011
21151
|
});
|
|
21012
21152
|
var MusicVideoPlanSchema = external_exports.looseObject({
|
|
21013
21153
|
id: external_exports.string(),
|
|
@@ -21029,7 +21169,7 @@ var MusicVideoPlanSchema = external_exports.looseObject({
|
|
|
21029
21169
|
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")
|
|
21030
21170
|
})).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"),
|
|
21031
21171
|
on_screen: external_exports.enum(["artist", "cast", "none"]).optional().describe("Who is on screen: the artist, a cast or no one"),
|
|
21032
|
-
revision: external_exports.object({ video_id: external_exports.string(), shots: external_exports.array(external_exports.number().int()) }).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"),
|
|
21172
|
+
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"),
|
|
21033
21173
|
world: external_exports.object({ setting: external_exports.string(), wardrobe: external_exports.string(), light: external_exports.string() }).describe("What every shot keeps"),
|
|
21034
21174
|
places: external_exports.array(external_exports.object({
|
|
21035
21175
|
index: external_exports.number().int(),
|
|
@@ -21054,8 +21194,11 @@ var MusicVideoPlanSchema = external_exports.looseObject({
|
|
|
21054
21194
|
continues: external_exports.boolean().describe("It carries straight on from the shot before (a continuous take), with no cut"),
|
|
21055
21195
|
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"),
|
|
21056
21196
|
on_screen: external_exports.enum(MUSIC_VIDEO_ON_SCREEN).describe("Who is in the shot: the artist, a cast (other people), or nobody. New values may be added"),
|
|
21057
|
-
framing: external_exports.enum(["close", "wide"]).describe("close: the artist sings it on camera, face and mouth large in frame; wide: the song plays over them (dancing, walking, the place). New values may be added")
|
|
21197
|
+
framing: external_exports.enum(["close", "wide"]).describe("close: the artist sings it on camera, face and mouth large in frame; wide: the song plays over them (dancing, walking, the place). New values may be added"),
|
|
21198
|
+
cue: external_exports.object({ said: external_exports.string().nullable().describe("The words sung where it starts"), note: external_exports.string().describe("The direction's sentence: what changes") }).nullable().optional().describe('The moment the direction pinned a change to (on "\u2026" or at m:ss) that this shot starts on; null when none'),
|
|
21199
|
+
camera: external_exports.object({ size: external_exports.enum(SHOT_SIZES), angle: external_exports.enum(SHOT_ANGLES), move: external_exports.enum(SHOT_MOVES) }).nullable().optional().describe("How the director framed its (first) shot: size (close, medium, wide), angle (front, three-quarter, side, low, high, over-shoulder, back) and move (push-in, pull-out, arc, tilt, dolly, handheld, locked-off). Null for plans made before it. New values may be added")
|
|
21058
21200
|
})),
|
|
21201
|
+
outro: external_exports.looseObject({}).nullable().optional().describe("The release card the director designed for this video: used only when the video is ordered with outro (create_music_video outro); no outro is added otherwise. null before outros"),
|
|
21059
21202
|
created_at: external_exports.string()
|
|
21060
21203
|
});
|
|
21061
21204
|
var QUOTE_FIRST = "Always quote first and tell the user the credits before creating; credits are reserved at creation and charged only when the video is delivered.";
|
|
@@ -21121,7 +21264,25 @@ var VideoSchema = external_exports.looseObject({
|
|
|
21121
21264
|
clips: external_exports.number().int().describe("How many clips it is generated in"),
|
|
21122
21265
|
on_screen: external_exports.enum(["artist", "cast", "none"]).optional().describe("Who is on screen: the artist, a cast or no one"),
|
|
21123
21266
|
world: external_exports.object({ setting: external_exports.string(), wardrobe: external_exports.string(), light: external_exports.string() }),
|
|
21124
|
-
shots: external_exports.array(external_exports.object({
|
|
21267
|
+
shots: external_exports.array(external_exports.object({
|
|
21268
|
+
index: external_exports.number().int(),
|
|
21269
|
+
start_seconds: external_exports.number(),
|
|
21270
|
+
end_seconds: external_exports.number(),
|
|
21271
|
+
section: external_exports.string().nullable(),
|
|
21272
|
+
lyrics: external_exports.string(),
|
|
21273
|
+
summary: external_exports.string(),
|
|
21274
|
+
frame_url: external_exports.string().nullable().optional().describe("Delivered: a picture of the shot as it came out (from its middle; signed, 7 days); null for a video delivered before these pictures")
|
|
21275
|
+
})).describe("Each clip's beat, timed from the start of the video"),
|
|
21276
|
+
review: external_exports.array(external_exports.object({
|
|
21277
|
+
shot: external_exports.number().int().min(1).describe("The shot (its index in shots)"),
|
|
21278
|
+
verdict: external_exports.enum(["fix", "better"]).describe("fix: needs a fix; better: could be better"),
|
|
21279
|
+
finding: external_exports.string().describe("What is wrong, in one plain line"),
|
|
21280
|
+
note: external_exports.string().describe("A revision note written from the finding, to send as the shot's note to revise_music_video_shot (edit it freely)"),
|
|
21281
|
+
at_seconds: external_exports.number().describe("Where it starts, in seconds from the start of the video"),
|
|
21282
|
+
check: external_exports.enum(["faces", "mouth_backing", "mouth_silence", "lip_sync", "unasked"]).describe("What found it: faces (more faces than the shot has people), mouth_backing / mouth_silence (lips moving where only backing vocals, or nobody, sing), lip_sync, unasked (text, a logo or a prop nobody asked for)")
|
|
21283
|
+
})).nullable().optional().describe("Delivered: the director's look at every shot once they were joined, one item per shot that needs a fix or could be better (an empty list: every shot passed; null: not looked at, a video delivered before it). Nothing is made again on its own: revising is the artist's choice (revise_music_video_shot, priced by price_music_video_revision)"),
|
|
21284
|
+
lip_sync: external_exports.array(external_exports.object({ shot: external_exports.number().int().min(1), offset_seconds: external_exports.number().describe("How far the lips were off the lead vocal (positive: late), now lined up") })).optional().describe("Delivered: the sung shots whose picture was moved so the lips land on the lead vocal (measured on the faces, free)"),
|
|
21285
|
+
test: external_exports.object({ shots: external_exports.array(external_exports.number().int()).describe("The plan's shots it makes (their index in the plan)"), start_seconds: external_exports.number(), end_seconds: external_exports.number() }).nullable().optional().describe("A test of a plan (ordered with test: true): the plan's shots it made and their seconds in the song; null for a whole video")
|
|
21125
21286
|
}).nullable().optional().describe("A music video's plan, once the director made it (null before)"),
|
|
21126
21287
|
quoted_credits: external_exports.number().nullable(),
|
|
21127
21288
|
charged_credits: external_exports.number().nullable(),
|
|
@@ -21140,7 +21301,7 @@ var OPERATIONS = [
|
|
|
21140
21301
|
group: "account",
|
|
21141
21302
|
title: "Get the account",
|
|
21142
21303
|
summary: "Who you are signed in as, the organization (workspace) and its credit balance",
|
|
21143
|
-
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
|
|
21304
|
+
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, 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.",
|
|
21144
21305
|
method: "GET",
|
|
21145
21306
|
path: "/api/v1/account",
|
|
21146
21307
|
scopes: ["videos:read", "music:read", "library:read"],
|
|
@@ -21151,12 +21312,34 @@ var OPERATIONS = [
|
|
|
21151
21312
|
cli: ["account"],
|
|
21152
21313
|
mcp: "get_account"
|
|
21153
21314
|
},
|
|
21315
|
+
{
|
|
21316
|
+
id: "uploads.create",
|
|
21317
|
+
group: "account",
|
|
21318
|
+
title: "Send a file from your computer",
|
|
21319
|
+
summary: "A signed upload URL for a local file, and the file_url to use it",
|
|
21320
|
+
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.`,
|
|
21321
|
+
method: "POST",
|
|
21322
|
+
path: "/api/v1/uploads",
|
|
21323
|
+
scopes: ["music:write", "videos:write"],
|
|
21324
|
+
input: UploadCreateSchema.extend({
|
|
21325
|
+
filename: UploadCreateSchema.shape.filename.describe("The file's name, e.g. desk.png (kept on the stored copy)"),
|
|
21326
|
+
content_type: UploadCreateSchema.shape.content_type.describe("Its type: audio/mpeg, audio/wav, audio/mp4, image/jpeg, image/png, image/webp, video/mp4, video/quicktime or video/webm"),
|
|
21327
|
+
size_bytes: UploadCreateSchema.shape.size_bytes.describe("Its exact size in bytes (the upload must match it)")
|
|
21328
|
+
}),
|
|
21329
|
+
readOnly: false,
|
|
21330
|
+
destructive: false,
|
|
21331
|
+
idempotent: false,
|
|
21332
|
+
cli: ["uploads", "create"],
|
|
21333
|
+
mcp: "create_upload",
|
|
21334
|
+
output: { name: "Upload", schema: UploadSchema },
|
|
21335
|
+
example: { filename: "desk.png", content_type: "image/png", size_bytes: 1834201 }
|
|
21336
|
+
},
|
|
21154
21337
|
{
|
|
21155
21338
|
id: "options.get",
|
|
21156
21339
|
group: "account",
|
|
21157
21340
|
title: "List the options",
|
|
21158
21341
|
summary: "Video types, Look categories, background sources, formats and the current credit prices",
|
|
21159
|
-
description: "Everything a request can choose from, with the credit table
|
|
21342
|
+
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). Use it to pick a category or source and to explain prices.",
|
|
21160
21343
|
method: "GET",
|
|
21161
21344
|
path: "/api/v1/options",
|
|
21162
21345
|
scopes: ["videos:read", "music:read", "library:read"],
|
|
@@ -21188,7 +21371,7 @@ var OPERATIONS = [
|
|
|
21188
21371
|
group: "account",
|
|
21189
21372
|
title: "Create an organization",
|
|
21190
21373
|
summary: "A new organization owned by you, with its own music, videos, Looks and credits",
|
|
21191
|
-
description: "Creates an empty organization (a workspace, in the app) with the signed-in person as its owner; with an API key, the member who created the key (the key needs organizations:write). type artist is for one artist (add that artist next with create_artist; its songs then need no artist_id), label for a roster. It starts with no plan and no credits
|
|
21374
|
+
description: "Creates an empty organization (a workspace, in the app) with the signed-in person as its owner; with an API key, the member who created the key (the key needs organizations:write). type artist is for one artist (add that artist next with create_artist; its songs then need no artist_id), label for a roster. It starts with no plan and no credits, so nothing can be created in it until it has one. These credentials keep acting for their current organization: to work in the new one, sign in again and pick it, or create an API key in it.",
|
|
21192
21375
|
method: "POST",
|
|
21193
21376
|
path: "/api/v1/organizations",
|
|
21194
21377
|
scopes: ["organizations:write"],
|
|
@@ -21310,18 +21493,18 @@ var OPERATIONS = [
|
|
|
21310
21493
|
group: "artists",
|
|
21311
21494
|
title: "Set the artist image",
|
|
21312
21495
|
summary: "Upload or replace the artist\u2019s image, their picture on the artist page and in lists",
|
|
21313
|
-
description: "The artist image (image_url on the artist) is kept as a 512 px square: upload the file (or a public https image_url, JPEG, PNG or WebP, at least 512 px on the short side, up to 15 MB) and, optionally, crop: the square to keep in fractions of the upright image (x/y the top-left corner, size the side relative to the image\u2019s short side); left out, it is centered. It replaces the current image; the uploaded file itself is not kept. It is only a display picture: never shown to a model (videos keep the artist from their character: list_characters). Works without a plan.",
|
|
21496
|
+
description: "The artist image (image_url on the artist) is kept as a 512 px square: upload the file (or a public https image_url, JPEG, PNG or WebP, at least 512 px on the short side, up to 15 MB) and, optionally, crop: the square to keep in fractions of the upright image (x/y the top-left corner, size the side relative to the image\u2019s short side); left out, it is centered. It replaces the current image, which can\u2019t be brought back; the uploaded file itself is not kept. It is only a display picture: never shown to a model (videos keep the artist from their character: list_characters). Works without a plan.",
|
|
21314
21497
|
method: "POST",
|
|
21315
21498
|
path: "/api/v1/artists/{artist_id}/image",
|
|
21316
21499
|
scopes: ["music:write", "videos:write"],
|
|
21317
21500
|
input: external_exports.object({
|
|
21318
21501
|
artist_id: artistId,
|
|
21319
|
-
image_url: httpsUrl("the image").optional().describe("A public https URL of the image (or upload
|
|
21502
|
+
image_url: httpsUrl("the image").optional().describe("A public https URL of the image (a file on your computer: create_upload's file_url, or upload it with the CLI)"),
|
|
21320
21503
|
crop: PICTURE_CROP.describe("The square to keep, in fractions of the image; centered when omitted")
|
|
21321
21504
|
}),
|
|
21322
21505
|
files: [{ field: "image", urlField: "image_url", accept: ["image/jpeg", "image/png", "image/webp"], description: "The artist image" }],
|
|
21323
21506
|
readOnly: false,
|
|
21324
|
-
destructive:
|
|
21507
|
+
destructive: true,
|
|
21325
21508
|
idempotent: true,
|
|
21326
21509
|
cli: ["artists", "image", "set"],
|
|
21327
21510
|
mcp: "set_artist_image",
|
|
@@ -21385,7 +21568,7 @@ var OPERATIONS = [
|
|
|
21385
21568
|
group: "artists",
|
|
21386
21569
|
title: "Start a face check",
|
|
21387
21570
|
summary: "The page where the person proves, live on camera, that the face is theirs",
|
|
21388
|
-
description: "Only the person shown on the character can pass it, on a phone with a camera
|
|
21571
|
+
description: "Returns only a link (url, good for 30 minutes) to Kinetune's own face check page: this tool takes and returns no image, video or face data, and nothing about a face passes through the conversation. Only the person shown on the character can pass it, on that page, on a phone with a camera; then get_face_check says passed or failed. consent: the person said, in their own words, that they agree to Kinetune checking their face on that page and keeping the result to match their pictures in this model's videos (kinetune.com/privacy, Face checks); ask them first, never assume it or set it for them. They can delete it any time with withdraw_face_check. A failed check is started again.",
|
|
21389
21572
|
method: "POST",
|
|
21390
21573
|
path: "/api/v1/characters/{character_id}/face-check",
|
|
21391
21574
|
scopes: ["music:write", "videos:write"],
|
|
@@ -21420,15 +21603,16 @@ var OPERATIONS = [
|
|
|
21420
21603
|
id: "character_requests.create",
|
|
21421
21604
|
group: "artists",
|
|
21422
21605
|
title: "Start a character",
|
|
21423
|
-
summary: "Photos of a person to draw a sheet from,
|
|
21424
|
-
description: `mode generate: 1 to
|
|
21606
|
+
summary: "Photos of a person to draw a sheet from, a finished sheet to add, the camera's six shots, or a made-up person described in words",
|
|
21607
|
+
description: `mode generate: 1 to 6 photos of one person (any angles); they are read (a clear face is needed, someone else is set aside) and given a base outfit line, which can be edited before drawing (draw_character_sheet, priced in credits). mode add: one finished sheet, read (one person, a clear face, the views it shows, any text on it) and kept as it is, free. mode camera: the six shots of Take from camera, in its order (the face from the front, the head turned left and right, the whole body from the front, the side and the back), or the three head shots when the body is skipped, each cut out and laid out as the standard sheet, which then goes the way of mode add (free; the shots themselves are not kept). mode describe: a made-up person from a description (description: looks, age, build, hair, style; no photos), read first (one adult, made up: never a real or famous person, 422 otherwise) and given a base outfit line, then drawn like photos (draw_character_sheet, priced in credits) and kept as AI-made. Photos, sheets and shots only with the rights to use these images (rights_confirmed). Uploads are kept until the character is kept (keep_character), or a day; a sheet drawn and paid for, 30 days (list_character_requests finds it). modes generate and describe need an active plan (402 plan_required without one; get_account: plan.active); modes add and camera work without one. A workspace starts at most 30 characters an hour and 50 a day (6 and 10 without a plan; 429 past them). Both need room in storage (402 storage_full when it would not fit; get_account: storage).`,
|
|
21425
21608
|
method: "POST",
|
|
21426
21609
|
path: "/api/v1/character-requests",
|
|
21427
21610
|
scopes: ["music:write", "videos:write"],
|
|
21428
21611
|
input: external_exports.object({
|
|
21429
|
-
mode: external_exports.enum(["generate", "add"]).optional().describe("generate (default): draw a sheet from photos; add: a finished sheet"),
|
|
21430
|
-
|
|
21431
|
-
|
|
21612
|
+
mode: external_exports.enum(["generate", "add", "camera", "describe"]).optional().describe("generate (default): draw a sheet from photos; add: a finished sheet; camera: the camera shots in order (six, or the three head shots); describe: a made-up person from description"),
|
|
21613
|
+
description: external_exports.string().trim().min(CHARACTER_DESCRIPTION_MIN).max(CHARACTER_DESCRIPTION_MAX).optional().describe("mode describe: who they are, in words (looks, age, build, hair, style); a made-up adult, never a real or famous person"),
|
|
21614
|
+
photo_urls: external_exports.array(httpsUrl("a photo")).min(1).max(6).optional().describe("Public https URLs of the photos, or of the one sheet (files on your computer: create_upload's file_url for each, or upload them with the CLI)"),
|
|
21615
|
+
rights_confirmed: external_exports.literal(true).optional().describe("You have the rights to use these images of this person (needed with photos, a sheet or camera shots; not for describe)")
|
|
21432
21616
|
}),
|
|
21433
21617
|
files: [{ field: "photos", urlField: "photo_urls", multiple: true, accept: ["image/jpeg", "image/png", "image/webp"], description: "Photos of the person, or the one sheet" }],
|
|
21434
21618
|
readOnly: false,
|
|
@@ -21441,8 +21625,8 @@ var OPERATIONS = [
|
|
|
21441
21625
|
id: "character_requests.list",
|
|
21442
21626
|
group: "artists",
|
|
21443
21627
|
title: "List sheets waiting to be kept",
|
|
21444
|
-
summary: "
|
|
21445
|
-
description: "Newest first.
|
|
21628
|
+
summary: "Photos read and ready to draw, character sheets being drawn, or drawn and paid for but not kept yet",
|
|
21629
|
+
description: "Newest first. Photos read and ready to draw (status analyzed, nothing charged yet) wait a day; a sheet drawn and paid for waits 30 days to be kept (keep_character), then is deleted; one being drawn shows status drawing.",
|
|
21446
21630
|
method: "GET",
|
|
21447
21631
|
path: "/api/v1/character-requests",
|
|
21448
21632
|
scopes: ["music:read", "videos:read"],
|
|
@@ -21474,7 +21658,7 @@ var OPERATIONS = [
|
|
|
21474
21658
|
group: "artists",
|
|
21475
21659
|
title: "Draw a character sheet",
|
|
21476
21660
|
summary: "Draws the sheet for the credits shown (again with a note to redraw)",
|
|
21477
|
-
description: 'From photos, or an added sheet drawn again as a plain base sheet (nothing worn or held beyond one plain outfit). credits must be price.credits from get_character_request: tell the user first. outfit: the base outfit line as the user left it (always drawn plain: one top and fitted trousers or skirt, solid colours, barefoot, no jewellery). note: what to change when drawing again ("her hair is shorter"). Charged only once the sheet passes its check (one person, a clear face, no text); a failed check is redrawn once at no charge.',
|
|
21661
|
+
description: 'From photos, a description (mode describe), or an added sheet drawn again as a plain base sheet (nothing worn or held beyond one plain outfit). credits must be price.credits from get_character_request: tell the user first. outfit: the base outfit line as the user left it (always drawn plain: one top and fitted trousers or skirt, solid colours, barefoot, no jewellery). note: what to change when drawing again ("her hair is shorter"). Charged only once the sheet passes its check (one person, a clear face, no text); a failed check is redrawn once at no charge. Needs an active plan (402 plan_required without one; get_account: plan.active).',
|
|
21478
21662
|
method: "POST",
|
|
21479
21663
|
path: "/api/v1/character-requests/{request_id}/draw",
|
|
21480
21664
|
scopes: ["music:write", "videos:write"],
|
|
@@ -21495,7 +21679,7 @@ var OPERATIONS = [
|
|
|
21495
21679
|
group: "artists",
|
|
21496
21680
|
title: "Keep a character",
|
|
21497
21681
|
summary: "Keeps the sheet in the kit, as an artist or as named cast",
|
|
21498
|
-
description: "artist_id: it is that artist (one each, in their own kit; replace true takes the place of theirs); or name: cast, with an @handle from the name (or handle), in owner_artist_id's kit (left out: the workspace's only artist, else its first, shared). shared true offers them to every other artist's videos too (default false). ai_made: ask the user whether this is an AI-made person who looks like no real person, or a real person (false: a model that needs a face check shows them once they pass it); never guess it. Left out, they count as real. The uploads are deleted.",
|
|
21682
|
+
description: "artist_id: it is that artist (one each, in their own kit; replace true takes the place of theirs); or name: cast, with an @handle from the name (or handle), in owner_artist_id's kit (left out: the workspace's only artist, else its first, shared). shared true offers them to every other artist's videos too (default false). ai_made: ask the user whether this is an AI-made person who looks like no real person, or a real person (false: a model that needs a face check shows them once they pass it); never guess it. Left out, they count as real. The uploads are deleted, and replace true deletes the artist's current character for good.",
|
|
21499
21683
|
method: "POST",
|
|
21500
21684
|
path: "/api/v1/character-requests/{request_id}/keep",
|
|
21501
21685
|
scopes: ["music:write", "videos:write"],
|
|
@@ -21510,7 +21694,7 @@ var OPERATIONS = [
|
|
|
21510
21694
|
ai_made: external_exports.boolean().optional().describe("An AI-made person who looks like no real person (true), or a real person (false)")
|
|
21511
21695
|
}),
|
|
21512
21696
|
readOnly: false,
|
|
21513
|
-
destructive:
|
|
21697
|
+
destructive: true,
|
|
21514
21698
|
idempotent: false,
|
|
21515
21699
|
cli: ["characters", "keep"],
|
|
21516
21700
|
mcp: "keep_character"
|
|
@@ -21572,7 +21756,7 @@ var OPERATIONS = [
|
|
|
21572
21756
|
handle: KitHandleSchema.optional().describe("Its @handle (default: from the name)"),
|
|
21573
21757
|
description: external_exports.string().trim().max(300).optional().describe("What it is, for the director (a stock photo\u2019s caption by default)"),
|
|
21574
21758
|
crop: CropRectSchema.optional().describe('The rectangle to keep, in fractions of the image: {"x","y","w","h"}; the whole image when omitted'),
|
|
21575
|
-
file_url: httpsUrl("the image").optional().describe("A public https URL of the image (or upload
|
|
21759
|
+
file_url: httpsUrl("the image").optional().describe("A public https URL of the image (a file on your computer: create_upload's file_url, or upload it with the CLI)"),
|
|
21576
21760
|
stock_id: StockIdSchema.optional().describe("A stock photo id from search_stock instead of an image"),
|
|
21577
21761
|
rights_confirmed: external_exports.literal(true).optional().describe("You have the rights to use the image (needed for an upload or file_url)")
|
|
21578
21762
|
}),
|
|
@@ -21605,7 +21789,7 @@ var OPERATIONS = [
|
|
|
21605
21789
|
group: "artists",
|
|
21606
21790
|
title: "Change a kit piece",
|
|
21607
21791
|
summary: "Rename it, change its handle or description, crop it again, or share it",
|
|
21608
|
-
description: "crop is cut again from the image the piece was added from. 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.",
|
|
21792
|
+
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.",
|
|
21609
21793
|
method: "PATCH",
|
|
21610
21794
|
path: "/api/v1/kit/{kit_id}",
|
|
21611
21795
|
scopes: ["music:write", "videos:write"],
|
|
@@ -21616,7 +21800,8 @@ var OPERATIONS = [
|
|
|
21616
21800
|
description: external_exports.string().trim().max(300).nullable().optional(),
|
|
21617
21801
|
crop: CropRectSchema.optional().describe("The new rectangle, in fractions of the source image"),
|
|
21618
21802
|
ai_made: external_exports.boolean().optional().describe("A character only: an AI-made person (true) or a real one (false)"),
|
|
21619
|
-
shared: external_exports.boolean().optional().describe("Offer it to every other artist\u2019s songs too (true), or only its own artist\u2019s (false)")
|
|
21803
|
+
shared: external_exports.boolean().optional().describe("Offer it to every other artist\u2019s songs too (true), or only its own artist\u2019s (false)"),
|
|
21804
|
+
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")
|
|
21620
21805
|
}),
|
|
21621
21806
|
readOnly: false,
|
|
21622
21807
|
destructive: false,
|
|
@@ -21640,6 +21825,28 @@ var OPERATIONS = [
|
|
|
21640
21825
|
cli: ["kit", "delete"],
|
|
21641
21826
|
mcp: "delete_kit_piece"
|
|
21642
21827
|
},
|
|
21828
|
+
{
|
|
21829
|
+
id: "kit.angles",
|
|
21830
|
+
group: "artists",
|
|
21831
|
+
title: "Draw other angles of a place",
|
|
21832
|
+
summary: "The same set from three-quarter, side or low, each a new place (spends credits)",
|
|
21833
|
+
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}`,
|
|
21834
|
+
method: "POST",
|
|
21835
|
+
path: "/api/v1/kit/{kit_id}/angles",
|
|
21836
|
+
scopes: ["videos:write"],
|
|
21837
|
+
input: external_exports.object({
|
|
21838
|
+
kit_id: id("place (kit piece)"),
|
|
21839
|
+
angles: external_exports.array(external_exports.enum(KIT_ANGLES)).min(1).max(3).optional().describe("Which sides: three-quarter, side, low (default: all three)"),
|
|
21840
|
+
confirm: external_exports.boolean().optional().describe("true: draw them (spends credits); left out: only the price"),
|
|
21841
|
+
credits: external_exports.number().int().positive().optional().describe("With confirm: the total price shown, so a changed price is refused")
|
|
21842
|
+
}),
|
|
21843
|
+
readOnly: false,
|
|
21844
|
+
destructive: false,
|
|
21845
|
+
idempotent: false,
|
|
21846
|
+
cli: ["kit", "angles"],
|
|
21847
|
+
mcp: "draw_place_angles",
|
|
21848
|
+
example: { angles: ["three-quarter", "side", "low"], confirm: true, credits: 54 }
|
|
21849
|
+
},
|
|
21643
21850
|
/* Songs */
|
|
21644
21851
|
{
|
|
21645
21852
|
id: "songs.list",
|
|
@@ -21666,8 +21873,8 @@ var OPERATIONS = [
|
|
|
21666
21873
|
id: "songs.create",
|
|
21667
21874
|
group: "songs",
|
|
21668
21875
|
title: "Upload a song",
|
|
21669
|
-
summary: "Add a song: master audio and square cover art",
|
|
21670
|
-
description: `Audio: MP3, WAV or M4A up to 250 MB. Cover: a square JPEG or PNG, 1000\u20136000 px (3000\xD73000 recommended), up to 20 MB; it is kept at 1536, 640 and 160 px, not as uploaded. The song is analyzed next (lyrics, beats, sections): poll get_song until analysis.status is "ready", usually about a minute. Pass lyrics (or set them later with set_song_lyrics) to have the videos spell every word right. ${NEEDS_PLAN}`,
|
|
21876
|
+
summary: "Add a song: master audio, and square cover art if it has one",
|
|
21877
|
+
description: `Audio: MP3, WAV or M4A up to 250 MB. Cover (optional): a square JPEG or PNG, 1000\u20136000 px (3000\xD73000 recommended), up to 20 MB; it is kept at 1536, 640 and 160 px, not as uploaded. Without one the song has no cover (cover_art null) and every video still works; set_song_cover adds one later. The song is analyzed next (lyrics, beats, sections): poll get_song until analysis.status is "ready", usually about a minute. Pass lyrics (or set them later with set_song_lyrics) to have the videos spell every word right. ${NEEDS_PLAN}`,
|
|
21671
21878
|
method: "POST",
|
|
21672
21879
|
path: "/api/v1/songs",
|
|
21673
21880
|
scopes: ["music:write", "videos:write"],
|
|
@@ -21676,13 +21883,13 @@ var OPERATIONS = [
|
|
|
21676
21883
|
title: external_exports.string().trim().min(1).max(300).describe("The song title"),
|
|
21677
21884
|
language: external_exports.string().regex(/^[a-z]{2,3}$/).optional().describe('Lyrics language (ISO 639-1, e.g. "en"); detected when omitted'),
|
|
21678
21885
|
audio_url: httpsUrl("the master audio").optional(),
|
|
21679
|
-
cover_art_url: httpsUrl("the square cover art").optional(),
|
|
21886
|
+
cover_art_url: httpsUrl("the square cover art").optional().describe("Optional: a public https URL of the square cover art (a file on your computer: create_upload's file_url, or upload it with the CLI). Leave it out for a song without cover art"),
|
|
21680
21887
|
lyrics: external_exports.string().max(1e5).optional().describe(`Optional. ${LYRICS} once the song is analyzed (get_song: analysis.lyrics.status "mismatch")`),
|
|
21681
21888
|
instrumental: external_exports.boolean().optional().meta({ deprecated: true, "x-sunset": "2027-04-30" }).describe("Deprecated: the analysis hears whether a song has vocals (get_song: instrumental). true still skips transcription: lyric videos have no words and music videos never lip-sync (no lyrics with it). Stops working on 2027-04-30.")
|
|
21682
21889
|
}),
|
|
21683
21890
|
files: [
|
|
21684
21891
|
{ field: "audio", urlField: "audio_url", accept: ["audio/mpeg", "audio/wav", "audio/mp4"], description: "Master audio (MP3, WAV or M4A)" },
|
|
21685
|
-
{ field: "cover_art", urlField: "cover_art_url", accept: ["image/jpeg", "image/png"], description: "Square cover art (JPEG or PNG)" }
|
|
21892
|
+
{ field: "cover_art", urlField: "cover_art_url", accept: ["image/jpeg", "image/png"], description: "Square cover art (JPEG or PNG), optional" }
|
|
21686
21893
|
],
|
|
21687
21894
|
textFiles: ["lyrics"],
|
|
21688
21895
|
readOnly: false,
|
|
@@ -21696,7 +21903,7 @@ var OPERATIONS = [
|
|
|
21696
21903
|
group: "songs",
|
|
21697
21904
|
title: "Get a song",
|
|
21698
21905
|
summary: "One song and its analysis status",
|
|
21699
|
-
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).`,
|
|
21906
|
+
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).`,
|
|
21700
21907
|
method: "GET",
|
|
21701
21908
|
path: "/api/v1/songs/{song_id}",
|
|
21702
21909
|
scopes: ["music:read", "videos:read"],
|
|
@@ -21712,7 +21919,7 @@ var OPERATIONS = [
|
|
|
21712
21919
|
group: "songs",
|
|
21713
21920
|
title: "Rename a song",
|
|
21714
21921
|
summary: "Change a song\u2019s title",
|
|
21715
|
-
description: `instrumental is deprecated: the analysis hears whether a song has vocals. Switching it still analyzes the song again (an instrumental isn't transcribed, and its lyrics
|
|
21922
|
+
description: `A new title changes nothing else. instrumental is deprecated: the analysis hears whether a song has vocals. Switching it still analyzes the song again and replaces the analysis (an instrumental isn't transcribed, and its lyrics, including any set with set_song_lyrics, are deleted): poll get_song until analysis.status is "ready". Leave it out unless the user asks.`,
|
|
21716
21923
|
method: "PATCH",
|
|
21717
21924
|
path: "/api/v1/songs/{song_id}",
|
|
21718
21925
|
scopes: ["music:write", "videos:write"],
|
|
@@ -21722,11 +21929,157 @@ var OPERATIONS = [
|
|
|
21722
21929
|
instrumental: external_exports.boolean().optional().meta({ deprecated: true, "x-sunset": "2027-04-30" }).describe("Deprecated: the analysis hears whether a song has vocals. true: a song without vocals (never transcribed, never lip-synced). Stops working on 2027-04-30.")
|
|
21723
21930
|
}),
|
|
21724
21931
|
readOnly: false,
|
|
21725
|
-
destructive:
|
|
21932
|
+
destructive: true,
|
|
21726
21933
|
idempotent: true,
|
|
21727
21934
|
cli: ["songs", "rename"],
|
|
21728
21935
|
mcp: "rename_song"
|
|
21729
21936
|
},
|
|
21937
|
+
{
|
|
21938
|
+
id: "songs.set_cover",
|
|
21939
|
+
group: "songs",
|
|
21940
|
+
title: "Change a song\u2019s cover",
|
|
21941
|
+
summary: "Replace a song\u2019s cover art, or add one",
|
|
21942
|
+
description: "Adds cover art to a song without one, or replaces it. The new cover is checked like an upload\u2019s (a square JPEG or PNG, 1000\u20136000 px, up to 20 MB) and kept at its full size and at 1536, 640 and 160 px; the cover before stays on the song (list_song_covers) and can be put back in use (use_cover). Videos already made keep the cover they had; quotes, Looks, Canvas loops, music video plans and videos made from then on use the new one. Refused (409, code song_busy) while a video of the song is being made: try again once it is done.",
|
|
21943
|
+
method: "POST",
|
|
21944
|
+
path: "/api/v1/songs/{song_id}/cover",
|
|
21945
|
+
scopes: ["music:write", "videos:write"],
|
|
21946
|
+
input: external_exports.object({ song_id: songId, cover_art_url: httpsUrl("the square cover art").optional().describe("A public https URL of the new cover (or upload the file with the CLI)") }),
|
|
21947
|
+
files: [{ field: "cover_art", urlField: "cover_art_url", accept: ["image/jpeg", "image/png"], description: "Square cover art (JPEG or PNG)" }],
|
|
21948
|
+
readOnly: false,
|
|
21949
|
+
destructive: true,
|
|
21950
|
+
idempotent: true,
|
|
21951
|
+
cli: ["songs", "set-cover"],
|
|
21952
|
+
mcp: "set_song_cover",
|
|
21953
|
+
example: { song_id: "song_\u2026", cover_art_url: "https://example.com/cover-3000.jpg" }
|
|
21954
|
+
},
|
|
21955
|
+
{
|
|
21956
|
+
id: "covers.list",
|
|
21957
|
+
group: "songs",
|
|
21958
|
+
title: "List a song\u2019s covers",
|
|
21959
|
+
summary: "Every cover the song has had, made or uploaded, the one in use marked, and what making more costs",
|
|
21960
|
+
description: "Newest first; each cover is kept until deleted (delete_cover). in_use is the cover the song uses; any other can be put back in use (use_cover). A made cover (source made, ai_made true) has the idea it came from (title, pitch, style, director_pick). download_url saves its full size (full_size px square: 3000 for a made cover). rounds: covers being made now (make_cover), and the newest round if it failed. can.plan: making covers needs a paid plan; can.ready: the song is analysed; can.artist: the artist can be on a cover (they have a character). price.counts: the credits for 1 to 4 covers; price.redraw: redrawing one with a note. artist_look: the colours and typeface the artist's covers keep, once their first made cover is used.",
|
|
21961
|
+
method: "GET",
|
|
21962
|
+
path: "/api/v1/songs/{song_id}/covers",
|
|
21963
|
+
scopes: ["music:read", "videos:read"],
|
|
21964
|
+
input: external_exports.object({ song_id: songId }),
|
|
21965
|
+
readOnly: true,
|
|
21966
|
+
destructive: false,
|
|
21967
|
+
idempotent: true,
|
|
21968
|
+
cli: ["covers", "list"],
|
|
21969
|
+
mcp: "list_song_covers"
|
|
21970
|
+
},
|
|
21971
|
+
{
|
|
21972
|
+
id: "covers.quote",
|
|
21973
|
+
group: "songs",
|
|
21974
|
+
title: "Price covers",
|
|
21975
|
+
summary: "What a round of 1 to 4 covers costs, and a redraw",
|
|
21976
|
+
description: "credits: what a round of count covers costs now (the direction once, each cover on top); redraw_credits: redrawing one cover with a note. Tell the user before make_cover or redraw_cover, and send the same credits.",
|
|
21977
|
+
method: "GET",
|
|
21978
|
+
path: "/api/v1/cover-requests/quote",
|
|
21979
|
+
scopes: ["music:read", "videos:read"],
|
|
21980
|
+
input: external_exports.object({ count: external_exports.number().int().min(COVER_COUNT.min).max(COVER_COUNT.max).optional().describe("How many covers (1 to 4, default 1)") }),
|
|
21981
|
+
readOnly: true,
|
|
21982
|
+
destructive: false,
|
|
21983
|
+
idempotent: true,
|
|
21984
|
+
cli: ["covers", "quote"],
|
|
21985
|
+
mcp: "quote_cover"
|
|
21986
|
+
},
|
|
21987
|
+
{
|
|
21988
|
+
id: "covers.make",
|
|
21989
|
+
group: "songs",
|
|
21990
|
+
title: "Make covers",
|
|
21991
|
+
summary: "Kinetune\u2019s cover art director makes 1 to 4 covers for a song, each a different idea",
|
|
21992
|
+
description: `The director reads the song (its meaning, never a lyric drawn literally), the user's choices and the artist's character, and the image model draws each cover; each is checked (no letters in the picture, reads as a thumbnail) and kept on the song (list_song_covers) as it is drawn, in about a minute. Only covers that pass are charged; the song keeps its cover until the user picks one (use_cover). style: how it is made (auto: the director picks); vibes: up to ${COVER_VIBES_MAX} moods (dark, sad, hood, luxury\u2026); artist: auto (the director decides), always (needs their character), never; idea: the user's own words; words: none, title, or artist_title, lettered into the cover in the artist's typeface and read back letter by letter, always spelled as the song (the type style needs words); look: overrides the artist's colours and typeface. Ask the user for their choices rather than guessing, and quote first (quote_cover): credits must match. Needs a paid plan (402 plan_required) and an analysed song (409 song_not_ready); one round per song at a time (409 covers_in_progress).`,
|
|
21993
|
+
method: "POST",
|
|
21994
|
+
path: "/api/v1/cover-requests",
|
|
21995
|
+
scopes: ["music:write", "videos:write"],
|
|
21996
|
+
input: external_exports.object({
|
|
21997
|
+
song_id: songId,
|
|
21998
|
+
count: external_exports.number().int().min(COVER_COUNT.min).max(COVER_COUNT.max).optional().describe("How many covers, each a different idea (1 to 4, default 1)"),
|
|
21999
|
+
style: external_exports.enum(COVER_STYLE_IDS).optional().describe("How it is made (default auto: the director picks)"),
|
|
22000
|
+
vibes: external_exports.array(external_exports.enum(COVER_VIBE_IDS)).max(COVER_VIBES_MAX).optional().describe("Up to two moods or worlds"),
|
|
22001
|
+
artist: external_exports.enum(COVER_ARTIST_MODES).optional().describe("Who is on it: auto (the director decides), always (the artist), never"),
|
|
22002
|
+
idea: external_exports.string().trim().max(COVER_IDEA_MAX).optional().describe("The user's idea, in their words"),
|
|
22003
|
+
words: external_exports.enum(COVER_WORDS).optional().describe("Words on the cover, spelled exactly as the song: none (default), title, artist_title"),
|
|
22004
|
+
look: CoverLookSchema.optional().describe("The artist's colours (hex) and typeface for this round"),
|
|
22005
|
+
credits: external_exports.number().int().positive().describe("credits from quote_cover for this count, as shown to the user")
|
|
22006
|
+
}),
|
|
22007
|
+
readOnly: false,
|
|
22008
|
+
destructive: false,
|
|
22009
|
+
idempotent: false,
|
|
22010
|
+
cli: ["covers", "make"],
|
|
22011
|
+
mcp: "make_cover",
|
|
22012
|
+
example: { song_id: "song_\u2026", count: 2, style: "auto", vibes: ["sad"], words: "none", credits: 190 }
|
|
22013
|
+
},
|
|
22014
|
+
{
|
|
22015
|
+
id: "covers.get",
|
|
22016
|
+
group: "songs",
|
|
22017
|
+
title: "Get a round of covers",
|
|
22018
|
+
summary: "Each idea with its cover once drawn",
|
|
22019
|
+
description: "status: queued, drawing (covers appear as they are drawn), drawn, or failed (nothing charged; error says why). covers[].status: drawing, ready (cover: the cover kept on the song) or failed (it failed its check twice; not charged). credits: what the round cost.",
|
|
22020
|
+
method: "GET",
|
|
22021
|
+
path: "/api/v1/cover-requests/{request_id}",
|
|
22022
|
+
scopes: ["music:read", "videos:read"],
|
|
22023
|
+
input: external_exports.object({ request_id: external_exports.string().min(1).describe("The round id (coverreq_\u2026)") }),
|
|
22024
|
+
readOnly: true,
|
|
22025
|
+
destructive: false,
|
|
22026
|
+
idempotent: true,
|
|
22027
|
+
cli: ["covers", "get"],
|
|
22028
|
+
mcp: "get_cover_request"
|
|
22029
|
+
},
|
|
22030
|
+
{
|
|
22031
|
+
id: "covers.redraw",
|
|
22032
|
+
group: "songs",
|
|
22033
|
+
title: "Redraw a cover",
|
|
22034
|
+
summary: "Draws one cover of a round again with the user\u2019s note",
|
|
22035
|
+
description: 'Keeps the idea and changes what the note asks ("warmer, the moon bigger"). A new round of one cover; the cover it came from stays on the song. credits: redraw_credits from quote_cover, as shown to the user. Needs a paid plan.',
|
|
22036
|
+
method: "POST",
|
|
22037
|
+
path: "/api/v1/cover-requests/{request_id}/draw",
|
|
22038
|
+
scopes: ["music:write", "videos:write"],
|
|
22039
|
+
input: external_exports.object({
|
|
22040
|
+
request_id: external_exports.string().min(1).describe("The round the cover came from (coverreq_\u2026)"),
|
|
22041
|
+
cover_id: external_exports.string().min(1).describe("The cover to redraw (cover_\u2026)"),
|
|
22042
|
+
note: external_exports.string().trim().min(1).max(COVER_NOTE_MAX).describe("What to change, in the user's words"),
|
|
22043
|
+
credits: external_exports.number().int().positive().describe("redraw_credits from quote_cover")
|
|
22044
|
+
}),
|
|
22045
|
+
readOnly: false,
|
|
22046
|
+
destructive: false,
|
|
22047
|
+
idempotent: false,
|
|
22048
|
+
cli: ["covers", "redraw"],
|
|
22049
|
+
mcp: "redraw_cover"
|
|
22050
|
+
},
|
|
22051
|
+
{
|
|
22052
|
+
id: "covers.use",
|
|
22053
|
+
group: "songs",
|
|
22054
|
+
title: "Use a cover",
|
|
22055
|
+
summary: "Puts one of the song\u2019s covers in use",
|
|
22056
|
+
description: "Everything made from now on uses it; videos already made keep theirs. A made cover's colours and typeface become the artist's look for their next covers. Refused (409 song_busy) while a video of the song is being made. No plan needed.",
|
|
22057
|
+
method: "POST",
|
|
22058
|
+
path: "/api/v1/songs/{song_id}/covers/{cover_id}/use",
|
|
22059
|
+
scopes: ["music:write", "videos:write"],
|
|
22060
|
+
input: external_exports.object({ song_id: songId, cover_id: external_exports.string().min(1).describe("The cover id (cover_\u2026)") }),
|
|
22061
|
+
readOnly: false,
|
|
22062
|
+
destructive: false,
|
|
22063
|
+
idempotent: true,
|
|
22064
|
+
cli: ["covers", "use"],
|
|
22065
|
+
mcp: "use_cover"
|
|
22066
|
+
},
|
|
22067
|
+
{
|
|
22068
|
+
id: "covers.delete",
|
|
22069
|
+
group: "songs",
|
|
22070
|
+
title: "Delete a cover",
|
|
22071
|
+
summary: "Deletes one of the song\u2019s covers for good",
|
|
22072
|
+
description: "Its files go too. Deleting the cover in use leaves the song without one (409 song_busy while a video of the song is being made). Ask the user first.",
|
|
22073
|
+
method: "DELETE",
|
|
22074
|
+
path: "/api/v1/songs/{song_id}/covers/{cover_id}",
|
|
22075
|
+
scopes: ["music:write", "videos:write"],
|
|
22076
|
+
input: external_exports.object({ song_id: songId, cover_id: external_exports.string().min(1).describe("The cover id (cover_\u2026)") }),
|
|
22077
|
+
readOnly: false,
|
|
22078
|
+
destructive: true,
|
|
22079
|
+
idempotent: true,
|
|
22080
|
+
cli: ["covers", "delete"],
|
|
22081
|
+
mcp: "delete_cover"
|
|
22082
|
+
},
|
|
21730
22083
|
{
|
|
21731
22084
|
id: "songs.archive",
|
|
21732
22085
|
group: "songs",
|
|
@@ -21808,6 +22161,51 @@ var OPERATIONS = [
|
|
|
21808
22161
|
cli: ["songs", "clear-lyrics"],
|
|
21809
22162
|
mcp: "clear_song_lyrics"
|
|
21810
22163
|
},
|
|
22164
|
+
{
|
|
22165
|
+
id: "songs.edit_brief",
|
|
22166
|
+
group: "songs",
|
|
22167
|
+
title: "Correct a song\u2019s brief",
|
|
22168
|
+
summary: "Rewrite what the song is about, in the user\u2019s words",
|
|
22169
|
+
description: `The brief (get_song: brief) is what every director reads before making anything for the song: its theme, the story under it, how the feeling moves through its sections (mood_arc), the setting it evokes and its tone. When it reads the song wrong ("it\u2019s about my father, not a breakup"), send the fields to change; the others stay. mood_arc replaces the whole list (a section with an empty feeling is dropped); null or "" clears tone, story or setting; theme can\u2019t be emptied. Plain text, on one line each. The correction is the user\u2019s: brief.edited is true, every video, Canvas and cover made from then on reads it, and nothing replaces it (new lyrics or a new analysis keep it) until rewrite_song_brief. 409 while a song without a brief yet is sent no theme.`,
|
|
22170
|
+
method: "PATCH",
|
|
22171
|
+
path: "/api/v1/songs/{song_id}/brief",
|
|
22172
|
+
scopes: ["music:write", "videos:write"],
|
|
22173
|
+
input: external_exports.object({
|
|
22174
|
+
song_id: songId,
|
|
22175
|
+
theme: external_exports.string().max(SONG_BRIEF_LIMITS.theme).optional().describe("What the song is about, in a sentence"),
|
|
22176
|
+
tone: external_exports.string().max(SONG_BRIEF_LIMITS.tone).nullable().optional().describe("Its register, in a few words (tender, comic parody, defiant\u2026)"),
|
|
22177
|
+
story: external_exports.string().max(SONG_BRIEF_LIMITS.story).nullable().optional().describe("The story or situation under the words: who it is about, what happens"),
|
|
22178
|
+
setting: external_exports.string().max(SONG_BRIEF_LIMITS.setting).nullable().optional().describe("An era, a place or a scene it evokes"),
|
|
22179
|
+
mood_arc: external_exports.array(external_exports.object({
|
|
22180
|
+
section: external_exports.string().min(1).max(SONG_BRIEF_LIMITS.section).describe("The section, as the brief names it (Verse 1, Chorus 2\u2026)"),
|
|
22181
|
+
feeling: external_exports.string().max(SONG_BRIEF_LIMITS.feeling).describe("The feeling there, in a few words")
|
|
22182
|
+
})).max(SONG_BRIEF_LIMITS.sections).optional().describe("How the feeling moves through the song, section by section: replaces the whole list")
|
|
22183
|
+
}),
|
|
22184
|
+
readOnly: false,
|
|
22185
|
+
destructive: false,
|
|
22186
|
+
idempotent: true,
|
|
22187
|
+
cli: ["songs", "edit-brief"],
|
|
22188
|
+
mcp: "edit_song_brief",
|
|
22189
|
+
output: { name: "SongBrief", schema: SongBriefSchema },
|
|
22190
|
+
example: { song_id: "song_\u2026", theme: "A daughter talking to her late father about the life he missed" }
|
|
22191
|
+
},
|
|
22192
|
+
{
|
|
22193
|
+
id: "songs.remake_brief",
|
|
22194
|
+
group: "songs",
|
|
22195
|
+
title: "Rewrite a song\u2019s brief from the song",
|
|
22196
|
+
summary: "Drop the user\u2019s correction and read the song again",
|
|
22197
|
+
description: "Writes the brief again from the song as it is now (its lyrics and analysis), in the background: the answer has status writing; poll get_song until brief.status is ready, usually within half a minute. The user\u2019s correction (brief.edited) is dropped, so ask first. Free; a few times a day per song (429 past that). 409 while the song is being analysed.",
|
|
22198
|
+
method: "POST",
|
|
22199
|
+
path: "/api/v1/songs/{song_id}/brief",
|
|
22200
|
+
scopes: ["music:write", "videos:write"],
|
|
22201
|
+
input: external_exports.object({ song_id: songId }),
|
|
22202
|
+
readOnly: false,
|
|
22203
|
+
destructive: true,
|
|
22204
|
+
idempotent: false,
|
|
22205
|
+
cli: ["songs", "rewrite-brief"],
|
|
22206
|
+
mcp: "rewrite_song_brief",
|
|
22207
|
+
output: { name: "SongBrief", schema: SongBriefSchema }
|
|
22208
|
+
},
|
|
21811
22209
|
/* Looks */
|
|
21812
22210
|
{
|
|
21813
22211
|
id: "looks.list",
|
|
@@ -21948,7 +22346,7 @@ var OPERATIONS = [
|
|
|
21948
22346
|
group: "videos",
|
|
21949
22347
|
title: "Quote a lyric video",
|
|
21950
22348
|
summary: "The exact credits for a lyric video, before anything is charged",
|
|
21951
|
-
description: `Returns quote_id, credits (total), credits_per_video and a breakdown. ${QUOTE_FIRST} A quote is valid for 30 minutes.`,
|
|
22349
|
+
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.`,
|
|
21952
22350
|
method: "POST",
|
|
21953
22351
|
path: "/api/v1/quotes",
|
|
21954
22352
|
scopes: ["videos:write", "videos:read"],
|
|
@@ -22014,6 +22412,76 @@ var OPERATIONS = [
|
|
|
22014
22412
|
mcp: "swap_music_video_place",
|
|
22015
22413
|
output: { name: "MusicVideoPlan", schema: MusicVideoPlanSchema }
|
|
22016
22414
|
},
|
|
22415
|
+
/* Casting */
|
|
22416
|
+
{
|
|
22417
|
+
id: "music_video_castings.create",
|
|
22418
|
+
group: "videos",
|
|
22419
|
+
title: "Cast a music video",
|
|
22420
|
+
summary: "The director proposes who else is in it: up to 3 new people, each drawn as a character sheet only after a yes",
|
|
22421
|
+
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).`,
|
|
22422
|
+
method: "POST",
|
|
22423
|
+
path: "/api/v1/music-video-castings",
|
|
22424
|
+
scopes: ["videos:write"],
|
|
22425
|
+
input: musicVideoPlanInput.omit({ revise: true, lookbook_id: true }),
|
|
22426
|
+
readOnly: false,
|
|
22427
|
+
destructive: false,
|
|
22428
|
+
idempotent: false,
|
|
22429
|
+
cli: ["casting", "propose"],
|
|
22430
|
+
mcp: "cast_music_video",
|
|
22431
|
+
example: { song_id: "song_\u2026", category: "story", direction: "She leaves him at the station" }
|
|
22432
|
+
},
|
|
22433
|
+
{
|
|
22434
|
+
id: "music_video_castings.get",
|
|
22435
|
+
group: "videos",
|
|
22436
|
+
title: "Get a casting",
|
|
22437
|
+
summary: "A casting's people as proposed, then as drawn",
|
|
22438
|
+
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.",
|
|
22439
|
+
method: "GET",
|
|
22440
|
+
path: "/api/v1/music-video-castings/{casting_id}",
|
|
22441
|
+
scopes: ["videos:read"],
|
|
22442
|
+
input: external_exports.object({ casting_id: CastingIdSchema.describe("The casting id (casting_\u2026)") }),
|
|
22443
|
+
readOnly: true,
|
|
22444
|
+
destructive: false,
|
|
22445
|
+
idempotent: true,
|
|
22446
|
+
cli: ["casting", "get"],
|
|
22447
|
+
mcp: "get_music_video_casting"
|
|
22448
|
+
},
|
|
22449
|
+
{
|
|
22450
|
+
id: "music_video_castings.draw",
|
|
22451
|
+
group: "videos",
|
|
22452
|
+
title: "Draw a music video's cast",
|
|
22453
|
+
summary: "Draws the people the user kept as character sheets (spends credits)",
|
|
22454
|
+
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).`,
|
|
22455
|
+
method: "POST",
|
|
22456
|
+
path: "/api/v1/music-video-castings/{casting_id}/draw",
|
|
22457
|
+
scopes: ["videos:write"],
|
|
22458
|
+
input: external_exports.object({
|
|
22459
|
+
casting_id: CastingIdSchema.describe("The casting id"),
|
|
22460
|
+
credits: CastingDrawSchema.shape.credits.describe("The price shown: price.per_person \xD7 the people drawn"),
|
|
22461
|
+
people: CastingDrawSchema.shape.people.describe('The people kept: [{"index":1},{"index":2,"description":"\u2026"},{"index":3,"character":"mia-torres"}]; [] keeps it to the artist')
|
|
22462
|
+
}),
|
|
22463
|
+
readOnly: false,
|
|
22464
|
+
destructive: false,
|
|
22465
|
+
idempotent: false,
|
|
22466
|
+
cli: ["casting", "draw"],
|
|
22467
|
+
mcp: "draw_music_video_cast"
|
|
22468
|
+
},
|
|
22469
|
+
{
|
|
22470
|
+
id: "music_video_castings.delete",
|
|
22471
|
+
group: "videos",
|
|
22472
|
+
title: "Delete a casting",
|
|
22473
|
+
summary: "Deletes a casting; the people already kept stay in the kit",
|
|
22474
|
+
description: "Not while its people are drawn (409).",
|
|
22475
|
+
method: "DELETE",
|
|
22476
|
+
path: "/api/v1/music-video-castings/{casting_id}",
|
|
22477
|
+
scopes: ["videos:write"],
|
|
22478
|
+
input: external_exports.object({ casting_id: CastingIdSchema.describe("The casting id (casting_\u2026)") }),
|
|
22479
|
+
readOnly: false,
|
|
22480
|
+
destructive: true,
|
|
22481
|
+
idempotent: true,
|
|
22482
|
+
cli: ["casting", "delete"],
|
|
22483
|
+
mcp: "delete_music_video_casting"
|
|
22484
|
+
},
|
|
22017
22485
|
/* The lookbook */
|
|
22018
22486
|
{
|
|
22019
22487
|
id: "music_video_lookbooks.create",
|
|
@@ -22220,7 +22688,7 @@ var OPERATIONS = [
|
|
|
22220
22688
|
group: "videos",
|
|
22221
22689
|
title: "Draw an opening frame",
|
|
22222
22690
|
summary: "Draws the picture a planned shot opens on (spends credits)",
|
|
22223
|
-
description: `Paid per picture: tell the user the price (list_music_video_frames: price.credits) and draw only after their go, then show them the picture (image_url). Drawing a shot again replaces its frame for the same price. Good for the shots that matter most (the opening, the hook); the others are made from their references as usual. credits is the price the user agreed to; another price answers 409 with the current one. Takes about a minute; nothing is charged if it fails. 400 with the reason for a shot that can't have one (list_music_video_frames: unavailable). Then quote_music_video and create_music_video with the plan_id as usual. ${NEEDS_PLAN}`,
|
|
22691
|
+
description: `Paid per picture: tell the user the price (list_music_video_frames: price.credits) and draw only after their go, then show them the picture (image_url). Drawing a shot again replaces its frame (the earlier picture is gone) for the same price. Good for the shots that matter most (the opening, the hook); the others are made from their references as usual. credits is the price the user agreed to; another price answers 409 with the current one. Takes about a minute; nothing is charged if it fails. 400 with the reason for a shot that can't have one (list_music_video_frames: unavailable). Then quote_music_video and create_music_video with the plan_id as usual. ${NEEDS_PLAN}`,
|
|
22224
22692
|
method: "POST",
|
|
22225
22693
|
path: "/api/v1/music-video-plans/{plan_id}/frames",
|
|
22226
22694
|
scopes: ["videos:write"],
|
|
@@ -22230,7 +22698,7 @@ var OPERATIONS = [
|
|
|
22230
22698
|
credits: external_exports.number().int().positive().describe("The price shown (list_music_video_frames: price.credits)")
|
|
22231
22699
|
}),
|
|
22232
22700
|
readOnly: false,
|
|
22233
|
-
destructive:
|
|
22701
|
+
destructive: true,
|
|
22234
22702
|
idempotent: false,
|
|
22235
22703
|
cli: ["plans", "draw-frame"],
|
|
22236
22704
|
mcp: "draw_music_video_frame",
|
|
@@ -22241,7 +22709,7 @@ var OPERATIONS = [
|
|
|
22241
22709
|
group: "videos",
|
|
22242
22710
|
title: "Quote a music video",
|
|
22243
22711
|
summary: "The exact credits for an AI music video, before anything is charged",
|
|
22244
|
-
description: `Returns quote_id, credits and a breakdown; the price follows the section's length (clips of about 15 seconds). The song's artist performs it, so the artist needs their character (start_character). ${QUOTE_FIRST}`,
|
|
22712
|
+
description: `Returns quote_id, credits and a breakdown; the price follows the section's length (clips of about 15 seconds). The song's artist performs it, so the artist needs their character (start_character). With a plan_id, test: true prices testing the plan first (its chorus's shots at 480p; test in the answer says which shots and seconds): offer it beside the whole video's quote. ${QUOTE_FIRST}`,
|
|
22245
22713
|
method: "POST",
|
|
22246
22714
|
path: "/api/v1/quotes",
|
|
22247
22715
|
scopes: ["videos:write", "videos:read"],
|
|
@@ -22362,16 +22830,37 @@ var OPERATIONS = [
|
|
|
22362
22830
|
cli: ["videos", "cancel"],
|
|
22363
22831
|
mcp: "cancel_video"
|
|
22364
22832
|
},
|
|
22833
|
+
{
|
|
22834
|
+
id: "videos.revision_prices",
|
|
22835
|
+
group: "videos",
|
|
22836
|
+
title: "Price a music video revision",
|
|
22837
|
+
summary: "What revising each shot of a delivered music video costs, before anything is rewritten",
|
|
22838
|
+
description: "For a music video whose revisable_until (get_video) is still ahead. shots: each shot's credits (its rewrite and the shots it makes again, remakes: a shot that the next one carries straight on from makes that one again too); base_credits: the revision's setup, paid once whatever is changed; outro_credits: finishing the video again with another outro and no shot made (create_music_video with refinish). A revision of several shots costs base_credits plus theirs; the exact price is the quote of the revision's plan.",
|
|
22839
|
+
method: "GET",
|
|
22840
|
+
path: "/api/v1/videos/{video_id}/revisions",
|
|
22841
|
+
scopes: ["videos:read"],
|
|
22842
|
+
input: external_exports.object({ video_id: videoId }),
|
|
22843
|
+
readOnly: true,
|
|
22844
|
+
destructive: false,
|
|
22845
|
+
idempotent: true,
|
|
22846
|
+
cli: ["videos", "revision-prices"],
|
|
22847
|
+
mcp: "price_music_video_revision"
|
|
22848
|
+
},
|
|
22365
22849
|
{
|
|
22366
22850
|
id: "videos.revise_shot",
|
|
22367
22851
|
group: "videos",
|
|
22368
22852
|
title: "Revise a music video shot",
|
|
22369
|
-
summary: "The director rewrites one shot of a delivered music video from a note (free)",
|
|
22370
|
-
description: "For a music video whose revisable_until (get_video) is still ahead. Free (counted with the plans an hour), about half a minute. Returns a plan whose revision names the video and the shots made again:
|
|
22853
|
+
summary: "The director rewrites one shot of a delivered music video from a note, or several shots each from its own note (free)",
|
|
22854
|
+
description: "For a music video whose revisable_until (get_video) is still ahead. Free (counted with the plans an hour), about half a minute. Several shots go in one call as shots (up to 12), each with its own note: one plan, one new version. Returns a plan whose revision names the video, the shots asked (asked) and the shots made again (shots): those asked, and each next one when it carries straight on from one of them. Show the rewritten shots, then quote_music_video with song_id, plan_id and the video's quality: only the shots made again are charged, the others are reused. create_music_video makes the revision as a new video; the original never changes.",
|
|
22371
22855
|
method: "POST",
|
|
22372
22856
|
path: "/api/v1/videos/{video_id}/revisions",
|
|
22373
22857
|
scopes: ["videos:write"],
|
|
22374
|
-
input: external_exports.object({
|
|
22858
|
+
input: external_exports.object({
|
|
22859
|
+
video_id: videoId,
|
|
22860
|
+
shot: external_exports.number().int().min(1).optional().describe("The shot to change (its index in the plan's shots); with note. Or send shots"),
|
|
22861
|
+
note: external_exports.string().trim().min(1).max(1e3).optional().describe("What should change, in the artist's words"),
|
|
22862
|
+
shots: external_exports.array(external_exports.object({ shot: external_exports.number().int().min(1), note: external_exports.string().trim().min(1).max(1e3) })).min(1).max(12).optional().describe("Several shots, each with its own note (instead of shot and note): all rewritten into one plan, one new version")
|
|
22863
|
+
}),
|
|
22375
22864
|
readOnly: false,
|
|
22376
22865
|
destructive: false,
|
|
22377
22866
|
idempotent: false,
|
|
@@ -22423,7 +22912,7 @@ var OPERATIONS = [
|
|
|
22423
22912
|
group: "videos",
|
|
22424
22913
|
title: "Get a music video Look",
|
|
22425
22914
|
summary: "One music video Look",
|
|
22426
|
-
description: "",
|
|
22915
|
+
description: "With the video it was saved from while that video is public in the Showcase: video (its song_title, aspect_ratio, the artist and creator as the Showcase credits them, poster_url, video_url, poster_seconds, duration_seconds) and story (the director's idea as concept, and its shots along the song: section, start_seconds, end_seconds, summary). Both are null while the video isn't public. Never its maker's written brief.",
|
|
22427
22916
|
method: "GET",
|
|
22428
22917
|
path: "/api/v1/music-video-looks/{look_id}",
|
|
22429
22918
|
scopes: ["videos:read"],
|
|
@@ -22487,7 +22976,7 @@ var OPERATIONS = [
|
|
|
22487
22976
|
group: "videos",
|
|
22488
22977
|
title: "Make a video public",
|
|
22489
22978
|
summary: "Show a delivered video in the Community, its Look reusable by anyone",
|
|
22490
|
-
description: `Only when the user asks for it, in their own words: ask them first and never make a video public on your own. Public, everyone signed in to Kinetune sees it in the Community, Kinetune may feature it on kinetune.com, and its Look becomes public with it so anyone can reuse it (a music video's concept: its kind,
|
|
22979
|
+
description: `Only when the user asks for it, in their own words: ask them first and never make a video public on your own. Public, everyone signed in to Kinetune sees it in the Community, Kinetune may feature it on kinetune.com, and its Look becomes public with it so anyone can reuse it (a music video's concept: its kind, visual style, edit, places and props, never the artist or anyone else in it; a lyric video's Look unless it shows the artist or is Official); the workspace holds the Look's reward credits while it stays public. rights_confirmed (a music video needs it): the user confirms they have the right to show the artist and everyone in it publicly. socials true: the user also lets Kinetune post it on its socials (TikTok, Instagram, YouTube, X), crediting credit_handle. ${SHARE_CONSENT} Sharing again replaces those choices; a video Kinetune's staff hid stays hidden. Only a delivered (completed) video. unshare_video makes it private again; get_video shows sharing.`,
|
|
22491
22980
|
method: "POST",
|
|
22492
22981
|
path: "/api/v1/videos/{video_id}/share",
|
|
22493
22982
|
scopes: ["videos:write"],
|
|
@@ -22656,6 +23145,9 @@ var operation = (opId) => {
|
|
|
22656
23145
|
return found;
|
|
22657
23146
|
};
|
|
22658
23147
|
var pathFields = (op) => [...op.path.matchAll(/\{(\w+)\}/g)].map((m) => m[1]);
|
|
23148
|
+
function sentInput(parsed, raw) {
|
|
23149
|
+
return Object.fromEntries(Object.entries(parsed).filter(([key]) => raw[key] !== void 0));
|
|
23150
|
+
}
|
|
22659
23151
|
function buildRequest(op, input2, baseUrl) {
|
|
22660
23152
|
const used = new Set(pathFields(op));
|
|
22661
23153
|
const path4 = op.path.replace(/\{(\w+)\}/g, (_, name) => {
|
|
@@ -26152,6 +26644,24 @@ import { homedir } from "node:os";
|
|
|
26152
26644
|
import path2 from "node:path";
|
|
26153
26645
|
var DEFAULT_APP_URL = "https://kinetune.com";
|
|
26154
26646
|
var DEFAULT_API_URL = DEFAULT_APP_URL;
|
|
26647
|
+
function chosenWorkspace(config2, named = process.env.KINETUNE_ORGANIZATION) {
|
|
26648
|
+
const wanted = named?.trim();
|
|
26649
|
+
if (!wanted) return null;
|
|
26650
|
+
const stored = Object.entries(config2.workspaces ?? {});
|
|
26651
|
+
const found = stored.find(([id2]) => id2 === wanted) ?? stored.find(([, w]) => w.name.toLowerCase() === wanted.toLowerCase());
|
|
26652
|
+
if (found) return found[0];
|
|
26653
|
+
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}\`.`);
|
|
26654
|
+
}
|
|
26655
|
+
var WorkspaceNotSignedIn = class extends Error {
|
|
26656
|
+
};
|
|
26657
|
+
var signInOf = (config2, organization) => organization ? config2.workspaces?.[organization]?.auth : config2.auth;
|
|
26658
|
+
function withSignIn(config2, organization, auth) {
|
|
26659
|
+
const previous = signInOf(config2, organization), same = (other) => Boolean(previous && other && secretOf(other) === secretOf(previous));
|
|
26660
|
+
const workspaces = config2.workspaces && Object.fromEntries(Object.entries(config2.workspaces).map(([id2, w]) => [id2, id2 === organization || same(w.auth) ? { ...w, auth } : w]));
|
|
26661
|
+
return { ...config2, ...workspaces ? { workspaces } : {}, ...organization === null || same(config2.auth) ? { auth } : {} };
|
|
26662
|
+
}
|
|
26663
|
+
var secretOf = (auth) => auth.type === "oauth" ? auth.access_token : auth.api_key;
|
|
26664
|
+
var rememberSignIn = (config2, organization, auth) => ({ ...config2, auth, workspaces: { ...config2.workspaces, [organization.id]: { name: organization.name, auth } } });
|
|
26155
26665
|
var dir = () => process.env.KINETUNE_CONFIG_DIR || path2.join(process.env.XDG_CONFIG_HOME || path2.join(homedir(), ".config"), "kinetune");
|
|
26156
26666
|
var configFile = () => path2.join(dir(), "config.json");
|
|
26157
26667
|
async function loadConfig() {
|
|
@@ -26274,8 +26784,8 @@ async function tokenRequest(endpoint, body) {
|
|
|
26274
26784
|
}
|
|
26275
26785
|
var SignInExpired = class extends Error {
|
|
26276
26786
|
};
|
|
26277
|
-
async function accessToken(config2) {
|
|
26278
|
-
const auth = config2
|
|
26787
|
+
async function accessToken(config2, organization = null) {
|
|
26788
|
+
const auth = signInOf(config2, organization);
|
|
26279
26789
|
if (!auth || auth.type !== "oauth") return null;
|
|
26280
26790
|
if (!auth.expires_at || auth.expires_at > Date.now() + 6e4 || !auth.refresh_token) return auth.access_token;
|
|
26281
26791
|
const { app } = urls(config2);
|
|
@@ -26285,11 +26795,10 @@ async function accessToken(config2) {
|
|
|
26285
26795
|
throw error62;
|
|
26286
26796
|
});
|
|
26287
26797
|
const next = { ...auth, ...tokens, refresh_token: tokens.refresh_token ?? auth.refresh_token };
|
|
26288
|
-
await saveConfig(
|
|
26798
|
+
await saveConfig(withSignIn(config2, organization, next));
|
|
26289
26799
|
return next.access_token;
|
|
26290
26800
|
}
|
|
26291
|
-
async function revoke(config2) {
|
|
26292
|
-
const auth = config2.auth;
|
|
26801
|
+
async function revoke(config2, auth = config2.auth) {
|
|
26293
26802
|
if (!auth || auth.type !== "oauth") return;
|
|
26294
26803
|
const meta3 = await discover(urls(config2).app).catch(() => null);
|
|
26295
26804
|
if (!meta3?.revocation_endpoint) return;
|
|
@@ -26303,7 +26812,7 @@ async function revoke(config2) {
|
|
|
26303
26812
|
// package.json
|
|
26304
26813
|
var package_default = {
|
|
26305
26814
|
name: "@kinetune/cli",
|
|
26306
|
-
version: "2.
|
|
26815
|
+
version: "2.9.0",
|
|
26307
26816
|
description: "Command line for Kinetune: lyric videos, Spotify Canvas loops and AI music videos from your songs, for people and AI agents.",
|
|
26308
26817
|
license: "MIT",
|
|
26309
26818
|
homepage: "https://kinetune.com/developers#cli",
|
|
@@ -26381,11 +26890,20 @@ function print(data) {
|
|
|
26381
26890
|
}
|
|
26382
26891
|
process.stdout.write(JSON.stringify(data, null, 2) + "\n");
|
|
26383
26892
|
}
|
|
26893
|
+
var workspace;
|
|
26384
26894
|
async function credentials() {
|
|
26385
26895
|
const config2 = await loadConfig();
|
|
26386
26896
|
if (process.env.KINETUNE_API_KEY) return { token: process.env.KINETUNE_API_KEY, config: config2 };
|
|
26387
|
-
|
|
26388
|
-
|
|
26897
|
+
let organization;
|
|
26898
|
+
try {
|
|
26899
|
+
organization = chosenWorkspace(config2, workspace ?? process.env.KINETUNE_ORGANIZATION);
|
|
26900
|
+
} catch (error62) {
|
|
26901
|
+
if (error62 instanceof WorkspaceNotSignedIn) throw new UsageError(error62.message);
|
|
26902
|
+
throw error62;
|
|
26903
|
+
}
|
|
26904
|
+
const auth = signInOf(config2, organization);
|
|
26905
|
+
if (auth?.type === "api_key") return { token: auth.api_key, config: config2 };
|
|
26906
|
+
const token = await accessToken(config2, organization);
|
|
26389
26907
|
if (token) return { token, config: config2 };
|
|
26390
26908
|
throw new UsageError("Not signed in. Run `kinetune auth login` (or set KINETUNE_API_KEY to a workspace API key).");
|
|
26391
26909
|
}
|
|
@@ -26438,6 +26956,24 @@ async function confirm(question) {
|
|
|
26438
26956
|
rl.close();
|
|
26439
26957
|
}
|
|
26440
26958
|
}
|
|
26959
|
+
function unwrapNullable(schema) {
|
|
26960
|
+
const members2 = schema.anyOf ?? schema.oneOf;
|
|
26961
|
+
if (!members2 || members2.length !== 2 || !members2.some((m) => m?.type === "null")) return { schema, nullable: false };
|
|
26962
|
+
const value = members2.find((m) => m?.type !== "null");
|
|
26963
|
+
return value?.type ? { schema: { ...value, description: value.description ?? schema.description }, nullable: true } : { schema, nullable: false };
|
|
26964
|
+
}
|
|
26965
|
+
var CLEARED = /* @__PURE__ */ Symbol("null");
|
|
26966
|
+
function nullableFlag(value, numeric) {
|
|
26967
|
+
if (value === "null") return CLEARED;
|
|
26968
|
+
if (numeric) return Number(value);
|
|
26969
|
+
if (/^".*"$/s.test(value)) try {
|
|
26970
|
+
const parsed = JSON.parse(value);
|
|
26971
|
+
if (typeof parsed === "string") return parsed;
|
|
26972
|
+
} catch {
|
|
26973
|
+
}
|
|
26974
|
+
return value;
|
|
26975
|
+
}
|
|
26976
|
+
var WORKSPACE_OPTION = () => new Option("--organization <id>", "Act for this workspace (its id or name), one you signed in to with `kinetune auth login --organization`; default: the last signed in (or KINETUNE_ORGANIZATION)");
|
|
26441
26977
|
function addOperation(parent, op) {
|
|
26442
26978
|
const schema = inputJsonSchema(op);
|
|
26443
26979
|
const props = schema.properties ?? {};
|
|
@@ -26449,16 +26985,22 @@ MCP tool: ${op.mcp} REST: ${op.method} ${op.path}`);
|
|
|
26449
26985
|
for (const name of positional) cmd.argument(`<${name}>`, props[name]?.description ?? name);
|
|
26450
26986
|
for (const [name, prop] of Object.entries(props)) {
|
|
26451
26987
|
if (positional.includes(name)) continue;
|
|
26452
|
-
const p = prop;
|
|
26453
26988
|
const file2 = fileFields.get(name);
|
|
26454
26989
|
if (file2) {
|
|
26455
26990
|
cmd.addOption(new Option(`--${kebab(file2.field)} <${file2.multiple ? "files..." : "file"}>`, `${file2.description}: local path${file2.multiple ? "s" : ""} or https URL${file2.multiple ? "s" : ""}`));
|
|
26456
26991
|
continue;
|
|
26457
26992
|
}
|
|
26993
|
+
const { schema: p, nullable: nullable2 } = unwrapNullable(prop);
|
|
26458
26994
|
const type = p.type ?? (p.anyOf || p.oneOf ? "json" : p.const !== void 0 ? "const" : "string");
|
|
26459
|
-
const desc = [p.description, p.enum ? `one of: ${p.enum.join(", ")}` : "", p.default !== void 0 ? `default ${JSON.stringify(p.default)}` : ""].filter(Boolean).join("; ");
|
|
26460
|
-
if (type
|
|
26461
|
-
|
|
26995
|
+
const desc = [p.description ?? prop.description, p.enum ? `one of: ${p.enum.join(", ")}` : "", nullable2 ? "null clears it" : "", p.default !== void 0 ? `default ${JSON.stringify(p.default)}` : ""].filter(Boolean).join("; ");
|
|
26996
|
+
if (nullable2 && type !== "object" && type !== "array" && type !== "json" && type !== "boolean") {
|
|
26997
|
+
cmd.addOption(new Option(`--${kebab(name)} <value>`, desc).argParser((v) => nullableFlag(v, type === "number" || type === "integer")));
|
|
26998
|
+
continue;
|
|
26999
|
+
}
|
|
27000
|
+
if (type === "boolean" || p.const === true) {
|
|
27001
|
+
cmd.addOption(new Option(`--${kebab(name)}`, desc || name));
|
|
27002
|
+
if (type === "boolean" && p.default === void 0) cmd.addOption(new Option(`--no-${kebab(name)}`, `Send ${name} false`));
|
|
27003
|
+
} else if (type === "array" && p.items?.type !== "object") cmd.addOption(new Option(`--${kebab(name)} <values...>`, desc).argParser((v, prev) => [...prev ?? [], ...v.split(",")]));
|
|
26462
27004
|
else if (type === "number" || type === "integer") cmd.addOption(new Option(`--${kebab(name)} <number>`, desc).argParser(Number));
|
|
26463
27005
|
else if (type === "object" || type === "json" || type === "array") cmd.addOption(new Option(`--${kebab(name)} <json>`, `${desc} (JSON)`).argParser((v) => {
|
|
26464
27006
|
try {
|
|
@@ -26471,6 +27013,7 @@ MCP tool: ${op.mcp} REST: ${op.method} ${op.path}`);
|
|
|
26471
27013
|
}
|
|
26472
27014
|
for (const name of op.textFiles ?? []) cmd.option(`--${kebab(name)}-file <file>`, `${props[name]?.description ?? name}: read from a file (or - for stdin)`);
|
|
26473
27015
|
cmd.option("--input <file>", "The whole input as JSON (a file, or - for stdin); flags override it");
|
|
27016
|
+
cmd.addOption(WORKSPACE_OPTION());
|
|
26474
27017
|
const creates = op.id.startsWith("videos.create_");
|
|
26475
27018
|
if (creates) {
|
|
26476
27019
|
cmd.option("-y, --yes", "Create without asking after showing the quote");
|
|
@@ -26494,7 +27037,7 @@ MCP tool: ${op.mcp} REST: ${op.method} ${op.path}`);
|
|
|
26494
27037
|
continue;
|
|
26495
27038
|
}
|
|
26496
27039
|
const value = options[camel(name)];
|
|
26497
|
-
if (value !== void 0) input2[name] = value;
|
|
27040
|
+
if (value !== void 0) input2[name] = value === CLEARED ? null : value;
|
|
26498
27041
|
}
|
|
26499
27042
|
if (files.length) for (const f of op.files ?? []) delete input2[f.urlField];
|
|
26500
27043
|
for (const name of op.textFiles ?? []) {
|
|
@@ -26516,7 +27059,7 @@ MCP tool: ${op.mcp} REST: ${op.method} ${op.path}`);
|
|
|
26516
27059
|
}
|
|
26517
27060
|
const parsed = op.input.safeParse(input2);
|
|
26518
27061
|
if (!parsed.success && !files.length) throw new UsageError(parsed.error.issues.slice(0, 6).map((i) => `${i.path.join(".") || "input"}: ${i.message}`).join("\n"));
|
|
26519
|
-
print(await call(op, parsed.success ? parsed.data : input2, files));
|
|
27062
|
+
print(await call(op, parsed.success ? sentInput(parsed.data, input2) : input2, files));
|
|
26520
27063
|
});
|
|
26521
27064
|
}
|
|
26522
27065
|
var TERMINAL = /* @__PURE__ */ new Set(["completed", "failed", "cancelled"]);
|
|
@@ -26538,10 +27081,12 @@ async function waitFor(videoId2, timeoutSeconds) {
|
|
|
26538
27081
|
}
|
|
26539
27082
|
}
|
|
26540
27083
|
function program2() {
|
|
26541
|
-
const root = new Command("kinetune").version(VERSION).description("Lyric videos, Spotify Canvas loops and AI music videos from your songs. Every command prints JSON for scripts and AI agents.").option("--json", "Always print JSON").hook("preAction", (cmd) => {
|
|
27084
|
+
const root = new Command("kinetune").version(VERSION).description("Lyric videos, Spotify Canvas loops and AI music videos from your songs. Every command prints JSON for scripts and AI agents.").option("--json", "Always print JSON").hook("preAction", (cmd, action) => {
|
|
26542
27085
|
forceJson = Boolean(cmd.opts().json);
|
|
27086
|
+
workspace = action.parent?.name() === "auth" && action.name() === "login" ? void 0 : action.opts().organization;
|
|
26543
27087
|
});
|
|
26544
27088
|
const GROUP_DESCRIPTIONS = {
|
|
27089
|
+
" uploads": "A signed upload URL for a file (for tools that pass URLs; the CLI sends files itself)",
|
|
26545
27090
|
" artists": "Artists and their image",
|
|
26546
27091
|
" songs": "Songs: upload, list, analysis",
|
|
26547
27092
|
" looks": "Looks: reusable lyric-video designs",
|
|
@@ -26551,7 +27096,9 @@ function program2() {
|
|
|
26551
27096
|
" plan": "Plan a music video before paying: the director's concept and shots, free",
|
|
26552
27097
|
" plans": "Music video plans made earlier",
|
|
26553
27098
|
" kit": "The artist kit: outfits, places and props a music video brief mentions by @handle",
|
|
26554
|
-
"
|
|
27099
|
+
" casting": "Who else is in a music video: the director proposes people, each drawn as a character sheet after your yes",
|
|
27100
|
+
" lookbook": "Design a music video shoot: the director's outfits, places and props as pictures, before the plan",
|
|
27101
|
+
" covers": "Cover art: Kinetune makes covers for a song (quote first), every cover kept; use, redraw or delete one"
|
|
26555
27102
|
};
|
|
26556
27103
|
const groups = /* @__PURE__ */ new Map();
|
|
26557
27104
|
const group = (names) => {
|
|
@@ -26571,7 +27118,11 @@ function program2() {
|
|
|
26571
27118
|
for (const op of OPERATIONS) addOperation(group(op.cli.slice(0, -1)), op);
|
|
26572
27119
|
const auth = root.command("auth").description("Sign in with the app (OAuth) or a workspace API key");
|
|
26573
27120
|
auth.command("login").description("Sign in: opens the browser to sign in with the app, or stores an API key").option("--api-key <key>", "Use a workspace API key instead (created in the app under API keys)").option("--no-browser", "Print the sign-in URL instead of opening the browser").option("--organization <id>", "Preselect this workspace on the consent screen (an id from `kinetune organizations list`)").option("--api-url <url>", "API base URL").option("--app-url <url>", "App base URL").action(async (options) => {
|
|
26574
|
-
|
|
27121
|
+
let config2 = { ...await loadConfig(), ...options.apiUrl ? { api_url: options.apiUrl } : {}, ...options.appUrl ? { app_url: options.appUrl } : {} };
|
|
27122
|
+
if (config2.auth && !Object.keys(config2.workspaces ?? {}).length && !process.env.KINETUNE_API_KEY) {
|
|
27123
|
+
const before = await call(operation("account.get"), {}).catch(() => null);
|
|
27124
|
+
if (before) config2 = rememberSignIn(config2, before.organization, config2.auth);
|
|
27125
|
+
}
|
|
26575
27126
|
if (options.apiKey) {
|
|
26576
27127
|
await saveConfig({ ...config2, auth: { type: "api_key", api_key: options.apiKey } });
|
|
26577
27128
|
} else {
|
|
@@ -26579,22 +27130,46 @@ function program2() {
|
|
|
26579
27130
|
await login(config2, { log: say, noBrowser: options.browser === false, organization: options.organization });
|
|
26580
27131
|
}
|
|
26581
27132
|
const account = await call(operation("account.get"), {});
|
|
27133
|
+
const signedIn = await loadConfig();
|
|
27134
|
+
if (signedIn.auth) await saveConfig(rememberSignIn(signedIn, account.organization, signedIn.auth));
|
|
26582
27135
|
const plan = account.plan?.active ? `${account.plan.name} plan, ${account.credits.available} credits` : "no plan yet: choose one in the app to upload and make videos";
|
|
26583
27136
|
say(`Signed in to ${account.organization.name} (${plan}). Credentials: ${configFile()}`);
|
|
26584
27137
|
});
|
|
26585
|
-
auth.command("
|
|
26586
|
-
|
|
27138
|
+
auth.command("list").description("The workspaces you are signed in to; --organization picks one for a command").action(async () => {
|
|
27139
|
+
const config2 = await loadConfig();
|
|
27140
|
+
const active = Object.entries(config2.workspaces ?? {}).find(([, w]) => config2.auth && JSON.stringify(w.auth) === JSON.stringify(config2.auth))?.[0];
|
|
27141
|
+
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" : "" })) });
|
|
27142
|
+
});
|
|
27143
|
+
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"), {})));
|
|
27144
|
+
auth.command("token").description("Print the current bearer token (for curl or other tools)").addOption(WORKSPACE_OPTION()).action(async () => {
|
|
26587
27145
|
process.stdout.write((await credentials()).token + "\n");
|
|
26588
27146
|
});
|
|
26589
|
-
auth.command("logout").description("Forget the stored credentials (and revoke the OAuth
|
|
27147
|
+
auth.command("logout").description("Forget the stored credentials (and revoke the OAuth tokens); --organization: only that workspace's").addOption(WORKSPACE_OPTION()).action(async () => {
|
|
26590
27148
|
const config2 = await loadConfig();
|
|
26591
|
-
|
|
27149
|
+
if (workspace) {
|
|
27150
|
+
let id2;
|
|
27151
|
+
try {
|
|
27152
|
+
id2 = chosenWorkspace(config2, workspace);
|
|
27153
|
+
} catch (error62) {
|
|
27154
|
+
if (error62 instanceof WorkspaceNotSignedIn) throw new UsageError(error62.message);
|
|
27155
|
+
throw error62;
|
|
27156
|
+
}
|
|
27157
|
+
const gone = config2.workspaces[id2];
|
|
27158
|
+
await revoke(config2, gone.auth);
|
|
27159
|
+
const { [id2]: _, ...rest } = config2.workspaces;
|
|
27160
|
+
const isDefault = JSON.stringify(config2.auth) === JSON.stringify(gone.auth);
|
|
27161
|
+
const next = Object.values(rest)[0];
|
|
27162
|
+
await saveConfig({ ...config2, workspaces: rest, ...isDefault ? { auth: next?.auth } : {} });
|
|
27163
|
+
say(`Signed out of ${gone.name}.${isDefault && next ? ` Commands now act for ${next.name}.` : ""}`);
|
|
27164
|
+
return;
|
|
27165
|
+
}
|
|
27166
|
+
for (const auth2 of /* @__PURE__ */ new Set([config2.auth, ...Object.values(config2.workspaces ?? {}).map((w) => w.auth)])) await revoke(config2, auth2);
|
|
26592
27167
|
await clearConfig();
|
|
26593
27168
|
say("Signed out.");
|
|
26594
27169
|
});
|
|
26595
27170
|
const videos = group(["videos"]);
|
|
26596
|
-
videos.command("wait").argument("<video_id>").description("Wait until a video is completed, failed or cancelled, showing its progress").option("--timeout <seconds>", "Give up after this many seconds", Number, 1800).action(async (videoId2, options) => print(await waitFor(videoId2, options.timeout)));
|
|
26597
|
-
videos.command("download").argument("<video_id>").description("Download a completed video\u2019s files (one per format)").option("--out <dir>", "Directory to save into", ".").option("--format <ratio>", "Only this format, e.g. 9:16").option("--web", "The 720p web copies instead of the masters").action(async (videoId2, options) => {
|
|
27171
|
+
videos.command("wait").argument("<video_id>").description("Wait until a video is completed, failed or cancelled, showing its progress").addOption(WORKSPACE_OPTION()).option("--timeout <seconds>", "Give up after this many seconds", Number, 1800).action(async (videoId2, options) => print(await waitFor(videoId2, options.timeout)));
|
|
27172
|
+
videos.command("download").argument("<video_id>").description("Download a completed video\u2019s files (one per format)").addOption(WORKSPACE_OPTION()).option("--out <dir>", "Directory to save into", ".").option("--format <ratio>", "Only this format, e.g. 9:16").option("--web", "The 720p web copies instead of the masters").action(async (videoId2, options) => {
|
|
26598
27173
|
const video = await call(operation("videos.get"), { video_id: videoId2 });
|
|
26599
27174
|
if (video.status !== "completed") throw new UsageError(`The video is ${video.status}; wait for it first (kinetune videos wait ${videoId2}).`);
|
|
26600
27175
|
await mkdir2(options.out, { recursive: true });
|
|
@@ -26612,6 +27187,29 @@ function program2() {
|
|
|
26612
27187
|
}
|
|
26613
27188
|
print({ files: saved });
|
|
26614
27189
|
});
|
|
27190
|
+
group(["songs"]).command("download").argument("<song_id>").description("Download a song\u2019s cover art (full size) and its audio file").addOption(WORKSPACE_OPTION()).option("--out <dir>", "Directory to save into", ".").option("--cover", "Only the cover").option("--audio", "Only the audio").action(async (songId2, options) => {
|
|
27191
|
+
const song = await call(operation("songs.get"), { song_id: songId2 });
|
|
27192
|
+
const both = !options.cover && !options.audio;
|
|
27193
|
+
const base = `${song.artist_name ? `${song.artist_name} - ` : ""}${song.title}`.replace(/[\\/:*?"<>|\u0000-\u001f]+/g, " ").trim().slice(0, 120) || songId2;
|
|
27194
|
+
const wanted = [];
|
|
27195
|
+
if (both || options.cover) {
|
|
27196
|
+
if (!song.cover_art?.download_url && options.cover) throw new UsageError("This song has no cover.");
|
|
27197
|
+
wanted.push([`${base}.jpg`, song.cover_art?.download_url]);
|
|
27198
|
+
}
|
|
27199
|
+
if (both || options.audio) wanted.push([`${base}.${song.audio?.content_type === "audio/wav" ? "wav" : song.audio?.content_type === "audio/mp4" ? "m4a" : "mp3"}`, song.audio?.download_url]);
|
|
27200
|
+
await mkdir2(options.out, { recursive: true });
|
|
27201
|
+
const saved = [];
|
|
27202
|
+
for (const [name, url2] of wanted) {
|
|
27203
|
+
if (!url2) continue;
|
|
27204
|
+
const response = await fetch(url2);
|
|
27205
|
+
if (!response.ok) throw new Error(`Download failed (HTTP ${response.status})`);
|
|
27206
|
+
const file2 = path3.join(options.out, name);
|
|
27207
|
+
await writeFile2(file2, Buffer.from(await response.arrayBuffer()));
|
|
27208
|
+
saved.push(file2);
|
|
27209
|
+
say(`Saved ${file2}`);
|
|
27210
|
+
}
|
|
27211
|
+
print({ files: saved });
|
|
27212
|
+
});
|
|
26615
27213
|
root.command("schema").argument("[command...]", 'A command, e.g. "quote canvas"; all when omitted').description("The JSON input schema of commands (for AI agents)").action((words) => {
|
|
26616
27214
|
const ops = words.length ? OPERATIONS.filter((o) => o.cli.join(" ") === words.join(" ")) : OPERATIONS;
|
|
26617
27215
|
if (!ops.length) throw new UsageError(`No command "${words.join(" ")}"`);
|
|
@@ -26653,5 +27251,7 @@ if (process.argv[1] && /kinetune(\.mjs)?$|main\.ts$/.test(process.argv[1])) void
|
|
|
26653
27251
|
export {
|
|
26654
27252
|
VERSION,
|
|
26655
27253
|
main,
|
|
26656
|
-
|
|
27254
|
+
nullableFlag,
|
|
27255
|
+
program2 as program,
|
|
27256
|
+
unwrapNullable
|
|
26657
27257
|
};
|