@shop-os/modelkit 0.16.0 → 0.17.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/CHANGELOG.md +8 -0
- package/dist/catalog.cjs +90 -1
- package/dist/catalog.cjs.map +1 -1
- package/dist/catalog.js +90 -1
- package/dist/catalog.js.map +1 -1
- package/dist/index.cjs +118 -14
- package/dist/index.cjs.map +1 -1
- package/dist/index.js +118 -14
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
package/dist/catalog.js
CHANGED
|
@@ -5063,6 +5063,7 @@ var KLING_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
|
5063
5063
|
var H3_PROMPT = { referenceSyntax: "numbered", maxChars: 5e4 };
|
|
5064
5064
|
var KLING_V4_PROMPT = { referenceSyntax: "numbered", maxChars: 2500 };
|
|
5065
5065
|
var KLING_V4_AUDIO = "always";
|
|
5066
|
+
var KLING_V4_FLASH_PROMPT = { referenceSyntax: "numbered", maxChars: 26e3 };
|
|
5066
5067
|
var NO_REFERENCES = { images: 0, videos: 0, audios: 0 };
|
|
5067
5068
|
function klingMotionControl(tier) {
|
|
5068
5069
|
const label = tier === "pro" ? "Pro" : "Standard";
|
|
@@ -5240,6 +5241,85 @@ var VIDEO_FAMILY_MODELS = [
|
|
|
5240
5241
|
},
|
|
5241
5242
|
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5242
5243
|
},
|
|
5244
|
+
{
|
|
5245
|
+
// https://fal.ai/models/kling/v4/flash/reference-to-video/api (+ /text-to-video,
|
|
5246
|
+
// /image-to-video): routed like kling-4.0, at 720p only and 3-20 s. image-to-video takes
|
|
5247
|
+
// a start frame (300 px min, ratio 0.40-2.50) and no end frame; its prompt is optional.
|
|
5248
|
+
// Reference images: 10, the start frame included. Reference videos: 5, 3-20.05 s each
|
|
5249
|
+
// and 20 s combined, 700 px min. Prompts up to 26,000 characters. No sound switch.
|
|
5250
|
+
id: "kling-4.0-flash",
|
|
5251
|
+
aliases: ["kling-4-flash", "kling-v4-flash"],
|
|
5252
|
+
label: "Kling 4.0 Flash",
|
|
5253
|
+
type: "video",
|
|
5254
|
+
adapter: "fal",
|
|
5255
|
+
providerModelId: "kling/v4/flash",
|
|
5256
|
+
lifecycle: "active",
|
|
5257
|
+
exposure: ["cowork", "space_builder"],
|
|
5258
|
+
constraints: {
|
|
5259
|
+
aspectRatios: ["adaptive", "16:9", "9:16", "1:1", "21:9"],
|
|
5260
|
+
resolutions: ["720p"],
|
|
5261
|
+
durations: { min: 3, max: 20 },
|
|
5262
|
+
durationPresets: [5, 10, 15, 20],
|
|
5263
|
+
references: {
|
|
5264
|
+
...NO_REFERENCES,
|
|
5265
|
+
images: 10,
|
|
5266
|
+
videos: 5,
|
|
5267
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5268
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5269
|
+
},
|
|
5270
|
+
supports: [],
|
|
5271
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5272
|
+
audio: KLING_V4_AUDIO
|
|
5273
|
+
},
|
|
5274
|
+
defaults: { durationSeconds: 5, resolution: "720p", aspectRatio: "16:9" },
|
|
5275
|
+
usage: { ...VIDEO_USAGE },
|
|
5276
|
+
pricingKind: "video_per_second",
|
|
5277
|
+
display: {
|
|
5278
|
+
provider: "kuaishou",
|
|
5279
|
+
logo: KLING_LOGO,
|
|
5280
|
+
description: "Kuaishou Kling 4.0 Flash: fast text-to-video, a start frame, or reference-to-video from up to 10 images and 5 videos (20 seconds combined), 3 to 20 seconds at 720p. Prompts name references @Image1, @Video1."
|
|
5281
|
+
}
|
|
5282
|
+
},
|
|
5283
|
+
{
|
|
5284
|
+
// https://fal.ai/models/kling/v4/flash/video-to-video/api: source 3-20.05 s (700 px
|
|
5285
|
+
// min, 23.9-60.05 fps), up to 10 reference images and 4 reference videos; the source
|
|
5286
|
+
// and reference videos total 20 s at most. duration 3-20, or left out for the source's
|
|
5287
|
+
// length. The prompt names the source @Video1, reference videos @Video2 on, images @Image1.
|
|
5288
|
+
id: "kling-4.0-flash-edit",
|
|
5289
|
+
aliases: ["kling-4-flash-edit", "kling-v4-flash-edit"],
|
|
5290
|
+
label: "Kling 4.0 Flash Edit",
|
|
5291
|
+
type: "video",
|
|
5292
|
+
adapter: "fal",
|
|
5293
|
+
providerModelId: "kling/v4/flash/video-to-video",
|
|
5294
|
+
lifecycle: "active",
|
|
5295
|
+
exposure: ["cowork", "space_builder"],
|
|
5296
|
+
constraints: {
|
|
5297
|
+
resolutions: ["720p"],
|
|
5298
|
+
durations: { min: 3, max: 20 },
|
|
5299
|
+
references: {
|
|
5300
|
+
...NO_REFERENCES,
|
|
5301
|
+
images: 10,
|
|
5302
|
+
videos: 4,
|
|
5303
|
+
videoSeconds: { min: 3, max: 20.05, total: 20 },
|
|
5304
|
+
videoPixels: { minWidth: 700, minHeight: 700 }
|
|
5305
|
+
},
|
|
5306
|
+
requires: ["sourceVideo"],
|
|
5307
|
+
sourceVideoSeconds: { min: 3, max: 20.05, inReferenceTotal: true },
|
|
5308
|
+
sourceVideoPixels: { minWidth: 700, minHeight: 700 },
|
|
5309
|
+
supports: [],
|
|
5310
|
+
prompt: KLING_V4_FLASH_PROMPT,
|
|
5311
|
+
audio: KLING_V4_AUDIO
|
|
5312
|
+
},
|
|
5313
|
+
defaults: { resolution: "720p" },
|
|
5314
|
+
usage: { ...VIDEO_USAGE },
|
|
5315
|
+
pricingKind: "video_per_second",
|
|
5316
|
+
display: {
|
|
5317
|
+
provider: "kuaishou",
|
|
5318
|
+
logo: KLING_LOGO,
|
|
5319
|
+
description: "Kuaishou Kling 4.0 Flash video edit: change a 3-20 second clip with a prompt, up to 10 reference images and 4 reference videos (20 seconds in all with the source), at 720p, as long as the source or a set 3-20 seconds. Prompts name the source @Video1."
|
|
5320
|
+
},
|
|
5321
|
+
capabilities: { acceptsSourceVideo: true, videoEdit: true }
|
|
5322
|
+
},
|
|
5243
5323
|
{
|
|
5244
5324
|
// https://fal.ai/models/minimax/h3-max-turbo/text-to-video/api (+ /image-to-video).
|
|
5245
5325
|
// image-to-video takes a start frame, an end frame, or both, and no aspect_ratio.
|
|
@@ -8999,6 +9079,8 @@ var O3_REFERENCE = "fal-ai/kling-video/o3/pro/reference-to-video";
|
|
|
8999
9079
|
var O3_EDIT = "fal-ai/kling-video/o3/pro/video-to-video/edit";
|
|
9000
9080
|
var KLING_V4 = "kling/v4";
|
|
9001
9081
|
var KLING_V4_EDIT = "kling/v4/video-to-video/edit";
|
|
9082
|
+
var KLING_V4_FLASH = "kling/v4/flash";
|
|
9083
|
+
var KLING_V4_FLASH_EDIT = "kling/v4/flash/video-to-video";
|
|
9002
9084
|
var H3_TURBO = "minimax/h3-max-turbo";
|
|
9003
9085
|
var H3_RECAST = "minimax/h3-max/recast";
|
|
9004
9086
|
var H3_RELIGHT = "minimax/h3-max/relight";
|
|
@@ -9080,6 +9162,11 @@ function klingV4(req) {
|
|
|
9080
9162
|
}
|
|
9081
9163
|
return needsPrompt(req);
|
|
9082
9164
|
}
|
|
9165
|
+
function klingV4Flash(req) {
|
|
9166
|
+
if (req.lastFrame !== void 0) return unsupported2("takes no end frame");
|
|
9167
|
+
if (!hasReferences(req) && req.firstFrame !== void 0) return void 0;
|
|
9168
|
+
return klingV4(req);
|
|
9169
|
+
}
|
|
9083
9170
|
function h3Turbo(req) {
|
|
9084
9171
|
if (count(req.referenceImages) + count(req.referenceVideos) > 0) {
|
|
9085
9172
|
return unsupported2("takes no reference images or videos");
|
|
@@ -9160,6 +9247,8 @@ var RULES = /* @__PURE__ */ new Map([
|
|
|
9160
9247
|
[O3_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9161
9248
|
[KLING_V4, klingV4],
|
|
9162
9249
|
[KLING_V4_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9250
|
+
[KLING_V4_FLASH, klingV4Flash],
|
|
9251
|
+
[KLING_V4_FLASH_EDIT, (req) => needsSource(req) ?? needsPrompt(req)],
|
|
9163
9252
|
[H3_TURBO, h3Turbo],
|
|
9164
9253
|
[MINIMAX_H3_INSERT, h3Insert],
|
|
9165
9254
|
[H3_RECAST, h3Recast],
|
|
@@ -9209,7 +9298,7 @@ function applyFalVideoRules(model, req, callerRatio, warnings) {
|
|
|
9209
9298
|
warnings.push(viduSilentWarning(model));
|
|
9210
9299
|
req.generateAudio = false;
|
|
9211
9300
|
}
|
|
9212
|
-
if (id === KLING_V4 && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9301
|
+
if ((id === KLING_V4 || id === KLING_V4_FLASH) && req.firstFrame !== void 0 && !hasReferences(req)) {
|
|
9213
9302
|
if (req.aspectRatio !== void 0) {
|
|
9214
9303
|
if (callerRatio !== void 0) {
|
|
9215
9304
|
warnings.push({
|