@runwayml/sdk 4.22.0 → 4.24.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.
Files changed (102) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/client.d.mts +6 -0
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -0
  5. package/client.d.ts.map +1 -1
  6. package/client.js +6 -0
  7. package/client.js.map +1 -1
  8. package/client.mjs +6 -0
  9. package/client.mjs.map +1 -1
  10. package/package.json +1 -1
  11. package/resources/avatar-conversations.d.mts +1 -1
  12. package/resources/avatar-conversations.d.ts +1 -1
  13. package/resources/avatar-conversations.js +1 -1
  14. package/resources/avatar-conversations.mjs +1 -1
  15. package/resources/generate/image.d.mts +6 -4
  16. package/resources/generate/image.d.mts.map +1 -1
  17. package/resources/generate/image.d.ts +6 -4
  18. package/resources/generate/image.d.ts.map +1 -1
  19. package/resources/image-to-video.d.mts +683 -73
  20. package/resources/image-to-video.d.mts.map +1 -1
  21. package/resources/image-to-video.d.ts +683 -73
  22. package/resources/image-to-video.d.ts.map +1 -1
  23. package/resources/index.d.mts +1 -0
  24. package/resources/index.d.mts.map +1 -1
  25. package/resources/index.d.ts +1 -0
  26. package/resources/index.d.ts.map +1 -1
  27. package/resources/index.js +3 -1
  28. package/resources/index.js.map +1 -1
  29. package/resources/index.mjs +1 -0
  30. package/resources/index.mjs.map +1 -1
  31. package/resources/organization/organization.d.mts +2 -2
  32. package/resources/organization/organization.d.mts.map +1 -1
  33. package/resources/organization/organization.d.ts +2 -2
  34. package/resources/organization/organization.d.ts.map +1 -1
  35. package/resources/organization/organization.js.map +1 -1
  36. package/resources/organization/organization.mjs.map +1 -1
  37. package/resources/organization/webapp/audit-logs.d.mts +105 -80
  38. package/resources/organization/webapp/audit-logs.d.mts.map +1 -1
  39. package/resources/organization/webapp/audit-logs.d.ts +105 -80
  40. package/resources/organization/webapp/audit-logs.d.ts.map +1 -1
  41. package/resources/organization/webapp/webapp.d.mts +6 -4
  42. package/resources/organization/webapp/webapp.d.mts.map +1 -1
  43. package/resources/organization/webapp/webapp.d.ts +6 -4
  44. package/resources/organization/webapp/webapp.d.ts.map +1 -1
  45. package/resources/organization/webapp/webapp.js.map +1 -1
  46. package/resources/organization/webapp/webapp.mjs.map +1 -1
  47. package/resources/routers.d.mts +14 -10
  48. package/resources/routers.d.mts.map +1 -1
  49. package/resources/routers.d.ts +14 -10
  50. package/resources/routers.d.ts.map +1 -1
  51. package/resources/sound-effect.d.mts +28 -1
  52. package/resources/sound-effect.d.mts.map +1 -1
  53. package/resources/sound-effect.d.ts +28 -1
  54. package/resources/sound-effect.d.ts.map +1 -1
  55. package/resources/tasks.d.mts +7 -0
  56. package/resources/tasks.d.mts.map +1 -1
  57. package/resources/tasks.d.ts +7 -0
  58. package/resources/tasks.d.ts.map +1 -1
  59. package/resources/tasks.js +7 -0
  60. package/resources/tasks.js.map +1 -1
  61. package/resources/tasks.mjs +7 -0
  62. package/resources/tasks.mjs.map +1 -1
  63. package/resources/text-to-image.d.mts +238 -1
  64. package/resources/text-to-image.d.mts.map +1 -1
  65. package/resources/text-to-image.d.ts +238 -1
  66. package/resources/text-to-image.d.ts.map +1 -1
  67. package/resources/text-to-video.d.mts +492 -81
  68. package/resources/text-to-video.d.mts.map +1 -1
  69. package/resources/text-to-video.d.ts +492 -81
  70. package/resources/text-to-video.d.ts.map +1 -1
  71. package/resources/video-to-audio.d.mts +84 -0
  72. package/resources/video-to-audio.d.mts.map +1 -0
  73. package/resources/video-to-audio.d.ts +84 -0
  74. package/resources/video-to-audio.d.ts.map +1 -0
  75. package/resources/video-to-audio.js +29 -0
  76. package/resources/video-to-audio.js.map +1 -0
  77. package/resources/video-to-audio.mjs +25 -0
  78. package/resources/video-to-audio.mjs.map +1 -0
  79. package/resources/video-to-video.d.mts +277 -20
  80. package/resources/video-to-video.d.mts.map +1 -1
  81. package/resources/video-to-video.d.ts +277 -20
  82. package/resources/video-to-video.d.ts.map +1 -1
  83. package/src/client.ts +16 -0
  84. package/src/resources/avatar-conversations.ts +1 -1
  85. package/src/resources/generate/image.ts +6 -4
  86. package/src/resources/image-to-video.ts +836 -111
  87. package/src/resources/index.ts +5 -0
  88. package/src/resources/organization/organization.ts +20 -0
  89. package/src/resources/organization/webapp/audit-logs.ts +142 -78
  90. package/src/resources/organization/webapp/webapp.ts +6 -4
  91. package/src/resources/routers.ts +14 -10
  92. package/src/resources/sound-effect.ts +35 -0
  93. package/src/resources/tasks.ts +7 -0
  94. package/src/resources/text-to-image.ts +406 -0
  95. package/src/resources/text-to-video.ts +621 -114
  96. package/src/resources/video-to-audio.ts +109 -0
  97. package/src/resources/video-to-video.ts +335 -30
  98. package/src/version.ts +1 -1
  99. package/version.d.mts +1 -1
  100. package/version.d.ts +1 -1
  101. package/version.js +1 -1
  102. package/version.mjs +1 -1
