@neta-art/generation 0.1.4 → 0.1.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (35) hide show
  1. package/README.md +73 -14
  2. package/dist/{builtins-BJ2_TVlr.d.ts → builtins-C-_aGhT8.d.ts} +2 -2
  3. package/dist/builtins-C-_aGhT8.d.ts.map +1 -0
  4. package/dist/builtins-WOyUMLOY.js +1096 -0
  5. package/dist/builtins-WOyUMLOY.js.map +1 -0
  6. package/dist/builtins.d.ts +1 -1
  7. package/dist/builtins.js +1 -1
  8. package/dist/cli/index.js +2 -2
  9. package/dist/{export-config-D8By2_r7.js → export-config-1c3HS6eX.js} +372 -44
  10. package/dist/export-config-1c3HS6eX.js.map +1 -0
  11. package/dist/index.d.ts +5 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +3 -3
  14. package/models/birefnet-general.yaml +25 -0
  15. package/models/kling-image-to-video.yaml +89 -0
  16. package/models/kling-multi-image-to-video.yaml +93 -0
  17. package/models/kling-omni-video.yaml +107 -0
  18. package/models/kling-text-to-video.yaml +79 -0
  19. package/models/noobxl-i2i-ipa-onediff.yaml +72 -0
  20. package/models/noobxl-t2i-onediff.yaml +44 -0
  21. package/models/suno_cover_chirp_v5.yaml +159 -0
  22. package/models/suno_image_to_song_chirp_v5.yaml +152 -0
  23. package/models/suno_infill_chirp_v5.yaml +148 -0
  24. package/models/suno_music_chirp_fenix.yaml +77 -0
  25. package/models/suno_sound_chirp_v5.yaml +145 -0
  26. package/models/suno_style_tags.yaml +14 -0
  27. package/models/suno_upload_audio.yaml +44 -0
  28. package/models/suno_video_to_song_chirp_v5.yaml +152 -0
  29. package/models/suno_vox_chirp_v5.yaml +149 -0
  30. package/package.json +19 -15
  31. package/dist/builtins-BJ2_TVlr.d.ts.map +0 -1
  32. package/dist/builtins-FumzmWvj.js +0 -565
  33. package/dist/builtins-FumzmWvj.js.map +0 -1
  34. package/dist/export-config-D8By2_r7.js.map +0 -1
  35. package/models/suno_music.yaml +0 -265
