@neta-art/generation 0.1.23 → 0.1.25

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 (36) hide show
  1. package/README.md +3 -0
  2. package/dist/{builtins-BSD8jn8R.js → builtins-CYamscRp.js} +170 -2
  3. package/dist/builtins-CYamscRp.js.map +1 -0
  4. package/dist/{builtins-8R5iZQ10.d.ts → builtins-D0tS2UtT.d.ts} +6 -2
  5. package/dist/builtins-D0tS2UtT.d.ts.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-CzgN6UE_.js → export-config-hX4jDjSs.js} +9 -12
  10. package/dist/export-config-hX4jDjSs.js.map +1 -0
  11. package/dist/index.d.ts +2 -2
  12. package/dist/index.d.ts.map +1 -1
  13. package/dist/index.js +3 -3
  14. package/models/birefnet-general.yaml +1 -0
  15. package/models/gemini-3.1-flash-image-preview.yaml +1 -0
  16. package/models/gemini-3.1-flash-lite-image.yaml +1 -0
  17. package/models/gpt-image-2.yaml +1 -0
  18. package/models/kling-image-to-video.yaml +1 -0
  19. package/models/kling-multi-image-to-video.yaml +1 -0
  20. package/models/kling-omni-video.yaml +1 -0
  21. package/models/kling-text-to-video.yaml +1 -0
  22. package/models/krea2.yaml +1 -0
  23. package/models/minimax-h3-unrestricted.yaml +91 -0
  24. package/models/minimax-h3.yaml +91 -0
  25. package/models/noobxl-i2i-ipa-onediff.yaml +1 -0
  26. package/models/noobxl-t2i-onediff.yaml +1 -0
  27. package/models/qwen-image-edit.yaml +1 -0
  28. package/models/seedance-2-0-fast.yaml +1 -0
  29. package/models/seedance-2-0.yaml +1 -0
  30. package/models/suno_music_chirp_fenix.yaml +1 -0
  31. package/models/video-upscale-native.yaml +1 -0
  32. package/models/z-image-turbo.yaml +1 -0
  33. package/package.json +1 -1
  34. package/dist/builtins-8R5iZQ10.d.ts.map +0 -1
  35. package/dist/builtins-BSD8jn8R.js.map +0 -1
  36. package/dist/export-config-CzgN6UE_.js.map +0 -1
package/README.md CHANGED
@@ -179,6 +179,8 @@ const client = createGenerationClient({
179
179
  - `kling-image-to-video`
180
180
  - `kling-omni-video`
181
181
  - `kling-multi-image-to-video`
182
+ - `minimax-h3`
183
+ - `minimax-h3-unrestricted`
182
184
  - `seedance-2-0`
183
185
  - `seedance-2-0-fast`
184
186
  - `suno_music_chirp_fenix`
@@ -437,6 +439,7 @@ neta-generation models export-all --out ./models
437
439
  schema: neta.generation.model.v1
438
440
  model: gpt-image-2
439
441
  title: GPT Image 2
442
+ category: image
440
443
  adapter:
441
444
  type: openai.images
442
445
  content:
@@ -1,5 +1,10 @@
1
1
  //#region src/types.ts
2
2
  const MODEL_SCHEMA = "neta.generation.model.v1";
3
+ const GENERATION_MODEL_CATEGORIES = [
4
+ "image",
5
+ "video",
6
+ "audio"
7
+ ];
3
8
 
4
9
  //#endregion
5
10
  //#region src/utils.ts
@@ -210,6 +215,103 @@ function seedanceVideoParameters(defaults) {
210
215
  }
211
216
  };
212
217
  }
