@spira-lab/cli 0.0.13 → 0.0.14

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 +406 -2
  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",
@@ -20275,6 +20620,65 @@ var cliAiModelDocs = [
20275
20620
  "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
20621
  ]
20277
20622
  },
20623
+ {
20624
+ id: "bria-video-background-removal",
20625
+ name: "Bria Video Background Removal",
20626
+ mediaType: "video",
20627
+ description: "Remove a video background with Bria VRMBG 3.0 and replace it with a solid colour.",
20628
+ capabilities: ["video-to-video"],
20629
+ variants: [
20630
+ {
20631
+ key: "default",
20632
+ display: "Per second of source video",
20633
+ conditions: {},
20634
+ billingUnit: "per_second",
20635
+ creditsPerUnit: 0.42
20636
+ }
20637
+ ],
20638
+ fields: [
20639
+ {
20640
+ name: "referenceVideo",
20641
+ type: "string[]",
20642
+ description: "Exactly one public HTTP/HTTPS source video URL, up to 100 MiB.",
20643
+ required: true
20644
+ },
20645
+ {
20646
+ name: "mode",
20647
+ type: "string",
20648
+ description: "Solid replacement background colour.",
20649
+ values: ["Green", "Black", "White", "Gray", "Red", "Blue", "Yellow", "Cyan", "Magenta", "Orange"],
20650
+ defaultValue: "Green"
20651
+ },
20652
+ {
20653
+ name: "preserveAudio",
20654
+ type: "boolean",
20655
+ description: "Keep the source audio track in the output.",
20656
+ defaultValue: true
20657
+ },
20658
+ {
20659
+ name: "autoZoom",
20660
+ type: "boolean",
20661
+ description: "Crop the output to the tightest rectangle that contains the subject for the whole clip.",
20662
+ defaultValue: false
20663
+ }
20664
+ ],
20665
+ examples: [
20666
+ {
20667
+ label: "Remove a video background",
20668
+ inputs: {
20669
+ referenceVideo: ["https://example.com/source.mp4"],
20670
+ mode: "Green",
20671
+ preserveAudio: true,
20672
+ autoZoom: false
20673
+ }
20674
+ }
20675
+ ],
20676
+ notes: [
20677
+ "No prompt is required or accepted; provide exactly one referenceVideo URL.",
20678
+ "Every colour uses the same rate, billed from the measured source-video duration.",
20679
+ "The output is H.264 MP4 with a solid background; transparent output is not available through this model integration."
20680
+ ]
20681
+ },
20278
20682
  {
20279
20683
  "id": "veo3.1",
20280
20684
  "name": "Veo 3.1",
@@ -23412,8 +23816,8 @@ function renderCommandIndex() {
23412
23816
  `;
23413
23817
  }
23414
23818
  async function packageVersion() {
23415
- if ("0.0.13".length > 0) {
23416
- return "0.0.13";
23819
+ if ("0.0.14".length > 0) {
23820
+ return "0.0.14";
23417
23821
  }
23418
23822
  try {
23419
23823
  const packageUrl = new URL("../package.json", import_meta.url);
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.14",
4
4
  "description": "Command line client for Spira.",
5
5
  "type": "module",
6
6
  "bin": {