getaiapi 1.0.5 → 1.2.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.
@@ -30180,6 +30180,111 @@ var registry_default = [
30180
30180
  }
30181
30181
  ]
30182
30182
  },
30183
+ {
30184
+ canonical_name: "kling-v1-ai-multi-shot",
30185
+ aliases: [
30186
+ "kling-multi-shot"
30187
+ ],
30188
+ modality: {
30189
+ inputs: [
30190
+ "text"
30191
+ ],
30192
+ outputs: [
30193
+ "image"
30194
+ ]
30195
+ },
30196
+ providers: [
30197
+ {
30198
+ provider: "kling",
30199
+ skill_id: "kling-ai-multi-shot",
30200
+ endpoint: "v1/images/ai-multi-shot",
30201
+ auth_env: "KLING_ACCESS_KEY",
30202
+ param_map: {
30203
+ prompt: "prompt",
30204
+ image: "element_frontal_image"
30205
+ },
30206
+ output_map: {
30207
+ type: "image",
30208
+ extract_path: "task_result.images[].url",
30209
+ content_type: "image/png"
30210
+ },
30211
+ defaults: {
30212
+ model_name: "kling-v1"
30213
+ }
30214
+ }
30215
+ ]
30216
+ },
30217
+ {
30218
+ canonical_name: "kling-v1-extend-image",
30219
+ aliases: [
30220
+ "kling-image-expansion"
30221
+ ],
30222
+ modality: {
30223
+ inputs: [
30224
+ "image",
30225
+ "text"
30226
+ ],
30227
+ outputs: [
30228
+ "image"
30229
+ ]
30230
+ },
30231
+ providers: [
30232
+ {
30233
+ provider: "kling",
30234
+ skill_id: "kling-extend-image",
30235
+ endpoint: "v1/images/image-expansion",
30236
+ auth_env: "KLING_ACCESS_KEY",
30237
+ param_map: {
30238
+ image: "image",
30239
+ prompt: "prompt"
30240
+ },
30241
+ output_map: {
30242
+ type: "image",
30243
+ extract_path: "task_result.images[].url",
30244
+ content_type: "image/png"
30245
+ },
30246
+ defaults: {
30247
+ model_name: "kling-v1"
30248
+ }
30249
+ }
30250
+ ]
30251
+ },
30252
+ {
30253
+ canonical_name: "kling-v1-extend-video",
30254
+ aliases: [
30255
+ "kling-video-extend"
30256
+ ],
30257
+ modality: {
30258
+ inputs: [
30259
+ "video",
30260
+ "text"
30261
+ ],
30262
+ outputs: [
30263
+ "video"
30264
+ ]
30265
+ },
30266
+ providers: [
30267
+ {
30268
+ provider: "kling",
30269
+ skill_id: "kling-extend-video",
30270
+ endpoint: "v1/videos/video-extend",
30271
+ auth_env: "KLING_ACCESS_KEY",
30272
+ param_map: {
30273
+ prompt: "prompt",
30274
+ negative_prompt: "negative_prompt",
30275
+ video: "video_id"
30276
+ },
30277
+ output_map: {
30278
+ type: "video",
30279
+ extract_path: "task_result.videos[].url",
30280
+ content_type: "video/mp4"
30281
+ },
30282
+ defaults: {
30283
+ model_name: "kling-v1"
30284
+ }
30285
+ }
30286
+ ]
30287
+ },
30183
30288
  {
30184
30289
  canonical_name: "kling-image-o1",
30185
30290
  aliases: [
@@ -30195,6 +30300,26 @@ var registry_default = [
30195
30300
  ]
30196
30301
  },
30197
30302
  providers: [
30303
+ {
30304
+ provider: "kling",
30305
+ auth_env: "KLING_ACCESS_KEY",
30306
+ skill_id: "kling-image-to-image",
30307
+ endpoint: "v1/images/generations",
30308
+ param_map: {
30309
+ prompt: "prompt",
30310
+ negative_prompt: "negative_prompt",
30311
+ image: "image",
30312
+ count: "n"
30313
+ },
30314
+ defaults: {
30315
+ model_name: "kling-image-o1"
30316
+ },
30317
+ output_map: {
30318
+ type: "image",
30319
+ extract_path: "task_result.images[].url",
30320
+ content_type: "image/png"
30321
+ }
30322
+ },
30198
30323
  {
30199
30324
  provider: "fal-ai",
30200
30325
  skill_id: "fal-ai-kling-image-o1",
@@ -30234,6 +30359,25 @@ var registry_default = [
30234
30359
  ]
30235
30360
  },
30236
30361
  providers: [
30362
+ {
30363
+ provider: "kling",
30364
+ auth_env: "KLING_ACCESS_KEY",
30365
+ skill_id: "kling-image-to-image",
30366
+ endpoint: "v1/images/generations",
30367
+ param_map: {
30368
+ prompt: "prompt",
30369
+ image: "image",
30370
+ count: "n"
30371
+ },
30372
+ defaults: {
30373
+ model_name: "kling-v3-omni"
30374
+ },
30375
+ output_map: {
30376
+ type: "image",
30377
+ extract_path: "task_result.images[].url",
30378
+ content_type: "image/png"
30379
+ }
30380
+ },
30237
30381
  {
30238
30382
  provider: "fal-ai",
30239
30383
  skill_id: "fal-ai-kling-image-o3-image-to-image",
@@ -30271,6 +30415,25 @@ var registry_default = [
30271
30415
  ]
30272
30416
  },
30273
30417
  providers: [
30418
+ {
30419
+ provider: "kling",
30420
+ auth_env: "KLING_ACCESS_KEY",
30421
+ skill_id: "kling-text-to-image",
30422
+ endpoint: "v1/images/generations",
30423
+ param_map: {
30424
+ prompt: "prompt",
30425
+ negative_prompt: "negative_prompt",
30426
+ count: "n"
30427
+ },
30428
+ defaults: {
30429
+ model_name: "kling-v3-omni"
30430
+ },
30431
+ output_map: {
30432
+ type: "image",
30433
+ extract_path: "task_result.images[].url",
30434
+ content_type: "image/png"
30435
+ }
30436
+ },
30274
30437
  {
30275
30438
  provider: "fal-ai",
30276
30439
  skill_id: "fal-ai-kling-image-o3-text-to-image",
@@ -30296,6 +30459,40 @@ var registry_default = [
30296
30459
  }
30297
30460
  ]
30298
30461
  },
30462
+ {
30463
+ canonical_name: "kling-v1-image-recognize",
30464
+ aliases: [
30465
+ "kling-image-understanding"
30466
+ ],
30467
+ modality: {
30468
+ inputs: [
30469
+ "image",
30470
+ "text"
30471
+ ],
30472
+ outputs: [
30473
+ "text"
30474
+ ]
30475
+ },
30476
+ providers: [
30477
+ {
30478
+ provider: "kling",
30479
+ skill_id: "kling-image-recognize",
30480
+ endpoint: "v1/images/image-recognize",
30481
+ auth_env: "KLING_ACCESS_KEY",
30482
+ param_map: {
30483
+ image: "image"
30484
+ },
30485
+ output_map: {
30486
+ type: "text",
30487
+ extract_path: "task_result.text",
30488
+ content_type: "text/plain"
30489
+ },
30490
+ defaults: {
30491
+ model_name: "kling-v1"
30492
+ }
30493
+ }
30494
+ ]
30495
+ },
30299
30496
  {
30300
30497
  canonical_name: "kling-image-v3-image-to-image",
30301
30498
  aliases: [
@@ -30312,6 +30509,25 @@ var registry_default = [
30312
30509
  ]
30313
30510
  },
30314
30511
  providers: [
30512
+ {
30513
+ provider: "kling",
30514
+ auth_env: "KLING_ACCESS_KEY",
30515
+ skill_id: "kling-image-to-image",
30516
+ endpoint: "v1/images/generations",
30517
+ param_map: {
30518
+ prompt: "prompt",
30519
+ image: "image",
30520
+ count: "n"
30521
+ },
30522
+ defaults: {
30523
+ model_name: "kling-v3"
30524
+ },
30525
+ output_map: {
30526
+ type: "image",
30527
+ extract_path: "task_result.images[].url",
30528
+ content_type: "image/png"
30529
+ }
30530
+ },
30315
30531
  {
30316
30532
  provider: "fal-ai",
30317
30533
  skill_id: "fal-ai-kling-image-v3-image-to-image",
@@ -30349,6 +30565,25 @@ var registry_default = [
30349
30565
  ]
30350
30566
  },
30351
30567
  providers: [
30568
+ {
30569
+ provider: "kling",
30570
+ auth_env: "KLING_ACCESS_KEY",
30571
+ skill_id: "kling-text-to-image",
30572
+ endpoint: "v1/images/generations",
30573
+ param_map: {
30574
+ prompt: "prompt",
30575
+ negative_prompt: "negative_prompt",
30576
+ count: "n"
30577
+ },
30578
+ defaults: {
30579
+ model_name: "kling-v3"
30580
+ },
30581
+ output_map: {
30582
+ type: "image",
30583
+ extract_path: "task_result.images[].url",
30584
+ content_type: "image/png"
30585
+ }
30586
+ },
30352
30587
  {
30353
30588
  provider: "fal-ai",
30354
30589
  skill_id: "fal-ai-kling-image-v3-text-to-image",
@@ -30374,6 +30609,39 @@ var registry_default = [
30374
30609
  }
30375
30610
  ]
30376
30611
  },
30612
+ {
30613
+ canonical_name: "kling-v1-text-to-audio",
30614
+ aliases: [
30615
+ "kling-audio-generation"
30616
+ ],
30617
+ modality: {
30618
+ inputs: [
30619
+ "text"
30620
+ ],
30621
+ outputs: [
30622
+ "audio"
30623
+ ]
30624
+ },
30625
+ providers: [
30626
+ {
30627
+ provider: "kling",
30628
+ skill_id: "kling-text-to-audio",
30629
+ endpoint: "v1/audios/generation",
30630
+ auth_env: "KLING_ACCESS_KEY",
30631
+ param_map: {
30632
+ prompt: "prompt"
30633
+ },
30634
+ output_map: {
30635
+ type: "audio",
30636
+ extract_path: "task_result.audios[].url",
30637
+ content_type: "audio/mpeg"
30638
+ },
30639
+ defaults: {
30640
+ model_name: "kling-v1"
30641
+ }
30642
+ }
30643
+ ]
30644
+ },
30377
30645
  {
30378
30646
  canonical_name: "kling-v1-5-kolors-virtual-try-on",
30379
30647
  aliases: [
@@ -30388,6 +30656,23 @@ var registry_default = [
30388
30656
  ]
30389
30657
  },
30390
30658
  providers: [
30659
+ {
30660
+ provider: "kling",
30661
+ auth_env: "KLING_ACCESS_KEY",
30662
+ skill_id: "kling-virtual-try-on",
30663
+ endpoint: "v1/images/kolors-virtual-try-on",
30664
+ param_map: {
30665
+ image: "human_image"
30666
+ },
30667
+ defaults: {
30668
+ model_name: "kolors-virtual-try-on"
30669
+ },
30670
+ output_map: {
30671
+ type: "image",
30672
+ extract_path: "task_result.images[].url",
30673
+ content_type: "image/png"
30674
+ }
30675
+ },
30391
30676
  {
30392
30677
  provider: "fal-ai",
30393
30678
  skill_id: "fal-ai-kling-v1-5-kolors-virtual-try-on",
@@ -30463,6 +30748,26 @@ var registry_default = [
30463
30748
  ]
30464
30749
  },
30465
30750
  providers: [
30751
+ {
30752
+ provider: "kling",
30753
+ auth_env: "KLING_ACCESS_KEY",
30754
+ skill_id: "kling-avatar",
30755
+ endpoint: "v1/videos/avatar",
30756
+ param_map: {
30757
+ image: "image",
30758
+ prompt: "text",
30759
+ audio: "audio_url"
30760
+ },
30761
+ defaults: {
30762
+ model_name: "kling-v1",
30763
+ mode: "pro"
30764
+ },
30765
+ output_map: {
30766
+ type: "video",
30767
+ extract_path: "task_result.videos[].url",
30768
+ content_type: "video/mp4"
30769
+ }
30770
+ },
30466
30771
  {
30467
30772
  provider: "fal-ai",
30468
30773
  skill_id: "fal-ai-kling-video-ai-avatar-v2-pro",
@@ -30502,6 +30807,26 @@ var registry_default = [
30502
30807
  ]
30503
30808
  },
30504
30809
  providers: [
30810
+ {
30811
+ provider: "kling",
30812
+ auth_env: "KLING_ACCESS_KEY",
30813
+ skill_id: "kling-avatar",
30814
+ endpoint: "v1/videos/avatar",
30815
+ param_map: {
30816
+ image: "image",
30817
+ prompt: "text",
30818
+ audio: "audio_url"
30819
+ },
30820
+ defaults: {
30821
+ model_name: "kling-v1",
30822
+ mode: "std"
30823
+ },
30824
+ output_map: {
30825
+ type: "video",
30826
+ extract_path: "task_result.videos[].url",
30827
+ content_type: "video/mp4"
30828
+ }
30829
+ },
30505
30830
  {
30506
30831
  provider: "fal-ai",
30507
30832
  skill_id: "fal-ai-kling-video-ai-avatar-v2-standard",
@@ -30535,10 +30860,28 @@ var registry_default = [
30535
30860
  "audio"
30536
30861
  ],
30537
30862
  outputs: [
30538
- "text"
30863
+ "text",
30864
+ "audio"
30539
30865
  ]
30540
30866
  },
30541
30867
  providers: [
30868
+ {
30869
+ provider: "kling",
30870
+ auth_env: "KLING_ACCESS_KEY",
30871
+ skill_id: "kling-voice-clone",
30872
+ endpoint: "v1/audios/voice-clone",
30873
+ param_map: {
30874
+ audio: "voice_url"
30875
+ },
30876
+ defaults: {
30877
+ model_name: "kling-v1"
30878
+ },
30879
+ output_map: {
30880
+ type: "audio",
30881
+ extract_path: "task_result.audios[].url",
30882
+ content_type: "audio/mpeg"
30883
+ }
30884
+ },
30542
30885
  {
30543
30886
  provider: "fal-ai",
30544
30887
  skill_id: "fal-ai-kling-video-create-voice",
@@ -30570,6 +30913,25 @@ var registry_default = [
30570
30913
  ]
30571
30914
  },
30572
30915
  providers: [
30916
+ {
30917
+ provider: "kling",
30918
+ auth_env: "KLING_ACCESS_KEY",
30919
+ skill_id: "kling-lip-sync",
30920
+ endpoint: "v1/videos/lip-sync",
30921
+ param_map: {
30922
+ video: "video_url",
30923
+ prompt: "text",
30924
+ audio: "sound_file"
30925
+ },
30926
+ defaults: {
30927
+ model_name: "kling-v1"
30928
+ },
30929
+ output_map: {
30930
+ type: "video",
30931
+ extract_path: "task_result.videos[].url",
30932
+ content_type: "video/mp4"
30933
+ }
30934
+ },
30573
30935
  {
30574
30936
  provider: "fal-ai",
30575
30937
  skill_id: "fal-ai-kling-video-lipsync-audio-to-video",
@@ -30609,6 +30971,25 @@ var registry_default = [
30609
30971
  ]
30610
30972
  },
30611
30973
  providers: [
30974
+ {
30975
+ provider: "kling",
30976
+ auth_env: "KLING_ACCESS_KEY",
30977
+ skill_id: "kling-lip-sync",
30978
+ endpoint: "v1/videos/lip-sync",
30979
+ param_map: {
30980
+ video: "video_url",
30981
+ prompt: "text",
30982
+ audio: "sound_file"
30983
+ },
30984
+ defaults: {
30985
+ model_name: "kling-v1"
30986
+ },
30987
+ output_map: {
30988
+ type: "video",
30989
+ extract_path: "task_result.videos[].url",
30990
+ content_type: "video/mp4"
30991
+ }
30992
+ },
30612
30993
  {
30613
30994
  provider: "fal-ai",
30614
30995
  skill_id: "fal-ai-kling-video-lipsync-text-to-video",
@@ -30648,6 +31029,29 @@ var registry_default = [
30648
31029
  ]
30649
31030
  },
30650
31031
  providers: [
31032
+ {
31033
+ provider: "kling",
31034
+ auth_env: "KLING_ACCESS_KEY",
31035
+ skill_id: "kling-image-to-video",
31036
+ endpoint: "v1/videos/image2video",
31037
+ param_map: {
31038
+ prompt: "prompt",
31039
+ negative_prompt: "negative_prompt",
31040
+ image: "image",
31041
+ duration: "duration",
31042
+ size: "aspect_ratio",
31043
+ guidance: "cfg_scale"
31044
+ },
31045
+ defaults: {
31046
+ model_name: "kling-video-o1",
31047
+ mode: "pro"
31048
+ },
31049
+ output_map: {
31050
+ type: "video",
31051
+ extract_path: "task_result.videos[].url",
31052
+ content_type: "video/mp4"
31053
+ }
31054
+ },
30651
31055
  {
30652
31056
  provider: "fal-ai",
30653
31057
  skill_id: "fal-ai-kling-video-o1-image-to-video",
@@ -30685,6 +31089,29 @@ var registry_default = [
30685
31089
  ]
30686
31090
  },
30687
31091
  providers: [
31092
+ {
31093
+ provider: "kling",
31094
+ auth_env: "KLING_ACCESS_KEY",
31095
+ skill_id: "kling-image-to-video",
31096
+ endpoint: "v1/videos/image2video",
31097
+ param_map: {
31098
+ prompt: "prompt",
31099
+ negative_prompt: "negative_prompt",
31100
+ image: "image",
31101
+ duration: "duration",
31102
+ size: "aspect_ratio",
31103
+ guidance: "cfg_scale"
31104
+ },
31105
+ defaults: {
31106
+ model_name: "kling-video-o1",
31107
+ mode: "pro"
31108
+ },
31109
+ output_map: {
31110
+ type: "video",
31111
+ extract_path: "task_result.videos[].url",
31112
+ content_type: "video/mp4"
31113
+ }
31114
+ },
30688
31115
  {
30689
31116
  provider: "fal-ai",
30690
31117
  skill_id: "fal-ai-kling-video-o1-reference-to-video",
@@ -30724,6 +31151,29 @@ var registry_default = [
30724
31151
  ]
30725
31152
  },
30726
31153
  providers: [
31154
+ {
31155
+ provider: "kling",
31156
+ auth_env: "KLING_ACCESS_KEY",
31157
+ skill_id: "kling-image-to-video",
31158
+ endpoint: "v1/videos/image2video",
31159
+ param_map: {
31160
+ prompt: "prompt",
31161
+ negative_prompt: "negative_prompt",
31162
+ image: "image",
31163
+ duration: "duration",
31164
+ size: "aspect_ratio",
31165
+ guidance: "cfg_scale"
31166
+ },
31167
+ defaults: {
31168
+ model_name: "kling-video-o1",
31169
+ mode: "std"
31170
+ },
31171
+ output_map: {
31172
+ type: "video",
31173
+ extract_path: "task_result.videos[].url",
31174
+ content_type: "video/mp4"
31175
+ }
31176
+ },
30727
31177
  {
30728
31178
  provider: "fal-ai",
30729
31179
  skill_id: "fal-ai-kling-video-o1-standard-image-to-video",
@@ -30761,6 +31211,29 @@ var registry_default = [
30761
31211
  ]
30762
31212
  },
30763
31213
  providers: [
31214
+ {
31215
+ provider: "kling",
31216
+ auth_env: "KLING_ACCESS_KEY",
31217
+ skill_id: "kling-image-to-video",
31218
+ endpoint: "v1/videos/image2video",
31219
+ param_map: {
31220
+ prompt: "prompt",
31221
+ negative_prompt: "negative_prompt",
31222
+ image: "image",
31223
+ duration: "duration",
31224
+ size: "aspect_ratio",
31225
+ guidance: "cfg_scale"
31226
+ },
31227
+ defaults: {
31228
+ model_name: "kling-video-o1",
31229
+ mode: "std"
31230
+ },
31231
+ output_map: {
31232
+ type: "video",
31233
+ extract_path: "task_result.videos[].url",
31234
+ content_type: "video/mp4"
31235
+ }
31236
+ },
30764
31237
  {
30765
31238
  provider: "fal-ai",
30766
31239
  skill_id: "fal-ai-kling-video-o1-standard-reference-to-video",
@@ -30951,6 +31424,29 @@ var registry_default = [
30951
31424
  ]
30952
31425
  },
30953
31426
  providers: [
31427
+ {
31428
+ provider: "kling",
31429
+ auth_env: "KLING_ACCESS_KEY",
31430
+ skill_id: "kling-image-to-video",
31431
+ endpoint: "v1/videos/image2video",
31432
+ param_map: {
31433
+ prompt: "prompt",
31434
+ negative_prompt: "negative_prompt",
31435
+ image: "image",
31436
+ duration: "duration",
31437
+ size: "aspect_ratio",
31438
+ guidance: "cfg_scale"
31439
+ },
31440
+ defaults: {
31441
+ model_name: "kling-v3-omni",
31442
+ mode: "pro"
31443
+ },
31444
+ output_map: {
31445
+ type: "video",
31446
+ extract_path: "task_result.videos[].url",
31447
+ content_type: "video/mp4"
31448
+ }
31449
+ },
30954
31450
  {
30955
31451
  provider: "fal-ai",
30956
31452
  skill_id: "fal-ai-kling-video-o3-pro-image-to-video",
@@ -30988,6 +31484,29 @@ var registry_default = [
30988
31484
  ]
30989
31485
  },
30990
31486
  providers: [
31487
+ {
31488
+ provider: "kling",
31489
+ auth_env: "KLING_ACCESS_KEY",
31490
+ skill_id: "kling-image-to-video",
31491
+ endpoint: "v1/videos/image2video",
31492
+ param_map: {
31493
+ prompt: "prompt",
31494
+ negative_prompt: "negative_prompt",
31495
+ image: "image",
31496
+ duration: "duration",
31497
+ size: "aspect_ratio",
31498
+ guidance: "cfg_scale"
31499
+ },
31500
+ defaults: {
31501
+ model_name: "kling-v3-omni",
31502
+ mode: "pro"
31503
+ },
31504
+ output_map: {
31505
+ type: "video",
31506
+ extract_path: "task_result.videos[].url",
31507
+ content_type: "video/mp4"
31508
+ }
31509
+ },
30991
31510
  {
30992
31511
  provider: "fal-ai",
30993
31512
  skill_id: "fal-ai-kling-video-o3-pro-reference-to-video",
@@ -31026,6 +31545,28 @@ var registry_default = [
31026
31545
  ]
31027
31546
  },
31028
31547
  providers: [
31548
+ {
31549
+ provider: "kling",
31550
+ auth_env: "KLING_ACCESS_KEY",
31551
+ skill_id: "kling-text-to-video",
31552
+ endpoint: "v1/videos/text2video",
31553
+ param_map: {
31554
+ prompt: "prompt",
31555
+ negative_prompt: "negative_prompt",
31556
+ duration: "duration",
31557
+ size: "aspect_ratio",
31558
+ guidance: "cfg_scale"
31559
+ },
31560
+ defaults: {
31561
+ model_name: "kling-v3-omni",
31562
+ mode: "pro"
31563
+ },
31564
+ output_map: {
31565
+ type: "video",
31566
+ extract_path: "task_result.videos[].url",
31567
+ content_type: "video/mp4"
31568
+ }
31569
+ },
31029
31570
  {
31030
31571
  provider: "fal-ai",
31031
31572
  skill_id: "fal-ai-kling-video-o3-pro-text-to-video",
@@ -31140,6 +31681,29 @@ var registry_default = [
31140
31681
  ]
31141
31682
  },
31142
31683
  providers: [
31684
+ {
31685
+ provider: "kling",
31686
+ auth_env: "KLING_ACCESS_KEY",
31687
+ skill_id: "kling-image-to-video",
31688
+ endpoint: "v1/videos/image2video",
31689
+ param_map: {
31690
+ prompt: "prompt",
31691
+ negative_prompt: "negative_prompt",
31692
+ image: "image",
31693
+ duration: "duration",
31694
+ size: "aspect_ratio",
31695
+ guidance: "cfg_scale"
31696
+ },
31697
+ defaults: {
31698
+ model_name: "kling-v3-omni",
31699
+ mode: "std"
31700
+ },
31701
+ output_map: {
31702
+ type: "video",
31703
+ extract_path: "task_result.videos[].url",
31704
+ content_type: "video/mp4"
31705
+ }
31706
+ },
31143
31707
  {
31144
31708
  provider: "fal-ai",
31145
31709
  skill_id: "fal-ai-kling-video-o3-standard-reference-to-video",
@@ -31179,6 +31743,28 @@ var registry_default = [
31179
31743
  ]
31180
31744
  },
31181
31745
  providers: [
31746
+ {
31747
+ provider: "kling",
31748
+ auth_env: "KLING_ACCESS_KEY",
31749
+ skill_id: "kling-text-to-video",
31750
+ endpoint: "v1/videos/text2video",
31751
+ param_map: {
31752
+ prompt: "prompt",
31753
+ negative_prompt: "negative_prompt",
31754
+ duration: "duration",
31755
+ size: "aspect_ratio",
31756
+ guidance: "cfg_scale"
31757
+ },
31758
+ defaults: {
31759
+ model_name: "kling-v3-omni",
31760
+ mode: "std"
31761
+ },
31762
+ output_map: {
31763
+ type: "video",
31764
+ extract_path: "task_result.videos[].url",
31765
+ content_type: "video/mp4"
31766
+ }
31767
+ },
31182
31768
  {
31183
31769
  provider: "fal-ai",
31184
31770
  skill_id: "fal-ai-kling-video-o3-standard-text-to-video",
@@ -31294,6 +31880,26 @@ var registry_default = [
31294
31880
  ]
31295
31881
  },
31296
31882
  providers: [
31883
+ {
31884
+ provider: "kling",
31885
+ auth_env: "KLING_ACCESS_KEY",
31886
+ skill_id: "kling-avatar",
31887
+ endpoint: "v1/videos/avatar",
31888
+ param_map: {
31889
+ image: "image",
31890
+ prompt: "text",
31891
+ audio: "audio_url"
31892
+ },
31893
+ defaults: {
31894
+ model_name: "kling-v1",
31895
+ mode: "pro"
31896
+ },
31897
+ output_map: {
31898
+ type: "video",
31899
+ extract_path: "task_result.videos[].url",
31900
+ content_type: "video/mp4"
31901
+ }
31902
+ },
31297
31903
  {
31298
31904
  provider: "fal-ai",
31299
31905
  skill_id: "fal-ai-kling-video-v1-pro-ai-avatar",
@@ -31332,6 +31938,26 @@ var registry_default = [
31332
31938
  ]
31333
31939
  },
31334
31940
  providers: [
31941
+ {
31942
+ provider: "kling",
31943
+ auth_env: "KLING_ACCESS_KEY",
31944
+ skill_id: "kling-avatar",
31945
+ endpoint: "v1/videos/avatar",
31946
+ param_map: {
31947
+ image: "image",
31948
+ prompt: "text",
31949
+ audio: "audio_url"
31950
+ },
31951
+ defaults: {
31952
+ model_name: "kling-v1",
31953
+ mode: "std"
31954
+ },
31955
+ output_map: {
31956
+ type: "video",
31957
+ extract_path: "task_result.videos[].url",
31958
+ content_type: "video/mp4"
31959
+ }
31960
+ },
31335
31961
  {
31336
31962
  provider: "fal-ai",
31337
31963
  skill_id: "fal-ai-kling-video-v1-standard-ai-avatar",
@@ -31369,6 +31995,24 @@ var registry_default = [
31369
31995
  ]
31370
31996
  },
31371
31997
  providers: [
31998
+ {
31999
+ provider: "kling",
32000
+ auth_env: "KLING_ACCESS_KEY",
32001
+ skill_id: "kling-video-effects",
32002
+ endpoint: "v1/videos/effects",
32003
+ param_map: {
32004
+ image: "image"
32005
+ },
32006
+ defaults: {
32007
+ model_name: "kling-v1",
32008
+ mode: "std"
32009
+ },
32010
+ output_map: {
32011
+ type: "video",
32012
+ extract_path: "task_result.videos[].url",
32013
+ content_type: "video/mp4"
32014
+ }
32015
+ },
31372
32016
  {
31373
32017
  provider: "fal-ai",
31374
32018
  skill_id: "fal-ai-kling-video-v1-standard-effects",
@@ -31409,6 +32053,29 @@ var registry_default = [
31409
32053
  ]
31410
32054
  },
31411
32055
  providers: [
32056
+ {
32057
+ provider: "kling",
32058
+ auth_env: "KLING_ACCESS_KEY",
32059
+ skill_id: "kling-image-to-video",
32060
+ endpoint: "v1/videos/image2video",
32061
+ param_map: {
32062
+ prompt: "prompt",
32063
+ negative_prompt: "negative_prompt",
32064
+ image: "image",
32065
+ duration: "duration",
32066
+ size: "aspect_ratio",
32067
+ guidance: "cfg_scale"
32068
+ },
32069
+ defaults: {
32070
+ model_name: "kling-v1",
32071
+ mode: "std"
32072
+ },
32073
+ output_map: {
32074
+ type: "video",
32075
+ extract_path: "task_result.videos[].url",
32076
+ content_type: "video/mp4"
32077
+ }
32078
+ },
31412
32079
  {
31413
32080
  provider: "fal-ai",
31414
32081
  skill_id: "fal-ai-kling-video-v1-standard-image-to-video",
@@ -31446,6 +32113,28 @@ var registry_default = [
31446
32113
  ]
31447
32114
  },
31448
32115
  providers: [
32116
+ {
32117
+ provider: "kling",
32118
+ auth_env: "KLING_ACCESS_KEY",
32119
+ skill_id: "kling-text-to-video",
32120
+ endpoint: "v1/videos/text2video",
32121
+ param_map: {
32122
+ prompt: "prompt",
32123
+ negative_prompt: "negative_prompt",
32124
+ duration: "duration",
32125
+ size: "aspect_ratio",
32126
+ guidance: "cfg_scale"
32127
+ },
32128
+ defaults: {
32129
+ model_name: "kling-v1",
32130
+ mode: "std"
32131
+ },
32132
+ output_map: {
32133
+ type: "video",
32134
+ extract_path: "task_result.videos[].url",
32135
+ content_type: "video/mp4"
32136
+ }
32137
+ },
31449
32138
  {
31450
32139
  provider: "fal-ai",
31451
32140
  skill_id: "fal-ai-kling-video-v1-standard-text-to-video",
@@ -31484,6 +32173,23 @@ var registry_default = [
31484
32173
  ]
31485
32174
  },
31486
32175
  providers: [
32176
+ {
32177
+ provider: "kling",
32178
+ auth_env: "KLING_ACCESS_KEY",
32179
+ skill_id: "kling-tts",
32180
+ endpoint: "v1/audios/tts",
32181
+ param_map: {
32182
+ prompt: "text"
32183
+ },
32184
+ defaults: {
32185
+ model_name: "kling-v1"
32186
+ },
32187
+ output_map: {
32188
+ type: "audio",
32189
+ extract_path: "task_result.audios[].url",
32190
+ content_type: "audio/mpeg"
32191
+ }
32192
+ },
31487
32193
  {
31488
32194
  provider: "fal-ai",
31489
32195
  skill_id: "fal-ai-kling-video-v1-tts",
@@ -31517,6 +32223,24 @@ var registry_default = [
31517
32223
  ]
31518
32224
  },
31519
32225
  providers: [
32226
+ {
32227
+ provider: "kling",
32228
+ auth_env: "KLING_ACCESS_KEY",
32229
+ skill_id: "kling-video-effects",
32230
+ endpoint: "v1/videos/effects",
32231
+ param_map: {
32232
+ image: "image"
32233
+ },
32234
+ defaults: {
32235
+ model_name: "kling-v1-5",
32236
+ mode: "pro"
32237
+ },
32238
+ output_map: {
32239
+ type: "video",
32240
+ extract_path: "task_result.videos[].url",
32241
+ content_type: "video/mp4"
32242
+ }
32243
+ },
31520
32244
  {
31521
32245
  provider: "fal-ai",
31522
32246
  skill_id: "fal-ai-kling-video-v1.5-pro-effects",
@@ -31557,6 +32281,29 @@ var registry_default = [
31557
32281
  ]
31558
32282
  },
31559
32283
  providers: [
32284
+ {
32285
+ provider: "kling",
32286
+ auth_env: "KLING_ACCESS_KEY",
32287
+ skill_id: "kling-image-to-video",
32288
+ endpoint: "v1/videos/image2video",
32289
+ param_map: {
32290
+ prompt: "prompt",
32291
+ negative_prompt: "negative_prompt",
32292
+ image: "image",
32293
+ duration: "duration",
32294
+ size: "aspect_ratio",
32295
+ guidance: "cfg_scale"
32296
+ },
32297
+ defaults: {
32298
+ model_name: "kling-v1-5",
32299
+ mode: "pro"
32300
+ },
32301
+ output_map: {
32302
+ type: "video",
32303
+ extract_path: "task_result.videos[].url",
32304
+ content_type: "video/mp4"
32305
+ }
32306
+ },
31560
32307
  {
31561
32308
  provider: "fal-ai",
31562
32309
  skill_id: "fal-ai-kling-video-v1.5-pro-image-to-video",
@@ -31594,6 +32341,28 @@ var registry_default = [
31594
32341
  ]
31595
32342
  },
31596
32343
  providers: [
32344
+ {
32345
+ provider: "kling",
32346
+ auth_env: "KLING_ACCESS_KEY",
32347
+ skill_id: "kling-text-to-video",
32348
+ endpoint: "v1/videos/text2video",
32349
+ param_map: {
32350
+ prompt: "prompt",
32351
+ negative_prompt: "negative_prompt",
32352
+ duration: "duration",
32353
+ size: "aspect_ratio",
32354
+ guidance: "cfg_scale"
32355
+ },
32356
+ defaults: {
32357
+ model_name: "kling-v1-5",
32358
+ mode: "pro"
32359
+ },
32360
+ output_map: {
32361
+ type: "video",
32362
+ extract_path: "task_result.videos[].url",
32363
+ content_type: "video/mp4"
32364
+ }
32365
+ },
31597
32366
  {
31598
32367
  provider: "fal-ai",
31599
32368
  skill_id: "fal-ai-kling-video-v1.5-pro-text-to-video",
@@ -31632,6 +32401,24 @@ var registry_default = [
31632
32401
  ]
31633
32402
  },
31634
32403
  providers: [
32404
+ {
32405
+ provider: "kling",
32406
+ auth_env: "KLING_ACCESS_KEY",
32407
+ skill_id: "kling-video-effects",
32408
+ endpoint: "v1/videos/effects",
32409
+ param_map: {
32410
+ image: "image"
32411
+ },
32412
+ defaults: {
32413
+ model_name: "kling-v1-6",
32414
+ mode: "pro"
32415
+ },
32416
+ output_map: {
32417
+ type: "video",
32418
+ extract_path: "task_result.videos[].url",
32419
+ content_type: "video/mp4"
32420
+ }
32421
+ },
31635
32422
  {
31636
32423
  provider: "fal-ai",
31637
32424
  skill_id: "fal-ai-kling-video-v1.6-pro-effects",
@@ -31671,6 +32458,29 @@ var registry_default = [
31671
32458
  ]
31672
32459
  },
31673
32460
  providers: [
32461
+ {
32462
+ provider: "kling",
32463
+ auth_env: "KLING_ACCESS_KEY",
32464
+ skill_id: "kling-image-to-video",
32465
+ endpoint: "v1/videos/image2video",
32466
+ param_map: {
32467
+ prompt: "prompt",
32468
+ negative_prompt: "negative_prompt",
32469
+ image: "image",
32470
+ duration: "duration",
32471
+ size: "aspect_ratio",
32472
+ guidance: "cfg_scale"
32473
+ },
32474
+ defaults: {
32475
+ model_name: "kling-v1-6",
32476
+ mode: "pro"
32477
+ },
32478
+ output_map: {
32479
+ type: "video",
32480
+ extract_path: "task_result.videos[].url",
32481
+ content_type: "video/mp4"
32482
+ }
32483
+ },
31674
32484
  {
31675
32485
  provider: "fal-ai",
31676
32486
  skill_id: "fal-ai-kling-video-v1.6-pro-elements",
@@ -31710,6 +32520,29 @@ var registry_default = [
31710
32520
  ]
31711
32521
  },
31712
32522
  providers: [
32523
+ {
32524
+ provider: "kling",
32525
+ auth_env: "KLING_ACCESS_KEY",
32526
+ skill_id: "kling-image-to-video",
32527
+ endpoint: "v1/videos/image2video",
32528
+ param_map: {
32529
+ prompt: "prompt",
32530
+ negative_prompt: "negative_prompt",
32531
+ image: "image",
32532
+ duration: "duration",
32533
+ size: "aspect_ratio",
32534
+ guidance: "cfg_scale"
32535
+ },
32536
+ defaults: {
32537
+ model_name: "kling-v1-6",
32538
+ mode: "pro"
32539
+ },
32540
+ output_map: {
32541
+ type: "video",
32542
+ extract_path: "task_result.videos[].url",
32543
+ content_type: "video/mp4"
32544
+ }
32545
+ },
31713
32546
  {
31714
32547
  provider: "fal-ai",
31715
32548
  skill_id: "fal-ai-kling-video-v1.6-pro-image-to-video",
@@ -31747,6 +32580,28 @@ var registry_default = [
31747
32580
  ]
31748
32581
  },
31749
32582
  providers: [
32583
+ {
32584
+ provider: "kling",
32585
+ auth_env: "KLING_ACCESS_KEY",
32586
+ skill_id: "kling-text-to-video",
32587
+ endpoint: "v1/videos/text2video",
32588
+ param_map: {
32589
+ prompt: "prompt",
32590
+ negative_prompt: "negative_prompt",
32591
+ duration: "duration",
32592
+ size: "aspect_ratio",
32593
+ guidance: "cfg_scale"
32594
+ },
32595
+ defaults: {
32596
+ model_name: "kling-v1-6",
32597
+ mode: "pro"
32598
+ },
32599
+ output_map: {
32600
+ type: "video",
32601
+ extract_path: "task_result.videos[].url",
32602
+ content_type: "video/mp4"
32603
+ }
32604
+ },
31750
32605
  {
31751
32606
  provider: "fal-ai",
31752
32607
  skill_id: "fal-ai-kling-video-v1.6-pro-text-to-video",
@@ -31785,6 +32640,24 @@ var registry_default = [
31785
32640
  ]
31786
32641
  },
31787
32642
  providers: [
32643
+ {
32644
+ provider: "kling",
32645
+ auth_env: "KLING_ACCESS_KEY",
32646
+ skill_id: "kling-video-effects",
32647
+ endpoint: "v1/videos/effects",
32648
+ param_map: {
32649
+ image: "image"
32650
+ },
32651
+ defaults: {
32652
+ model_name: "kling-v1-6",
32653
+ mode: "std"
32654
+ },
32655
+ output_map: {
32656
+ type: "video",
32657
+ extract_path: "task_result.videos[].url",
32658
+ content_type: "video/mp4"
32659
+ }
32660
+ },
31788
32661
  {
31789
32662
  provider: "fal-ai",
31790
32663
  skill_id: "fal-ai-kling-video-v1.6-standard-effects",
@@ -31824,6 +32697,29 @@ var registry_default = [
31824
32697
  ]
31825
32698
  },
31826
32699
  providers: [
32700
+ {
32701
+ provider: "kling",
32702
+ auth_env: "KLING_ACCESS_KEY",
32703
+ skill_id: "kling-image-to-video",
32704
+ endpoint: "v1/videos/image2video",
32705
+ param_map: {
32706
+ prompt: "prompt",
32707
+ negative_prompt: "negative_prompt",
32708
+ image: "image",
32709
+ duration: "duration",
32710
+ size: "aspect_ratio",
32711
+ guidance: "cfg_scale"
32712
+ },
32713
+ defaults: {
32714
+ model_name: "kling-v1-6",
32715
+ mode: "std"
32716
+ },
32717
+ output_map: {
32718
+ type: "video",
32719
+ extract_path: "task_result.videos[].url",
32720
+ content_type: "video/mp4"
32721
+ }
32722
+ },
31827
32723
  {
31828
32724
  provider: "fal-ai",
31829
32725
  skill_id: "fal-ai-kling-video-v1.6-standard-elements",
@@ -31863,6 +32759,29 @@ var registry_default = [
31863
32759
  ]
31864
32760
  },
31865
32761
  providers: [
32762
+ {
32763
+ provider: "kling",
32764
+ auth_env: "KLING_ACCESS_KEY",
32765
+ skill_id: "kling-image-to-video",
32766
+ endpoint: "v1/videos/image2video",
32767
+ param_map: {
32768
+ prompt: "prompt",
32769
+ negative_prompt: "negative_prompt",
32770
+ image: "image",
32771
+ duration: "duration",
32772
+ size: "aspect_ratio",
32773
+ guidance: "cfg_scale"
32774
+ },
32775
+ defaults: {
32776
+ model_name: "kling-v1-6",
32777
+ mode: "std"
32778
+ },
32779
+ output_map: {
32780
+ type: "video",
32781
+ extract_path: "task_result.videos[].url",
32782
+ content_type: "video/mp4"
32783
+ }
32784
+ },
31866
32785
  {
31867
32786
  provider: "fal-ai",
31868
32787
  skill_id: "fal-ai-kling-video-v1.6-standard-image-to-video",
@@ -31900,6 +32819,28 @@ var registry_default = [
31900
32819
  ]
31901
32820
  },
31902
32821
  providers: [
32822
+ {
32823
+ provider: "kling",
32824
+ auth_env: "KLING_ACCESS_KEY",
32825
+ skill_id: "kling-text-to-video",
32826
+ endpoint: "v1/videos/text2video",
32827
+ param_map: {
32828
+ prompt: "prompt",
32829
+ negative_prompt: "negative_prompt",
32830
+ duration: "duration",
32831
+ size: "aspect_ratio",
32832
+ guidance: "cfg_scale"
32833
+ },
32834
+ defaults: {
32835
+ model_name: "kling-v1-6",
32836
+ mode: "std"
32837
+ },
32838
+ output_map: {
32839
+ type: "video",
32840
+ extract_path: "task_result.videos[].url",
32841
+ content_type: "video/mp4"
32842
+ }
32843
+ },
31903
32844
  {
31904
32845
  provider: "fal-ai",
31905
32846
  skill_id: "fal-ai-kling-video-v1.6-standard-text-to-video",
@@ -31940,6 +32881,28 @@ var registry_default = [
31940
32881
  ]
31941
32882
  },
31942
32883
  providers: [
32884
+ {
32885
+ provider: "kling",
32886
+ auth_env: "KLING_ACCESS_KEY",
32887
+ skill_id: "kling-image-to-video",
32888
+ endpoint: "v1/videos/image2video",
32889
+ param_map: {
32890
+ prompt: "prompt",
32891
+ negative_prompt: "negative_prompt",
32892
+ image: "image",
32893
+ duration: "duration",
32894
+ size: "aspect_ratio",
32895
+ guidance: "cfg_scale"
32896
+ },
32897
+ defaults: {
32898
+ model_name: "kling-v2-master"
32899
+ },
32900
+ output_map: {
32901
+ type: "video",
32902
+ extract_path: "task_result.videos[].url",
32903
+ content_type: "video/mp4"
32904
+ }
32905
+ },
31943
32906
  {
31944
32907
  provider: "fal-ai",
31945
32908
  skill_id: "fal-ai-kling-video-v2-master-image-to-video",
@@ -31977,6 +32940,27 @@ var registry_default = [
31977
32940
  ]
31978
32941
  },
31979
32942
  providers: [
32943
+ {
32944
+ provider: "kling",
32945
+ auth_env: "KLING_ACCESS_KEY",
32946
+ skill_id: "kling-text-to-video",
32947
+ endpoint: "v1/videos/text2video",
32948
+ param_map: {
32949
+ prompt: "prompt",
32950
+ negative_prompt: "negative_prompt",
32951
+ duration: "duration",
32952
+ size: "aspect_ratio",
32953
+ guidance: "cfg_scale"
32954
+ },
32955
+ defaults: {
32956
+ model_name: "kling-v2-master"
32957
+ },
32958
+ output_map: {
32959
+ type: "video",
32960
+ extract_path: "task_result.videos[].url",
32961
+ content_type: "video/mp4"
32962
+ }
32963
+ },
31980
32964
  {
31981
32965
  provider: "fal-ai",
31982
32966
  skill_id: "fal-ai-kling-video-v2-master-text-to-video",
@@ -32017,6 +33001,28 @@ var registry_default = [
32017
33001
  ]
32018
33002
  },
32019
33003
  providers: [
33004
+ {
33005
+ provider: "kling",
33006
+ auth_env: "KLING_ACCESS_KEY",
33007
+ skill_id: "kling-image-to-video",
33008
+ endpoint: "v1/videos/image2video",
33009
+ param_map: {
33010
+ prompt: "prompt",
33011
+ negative_prompt: "negative_prompt",
33012
+ image: "image",
33013
+ duration: "duration",
33014
+ size: "aspect_ratio",
33015
+ guidance: "cfg_scale"
33016
+ },
33017
+ defaults: {
33018
+ model_name: "kling-v2-1-master"
33019
+ },
33020
+ output_map: {
33021
+ type: "video",
33022
+ extract_path: "task_result.videos[].url",
33023
+ content_type: "video/mp4"
33024
+ }
33025
+ },
32020
33026
  {
32021
33027
  provider: "fal-ai",
32022
33028
  skill_id: "fal-ai-kling-video-v2.1-master-image-to-video",
@@ -32054,6 +33060,27 @@ var registry_default = [
32054
33060
  ]
32055
33061
  },
32056
33062
  providers: [
33063
+ {
33064
+ provider: "kling",
33065
+ auth_env: "KLING_ACCESS_KEY",
33066
+ skill_id: "kling-text-to-video",
33067
+ endpoint: "v1/videos/text2video",
33068
+ param_map: {
33069
+ prompt: "prompt",
33070
+ negative_prompt: "negative_prompt",
33071
+ duration: "duration",
33072
+ size: "aspect_ratio",
33073
+ guidance: "cfg_scale"
33074
+ },
33075
+ defaults: {
33076
+ model_name: "kling-v2-1-master"
33077
+ },
33078
+ output_map: {
33079
+ type: "video",
33080
+ extract_path: "task_result.videos[].url",
33081
+ content_type: "video/mp4"
33082
+ }
33083
+ },
32057
33084
  {
32058
33085
  provider: "fal-ai",
32059
33086
  skill_id: "fal-ai-kling-video-v2.1-master-text-to-video",
@@ -32094,6 +33121,29 @@ var registry_default = [
32094
33121
  ]
32095
33122
  },
32096
33123
  providers: [
33124
+ {
33125
+ provider: "kling",
33126
+ auth_env: "KLING_ACCESS_KEY",
33127
+ skill_id: "kling-image-to-video",
33128
+ endpoint: "v1/videos/image2video",
33129
+ param_map: {
33130
+ prompt: "prompt",
33131
+ negative_prompt: "negative_prompt",
33132
+ image: "image",
33133
+ duration: "duration",
33134
+ size: "aspect_ratio",
33135
+ guidance: "cfg_scale"
33136
+ },
33137
+ defaults: {
33138
+ model_name: "kling-v2-1",
33139
+ mode: "pro"
33140
+ },
33141
+ output_map: {
33142
+ type: "video",
33143
+ extract_path: "task_result.videos[].url",
33144
+ content_type: "video/mp4"
33145
+ }
33146
+ },
32097
33147
  {
32098
33148
  provider: "fal-ai",
32099
33149
  skill_id: "fal-ai-kling-video-v2.1-pro-image-to-video",
@@ -32133,6 +33183,29 @@ var registry_default = [
32133
33183
  ]
32134
33184
  },
32135
33185
  providers: [
33186
+ {
33187
+ provider: "kling",
33188
+ auth_env: "KLING_ACCESS_KEY",
33189
+ skill_id: "kling-image-to-video",
33190
+ endpoint: "v1/videos/image2video",
33191
+ param_map: {
33192
+ prompt: "prompt",
33193
+ negative_prompt: "negative_prompt",
33194
+ image: "image",
33195
+ duration: "duration",
33196
+ size: "aspect_ratio",
33197
+ guidance: "cfg_scale"
33198
+ },
33199
+ defaults: {
33200
+ model_name: "kling-v2-1",
33201
+ mode: "std"
33202
+ },
33203
+ output_map: {
33204
+ type: "video",
33205
+ extract_path: "task_result.videos[].url",
33206
+ content_type: "video/mp4"
33207
+ }
33208
+ },
32136
33209
  {
32137
33210
  provider: "fal-ai",
32138
33211
  skill_id: "fal-ai-kling-video-v2.1-standard-image-to-video",
@@ -32172,6 +33245,29 @@ var registry_default = [
32172
33245
  ]
32173
33246
  },
32174
33247
  providers: [
33248
+ {
33249
+ provider: "kling",
33250
+ auth_env: "KLING_ACCESS_KEY",
33251
+ skill_id: "kling-image-to-video",
33252
+ endpoint: "v1/videos/image2video",
33253
+ param_map: {
33254
+ prompt: "prompt",
33255
+ negative_prompt: "negative_prompt",
33256
+ image: "image",
33257
+ duration: "duration",
33258
+ size: "aspect_ratio",
33259
+ guidance: "cfg_scale"
33260
+ },
33261
+ defaults: {
33262
+ model_name: "kling-v2-5-turbo",
33263
+ mode: "pro"
33264
+ },
33265
+ output_map: {
33266
+ type: "video",
33267
+ extract_path: "task_result.videos[].url",
33268
+ content_type: "video/mp4"
33269
+ }
33270
+ },
32175
33271
  {
32176
33272
  provider: "fal-ai",
32177
33273
  skill_id: "fal-ai-kling-video-v2.5-turbo-pro-image-to-video",
@@ -32209,6 +33305,28 @@ var registry_default = [
32209
33305
  ]
32210
33306
  },
32211
33307
  providers: [
33308
+ {
33309
+ provider: "kling",
33310
+ auth_env: "KLING_ACCESS_KEY",
33311
+ skill_id: "kling-text-to-video",
33312
+ endpoint: "v1/videos/text2video",
33313
+ param_map: {
33314
+ prompt: "prompt",
33315
+ negative_prompt: "negative_prompt",
33316
+ duration: "duration",
33317
+ size: "aspect_ratio",
33318
+ guidance: "cfg_scale"
33319
+ },
33320
+ defaults: {
33321
+ model_name: "kling-v2-5-turbo",
33322
+ mode: "pro"
33323
+ },
33324
+ output_map: {
33325
+ type: "video",
33326
+ extract_path: "task_result.videos[].url",
33327
+ content_type: "video/mp4"
33328
+ }
33329
+ },
32212
33330
  {
32213
33331
  provider: "fal-ai",
32214
33332
  skill_id: "fal-ai-kling-video-v2.5-turbo-pro-text-to-video",
@@ -32249,6 +33367,29 @@ var registry_default = [
32249
33367
  ]
32250
33368
  },
32251
33369
  providers: [
33370
+ {
33371
+ provider: "kling",
33372
+ auth_env: "KLING_ACCESS_KEY",
33373
+ skill_id: "kling-image-to-video",
33374
+ endpoint: "v1/videos/image2video",
33375
+ param_map: {
33376
+ prompt: "prompt",
33377
+ negative_prompt: "negative_prompt",
33378
+ image: "image",
33379
+ duration: "duration",
33380
+ size: "aspect_ratio",
33381
+ guidance: "cfg_scale"
33382
+ },
33383
+ defaults: {
33384
+ model_name: "kling-v2-5-turbo",
33385
+ mode: "std"
33386
+ },
33387
+ output_map: {
33388
+ type: "video",
33389
+ extract_path: "task_result.videos[].url",
33390
+ content_type: "video/mp4"
33391
+ }
33392
+ },
32252
33393
  {
32253
33394
  provider: "fal-ai",
32254
33395
  skill_id: "fal-ai-kling-video-v2.5-turbo-standard-image-to-video",
@@ -32288,20 +33429,44 @@ var registry_default = [
32288
33429
  ]
32289
33430
  },
32290
33431
  providers: [
33432
+ {
33433
+ provider: "kling",
33434
+ auth_env: "KLING_ACCESS_KEY",
33435
+ skill_id: "kling-image-to-video",
33436
+ endpoint: "v1/videos/image2video",
33437
+ param_map: {
33438
+ prompt: "prompt",
33439
+ negative_prompt: "negative_prompt",
33440
+ image: "image",
33441
+ image_tail: "image_tail",
33442
+ duration: "duration",
33443
+ size: "aspect_ratio",
33444
+ voice_list: "voice_list",
33445
+ sound: "sound"
33446
+ },
33447
+ defaults: {
33448
+ model_name: "kling-v2-6",
33449
+ mode: "pro"
33450
+ },
33451
+ output_map: {
33452
+ type: "video",
33453
+ extract_path: "task_result.videos[].url",
33454
+ content_type: "video/mp4"
33455
+ }
33456
+ },
32291
33457
  {
32292
33458
  provider: "fal-ai",
32293
33459
  skill_id: "fal-ai-kling-video-v2.6-pro-image-to-video",
32294
33460
  endpoint: "fal-ai/kling-video/v2.6/pro/image-to-video",
32295
33461
  auth_env: "FAL_KEY",
32296
33462
  param_map: {
32297
- image: "image_url",
33463
+ image: "start_image_url",
33464
+ image_tail: "end_image_url",
32298
33465
  prompt: "prompt",
32299
33466
  negative_prompt: "negative_prompt",
32300
- seed: "seed",
32301
- guidance: "guidance_scale",
32302
- steps: "num_inference_steps",
32303
- format: "output_format",
32304
- safety: "enable_safety_checker"
33467
+ duration: "duration",
33468
+ voice_ids: "voice_ids",
33469
+ generate_audio: "generate_audio"
32305
33470
  },
32306
33471
  output_map: {
32307
33472
  type: "video",
@@ -32328,6 +33493,29 @@ var registry_default = [
32328
33493
  ]
32329
33494
  },
32330
33495
  providers: [
33496
+ {
33497
+ provider: "kling",
33498
+ auth_env: "KLING_ACCESS_KEY",
33499
+ skill_id: "kling-image-to-video",
33500
+ endpoint: "v1/videos/image2video",
33501
+ param_map: {
33502
+ prompt: "prompt",
33503
+ negative_prompt: "negative_prompt",
33504
+ image: "image",
33505
+ duration: "duration",
33506
+ size: "aspect_ratio",
33507
+ guidance: "cfg_scale"
33508
+ },
33509
+ defaults: {
33510
+ model_name: "kling-v2-6",
33511
+ mode: "pro"
33512
+ },
33513
+ output_map: {
33514
+ type: "video",
33515
+ extract_path: "task_result.videos[].url",
33516
+ content_type: "video/mp4"
33517
+ }
33518
+ },
32331
33519
  {
32332
33520
  provider: "fal-ai",
32333
33521
  skill_id: "fal-ai-kling-video-v2.6-pro-motion-control",
@@ -32386,6 +33574,28 @@ var registry_default = [
32386
33574
  ]
32387
33575
  },
32388
33576
  providers: [
33577
+ {
33578
+ provider: "kling",
33579
+ auth_env: "KLING_ACCESS_KEY",
33580
+ skill_id: "kling-text-to-video",
33581
+ endpoint: "v1/videos/text2video",
33582
+ param_map: {
33583
+ prompt: "prompt",
33584
+ negative_prompt: "negative_prompt",
33585
+ duration: "duration",
33586
+ size: "aspect_ratio",
33587
+ guidance: "cfg_scale"
33588
+ },
33589
+ defaults: {
33590
+ model_name: "kling-v2-6",
33591
+ mode: "pro"
33592
+ },
33593
+ output_map: {
33594
+ type: "video",
33595
+ extract_path: "task_result.videos[].url",
33596
+ content_type: "video/mp4"
33597
+ }
33598
+ },
32389
33599
  {
32390
33600
  provider: "fal-ai",
32391
33601
  skill_id: "fal-ai-kling-video-v2.6-pro-text-to-video",
@@ -32426,6 +33636,29 @@ var registry_default = [
32426
33636
  ]
32427
33637
  },
32428
33638
  providers: [
33639
+ {
33640
+ provider: "kling",
33641
+ auth_env: "KLING_ACCESS_KEY",
33642
+ skill_id: "kling-image-to-video",
33643
+ endpoint: "v1/videos/image2video",
33644
+ param_map: {
33645
+ prompt: "prompt",
33646
+ negative_prompt: "negative_prompt",
33647
+ image: "image",
33648
+ duration: "duration",
33649
+ size: "aspect_ratio",
33650
+ guidance: "cfg_scale"
33651
+ },
33652
+ defaults: {
33653
+ model_name: "kling-v2-6",
33654
+ mode: "std"
33655
+ },
33656
+ output_map: {
33657
+ type: "video",
33658
+ extract_path: "task_result.videos[].url",
33659
+ content_type: "video/mp4"
33660
+ }
33661
+ },
32429
33662
  {
32430
33663
  provider: "fal-ai",
32431
33664
  skill_id: "fal-ai-kling-video-v2.6-standard-motion-control",
@@ -32465,6 +33698,29 @@ var registry_default = [
32465
33698
  ]
32466
33699
  },
32467
33700
  providers: [
33701
+ {
33702
+ provider: "kling",
33703
+ auth_env: "KLING_ACCESS_KEY",
33704
+ skill_id: "kling-image-to-video",
33705
+ endpoint: "v1/videos/image2video",
33706
+ param_map: {
33707
+ prompt: "prompt",
33708
+ negative_prompt: "negative_prompt",
33709
+ image: "image",
33710
+ duration: "duration",
33711
+ size: "aspect_ratio",
33712
+ guidance: "cfg_scale"
33713
+ },
33714
+ defaults: {
33715
+ model_name: "kling-v3",
33716
+ mode: "pro"
33717
+ },
33718
+ output_map: {
33719
+ type: "video",
33720
+ extract_path: "task_result.videos[].url",
33721
+ content_type: "video/mp4"
33722
+ }
33723
+ },
32468
33724
  {
32469
33725
  provider: "fal-ai",
32470
33726
  skill_id: "fal-ai-kling-video-pro",
@@ -32507,6 +33763,29 @@ var registry_default = [
32507
33763
  ]
32508
33764
  },
32509
33765
  providers: [
33766
+ {
33767
+ provider: "kling",
33768
+ auth_env: "KLING_ACCESS_KEY",
33769
+ skill_id: "kling-image-to-video",
33770
+ endpoint: "v1/videos/image2video",
33771
+ param_map: {
33772
+ prompt: "prompt",
33773
+ negative_prompt: "negative_prompt",
33774
+ image: "image",
33775
+ duration: "duration",
33776
+ size: "aspect_ratio",
33777
+ guidance: "cfg_scale"
33778
+ },
33779
+ defaults: {
33780
+ model_name: "kling-v3",
33781
+ mode: "pro"
33782
+ },
33783
+ output_map: {
33784
+ type: "video",
33785
+ extract_path: "task_result.videos[].url",
33786
+ content_type: "video/mp4"
33787
+ }
33788
+ },
32510
33789
  {
32511
33790
  provider: "fal-ai",
32512
33791
  skill_id: "fal-ai-kling-video-v3-pro-motion-control",
@@ -32562,6 +33841,28 @@ var registry_default = [
32562
33841
  ]
32563
33842
  },
32564
33843
  providers: [
33844
+ {
33845
+ provider: "kling",
33846
+ auth_env: "KLING_ACCESS_KEY",
33847
+ skill_id: "kling-text-to-video",
33848
+ endpoint: "v1/videos/text2video",
33849
+ param_map: {
33850
+ prompt: "prompt",
33851
+ negative_prompt: "negative_prompt",
33852
+ duration: "duration",
33853
+ size: "aspect_ratio",
33854
+ guidance: "cfg_scale"
33855
+ },
33856
+ defaults: {
33857
+ model_name: "kling-v3",
33858
+ mode: "pro"
33859
+ },
33860
+ output_map: {
33861
+ type: "video",
33862
+ extract_path: "task_result.videos[].url",
33863
+ content_type: "video/mp4"
33864
+ }
33865
+ },
32565
33866
  {
32566
33867
  provider: "fal-ai",
32567
33868
  skill_id: "fal-ai-kling-video-v3-pro-text-to-video",
@@ -32601,6 +33902,29 @@ var registry_default = [
32601
33902
  ]
32602
33903
  },
32603
33904
  providers: [
33905
+ {
33906
+ provider: "kling",
33907
+ auth_env: "KLING_ACCESS_KEY",
33908
+ skill_id: "kling-image-to-video",
33909
+ endpoint: "v1/videos/image2video",
33910
+ param_map: {
33911
+ prompt: "prompt",
33912
+ negative_prompt: "negative_prompt",
33913
+ image: "image",
33914
+ duration: "duration",
33915
+ size: "aspect_ratio",
33916
+ guidance: "cfg_scale"
33917
+ },
33918
+ defaults: {
33919
+ model_name: "kling-v3",
33920
+ mode: "std"
33921
+ },
33922
+ output_map: {
33923
+ type: "video",
33924
+ extract_path: "task_result.videos[].url",
33925
+ content_type: "video/mp4"
33926
+ }
33927
+ },
32604
33928
  {
32605
33929
  provider: "fal-ai",
32606
33930
  skill_id: "fal-ai-kling-video-v3-standard-image-to-video",
@@ -32641,6 +33965,29 @@ var registry_default = [
32641
33965
  ]
32642
33966
  },
32643
33967
  providers: [
33968
+ {
33969
+ provider: "kling",
33970
+ auth_env: "KLING_ACCESS_KEY",
33971
+ skill_id: "kling-image-to-video",
33972
+ endpoint: "v1/videos/image2video",
33973
+ param_map: {
33974
+ prompt: "prompt",
33975
+ negative_prompt: "negative_prompt",
33976
+ image: "image",
33977
+ duration: "duration",
33978
+ size: "aspect_ratio",
33979
+ guidance: "cfg_scale"
33980
+ },
33981
+ defaults: {
33982
+ model_name: "kling-v3",
33983
+ mode: "std"
33984
+ },
33985
+ output_map: {
33986
+ type: "video",
33987
+ extract_path: "task_result.videos[].url",
33988
+ content_type: "video/mp4"
33989
+ }
33990
+ },
32644
33991
  {
32645
33992
  provider: "fal-ai",
32646
33993
  skill_id: "fal-ai-kling-video-v3-standard-motion-control",
@@ -32699,6 +34046,28 @@ var registry_default = [
32699
34046
  ]
32700
34047
  },
32701
34048
  providers: [
34049
+ {
34050
+ provider: "kling",
34051
+ auth_env: "KLING_ACCESS_KEY",
34052
+ skill_id: "kling-text-to-video",
34053
+ endpoint: "v1/videos/text2video",
34054
+ param_map: {
34055
+ prompt: "prompt",
34056
+ negative_prompt: "negative_prompt",
34057
+ duration: "duration",
34058
+ size: "aspect_ratio",
34059
+ guidance: "cfg_scale"
34060
+ },
34061
+ defaults: {
34062
+ model_name: "kling-v3",
34063
+ mode: "std"
34064
+ },
34065
+ output_map: {
34066
+ type: "video",
34067
+ extract_path: "task_result.videos[].url",
34068
+ content_type: "video/mp4"
34069
+ }
34070
+ },
32702
34071
  {
32703
34072
  provider: "fal-ai",
32704
34073
  skill_id: "fal-ai-kling-video-v3-standard-text-to-video",
@@ -32737,6 +34106,24 @@ var registry_default = [
32737
34106
  ]
32738
34107
  },
32739
34108
  providers: [
34109
+ {
34110
+ provider: "kling",
34111
+ auth_env: "KLING_ACCESS_KEY",
34112
+ skill_id: "kling-video-to-audio",
34113
+ endpoint: "v1/audios/video2audio",
34114
+ param_map: {
34115
+ video: "video_url",
34116
+ prompt: "prompt"
34117
+ },
34118
+ defaults: {
34119
+ model_name: "kling-v1"
34120
+ },
34121
+ output_map: {
34122
+ type: "audio",
34123
+ extract_path: "task_result.audios[].url",
34124
+ content_type: "audio/mpeg"
34125
+ }
34126
+ },
32740
34127
  {
32741
34128
  provider: "fal-ai",
32742
34129
  skill_id: "fal-ai-kling-video-video-to-audio",
@@ -33277,6 +34664,26 @@ var registry_default = [
33277
34664
  ]
33278
34665
  },
33279
34666
  providers: [
34667
+ {
34668
+ provider: "kling",
34669
+ auth_env: "KLING_ACCESS_KEY",
34670
+ skill_id: "kling-avatar",
34671
+ endpoint: "v1/videos/avatar",
34672
+ param_map: {
34673
+ image: "image",
34674
+ prompt: "text",
34675
+ audio: "audio_url"
34676
+ },
34677
+ defaults: {
34678
+ model_name: "kling-v1",
34679
+ mode: "pro"
34680
+ },
34681
+ output_map: {
34682
+ type: "video",
34683
+ extract_path: "task_result.videos[].url",
34684
+ content_type: "video/mp4"
34685
+ }
34686
+ },
33280
34687
  {
33281
34688
  provider: "replicate",
33282
34689
  skill_id: "replicate-kwaivgi-kling-avatar-v2",
@@ -33316,6 +34723,25 @@ var registry_default = [
33316
34723
  ]
33317
34724
  },
33318
34725
  providers: [
34726
+ {
34727
+ provider: "kling",
34728
+ auth_env: "KLING_ACCESS_KEY",
34729
+ skill_id: "kling-lip-sync",
34730
+ endpoint: "v1/videos/lip-sync",
34731
+ param_map: {
34732
+ video: "video_url",
34733
+ prompt: "text",
34734
+ audio: "sound_file"
34735
+ },
34736
+ defaults: {
34737
+ model_name: "kling-v1"
34738
+ },
34739
+ output_map: {
34740
+ type: "video",
34741
+ extract_path: "task_result.videos[].url",
34742
+ content_type: "video/mp4"
34743
+ }
34744
+ },
33319
34745
  {
33320
34746
  provider: "replicate",
33321
34747
  skill_id: "replicate-kwaivgi-kling-lip-sync",
@@ -33354,6 +34780,29 @@ var registry_default = [
33354
34780
  ]
33355
34781
  },
33356
34782
  providers: [
34783
+ {
34784
+ provider: "kling",
34785
+ auth_env: "KLING_ACCESS_KEY",
34786
+ skill_id: "kling-image-to-video",
34787
+ endpoint: "v1/videos/image2video",
34788
+ param_map: {
34789
+ prompt: "prompt",
34790
+ negative_prompt: "negative_prompt",
34791
+ image: "image",
34792
+ duration: "duration",
34793
+ size: "aspect_ratio",
34794
+ guidance: "cfg_scale"
34795
+ },
34796
+ defaults: {
34797
+ model_name: "kling-video-o1",
34798
+ mode: "pro"
34799
+ },
34800
+ output_map: {
34801
+ type: "video",
34802
+ extract_path: "task_result.videos[].url",
34803
+ content_type: "video/mp4"
34804
+ }
34805
+ },
33357
34806
  {
33358
34807
  provider: "replicate",
33359
34808
  skill_id: "replicate-kwaivgi-kling-o1",
@@ -33396,6 +34845,29 @@ var registry_default = [
33396
34845
  ]
33397
34846
  },
33398
34847
  providers: [
34848
+ {
34849
+ provider: "kling",
34850
+ auth_env: "KLING_ACCESS_KEY",
34851
+ skill_id: "kling-image-to-video",
34852
+ endpoint: "v1/videos/image2video",
34853
+ param_map: {
34854
+ prompt: "prompt",
34855
+ negative_prompt: "negative_prompt",
34856
+ image: "image",
34857
+ duration: "duration",
34858
+ size: "aspect_ratio",
34859
+ guidance: "cfg_scale"
34860
+ },
34861
+ defaults: {
34862
+ model_name: "kling-v1-5",
34863
+ mode: "pro"
34864
+ },
34865
+ output_map: {
34866
+ type: "video",
34867
+ extract_path: "task_result.videos[].url",
34868
+ content_type: "video/mp4"
34869
+ }
34870
+ },
33399
34871
  {
33400
34872
  provider: "replicate",
33401
34873
  skill_id: "replicate-kwaivgi-kling-v1.5-pro",
@@ -33438,6 +34910,29 @@ var registry_default = [
33438
34910
  ]
33439
34911
  },
33440
34912
  providers: [
34913
+ {
34914
+ provider: "kling",
34915
+ auth_env: "KLING_ACCESS_KEY",
34916
+ skill_id: "kling-image-to-video",
34917
+ endpoint: "v1/videos/image2video",
34918
+ param_map: {
34919
+ prompt: "prompt",
34920
+ negative_prompt: "negative_prompt",
34921
+ image: "image",
34922
+ duration: "duration",
34923
+ size: "aspect_ratio",
34924
+ guidance: "cfg_scale"
34925
+ },
34926
+ defaults: {
34927
+ model_name: "kling-v1-5",
34928
+ mode: "std"
34929
+ },
34930
+ output_map: {
34931
+ type: "video",
34932
+ extract_path: "task_result.videos[].url",
34933
+ content_type: "video/mp4"
34934
+ }
34935
+ },
33441
34936
  {
33442
34937
  provider: "replicate",
33443
34938
  skill_id: "replicate-kwaivgi-kling-v1.5-standard",
@@ -33476,6 +34971,29 @@ var registry_default = [
33476
34971
  ]
33477
34972
  },
33478
34973
  providers: [
34974
+ {
34975
+ provider: "kling",
34976
+ auth_env: "KLING_ACCESS_KEY",
34977
+ skill_id: "kling-image-to-video",
34978
+ endpoint: "v1/videos/image2video",
34979
+ param_map: {
34980
+ prompt: "prompt",
34981
+ negative_prompt: "negative_prompt",
34982
+ image: "image",
34983
+ duration: "duration",
34984
+ size: "aspect_ratio",
34985
+ guidance: "cfg_scale"
34986
+ },
34987
+ defaults: {
34988
+ model_name: "kling-v1-6",
34989
+ mode: "pro"
34990
+ },
34991
+ output_map: {
34992
+ type: "video",
34993
+ extract_path: "task_result.videos[].url",
34994
+ content_type: "video/mp4"
34995
+ }
34996
+ },
33479
34997
  {
33480
34998
  provider: "replicate",
33481
34999
  skill_id: "replicate-kwaivgi-kling-v1.6-pro",
@@ -33518,6 +35036,29 @@ var registry_default = [
33518
35036
  ]
33519
35037
  },
33520
35038
  providers: [
35039
+ {
35040
+ provider: "kling",
35041
+ auth_env: "KLING_ACCESS_KEY",
35042
+ skill_id: "kling-image-to-video",
35043
+ endpoint: "v1/videos/image2video",
35044
+ param_map: {
35045
+ prompt: "prompt",
35046
+ negative_prompt: "negative_prompt",
35047
+ image: "image",
35048
+ duration: "duration",
35049
+ size: "aspect_ratio",
35050
+ guidance: "cfg_scale"
35051
+ },
35052
+ defaults: {
35053
+ model_name: "kling-v1-6",
35054
+ mode: "std"
35055
+ },
35056
+ output_map: {
35057
+ type: "video",
35058
+ extract_path: "task_result.videos[].url",
35059
+ content_type: "video/mp4"
35060
+ }
35061
+ },
33521
35062
  {
33522
35063
  provider: "replicate",
33523
35064
  skill_id: "replicate-kwaivgi-kling-v1.6-standard",
@@ -33561,6 +35102,28 @@ var registry_default = [
33561
35102
  ]
33562
35103
  },
33563
35104
  providers: [
35105
+ {
35106
+ provider: "kling",
35107
+ auth_env: "KLING_ACCESS_KEY",
35108
+ skill_id: "kling-image-to-video",
35109
+ endpoint: "v1/videos/image2video",
35110
+ param_map: {
35111
+ prompt: "prompt",
35112
+ negative_prompt: "negative_prompt",
35113
+ image: "image",
35114
+ duration: "duration",
35115
+ size: "aspect_ratio",
35116
+ guidance: "cfg_scale"
35117
+ },
35118
+ defaults: {
35119
+ model_name: "kling-v2-master"
35120
+ },
35121
+ output_map: {
35122
+ type: "video",
35123
+ extract_path: "task_result.videos[].url",
35124
+ content_type: "video/mp4"
35125
+ }
35126
+ },
33564
35127
  {
33565
35128
  provider: "replicate",
33566
35129
  skill_id: "replicate-kwaivgi-kling-v2.0",
@@ -33604,6 +35167,29 @@ var registry_default = [
33604
35167
  ]
33605
35168
  },
33606
35169
  providers: [
35170
+ {
35171
+ provider: "kling",
35172
+ auth_env: "KLING_ACCESS_KEY",
35173
+ skill_id: "kling-image-to-video",
35174
+ endpoint: "v1/videos/image2video",
35175
+ param_map: {
35176
+ prompt: "prompt",
35177
+ negative_prompt: "negative_prompt",
35178
+ image: "image",
35179
+ duration: "duration",
35180
+ size: "aspect_ratio",
35181
+ guidance: "cfg_scale"
35182
+ },
35183
+ defaults: {
35184
+ model_name: "kling-v2-1",
35185
+ mode: "pro"
35186
+ },
35187
+ output_map: {
35188
+ type: "video",
35189
+ extract_path: "task_result.videos[].url",
35190
+ content_type: "video/mp4"
35191
+ }
35192
+ },
33607
35193
  {
33608
35194
  provider: "replicate",
33609
35195
  skill_id: "replicate-kwaivgi-kling-v2.1",
@@ -33642,6 +35228,28 @@ var registry_default = [
33642
35228
  ]
33643
35229
  },
33644
35230
  providers: [
35231
+ {
35232
+ provider: "kling",
35233
+ auth_env: "KLING_ACCESS_KEY",
35234
+ skill_id: "kling-image-to-video",
35235
+ endpoint: "v1/videos/image2video",
35236
+ param_map: {
35237
+ prompt: "prompt",
35238
+ negative_prompt: "negative_prompt",
35239
+ image: "image",
35240
+ duration: "duration",
35241
+ size: "aspect_ratio",
35242
+ guidance: "cfg_scale"
35243
+ },
35244
+ defaults: {
35245
+ model_name: "kling-v2-1-master"
35246
+ },
35247
+ output_map: {
35248
+ type: "video",
35249
+ extract_path: "task_result.videos[].url",
35250
+ content_type: "video/mp4"
35251
+ }
35252
+ },
33645
35253
  {
33646
35254
  provider: "replicate",
33647
35255
  skill_id: "replicate-kwaivgi-kling-v2.1-master",
@@ -33684,6 +35292,29 @@ var registry_default = [
33684
35292
  ]
33685
35293
  },
33686
35294
  providers: [
35295
+ {
35296
+ provider: "kling",
35297
+ auth_env: "KLING_ACCESS_KEY",
35298
+ skill_id: "kling-image-to-video",
35299
+ endpoint: "v1/videos/image2video",
35300
+ param_map: {
35301
+ prompt: "prompt",
35302
+ negative_prompt: "negative_prompt",
35303
+ image: "image",
35304
+ duration: "duration",
35305
+ size: "aspect_ratio",
35306
+ guidance: "cfg_scale"
35307
+ },
35308
+ defaults: {
35309
+ model_name: "kling-v2-5-turbo",
35310
+ mode: "pro"
35311
+ },
35312
+ output_map: {
35313
+ type: "video",
35314
+ extract_path: "task_result.videos[].url",
35315
+ content_type: "video/mp4"
35316
+ }
35317
+ },
33687
35318
  {
33688
35319
  provider: "replicate",
33689
35320
  skill_id: "replicate-kwaivgi-kling-v2.5-turbo-pro",
@@ -33726,6 +35357,29 @@ var registry_default = [
33726
35357
  ]
33727
35358
  },
33728
35359
  providers: [
35360
+ {
35361
+ provider: "kling",
35362
+ auth_env: "KLING_ACCESS_KEY",
35363
+ skill_id: "kling-image-to-video",
35364
+ endpoint: "v1/videos/image2video",
35365
+ param_map: {
35366
+ prompt: "prompt",
35367
+ negative_prompt: "negative_prompt",
35368
+ image: "image",
35369
+ duration: "duration",
35370
+ size: "aspect_ratio",
35371
+ guidance: "cfg_scale"
35372
+ },
35373
+ defaults: {
35374
+ model_name: "kling-v2-5-turbo",
35375
+ mode: "pro"
35376
+ },
35377
+ output_map: {
35378
+ type: "video",
35379
+ extract_path: "task_result.videos[].url",
35380
+ content_type: "video/mp4"
35381
+ }
35382
+ },
33729
35383
  {
33730
35384
  provider: "wavespeed",
33731
35385
  skill_id: "wavespeed-kwaivgi-kling-v2.5-turbo-pro-image-to-video",
@@ -33765,6 +35419,29 @@ var registry_default = [
33765
35419
  ]
33766
35420
  },
33767
35421
  providers: [
35422
+ {
35423
+ provider: "kling",
35424
+ auth_env: "KLING_ACCESS_KEY",
35425
+ skill_id: "kling-image-to-video",
35426
+ endpoint: "v1/videos/image2video",
35427
+ param_map: {
35428
+ prompt: "prompt",
35429
+ negative_prompt: "negative_prompt",
35430
+ image: "image",
35431
+ duration: "duration",
35432
+ size: "aspect_ratio",
35433
+ guidance: "cfg_scale"
35434
+ },
35435
+ defaults: {
35436
+ model_name: "kling-v2-6",
35437
+ mode: "pro"
35438
+ },
35439
+ output_map: {
35440
+ type: "video",
35441
+ extract_path: "task_result.videos[].url",
35442
+ content_type: "video/mp4"
35443
+ }
35444
+ },
33768
35445
  {
33769
35446
  provider: "replicate",
33770
35447
  skill_id: "replicate-kwaivgi-kling-v2.6",
@@ -33807,6 +35484,29 @@ var registry_default = [
33807
35484
  ]
33808
35485
  },
33809
35486
  providers: [
35487
+ {
35488
+ provider: "kling",
35489
+ auth_env: "KLING_ACCESS_KEY",
35490
+ skill_id: "kling-image-to-video",
35491
+ endpoint: "v1/videos/image2video",
35492
+ param_map: {
35493
+ prompt: "prompt",
35494
+ negative_prompt: "negative_prompt",
35495
+ image: "image",
35496
+ duration: "duration",
35497
+ size: "aspect_ratio",
35498
+ guidance: "cfg_scale"
35499
+ },
35500
+ defaults: {
35501
+ model_name: "kling-v3-omni",
35502
+ mode: "pro"
35503
+ },
35504
+ output_map: {
35505
+ type: "video",
35506
+ extract_path: "task_result.videos[].url",
35507
+ content_type: "video/mp4"
35508
+ }
35509
+ },
33810
35510
  {
33811
35511
  provider: "replicate",
33812
35512
  skill_id: "replicate-kwaivgi-kling-v3-omni-video",
@@ -33849,6 +35549,29 @@ var registry_default = [
33849
35549
  ]
33850
35550
  },
33851
35551
  providers: [
35552
+ {
35553
+ provider: "kling",
35554
+ auth_env: "KLING_ACCESS_KEY",
35555
+ skill_id: "kling-image-to-video",
35556
+ endpoint: "v1/videos/image2video",
35557
+ param_map: {
35558
+ prompt: "prompt",
35559
+ negative_prompt: "negative_prompt",
35560
+ image: "image",
35561
+ duration: "duration",
35562
+ size: "aspect_ratio",
35563
+ guidance: "cfg_scale"
35564
+ },
35565
+ defaults: {
35566
+ model_name: "kling-v3",
35567
+ mode: "pro"
35568
+ },
35569
+ output_map: {
35570
+ type: "video",
35571
+ extract_path: "task_result.videos[].url",
35572
+ content_type: "video/mp4"
35573
+ }
35574
+ },
33852
35575
  {
33853
35576
  provider: "replicate",
33854
35577
  skill_id: "replicate-kwaivgi-kling-v3-video",
@@ -33891,6 +35614,24 @@ var registry_default = [
33891
35614
  ]
33892
35615
  },
33893
35616
  providers: [
35617
+ {
35618
+ provider: "kling",
35619
+ auth_env: "KLING_ACCESS_KEY",
35620
+ skill_id: "kling-video-to-audio",
35621
+ endpoint: "v1/audios/video2audio",
35622
+ param_map: {
35623
+ video: "video_url",
35624
+ prompt: "prompt"
35625
+ },
35626
+ defaults: {
35627
+ model_name: "kling-v1"
35628
+ },
35629
+ output_map: {
35630
+ type: "audio",
35631
+ extract_path: "task_result.audios[].url",
35632
+ content_type: "audio/mpeg"
35633
+ }
35634
+ },
33894
35635
  {
33895
35636
  provider: "wavespeed",
33896
35637
  skill_id: "wavespeed-kwaivgi-kling-video-to-audio",
@@ -70689,8 +72430,12 @@ var registry_default = [
70689
72430
  "openai-gpt-5.4-pro"
70690
72431
  ],
70691
72432
  modality: {
70692
- inputs: ["text"],
70693
- outputs: ["text"]
72433
+ inputs: [
72434
+ "text"
72435
+ ],
72436
+ outputs: [
72437
+ "text"
72438
+ ]
70694
72439
  },
70695
72440
  providers: [
70696
72441
  {
@@ -70698,7 +72443,9 @@ var registry_default = [
70698
72443
  skill_id: "openrouter-gpt-5.4-pro",
70699
72444
  endpoint: "openai/gpt-5.4-pro",
70700
72445
  auth_env: "OPENROUTER_API_KEY",
70701
- param_map: { prompt: "prompt" },
72446
+ param_map: {
72447
+ prompt: "prompt"
72448
+ },
70702
72449
  output_map: {
70703
72450
  type: "text",
70704
72451
  extract_path: "choices[0].message.content",
@@ -70714,8 +72461,12 @@ var registry_default = [
70714
72461
  "openai-gpt-5.4"
70715
72462
  ],
70716
72463
  modality: {
70717
- inputs: ["text"],
70718
- outputs: ["text"]
72464
+ inputs: [
72465
+ "text"
72466
+ ],
72467
+ outputs: [
72468
+ "text"
72469
+ ]
70719
72470
  },
70720
72471
  providers: [
70721
72472
  {
@@ -70723,7 +72474,9 @@ var registry_default = [
70723
72474
  skill_id: "openrouter-gpt-5.4",
70724
72475
  endpoint: "openai/gpt-5.4",
70725
72476
  auth_env: "OPENROUTER_API_KEY",
70726
- param_map: { prompt: "prompt" },
72477
+ param_map: {
72478
+ prompt: "prompt"
72479
+ },
70727
72480
  output_map: {
70728
72481
  type: "text",
70729
72482
  extract_path: "choices[0].message.content",
@@ -70739,8 +72492,12 @@ var registry_default = [
70739
72492
  "openai-gpt-5.4-mini"
70740
72493
  ],
70741
72494
  modality: {
70742
- inputs: ["text"],
70743
- outputs: ["text"]
72495
+ inputs: [
72496
+ "text"
72497
+ ],
72498
+ outputs: [
72499
+ "text"
72500
+ ]
70744
72501
  },
70745
72502
  providers: [
70746
72503
  {
@@ -70748,7 +72505,9 @@ var registry_default = [
70748
72505
  skill_id: "openrouter-gpt-5.4-mini",
70749
72506
  endpoint: "openai/gpt-5.4-mini",
70750
72507
  auth_env: "OPENROUTER_API_KEY",
70751
- param_map: { prompt: "prompt" },
72508
+ param_map: {
72509
+ prompt: "prompt"
72510
+ },
70752
72511
  output_map: {
70753
72512
  type: "text",
70754
72513
  extract_path: "choices[0].message.content",
@@ -70764,8 +72523,12 @@ var registry_default = [
70764
72523
  "google-gemini-3.1-pro"
70765
72524
  ],
70766
72525
  modality: {
70767
- inputs: ["text"],
70768
- outputs: ["text"]
72526
+ inputs: [
72527
+ "text"
72528
+ ],
72529
+ outputs: [
72530
+ "text"
72531
+ ]
70769
72532
  },
70770
72533
  providers: [
70771
72534
  {
@@ -70773,7 +72536,9 @@ var registry_default = [
70773
72536
  skill_id: "openrouter-gemini-3.1-pro",
70774
72537
  endpoint: "google/gemini-3.1-pro-preview",
70775
72538
  auth_env: "OPENROUTER_API_KEY",
70776
- param_map: { prompt: "prompt" },
72539
+ param_map: {
72540
+ prompt: "prompt"
72541
+ },
70777
72542
  output_map: {
70778
72543
  type: "text",
70779
72544
  extract_path: "choices[0].message.content",
@@ -70789,8 +72554,12 @@ var registry_default = [
70789
72554
  "xai-grok-4.20"
70790
72555
  ],
70791
72556
  modality: {
70792
- inputs: ["text"],
70793
- outputs: ["text"]
72557
+ inputs: [
72558
+ "text"
72559
+ ],
72560
+ outputs: [
72561
+ "text"
72562
+ ]
70794
72563
  },
70795
72564
  providers: [
70796
72565
  {
@@ -70798,7 +72567,9 @@ var registry_default = [
70798
72567
  skill_id: "openrouter-grok-4.20",
70799
72568
  endpoint: "x-ai/grok-4.20-beta",
70800
72569
  auth_env: "OPENROUTER_API_KEY",
70801
- param_map: { prompt: "prompt" },
72570
+ param_map: {
72571
+ prompt: "prompt"
72572
+ },
70802
72573
  output_map: {
70803
72574
  type: "text",
70804
72575
  extract_path: "choices[0].message.content",
@@ -70814,8 +72585,12 @@ var registry_default = [
70814
72585
  "writer-palmyra-x5"
70815
72586
  ],
70816
72587
  modality: {
70817
- inputs: ["text"],
70818
- outputs: ["text"]
72588
+ inputs: [
72589
+ "text"
72590
+ ],
72591
+ outputs: [
72592
+ "text"
72593
+ ]
70819
72594
  },
70820
72595
  providers: [
70821
72596
  {
@@ -70823,7 +72598,9 @@ var registry_default = [
70823
72598
  skill_id: "openrouter-palmyra-x5",
70824
72599
  endpoint: "writer/palmyra-x5",
70825
72600
  auth_env: "OPENROUTER_API_KEY",
70826
- param_map: { prompt: "prompt" },
72601
+ param_map: {
72602
+ prompt: "prompt"
72603
+ },
70827
72604
  output_map: {
70828
72605
  type: "text",
70829
72606
  extract_path: "choices[0].message.content",
@@ -70839,8 +72616,12 @@ var registry_default = [
70839
72616
  "openai-gpt-5.4-nano"
70840
72617
  ],
70841
72618
  modality: {
70842
- inputs: ["text"],
70843
- outputs: ["text"]
72619
+ inputs: [
72620
+ "text"
72621
+ ],
72622
+ outputs: [
72623
+ "text"
72624
+ ]
70844
72625
  },
70845
72626
  providers: [
70846
72627
  {
@@ -70848,7 +72629,9 @@ var registry_default = [
70848
72629
  skill_id: "openrouter-gpt-5.4-nano",
70849
72630
  endpoint: "openai/gpt-5.4-nano",
70850
72631
  auth_env: "OPENROUTER_API_KEY",
70851
- param_map: { prompt: "prompt" },
72632
+ param_map: {
72633
+ prompt: "prompt"
72634
+ },
70852
72635
  output_map: {
70853
72636
  type: "text",
70854
72637
  extract_path: "choices[0].message.content",
@@ -70864,8 +72647,12 @@ var registry_default = [
70864
72647
  "xiaomi-mimo-v2-pro"
70865
72648
  ],
70866
72649
  modality: {
70867
- inputs: ["text"],
70868
- outputs: ["text"]
72650
+ inputs: [
72651
+ "text"
72652
+ ],
72653
+ outputs: [
72654
+ "text"
72655
+ ]
70869
72656
  },
70870
72657
  providers: [
70871
72658
  {
@@ -70873,7 +72660,9 @@ var registry_default = [
70873
72660
  skill_id: "openrouter-mimo-v2-pro",
70874
72661
  endpoint: "xiaomi/mimo-v2-pro",
70875
72662
  auth_env: "OPENROUTER_API_KEY",
70876
- param_map: { prompt: "prompt" },
72663
+ param_map: {
72664
+ prompt: "prompt"
72665
+ },
70877
72666
  output_map: {
70878
72667
  type: "text",
70879
72668
  extract_path: "choices[0].message.content",
@@ -70889,8 +72678,12 @@ var registry_default = [
70889
72678
  "xiaomi-mimo-v2-omni"
70890
72679
  ],
70891
72680
  modality: {
70892
- inputs: ["text"],
70893
- outputs: ["text"]
72681
+ inputs: [
72682
+ "text"
72683
+ ],
72684
+ outputs: [
72685
+ "text"
72686
+ ]
70894
72687
  },
70895
72688
  providers: [
70896
72689
  {
@@ -70898,7 +72691,9 @@ var registry_default = [
70898
72691
  skill_id: "openrouter-mimo-v2-omni",
70899
72692
  endpoint: "xiaomi/mimo-v2-omni",
70900
72693
  auth_env: "OPENROUTER_API_KEY",
70901
- param_map: { prompt: "prompt" },
72694
+ param_map: {
72695
+ prompt: "prompt"
72696
+ },
70902
72697
  output_map: {
70903
72698
  type: "text",
70904
72699
  extract_path: "choices[0].message.content",
@@ -70914,8 +72709,12 @@ var registry_default = [
70914
72709
  "mistralai-mistral-small-4"
70915
72710
  ],
70916
72711
  modality: {
70917
- inputs: ["text"],
70918
- outputs: ["text"]
72712
+ inputs: [
72713
+ "text"
72714
+ ],
72715
+ outputs: [
72716
+ "text"
72717
+ ]
70919
72718
  },
70920
72719
  providers: [
70921
72720
  {
@@ -70923,7 +72722,9 @@ var registry_default = [
70923
72722
  skill_id: "openrouter-mistral-small-4",
70924
72723
  endpoint: "mistralai/mistral-small-2603",
70925
72724
  auth_env: "OPENROUTER_API_KEY",
70926
- param_map: { prompt: "prompt" },
72725
+ param_map: {
72726
+ prompt: "prompt"
72727
+ },
70927
72728
  output_map: {
70928
72729
  type: "text",
70929
72730
  extract_path: "choices[0].message.content",
@@ -70939,8 +72740,12 @@ var registry_default = [
70939
72740
  "minimax-m27"
70940
72741
  ],
70941
72742
  modality: {
70942
- inputs: ["text"],
70943
- outputs: ["text"]
72743
+ inputs: [
72744
+ "text"
72745
+ ],
72746
+ outputs: [
72747
+ "text"
72748
+ ]
70944
72749
  },
70945
72750
  providers: [
70946
72751
  {
@@ -70948,7 +72753,9 @@ var registry_default = [
70948
72753
  skill_id: "openrouter-minimax-m2.7",
70949
72754
  endpoint: "minimax/minimax-m2.7",
70950
72755
  auth_env: "OPENROUTER_API_KEY",
70951
- param_map: { prompt: "prompt" },
72756
+ param_map: {
72757
+ prompt: "prompt"
72758
+ },
70952
72759
  output_map: {
70953
72760
  type: "text",
70954
72761
  extract_path: "choices[0].message.content",
@@ -70964,8 +72771,12 @@ var registry_default = [
70964
72771
  "nvidia-nemotron-3-super"
70965
72772
  ],
70966
72773
  modality: {
70967
- inputs: ["text"],
70968
- outputs: ["text"]
72774
+ inputs: [
72775
+ "text"
72776
+ ],
72777
+ outputs: [
72778
+ "text"
72779
+ ]
70969
72780
  },
70970
72781
  providers: [
70971
72782
  {
@@ -70973,7 +72784,9 @@ var registry_default = [
70973
72784
  skill_id: "openrouter-nemotron-3-super",
70974
72785
  endpoint: "nvidia/nemotron-3-super-120b-a12b",
70975
72786
  auth_env: "OPENROUTER_API_KEY",
70976
- param_map: { prompt: "prompt" },
72787
+ param_map: {
72788
+ prompt: "prompt"
72789
+ },
70977
72790
  output_map: {
70978
72791
  type: "text",
70979
72792
  extract_path: "choices[0].message.content",
@@ -70989,8 +72802,12 @@ var registry_default = [
70989
72802
  "qwen-35-72b"
70990
72803
  ],
70991
72804
  modality: {
70992
- inputs: ["text"],
70993
- outputs: ["text"]
72805
+ inputs: [
72806
+ "text"
72807
+ ],
72808
+ outputs: [
72809
+ "text"
72810
+ ]
70994
72811
  },
70995
72812
  providers: [
70996
72813
  {
@@ -70998,7 +72815,9 @@ var registry_default = [
70998
72815
  skill_id: "openrouter-qwen-3.5-72b",
70999
72816
  endpoint: "qwen/qwen3.5-9b",
71000
72817
  auth_env: "OPENROUTER_API_KEY",
71001
- param_map: { prompt: "prompt" },
72818
+ param_map: {
72819
+ prompt: "prompt"
72820
+ },
71002
72821
  output_map: {
71003
72822
  type: "text",
71004
72823
  extract_path: "choices[0].message.content",
@@ -71014,8 +72833,12 @@ var registry_default = [
71014
72833
  "z-ai-glm-5-turbo"
71015
72834
  ],
71016
72835
  modality: {
71017
- inputs: ["text"],
71018
- outputs: ["text"]
72836
+ inputs: [
72837
+ "text"
72838
+ ],
72839
+ outputs: [
72840
+ "text"
72841
+ ]
71019
72842
  },
71020
72843
  providers: [
71021
72844
  {
@@ -71023,7 +72846,9 @@ var registry_default = [
71023
72846
  skill_id: "openrouter-glm-5-turbo",
71024
72847
  endpoint: "z-ai/glm-5-turbo",
71025
72848
  auth_env: "OPENROUTER_API_KEY",
71026
- param_map: { prompt: "prompt" },
72849
+ param_map: {
72850
+ prompt: "prompt"
72851
+ },
71027
72852
  output_map: {
71028
72853
  type: "text",
71029
72854
  extract_path: "choices[0].message.content",
@@ -71128,6 +72953,13 @@ function mapInput(request, binding) {
71128
72953
  result[providerKey] = transformed;
71129
72954
  }
71130
72955
  }
72956
+ if (binding.defaults) {
72957
+ for (const [key, val] of Object.entries(binding.defaults)) {
72958
+ if (!(key in result)) {
72959
+ result[key] = val;
72960
+ }
72961
+ }
72962
+ }
71131
72963
  const INTERNAL_KEYS = /* @__PURE__ */ new Set(["timeout", "reupload"]);
71132
72964
  if (request.options) {
71133
72965
  for (const [key, val] of Object.entries(request.options)) {
@@ -71298,7 +73130,8 @@ var NoProviderError = class extends GetAIApiError {
71298
73130
  "fal-ai": "FAL_KEY",
71299
73131
  replicate: "REPLICATE_API_TOKEN",
71300
73132
  wavespeed: "WAVESPEED_API_KEY",
71301
- openrouter: "OPENROUTER_API_KEY"
73133
+ openrouter: "OPENROUTER_API_KEY",
73134
+ kling: "KLING_ACCESS_KEY + KLING_SECRET_KEY"
71302
73135
  };
71303
73136
  const needed = requiredProviders.map((p) => `${p} (${envHints[p] || "unknown"})`).join(" or ");
71304
73137
  super(
@@ -71377,7 +73210,8 @@ var ENV_MAP = {
71377
73210
  "fal-ai": "FAL_KEY",
71378
73211
  replicate: "REPLICATE_API_TOKEN",
71379
73212
  wavespeed: "WAVESPEED_API_KEY",
71380
- openrouter: "OPENROUTER_API_KEY"
73213
+ openrouter: "OPENROUTER_API_KEY",
73214
+ kling: "KLING_ACCESS_KEY"
71381
73215
  };
71382
73216
  var keyOverrides = /* @__PURE__ */ new Map();
71383
73217
  function configureAuth(keys) {
@@ -71396,8 +73230,14 @@ var AuthManager = class {
71396
73230
  }
71397
73231
  for (const [provider, envVar] of Object.entries(ENV_MAP)) {
71398
73232
  if (!this.keys.has(provider)) {
71399
- const key = process.env[envVar]?.trim();
71400
- if (key) this.keys.set(provider, key);
73233
+ if (provider === "kling") {
73234
+ const ak = process.env.KLING_ACCESS_KEY?.trim();
73235
+ const sk = process.env.KLING_SECRET_KEY?.trim();
73236
+ if (ak && sk) this.keys.set("kling", `${ak}:${sk}`);
73237
+ } else {
73238
+ const key = process.env[envVar]?.trim();
73239
+ if (key) this.keys.set(provider, key);
73240
+ }
71401
73241
  }
71402
73242
  }
71403
73243
  }
@@ -71419,16 +73259,239 @@ var AuthManager = class {
71419
73259
  }
71420
73260
  };
71421
73261
 
73262
+ // src/fetch.ts
73263
+ var DEFAULT_TIMEOUT_MS = 3e4;
73264
+ var SENSITIVE_HEADER = /auth|key|token|secret|bearer/i;
73265
+ var config = {
73266
+ timeoutMs: DEFAULT_TIMEOUT_MS,
73267
+ logging: false,
73268
+ logger: (entry) => console.debug(JSON.stringify(entry))
73269
+ };
73270
+ function configureFetch(options) {
73271
+ if (options.timeoutMs !== void 0) config.timeoutMs = options.timeoutMs;
73272
+ if (options.logging !== void 0) config.logging = options.logging;
73273
+ if (options.logger) config.logger = options.logger;
73274
+ }
73275
+ function redactHeaders(headers) {
73276
+ if (!headers) return void 0;
73277
+ const entries = headers instanceof Headers ? Array.from(headers.entries()) : Array.isArray(headers) ? headers : Object.entries(headers);
73278
+ const result = {};
73279
+ for (const [key, value] of entries) {
73280
+ result[key] = SENSITIVE_HEADER.test(key) ? "[REDACTED]" : value;
73281
+ }
73282
+ return result;
73283
+ }
73284
+ function bodySize(body) {
73285
+ if (typeof body === "string") return body.length;
73286
+ if (body instanceof ArrayBuffer) return body.byteLength;
73287
+ if (body instanceof Uint8Array) return body.byteLength;
73288
+ return void 0;
73289
+ }
73290
+ async function fetchWithTimeout(url, init) {
73291
+ const finalInit = { ...init };
73292
+ if (!finalInit.signal) {
73293
+ finalInit.signal = AbortSignal.timeout(config.timeoutMs);
73294
+ }
73295
+ const method = (finalInit.method ?? "GET").toUpperCase();
73296
+ const start = Date.now();
73297
+ if (config.logging) {
73298
+ config.logger({
73299
+ kind: "request",
73300
+ method,
73301
+ url,
73302
+ bodyBytes: bodySize(finalInit.body),
73303
+ headers: redactHeaders(finalInit.headers)
73304
+ });
73305
+ }
73306
+ try {
73307
+ const response = await fetch(url, finalInit);
73308
+ if (config.logging) {
73309
+ const contentLength = response.headers.get("content-length");
73310
+ config.logger({
73311
+ kind: "response",
73312
+ method,
73313
+ url,
73314
+ status: response.status,
73315
+ durationMs: Date.now() - start,
73316
+ responseBytes: contentLength ? parseInt(contentLength, 10) : void 0
73317
+ });
73318
+ }
73319
+ return response;
73320
+ } catch (err) {
73321
+ if (config.logging) {
73322
+ config.logger({
73323
+ kind: "error",
73324
+ method,
73325
+ url,
73326
+ durationMs: Date.now() - start,
73327
+ error: err instanceof Error ? err.message : String(err)
73328
+ });
73329
+ }
73330
+ throw err;
73331
+ }
73332
+ }
73333
+
73334
+ // src/adapters/kling.ts
73335
+ import { createHmac } from "crypto";
73336
+ var API_BASE = "https://api-singapore.klingai.com";
73337
+ function generateJwt(accessKey, secretKey) {
73338
+ const header = Buffer.from(JSON.stringify({ alg: "HS256", typ: "JWT" })).toString("base64url");
73339
+ const now = Math.floor(Date.now() / 1e3);
73340
+ const payload = Buffer.from(JSON.stringify({
73341
+ iss: accessKey,
73342
+ exp: now + 1800,
73343
+ nbf: now - 5
73344
+ })).toString("base64url");
73345
+ const signature = createHmac("sha256", secretKey).update(`${header}.${payload}`).digest("base64url");
73346
+ return `${header}.${payload}.${signature}`;
73347
+ }
73348
+ function getAuthHeaders(auth) {
73349
+ const [ak, sk] = auth.split(":", 2);
73350
+ return {
73351
+ Authorization: `Bearer ${generateJwt(ak, sk)}`,
73352
+ "Content-Type": "application/json"
73353
+ };
73354
+ }
73355
+ function cleanBase64(value) {
73356
+ if (value.startsWith("data:")) {
73357
+ return value.split(",")[1] ?? value;
73358
+ }
73359
+ return value;
73360
+ }
73361
+ function cleanParams(params) {
73362
+ const result = {};
73363
+ for (const [key, value] of Object.entries(params)) {
73364
+ if (typeof value === "string" && value.startsWith("data:")) {
73365
+ result[key] = cleanBase64(value);
73366
+ } else {
73367
+ result[key] = value;
73368
+ }
73369
+ }
73370
+ return result;
73371
+ }
73372
+ async function handleHttpErrors(response, endpoint) {
73373
+ if (response.ok) return;
73374
+ const status = response.status;
73375
+ if (status === 401) {
73376
+ throw new AuthError("kling", "KLING_ACCESS_KEY");
73377
+ }
73378
+ if (status === 429) {
73379
+ const retryAfter = response.headers.get("retry-after");
73380
+ const retryMs = retryAfter ? parseInt(retryAfter, 10) * 1e3 : 6e4;
73381
+ throw new RateLimitError("kling", retryMs);
73382
+ }
73383
+ let raw;
73384
+ try {
73385
+ raw = await response.json();
73386
+ } catch {
73387
+ raw = await response.text().catch(() => null);
73388
+ }
73389
+ throw new ProviderError("kling", endpoint, status, raw);
73390
+ }
73391
+ function handleBodyErrors(json, endpoint) {
73392
+ if (json.code === 0) return;
73393
+ if (json.code >= 1e3 && json.code <= 1004) {
73394
+ throw new AuthError("kling", "KLING_ACCESS_KEY");
73395
+ }
73396
+ if (json.code >= 1100 && json.code <= 1102 || json.code >= 1302 && json.code <= 1304) {
73397
+ throw new RateLimitError("kling", 5e3);
73398
+ }
73399
+ throw new ProviderError("kling", endpoint, json.code, json);
73400
+ }
73401
+ var klingAdapter = {
73402
+ name: "kling",
73403
+ async submit(endpoint, params, auth) {
73404
+ const url = `${API_BASE}/${endpoint}`;
73405
+ const response = await fetchWithTimeout(url, {
73406
+ method: "POST",
73407
+ headers: getAuthHeaders(auth),
73408
+ body: JSON.stringify(cleanParams(params))
73409
+ });
73410
+ await handleHttpErrors(response, endpoint);
73411
+ const json = await response.json();
73412
+ handleBodyErrors(json, endpoint);
73413
+ return {
73414
+ id: json.data.task_id,
73415
+ status: "pending"
73416
+ };
73417
+ },
73418
+ async poll(taskId, auth, endpoint) {
73419
+ if (!endpoint) {
73420
+ throw new ProviderError("kling", "unknown", 400, "endpoint is required for polling");
73421
+ }
73422
+ const url = `${API_BASE}/${endpoint}/${taskId}`;
73423
+ const response = await fetchWithTimeout(url, {
73424
+ headers: getAuthHeaders(auth)
73425
+ });
73426
+ await handleHttpErrors(response, endpoint);
73427
+ const json = await response.json();
73428
+ handleBodyErrors(json, endpoint);
73429
+ const { data } = json;
73430
+ if (data.task_status === "failed") {
73431
+ return {
73432
+ id: taskId,
73433
+ status: "failed",
73434
+ error: data.task_status_msg ?? "Unknown error"
73435
+ };
73436
+ }
73437
+ if (data.task_status === "succeed") {
73438
+ return {
73439
+ id: taskId,
73440
+ status: "completed",
73441
+ output: data
73442
+ };
73443
+ }
73444
+ return {
73445
+ id: taskId,
73446
+ status: "processing"
73447
+ };
73448
+ },
73449
+ parseOutput(raw, outputMapping) {
73450
+ const data = raw;
73451
+ const taskResult = data.task_result;
73452
+ if (!taskResult) return [];
73453
+ const path = outputMapping.extract_path;
73454
+ if (path === "task_result.videos[].url") {
73455
+ const videos = taskResult.videos;
73456
+ if (!Array.isArray(videos)) return [];
73457
+ return videos.filter((v) => v.url).map((v) => ({
73458
+ type: outputMapping.type,
73459
+ url: v.url,
73460
+ content_type: outputMapping.content_type ?? "video/mp4"
73461
+ }));
73462
+ }
73463
+ if (path === "task_result.images[].url") {
73464
+ const images = taskResult.images;
73465
+ if (!Array.isArray(images)) return [];
73466
+ return images.filter((img) => img.url).map((img) => ({
73467
+ type: outputMapping.type,
73468
+ url: img.url,
73469
+ content_type: outputMapping.content_type ?? "image/png"
73470
+ }));
73471
+ }
73472
+ if (path === "task_result.audios[].url") {
73473
+ const audios = taskResult.audios;
73474
+ if (!Array.isArray(audios)) return [];
73475
+ return audios.filter((a) => a.url).map((a) => ({
73476
+ type: outputMapping.type,
73477
+ url: a.url,
73478
+ content_type: outputMapping.content_type ?? "audio/mpeg"
73479
+ }));
73480
+ }
73481
+ return [];
73482
+ }
73483
+ };
73484
+
71422
73485
  // src/storage.ts
71423
73486
  import { randomUUID } from "crypto";
71424
73487
 
71425
73488
  // src/s3-signer.ts
71426
- import { createHmac, createHash } from "crypto";
73489
+ import { createHmac as createHmac2, createHash } from "crypto";
71427
73490
  function sha256(data) {
71428
73491
  return createHash("sha256").update(data).digest("hex");
71429
73492
  }
71430
73493
  function hmacSha256(key, data) {
71431
- return createHmac("sha256", key).update(data).digest();
73494
+ return createHmac2("sha256", key).update(data).digest();
71432
73495
  }
71433
73496
  function getSigningKey(secretKey, dateStamp, region, service) {
71434
73497
  const kDate = hmacSha256(`AWS4${secretKey}`, dateStamp);
@@ -71478,7 +73541,7 @@ function signS3Request(method, url, headers, body, credentials) {
71478
73541
  sha256(canonicalRequest)
71479
73542
  ].join("\n");
71480
73543
  const signingKey = getSigningKey(credentials.secretAccessKey, dateStamp, region, service);
71481
- const signature = createHmac("sha256", signingKey).update(stringToSign).digest("hex");
73544
+ const signature = createHmac2("sha256", signingKey).update(stringToSign).digest("hex");
71482
73545
  const authorization = `AWS4-HMAC-SHA256 Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${signedHeaders}, Signature=${signature}`;
71483
73546
  return {
71484
73547
  url,
@@ -71522,7 +73585,7 @@ function presignS3Url(url, credentials, options) {
71522
73585
  sha256(canonicalRequest)
71523
73586
  ].join("\n");
71524
73587
  const signingKey = getSigningKey(credentials.secretAccessKey, dateStamp, region, service);
71525
- const signature = createHmac("sha256", signingKey).update(stringToSign).digest("hex");
73588
+ const signature = createHmac2("sha256", signingKey).update(stringToSign).digest("hex");
71526
73589
  queryParams.set("X-Amz-Signature", signature);
71527
73590
  return `${parsedUrl.origin}${parsedUrl.pathname}?${queryParams.toString()}`;
71528
73591
  }
@@ -71538,9 +73601,9 @@ function parseExpiresIn(value) {
71538
73601
  }
71539
73602
  return parsed;
71540
73603
  }
71541
- function configureStorage(config) {
71542
- if (config) {
71543
- storageConfig = config;
73604
+ function configureStorage(config2) {
73605
+ if (config2) {
73606
+ storageConfig = config2;
71544
73607
  return;
71545
73608
  }
71546
73609
  const accountId = process.env.R2_ACCOUNT_ID;
@@ -71573,15 +73636,15 @@ function getConfig() {
71573
73636
  }
71574
73637
  return storageConfig;
71575
73638
  }
71576
- function buildR2Url(config, key) {
71577
- return `https://${config.accountId}.r2.cloudflarestorage.com/${config.bucketName}/${key}`;
73639
+ function buildR2Url(config2, key) {
73640
+ return `https://${config2.accountId}.r2.cloudflarestorage.com/${config2.bucketName}/${key}`;
71578
73641
  }
71579
- function buildPublicUrl(config, key) {
71580
- if (config.publicUrlBase) {
71581
- const base = config.publicUrlBase.replace(/\/$/, "");
73642
+ function buildPublicUrl(config2, key) {
73643
+ if (config2.publicUrlBase) {
73644
+ const base = config2.publicUrlBase.replace(/\/$/, "");
71582
73645
  return `${base}/${key}`;
71583
73646
  }
71584
- return buildR2Url(config, key);
73647
+ return buildR2Url(config2, key);
71585
73648
  }
71586
73649
  function detectContentType(input) {
71587
73650
  if (input instanceof File) return input.type || "application/octet-stream";
@@ -71595,7 +73658,7 @@ async function toBuffer(input) {
71595
73658
  return Buffer.from(input);
71596
73659
  }
71597
73660
  async function uploadAsset(input, options) {
71598
- const config = getConfig();
73661
+ const config2 = getConfig();
71599
73662
  const buffer = await toBuffer(input);
71600
73663
  const maxBytes = options?.maxBytes ?? DEFAULT_MAX_BYTES;
71601
73664
  if (buffer.length > maxBytes) {
@@ -71607,15 +73670,15 @@ async function uploadAsset(input, options) {
71607
73670
  const contentType = options?.contentType ?? detectContentType(input);
71608
73671
  const prefix = options?.prefix ? `${options.prefix.replace(/\/$/, "")}/` : "";
71609
73672
  const key = options?.key ?? `${prefix}${randomUUID()}`;
71610
- const r2Url = buildR2Url(config, key);
73673
+ const r2Url = buildR2Url(config2, key);
71611
73674
  const signed = signS3Request(
71612
73675
  "PUT",
71613
73676
  r2Url,
71614
73677
  { "Content-Type": contentType, "Content-Length": String(buffer.length) },
71615
73678
  buffer,
71616
73679
  {
71617
- accessKeyId: config.accessKeyId,
71618
- secretAccessKey: config.secretAccessKey
73680
+ accessKeyId: config2.accessKeyId,
73681
+ secretAccessKey: config2.secretAccessKey
71619
73682
  }
71620
73683
  );
71621
73684
  const response = await fetch(signed.url, {
@@ -71627,7 +73690,7 @@ async function uploadAsset(input, options) {
71627
73690
  const body = await response.text().catch(() => "");
71628
73691
  throw new StorageError("upload", `R2 returned ${response.status}: ${body}`, response.status);
71629
73692
  }
71630
- const url = config.mode === "presigned" ? validatedPresign(config, key) : buildPublicUrl(config, key);
73693
+ const url = config2.mode === "presigned" ? validatedPresign(config2, key) : buildPublicUrl(config2, key);
71631
73694
  return {
71632
73695
  url,
71633
73696
  key,
@@ -71635,34 +73698,34 @@ async function uploadAsset(input, options) {
71635
73698
  content_type: contentType
71636
73699
  };
71637
73700
  }
71638
- function validatedPresign(config, key, expiresIn) {
71639
- const ttl = expiresIn ?? config.presignExpiresIn ?? 3600;
73701
+ function validatedPresign(config2, key, expiresIn) {
73702
+ const ttl = expiresIn ?? config2.presignExpiresIn ?? 3600;
71640
73703
  if (ttl > MAX_PRESIGN_EXPIRES) {
71641
73704
  throw new StorageError(
71642
73705
  "config",
71643
73706
  `Presign expiry ${ttl}s exceeds maximum of ${MAX_PRESIGN_EXPIRES}s (7 days).`
71644
73707
  );
71645
73708
  }
71646
- return presignS3Url(buildR2Url(config, key), {
71647
- accessKeyId: config.accessKeyId,
71648
- secretAccessKey: config.secretAccessKey
73709
+ return presignS3Url(buildR2Url(config2, key), {
73710
+ accessKeyId: config2.accessKeyId,
73711
+ secretAccessKey: config2.secretAccessKey
71649
73712
  }, { expiresIn: ttl });
71650
73713
  }
71651
73714
  function presignAsset(key, options) {
71652
- const config = getConfig();
71653
- return validatedPresign(config, key, options?.expiresIn);
73715
+ const config2 = getConfig();
73716
+ return validatedPresign(config2, key, options?.expiresIn);
71654
73717
  }
71655
73718
  async function deleteAsset(key) {
71656
- const config = getConfig();
71657
- const r2Url = buildR2Url(config, key);
73719
+ const config2 = getConfig();
73720
+ const r2Url = buildR2Url(config2, key);
71658
73721
  const signed = signS3Request(
71659
73722
  "DELETE",
71660
73723
  r2Url,
71661
73724
  {},
71662
73725
  null,
71663
73726
  {
71664
- accessKeyId: config.accessKeyId,
71665
- secretAccessKey: config.secretAccessKey
73727
+ accessKeyId: config2.accessKeyId,
73728
+ secretAccessKey: config2.secretAccessKey
71666
73729
  }
71667
73730
  );
71668
73731
  const response = await fetch(signed.url, {
@@ -71736,9 +73799,9 @@ async function processRecord(obj, shouldReupload, maxBytes) {
71736
73799
  return result;
71737
73800
  }
71738
73801
  async function processParamsForUpload(params, options) {
71739
- const config = getStorageConfig();
71740
- if (!config) return params;
71741
- const shouldReupload = options?.reupload || config.autoUpload || false;
73802
+ const config2 = getStorageConfig();
73803
+ if (!config2) return params;
73804
+ const shouldReupload = options?.reupload || config2.autoUpload || false;
71742
73805
  const maxBytes = options?.maxBytes ?? DEFAULT_MAX_BYTES;
71743
73806
  return processRecord(params, shouldReupload, maxBytes);
71744
73807
  }
@@ -71753,7 +73816,7 @@ function getBaseEndpoint(endpoint) {
71753
73816
  if (parts.length <= 2) return endpoint;
71754
73817
  return `${parts[0]}/${parts[1]}`;
71755
73818
  }
71756
- async function handleHttpErrors(response, endpoint) {
73819
+ async function handleHttpErrors2(response, endpoint) {
71757
73820
  if (response.ok) return;
71758
73821
  const status = response.status;
71759
73822
  if (status === 401) {
@@ -71782,12 +73845,12 @@ var falAiAdapter = {
71782
73845
  name: "fal-ai",
71783
73846
  async submit(endpoint, params, auth) {
71784
73847
  const url = `${BASE_URL}/${endpoint}`;
71785
- const response = await fetch(url, {
73848
+ const response = await fetchWithTimeout(url, {
71786
73849
  method: "POST",
71787
73850
  headers: authHeaders(auth),
71788
73851
  body: JSON.stringify(params)
71789
73852
  });
71790
- await handleHttpErrors(response, endpoint);
73853
+ await handleHttpErrors2(response, endpoint);
71791
73854
  const data = await response.json();
71792
73855
  return {
71793
73856
  id: data.request_id,
@@ -71800,10 +73863,10 @@ var falAiAdapter = {
71800
73863
  }
71801
73864
  const baseEndpoint = getBaseEndpoint(endpoint);
71802
73865
  const statusUrl = `${BASE_URL}/${baseEndpoint}/requests/${taskId}/status`;
71803
- const statusResponse = await fetch(statusUrl, {
73866
+ const statusResponse = await fetchWithTimeout(statusUrl, {
71804
73867
  headers: { Authorization: `Key ${auth}` }
71805
73868
  });
71806
- await handleHttpErrors(statusResponse, endpoint);
73869
+ await handleHttpErrors2(statusResponse, endpoint);
71807
73870
  const statusData = await statusResponse.json();
71808
73871
  if (statusData.status === "FAILED") {
71809
73872
  return {
@@ -71819,10 +73882,10 @@ var falAiAdapter = {
71819
73882
  };
71820
73883
  }
71821
73884
  const resultUrl = `${BASE_URL}/${baseEndpoint}/requests/${taskId}`;
71822
- const resultResponse = await fetch(resultUrl, {
73885
+ const resultResponse = await fetchWithTimeout(resultUrl, {
71823
73886
  headers: { Authorization: `Key ${auth}` }
71824
73887
  });
71825
- await handleHttpErrors(resultResponse, endpoint);
73888
+ await handleHttpErrors2(resultResponse, endpoint);
71826
73889
  const output = await resultResponse.json();
71827
73890
  return {
71828
73891
  id: taskId,
@@ -71916,7 +73979,7 @@ var falAiAdapter = {
71916
73979
 
71917
73980
  // src/adapters/replicate.ts
71918
73981
  var BASE_URL2 = "https://api.replicate.com/v1";
71919
- async function handleHttpErrors2(response, endpoint) {
73982
+ async function handleHttpErrors3(response, endpoint) {
71920
73983
  if (response.ok) return;
71921
73984
  const status = response.status;
71922
73985
  if (status === 401) {
@@ -71957,10 +74020,10 @@ async function fetchLatestVersion(endpoint, auth) {
71957
74020
  const cached = versionCache.get(endpoint);
71958
74021
  if (cached) return cached;
71959
74022
  const url = `${BASE_URL2}/models/${endpoint}`;
71960
- const response = await fetch(url, {
74023
+ const response = await fetchWithTimeout(url, {
71961
74024
  headers: { Authorization: `Bearer ${auth}` }
71962
74025
  });
71963
- await handleHttpErrors2(response, endpoint);
74026
+ await handleHttpErrors3(response, endpoint);
71964
74027
  const data = await response.json();
71965
74028
  if (!data.latest_version?.id) {
71966
74029
  throw new ProviderError("replicate", endpoint, 404, "No version found for model");
@@ -71970,12 +74033,12 @@ async function fetchLatestVersion(endpoint, auth) {
71970
74033
  }
71971
74034
  async function submitWithVersion(endpoint, params, auth) {
71972
74035
  const version = await fetchLatestVersion(endpoint, auth);
71973
- const response = await fetch(`${BASE_URL2}/predictions`, {
74036
+ const response = await fetchWithTimeout(`${BASE_URL2}/predictions`, {
71974
74037
  method: "POST",
71975
74038
  headers: authHeaders2(auth),
71976
74039
  body: JSON.stringify({ version, input: params })
71977
74040
  });
71978
- await handleHttpErrors2(response, endpoint);
74041
+ await handleHttpErrors3(response, endpoint);
71979
74042
  const data = await response.json();
71980
74043
  return { id: data.id, status: "pending" };
71981
74044
  }
@@ -71986,13 +74049,13 @@ var replicateAdapter = {
71986
74049
  return submitWithVersion(endpoint, params, auth);
71987
74050
  }
71988
74051
  const modelsUrl = `${BASE_URL2}/models/${endpoint}/predictions`;
71989
- const response = await fetch(modelsUrl, {
74052
+ const response = await fetchWithTimeout(modelsUrl, {
71990
74053
  method: "POST",
71991
74054
  headers: authHeaders2(auth),
71992
74055
  body: JSON.stringify({ input: params })
71993
74056
  });
71994
74057
  if (response.status !== 404) {
71995
- await handleHttpErrors2(response, endpoint);
74058
+ await handleHttpErrors3(response, endpoint);
71996
74059
  const data = await response.json();
71997
74060
  return { id: data.id, status: "pending" };
71998
74061
  }
@@ -72001,10 +74064,10 @@ var replicateAdapter = {
72001
74064
  },
72002
74065
  async poll(taskId, auth) {
72003
74066
  const url = `${BASE_URL2}/predictions/${taskId}`;
72004
- const response = await fetch(url, {
74067
+ const response = await fetchWithTimeout(url, {
72005
74068
  headers: { Authorization: `Bearer ${auth}` }
72006
74069
  });
72007
- await handleHttpErrors2(response, taskId);
74070
+ await handleHttpErrors3(response, taskId);
72008
74071
  const data = await response.json();
72009
74072
  if (data.status === "succeeded") {
72010
74073
  return {
@@ -72037,7 +74100,7 @@ var replicateAdapter = {
72037
74100
 
72038
74101
  // src/adapters/wavespeed.ts
72039
74102
  var BASE_URL3 = "https://api.wavespeed.ai/api/v3";
72040
- async function handleHttpErrors3(response, endpoint) {
74103
+ async function handleHttpErrors4(response, endpoint) {
72041
74104
  if (response.ok) return;
72042
74105
  const status = response.status;
72043
74106
  if (status === 401) {
@@ -72088,12 +74151,12 @@ var wavespeedAdapter = {
72088
74151
  name: "wavespeed",
72089
74152
  async submit(endpoint, params, auth) {
72090
74153
  const url = `${BASE_URL3}/${endpoint}`;
72091
- const response = await fetch(url, {
74154
+ const response = await fetchWithTimeout(url, {
72092
74155
  method: "POST",
72093
74156
  headers: authHeaders3(auth),
72094
74157
  body: JSON.stringify(params)
72095
74158
  });
72096
- await handleHttpErrors3(response, endpoint);
74159
+ await handleHttpErrors4(response, endpoint);
72097
74160
  const json = await response.json();
72098
74161
  return {
72099
74162
  id: json.data.id,
@@ -72102,10 +74165,10 @@ var wavespeedAdapter = {
72102
74165
  },
72103
74166
  async poll(taskId, auth) {
72104
74167
  const url = `${BASE_URL3}/predictions/${taskId}/result`;
72105
- const response = await fetch(url, {
74168
+ const response = await fetchWithTimeout(url, {
72106
74169
  headers: { Authorization: `Bearer ${auth}` }
72107
74170
  });
72108
- await handleHttpErrors3(response, `predictions/${taskId}/result`);
74171
+ await handleHttpErrors4(response, `predictions/${taskId}/result`);
72109
74172
  const json = await response.json();
72110
74173
  const { data } = json;
72111
74174
  if (data.status === "failed") {
@@ -72141,7 +74204,7 @@ var wavespeedAdapter = {
72141
74204
 
72142
74205
  // src/adapters/openrouter.ts
72143
74206
  var BASE_URL4 = "https://openrouter.ai/api/v1";
72144
- async function handleHttpErrors4(response, endpoint) {
74207
+ async function handleHttpErrors5(response, endpoint) {
72145
74208
  if (response.ok) return;
72146
74209
  const status = response.status;
72147
74210
  if (status === 401) {
@@ -72185,12 +74248,12 @@ var openRouterAdapter = {
72185
74248
  if (max_tokens !== void 0) body.max_tokens = max_tokens;
72186
74249
  if (top_p !== void 0) body.top_p = top_p;
72187
74250
  const url = `${BASE_URL4}/chat/completions`;
72188
- const response = await fetch(url, {
74251
+ const response = await fetchWithTimeout(url, {
72189
74252
  method: "POST",
72190
74253
  headers: authHeaders4(auth),
72191
74254
  body: JSON.stringify(body)
72192
74255
  });
72193
- await handleHttpErrors4(response, endpoint);
74256
+ await handleHttpErrors5(response, endpoint);
72194
74257
  const data = await response.json();
72195
74258
  return {
72196
74259
  id: data.id,
@@ -72289,9 +74352,10 @@ var adapters = {
72289
74352
  "fal-ai": falAiAdapter,
72290
74353
  "replicate": replicateAdapter,
72291
74354
  "wavespeed": wavespeedAdapter,
72292
- "openrouter": openRouterAdapter
74355
+ "openrouter": openRouterAdapter,
74356
+ "kling": klingAdapter
72293
74357
  };
72294
- var DEFAULT_TIMEOUT_MS = 12e4;
74358
+ var DEFAULT_TIMEOUT_MS2 = 12e4;
72295
74359
  async function _prepare(request) {
72296
74360
  if (!request.model) throw new ValidationError("model", "model is required");
72297
74361
  const auth = new AuthManager();
@@ -72325,7 +74389,7 @@ async function _prepare(request) {
72325
74389
  }
72326
74390
  async function submit(request) {
72327
74391
  const { binding, adapter, apiKey, finalParams, model } = await _prepare(request);
72328
- const timeoutMs = request.options?.timeout ?? DEFAULT_TIMEOUT_MS;
74392
+ const timeoutMs = request.options?.timeout ?? DEFAULT_TIMEOUT_MS2;
72329
74393
  const submitted = await withRetry(
72330
74394
  () => adapter.submit(binding.endpoint, finalParams, apiKey),
72331
74395
  { timeoutMs, provider: binding.provider, model: model.canonical_name }
@@ -72395,7 +74459,7 @@ async function submitAndPoll(request) {
72395
74459
  async function generate(request) {
72396
74460
  const startTime = Date.now();
72397
74461
  const { binding, adapter, apiKey, finalParams, model } = await _prepare(request);
72398
- const timeoutMs = request.options?.timeout ?? DEFAULT_TIMEOUT_MS;
74462
+ const timeoutMs = request.options?.timeout ?? DEFAULT_TIMEOUT_MS2;
72399
74463
  const submitted = await withRetry(
72400
74464
  () => adapter.submit(binding.endpoint, finalParams, apiKey),
72401
74465
  { timeoutMs, provider: binding.provider, model: model.canonical_name }
@@ -72487,6 +74551,8 @@ export {
72487
74551
  RateLimitError,
72488
74552
  StorageError,
72489
74553
  configureAuth,
74554
+ configureFetch,
74555
+ klingAdapter,
72490
74556
  configureStorage,
72491
74557
  uploadAsset,
72492
74558
  presignAsset,
@@ -72498,4 +74564,4 @@ export {
72498
74564
  listModels,
72499
74565
  deriveCategory
72500
74566
  };
72501
- //# sourceMappingURL=chunk-ONS4P4YK.js.map
74567
+ //# sourceMappingURL=chunk-QVQQFPOY.js.map