@@ -0,0 +1,1096 @@
1
+ //#region src/types.ts
2
+ const MODEL_SCHEMA = "neta.generation.model.v1";
3
+
4
+ //#endregion
5
+ //#region src/utils.ts
6
+ function cloneJson(value) {
7
+ return JSON.parse(JSON.stringify(value));
8
+ }
9
+ function slugifyFileName(value) {
10
+ return value.trim().toLowerCase().replace(/[^a-z0-9._-]+/g, "-").replace(/^-+|-+$/g, "") || "model";
11
+ }
12
+ function getBlockMeta(block) {
13
+ return "meta" in block ? block.meta : void 0;
14
+ }
15
+ function compactArray(values) {
16
+ return values.length > 0 ? values : void 0;
17
+ }
18
+ function compactObject(value) {
19
+ for (const key of Object.keys(value)) if (value[key] === void 0) delete value[key];
20
+ return value;
21
+ }
22
+
23
+ //#endregion
24
+ //#region src/builtins.ts
25
+ const imageSizeParameters = {
26
+ size: {
27
+ type: "string",
28
+ optional: true,
29
+ default: "1024x1024",
30
+ description: "Output image size.",
31
+ examples: [
32
+ "auto",
33
+ "1024x1024",
34
+ "1536x1024",
35
+ "1024x1536",
36
+ "2048x2048",
37
+ "2048x1152",
38
+ "3840x2160",
39
+ "2160x3840"
40
+ ]
41
+ },
42
+ quality: {
43
+ type: "string",
44
+ optional: true,
45
+ default: "auto",
46
+ enum: [
47
+ "auto",
48
+ "low",
49
+ "medium",
50
+ "high"
51
+ ],
52
+ description: "Image quality."
53
+ }
54
+ };
55
+ const noobxlImageParameters = {
56
+ size: {
57
+ type: "string",
58
+ optional: true,
59
+ default: "1024x1024",
60
+ description: "Output image size as WIDTHxHEIGHT.",
61
+ examples: [
62
+ "1024x1024",
63
+ "768x1024",
64
+ "1024x768"
65
+ ]
66
+ },
67
+ negative_prompt: {
68
+ type: "string",
69
+ optional: true,
70
+ description: "Content to avoid in generated images."
71
+ },
72
+ seed: {
73
+ type: "integer",
74
+ optional: true,
75
+ min: 0,
76
+ description: "Random seed for reproducibility."
77
+ }
78
+ };
79
+ const noobxlImageToImageParameters = {
80
+ ...noobxlImageParameters,
81
+ controlnet_weight: {
82
+ type: "number",
83
+ optional: true,
84
+ min: 0,
85
+ max: 2,
86
+ description: "ControlNet tile weight. The provider default is 0.8."
87
+ },
88
+ ipadapter_face_image_ref: {
89
+ type: "string",
90
+ optional: true,
91
+ description: "Optional face reference image URL for IP-Adapter."
92
+ },
93
+ ipadapter_face_weight: {
94
+ type: "number",
95
+ optional: true,
96
+ min: 0,
97
+ max: 2,
98
+ description: "IP-Adapter face weight. The provider default is 0.6 when a face reference is supplied."
99
+ }
100
+ };
101
+ function videoParameters(defaults) {
102
+ return {
103
+ duration: {
104
+ type: "integer",
105
+ optional: true,
106
+ default: 5,
107
+ min: 4,
108
+ max: 15,
109
+ description: "Video duration in seconds."
110
+ },
111
+ resolution: {
112
+ type: "string",
113
+ optional: true,
114
+ default: defaults.resolution,
115
+ enum: [
116
+ "480p",
117
+ "720p",
118
+ "1080p",
119
+ "2K"
120
+ ],
121
+ description: "Output video resolution."
122
+ },
123
+ aspect_ratio: {
124
+ type: "string",
125
+ optional: true,
126
+ default: "16:9",
127
+ enum: [
128
+ "16:9",
129
+ "9:16",
130
+ "1:1",
131
+ "4:3",
132
+ "3:2",
133
+ "2:3",
134
+ "3:4",
135
+ "21:9",
136
+ "adaptive"
137
+ ],
138
+ description: "Output aspect ratio. Use adaptive to let the model choose."
139
+ },
140
+ fps: {
141
+ type: "integer",
142
+ optional: true,
143
+ default: 30,
144
+ min: 1,
145
+ max: 60,
146
+ description: "Frames per second."
147
+ },
148
+ seed: {
149
+ type: "integer",
150
+ optional: true,
151
+ description: "Random seed for reproducibility."
152
+ },
153
+ generate_audio: {
154
+ type: "boolean",
155
+ optional: true,
156
+ default: true,
157
+ description: "Generate synchronized audio."
158
+ },
159
+ return_last_frame: {
160
+ type: "boolean",
161
+ optional: true,
162
+ default: true,
163
+ description: "Return the last frame as an image for chaining video segments."
164
+ },
165
+ camera_fixed: {
166
+ type: "boolean",
167
+ optional: true,
168
+ default: false,
169
+ description: "Fix camera position when supported."
170
+ },
171
+ watermark: {
172
+ type: "boolean",
173
+ optional: true,
174
+ default: false,
175
+ description: "Add AI Generated watermark."
176
+ },
177
+ poll_interval: {
178
+ type: "integer",
179
+ optional: true,
180
+ default: 2,
181
+ min: 1,
182
+ max: 30,
183
+ description: "Seconds between task status checks."
184
+ },
185
+ max_wait: {
186
+ type: "integer",
187
+ optional: true,
188
+ default: defaults.maxWait,
189
+ min: 30,
190
+ max: 1800,
191
+ description: "Maximum seconds to wait for task completion."
192
+ }
193
+ };
194
+ }
195
+ function klingVideoParameters(options) {
196
+ const parameters = {
197
+ duration: {
198
+ type: "integer",
199
+ optional: true,
200
+ default: 5,
201
+ min: 5,
202
+ max: options.maxDuration,
203
+ description: "Video duration in seconds."
204
+ },
205
+ aspect_ratio: {
206
+ type: "string",
207
+ optional: true,
208
+ default: "16:9",
209
+ enum: [
210
+ "16:9",
211
+ "9:16",
212
+ "1:1"
213
+ ],
214
+ description: "Output aspect ratio."
215
+ },
216
+ mode: {
217
+ type: "string",
218
+ optional: true,
219
+ default: "std",
220
+ enum: ["std", "pro"],
221
+ description: "Kling generation mode."
222
+ },
223
+ cfg_scale: {
224
+ type: "number",
225
+ optional: true,
226
+ default: .5,
227
+ min: 0,
228
+ max: 1,
229
+ description: "Prompt adherence scale."
230
+ },
231
+ poll_interval: {
232
+ type: "integer",
233
+ optional: true,
234
+ default: 5,
235
+ min: 1,
236
+ max: 30,
237
+ description: "Seconds between task status checks."
238
+ },
239
+ max_wait: {
240
+ type: "integer",
241
+ optional: true,
242
+ default: 900,
243
+ min: 30,
244
+ max: 1800,
245
+ description: "Maximum seconds to wait for task completion."
246
+ }
247
+ };
248
+ if (options.negativePrompt) parameters.negative_prompt = {
249
+ type: "string",
250
+ optional: true,
251
+ description: "Negative prompt."
252
+ };
253
+ if (options.seed) parameters.seed = {
254
+ type: "integer",
255
+ optional: true,
256
+ description: "Random seed for reproducibility."
257
+ };
258
+ if (options.sound) parameters.sound = {
259
+ type: "string",
260
+ optional: true,
261
+ enum: ["on", "off"],
262
+ description: "Enable or disable generated sound when supported."
263
+ };
264
+ return parameters;
265
+ }
266
+ const sunoTaskParameters = {
267
+ poll_interval: {
268
+ type: "integer",
269
+ optional: true,
270
+ default: 5,
271
+ min: 1,
272
+ max: 60,
273
+ description: "Seconds between task status checks."
274
+ },
275
+ max_wait: {
276
+ type: "integer",
277
+ optional: true,
278
+ default: 600,
279
+ min: 30,
280
+ max: 3600,
281
+ description: "Maximum seconds to wait for task completion."
282
+ }
283
+ };
284
+ const sunoCommonMetaFields = {
285
+ title: {
286
+ type: "string",
287
+ optional: true,
288
+ description: "Suno song title."
289
+ },
290
+ tags: {
291
+ type: "string",
292
+ optional: true,
293
+ description: "Comma-separated Suno music style tags."
294
+ },
295
+ gpt_description_prompt: {
296
+ type: "string",
297
+ optional: true,
298
+ description: "Suno inspiration-mode prompt."
299
+ },
300
+ negative_tags: {
301
+ type: "string",
302
+ optional: true,
303
+ description: "Styles to avoid."
304
+ },
305
+ generation_type: {
306
+ type: "string",
307
+ optional: true,
308
+ description: "Suno generation type."
309
+ },
310
+ make_instrumental: {
311
+ type: "boolean",
312
+ optional: true,
313
+ default: false,
314
+ description: "Generate instrumental music."
315
+ },
316
+ metadata: {
317
+ type: "object",
318
+ optional: true,
319
+ description: "Suno provider metadata payload."
320
+ },
321
+ metadata_params: {
322
+ type: "object",
323
+ optional: true,
324
+ description: "Suno task-specific metadata payload."
325
+ }
326
+ };
327
+ const sunoTaskVariants = {
328
+ extend: { required: ["continue_clip_id"] },
329
+ upload_extend: { required: ["continue_clip_id"] },
330
+ infill: { required: ["continue_clip_id", "metadata_params"] },
331
+ fixed_infill: { required: ["continue_clip_id", "metadata_params"] },
332
+ infill_intro: { required: ["continue_clip_id", "metadata_params"] },
333
+ infill_outro: { required: ["continue_clip_id", "metadata_params"] },
334
+ cover_infill: { required: ["continue_clip_id", "metadata_params"] },
335
+ cover_extend: { required: ["continue_clip_id"] },
336
+ artist_infill: { required: ["continue_clip_id", "metadata_params"] },
337
+ artist_consistency: { required: ["persona_id", "artist_clip_id"] },
338
+ cover: { required: ["task_id", "continue_clip_id"] },
339
+ image_to_song: {
340
+ requiredContent: ["image"],
341
+ required: ["metadata_params"]
342
+ },
343
+ video_to_song: {
344
+ requiredContent: ["video"],
345
+ required: ["metadata_params"]
346
+ },
347
+ concat: { required: ["clip_id"] },
348
+ sound: { required: ["metadata_params"] },
349
+ underpainting: { required: ["metadata_params"] },
350
+ overpainting: { required: ["metadata_params"] },
351
+ remaster: { required: ["metadata_params"] },
352
+ vox: { required: ["artist_clip_id"] },
353
+ chop_sample_condition: { required: ["metadata_params"] },
354
+ mashup_condition: { required: ["metadata_params"] },
355
+ playlist_condition: { required: ["metadata_params"] }
356
+ };
357
+ function sunoContentInput(options = {}) {
358
+ const input = [];
359
+ if (options.text !== "none") input.push({
360
+ type: "text",
361
+ required: options.text === "required",
362
+ max: 16,
363
+ merge: "newline",
364
+ description: "Prompt text. The adapter maps merged text to the operation's text field when that field is not provided."
365
+ });
366
+ if (options.audio) input.push({
367
+ type: "audio",
368
+ required: true,
369
+ max: 1,
370
+ sources: ["url", "base64"],
371
+ description: "Reference audio."
372
+ });
373
+ if (options.image) input.push({
374
+ type: "image",
375
+ required: true,
376
+ max: 1,
377
+ sources: ["url", "base64"],
378
+ description: "Reference image."
379
+ });
380
+ if (options.video) input.push({
381
+ type: "video",
382
+ required: true,
383
+ max: 1,
384
+ sources: ["url", "base64"],
385
+ description: "Reference video."
386
+ });
387
+ return input;
388
+ }
389
+ const sunoVersions = [{
390
+ model: "suno_music_chirp_fenix",
391
+ title: "Suno Music Chirp Fenix v5.5",
392
+ mv: "chirp-fenix"
393
+ }];
394
+ const sunoMusicExample = {
395
+ title: "Music generation",
396
+ request: {
397
+ model: "suno_music_chirp_fenix",
398
+ content: [{
399
+ type: "text",
400
+ text: "uplifting cinematic pop with warm piano and clear chorus"
401
+ }],
402
+ meta: {
403
+ title: "Warm Horizon",
404
+ tags: "cinematic pop, warm piano",
405
+ make_instrumental: false
406
+ }
407
+ }
408
+ };
409
+ function sunoVersionModel(version) {
410
+ return {
411
+ schema: MODEL_SCHEMA,
412
+ model: version.model,
413
+ title: version.title,
414
+ description: "Suno text-to-music model with a fixed Suno model version.",
415
+ adapter: {
416
+ type: "suno.tasks",
417
+ operation: "music",
418
+ payload: { mv: version.mv }
419
+ },
420
+ content: { input: sunoContentInput({ text: "required" }) },
421
+ parameters: sunoTaskParameters,
422
+ meta: { fields: sunoCommonMetaFields },
423
+ ...version.model === "suno_music_chirp_fenix" ? { examples: [sunoMusicExample] } : {}
424
+ };
425
+ }
426
+ function sunoTaskModel(options) {
427
+ return {
428
+ schema: MODEL_SCHEMA,
429
+ model: options.model,
430
+ title: options.title,
431
+ description: options.description,
432
+ adapter: {
433
+ type: "suno.tasks",
434
+ operation: "music",
435
+ task: options.task,
436
+ payload: { mv: options.mv ?? "chirp-v5" }
437
+ },
438
+ content: { input: sunoContentInput(options.content ?? { text: "optional" }) },
439
+ parameters: sunoTaskParameters,
440
+ meta: {
441
+ fields: {
442
+ ...sunoCommonMetaFields,
443
+ ...options.fields
444
+ },
445
+ taskVariants: sunoTaskVariants
446
+ },
447
+ ...options.examples ? { examples: options.examples } : {}
448
+ };
449
+ }
450
+ const sunoModels = [
451
+ ...sunoVersions.map(sunoVersionModel),
452
+ {
453
+ schema: MODEL_SCHEMA,
454
+ model: "suno_style_tags",
455
+ title: "Suno Style Tags",
456
+ description: "Suno style tag upsampling model.",
457
+ adapter: {
458
+ type: "suno.tasks",
459
+ operation: "upsample_tags"
460
+ },
461
+ content: { input: sunoContentInput({ text: "required" }) }
462
+ },
463
+ {
464
+ schema: MODEL_SCHEMA,
465
+ model: "suno_upload_audio",
466
+ title: "Suno Upload Audio",
467
+ description: "Suno reference-audio upload model.",
468
+ adapter: {
469
+ type: "suno.tasks",
470
+ operation: "upload_audio",
471
+ defaults: {
472
+ name: "reference-audio",
473
+ timeout: 120
474
+ }
475
+ },
476
+ content: { input: sunoContentInput({
477
+ text: "none",
478
+ audio: true
479
+ }) },
480
+ parameters: sunoTaskParameters,
481
+ meta: { fields: {
482
+ name: {
483
+ type: "string",
484
+ optional: true,
485
+ description: "Upload name."
486
+ },
487
+ timeout: {
488
+ type: "integer",
489
+ optional: true,
490
+ description: "Upload timeout in seconds."
491
+ }
492
+ } }
493
+ },
494
+ sunoTaskModel({
495
+ model: "suno_image_to_song_chirp_v5",
496
+ title: "Suno Image to Song Chirp v5.0",
497
+ description: "Suno image-to-song task with a fixed chirp-v5 engine.",
498
+ task: "image_to_song",
499
+ content: {
500
+ text: "optional",
501
+ image: true
502
+ },
503
+ fields: { metadata_params: {
504
+ type: "object",
505
+ description: "Image-to-song metadata payload."
506
+ } }
507
+ }),
508
+ sunoTaskModel({
509
+ model: "suno_video_to_song_chirp_v5",
510
+ title: "Suno Video to Song Chirp v5.0",
511
+ description: "Suno video-to-song task with a fixed chirp-v5 engine.",
512
+ task: "video_to_song",
513
+ content: {
514
+ text: "optional",
515
+ video: true
516
+ },
517
+ fields: { metadata_params: {
518
+ type: "object",
519
+ description: "Video-to-song metadata payload."
520
+ } }
521
+ }),
522
+ sunoTaskModel({
523
+ model: "suno_sound_chirp_v5",
524
+ title: "Suno Sound Chirp v5.0",
525
+ description: "Suno sound-effect generation task with a fixed chirp-v5 engine.",
526
+ task: "sound",
527
+ content: { text: "optional" },
528
+ fields: { metadata_params: {
529
+ type: "object",
530
+ description: "Sound task metadata payload."
531
+ } }
532
+ }),
533
+ sunoTaskModel({
534
+ model: "suno_cover_chirp_v5",
535
+ title: "Suno Cover Chirp v5.0",
536
+ description: "Suno cover task with a fixed chirp-v5 engine.",
537
+ task: "cover",
538
+ content: { text: "optional" },
539
+ fields: {
540
+ cover_clip_id: {
541
+ type: "string",
542
+ description: "Clip id to cover."
543
+ },
544
+ task_id: {
545
+ type: "string",
546
+ description: "Source Suno task id used for cover routing."
547
+ },
548
+ continue_clip_id: {
549
+ type: "string",
550
+ description: "Source clip id used for cover generation."
551
+ },
552
+ continue_at: {
553
+ type: "number",
554
+ optional: true,
555
+ description: "Source clip continuation position in seconds."
556
+ }
557
+ }
558
+ }),
559
+ sunoTaskModel({
560
+ model: "suno_infill_chirp_v5",
561
+ title: "Suno Infill Chirp v5.0",
562
+ description: "Suno local edit task with a fixed chirp-v5 engine.",
563
+ task: "infill",
564
+ content: { text: "optional" },
565
+ fields: {
566
+ continue_clip_id: {
567
+ type: "string",
568
+ description: "Clip id to edit."
569
+ },
570
+ metadata_params: {
571
+ type: "object",
572
+ description: "Infill timing and replacement metadata."
573
+ }
574
+ }
575
+ }),
576
+ sunoTaskModel({
577
+ model: "suno_vox_chirp_v5",
578
+ title: "Suno Vox Chirp v5.0",
579
+ description: "Suno hum-to-song task with a fixed chirp-v5 engine.",
580
+ task: "vox",
581
+ content: { text: "optional" },
582
+ fields: { artist_clip_id: {
583
+ type: "string",
584
+ description: "Reference hum or vocal clip id."
585
+ } }
586
+ })
587
+ ];
588
+ const builtinModels = [
589
+ {
590
+ schema: MODEL_SCHEMA,
591
+ model: "gpt-image-2",
592
+ title: "GPT Image 2",
593
+ description: "Image generation model with optional reference images. Good for photorealistic scenes, detailed images, and image editing with references.",
594
+ adapter: { type: "openai.images" },
595
+ content: { input: [{
596
+ type: "text",
597
+ required: true,
598
+ min: 1,
599
+ max: 16,
600
+ merge: "newline",
601
+ description: "Prompt text."
602
+ }, {
603
+ type: "image",
604
+ required: false,
605
+ max: 16,
606
+ sources: ["url", "base64"],
607
+ description: "Optional reference images."
608
+ }] },
609
+ parameters: imageSizeParameters,
610
+ examples: [{
611
+ title: "Basic image",
612
+ request: {
613
+ model: "gpt-image-2",
614
+ content: [{
615
+ type: "text",
616
+ text: "a cyberpunk cat in neon rain"
617
+ }],
618
+ parameters: {
619
+ size: "1024x1024",
620
+ quality: "auto"
621
+ }
622
+ }
623
+ }]
624
+ },
625
+ {
626
+ schema: MODEL_SCHEMA,
627
+ model: "gemini-3.1-flash-image-preview",
628
+ title: "Gemini 3.1 Flash Image Preview",
629
+ description: "Gemini image generation and editing model. Good for text rendering, infographics, style transfer, and iterative image editing with references.",
630
+ adapter: { type: "gemini.generateContent" },
631
+ content: { input: [{
632
+ type: "text",
633
+ required: true,
634
+ min: 1,
635
+ max: 16,
636
+ merge: "newline",
637
+ description: "Prompt text."
638
+ }, {
639
+ type: "image",
640
+ required: false,
641
+ max: 14,
642
+ sources: ["url", "base64"],
643
+ description: "Optional reference images."
644
+ }] },
645
+ parameters: {
646
+ aspect_ratio: {
647
+ type: "string",
648
+ optional: true,
649
+ default: "1:1",
650
+ enum: [
651
+ "1:1",
652
+ "16:9",
653
+ "4:3",
654
+ "3:2",
655
+ "3:4",
656
+ "2:3",
657
+ "9:16",
658
+ "5:4",
659
+ "4:5",
660
+ "21:9",
661
+ "1:4",
662
+ "4:1",
663
+ "1:8",
664
+ "8:1"
665
+ ],
666
+ description: "Output aspect ratio."
667
+ },
668
+ image_size: {
669
+ type: "string",
670
+ optional: true,
671
+ default: "2K",
672
+ enum: [
673
+ "512",
674
+ "1K",
675
+ "2K",
676
+ "4K"
677
+ ],
678
+ description: "Output image resolution."
679
+ }
680
+ },
681
+ examples: [{
682
+ title: "Basic image",
683
+ request: {
684
+ model: "gemini-3.1-flash-image-preview",
685
+ content: [{
686
+ type: "text",
687
+ text: "a vibrant infographic explaining photosynthesis with clear readable labels"
688
+ }],
689
+ parameters: {
690
+ aspect_ratio: "16:9",
691
+ image_size: "1K"
692
+ }
693
+ }
694
+ }]
695
+ },
696
+ {
697
+ schema: MODEL_SCHEMA,
698
+ model: "kling-text-to-video",
699
+ title: "Kling Text To Video",
700
+ description: "Kling latest text-to-video generation through Neta Router.",
701
+ adapter: { type: "kling.videoGenerations" },
702
+ content: { input: [{
703
+ type: "text",
704
+ required: true,
705
+ min: 1,
706
+ max: 16,
707
+ merge: "newline",
708
+ description: "Video prompt."
709
+ }] },
710
+ parameters: klingVideoParameters({
711
+ maxDuration: 10,
712
+ negativePrompt: true,
713
+ seed: true
714
+ }),
715
+ examples: [{
716
+ title: "Text to video",
717
+ request: {
718
+ model: "kling-text-to-video",
719
+ content: [{
720
+ type: "text",
721
+ text: "a small paper boat floating on calm water, cinematic motion"
722
+ }],
723
+ parameters: {
724
+ duration: 5,
725
+ aspect_ratio: "16:9",
726
+ mode: "std"
727
+ }
728
+ }
729
+ }]
730
+ },
731
+ {
732
+ schema: MODEL_SCHEMA,
733
+ model: "kling-image-to-video",
734
+ title: "Kling Image To Video",
735
+ description: "Kling latest image-to-video generation through Neta Router.",
736
+ adapter: { type: "kling.videoGenerations" },
737
+ content: { input: [{
738
+ type: "text",
739
+ required: true,
740
+ min: 1,
741
+ max: 16,
742
+ merge: "newline",
743
+ description: "Video prompt."
744
+ }, {
745
+ type: "image",
746
+ required: false,
747
+ max: 2,
748
+ sources: ["url", "base64"],
749
+ description: "First frame and optional tail frame image input. Provider-native image input may be passed in meta."
750
+ }] },
751
+ parameters: klingVideoParameters({
752
+ maxDuration: 10,
753
+ negativePrompt: true,
754
+ seed: true
755
+ }),
756
+ examples: [{
757
+ title: "Image to video",
758
+ request: {
759
+ model: "kling-image-to-video",
760
+ content: [{
761
+ type: "text",
762
+ text: "gently turn toward the camera with soft natural motion"
763
+ }, {
764
+ type: "image",
765
+ source: {
766
+ type: "url",
767
+ url: "https://example.com/input.png"
768
+ }
769
+ }],
770
+ parameters: {
771
+ duration: 5,
772
+ aspect_ratio: "16:9"
773
+ }
774
+ }
775
+ }]
776
+ },
777
+ {
778
+ schema: MODEL_SCHEMA,
779
+ model: "kling-omni-video",
780
+ title: "Kling Omni Video",
781
+ description: "Kling latest Omni-Video generation through Neta Router.",
782
+ adapter: { type: "kling.videoGenerations" },
783
+ content: { input: [{
784
+ type: "text",
785
+ required: false,
786
+ max: 16,
787
+ merge: "newline",
788
+ description: "Optional video prompt. Use Kling Omni placeholders such as <<<image_1>>> with image_list."
789
+ }, {
790
+ type: "image",
791
+ required: false,
792
+ max: 2,
793
+ sources: ["url", "base64"],
794
+ description: "Optional simple image input. Provider-native Omni media arrays belong in request meta."
795
+ }] },
796
+ parameters: klingVideoParameters({
797
+ maxDuration: 15,
798
+ sound: true
799
+ }),
800
+ meta: { fields: {
801
+ multi_shot: {
802
+ type: "boolean",
803
+ optional: true,
804
+ description: "Enable Kling Omni multi-shot mode."
805
+ },
806
+ shot_type: {
807
+ type: "string",
808
+ optional: true,
809
+ description: "Kling Omni shot type."
810
+ }
811
+ } },
812
+ examples: [{
813
+ title: "Omni text to video",
814
+ request: {
815
+ model: "kling-omni-video",
816
+ content: [{
817
+ type: "text",
818
+ text: "a small paper boat floating on calm water, cinematic motion"
819
+ }],
820
+ parameters: {
821
+ duration: 5,
822
+ aspect_ratio: "16:9",
823
+ mode: "std"
824
+ }
825
+ }
826
+ }, {
827
+ title: "Omni image to video",
828
+ request: {
829
+ model: "kling-omni-video",
830
+ content: [{
831
+ type: "text",
832
+ text: "<<<image_1>>> gently turns toward the camera with soft natural motion"
833
+ }],
834
+ parameters: {
835
+ duration: 5,
836
+ aspect_ratio: "16:9"
837
+ },
838
+ meta: { image_list: [{
839
+ image_url: "https://example.com/input.png",
840
+ type: "first_frame"
841
+ }] }
842
+ }
843
+ }]
844
+ },
845
+ {
846
+ schema: MODEL_SCHEMA,
847
+ model: "kling-multi-image-to-video",
848
+ title: "Kling Multi-Image Reference To Video",
849
+ description: "Kling latest multi-image reference video generation through Neta Router.",
850
+ adapter: { type: "kling.videoGenerations" },
851
+ content: { input: [{
852
+ type: "text",
853
+ required: true,
854
+ min: 1,
855
+ max: 16,
856
+ merge: "newline",
857
+ description: "Video prompt."
858
+ }, {
859
+ type: "image",
860
+ required: false,
861
+ max: 4,
862
+ sources: ["url", "base64"],
863
+ description: "Reference image inputs. Provider-native image_list input may be passed in meta."
864
+ }] },
865
+ parameters: klingVideoParameters({
866
+ maxDuration: 10,
867
+ negativePrompt: true,
868
+ seed: true
869
+ }),
870
+ examples: [{
871
+ title: "Multi-image reference to video",
872
+ request: {
873
+ model: "kling-multi-image-to-video",
874
+ content: [
875
+ {
876
+ type: "text",
877
+ text: "combine the references into one cinematic shot"
878
+ },
879
+ {
880
+ type: "image",
881
+ source: {
882
+ type: "url",
883
+ url: "https://example.com/reference-1.png"
884
+ }
885
+ },
886
+ {
887
+ type: "image",
888
+ source: {
889
+ type: "url",
890
+ url: "https://example.com/reference-2.png"
891
+ }
892
+ }
893
+ ],
894
+ parameters: {
895
+ duration: 5,
896
+ aspect_ratio: "16:9"
897
+ }
898
+ }
899
+ }]
900
+ },
901
+ {
902
+ schema: MODEL_SCHEMA,
903
+ model: "noobxl-t2i-onediff",
904
+ title: "NoobXL T2I OneDiff",
905
+ description: "NoobXL text-to-image model.",
906
+ allowUnknownParameters: true,
907
+ adapter: { type: "openai.images" },
908
+ content: { input: [{
909
+ type: "text",
910
+ required: true,
911
+ min: 1,
912
+ max: 16,
913
+ merge: "newline",
914
+ description: "Prompt text."
915
+ }] },
916
+ parameters: noobxlImageParameters,
917
+ examples: [{
918
+ title: "Text to image",
919
+ request: {
920
+ model: "noobxl-t2i-onediff",
921
+ content: [{
922
+ type: "text",
923
+ text: "anime key visual, luminous city at night, crisp linework"
924
+ }],
925
+ parameters: {
926
+ size: "1024x1024",
927
+ negative_prompt: "low quality, blurry"
928
+ }
929
+ }
930
+ }]
931
+ },
932
+ {
933
+ schema: MODEL_SCHEMA,
934
+ model: "noobxl-i2i-ipa-onediff",
935
+ title: "NoobXL I2I IPA OneDiff",
936
+ description: "NoobXL image-to-image model with optional face reference controls.",
937
+ allowUnknownParameters: true,
938
+ adapter: { type: "openai.images" },
939
+ content: { input: [{
940
+ type: "text",
941
+ required: true,
942
+ min: 1,
943
+ max: 16,
944
+ merge: "newline",
945
+ description: "Prompt text."
946
+ }, {
947
+ type: "image",
948
+ required: true,
949
+ min: 1,
950
+ max: 1,
951
+ sources: ["url", "base64"],
952
+ description: "Single source image."
953
+ }] },
954
+ parameters: noobxlImageToImageParameters,
955
+ examples: [{
956
+ title: "Image to image",
957
+ request: {
958
+ model: "noobxl-i2i-ipa-onediff",
959
+ content: [{
960
+ type: "text",
961
+ text: "keep the character identity, redraw as a polished anime illustration"
962
+ }, {
963
+ type: "image",
964
+ source: {
965
+ type: "url",
966
+ url: "https://example.com/reference.png"
967
+ }
968
+ }],
969
+ parameters: {
970
+ size: "1024x1024",
971
+ controlnet_weight: .8
972
+ }
973
+ }
974
+ }]
975
+ },
976
+ {
977
+ schema: MODEL_SCHEMA,
978
+ model: "birefnet-general",
979
+ title: "BiRefNet General",
980
+ description: "BiRefNet single-image segmentation and background removal model.",
981
+ adapter: { type: "openai.images" },
982
+ content: { input: [{
983
+ type: "image",
984
+ required: true,
985
+ min: 1,
986
+ max: 1,
987
+ sources: ["url", "base64"],
988
+ description: "Single source image."
989
+ }] },
990
+ examples: [{
991
+ title: "Remove background",
992
+ request: {
993
+ model: "birefnet-general",
994
+ content: [{
995
+ type: "image",
996
+ source: {
997
+ type: "url",
998
+ url: "https://example.com/portrait.png"
999
+ }
1000
+ }]
1001
+ }
1002
+ }]
1003
+ },
1004
+ {
1005
+ schema: MODEL_SCHEMA,
1006
+ model: "seedance-2-0",
1007
+ title: "Seedance 2.0",
1008
+ description: "Higher quality Ark video generation model for final production outputs.",
1009
+ adapter: { type: "ark.videoGenerations" },
1010
+ content: { input: [{
1011
+ type: "text",
1012
+ required: true,
1013
+ min: 1,
1014
+ max: 16,
1015
+ merge: "newline",
1016
+ description: "Video prompt."
1017
+ }, {
1018
+ type: "image",
1019
+ required: false,
1020
+ max: 9,
1021
+ sources: ["url", "base64"],
1022
+ description: "Optional image input. Use meta.role as first_frame, last_frame, or reference_image."
1023
+ }] },
1024
+ parameters: videoParameters({
1025
+ resolution: "1080p",
1026
+ maxWait: 900
1027
+ }),
1028
+ examples: [{
1029
+ title: "Text to video",
1030
+ request: {
1031
+ model: "seedance-2-0",
1032
+ content: [{
1033
+ type: "text",
1034
+ text: "a cat playing piano in a cozy jazz club, cinematic lighting, smooth camera movement"
1035
+ }],
1036
+ parameters: {
1037
+ duration: 5,
1038
+ resolution: "1080p",
1039
+ aspect_ratio: "16:9"
1040
+ }
1041
+ }
1042
+ }]
1043
+ },
1044
+ {
1045
+ schema: MODEL_SCHEMA,
1046
+ model: "seedance-2-0-fast",
1047
+ title: "Seedance 2.0 Fast",
1048
+ description: "Fast Ark video generation model for drafts, rapid iteration, text-to-video, image-to-video, and reference-guided video generation.",
1049
+ adapter: { type: "ark.videoGenerations" },
1050
+ content: { input: [{
1051
+ type: "text",
1052
+ required: true,
1053
+ min: 1,
1054
+ max: 16,
1055
+ merge: "newline",
1056
+ description: "Video prompt."
1057
+ }, {
1058
+ type: "image",
1059
+ required: false,
1060
+ max: 9,
1061
+ sources: ["url", "base64"],
1062
+ description: "Optional image input. Use meta.role as first_frame, last_frame, or reference_image."
1063
+ }] },
1064
+ parameters: videoParameters({
1065
+ resolution: "720p",
1066
+ maxWait: 600
1067
+ }),
1068
+ examples: [{
1069
+ title: "Text to video",
1070
+ request: {
1071
+ model: "seedance-2-0-fast",
1072
+ content: [{
1073
+ type: "text",
1074
+ text: "a cat playing piano in a cozy jazz club, cinematic lighting, smooth camera movement"
1075
+ }],
1076
+ parameters: {
1077
+ duration: 5,
1078
+ resolution: "720p",
1079
+ aspect_ratio: "16:9"
1080
+ }
1081
+ }
1082
+ }]
1083
+ },
1084
+ ...sunoModels
1085
+ ];
1086
+ const builtinGenerationModels = cloneJson(builtinModels);
1087
+ function getBuiltinGenerationModel(model) {
1088
+ return cloneJson(builtinModels.find((declaration) => declaration.model === model) ?? null);
1089
+ }
1090
+ function listBuiltinGenerationModels() {
1091
+ return cloneJson(builtinModels);
1092
+ }
1093
+
1094
+ //#endregion
1095
+ export { compactArray as a, slugifyFileName as c, cloneJson as i, MODEL_SCHEMA as l, getBuiltinGenerationModel as n, compactObject as o, listBuiltinGenerationModels as r, getBlockMeta as s, builtinGenerationModels as t };
1096
+ //# sourceMappingURL=builtins-WOyUMLOY.js.map