@@ -42,7 +42,7 @@ export declare namespace ImageToVideoCreateResponse {
42
42
  credits: number;
43
43
  }
44
44
  }
45
- export type ImageToVideoCreateParams = ImageToVideoCreateParams.Gen4_5 | ImageToVideoCreateParams.Gen4Turbo | ImageToVideoCreateParams.Veo3_1 | ImageToVideoCreateParams.Veo3_1Fast | ImageToVideoCreateParams.Hailuo3 | ImageToVideoCreateParams.Happyhorse1_0 | ImageToVideoCreateParams.Seedance2 | ImageToVideoCreateParams.Seedance2Fast | ImageToVideoCreateParams.Seedance2Mini | ImageToVideoCreateParams.GeminiOmniFlash | ImageToVideoCreateParams.Seedance2_5 | ImageToVideoCreateParams.GrokImagine1_5 | ImageToVideoCreateParams.Wan3 | ImageToVideoCreateParams.GeminiOmniFlash1_1 | ImageToVideoCreateParams.Wan3Prime | ImageToVideoCreateParams.H3Max | ImageToVideoCreateParams.GrokImagine1_5Lite;
45
+ export type ImageToVideoCreateParams = ImageToVideoCreateParams.Gen4_5 | ImageToVideoCreateParams.Gen4Turbo | ImageToVideoCreateParams.Veo3_1 | ImageToVideoCreateParams.Veo3_1Fast | ImageToVideoCreateParams.KlingO3_4k | ImageToVideoCreateParams.Hailuo3 | ImageToVideoCreateParams.Kling3_0_4k | ImageToVideoCreateParams.Happyhorse1_0 | ImageToVideoCreateParams.Kling2_5TurboPro | ImageToVideoCreateParams.Kling3_0Pro | ImageToVideoCreateParams.Kling3_0Standard | ImageToVideoCreateParams.KlingO3Pro | ImageToVideoCreateParams.KlingO3Standard | ImageToVideoCreateParams.Seedance2 | ImageToVideoCreateParams.Seedance2Fast | ImageToVideoCreateParams.Seedance2Mini | ImageToVideoCreateParams.GeminiOmniFlash | ImageToVideoCreateParams.GrokImagine1_5 | ImageToVideoCreateParams.Wan3 | ImageToVideoCreateParams.GeminiOmniFlash1_1 | ImageToVideoCreateParams.Wan3Prime | ImageToVideoCreateParams.H3Max | ImageToVideoCreateParams.Seedance2_5 | ImageToVideoCreateParams.GrokImagine1_5Lite | ImageToVideoCreateParams.Kling4;
46
46
  export declare namespace ImageToVideoCreateParams {
47
47
  interface Gen4_5 {
48
48
  /**
@@ -298,6 +298,99 @@ export declare namespace ImageToVideoCreateParams {
298
298
  uri: string;
299
299
  }
300
300
  }
301
+ interface KlingO3_4k {
302
+ model: 'klingO3_4k';
303
+ /**
304
+ * You may specify an image to use as the first frame of the output video, or an
305
+ * array with a first frame and optionally a last frame. When both keyframes are
306
+ * provided, output aspect ratio follows the first frame. See
307
+ * [image inputs](/assets/inputs#images) for file size limits.
308
+ */
309
+ promptImage: string | Array<KlingO3_4k.PromptImage>;
310
+ /**
311
+ * Whether to generate audio for the video.
312
+ */
313
+ audio?: boolean;
314
+ /**
315
+ * The number of seconds of duration for the output video.
316
+ */
317
+ duration?: number;
318
+ /**
319
+ * A text prompt describing what should appear in the output video.
320
+ */
321
+ promptText?: string;
322
+ /**
323
+ * Provider-specific settings for multishot video generation.
324
+ */
325
+ providerSettings?: KlingO3_4k.ProviderSettings;
326
+ /**
327
+ * The resolution of the output video.
328
+ */
329
+ ratio?: '3840:2160' | '2160:3840' | '2880:2880';
330
+ /**
331
+ * An optional array of reference images (up to 7). See
332
+ * [our docs](/assets/inputs#images) on image inputs for more information.
333
+ */
334
+ references?: string | Array<KlingO3_4k.ReferenceImage>;
335
+ }
336
+ namespace KlingO3_4k {
337
+ interface PromptImage {
338
+ /**
339
+ * The position of the image in the output video. "first" will use the image as the
340
+ * first frame of the video, "last" will use the image as the last frame of the
341
+ * video.
342
+ */
343
+ position: 'first' | 'last';
344
+ /**
345
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
346
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
347
+ * [our docs](/assets/inputs#images) on image inputs for more information.
348
+ */
349
+ uri: string;
350
+ }
351
+ /**
352
+ * Provider-specific settings for multishot video generation.
353
+ */
354
+ interface ProviderSettings {
355
+ /**
356
+ * An array of prompt segments for multishot video generation. Each segment has its
357
+ * own prompt and duration. Total duration across all segments must be between 3
358
+ * and 15 seconds. `promptText` is still required when `shotType` is
359
+ * `"intelligence"`.
360
+ */
361
+ multiPrompt?: Array<ProviderSettings.MultiPrompt>;
362
+ /**
363
+ * Shot transition type for multishot videos. Defaults to "customize" when
364
+ * multiPrompt is provided.
365
+ */
366
+ shotType?: 'intelligence' | 'customize';
367
+ }
368
+ namespace ProviderSettings {
369
+ interface MultiPrompt {
370
+ /**
371
+ * Duration in seconds for this segment.
372
+ */
373
+ duration: number;
374
+ /**
375
+ * The text prompt for this segment.
376
+ */
377
+ prompt: string;
378
+ }
379
+ }
380
+ interface ReferenceImage {
381
+ /**
382
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
383
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
384
+ * [our docs](/assets/inputs#images) on image inputs for more information.
385
+ */
386
+ uri: string;
387
+ /**
388
+ * The position of the image in the output video. "first" will use the image as the
389
+ * first frame, "last" as the last frame. Omit for a reference image.
390
+ */
391
+ position?: 'first' | 'last';
392
+ }
393
+ }
301
394
  interface Hailuo3 {
302
395
  model: 'hailuo3';
303
396
  /**
@@ -346,6 +439,86 @@ export declare namespace ImageToVideoCreateParams {
346
439
  uri: string;
347
440
  }
348
441
  }
442
+ interface Kling3_0_4k {
443
+ model: 'kling3.0_4k';
444
+ /**
445
+ * You may specify an image to use as the first frame of the output video, or an
446
+ * array with a first frame and optionally a last frame. When both keyframes are
447
+ * provided, output aspect ratio follows the first frame. See
448
+ * [image inputs](/assets/inputs#images) for file size limits.
449
+ */
450
+ promptImage: string | Array<Kling3_0_4k.PromptImage>;
451
+ /**
452
+ * Whether to generate audio for the video.
453
+ */
454
+ audio?: boolean;
455
+ /**
456
+ * Creativity/freedom scale for generation. 0 gives the model maximum creative
457
+ * freedom, 1 makes it follow the prompt most strictly. Defaults to 0.5.
458
+ */
459
+ cfgScale?: number;
460
+ /**
461
+ * The number of seconds of duration for the output video.
462
+ */
463
+ duration?: number;
464
+ /**
465
+ * A text prompt describing what should appear in the output video.
466
+ */
467
+ promptText?: string;
468
+ /**
469
+ * Provider-specific settings for multishot video generation.
470
+ */
471
+ providerSettings?: Kling3_0_4k.ProviderSettings;
472
+ /**
473
+ * The resolution of the output video.
474
+ */
475
+ ratio?: '3840:2160' | '2160:3840' | '2880:2880';
476
+ }
477
+ namespace Kling3_0_4k {
478
+ interface PromptImage {
479
+ /**
480
+ * The position of the image in the output video. "first" will use the image as the
481
+ * first frame of the video, "last" will use the image as the last frame of the
482
+ * video.
483
+ */
484
+ position: 'first' | 'last';
485
+ /**
486
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
487
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
488
+ * [our docs](/assets/inputs#images) on image inputs for more information.
489
+ */
490
+ uri: string;
491
+ }
492
+ /**
493
+ * Provider-specific settings for multishot video generation.
494
+ */
495
+ interface ProviderSettings {
496
+ /**
497
+ * An array of prompt segments for multishot video generation. Each segment has its
498
+ * own prompt and duration. Total duration across all segments must be between 3
499
+ * and 15 seconds. `promptText` is still required when `shotType` is
500
+ * `"intelligence"`.
501
+ */
502
+ multiPrompt?: Array<ProviderSettings.MultiPrompt>;
503
+ /**
504
+ * Shot transition type for multishot videos. Defaults to "customize" when
505
+ * multiPrompt is provided.
506
+ */
507
+ shotType?: 'intelligence' | 'customize';
508
+ }
509
+ namespace ProviderSettings {
510
+ interface MultiPrompt {
511
+ /**
512
+ * Duration in seconds for this segment.
513
+ */
514
+ duration: number;
515
+ /**
516
+ * The text prompt for this segment.
517
+ */
518
+ prompt: string;
519
+ }
520
+ }
521
+ }
349
522
  interface Happyhorse1_0 {
350
523
  model: 'happyhorse_1_0';
351
524
  /**
@@ -386,6 +559,391 @@ export declare namespace ImageToVideoCreateParams {
386
559
  uri: string;
387
560
  }
388
561
  }
562
+ interface Kling2_5TurboPro {
563
+ model: 'kling2.5_turbo_pro';
564
+ /**
565
+ * Image for the first frame of the output video, or an array with first and
566
+ * optionally last frames. Output aspect ratio follows the input image; `ratio` is
567
+ * not supported on image-to-video. See [image inputs](/assets/inputs#images) for
568
+ * file size limits.
569
+ */
570
+ promptImage: string | Array<Kling2_5TurboPro.PromptImage>;
571
+ /**
572
+ * A text prompt describing what should appear in the output video.
573
+ */
574
+ promptText: string;
575
+ /**
576
+ * Creativity/freedom scale for generation. 0 gives the model maximum creative
577
+ * freedom, 1 makes it follow the prompt most strictly. Defaults to 0.5.
578
+ */
579
+ cfgScale?: number;
580
+ /**
581
+ * The duration of the output video in seconds. Defaults to 5.
582
+ */
583
+ duration?: 5 | 10;
584
+ }
585
+ namespace Kling2_5TurboPro {
586
+ interface PromptImage {
587
+ /**
588
+ * The position of the image in the output video. "first" will use the image as the
589
+ * first frame of the video, "last" will use the image as the last frame of the
590
+ * video.
591
+ */
592
+ position: 'first' | 'last';
593
+ /**
594
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
595
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
596
+ * [our docs](/assets/inputs#images) on image inputs for more information.
597
+ */
598
+ uri: string;
599
+ }
600
+ }
601
+ interface Kling3_0Pro {
602
+ model: 'kling3.0_pro';
603
+ /**
604
+ * You may specify an image to use as the first frame of the output video, or an
605
+ * array with a first frame and optionally a last frame. When both keyframes are
606
+ * provided, output aspect ratio follows the first frame. See
607
+ * [image inputs](/assets/inputs#images) for file size limits.
608
+ */
609
+ promptImage: string | Array<Kling3_0Pro.PromptImage>;
610
+ /**
611
+ * Whether to generate audio for the video.
612
+ */
613
+ audio?: boolean;
614
+ /**
615
+ * Creativity/freedom scale for generation. 0 gives the model maximum creative
616
+ * freedom, 1 makes it follow the prompt most strictly. Defaults to 0.5.
617
+ */
618
+ cfgScale?: number;
619
+ /**
620
+ * The number of seconds of duration for the output video.
621
+ */
622
+ duration?: number;
623
+ /**
624
+ * A text prompt describing what should appear in the output video.
625
+ */
626
+ promptText?: string;
627
+ /**
628
+ * Provider-specific settings for multishot video generation.
629
+ */
630
+ providerSettings?: Kling3_0Pro.ProviderSettings;
631
+ /**
632
+ * The resolution of the output video.
633
+ */
634
+ ratio?: '1920:1080' | '1080:1920' | '1440:1440';
635
+ }
636
+ namespace Kling3_0Pro {
637
+ interface PromptImage {
638
+ /**
639
+ * The position of the image in the output video. "first" will use the image as the
640
+ * first frame of the video, "last" will use the image as the last frame of the
641
+ * video.
642
+ */
643
+ position: 'first' | 'last';
644
+ /**
645
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
646
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
647
+ * [our docs](/assets/inputs#images) on image inputs for more information.
648
+ */
649
+ uri: string;
650
+ }
651
+ /**
652
+ * Provider-specific settings for multishot video generation.
653
+ */
654
+ interface ProviderSettings {
655
+ /**
656
+ * An array of prompt segments for multishot video generation. Each segment has its
657
+ * own prompt and duration. Total duration across all segments must be between 3
658
+ * and 15 seconds. `promptText` is still required when `shotType` is
659
+ * `"intelligence"`.
660
+ */
661
+ multiPrompt?: Array<ProviderSettings.MultiPrompt>;
662
+ /**
663
+ * Shot transition type for multishot videos. Defaults to "customize" when
664
+ * multiPrompt is provided.
665
+ */
666
+ shotType?: 'intelligence' | 'customize';
667
+ }
668
+ namespace ProviderSettings {
669
+ interface MultiPrompt {
670
+ /**
671
+ * Duration in seconds for this segment.
672
+ */
673
+ duration: number;
674
+ /**
675
+ * The text prompt for this segment.
676
+ */
677
+ prompt: string;
678
+ }
679
+ }
680
+ }
681
+ interface Kling3_0Standard {
682
+ model: 'kling3.0_standard';
683
+ /**
684
+ * You may specify an image to use as the first frame of the output video, or an
685
+ * array with a first frame and optionally a last frame. When both keyframes are
686
+ * provided, output aspect ratio follows the first frame. See
687
+ * [image inputs](/assets/inputs#images) for file size limits.
688
+ */
689
+ promptImage: string | Array<Kling3_0Standard.PromptImage>;
690
+ /**
691
+ * Whether to generate audio for the video.
692
+ */
693
+ audio?: boolean;
694
+ /**
695
+ * Creativity/freedom scale for generation. 0 gives the model maximum creative
696
+ * freedom, 1 makes it follow the prompt most strictly. Defaults to 0.5.
697
+ */
698
+ cfgScale?: number;
699
+ /**
700
+ * The number of seconds of duration for the output video.
701
+ */
702
+ duration?: number;
703
+ /**
704
+ * A text prompt describing what should appear in the output video.
705
+ */
706
+ promptText?: string;
707
+ /**
708
+ * Provider-specific settings for multishot video generation.
709
+ */
710
+ providerSettings?: Kling3_0Standard.ProviderSettings;
711
+ /**
712
+ * The resolution of the output video.
713
+ */
714
+ ratio?: '1280:720' | '720:1280' | '960:960';
715
+ }
716
+ namespace Kling3_0Standard {
717
+ interface PromptImage {
718
+ /**
719
+ * The position of the image in the output video. "first" will use the image as the
720
+ * first frame of the video, "last" will use the image as the last frame of the
721
+ * video.
722
+ */
723
+ position: 'first' | 'last';
724
+ /**
725
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
726
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
727
+ * [our docs](/assets/inputs#images) on image inputs for more information.
728
+ */
729
+ uri: string;
730
+ }
731
+ /**
732
+ * Provider-specific settings for multishot video generation.
733
+ */
734
+ interface ProviderSettings {
735
+ /**
736
+ * An array of prompt segments for multishot video generation. Each segment has its
737
+ * own prompt and duration. Total duration across all segments must be between 3
738
+ * and 15 seconds. `promptText` is still required when `shotType` is
739
+ * `"intelligence"`.
740
+ */
741
+ multiPrompt?: Array<ProviderSettings.MultiPrompt>;
742
+ /**
743
+ * Shot transition type for multishot videos. Defaults to "customize" when
744
+ * multiPrompt is provided.
745
+ */
746
+ shotType?: 'intelligence' | 'customize';
747
+ }
748
+ namespace ProviderSettings {
749
+ interface MultiPrompt {
750
+ /**
751
+ * Duration in seconds for this segment.
752
+ */
753
+ duration: number;
754
+ /**
755
+ * The text prompt for this segment.
756
+ */
757
+ prompt: string;
758
+ }
759
+ }
760
+ }
761
+ interface KlingO3Pro {
762
+ model: 'klingO3_pro';
763
+ /**
764
+ * You may specify an image to use as the first frame of the output video, or an
765
+ * array with a first frame and optionally a last frame. When both keyframes are
766
+ * provided, output aspect ratio follows the first frame. See
767
+ * [image inputs](/assets/inputs#images) for file size limits.
768
+ */
769
+ promptImage: string | Array<KlingO3Pro.PromptImage>;
770
+ /**
771
+ * Whether to generate audio for the video.
772
+ */
773
+ audio?: boolean;
774
+ /**
775
+ * The number of seconds of duration for the output video.
776
+ */
777
+ duration?: number;
778
+ /**
779
+ * A text prompt describing what should appear in the output video.
780
+ */
781
+ promptText?: string;
782
+ /**
783
+ * Provider-specific settings for multishot video generation.
784
+ */
785
+ providerSettings?: KlingO3Pro.ProviderSettings;
786
+ /**
787
+ * The resolution of the output video.
788
+ */
789
+ ratio?: '1920:1080' | '1080:1920' | '1440:1440';
790
+ /**
791
+ * An optional array of reference images (up to 7). See
792
+ * [our docs](/assets/inputs#images) on image inputs for more information.
793
+ */
794
+ references?: string | Array<KlingO3Pro.ReferenceImage>;
795
+ }
796
+ namespace KlingO3Pro {
797
+ interface PromptImage {
798
+ /**
799
+ * The position of the image in the output video. "first" will use the image as the
800
+ * first frame of the video, "last" will use the image as the last frame of the
801
+ * video.
802
+ */
803
+ position: 'first' | 'last';
804
+ /**
805
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
806
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
807
+ * [our docs](/assets/inputs#images) on image inputs for more information.
808
+ */
809
+ uri: string;
810
+ }
811
+ /**
812
+ * Provider-specific settings for multishot video generation.
813
+ */
814
+ interface ProviderSettings {
815
+ /**
816
+ * An array of prompt segments for multishot video generation. Each segment has its
817
+ * own prompt and duration. Total duration across all segments must be between 3
818
+ * and 15 seconds. `promptText` is still required when `shotType` is
819
+ * `"intelligence"`.
820
+ */
821
+ multiPrompt?: Array<ProviderSettings.MultiPrompt>;
822
+ /**
823
+ * Shot transition type for multishot videos. Defaults to "customize" when
824
+ * multiPrompt is provided.
825
+ */
826
+ shotType?: 'intelligence' | 'customize';
827
+ }
828
+ namespace ProviderSettings {
829
+ interface MultiPrompt {
830
+ /**
831
+ * Duration in seconds for this segment.
832
+ */
833
+ duration: number;
834
+ /**
835
+ * The text prompt for this segment.
836
+ */
837
+ prompt: string;
838
+ }
839
+ }
840
+ interface ReferenceImage {
841
+ /**
842
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
843
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
844
+ * [our docs](/assets/inputs#images) on image inputs for more information.
845
+ */
846
+ uri: string;
847
+ /**
848
+ * The position of the image in the output video. "first" will use the image as the
849
+ * first frame, "last" as the last frame. Omit for a reference image.
850
+ */
851
+ position?: 'first' | 'last';
852
+ }
853
+ }
854
+ interface KlingO3Standard {
855
+ model: 'klingO3_standard';
856
+ /**
857
+ * You may specify an image to use as the first frame of the output video, or an
858
+ * array with a first frame and optionally a last frame. When both keyframes are
859
+ * provided, output aspect ratio follows the first frame. See
860
+ * [image inputs](/assets/inputs#images) for file size limits.
861
+ */
862
+ promptImage: string | Array<KlingO3Standard.PromptImage>;
863
+ /**
864
+ * Whether to generate audio for the video.
865
+ */
866
+ audio?: boolean;
867
+ /**
868
+ * The number of seconds of duration for the output video.
869
+ */
870
+ duration?: number;
871
+ /**
872
+ * A text prompt describing what should appear in the output video.
873
+ */
874
+ promptText?: string;
875
+ /**
876
+ * Provider-specific settings for multishot video generation.
877
+ */
878
+ providerSettings?: KlingO3Standard.ProviderSettings;
879
+ /**
880
+ * The resolution of the output video.
881
+ */
882
+ ratio?: '1280:720' | '720:1280' | '960:960';
883
+ /**
884
+ * An optional array of reference images (up to 7). See
885
+ * [our docs](/assets/inputs#images) on image inputs for more information.
886
+ */
887
+ references?: string | Array<KlingO3Standard.ReferenceImage>;
888
+ }
889
+ namespace KlingO3Standard {
890
+ interface PromptImage {
891
+ /**
892
+ * The position of the image in the output video. "first" will use the image as the
893
+ * first frame of the video, "last" will use the image as the last frame of the
894
+ * video.
895
+ */
896
+ position: 'first' | 'last';
897
+ /**
898
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
899
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
900
+ * [our docs](/assets/inputs#images) on image inputs for more information.
901
+ */
902
+ uri: string;
903
+ }
904
+ /**
905
+ * Provider-specific settings for multishot video generation.
906
+ */
907
+ interface ProviderSettings {
908
+ /**
909
+ * An array of prompt segments for multishot video generation. Each segment has its
910
+ * own prompt and duration. Total duration across all segments must be between 3
911
+ * and 15 seconds. `promptText` is still required when `shotType` is
912
+ * `"intelligence"`.
913
+ */
914
+ multiPrompt?: Array<ProviderSettings.MultiPrompt>;
915
+ /**
916
+ * Shot transition type for multishot videos. Defaults to "customize" when
917
+ * multiPrompt is provided.
918
+ */
919
+ shotType?: 'intelligence' | 'customize';
920
+ }
921
+ namespace ProviderSettings {
922
+ interface MultiPrompt {
923
+ /**
924
+ * Duration in seconds for this segment.
925
+ */
926
+ duration: number;
927
+ /**
928
+ * The text prompt for this segment.
929
+ */
930
+ prompt: string;
931
+ }
932
+ }
933
+ interface ReferenceImage {
934
+ /**
935
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
936
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
937
+ * [our docs](/assets/inputs#images) on image inputs for more information.
938
+ */
939
+ uri: string;
940
+ /**
941
+ * The position of the image in the output video. "first" will use the image as the
942
+ * first frame, "last" as the last frame. Omit for a reference image.
943
+ */
944
+ position?: 'first' | 'last';
945
+ }
946
+ }
389
947
  interface Seedance2 {
390
948
  model: 'seedance2';
391
949
  /**
@@ -623,78 +1181,12 @@ export declare namespace ImageToVideoCreateParams {
623
1181
  uri: string;
624
1182
  }
625
1183
  }
626
- interface Seedance2_5 {
627
- model: 'seedance2_5';
628
- /**
629
- * An image or array of images. Use position `first`/`last` for keyframe mode, or
630
- * omit position for reference images. The two modes cannot be mixed.
631
- */
632
- promptImage: string | Array<Seedance2_5.PromptImage>;
633
- /**
634
- * Whether to generate audio for the video.
635
- */
636
- audio?: boolean;
637
- /**
638
- * Seconds of video to generate, or `auto` to let the model choose. `auto` is
639
- * billed at the variant maximum up front; unused credits are refunded after the
640
- * generation finishes.
641
- */
642
- duration?: number | 'auto';
643
- /**
644
- * An optional text prompt up to 15000 characters describing what should appear in
645
- * the output.
646
- */
647
- promptText?: string;
648
- /**
649
- * The resolution of the output video. Seedance 2.5 supports 480p, 720p, and 1080p.
650
- */
651
- ratio?: '992:432' | '854:480' | '752:560' | '640:640' | '560:752' | '480:854' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280' | '2206:946' | '1920:1080' | '1664:1248' | '1440:1440' | '1248:1664' | '1080:1920';
652
- /**
653
- * An optional array of audio references. The total combined duration must not
654
- * exceed 30 seconds.
655
- */
656
- referenceAudio?: Array<Seedance2_5.ReferenceAudio>;
657
- /**
658
- * If unspecified, a random number is chosen. Varying the seed integer is a way to
659
- * get different results for the same other request parameters. Using the same seed
660
- * integer for an identical request will produce similar results.
661
- */
662
- seed?: number;
663
- }
664
- namespace Seedance2_5 {
665
- interface PromptImage {
666
- /**
667
- * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
668
- * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
669
- * [our docs](/assets/inputs#images) on image inputs for more information.
670
- */
671
- uri: string;
672
- /**
673
- * The position of the image in the output video. "first" will use the image as the
674
- * first frame, "last" as the last frame. Omit for a reference image.
675
- */
676
- position?: 'first' | 'last';
677
- }
678
- /**
679
- * An audio reference allows the model to use the audio as additional context for
680
- * the output.
681
- */
682
- interface ReferenceAudio {
683
- type: 'audio';
684
- /**
685
- * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
686
- * `data:audio/mp3;base64,...`, up to 5MB) containing an encoded audio. See
687
- * [our docs](/assets/inputs#audio) on audio inputs for more information.
688
- */
689
- uri: string;
690
- }
691
- }
692
1184
  interface GrokImagine1_5 {
693
1185
  model: 'grok_imagine_1_5';
694
1186
  /**
695
- * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
696
- * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
697
- * [our docs](/assets/inputs#images) on image inputs for more information.
1187
+ * The start frame of the output video. The output keeps its aspect ratio, which
1188
+ * (width / height) must be between 0.4 and 2.5. See
1189
+ * [our docs](/assets/inputs#images) for image input requirements.
698
1190
  */
699
1191
  promptImage: string | Array<GrokImagine1_5.PromptImage>;
700
1192
  /**
@@ -942,12 +1434,90 @@ export declare namespace ImageToVideoCreateParams {
942
1434
  uri: string;
943
1435
  }
944
1436
  }
1437
+ interface Seedance2_5 {
1438
+ model: 'seedance2_5';
1439
+ /**
1440
+ * An image or array of images. Use position `first`/`last` for keyframe mode, or
1441
+ * omit position for reference images. The two modes cannot be mixed.
1442
+ */
1443
+ promptImage: string | Array<Seedance2_5.PromptImage>;
1444
+ /**
1445
+ * Whether to generate audio for the video.
1446
+ */
1447
+ audio?: boolean;
1448
+ /**
1449
+ * Generate a cheap 480p preview instead of a full-quality video. The returned task
1450
+ * ID can later be enhanced to a 1080p video with the same content by passing it as
1451
+ * `draftTaskId` to `text_to_video`. Drafts can be enhanced within 7 days of
1452
+ * creation. Defaults to false.
1453
+ */
1454
+ draft?: boolean;
1455
+ /**
1456
+ * Seconds of video to generate, or `auto` to let the model choose. `auto` is
1457
+ * billed at the variant maximum up front; unused credits are refunded after the
1458
+ * generation finishes.
1459
+ */
1460
+ duration?: number | 'auto';
1461
+ /**
1462
+ * Container for the output video. `mov` keeps high colour precision for grading
1463
+ * and compositing. Defaults to `mp4`. Draft mode only supports `mp4`.
1464
+ */
1465
+ outputFormat?: 'mp4' | 'mov';
1466
+ /**
1467
+ * An optional text prompt up to 15000 characters describing what should appear in
1468
+ * the output.
1469
+ */
1470
+ promptText?: string;
1471
+ /**
1472
+ * The resolution of the output video. Seedance 2.5 supports 480p, 720p, and 1080p.
1473
+ */
1474
+ ratio?: '992:432' | '854:480' | '752:560' | '640:640' | '560:752' | '480:854' | '1470:630' | '1280:720' | '1112:834' | '960:960' | '834:1112' | '720:1280' | '2206:946' | '1920:1080' | '1664:1248' | '1440:1440' | '1248:1664' | '1080:1920';
1475
+ /**
1476
+ * An optional array of audio references. The total combined duration must not
1477
+ * exceed 30 seconds.
1478
+ */
1479
+ referenceAudio?: Array<Seedance2_5.ReferenceAudio>;
1480
+ /**
1481
+ * If unspecified, a random number is chosen. Varying the seed integer is a way to
1482
+ * get different results for the same other request parameters. Using the same seed
1483
+ * integer for an identical request will produce similar results.
1484
+ */
1485
+ seed?: number;
1486
+ }
1487
+ namespace Seedance2_5 {
1488
+ interface PromptImage {
1489
+ /**
1490
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
1491
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
1492
+ * [our docs](/assets/inputs#images) on image inputs for more information.
1493
+ */
1494
+ uri: string;
1495
+ /**
1496
+ * The position of the image in the output video. "first" will use the image as the
1497
+ * first frame, "last" as the last frame. Omit for a reference image.
1498
+ */
1499
+ position?: 'first' | 'last';
1500
+ }
1501
+ /**
1502
+ * An audio reference allows the model to use the audio as additional context for
1503
+ * the output.
1504
+ */
1505
+ interface ReferenceAudio {
1506
+ type: 'audio';
1507
+ /**
1508
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
1509
+ * `data:audio/mp3;base64,...`, up to 5MB) containing an encoded audio. See
1510
+ * [our docs](/assets/inputs#audio) on audio inputs for more information.
1511
+ */
1512
+ uri: string;
1513
+ }
1514
+ }
945
1515
  interface GrokImagine1_5Lite {
946
1516
  model: 'grok_imagine_1_5_lite';
947
1517
  /**
948
- * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
949
- * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
950
- * [our docs](/assets/inputs#images) on image inputs for more information.
1518
+ * The start frame of the output video. The output keeps its aspect ratio, which
1519
+ * (width / height) must be between 0.4 and 2.5. See
1520
+ * [our docs](/assets/inputs#images) for image input requirements.
951
1521
  */
952
1522
  promptImage: string | Array<GrokImagine1_5Lite.PromptImage>;
953
1523
  /**
@@ -979,6 +1549,46 @@ export declare namespace ImageToVideoCreateParams {
979
1549
  uri: string;
980
1550
  }
981
1551
  }
1552
+ interface Kling4 {
1553
+ model: 'kling_4';
1554
+ /**
1555
+ * The first frame of the video, or an array with a first frame and optional middle
1556
+ * and last frames. The video follows the first frame’s aspect ratio.
1557
+ */
1558
+ promptImage: string | Array<unknown>;
1559
+ /**
1560
+ * The duration of the output video in seconds.
1561
+ */
1562
+ duration?: number;
1563
+ /**
1564
+ * A text prompt describing what should happen in the video.
1565
+ */
1566
+ promptText?: string;
1567
+ /**
1568
+ * Output quality tier. The video keeps the input media framing.
1569
+ */
1570
+ ratio?: 'auto_720p' | 'auto_1080p';
1571
+ /**
1572
+ * Images of characters, objects or styles to use in the video. Up to 10 images in
1573
+ * total, frames included.
1574
+ */
1575
+ references?: Array<Kling4.Reference>;
1576
+ /**
1577
+ * Up to 5 videos whose style, motion or camera work should guide the output,
1578
+ * together at most 30 seconds long.
1579
+ */
1580
+ referenceVideos?: Array<unknown>;
1581
+ }
1582
+ namespace Kling4 {
1583
+ interface Reference {
1584
+ /**
1585
+ * A HTTPS URL, Runway upload URI, or base64 data URI (e.g.
1586
+ * `data:image/png;base64,...`, up to 5MB) containing an encoded image. See
1587
+ * [our docs](/assets/inputs#images) on image inputs for more information.
1588
+ */
1589
+ uri: string;
1590
+ }
1591
+ }
982
1592
  }
983
1593
  export declare namespace ImageToVideo {
984
1594
  export { type ImageToVideoCreateResponse as ImageToVideoCreateResponse, type ImageToVideoCreateParams as ImageToVideoCreateParams, };