218
+ const minimaxH3ContentInput = [
219
+ {
220
+ type: "text",
221
+ required: true,
222
+ min: 1,
223
+ max: 16,
224
+ merge: "newline",
225
+ description: "Video prompt."
226
+ },
227
+ {
228
+ type: "image",
229
+ required: false,
230
+ max: 12,
231
+ sources: ["url"],
232
+ roles: [
233
+ "first_frame",
234
+ "last_frame",
235
+ "reference_image"
236
+ ],
237
+ roleRequired: true,
238
+ description: "Optional image inputs. Use meta.role to select a frame or reference image."
239
+ },
240
+ {
241
+ type: "video",
242
+ required: false,
243
+ max: 3,
244
+ sources: ["url"],
245
+ roles: ["reference_video"],
246
+ roleRequired: true,
247
+ description: "Optional reference video inputs. Use meta.role reference_video."
248
+ },
249
+ {
250
+ type: "audio",
251
+ required: false,
252
+ max: 3,
253
+ sources: ["url"],
254
+ roles: ["reference_audio"],
255
+ roleRequired: true,
256
+ description: "Optional reference audio inputs. Use meta.role reference_audio."
257
+ }
258
+ ];
259
+ const minimaxH3VideoCommonParameters = {
260
+ duration: {
261
+ type: "integer",
262
+ optional: true,
263
+ default: 5,
264
+ description: "Video duration in seconds."
265
+ },
266
+ ratio: {
267
+ type: "string",
268
+ optional: true,
269
+ default: "16:9",
270
+ enum: [
271
+ "adaptive",
272
+ "21:9",
273
+ "16:9",
274
+ "4:3",
275
+ "1:1",
276
+ "3:4",
277
+ "9:16"
278
+ ],
279
+ description: "Output aspect ratio. Use adaptive when media inputs determine the ratio."
280
+ },
281
+ aigc_watermark: {
282
+ type: "boolean",
283
+ optional: true,
284
+ default: false,
285
+ description: "Enable the generated-video watermark."
286
+ },
287
+ poll_interval: {
288
+ type: "integer",
289
+ optional: true,
290
+ default: 2,
291
+ min: 1,
292
+ max: 30,
293
+ description: "Seconds between task status checks."
294
+ },
295
+ max_wait: {
296
+ type: "integer",
297
+ optional: true,
298
+ default: 1800,
299
+ min: 30,
300
+ max: 1800,
301
+ description: "Maximum seconds to wait for task completion."
302
+ }
303
+ };
304
+ function minimaxH3VideoParameters() {
305
+ return {
306
+ ...minimaxH3VideoCommonParameters,
307
+ resolution: {
308
+ type: "string",
309
+ optional: true,
310
+ default: "768P",
311
+ description: "Output video resolution or an explicit WIDTHxHEIGHT canvas."
312
+ }
313
+ };
314
+ }
213
315
  function klingVideoParameters(options) {
214
316
  const parameters = {
215
317
  duration: {
@@ -429,6 +531,7 @@ function sunoVersionModel(version) {
429
531
  schema: MODEL_SCHEMA,
430
532
  model: version.model,
431
533
  title: version.title,
534
+ category: "audio",
432
535
  description: "High-quality music generation model for soundtracks and background music. Produces two MP3 tracks and two JPG cover images per request.",
433
536
  adapter: {
434
537
  type: "suno.tasks",
@@ -637,6 +740,7 @@ function geminiImageModel(model, title, description, options = {}) {
637
740
  schema: MODEL_SCHEMA,
638
741
  model,
639
742
  title,
743
+ category: "image",
640
744
  description,
641
745
  adapter: { type: "gemini.generateContent" },
642
746
  content: { input: [{
@@ -827,6 +931,7 @@ const builtinModels = [
827
931
  schema: MODEL_SCHEMA,
828
932
  model: "gpt-image-2",
829
933
  title: "GPT Image 2",
934
+ category: "image",
830
935
  description: "Excels at photorealism, fine detail, text rendering, and sophisticated layouts. It accepts uploaded images as base or reference images and is particularly well suited to realistic imagery, mock website screenshots, infographics, and highly stylized, visually striking illustrations. Strong natural-language understanding and broad world knowledge help it follow complex prompts. Non-photorealistic styles may develop fine-grained texture and lighting artifacts, which can be corrected through prompt refinement or reference images. Low cost, but relatively slow.",
831
936
  adapter: { type: "openai.images" },
832
937
  content: { input: [{
@@ -863,6 +968,7 @@ const builtinModels = [
863
968
  schema: MODEL_SCHEMA,
864
969
  model: "krea2",
865
970
  title: "Krea 2",
971
+ category: "image",
866
972
  description: "Designed for visually refined image generation with broad aesthetic diversity. Strong natural-language understanding helps it follow detailed prompts. Text-only input; reference images are not supported. Relatively fast and low cost.",
867
973
  adapter: { type: "openai.images" },
868
974
  content: { input: [{
@@ -890,6 +996,7 @@ const builtinModels = [
890
996
  schema: MODEL_SCHEMA,
891
997
  model: "z-image-turbo",
892
998
  title: "Z-Image Turbo",
999
+ category: "image",
893
1000
  description: "Fast text-to-image model. Z-Image Turbo accepts prompt text only and does not support reference images.",
894
1001
  adapter: { type: "openai.images" },
895
1002
  content: { input: [{
@@ -917,6 +1024,7 @@ const builtinModels = [
917
1024
  schema: MODEL_SCHEMA,
918
1025
  model: "qwen-image-edit",
919
1026
  title: "Qwen Image Edit",
1027
+ category: "image",
920
1028
  description: "Neta Qwen image editing with one source image URL and an edit instruction.",
921
1029
  adapter: { type: "openai.imageEdits" },
922
1030
  content: { input: [{
@@ -968,6 +1076,7 @@ const builtinModels = [
968
1076
  schema: MODEL_SCHEMA,
969
1077
  model: "video-upscale-native",
970
1078
  title: "Video Upscale",
1079
+ category: "video",
971
1080
  description: "Upscales a video. Recommended input: long edge under 1080 pixels.",
972
1081
  adapter: { type: "video.upscaleNative" },
973
1082
  content: { input: [{
@@ -996,6 +1105,7 @@ const builtinModels = [
996
1105
  schema: MODEL_SCHEMA,
997
1106
  model: "kling-text-to-video",
998
1107
  title: "Kling Text To Video",
1108
+ category: "video",
999
1109
  description: "One of the more affordable text-to-video models, well suited to short-form social media content and rapid creative validation.",
1000
1110
  adapter: { type: "kling.videoGenerations" },
1001
1111
  content: { input: [{
@@ -1031,6 +1141,7 @@ const builtinModels = [
1031
1141
  schema: MODEL_SCHEMA,
1032
1142
  model: "kling-image-to-video",
1033
1143
  title: "Kling Image To Video",
1144
+ category: "video",
1034
1145
  description: "Animates a reference image into a short video. It has the same cost as Kling text-to-video and more permissive content moderation than Seedance.",
1035
1146
  adapter: { type: "kling.videoGenerations" },
1036
1147
  content: { input: [{
@@ -1077,6 +1188,7 @@ const builtinModels = [
1077
1188
  schema: MODEL_SCHEMA,
1078
1189
  model: "kling-omni-video",
1079
1190
  title: "Kling Omni Video",
1191
+ category: "video",
1080
1192
  description: "Kling Omni-Video generation model.",
1081
1193
  adapter: { type: "kling.videoGenerations" },
1082
1194
  content: { input: [{
@@ -1145,6 +1257,7 @@ const builtinModels = [
1145
1257
  schema: MODEL_SCHEMA,
1146
1258
  model: "kling-multi-image-to-video",
1147
1259
  title: "Kling Multi-Image Reference To Video",
1260
+ category: "video",
1148
1261
  description: "Kling multi-image reference video generation model.",
1149
1262
  adapter: { type: "kling.videoGenerations" },
1150
1263
  content: { input: [{
@@ -1201,6 +1314,7 @@ const builtinModels = [
1201
1314
  schema: MODEL_SCHEMA,
1202
1315
  model: "noobxl-t2i-onediff",
1203
1316
  title: "NoobXL T2I OneDiff",
1317
+ category: "image",
1204
1318
  description: "Anime-specialized NoobXL text-to-image model for anime-style illustrations. It works best with English Danbooru tags, which can invoke specific anime characters and illustrator styles. Natural-language understanding is limited. Fast and extremely low cost.",
1205
1319
  allowUnknownParameters: true,
1206
1320
  adapter: { type: "openai.images" },
@@ -1232,6 +1346,7 @@ const builtinModels = [
1232
1346
  schema: MODEL_SCHEMA,
1233
1347
  model: "noobxl-i2i-ipa-onediff",
1234
1348
  title: "NoobXL I2I IPA OneDiff",
1349
+ category: "image",
1235
1350
  description: "Anime-specialized NoobXL image-to-image model that redraws a single uploaded image using it as a style or character reference. It works best with English Danbooru tags, which can invoke specific anime characters and illustrator styles. Natural-language understanding is limited. Fast and extremely low cost.",
1236
1351
  allowUnknownParameters: true,
1237
1352
  adapter: { type: "openai.images" },
@@ -1276,6 +1391,7 @@ const builtinModels = [
1276
1391
  schema: MODEL_SCHEMA,
1277
1392
  model: "birefnet-general",
1278
1393
  title: "BiRefNet General",
1394
+ category: "image",
1279
1395
  description: "Single-image background removal model that produces images with transparent backgrounds. Well suited to image post-processing and creating web assets. Fast and extremely low cost.",
1280
1396
  adapter: { type: "openai.images" },
1281
1397
  content: { input: [{
@@ -1306,10 +1422,61 @@ const builtinModels = [
1306
1422
  }
1307
1423
  }]
1308
1424
  },
1425
+ {
1426
+ schema: MODEL_SCHEMA,
1427
+ model: "minimax-h3",
1428
+ title: "MiniMax H3",
1429
+ category: "video",
1430
+ description: "MiniMax H3 video generation with 768P output.",
1431
+ adapter: { type: "minimax.h3VideoGenerations" },
1432
+ content: { input: minimaxH3ContentInput },
1433
+ parameters: minimaxH3VideoParameters(),
1434
+ examples: [{
1435
+ title: "Text to video",
1436
+ request: {
1437
+ model: "minimax-h3",
1438
+ content: [{
1439
+ type: "text",
1440
+ text: "a red cube rotating on a white table"
1441
+ }],
1442
+ parameters: {
1443
+ duration: 5,
1444
+ resolution: "768P",
1445
+ ratio: "16:9"
1446
+ }
1447
+ }
1448
+ }]
1449
+ },
1450
+ {
1451
+ schema: MODEL_SCHEMA,
1452
+ model: "minimax-h3-unrestricted",
1453
+ title: "MiniMax H3 Unrestricted",
1454
+ category: "video",
1455
+ description: "MiniMax H3 video generation with caller-selected output dimensions.",
1456
+ adapter: { type: "minimax.h3VideoGenerations" },
1457
+ content: { input: minimaxH3ContentInput },
1458
+ parameters: minimaxH3VideoParameters(),
1459
+ examples: [{
1460
+ title: "Custom resolution",
1461
+ request: {
1462
+ model: "minimax-h3-unrestricted",
1463
+ content: [{
1464
+ type: "text",
1465
+ text: "a red cube rotating on a white table"
1466
+ }],
1467
+ parameters: {
1468
+ duration: 15,
1469
+ resolution: "1920x1080",
1470
+ ratio: "16:9"
1471
+ }
1472
+ }
1473
+ }]
1474
+ },
1309
1475
  {
1310
1476
  schema: MODEL_SCHEMA,
1311
1477
  model: "seedance-2-0",
1312
1478
  title: "Seedance 2.0",
1479
+ category: "video",
1313
1480
  description: "High-quality video generation model that accepts text, image, and video inputs. Supports resolutions from 480p to 2K and is well suited to final deliverables.",
1314
1481
  adapter: { type: "ark.videoGenerations" },
1315
1482
  content: { input: [
@@ -1367,6 +1534,7 @@ const builtinModels = [
1367
1534
  schema: MODEL_SCHEMA,
1368
1535
  model: "seedance-2-0-fast",
1369
1536
  title: "Seedance 2.0 Fast",
1537
+ category: "video",
1370
1538
  description: "Fast video generation model that accepts text, image, and video inputs. Faster and less expensive than seedance-2-0, making it well suited to creative validation and draft iteration.",
1371
1539
  adapter: { type: "ark.videoGenerations" },
1372
1540
  content: { input: [
@@ -1432,5 +1600,5 @@ function listBuiltinGenerationModels() {
1432
1600
  }
1433
1601
 
1434
1602
  //#endregion
1435
- 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 };
1436
- //# sourceMappingURL=builtins-BSD8jn8R.js.map
1603
+ export { compactArray as a, slugifyFileName as c, cloneJson as i, GENERATION_MODEL_CATEGORIES as l, getBuiltinGenerationModel as n, compactObject as o, listBuiltinGenerationModels as r, getBlockMeta as s, builtinGenerationModels as t, MODEL_SCHEMA as u };
1604
+ //# sourceMappingURL=builtins-CYamscRp.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins-CYamscRp.js","names":["parameters: GenerationModelDeclaration[\"parameters\"]","input: GenerationModelDeclaration[\"content\"][\"input\"]","parameters: NonNullable<GenerationModelDeclaration[\"parameters\"]>","builtinGenerationModels: GenerationModelDeclaration[]"],"sources":["../src/types.ts","../src/utils.ts","../src/builtins.ts"],"sourcesContent":["export const MODEL_SCHEMA = \"neta.generation.model.v1\" as const;\n\nexport const GENERATION_MODEL_CATEGORIES = [\"image\", \"video\", \"audio\"] as const;\n\nexport type GenerationModelCategory = (typeof GENERATION_MODEL_CATEGORIES)[number];\n\nexport type GenerationSource = { type: \"url\"; url: string } | { type: \"base64\"; mediaType: string; data: string };\n\nexport type GenerationContentBlockMeta = Record<string, unknown>;\n\nexport type GenerationContentBlock =\n | { type: \"text\"; text: string; meta?: GenerationContentBlockMeta }\n | { type: \"image\"; source: GenerationSource; meta?: GenerationContentBlockMeta }\n | { type: \"video\"; source: GenerationSource; meta?: GenerationContentBlockMeta }\n | { type: \"audio\"; source: GenerationSource; meta?: GenerationContentBlockMeta };\n\nexport type GenerationResult = {\n content: GenerationContentBlock[];\n requestId?: string;\n cost?: number;\n};\n\nexport type GenerationContentSpec = {\n type: \"text\" | \"image\" | \"video\" | \"audio\";\n required?: boolean;\n min?: number;\n max?: number;\n sources?: Array<GenerationSource[\"type\"]>;\n roles?: string[];\n roleRequired?: boolean;\n merge?: \"newline\" | \"space\" | \"concat\";\n meta?: Record<string, unknown>;\n description?: string;\n};\n\nexport type GenerationDimensionsSpec = {\n separator?: \"x\" | \"*\";\n min?: number;\n max?: number;\n multipleOf?: number;\n};\n\nexport type GenerationParameterSpec =\n | {\n type: \"string\";\n optional?: boolean;\n default?: string;\n enum?: string[];\n dimensions?: GenerationDimensionsSpec;\n description?: string;\n examples?: string[];\n }\n | {\n type: \"number\";\n optional?: boolean;\n default?: number;\n min?: number;\n max?: number;\n description?: string;\n examples?: number[];\n }\n | {\n type: \"integer\";\n optional?: boolean;\n default?: number;\n min?: number;\n max?: number;\n description?: string;\n examples?: number[];\n }\n | {\n type: \"boolean\";\n optional?: boolean;\n default?: boolean;\n description?: string;\n examples?: boolean[];\n };\n\nexport type GenerationMetaFieldSpec =\n | GenerationParameterSpec\n | { type: \"object\"; optional?: boolean; description?: string };\n\nexport type GenerationMetaTaskVariantSpec = {\n description?: string;\n required?: string[];\n requiredContent?: Array<GenerationContentSpec[\"type\"]>;\n sendTask?: boolean;\n};\n\nexport type GenerationMetaSpec = {\n fields?: Record<string, GenerationMetaFieldSpec>;\n taskField?: string;\n taskVariants?: Record<string, GenerationMetaTaskVariantSpec>;\n};\n\nexport type GenerationModelDeclaration = {\n schema: typeof MODEL_SCHEMA;\n model: string;\n title?: string;\n /** Product catalog class. */\n category?: GenerationModelCategory;\n description?: string;\n /** Hide from default discovery while keeping exact-ID lookup and runtime use available. */\n hidden?: boolean;\n allowUnknownParameters?: boolean;\n adapter: {\n type: string;\n } & Record<string, unknown>;\n content: {\n input: GenerationContentSpec[];\n };\n parameters?: Record<string, GenerationParameterSpec>;\n meta?: GenerationMetaSpec;\n examples?: Array<{\n title?: string;\n request: GenerateRequest;\n }>;\n};\n\nexport type GenerateRequest = {\n model: string;\n content: GenerationContentBlock[];\n parameters?: Record<string, unknown>;\n meta?: Record<string, unknown>;\n /** @deprecated Use meta. */\n metadata?: Record<string, unknown>;\n apiKey?: string;\n baseUrl?: string;\n};\n\nexport type ResolvedGenerationRequest = {\n declaration: GenerationModelDeclaration;\n request: GenerateRequest;\n parameters: Record<string, unknown>;\n meta: Record<string, unknown>;\n};\n\nexport type GenerationSourceResolver = (source: GenerationSource) => Promise<string> | string;\n\nexport type GenerationDebugEvent =\n | {\n type: \"request\";\n url: string;\n method: string;\n headers: Record<string, string>;\n body?: unknown;\n }\n | {\n type: \"response\";\n url: string;\n status: number;\n statusText: string;\n headers: Record<string, string>;\n trace: Record<string, string>;\n elapsedMs: number;\n body?: unknown;\n };\n\nexport type GenerationDebugLogger = (event: GenerationDebugEvent) => void;\n\nexport type GenerationDebugOptions = {\n enabled?: boolean;\n includeSensitive?: boolean;\n includeResponseBody?: boolean;\n logger?: GenerationDebugLogger;\n};\n\nexport type GenerationDebugConfig = GenerationDebugOptions & {\n enabled: boolean;\n includeSensitive: boolean;\n includeResponseBody: boolean;\n logger: GenerationDebugLogger;\n};\n\nexport type GenerationAdapterContext = {\n apiKey: string;\n baseUrl: string;\n fetch: typeof fetch;\n resolveSource: GenerationSourceResolver;\n};\n\nexport type GenerationAdapterInput = ResolvedGenerationRequest & {\n context: GenerationAdapterContext;\n};\n\nexport type GenerationAdapter = ((input: GenerationAdapterInput) => Promise<GenerationContentBlock[]>) & {\n validate?: (input: ResolvedGenerationRequest) => void;\n};\n\nexport type CreateGenerationClientOptions = {\n apiKey?: string;\n baseUrl?: string;\n models?: GenerationModelDeclaration[];\n includeBuiltinModels?: boolean;\n fetch?: typeof fetch;\n sourceResolver?: GenerationSourceResolver;\n adapters?: Record<string, GenerationAdapter>;\n debug?: boolean | GenerationDebugOptions;\n};\n\nexport type GenerationClient = {\n /** Validates the request and sends it to the model adapter. */\n generate(request: GenerateRequest): Promise<GenerationContentBlock[]>;\n /** Resolves model defaults and all available validation rules without requiring an API key or making a network request. */\n validate(request: GenerateRequest): ResolvedGenerationRequest;\n /** Returns cloned, machine-readable declarations for every available model. */\n listModels(): GenerationModelDeclaration[];\n /** Returns a cloned model declaration, including content constraints and request examples, or null when unavailable. */\n getModel(model: string): GenerationModelDeclaration | null;\n /** Serializes one available model declaration for agents and external tools. */\n stringifyModelConfig(model: string, options?: { format?: \"yaml\" | \"json\" }): string;\n /** Writes one available model declaration to a YAML file. */\n exportModelConfig(model: string, filePath: string): Promise<void>;\n /** Writes every available model declaration to a directory as YAML files. */\n exportModelConfigs(directory: string): Promise<void>;\n};\n\nexport type GenerationClientWithResult = GenerationClient & {\n /** Generates content and returns observed request metadata such as requestId and cost when available. */\n generateResult(request: GenerateRequest): Promise<GenerationResult>;\n};\n","import type { GenerationContentBlock } from \"./types.js\";\n\nexport function cloneJson<T>(value: T): T {\n return JSON.parse(JSON.stringify(value)) as T;\n}\n\nexport function slugifyFileName(value: string): string {\n return (\n value\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9._-]+/g, \"-\")\n .replace(/^-+|-+$/g, \"\") || \"model\"\n );\n}\n\nexport function getBlockMeta(block: GenerationContentBlock): Record<string, unknown> | undefined {\n return \"meta\" in block ? block.meta : undefined;\n}\n\nexport function compactArray<T>(values: T[]): T[] | undefined {\n return values.length > 0 ? values : undefined;\n}\n\nexport function compactObject<T extends Record<string, unknown>>(value: T): T {\n for (const key of Object.keys(value)) if (value[key] === undefined) delete value[key];\n return value;\n}\n","import type { GenerationModelDeclaration } from \"./types.js\";\nimport { MODEL_SCHEMA } from \"./types.js\";\nimport { cloneJson } from \"./utils.js\";\n\nconst imageSizeParameters = {\n size: {\n type: \"string\",\n optional: true,\n default: \"1024x1024\",\n description: \"Output image size.\",\n examples: [\"auto\", \"1024x1024\", \"1536x1024\", \"1024x1536\", \"2048x2048\", \"2048x1152\", \"3840x2160\", \"2160x3840\"],\n },\n quality: {\n type: \"string\",\n optional: true,\n default: \"auto\",\n enum: [\"auto\", \"low\", \"medium\", \"high\"],\n description: \"Image quality.\",\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nconst krea2ImageParameters = {\n size: {\n type: \"string\",\n optional: true,\n default: \"1024x1024\",\n description:\n \"Output image size as WIDTHxHEIGHT. Both dimensions must be between 256 and 1024 and must be multiples of 16.\",\n dimensions: { min: 256, max: 1024, multipleOf: 16 },\n examples: [\"1024x1024\", \"1024x768\", \"768x1024\", \"768x768\", \"512x512\", \"256x256\"],\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nconst zImageTurboParameters = {\n size: {\n type: \"string\",\n optional: true,\n default: \"1024*1024\",\n enum: [\"1024*1024\", \"1536*1024\", \"1024*1536\", \"2048*2048\"],\n description: \"Output image size.\",\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nconst qwenImageEditParameters = {\n size: {\n type: \"string\",\n optional: true,\n default: \"1024x1024\",\n description: \"Output image size.\",\n examples: [\"1024x1024\", \"768x1024\", \"1024x768\"],\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nconst noobxlImageParameters = {\n size: {\n type: \"string\",\n optional: true,\n default: \"1024x1024\",\n enum: [\"1024x1024\", \"896x1152\", \"1152x896\", \"1344x768\", \"768x1344\"],\n description: \"Output image size.\",\n },\n negative_prompt: {\n type: \"string\",\n optional: true,\n description: \"Content to avoid in generated images.\",\n },\n seed: {\n type: \"integer\",\n optional: true,\n min: 0,\n description: \"Random seed for reproducibility.\",\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nconst noobxlImageToImageParameters = {\n ...noobxlImageParameters,\n controlnet_weight: {\n type: \"number\",\n optional: true,\n min: 0,\n max: 2,\n description: \"ControlNet tile weight. The provider default is 0.8.\",\n },\n ipadapter_face_image_ref: {\n type: \"string\",\n optional: true,\n description: \"Optional face reference image URL for IP-Adapter.\",\n },\n ipadapter_face_weight: {\n type: \"number\",\n optional: true,\n min: 0,\n max: 2,\n description: \"IP-Adapter face weight. The provider default is 0.6 when a face reference is supplied.\",\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nfunction seedanceVideoParameters(defaults: { resolution: string; resolutions?: string[]; maxWait: number }) {\n return {\n duration: {\n type: \"integer\",\n optional: true,\n default: 5,\n min: 4,\n max: 15,\n description: \"Video duration in seconds.\",\n },\n resolution: {\n type: \"string\",\n optional: true,\n default: defaults.resolution,\n enum: defaults.resolutions ?? [\"480p\", \"720p\", \"1080p\", \"2K\"],\n description: \"Output video resolution.\",\n },\n ratio: {\n type: \"string\",\n optional: true,\n default: \"16:9\",\n enum: [\"16:9\", \"9:16\", \"1:1\", \"4:3\", \"3:2\", \"2:3\", \"3:4\", \"21:9\", \"adaptive\"],\n description: \"Output aspect ratio. Use adaptive to let the model choose.\",\n },\n seed: { type: \"integer\", optional: true, description: \"Random seed for reproducibility.\" },\n camera_fixed: {\n type: \"boolean\",\n optional: true,\n default: false,\n description: \"Fix camera position when supported.\",\n },\n poll_interval: {\n type: \"integer\",\n optional: true,\n default: 2,\n min: 1,\n max: 30,\n description: \"Seconds between task status checks.\",\n },\n max_wait: {\n type: \"integer\",\n optional: true,\n default: defaults.maxWait,\n min: 30,\n max: 1800,\n description: \"Maximum seconds to wait for task completion.\",\n },\n } satisfies GenerationModelDeclaration[\"parameters\"];\n}\n\nconst minimaxH3ContentInput = [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Video prompt.\" },\n {\n type: \"image\",\n required: false,\n max: 12,\n sources: [\"url\"],\n roles: [\"first_frame\", \"last_frame\", \"reference_image\"],\n roleRequired: true,\n description: \"Optional image inputs. Use meta.role to select a frame or reference image.\",\n },\n {\n type: \"video\",\n required: false,\n max: 3,\n sources: [\"url\"],\n roles: [\"reference_video\"],\n roleRequired: true,\n description: \"Optional reference video inputs. Use meta.role reference_video.\",\n },\n {\n type: \"audio\",\n required: false,\n max: 3,\n sources: [\"url\"],\n roles: [\"reference_audio\"],\n roleRequired: true,\n description: \"Optional reference audio inputs. Use meta.role reference_audio.\",\n },\n] satisfies GenerationModelDeclaration[\"content\"][\"input\"];\n\nconst minimaxH3VideoCommonParameters = {\n duration: {\n type: \"integer\",\n optional: true,\n default: 5,\n description: \"Video duration in seconds.\",\n },\n ratio: {\n type: \"string\",\n optional: true,\n default: \"16:9\",\n enum: [\"adaptive\", \"21:9\", \"16:9\", \"4:3\", \"1:1\", \"3:4\", \"9:16\"],\n description: \"Output aspect ratio. Use adaptive when media inputs determine the ratio.\",\n },\n aigc_watermark: {\n type: \"boolean\",\n optional: true,\n default: false,\n description: \"Enable the generated-video watermark.\",\n },\n poll_interval: {\n type: \"integer\",\n optional: true,\n default: 2,\n min: 1,\n max: 30,\n description: \"Seconds between task status checks.\",\n },\n max_wait: {\n type: \"integer\",\n optional: true,\n default: 1800,\n min: 30,\n max: 1800,\n description: \"Maximum seconds to wait for task completion.\",\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nfunction minimaxH3VideoParameters() {\n return {\n ...minimaxH3VideoCommonParameters,\n resolution: {\n type: \"string\" as const,\n optional: true,\n default: \"768P\",\n description: \"Output video resolution or an explicit WIDTHxHEIGHT canvas.\",\n },\n } satisfies GenerationModelDeclaration[\"parameters\"];\n}\n\nfunction klingVideoParameters(options: {\n maxDuration: number;\n negativePrompt?: boolean;\n seed?: boolean;\n sound?: boolean;\n}) {\n const parameters: GenerationModelDeclaration[\"parameters\"] = {\n duration: {\n type: \"integer\",\n optional: true,\n default: 5,\n min: 5,\n max: options.maxDuration,\n description: \"Video duration in seconds.\",\n },\n aspect_ratio: {\n type: \"string\",\n optional: true,\n default: \"16:9\",\n enum: [\"16:9\", \"9:16\", \"1:1\"],\n description: \"Output aspect ratio.\",\n },\n mode: {\n type: \"string\",\n optional: true,\n default: \"std\",\n enum: [\"std\", \"pro\"],\n description: \"Kling generation mode.\",\n },\n cfg_scale: {\n type: \"number\",\n optional: true,\n default: 0.5,\n min: 0,\n max: 1,\n description: \"Prompt adherence scale.\",\n },\n poll_interval: {\n type: \"integer\",\n optional: true,\n default: 5,\n min: 1,\n max: 30,\n description: \"Seconds between task status checks.\",\n },\n max_wait: {\n type: \"integer\",\n optional: true,\n default: 900,\n min: 30,\n max: 1800,\n description: \"Maximum seconds to wait for task completion.\",\n },\n };\n if (options.negativePrompt) {\n parameters.negative_prompt = {\n type: \"string\",\n optional: true,\n description: \"Negative prompt.\",\n };\n }\n if (options.seed) {\n parameters.seed = {\n type: \"integer\",\n optional: true,\n description: \"Random seed for reproducibility.\",\n };\n }\n if (options.sound) {\n parameters.sound = {\n type: \"string\",\n optional: true,\n enum: [\"on\", \"off\"],\n description: \"Enable or disable generated sound when supported.\",\n };\n }\n return parameters;\n}\n\nconst sunoTaskParameters = {\n poll_interval: {\n type: \"integer\",\n optional: true,\n default: 5,\n min: 1,\n max: 60,\n description: \"Seconds between task status checks.\",\n },\n max_wait: {\n type: \"integer\",\n optional: true,\n default: 600,\n min: 30,\n max: 3600,\n description: \"Maximum seconds to wait for task completion.\",\n },\n} satisfies GenerationModelDeclaration[\"parameters\"];\n\nconst sunoCommonMetaFields = {\n title: { type: \"string\", optional: true, description: \"Suno song title.\" },\n tags: { type: \"string\", optional: true, description: \"Comma-separated Suno music style tags.\" },\n gpt_description_prompt: { type: \"string\", optional: true, description: \"Suno inspiration-mode prompt.\" },\n negative_tags: { type: \"string\", optional: true, description: \"Styles to avoid.\" },\n generation_type: { type: \"string\", optional: true, description: \"Suno generation type.\" },\n make_instrumental: { type: \"boolean\", optional: true, default: false, description: \"Generate instrumental music.\" },\n metadata: { type: \"object\", optional: true, description: \"Suno provider metadata payload.\" },\n metadata_params: {\n type: \"object\",\n optional: true,\n description: \"Suno task-specific metadata payload.\",\n },\n} satisfies NonNullable<GenerationModelDeclaration[\"meta\"]>[\"fields\"];\n\nconst sunoTaskVariants = {\n extend: { required: [\"continue_clip_id\"] },\n upload_extend: { required: [\"continue_clip_id\"] },\n infill: { required: [\"continue_clip_id\", \"metadata_params\"] },\n fixed_infill: { required: [\"continue_clip_id\", \"metadata_params\"] },\n infill_intro: { required: [\"continue_clip_id\", \"metadata_params\"] },\n infill_outro: { required: [\"continue_clip_id\", \"metadata_params\"] },\n cover_infill: { required: [\"continue_clip_id\", \"metadata_params\"] },\n cover_extend: { required: [\"continue_clip_id\"] },\n artist_infill: { required: [\"continue_clip_id\", \"metadata_params\"] },\n artist_consistency: { required: [\"persona_id\", \"artist_clip_id\"] },\n cover: { required: [\"task_id\", \"continue_clip_id\"] },\n image_to_song: { requiredContent: [\"image\"], required: [\"metadata_params\"] },\n video_to_song: { requiredContent: [\"video\"], required: [\"metadata_params\"] },\n concat: { required: [\"clip_id\"] },\n sound: { required: [\"metadata_params\"] },\n underpainting: { required: [\"metadata_params\"] },\n overpainting: { required: [\"metadata_params\"] },\n remaster: { required: [\"metadata_params\"] },\n vox: { required: [\"artist_clip_id\"] },\n chop_sample_condition: { required: [\"metadata_params\"] },\n mashup_condition: { required: [\"metadata_params\"] },\n playlist_condition: { required: [\"metadata_params\"] },\n} satisfies NonNullable<GenerationModelDeclaration[\"meta\"]>[\"taskVariants\"];\n\nfunction sunoContentInput(\n options: { text?: \"required\" | \"optional\" | \"none\"; audio?: boolean; image?: boolean; video?: boolean } = {},\n): GenerationModelDeclaration[\"content\"][\"input\"] {\n const input: GenerationModelDeclaration[\"content\"][\"input\"] = [];\n if (options.text !== \"none\") {\n input.push({\n type: \"text\",\n required: options.text === \"required\",\n max: 16,\n merge: \"newline\",\n description:\n \"Prompt text. The adapter maps merged text to the operation's text field when that field is not provided.\",\n });\n }\n if (options.audio) {\n input.push({\n type: \"audio\",\n required: true,\n max: 1,\n sources: [\"url\", \"base64\"],\n description: \"Reference audio.\",\n });\n }\n if (options.image) {\n input.push({\n type: \"image\",\n required: true,\n max: 1,\n sources: [\"url\", \"base64\"],\n description: \"Reference image.\",\n });\n }\n if (options.video) {\n input.push({\n type: \"video\",\n required: true,\n max: 1,\n sources: [\"url\", \"base64\"],\n description: \"Reference video.\",\n });\n }\n return input;\n}\n\nconst sunoVersions = [\n { model: \"suno_music_chirp_fenix\", title: \"Suno Music Chirp Fenix v5.5\", mv: \"chirp-fenix\" },\n] as const;\n\nconst sunoMusicExample = {\n title: \"Music generation\",\n request: {\n model: \"suno_music_chirp_fenix\",\n content: [{ type: \"text\", text: \"uplifting cinematic pop with warm piano and clear chorus\" }],\n meta: {\n title: \"Warm Horizon\",\n tags: \"cinematic pop, warm piano\",\n make_instrumental: false,\n },\n },\n} satisfies NonNullable<GenerationModelDeclaration[\"examples\"]>[number];\n\nfunction sunoVersionModel(version: (typeof sunoVersions)[number]): GenerationModelDeclaration {\n return {\n schema: MODEL_SCHEMA,\n model: version.model,\n title: version.title,\n category: \"audio\",\n description:\n \"High-quality music generation model for soundtracks and background music. Produces two MP3 tracks and two JPG cover images per request.\",\n adapter: { type: \"suno.tasks\", operation: \"music\", payload: { mv: version.mv } },\n content: {\n input: sunoContentInput({ text: \"required\" }),\n },\n parameters: sunoTaskParameters,\n meta: {\n fields: sunoCommonMetaFields,\n },\n ...(version.model === \"suno_music_chirp_fenix\" ? { examples: [sunoMusicExample] } : {}),\n };\n}\n\nfunction sunoTaskModel(options: {\n model: string;\n title: string;\n description: string;\n task: string;\n mv?: string;\n content?: Parameters<typeof sunoContentInput>[0];\n fields?: NonNullable<GenerationModelDeclaration[\"meta\"]>[\"fields\"];\n examples?: GenerationModelDeclaration[\"examples\"];\n}): GenerationModelDeclaration {\n return {\n schema: MODEL_SCHEMA,\n model: options.model,\n title: options.title,\n description: options.description,\n adapter: {\n type: \"suno.tasks\",\n operation: \"music\",\n task: options.task,\n payload: { mv: options.mv ?? \"chirp-v5\" },\n },\n content: {\n input: sunoContentInput(options.content ?? { text: \"optional\" }),\n },\n parameters: sunoTaskParameters,\n meta: {\n fields: {\n ...sunoCommonMetaFields,\n ...options.fields,\n },\n taskVariants: sunoTaskVariants,\n },\n ...(options.examples ? { examples: options.examples } : {}),\n };\n}\n\nconst sunoModels = [\n ...sunoVersions.map(sunoVersionModel),\n {\n schema: MODEL_SCHEMA,\n model: \"suno_style_tags\",\n title: \"Suno Style Tags\",\n description: \"Suno style tag upsampling model.\",\n adapter: { type: \"suno.tasks\", operation: \"upsample_tags\" },\n content: {\n input: sunoContentInput({ text: \"required\" }),\n },\n },\n {\n schema: MODEL_SCHEMA,\n model: \"suno_upload_audio\",\n title: \"Suno Upload Audio\",\n description: \"Suno reference-audio upload model.\",\n adapter: { type: \"suno.tasks\", operation: \"upload_audio\", defaults: { name: \"reference-audio\", timeout: 120 } },\n content: {\n input: sunoContentInput({ text: \"none\", audio: true }),\n },\n parameters: sunoTaskParameters,\n meta: {\n fields: {\n name: { type: \"string\", optional: true, description: \"Upload name.\" },\n timeout: { type: \"integer\", optional: true, description: \"Upload timeout in seconds.\" },\n },\n },\n },\n sunoTaskModel({\n model: \"suno_image_to_song_chirp_v5\",\n title: \"Suno Image to Song Chirp v5.0\",\n description: \"Suno image-to-song task with a fixed chirp-v5 engine.\",\n task: \"image_to_song\",\n content: { text: \"optional\", image: true },\n fields: {\n metadata_params: { type: \"object\", description: \"Image-to-song metadata payload.\" },\n },\n }),\n sunoTaskModel({\n model: \"suno_video_to_song_chirp_v5\",\n title: \"Suno Video to Song Chirp v5.0\",\n description: \"Suno video-to-song task with a fixed chirp-v5 engine.\",\n task: \"video_to_song\",\n content: { text: \"optional\", video: true },\n fields: {\n metadata_params: { type: \"object\", description: \"Video-to-song metadata payload.\" },\n },\n }),\n sunoTaskModel({\n model: \"suno_sound_chirp_v5\",\n title: \"Suno Sound Chirp v5.0\",\n description: \"Suno sound-effect generation task with a fixed chirp-v5 engine.\",\n task: \"sound\",\n content: { text: \"optional\" },\n fields: {\n metadata_params: { type: \"object\", description: \"Sound task metadata payload.\" },\n },\n }),\n sunoTaskModel({\n model: \"suno_cover_chirp_v5\",\n title: \"Suno Cover Chirp v5.0\",\n description: \"Suno cover task with a fixed chirp-v5 engine.\",\n task: \"cover\",\n content: { text: \"optional\" },\n fields: {\n cover_clip_id: { type: \"string\", description: \"Clip id to cover.\" },\n task_id: { type: \"string\", description: \"Source Suno task id used for cover routing.\" },\n continue_clip_id: { type: \"string\", description: \"Source clip id used for cover generation.\" },\n continue_at: { type: \"number\", optional: true, description: \"Source clip continuation position in seconds.\" },\n },\n }),\n sunoTaskModel({\n model: \"suno_infill_chirp_v5\",\n title: \"Suno Infill Chirp v5.0\",\n description: \"Suno local edit task with a fixed chirp-v5 engine.\",\n task: \"infill\",\n content: { text: \"optional\" },\n fields: {\n continue_clip_id: { type: \"string\", description: \"Clip id to edit.\" },\n metadata_params: { type: \"object\", description: \"Infill timing and replacement metadata.\" },\n },\n }),\n sunoTaskModel({\n model: \"suno_vox_chirp_v5\",\n title: \"Suno Vox Chirp v5.0\",\n description: \"Suno hum-to-song task with a fixed chirp-v5 engine.\",\n task: \"vox\",\n content: { text: \"optional\" },\n fields: {\n artist_clip_id: { type: \"string\", description: \"Reference hum or vocal clip id.\" },\n },\n }),\n] satisfies GenerationModelDeclaration[];\n\ntype GeminiImageModelOptions = {\n imageSize?: {\n default: string;\n values: string[];\n example: string;\n };\n};\n\nfunction geminiImageModel(\n model: string,\n title: string,\n description: string,\n options: GeminiImageModelOptions = {},\n): GenerationModelDeclaration {\n const parameters: NonNullable<GenerationModelDeclaration[\"parameters\"]> = {\n aspect_ratio: {\n type: \"string\",\n optional: true,\n default: \"1:1\",\n enum: [\"1:1\", \"16:9\", \"4:3\", \"3:2\", \"3:4\", \"2:3\", \"9:16\", \"5:4\", \"4:5\", \"21:9\", \"1:4\", \"4:1\", \"1:8\", \"8:1\"],\n description: \"Output aspect ratio.\",\n },\n };\n if (options.imageSize) {\n parameters.image_size = {\n type: \"string\",\n optional: true,\n default: options.imageSize.default,\n enum: options.imageSize.values,\n description: \"Output image resolution.\",\n };\n }\n\n return {\n schema: MODEL_SCHEMA,\n model,\n title,\n category: \"image\",\n description,\n adapter: { type: \"gemini.generateContent\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Prompt text.\" },\n {\n type: \"image\",\n required: false,\n max: 14,\n sources: [\"url\", \"base64\"],\n description: \"Optional reference images.\",\n },\n ],\n },\n parameters,\n examples: [\n {\n title: \"Basic image\",\n request: {\n model,\n content: [\n { type: \"text\", text: \"a vibrant infographic explaining photosynthesis with clear readable labels\" },\n ],\n parameters: {\n aspect_ratio: \"16:9\",\n ...(options.imageSize ? { image_size: options.imageSize.example } : {}),\n },\n },\n },\n ],\n };\n}\n\nfunction qwenTtsModel(\n model: string,\n title: string,\n description: string,\n options: { minimumTextCodePoints?: number } = {},\n): GenerationModelDeclaration {\n const text = options.minimumTextCodePoints\n ? \"这是一段长度足够并且表达清晰自然的语音合成测试文本。\"\n : \"这是一次清晰自然的语音合成测试。\";\n return {\n schema: MODEL_SCHEMA,\n model,\n title,\n description,\n adapter: { type: \"openai.audioSpeech\" },\n content: {\n input: [\n {\n type: \"text\",\n required: true,\n min: 1,\n max: 1,\n description: options.minimumTextCodePoints\n ? `Exactly one non-empty text block to speak, with at least ${options.minimumTextCodePoints} Unicode code points.`\n : \"Exactly one non-empty text block to speak.\",\n },\n {\n type: \"audio\",\n required: false,\n max: 1,\n sources: [\"url\"],\n description: \"Clone: one URL; no voice_prompt. Dependency: use prior generated audio.\",\n },\n ],\n },\n meta: {\n fields: {\n voice_prompt: {\n type: \"string\",\n optional: true,\n description: \"Design: custom voice text; no reference audio.\",\n },\n },\n },\n examples: [\n {\n title: \"Voice design\",\n request: {\n model,\n content: [{ type: \"text\", text }],\n meta: { voice_prompt: \"一位沉稳干练的男性播音员声音,吐字清晰有力\" },\n },\n },\n {\n title: \"Voice clone\",\n request: {\n model,\n content: [\n { type: \"text\", text },\n { type: \"audio\", source: { type: \"url\", url: \"https://example.com/reference.mp3\" } },\n ],\n },\n },\n ],\n };\n}\n\nconst audioSpeechModels = [\n qwenTtsModel(\n \"qwen-tts\",\n \"Qwen TTS\",\n \"Modes: voice_prompt design OR one-reference clone. Default: unspecified Qwen design. Text: any length. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.\",\n ),\n qwenTtsModel(\n \"qwen-audio-3.0-tts-plus\",\n \"Qwen Audio 3.0 TTS Plus\",\n \"Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.\",\n { minimumTextCodePoints: 15 },\n ),\n qwenTtsModel(\n \"qwen-audio-3.0-tts-flash\",\n \"Qwen Audio 3.0 TTS Flash\",\n \"Modes: voice_prompt design OR one-reference clone. Text: >=15 Unicode code points. Conflict: ask user; never combine/reinterpret. Dependency: clone prior generated audio.\",\n { minimumTextCodePoints: 15 },\n ),\n {\n schema: MODEL_SCHEMA,\n model: \"higgs-tts\",\n title: \"Higgs TTS\",\n description:\n \"Modes: built-in; one-reference high-fidelity clone; weighted 2-16-reference blend. Default: delegated generic voice (natural/suitable). Blend: all references, full text, one request. Conflict: clone + redesign; ask user, do not reinterpret. Dependency: clone prior generated audio.\",\n adapter: { type: \"openai.audioSpeech\" },\n content: {\n input: [\n {\n type: \"text\",\n required: true,\n min: 1,\n max: 1,\n description: \"Exactly one non-empty text block to speak.\",\n },\n {\n type: \"audio\",\n required: false,\n max: 16,\n sources: [\"url\"],\n description:\n \"Reference: one may omit weight; 2-16 require positive finite weights. Dependency: use prior generated audio.\",\n },\n ],\n },\n examples: [\n {\n title: \"Default voice\",\n request: {\n model: \"higgs-tts\",\n content: [{ type: \"text\", text: \"使用默认音色朗读这段文本。\" }],\n },\n },\n {\n title: \"Single reference\",\n request: {\n model: \"higgs-tts\",\n content: [\n { type: \"text\", text: \"使用单条参考音频朗读这段文本。\" },\n { type: \"audio\", source: { type: \"url\", url: \"https://example.com/reference.mp3\" } },\n ],\n },\n },\n {\n title: \"Weighted single reference\",\n request: {\n model: \"higgs-tts\",\n content: [\n { type: \"text\", text: \"使用带权重的单条参考音频朗读这段文本。\" },\n {\n type: \"audio\",\n source: { type: \"url\", url: \"https://example.com/reference.mp3\" },\n meta: { weight: 1 },\n },\n ],\n },\n },\n {\n title: \"Multiple references\",\n request: {\n model: \"higgs-tts\",\n content: [\n { type: \"text\", text: \"使用多参考融合音色朗读这段文本。\" },\n {\n type: \"audio\",\n source: { type: \"url\", url: \"https://example.com/reference-a.mp3\" },\n meta: { weight: 0.5 },\n },\n {\n type: \"audio\",\n source: { type: \"url\", url: \"https://example.com/reference-b.mp3\" },\n meta: { weight: 0.5 },\n },\n ],\n },\n },\n ],\n },\n] satisfies GenerationModelDeclaration[];\n\nconst builtinModels = [\n ...audioSpeechModels,\n {\n schema: MODEL_SCHEMA,\n model: \"gpt-image-2\",\n title: \"GPT Image 2\",\n category: \"image\",\n description:\n \"Excels at photorealism, fine detail, text rendering, and sophisticated layouts. It accepts uploaded images as base or reference images and is particularly well suited to realistic imagery, mock website screenshots, infographics, and highly stylized, visually striking illustrations. Strong natural-language understanding and broad world knowledge help it follow complex prompts. Non-photorealistic styles may develop fine-grained texture and lighting artifacts, which can be corrected through prompt refinement or reference images. Low cost, but relatively slow.\",\n adapter: { type: \"openai.images\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Prompt text.\" },\n {\n type: \"image\",\n required: false,\n max: 16,\n sources: [\"url\", \"base64\"],\n description: \"Optional reference images.\",\n },\n ],\n },\n parameters: imageSizeParameters,\n examples: [\n {\n title: \"Basic image\",\n request: {\n model: \"gpt-image-2\",\n content: [{ type: \"text\", text: \"a cyberpunk cat in neon rain\" }],\n parameters: { size: \"1024x1024\", quality: \"auto\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"krea2\",\n title: \"Krea 2\",\n category: \"image\",\n description:\n \"Designed for visually refined image generation with broad aesthetic diversity. Strong natural-language understanding helps it follow detailed prompts. Text-only input; reference images are not supported. Relatively fast and low cost.\",\n adapter: { type: \"openai.images\" },\n content: {\n input: [{ type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Prompt text.\" }],\n },\n parameters: krea2ImageParameters,\n examples: [\n {\n title: \"Text-to-image\",\n request: {\n model: \"krea2\",\n content: [{ type: \"text\", text: \"an elegant editorial portrait with sculptural lighting\" }],\n parameters: { size: \"1024x1024\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"z-image-turbo\",\n title: \"Z-Image Turbo\",\n category: \"image\",\n description:\n \"Fast text-to-image model. Z-Image Turbo accepts prompt text only and does not support reference images.\",\n adapter: { type: \"openai.images\" },\n content: {\n input: [{ type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Prompt text.\" }],\n },\n parameters: zImageTurboParameters,\n examples: [\n {\n title: \"Text to image\",\n request: {\n model: \"z-image-turbo\",\n content: [\n { type: \"text\", text: \"a clean product-style image of a small red toy robot standing on a white desk\" },\n ],\n parameters: { size: \"1024*1024\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"qwen-image-edit\",\n title: \"Qwen Image Edit\",\n category: \"image\",\n description: \"Neta Qwen image editing with one source image URL and an edit instruction.\",\n adapter: { type: \"openai.imageEdits\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Edit instruction.\" },\n {\n type: \"image\",\n required: true,\n min: 1,\n max: 1,\n sources: [\"url\"],\n description: \"Source image URL to edit.\",\n },\n ],\n },\n parameters: qwenImageEditParameters,\n examples: [\n {\n title: \"Edit image\",\n request: {\n model: \"qwen-image-edit\",\n content: [\n { type: \"text\", text: \"change the background to a clean white studio backdrop\" },\n { type: \"image\", source: { type: \"url\", url: \"https://example.com/input.png\" } },\n ],\n parameters: { size: \"1024x1024\" },\n },\n },\n ],\n },\n geminiImageModel(\n \"gemini-3.1-flash-image-preview\",\n \"Gemini 3.1 Flash Image Preview\",\n \"Excels at text rendering, UI components and icons, commercial visuals, and image editing. It handles both photorealistic and non-photorealistic styles reliably, producing clean, consistent images while preserving key features from references. Strong natural-language understanding and broad world knowledge help it follow complex prompts. Its images are generally less expressive than those from gpt-image-2, and its style-transfer capabilities are weaker. Moderate speed, but relatively expensive.\",\n { imageSize: { default: \"2K\", values: [\"512\", \"1K\", \"2K\", \"4K\"], example: \"1K\" } },\n ),\n geminiImageModel(\n \"gemini-3.1-flash-lite-image\",\n \"Gemini 3.1 Flash Lite Image\",\n \"Excels at text rendering, UI components and icons, commercial visuals, and image editing. It supports both photorealistic and non-photorealistic styles, producing clean, consistent results while preserving key features from references. Strong natural-language understanding and broad world knowledge help it follow complex prompts. This Lite variant produces fixed 1K output and is optimized for fast generation at a moderate price.\",\n ),\n {\n schema: MODEL_SCHEMA,\n model: \"video-upscale-native\",\n title: \"Video Upscale\",\n category: \"video\",\n description: \"Upscales a video. Recommended input: long edge under 1080 pixels.\",\n adapter: { type: \"video.upscaleNative\" },\n content: {\n input: [\n {\n type: \"video\",\n required: true,\n min: 1,\n max: 1,\n sources: [\"url\"],\n description: \"Public video URL to upscale.\",\n },\n ],\n },\n examples: [\n {\n title: \"Upscale video\",\n request: {\n model: \"video-upscale-native\",\n content: [{ type: \"video\", source: { type: \"url\", url: \"https://example.com/input.mp4\" } }],\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"kling-text-to-video\",\n title: \"Kling Text To Video\",\n category: \"video\",\n description:\n \"One of the more affordable text-to-video models, well suited to short-form social media content and rapid creative validation.\",\n adapter: { type: \"kling.videoGenerations\" },\n content: {\n input: [{ type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Video prompt.\" }],\n },\n parameters: klingVideoParameters({ maxDuration: 10, negativePrompt: true, seed: true }),\n examples: [\n {\n title: \"Text to video\",\n request: {\n model: \"kling-text-to-video\",\n content: [{ type: \"text\", text: \"a small paper boat floating on calm water, cinematic motion\" }],\n parameters: { duration: 5, aspect_ratio: \"16:9\", mode: \"std\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"kling-image-to-video\",\n title: \"Kling Image To Video\",\n category: \"video\",\n description:\n \"Animates a reference image into a short video. It has the same cost as Kling text-to-video and more permissive content moderation than Seedance.\",\n adapter: { type: \"kling.videoGenerations\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Video prompt.\" },\n {\n type: \"image\",\n required: false,\n max: 2,\n sources: [\"url\", \"base64\"],\n description:\n \"First frame and optional tail frame image input. Provider-native image input may be passed in meta.\",\n },\n ],\n },\n parameters: klingVideoParameters({ maxDuration: 10, negativePrompt: true, seed: true }),\n examples: [\n {\n title: \"Image to video\",\n request: {\n model: \"kling-image-to-video\",\n content: [\n { type: \"text\", text: \"gently turn toward the camera with soft natural motion\" },\n { type: \"image\", source: { type: \"url\", url: \"https://example.com/input.png\" } },\n ],\n parameters: { duration: 5, aspect_ratio: \"16:9\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"kling-omni-video\",\n title: \"Kling Omni Video\",\n category: \"video\",\n description: \"Kling Omni-Video generation model.\",\n adapter: { type: \"kling.videoGenerations\" },\n content: {\n input: [\n {\n type: \"text\",\n required: false,\n max: 16,\n merge: \"newline\",\n description: \"Optional video prompt. Use Kling Omni placeholders such as <<<image_1>>> with image_list.\",\n },\n {\n type: \"image\",\n required: false,\n max: 2,\n sources: [\"url\", \"base64\"],\n description: \"Optional simple image input. Provider-native Omni media arrays belong in request meta.\",\n },\n ],\n },\n parameters: klingVideoParameters({ maxDuration: 15, sound: true }),\n meta: {\n fields: {\n multi_shot: {\n type: \"boolean\",\n optional: true,\n description: \"Enable Kling Omni multi-shot mode.\",\n },\n shot_type: {\n type: \"string\",\n optional: true,\n description: \"Kling Omni shot type.\",\n },\n },\n },\n examples: [\n {\n title: \"Omni text to video\",\n request: {\n model: \"kling-omni-video\",\n content: [{ type: \"text\", text: \"a small paper boat floating on calm water, cinematic motion\" }],\n parameters: { duration: 5, aspect_ratio: \"16:9\", mode: \"std\" },\n },\n },\n {\n title: \"Omni image to video\",\n request: {\n model: \"kling-omni-video\",\n content: [{ type: \"text\", text: \"<<<image_1>>> gently turns toward the camera with soft natural motion\" }],\n parameters: { duration: 5, aspect_ratio: \"16:9\" },\n meta: {\n image_list: [{ image_url: \"https://example.com/input.png\", type: \"first_frame\" }],\n },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"kling-multi-image-to-video\",\n title: \"Kling Multi-Image Reference To Video\",\n category: \"video\",\n description: \"Kling multi-image reference video generation model.\",\n adapter: { type: \"kling.videoGenerations\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Video prompt.\" },\n {\n type: \"image\",\n required: false,\n max: 4,\n sources: [\"url\", \"base64\"],\n description: \"Reference image inputs. Provider-native image_list input may be passed in meta.\",\n },\n ],\n },\n parameters: klingVideoParameters({ maxDuration: 10, negativePrompt: true, seed: true }),\n examples: [\n {\n title: \"Multi-image reference to video\",\n request: {\n model: \"kling-multi-image-to-video\",\n content: [\n { type: \"text\", text: \"combine the references into one cinematic shot\" },\n { type: \"image\", source: { type: \"url\", url: \"https://example.com/reference-1.png\" } },\n { type: \"image\", source: { type: \"url\", url: \"https://example.com/reference-2.png\" } },\n ],\n parameters: { duration: 5, aspect_ratio: \"16:9\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"noobxl-t2i-onediff\",\n title: \"NoobXL T2I OneDiff\",\n category: \"image\",\n description:\n \"Anime-specialized NoobXL text-to-image model for anime-style illustrations. It works best with English Danbooru tags, which can invoke specific anime characters and illustrator styles. Natural-language understanding is limited. Fast and extremely low cost.\",\n allowUnknownParameters: true,\n adapter: { type: \"openai.images\" },\n content: {\n input: [{ type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Prompt text.\" }],\n },\n parameters: noobxlImageParameters,\n examples: [\n {\n title: \"Text to image\",\n request: {\n model: \"noobxl-t2i-onediff\",\n content: [{ type: \"text\", text: \"anime key visual, luminous city at night, crisp linework\" }],\n parameters: { size: \"1024x1024\", negative_prompt: \"low quality, blurry\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"noobxl-i2i-ipa-onediff\",\n title: \"NoobXL I2I IPA OneDiff\",\n category: \"image\",\n description:\n \"Anime-specialized NoobXL image-to-image model that redraws a single uploaded image using it as a style or character reference. It works best with English Danbooru tags, which can invoke specific anime characters and illustrator styles. Natural-language understanding is limited. Fast and extremely low cost.\",\n allowUnknownParameters: true,\n adapter: { type: \"openai.images\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Prompt text.\" },\n {\n type: \"image\",\n required: true,\n min: 1,\n max: 1,\n sources: [\"url\", \"base64\"],\n description: \"Single source image.\",\n },\n ],\n },\n parameters: noobxlImageToImageParameters,\n examples: [\n {\n title: \"Image to image\",\n request: {\n model: \"noobxl-i2i-ipa-onediff\",\n content: [\n { type: \"text\", text: \"keep the character identity, redraw as a polished anime illustration\" },\n { type: \"image\", source: { type: \"url\", url: \"https://example.com/reference.png\" } },\n ],\n parameters: { size: \"1024x1024\", controlnet_weight: 0.8 },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"birefnet-general\",\n title: \"BiRefNet General\",\n category: \"image\",\n description:\n \"Single-image background removal model that produces images with transparent backgrounds. Well suited to image post-processing and creating web assets. Fast and extremely low cost.\",\n adapter: { type: \"openai.images\" },\n content: {\n input: [\n {\n type: \"text\",\n required: false,\n max: 16,\n merge: \"newline\",\n description: \"Optional workflow prompt. Accepted for compatibility but ignored by the model.\",\n },\n {\n type: \"image\",\n required: true,\n min: 1,\n max: 1,\n sources: [\"url\", \"base64\"],\n description: \"Single source image.\",\n },\n ],\n },\n examples: [\n {\n title: \"Remove background\",\n request: {\n model: \"birefnet-general\",\n content: [{ type: \"image\", source: { type: \"url\", url: \"https://example.com/portrait.png\" } }],\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"minimax-h3\",\n title: \"MiniMax H3\",\n category: \"video\",\n description: \"MiniMax H3 video generation with 768P output.\",\n adapter: { type: \"minimax.h3VideoGenerations\" },\n content: { input: minimaxH3ContentInput },\n parameters: minimaxH3VideoParameters(),\n examples: [\n {\n title: \"Text to video\",\n request: {\n model: \"minimax-h3\",\n content: [{ type: \"text\", text: \"a red cube rotating on a white table\" }],\n parameters: { duration: 5, resolution: \"768P\", ratio: \"16:9\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"minimax-h3-unrestricted\",\n title: \"MiniMax H3 Unrestricted\",\n category: \"video\",\n description: \"MiniMax H3 video generation with caller-selected output dimensions.\",\n adapter: { type: \"minimax.h3VideoGenerations\" },\n content: { input: minimaxH3ContentInput },\n parameters: minimaxH3VideoParameters(),\n examples: [\n {\n title: \"Custom resolution\",\n request: {\n model: \"minimax-h3-unrestricted\",\n content: [{ type: \"text\", text: \"a red cube rotating on a white table\" }],\n parameters: { duration: 15, resolution: \"1920x1080\", ratio: \"16:9\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"seedance-2-0\",\n title: \"Seedance 2.0\",\n category: \"video\",\n description:\n \"High-quality video generation model that accepts text, image, and video inputs. Supports resolutions from 480p to 2K and is well suited to final deliverables.\",\n adapter: { type: \"ark.videoGenerations\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Video prompt.\" },\n {\n type: \"image\",\n required: false,\n max: 9,\n sources: [\"url\"],\n roles: [\"first_frame\", \"last_frame\", \"reference_image\"],\n description: \"Optional public URL image input. Use meta.role as first_frame, last_frame, or reference_image.\",\n },\n {\n type: \"video\",\n required: false,\n max: 1,\n sources: [\"url\"],\n roles: [\"reference_video\"],\n roleRequired: true,\n description: \"Optional public URL reference video input. Use meta.role as reference_video.\",\n },\n ],\n },\n parameters: seedanceVideoParameters({ resolution: \"1080p\", maxWait: 900 }),\n examples: [\n {\n title: \"Text to video\",\n request: {\n model: \"seedance-2-0\",\n content: [\n {\n type: \"text\",\n text: \"a cat playing piano in a cozy jazz club, cinematic lighting, smooth camera movement\",\n },\n ],\n parameters: { duration: 5, resolution: \"1080p\", ratio: \"16:9\" },\n },\n },\n ],\n },\n {\n schema: MODEL_SCHEMA,\n model: \"seedance-2-0-fast\",\n title: \"Seedance 2.0 Fast\",\n category: \"video\",\n description:\n \"Fast video generation model that accepts text, image, and video inputs. Faster and less expensive than seedance-2-0, making it well suited to creative validation and draft iteration.\",\n adapter: { type: \"ark.videoGenerations\" },\n content: {\n input: [\n { type: \"text\", required: true, min: 1, max: 16, merge: \"newline\", description: \"Video prompt.\" },\n {\n type: \"image\",\n required: false,\n max: 9,\n sources: [\"url\"],\n roles: [\"first_frame\", \"last_frame\", \"reference_image\"],\n description: \"Optional public URL image input. Use meta.role as first_frame, last_frame, or reference_image.\",\n },\n {\n type: \"video\",\n required: false,\n max: 1,\n sources: [\"url\"],\n roles: [\"reference_video\"],\n roleRequired: true,\n description: \"Optional public URL reference video input. Use meta.role as reference_video.\",\n },\n ],\n },\n parameters: seedanceVideoParameters({ resolution: \"720p\", resolutions: [\"480p\", \"720p\"], maxWait: 600 }),\n examples: [\n {\n title: \"Text to video\",\n request: {\n model: \"seedance-2-0-fast\",\n content: [\n {\n type: \"text\",\n text: \"a cat playing piano in a cozy jazz club, cinematic lighting, smooth camera movement\",\n },\n ],\n parameters: { duration: 5, resolution: \"720p\", ratio: \"16:9\" },\n },\n },\n ],\n },\n ...sunoModels,\n] satisfies GenerationModelDeclaration[];\n\nexport const builtinGenerationModels: GenerationModelDeclaration[] = cloneJson(builtinModels);\n\nexport function getBuiltinGenerationModel(model: string): GenerationModelDeclaration | null {\n return cloneJson(builtinModels.find((declaration) => declaration.model === model) ?? null);\n}\n\nexport function listBuiltinGenerationModels(): GenerationModelDeclaration[] {\n return cloneJson(builtinModels);\n}\n"],"mappings":";AAAA,MAAa,eAAe;AAE5B,MAAa,8BAA8B;CAAC;CAAS;CAAS;CAAQ;;;;ACAtE,SAAgB,UAAa,OAAa;AACxC,QAAO,KAAK,MAAM,KAAK,UAAU,MAAM,CAAC;;AAG1C,SAAgB,gBAAgB,OAAuB;AACrD,QACE,MACG,MAAM,CACN,aAAa,CACb,QAAQ,kBAAkB,IAAI,CAC9B,QAAQ,YAAY,GAAG,IAAI;;AAIlC,SAAgB,aAAa,OAAoE;AAC/F,QAAO,UAAU,QAAQ,MAAM,OAAO;;AAGxC,SAAgB,aAAgB,QAA8B;AAC5D,QAAO,OAAO,SAAS,IAAI,SAAS;;AAGtC,SAAgB,cAAiD,OAAa;AAC5E,MAAK,MAAM,OAAO,OAAO,KAAK,MAAM,CAAE,KAAI,MAAM,SAAS,OAAW,QAAO,MAAM;AACjF,QAAO;;;;;ACtBT,MAAM,sBAAsB;CAC1B,MAAM;EACJ,MAAM;EACN,UAAU;EACV,SAAS;EACT,aAAa;EACb,UAAU;GAAC;GAAQ;GAAa;GAAa;GAAa;GAAa;GAAa;GAAa;GAAY;EAC9G;CACD,SAAS;EACP,MAAM;EACN,UAAU;EACV,SAAS;EACT,MAAM;GAAC;GAAQ;GAAO;GAAU;GAA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ACP,OAAO;IACP,SAAS,CACP;KACE,MAAM;KACN,MAAM;KACP,CACF;IACD,YAAY;KAAE,UAAU;KAAG,YAAY;KAAQ,OAAO;KAAQ;IAC/D;GACF,CACF;EACF;CACD,GAAG;CACJ;AAED,MAAaC,0BAAwD,UAAU,cAAc;AAE7F,SAAgB,0BAA0B,OAAkD;AAC1F,QAAO,UAAU,cAAc,MAAM,gBAAgB,YAAY,UAAU,MAAM,IAAI,KAAK;;AAG5F,SAAgB,8BAA4D;AAC1E,QAAO,UAAU,cAAc"}
@@ -1,5 +1,7 @@
1
1
  //#region src/types.d.ts
2
2
  declare const MODEL_SCHEMA: "neta.generation.model.v1";
3
+ declare const GENERATION_MODEL_CATEGORIES: readonly ["image", "video", "audio"];
4
+ type GenerationModelCategory = (typeof GENERATION_MODEL_CATEGORIES)[number];
3
5
  type GenerationSource = {
4
6
  type: "url";
5
7
  url: string;
@@ -100,6 +102,8 @@ type GenerationModelDeclaration = {
100
102
  schema: typeof MODEL_SCHEMA;
101
103
  model: string;
102
104
  title?: string;
105
+ /** Product catalog class. */
106
+ category?: GenerationModelCategory;
103
107
  description?: string;
104
108
  /** Hide from default discovery while keeping exact-ID lookup and runtime use available. */
105
109
  hidden?: boolean;
@@ -213,5 +217,5 @@ declare const builtinGenerationModels: GenerationModelDeclaration[];
213
217
  declare function getBuiltinGenerationModel(model: string): GenerationModelDeclaration | null;
214
218
  declare function listBuiltinGenerationModels(): GenerationModelDeclaration[];
215
219
  //#endregion
216
- export { GenerationParameterSpec as C, MODEL_SCHEMA as D, GenerationSourceResolver as E, ResolvedGenerationRequest as O, GenerationModelDeclaration as S, GenerationSource as T, GenerationDebugOptions as _, GenerateRequest as a, GenerationMetaSpec as b, GenerationAdapterInput as c, GenerationContentBlock as d, GenerationContentBlockMeta as f, GenerationDebugLogger as g, GenerationDebugEvent as h, CreateGenerationClientOptions as i, GenerationClient as l, GenerationDebugConfig as m, getBuiltinGenerationModel as n, GenerationAdapter as o, GenerationContentSpec as p, listBuiltinGenerationModels as r, GenerationAdapterContext as s, builtinGenerationModels as t, GenerationClientWithResult as u, GenerationDimensionsSpec as v, GenerationResult as w, GenerationMetaTaskVariantSpec as x, GenerationMetaFieldSpec as y };
217
- //# sourceMappingURL=builtins-8R5iZQ10.d.ts.map
220
+ export { ResolvedGenerationRequest as A, GenerationModelCategory as C, GenerationSource as D, GenerationResult as E, GenerationSourceResolver as O, GenerationMetaTaskVariantSpec as S, GenerationParameterSpec as T, GenerationDebugLogger as _, GENERATION_MODEL_CATEGORIES as a, GenerationMetaFieldSpec as b, GenerationAdapterContext as c, GenerationClientWithResult as d, GenerationContentBlock as f, GenerationDebugEvent as g, GenerationDebugConfig as h, CreateGenerationClientOptions as i, MODEL_SCHEMA as k, GenerationAdapterInput as l, GenerationContentSpec as m, getBuiltinGenerationModel as n, GenerateRequest as o, GenerationContentBlockMeta as p, listBuiltinGenerationModels as r, GenerationAdapter as s, builtinGenerationModels as t, GenerationClient as u, GenerationDebugOptions as v, GenerationModelDeclaration as w, GenerationMetaSpec as x, GenerationDimensionsSpec as y };
221
+ //# sourceMappingURL=builtins-D0tS2UtT.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"builtins-D0tS2UtT.d.ts","names":[],"sources":["../src/types.ts","../src/builtins.ts"],"sourcesContent":[],"mappings":";cAAa;AAAA,cAEA,2BAFkD,EAAA,SAAA,CAAA,OAAA,EAAA,OAAA,EAAA,OAAA,CAAA;AAElD,KAED,uBAAA,GAFmE,CAAA,OAEjC,2BAFiC,CAAA,CAAA,MAAA,CAAA;AAEnE,KAEA,gBAAA,GAFuB;EAEvB,IAAA,EAAA,KAAA;EAEA,GAAA,EAAA,MAAA;AAEZ,CAAA,GAAY;EAC6B,IAAA,EAAA,QAAA;EACZ,SAAA,EAAA,MAAA;EAAyB,IAAA,EAAA,MAAA;CACzB;AAAyB,KAL1C,0BAAA,GAA6B,MAKa,CAAA,MAAA,EAAA,OAAA,CAAA;AACzB,KAJjB,sBAAA,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A,EAjIzB,uBAiIyB,CAAA;;iBA/HlC,eAAe;;ACuvCnB,KDpvCD,0BAAA,GCovC0B;EAEtB,MAAA,EAAA,ODrvCC,YCqvCD;EAIA,KAAA,EAAA,MAAA;;;aDrvCH;;;;;;;MAOP;;WAEK;;eAEI,eAAe;SACrB;aACI;;aAEA;;;KAID,eAAA;;WAED;eACI;SACN;;aAEI;;;;KAKD,yBAAA;eACG;WACJ;cACG;QACN;;KAGI,wBAAA,YAAoC,qBAAqB;KAEzD,oBAAA;;;;WAKG;;;;;;;WAQA;SACF;;;;KAKD,qBAAA,WAAgC;KAEhC,sBAAA;;;;WAID;;KAGC,qBAAA,GAAwB;;;;UAI1B;;KAGE,wBAAA;;;gBAGI;iBACC;;KAGL,sBAAA,GAAyB;WAC1B;;KAGC,iBAAA,YAA6B,2BAA2B,QAAQ;qBACvD;;KAGT,6BAAA;;;WAGD;;iBAEM;mBACE;aACN,eAAe;oBACR;;KAGR,gBAAA;;oBAEQ,kBAAkB,QAAQ;;oBAE1B,kBAAkB;;gBAEtB;;2BAEW;;;;;;sDAI2B;;yCAEb;;KAG7B,0BAAA,GAA6B;;0BAEf,kBAAkB,QAAQ;;;;AA3NvC,cCm1CA,uBDn1CkD,ECm1CzB,0BDn1CyB,EAAA;AAElD,iBCm1CG,yBAAA,CDn1C+D,KAAA,EAAA,MAAA,CAAA,ECm1CrB,0BDn1CqB,GAAA,IAAA;AAEnE,iBCq1CI,2BAAA,CAAA,CDr1C8B,ECq1CC,0BDr1C0B,EAAA"}
@@ -1,2 +1,2 @@
1
- import { n as getBuiltinGenerationModel, r as listBuiltinGenerationModels, t as builtinGenerationModels } from "./builtins-8R5iZQ10.js";
1
+ import { n as getBuiltinGenerationModel, r as listBuiltinGenerationModels, t as builtinGenerationModels } from "./builtins-D0tS2UtT.js";
2
2
  export { builtinGenerationModels, getBuiltinGenerationModel, listBuiltinGenerationModels };
package/dist/builtins.js CHANGED
@@ -1,3 +1,3 @@
1
- import { n as getBuiltinGenerationModel, r as listBuiltinGenerationModels, t as builtinGenerationModels } from "./builtins-BSD8jn8R.js";
1
+ import { n as getBuiltinGenerationModel, r as listBuiltinGenerationModels, t as builtinGenerationModels } from "./builtins-CYamscRp.js";
2
2
 
3
3
  export { builtinGenerationModels, getBuiltinGenerationModel, listBuiltinGenerationModels };
package/dist/cli/index.js CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
- import { r as listBuiltinGenerationModels } from "../builtins-BSD8jn8R.js";
3
- import { h as stringifyGenerationModelDeclaration, i as createGenerationClient, n as exportBuiltinModelConfigs, t as exportBuiltinModelConfig } from "../export-config-CzgN6UE_.js";
2
+ import { r as listBuiltinGenerationModels } from "../builtins-CYamscRp.js";
3
+ import { h as stringifyGenerationModelDeclaration, i as createGenerationClient, n as exportBuiltinModelConfigs, t as exportBuiltinModelConfig } from "../export-config-hX4jDjSs.js";
4
4
  import { mkdir, writeFile } from "node:fs/promises";
5
5
  import { dirname, join } from "node:path";
6
6
 
@@ -1,4 +1,4 @@
1
- import { a as compactArray, c as slugifyFileName, i as cloneJson, l as MODEL_SCHEMA, n as getBuiltinGenerationModel, o as compactObject, r as listBuiltinGenerationModels, s as getBlockMeta, t as builtinGenerationModels } from "./builtins-BSD8jn8R.js";
1
+ import { a as compactArray, c as slugifyFileName, i as cloneJson, l as GENERATION_MODEL_CATEGORIES, n as getBuiltinGenerationModel, o as compactObject, r as listBuiltinGenerationModels, s as getBlockMeta, t as builtinGenerationModels, u as MODEL_SCHEMA } from "./builtins-CYamscRp.js";
2
2
  import { mkdir, readFile, readdir, writeFile } from "node:fs/promises";
3
3
  import { extname, join } from "node:path";
4
4
  import { parse, stringify } from "yaml";
@@ -1169,9 +1169,7 @@ async function klingVideoGenerationsAdapter(input) {
1169
1169
  //#region src/adapters/minimax-h3-video-generations.ts
1170
1170
  const REQUEST_TIMEOUT_MS$4 = 186e4;
1171
1171
  const DEFAULT_POLL_INTERVAL_SEC$2 = 2;
1172
- const DEFAULT_MAX_WAIT_SEC$2 = 600;
1173
- const MIN_DURATION_SEC = 4;
1174
- const MAX_DURATION_SEC = 15;
1172
+ const DEFAULT_MAX_WAIT_SEC$2 = 1800;
1175
1173
  const MAX_MEDIA_COUNT = 12;
1176
1174
  const MAX_REFERENCE_IMAGES = 9;
1177
1175
  const MAX_REFERENCE_VIDEOS = 3;
@@ -1301,14 +1299,10 @@ function buildContent(prompt, media) {
1301
1299
  })];
1302
1300
  }
1303
1301
  function resolveResolution(value) {
1304
- const resolution = (asString$2(value) ?? "768P").toUpperCase();
1305
- if (resolution !== "768P" && resolution !== "2K") throw new GenerationValidationError("MiniMax H3 resolution must be 768P or 2K");
1306
- return resolution;
1302
+ return asString$2(value) ?? "768P";
1307
1303
  }
1308
1304
  function resolveDuration(value) {
1309
- const duration = asInteger$1(value, 5);
1310
- if (duration < MIN_DURATION_SEC || duration > MAX_DURATION_SEC) throw new GenerationValidationError("MiniMax H3 duration must be an integer between 4 and 15");
1311
- return duration;
1305
+ return asInteger$1(value, 5);
1312
1306
  }
1313
1307
  function resolveRatio(value, mode) {
1314
1308
  const requested = asString$2(value) ?? DEFAULT_RATIO;
@@ -2170,6 +2164,9 @@ function isMetaTaskVariantSpec(value) {
2170
2164
  if (!isRecord$1(value)) return false;
2171
2165
  return (value.description === void 0 || typeof value.description === "string") && (value.required === void 0 || Array.isArray(value.required) && value.required.every((item) => typeof item === "string")) && (value.requiredContent === void 0 || Array.isArray(value.requiredContent) && value.requiredContent.every((item) => typeof item === "string")) && (value.sendTask === void 0 || typeof value.sendTask === "boolean");
2172
2166
  }
2167
+ function isGenerationModelCategory(value) {
2168
+ return typeof value === "string" && GENERATION_MODEL_CATEGORIES.includes(value);
2169
+ }
2173
2170
  function isMetaSpec(value) {
2174
2171
  if (!isRecord$1(value)) return false;
2175
2172
  return (value.fields === void 0 || isRecord$1(value.fields) && Object.values(value.fields).every((field) => isMetaFieldSpec(field))) && (value.taskField === void 0 || typeof value.taskField === "string") && (value.taskVariants === void 0 || isRecord$1(value.taskVariants) && Object.values(value.taskVariants).every((variant) => isMetaTaskVariantSpec(variant)));
@@ -2181,7 +2178,7 @@ function isGenerationModelDeclaration(value) {
2181
2178
  const parameters = value.parameters;
2182
2179
  const meta = value.meta;
2183
2180
  const examples = value.examples;
2184
- return value.schema === MODEL_SCHEMA && typeof value.model === "string" && value.model.trim().length > 0 && (value.hidden === void 0 || typeof value.hidden === "boolean") && (value.allowUnknownParameters === void 0 || typeof value.allowUnknownParameters === "boolean") && isRecord$1(adapter) && typeof adapter.type === "string" && isRecord$1(content) && Array.isArray(content.input) && (parameters === void 0 || isRecord$1(parameters) && Object.values(parameters).every(isParameterSpec)) && (meta === void 0 || isMetaSpec(meta)) && (examples === void 0 || Array.isArray(examples));
2181
+ return value.schema === MODEL_SCHEMA && typeof value.model === "string" && value.model.trim().length > 0 && (value.category === void 0 || isGenerationModelCategory(value.category)) && (value.hidden === void 0 || typeof value.hidden === "boolean") && (value.allowUnknownParameters === void 0 || typeof value.allowUnknownParameters === "boolean") && isRecord$1(adapter) && typeof adapter.type === "string" && isRecord$1(content) && Array.isArray(content.input) && (parameters === void 0 || isRecord$1(parameters) && Object.values(parameters).every(isParameterSpec)) && (meta === void 0 || isMetaSpec(meta)) && (examples === void 0 || Array.isArray(examples));
2185
2182
  }
2186
2183
  function parseGenerationModelDeclaration(rawText, filePath = "model.yaml") {
2187
2184
  const parsed = extname(filePath) === ".json" ? JSON.parse(rawText) : parse(rawText);
@@ -2472,4 +2469,4 @@ async function exportBuiltinModelConfigs(directory) {
2472
2469
 
2473
2470
  //#endregion
2474
2471
  export { mergeTextBlocks as A, GenerationValidationError as B, openAiImageEditsAdapter as C, audioSpeechAdapter as D, geminiGenerateContentAdapter as E, GenerationError as F, GenerationProviderError as I, GenerationTimeoutError as L, resolveGenerationParameters as M, validateGenerationContent as N, arkVideoGenerationsAdapter as O, GenerationConfigError as P, GenerationTransportError as R, openAiImagesAdapter as S, klingVideoGenerationsAdapter as T, writeGenerationModelDeclarations as _, createGenerationClientFromDirectory as a, videoUpscaleNativeAdapter as b, defaultGenerationSourceResolver as c, parseGenerationModelDeclaration as d, readGenerationModelDeclaration as f, writeGenerationModelDeclaration as g, stringifyGenerationModelDeclaration as h, createGenerationClient as i, resolveGenerationMeta as j, mergeGenerationMeta as k, isGenerationModelDeclaration as l, readGenerationModelDeclarationsFromFiles as m, exportBuiltinModelConfigs as n, createGenerationClientFromFile as o, readGenerationModelDeclarationsFromDirectory as p, stringifyBuiltinModelConfig as r, createGenerationClientFromFiles as s, exportBuiltinModelConfig as t, mergeGenerationModelDeclarations as u, builtinGenerationAdapters as v, minimaxH3VideoGenerationsAdapter as w, sunoTasksAdapter as x, getGenerationAdapter as y, GenerationUnsupportedAdapterError as z };
2475
- //# sourceMappingURL=export-config-CzgN6UE_.js.map
2472
+ //# sourceMappingURL=export-config-hX4jDjSs.js.map