@spira-lab/cli 0.0.14 → 0.0.15

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/dist/index.cjs +146 -16
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -19480,11 +19480,141 @@ var cliAiModelDocs = [
19480
19480
  "image_to_video requires exactly 1 referenceImage and does not send aspect ratio; size applies to text_to_video and reference_to_video."
19481
19481
  ]
19482
19482
  },
19483
+ {
19484
+ "id": "wan-3.0",
19485
+ "name": "Wan 3.0",
19486
+ "mediaType": "video",
19487
+ "description": "Alibaba Wan 3.0 all-in-one video generation with text, frame, image, video, and audio guidance plus native sound.",
19488
+ "capabilities": ["text-to-video", "image-to-video", "video-to-video"],
19489
+ "variants": [
19490
+ {
19491
+ "key": "480p",
19492
+ "display": "480p",
19493
+ "conditions": { "resolution": "480p" },
19494
+ "billingUnit": "per_second",
19495
+ "creditsPerUnit": 3.09
19496
+ },
19497
+ {
19498
+ "key": "720p",
19499
+ "display": "720p",
19500
+ "conditions": { "resolution": "720p" },
19501
+ "billingUnit": "per_second",
19502
+ "creditsPerUnit": 6.18
19503
+ },
19504
+ {
19505
+ "key": "1080p",
19506
+ "display": "1080p",
19507
+ "conditions": { "resolution": "1080p" },
19508
+ "billingUnit": "per_second",
19509
+ "creditsPerUnit": 12.35
19510
+ }
19511
+ ],
19512
+ "fields": [
19513
+ {
19514
+ "name": "prompt",
19515
+ "type": "string",
19516
+ "description": "Optional with reference media; otherwise required. Up to 20000 characters."
19517
+ },
19518
+ {
19519
+ "name": "generationType",
19520
+ "type": "string",
19521
+ "description": "Optional; inferred from references when omitted.",
19522
+ "values": ["text_to_video", "image_to_video", "first_last_frames_to_video", "reference_to_video"]
19523
+ },
19524
+ {
19525
+ "name": "duration",
19526
+ "type": "string",
19527
+ "description": "Whole-second output duration from 2 through 30.",
19528
+ "defaultValue": "5"
19529
+ },
19530
+ {
19531
+ "name": "resolution",
19532
+ "type": "string",
19533
+ "description": "Output resolution.",
19534
+ "values": ["720p", "480p", "1080p"],
19535
+ "defaultValue": "720p"
19536
+ },
19537
+ {
19538
+ "name": "size",
19539
+ "type": "string",
19540
+ "description": "Output aspect ratio, or adaptive to infer it from the reference media.",
19541
+ "values": ["adaptive", "16:9", "4:3", "1:1", "3:4", "9:16"],
19542
+ "defaultValue": "adaptive"
19543
+ },
19544
+ {
19545
+ "name": "referenceImage",
19546
+ "type": "string[]",
19547
+ "description": "Public URLs. One image is a first frame and two are first/last frames unless reference_to_video is explicit. Reference mode accepts up to 10."
19548
+ },
19549
+ {
19550
+ "name": "referenceVideo",
19551
+ "type": "string[]",
19552
+ "description": "Up to 5 public URLs in reference mode, totaling at most 15 seconds."
19553
+ },
19554
+ {
19555
+ "name": "referenceAudio",
19556
+ "type": "string[]",
19557
+ "description": "Up to 5 public URLs in reference mode, totaling at most 15 seconds."
19558
+ },
19559
+ {
19560
+ "name": "sound",
19561
+ "type": "boolean",
19562
+ "description": "Generate native audio with the video.",
19563
+ "defaultValue": true
19564
+ },
19565
+ {
19566
+ "name": "seed",
19567
+ "type": "number",
19568
+ "description": "Optional integer from 0 through 2147483647."
19569
+ }
19570
+ ],
19571
+ "examples": [
19572
+ {
19573
+ "label": "Text to video",
19574
+ "inputs": {
19575
+ "prompt": "A cinematic feast above the clouds with native ambience",
19576
+ "generationType": "text_to_video",
19577
+ "duration": "5",
19578
+ "resolution": "720p",
19579
+ "size": "16:9",
19580
+ "sound": true
19581
+ }
19582
+ },
19583
+ {
19584
+ "label": "First and last frames",
19585
+ "inputs": {
19586
+ "prompt": "Move naturally from dawn to night while preserving the same temple",
19587
+ "generationType": "first_last_frames_to_video",
19588
+ "referenceImage": ["https://example.com/first.png", "https://example.com/last.png"],
19589
+ "duration": "8",
19590
+ "resolution": "1080p"
19591
+ }
19592
+ },
19593
+ {
19594
+ "label": "Multimodal reference",
19595
+ "inputs": {
19596
+ "prompt": "Keep the image identity, clip movement, and audio rhythm",
19597
+ "generationType": "reference_to_video",
19598
+ "referenceImage": ["https://example.com/character.png"],
19599
+ "referenceVideo": ["https://example.com/motion.mp4"],
19600
+ "referenceAudio": ["https://example.com/rhythm.mp3"],
19601
+ "duration": "10",
19602
+ "resolution": "720p",
19603
+ "sound": true
19604
+ }
19605
+ }
19606
+ ],
19607
+ "notes": [
19608
+ "Frame mode and ordinary reference mode cannot be mixed.",
19609
+ "Reference inputs are free; only output duration and resolution determine the price. Sound costs the same.",
19610
+ "Document and webpage inputs are not exposed by Spira."
19611
+ ]
19612
+ },
19483
19613
  {
19484
19614
  "id": "minimax-h3",
19485
19615
  "name": "MiniMax H3",
19486
19616
  "mediaType": "video",
19487
- "description": "MiniMax H3 multimodal video model. The only model that accepts image, video, and audio references in the same request.",
19617
+ "description": "MiniMax H3 multimodal video model with image, video, and audio references in the same request.",
19488
19618
  "capabilities": [
19489
19619
  "text-to-video",
19490
19620
  "image-to-video"
@@ -21120,7 +21250,13 @@ var cliAiModelDocs = [
21120
21250
  }
21121
21251
  ];
21122
21252
  function listCliAiModelDocs(mediaType) {
21123
- return cliAiModelDocs.filter((model) => !mediaType || model.mediaType === mediaType);
21253
+ const docs = cliAiModelDocs.filter((model) => !mediaType || model.mediaType === mediaType);
21254
+ const wan = docs.find((model) => model.id === "wan-3.0");
21255
+ if (!wan) return docs;
21256
+ const ordered = docs.filter((model) => model.id !== "wan-3.0");
21257
+ const miniMaxIndex = ordered.findIndex((model) => model.id === "minimax-h3");
21258
+ if (miniMaxIndex < 0) return docs;
21259
+ return [...ordered.slice(0, miniMaxIndex + 1), wan, ...ordered.slice(miniMaxIndex + 1)];
21124
21260
  }
21125
21261
  function getCliAiModelDoc(modelId) {
21126
21262
  return cliAiModelDocs.find((model) => model.id === modelId);
@@ -22110,35 +22246,29 @@ var commandDefinitions = [
22110
22246
  },
22111
22247
  {
22112
22248
  path: ["media", "video"],
22113
- purpose: "Download the video file behind a social link.",
22249
+ purpose: "Resolve the original video and optional audio files behind a social link.",
22114
22250
  arguments: [{ name: "url", description: "Public post or video URL.", required: true }],
22115
22251
  options: [
22116
22252
  {
22117
22253
  name: "formatId",
22118
22254
  flag: "--format-id <id>",
22119
- description: "A format_id from `spira media info`. Omit for the best rung that plays everywhere. Every rung is delivered with audio.",
22120
- type: "string"
22121
- },
22122
- {
22123
- name: "output",
22124
- flag: "--output <path>",
22125
- description: "Also save a local copy from the returned URL.",
22255
+ description: "A format_id from `spira media info`. Omit for the highest available rung. Video-only rungs return a second audio file.",
22126
22256
  type: "string"
22127
22257
  }
22128
22258
  ],
22129
22259
  http: {
22130
22260
  method: "POST",
22131
- path: "/api/tools/media/video",
22261
+ path: "/api/tools/media/video/urls",
22132
22262
  authRequired: true,
22133
22263
  body: [
22134
22264
  { name: "url", source: "argument", from: "url" },
22135
22265
  { name: "formatId", source: "option", from: "formatId" }
22136
22266
  ]
22137
22267
  },
22138
- resultType: "mediaAsset",
22268
+ resultType: "generic",
22139
22269
  examples: [
22140
22270
  "spira media video https://www.tiktok.com/@user/video/123",
22141
- "spira media video https://www.youtube.com/watch?v=dQw4w9WgXcQ --output ./downloads/",
22271
+ "spira media video https://www.youtube.com/watch?v=dQw4w9WgXcQ",
22142
22272
  "spira media video https://www.tiktok.com/@user/video/123 --format-id bytevc1_1080p_612574-0"
22143
22273
  ],
22144
22274
  relatedCommands: ["spira media info <url>", "spira media thumbnail <url>"]
@@ -23816,8 +23946,8 @@ function renderCommandIndex() {
23816
23946
  `;
23817
23947
  }
23818
23948
  async function packageVersion() {
23819
- if ("0.0.14".length > 0) {
23820
- return "0.0.14";
23949
+ if ("0.0.15".length > 0) {
23950
+ return "0.0.15";
23821
23951
  }
23822
23952
  try {
23823
23953
  const packageUrl = new URL("../package.json", import_meta.url);
@@ -24038,7 +24168,7 @@ ${url2}
24038
24168
  poll: () => executeHttpCommand({ command: statusCommand, args: { jobId }, options: {} })
24039
24169
  });
24040
24170
  }
24041
- if (commandKey(definition.path) === "media video" || commandKey(definition.path) === "media thumbnail") {
24171
+ if (commandKey(definition.path) === "media thumbnail") {
24042
24172
  const downloaded = await executeHttpCommand({ command: definition, args, options });
24043
24173
  if (typeof options.output !== "string" || options.output.length === 0) return downloaded;
24044
24174
  return saveMediaAsset(downloaded, options.output);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@spira-lab/cli",
3
- "version": "0.0.14",
3
+ "version": "0.0.15",
4
4
  "description": "Command line client for Spira.",
5
5
  "type": "module",
6
6
  "bin": {