@flatkey-ai/cli 0.2.5 → 0.2.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/package.json +1 -1
  2. package/src/api.js +8 -2
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flatkey-ai/cli",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Flatkey media generation CLI for image, video, audio, credits, status, and models.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/api.js CHANGED
@@ -83,13 +83,15 @@ export function planVideoRequest(options) {
83
83
  );
84
84
  const resolution = validateOptionalValue(
85
85
  options.resolution,
86
- ["480p", "720p", "1080p"],
86
+ isMiniMaxModel(model) ? ["768P", "2K"] : ["480p", "720p", "1080p"],
87
87
  "resolution",
88
88
  );
89
89
  const basePayload = cleanObject({
90
90
  model,
91
91
  prompt: options.prompt,
92
- duration: parseOptionalInteger(options.duration),
92
+ duration: options.duration === undefined && isMiniMaxModel(model)
93
+ ? 5
94
+ : parseOptionalInteger(options.duration),
93
95
  aspect: ratio,
94
96
  ratio,
95
97
  resolution,
@@ -378,6 +380,10 @@ function isSeedanceModel(model) {
378
380
  return /seedance/i.test(model);
379
381
  }
380
382
 
383
+ function isMiniMaxModel(model) {
384
+ return /^minimax-h3$/i.test(model);
385
+ }
386
+
381
387
  function buildSeedanceContent(options) {
382
388
  const content = [];
383
389
  if (options.prompt !== undefined) {