@spira-lab/cli 0.0.13 → 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 +550 -16
  2. package/package.json +1 -1
package/dist/index.cjs CHANGED
@@ -18083,8 +18083,353 @@ var cliResultSchema = external_exports.object({
18083
18083
  error: cliErrorSchema.optional()
18084
18084
  });
18085
18085
 
18086
+ // ../../packages/contracts/dist/cli/kie-ai-model-docs.js
18087
+ function videoDoc(input) {
18088
+ const exampleInputs = {
18089
+ prompt: "A cinematic camera move through a bright modern studio",
18090
+ duration: input.durations[0]
18091
+ };
18092
+ if (input.sizes?.[0])
18093
+ exampleInputs.size = input.sizes[0];
18094
+ if (input.resolutions?.[0])
18095
+ exampleInputs.resolution = input.resolutions[0];
18096
+ if (input.sound)
18097
+ exampleInputs.sound = false;
18098
+ if (input.acceptsImage || input.requiresImage)
18099
+ exampleInputs.referenceImage = ["https://example.com/reference.png"];
18100
+ if (input.requiresVideo)
18101
+ exampleInputs.referenceVideo = ["https://example.com/motion.mp4"];
18102
+ return {
18103
+ id: input.id,
18104
+ name: input.name,
18105
+ mediaType: "video",
18106
+ description: input.description,
18107
+ capabilities: input.capabilities,
18108
+ variants: input.variants,
18109
+ fields: [
18110
+ { name: "prompt", type: "string", required: true, description: "Text instruction for the video." },
18111
+ {
18112
+ name: "duration",
18113
+ type: "string",
18114
+ description: "Output duration in seconds.",
18115
+ values: input.durations,
18116
+ defaultValue: input.durations[0]
18117
+ },
18118
+ ...input.sizes ? [
18119
+ {
18120
+ name: "size",
18121
+ type: "string",
18122
+ description: "Output aspect ratio.",
18123
+ values: input.sizes,
18124
+ defaultValue: input.sizes[0]
18125
+ }
18126
+ ] : [],
18127
+ ...input.resolutions ? [
18128
+ {
18129
+ name: "resolution",
18130
+ type: "string",
18131
+ description: "Output resolution.",
18132
+ values: input.resolutions,
18133
+ defaultValue: input.resolutions[0]
18134
+ }
18135
+ ] : [],
18136
+ ...input.sound ? [
18137
+ {
18138
+ name: "sound",
18139
+ type: "boolean",
18140
+ description: "Generate native audio.",
18141
+ defaultValue: false
18142
+ }
18143
+ ] : [],
18144
+ ...input.acceptsImage || input.requiresImage ? [
18145
+ {
18146
+ name: "referenceImage",
18147
+ type: "string[]",
18148
+ required: input.requiresImage,
18149
+ description: input.requiresImage ? "Exactly one public image URL is required." : input.maxReferenceImages === 2 ? "Optional one or two public image URLs. Two URLs are used as first and last frames." : "Optional single public image URL for image-to-video."
18150
+ }
18151
+ ] : [],
18152
+ ...input.requiresVideo ? [
18153
+ {
18154
+ name: "referenceVideo",
18155
+ type: "string[]",
18156
+ required: true,
18157
+ description: "Exactly one public 3-30 second motion reference video URL is required."
18158
+ }
18159
+ ] : []
18160
+ ],
18161
+ examples: [{ label: "Generate video", inputs: exampleInputs }],
18162
+ notes: input.notes
18163
+ };
18164
+ }
18165
+ function imageDoc(input) {
18166
+ const exampleInputs = {
18167
+ prompt: input.requiresImage ? "Change the background to pale yellow" : "A clean editorial product photograph",
18168
+ size: input.sizes[0]
18169
+ };
18170
+ if (input.resolutions?.[0])
18171
+ exampleInputs.resolution = input.resolutions[0];
18172
+ if (input.modes?.[0])
18173
+ exampleInputs.mode = input.modes[0];
18174
+ if (input.outputFormats?.[0])
18175
+ exampleInputs.outputFormat = input.outputFormats[0];
18176
+ if (input.acceptsImage || input.requiresImage)
18177
+ exampleInputs.referenceImage = ["https://example.com/reference.png"];
18178
+ return {
18179
+ id: input.id,
18180
+ name: input.name,
18181
+ mediaType: "image",
18182
+ description: input.description,
18183
+ capabilities: input.capabilities,
18184
+ variants: input.variants,
18185
+ fields: [
18186
+ { name: "prompt", type: "string", required: true, description: "Text instruction for the image." },
18187
+ {
18188
+ name: "size",
18189
+ type: "string",
18190
+ description: "Output aspect ratio.",
18191
+ values: input.sizes,
18192
+ defaultValue: input.sizes[0]
18193
+ },
18194
+ ...input.resolutions ? [
18195
+ {
18196
+ name: "resolution",
18197
+ type: "string",
18198
+ description: "Output resolution.",
18199
+ values: input.resolutions,
18200
+ defaultValue: input.resolutions[0]
18201
+ }
18202
+ ] : [],
18203
+ ...input.modes ? [
18204
+ {
18205
+ name: "mode",
18206
+ type: "string",
18207
+ description: "Generation tier.",
18208
+ values: input.modes,
18209
+ defaultValue: input.modes[0]
18210
+ }
18211
+ ] : [],
18212
+ ...input.outputFormats ? [
18213
+ {
18214
+ name: "outputFormat",
18215
+ type: "string",
18216
+ description: "Output image format.",
18217
+ values: input.outputFormats,
18218
+ defaultValue: input.outputFormats[0]
18219
+ }
18220
+ ] : [],
18221
+ ...input.acceptsImage || input.requiresImage ? [
18222
+ {
18223
+ name: "referenceImage",
18224
+ type: "string[]",
18225
+ required: input.requiresImage,
18226
+ description: input.requiresImage ? "Exactly one public image URL is required." : "Optional public image URL for image editing."
18227
+ }
18228
+ ] : []
18229
+ ],
18230
+ examples: [{ label: input.requiresImage ? "Edit image" : "Generate image", inputs: exampleInputs }]
18231
+ };
18232
+ }
18233
+ var perSecond = (key, display, creditsPerUnit, conditions = {}) => ({ key, display, conditions, billingUnit: "per_second", creditsPerUnit });
18234
+ var perGeneration = (key, display, creditsPerUnit, conditions = {}) => ({ key, display, conditions, billingUnit: "per_generation", creditsPerUnit });
18235
+ var KIE_CLI_AI_MODEL_DOCS = [
18236
+ videoDoc({
18237
+ id: "kling-2.6",
18238
+ name: "Kling 2.6",
18239
+ description: "Native-audio video generation with synchronized dialogue from text or image.",
18240
+ capabilities: ["text-to-video", "image-to-video"],
18241
+ variants: [
18242
+ perSecond("silent", "Sound off", 5.5, { sound: false }),
18243
+ perSecond("sound", "Sound on", 11, { sound: true })
18244
+ ],
18245
+ durations: ["5", "10"],
18246
+ sizes: ["16:9", "9:16", "1:1"],
18247
+ acceptsImage: true,
18248
+ sound: true
18249
+ }),
18250
+ videoDoc({
18251
+ id: "kling-2.6-motion-control",
18252
+ name: "Kling 2.6 Motion Control",
18253
+ description: "Reference-motion transfer with character consistency and controllable output resolution.",
18254
+ capabilities: ["image-to-video", "motion-control"],
18255
+ variants: [
18256
+ perSecond("720p", "720p", 5.5, { resolution: "720p" }),
18257
+ perSecond("1080p", "1080p", 9, { resolution: "1080p" })
18258
+ ],
18259
+ durations: ["3", "4", "5", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15", "20", "25", "30"],
18260
+ resolutions: ["720p", "1080p"],
18261
+ requiresImage: true,
18262
+ requiresVideo: true
18263
+ }),
18264
+ videoDoc({
18265
+ id: "kling-2.5-turbo-pro",
18266
+ name: "Kling 2.5",
18267
+ description: "Kling 2.5 Turbo Pro text/image-to-video through KIE.",
18268
+ capabilities: ["text-to-video", "image-to-video"],
18269
+ variants: [perSecond("default", "Per second", 4.2)],
18270
+ durations: ["5", "10"],
18271
+ sizes: ["16:9", "9:16", "1:1"],
18272
+ acceptsImage: true
18273
+ }),
18274
+ videoDoc({
18275
+ id: "kling-2.1-master",
18276
+ name: "Kling 2.1 Master",
18277
+ description: "Kling 2.1 Master text/image-to-video through KIE.",
18278
+ capabilities: ["text-to-video", "image-to-video"],
18279
+ variants: [perSecond("default", "Per second", 16)],
18280
+ durations: ["5", "10"],
18281
+ sizes: ["16:9", "9:16", "1:1"],
18282
+ acceptsImage: true
18283
+ }),
18284
+ videoDoc({
18285
+ id: "kling-2.1-pro",
18286
+ name: "Kling 2.1 Pro",
18287
+ description: "Kling 2.1 Pro image-to-video through KIE.",
18288
+ capabilities: ["image-to-video"],
18289
+ variants: [perSecond("default", "Per second", 5)],
18290
+ durations: ["5", "10"],
18291
+ requiresImage: true
18292
+ }),
18293
+ videoDoc({
18294
+ id: "kling-2.1-standard",
18295
+ name: "Kling 2.1 Standard",
18296
+ description: "Kling 2.1 Standard image-to-video through KIE.",
18297
+ capabilities: ["image-to-video"],
18298
+ variants: [perSecond("default", "Per second", 2.5)],
18299
+ durations: ["5", "10"],
18300
+ requiresImage: true
18301
+ }),
18302
+ videoDoc({
18303
+ id: "wan-2.2-a14b-turbo",
18304
+ name: "Wan 2.2",
18305
+ description: "Wan 2.2 A14B Turbo text/image-to-video through KIE.",
18306
+ capabilities: ["text-to-video", "image-to-video"],
18307
+ variants: [
18308
+ perGeneration("480p", "480p / 5 seconds", 20, { resolution: "480p" }),
18309
+ perGeneration("720p", "720p / 5 seconds", 40, { resolution: "720p" })
18310
+ ],
18311
+ durations: ["5"],
18312
+ sizes: ["16:9", "9:16", "1:1"],
18313
+ resolutions: ["480p", "720p"],
18314
+ acceptsImage: true
18315
+ }),
18316
+ videoDoc({
18317
+ id: "wan-2.5",
18318
+ name: "Wan 2.5",
18319
+ description: "Cinematic text and image video generation with synchronized dialogue, ambience, and music.",
18320
+ capabilities: ["text-to-video", "image-to-video"],
18321
+ variants: [
18322
+ perSecond("720p", "720p", 6, { resolution: "720p" }),
18323
+ perSecond("1080p", "1080p", 10, { resolution: "1080p" })
18324
+ ],
18325
+ durations: ["5", "10"],
18326
+ sizes: ["16:9", "9:16", "1:1"],
18327
+ resolutions: ["720p", "1080p"],
18328
+ acceptsImage: true
18329
+ }),
18330
+ videoDoc({
18331
+ id: "wan-2.6",
18332
+ name: "Wan 2.6",
18333
+ description: "Multi-shot HD video generation with stable characters and synchronized native audio.",
18334
+ capabilities: ["text-to-video", "image-to-video"],
18335
+ variants: [
18336
+ perGeneration("720p-5", "720p / 5 seconds", 35, { resolution: "720p", duration: "5" }),
18337
+ perGeneration("720p-10", "720p / 10 seconds", 70, { resolution: "720p", duration: "10" }),
18338
+ perGeneration("720p-15", "720p / 15 seconds", 105, { resolution: "720p", duration: "15" }),
18339
+ perGeneration("1080p-5", "1080p / 5 seconds", 52.25, { resolution: "1080p", duration: "5" }),
18340
+ perGeneration("1080p-10", "1080p / 10 seconds", 104.75, { resolution: "1080p", duration: "10" }),
18341
+ perGeneration("1080p-15", "1080p / 15 seconds", 157.5, { resolution: "1080p", duration: "15" })
18342
+ ],
18343
+ durations: ["5", "10", "15"],
18344
+ resolutions: ["720p", "1080p"],
18345
+ acceptsImage: true
18346
+ }),
18347
+ videoDoc({
18348
+ id: "wan-2.7",
18349
+ name: "Wan 2.7",
18350
+ description: "Controllable cinematic video generation with first and last frame guidance.",
18351
+ capabilities: ["text-to-video", "image-to-video"],
18352
+ variants: [
18353
+ perSecond("720p", "720p", 8, { resolution: "720p" }),
18354
+ perSecond("1080p", "1080p", 12, { resolution: "1080p" })
18355
+ ],
18356
+ durations: ["5", "2", "3", "4", "6", "7", "8", "9", "10", "11", "12", "13", "14", "15"],
18357
+ sizes: ["16:9", "9:16", "1:1", "4:3", "3:4"],
18358
+ resolutions: ["720p", "1080p"],
18359
+ acceptsImage: true,
18360
+ maxReferenceImages: 2,
18361
+ notes: ["Aspect ratio applies to text-to-video. Image-to-video inherits framing from the reference images."]
18362
+ }),
18363
+ imageDoc({
18364
+ id: "seedream-4.5",
18365
+ name: "Seedream 4.5",
18366
+ description: "Precise 4K image generation and consistent multi-image editing.",
18367
+ capabilities: ["text-to-image", "image-to-image"],
18368
+ variants: [perGeneration("default", "Per image", 3.25)],
18369
+ sizes: ["1:1", "4:3", "3:4", "16:9", "9:16", "2:3", "3:2", "21:9"],
18370
+ resolutions: ["2K", "4K"],
18371
+ acceptsImage: true
18372
+ }),
18373
+ imageDoc({
18374
+ id: "nano-banana",
18375
+ name: "Nano Banana",
18376
+ description: "Fast, cost-efficient image generation powered by Gemini 2.5 Flash Image.",
18377
+ capabilities: ["text-to-image"],
18378
+ variants: [perGeneration("default", "Per image", 2)],
18379
+ sizes: ["1:1", "9:16", "16:9", "4:3", "3:4", "3:2", "2:3", "5:4", "4:5", "21:9", "auto"],
18380
+ outputFormats: ["png", "jpg"]
18381
+ }),
18382
+ imageDoc({
18383
+ id: "seedream-4.0",
18384
+ name: "Seedream 4.0",
18385
+ description: "Seedream 4.0 image generation/editing through KIE.",
18386
+ capabilities: ["text-to-image", "image-to-image"],
18387
+ variants: [perGeneration("default", "Per image", 2.5)],
18388
+ sizes: ["1:1", "4:3", "3:4", "3:2", "2:3", "16:9", "9:16", "21:9"],
18389
+ resolutions: ["1K", "2K", "4K"],
18390
+ acceptsImage: true
18391
+ }),
18392
+ imageDoc({
18393
+ id: "flux-kontext",
18394
+ name: "Flux.1 Kontext",
18395
+ description: "Flux.1 Kontext image generation/editing through KIE.",
18396
+ capabilities: ["text-to-image", "image-to-image"],
18397
+ variants: [perGeneration("pro", "Pro", 2.5, { mode: "pro" }), perGeneration("max", "Max", 5, { mode: "max" })],
18398
+ sizes: ["16:9", "9:16", "1:1", "4:3", "3:4", "21:9"],
18399
+ modes: ["pro", "max"],
18400
+ outputFormats: ["png", "jpg"],
18401
+ acceptsImage: true
18402
+ }),
18403
+ imageDoc({
18404
+ id: "qwen-image-edit",
18405
+ name: "Qwen Image Edit",
18406
+ description: "Precise semantic, appearance, and bilingual text editing while preserving visual coherence.",
18407
+ capabilities: ["image-to-image"],
18408
+ variants: [
18409
+ perGeneration("1:1", "1:1", 0.5, { size: "1:1" }),
18410
+ perGeneration("1:1-hd", "1:1 HD", 1.75, { size: "1:1 HD" }),
18411
+ perGeneration("3:4", "3:4", 1.25, { size: "3:4" }),
18412
+ perGeneration("9:16", "9:16", 1, { size: "9:16" }),
18413
+ perGeneration("4:3", "4:3", 1.25, { size: "4:3" }),
18414
+ perGeneration("16:9", "16:9", 1, { size: "16:9" })
18415
+ ],
18416
+ sizes: ["1:1", "1:1 HD", "3:4", "9:16", "4:3", "16:9"],
18417
+ outputFormats: ["png", "jpg"],
18418
+ requiresImage: true
18419
+ }),
18420
+ imageDoc({
18421
+ id: "z-image",
18422
+ name: "Z-Image",
18423
+ description: "Fast photorealistic image generation with strong bilingual text rendering.",
18424
+ capabilities: ["text-to-image"],
18425
+ variants: [perGeneration("default", "Per image", 0.4)],
18426
+ sizes: ["1:1", "4:3", "3:4", "16:9", "9:16"]
18427
+ })
18428
+ ];
18429
+
18086
18430
  // src/ai/model-docs.ts
18087
18431
  var cliAiModelDocs = [
18432
+ ...KIE_CLI_AI_MODEL_DOCS,
18088
18433
  {
18089
18434
  "id": "ai-influencer-image",
18090
18435
  "name": "AI Influencer",
@@ -19135,11 +19480,141 @@ var cliAiModelDocs = [
19135
19480
  "image_to_video requires exactly 1 referenceImage and does not send aspect ratio; size applies to text_to_video and reference_to_video."
19136
19481
  ]
19137
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
+ },
19138
19613
  {
19139
19614
  "id": "minimax-h3",
19140
19615
  "name": "MiniMax H3",
19141
19616
  "mediaType": "video",
19142
- "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.",
19143
19618
  "capabilities": [
19144
19619
  "text-to-video",
19145
19620
  "image-to-video"
@@ -20275,6 +20750,65 @@ var cliAiModelDocs = [
20275
20750
  "generationType=text_to_video rejects reference inputs; first_last_frames_to_video requires exactly 2 reference images; only reference_to_video accepts video or audio references."
20276
20751
  ]
20277
20752
  },
20753
+ {
20754
+ id: "bria-video-background-removal",
20755
+ name: "Bria Video Background Removal",
20756
+ mediaType: "video",
20757
+ description: "Remove a video background with Bria VRMBG 3.0 and replace it with a solid colour.",
20758
+ capabilities: ["video-to-video"],
20759
+ variants: [
20760
+ {
20761
+ key: "default",
20762
+ display: "Per second of source video",
20763
+ conditions: {},
20764
+ billingUnit: "per_second",
20765
+ creditsPerUnit: 0.42
20766
+ }
20767
+ ],
20768
+ fields: [
20769
+ {
20770
+ name: "referenceVideo",
20771
+ type: "string[]",
20772
+ description: "Exactly one public HTTP/HTTPS source video URL, up to 100 MiB.",
20773
+ required: true
20774
+ },
20775
+ {
20776
+ name: "mode",
20777
+ type: "string",
20778
+ description: "Solid replacement background colour.",
20779
+ values: ["Green", "Black", "White", "Gray", "Red", "Blue", "Yellow", "Cyan", "Magenta", "Orange"],
20780
+ defaultValue: "Green"
20781
+ },
20782
+ {
20783
+ name: "preserveAudio",
20784
+ type: "boolean",
20785
+ description: "Keep the source audio track in the output.",
20786
+ defaultValue: true
20787
+ },
20788
+ {
20789
+ name: "autoZoom",
20790
+ type: "boolean",
20791
+ description: "Crop the output to the tightest rectangle that contains the subject for the whole clip.",
20792
+ defaultValue: false
20793
+ }
20794
+ ],
20795
+ examples: [
20796
+ {
20797
+ label: "Remove a video background",
20798
+ inputs: {
20799
+ referenceVideo: ["https://example.com/source.mp4"],
20800
+ mode: "Green",
20801
+ preserveAudio: true,
20802
+ autoZoom: false
20803
+ }
20804
+ }
20805
+ ],
20806
+ notes: [
20807
+ "No prompt is required or accepted; provide exactly one referenceVideo URL.",
20808
+ "Every colour uses the same rate, billed from the measured source-video duration.",
20809
+ "The output is H.264 MP4 with a solid background; transparent output is not available through this model integration."
20810
+ ]
20811
+ },
20278
20812
  {
20279
20813
  "id": "veo3.1",
20280
20814
  "name": "Veo 3.1",
@@ -20716,7 +21250,13 @@ var cliAiModelDocs = [
20716
21250
  }
20717
21251
  ];
20718
21252
  function listCliAiModelDocs(mediaType) {
20719
- 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)];
20720
21260
  }
20721
21261
  function getCliAiModelDoc(modelId) {
20722
21262
  return cliAiModelDocs.find((model) => model.id === modelId);
@@ -21706,35 +22246,29 @@ var commandDefinitions = [
21706
22246
  },
21707
22247
  {
21708
22248
  path: ["media", "video"],
21709
- purpose: "Download the video file behind a social link.",
22249
+ purpose: "Resolve the original video and optional audio files behind a social link.",
21710
22250
  arguments: [{ name: "url", description: "Public post or video URL.", required: true }],
21711
22251
  options: [
21712
22252
  {
21713
22253
  name: "formatId",
21714
22254
  flag: "--format-id <id>",
21715
- description: "A format_id from `spira media info`. Omit for the best rung that plays everywhere. Every rung is delivered with audio.",
21716
- type: "string"
21717
- },
21718
- {
21719
- name: "output",
21720
- flag: "--output <path>",
21721
- 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.",
21722
22256
  type: "string"
21723
22257
  }
21724
22258
  ],
21725
22259
  http: {
21726
22260
  method: "POST",
21727
- path: "/api/tools/media/video",
22261
+ path: "/api/tools/media/video/urls",
21728
22262
  authRequired: true,
21729
22263
  body: [
21730
22264
  { name: "url", source: "argument", from: "url" },
21731
22265
  { name: "formatId", source: "option", from: "formatId" }
21732
22266
  ]
21733
22267
  },
21734
- resultType: "mediaAsset",
22268
+ resultType: "generic",
21735
22269
  examples: [
21736
22270
  "spira media video https://www.tiktok.com/@user/video/123",
21737
- "spira media video https://www.youtube.com/watch?v=dQw4w9WgXcQ --output ./downloads/",
22271
+ "spira media video https://www.youtube.com/watch?v=dQw4w9WgXcQ",
21738
22272
  "spira media video https://www.tiktok.com/@user/video/123 --format-id bytevc1_1080p_612574-0"
21739
22273
  ],
21740
22274
  relatedCommands: ["spira media info <url>", "spira media thumbnail <url>"]
@@ -23412,8 +23946,8 @@ function renderCommandIndex() {
23412
23946
  `;
23413
23947
  }
23414
23948
  async function packageVersion() {
23415
- if ("0.0.13".length > 0) {
23416
- return "0.0.13";
23949
+ if ("0.0.15".length > 0) {
23950
+ return "0.0.15";
23417
23951
  }
23418
23952
  try {
23419
23953
  const packageUrl = new URL("../package.json", import_meta.url);
@@ -23634,7 +24168,7 @@ ${url2}
23634
24168
  poll: () => executeHttpCommand({ command: statusCommand, args: { jobId }, options: {} })
23635
24169
  });
23636
24170
  }
23637
- if (commandKey(definition.path) === "media video" || commandKey(definition.path) === "media thumbnail") {
24171
+ if (commandKey(definition.path) === "media thumbnail") {
23638
24172
  const downloaded = await executeHttpCommand({ command: definition, args, options });
23639
24173
  if (typeof options.output !== "string" || options.output.length === 0) return downloaded;
23640
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.13",
3
+ "version": "0.0.15",
4
4
  "description": "Command line client for Spira.",
5
5
  "type": "module",
6
6
  "bin": {