@openloaf-saas/sdk 0.1.11 → 0.1.12

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 (4) hide show
  1. package/dist/index.d.ts +1561 -29
  2. package/dist/index.js +1 -1717
  3. package/package.json +14 -32
  4. package/README.md +0 -520
package/dist/index.d.ts CHANGED
@@ -209,6 +209,7 @@ declare class SaaSContract {
209
209
  supportsAudio?: boolean | undefined;
210
210
  } | undefined;
211
211
  } | undefined;
212
+ creditsPerCall?: number | undefined;
212
213
  }[];
213
214
  updatedAt?: string | undefined;
214
215
  };
@@ -260,6 +261,7 @@ declare class SaaSContract {
260
261
  supportsAudio?: boolean | undefined;
261
262
  } | undefined;
262
263
  } | undefined;
264
+ creditsPerCall?: number | undefined;
263
265
  }[];
264
266
  updatedAt?: string | undefined;
265
267
  };
@@ -311,6 +313,7 @@ declare class SaaSContract {
311
313
  supportsAudio?: boolean | undefined;
312
314
  } | undefined;
313
315
  } | undefined;
316
+ creditsPerCall?: number | undefined;
314
317
  }[];
315
318
  updatedAt?: string | undefined;
316
319
  };
@@ -439,6 +442,303 @@ declare class SaaSContract {
439
442
  updatedAt?: string | undefined;
440
443
  };
441
444
  }>;
445
+ readonly mediaGenerate: Endpoint<{
446
+ prompt: string;
447
+ feature: "imageGenerate";
448
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:2" | undefined;
449
+ resolution?: "1K" | "2K" | "4K" | undefined;
450
+ mode?: "text" | "reference" | "sketch" | "character" | undefined;
451
+ inputs?: {
452
+ images?: {
453
+ url?: string | undefined;
454
+ base64?: string | undefined;
455
+ mediaType?: string | undefined;
456
+ }[] | undefined;
457
+ isSketch?: boolean | undefined;
458
+ } | undefined;
459
+ count?: 2 | 1 | 4 | undefined;
460
+ quality?: "standard" | "hd" | "draft" | undefined;
461
+ seed?: number | undefined;
462
+ style?: string | undefined;
463
+ negativePrompt?: string | undefined;
464
+ parameters?: Record<string, unknown> | undefined;
465
+ } | {
466
+ title: string;
467
+ prompt: string;
468
+ feature: "poster";
469
+ subTitle?: string | undefined;
470
+ bodyText?: string | undefined;
471
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:2" | undefined;
472
+ count?: 2 | 1 | 4 | undefined;
473
+ quality?: "standard" | "hd" | "draft" | undefined;
474
+ seed?: number | undefined;
475
+ style?: string | undefined;
476
+ negativePrompt?: string | undefined;
477
+ parameters?: Record<string, unknown> | undefined;
478
+ } | {
479
+ mode: "instruct" | "stylize" | "colorize" | "inpaint" | "erase" | "eraseWatermark";
480
+ inputs: {
481
+ image: {
482
+ url?: string | undefined;
483
+ base64?: string | undefined;
484
+ mediaType?: string | undefined;
485
+ };
486
+ mask?: {
487
+ url?: string | undefined;
488
+ base64?: string | undefined;
489
+ mediaType?: string | undefined;
490
+ } | undefined;
491
+ };
492
+ feature: "imageEdit";
493
+ prompt?: string | undefined;
494
+ strength?: number | undefined;
495
+ count?: 2 | 1 | 4 | undefined;
496
+ quality?: "standard" | "hd" | "draft" | undefined;
497
+ seed?: number | undefined;
498
+ style?: string | undefined;
499
+ negativePrompt?: string | undefined;
500
+ parameters?: Record<string, unknown> | undefined;
501
+ } | {
502
+ scale: 2 | 4;
503
+ inputs: {
504
+ image: {
505
+ url?: string | undefined;
506
+ base64?: string | undefined;
507
+ mediaType?: string | undefined;
508
+ };
509
+ };
510
+ feature: "upscale";
511
+ count?: 2 | 1 | 4 | undefined;
512
+ quality?: "standard" | "hd" | "draft" | undefined;
513
+ seed?: number | undefined;
514
+ style?: string | undefined;
515
+ negativePrompt?: string | undefined;
516
+ parameters?: Record<string, unknown> | undefined;
517
+ } | {
518
+ inputs: {
519
+ image: {
520
+ url?: string | undefined;
521
+ base64?: string | undefined;
522
+ mediaType?: string | undefined;
523
+ };
524
+ };
525
+ direction: {
526
+ top?: number | undefined;
527
+ bottom?: number | undefined;
528
+ left?: number | undefined;
529
+ right?: number | undefined;
530
+ };
531
+ feature: "outpaint";
532
+ prompt?: string | undefined;
533
+ count?: 2 | 1 | 4 | undefined;
534
+ quality?: "standard" | "hd" | "draft" | undefined;
535
+ seed?: number | undefined;
536
+ style?: string | undefined;
537
+ negativePrompt?: string | undefined;
538
+ parameters?: Record<string, unknown> | undefined;
539
+ } | {
540
+ prompt: string;
541
+ duration: 5 | 10 | 15;
542
+ feature: "videoGenerate";
543
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:2" | undefined;
544
+ mode?: "text" | "withAudio" | "reference" | "firstFrame" | "startEnd" | "storyboard" | "motionControl" | undefined;
545
+ inputs?: {
546
+ startImage?: {
547
+ url?: string | undefined;
548
+ base64?: string | undefined;
549
+ mediaType?: string | undefined;
550
+ } | undefined;
551
+ endImage?: {
552
+ url?: string | undefined;
553
+ base64?: string | undefined;
554
+ mediaType?: string | undefined;
555
+ } | undefined;
556
+ images?: {
557
+ url?: string | undefined;
558
+ base64?: string | undefined;
559
+ mediaType?: string | undefined;
560
+ }[] | undefined;
561
+ scenes?: {
562
+ prompt: string;
563
+ image?: {
564
+ url?: string | undefined;
565
+ base64?: string | undefined;
566
+ mediaType?: string | undefined;
567
+ } | undefined;
568
+ }[] | undefined;
569
+ } | undefined;
570
+ withAudio?: boolean | undefined;
571
+ motionPaths?: {
572
+ startX: number;
573
+ startY: number;
574
+ endX: number;
575
+ endY: number;
576
+ strength?: number | undefined;
577
+ }[] | undefined;
578
+ camera?: {
579
+ type: "pan" | "zoom" | "rotate" | "dolly" | "tilt";
580
+ direction?: string | undefined;
581
+ intensity?: number | undefined;
582
+ } | undefined;
583
+ count?: 2 | 1 | 4 | undefined;
584
+ quality?: "standard" | "hd" | "draft" | undefined;
585
+ seed?: number | undefined;
586
+ style?: string | undefined;
587
+ negativePrompt?: string | undefined;
588
+ parameters?: Record<string, unknown> | undefined;
589
+ } | {
590
+ mode: "photo2video" | "lipSync";
591
+ inputs: {
592
+ person: {
593
+ url?: string | undefined;
594
+ base64?: string | undefined;
595
+ mediaType?: string | undefined;
596
+ };
597
+ audio: {
598
+ url?: string | undefined;
599
+ base64?: string | undefined;
600
+ mediaType?: string | undefined;
601
+ };
602
+ };
603
+ feature: "digitalHuman";
604
+ count?: 2 | 1 | 4 | undefined;
605
+ quality?: "standard" | "hd" | "draft" | undefined;
606
+ seed?: number | undefined;
607
+ style?: string | undefined;
608
+ negativePrompt?: string | undefined;
609
+ parameters?: Record<string, unknown> | undefined;
610
+ } | {
611
+ text: string;
612
+ feature: "tts";
613
+ voice?: string | undefined;
614
+ referenceAudio?: {
615
+ url?: string | undefined;
616
+ base64?: string | undefined;
617
+ mediaType?: string | undefined;
618
+ } | undefined;
619
+ output?: {
620
+ format?: "mp3" | "wav" | "opus" | undefined;
621
+ sampleRate?: number | undefined;
622
+ } | undefined;
623
+ count?: 2 | 1 | 4 | undefined;
624
+ quality?: "standard" | "hd" | "draft" | undefined;
625
+ seed?: number | undefined;
626
+ style?: string | undefined;
627
+ negativePrompt?: string | undefined;
628
+ parameters?: Record<string, unknown> | undefined;
629
+ }, {
630
+ success: false;
631
+ message: string;
632
+ code?: string | undefined;
633
+ } | {
634
+ success: true;
635
+ data: {
636
+ taskId: string;
637
+ };
638
+ }>;
639
+ readonly mediaTask: (taskId: string) => Endpoint<void, {
640
+ success: false;
641
+ message: string;
642
+ code?: string | undefined;
643
+ } | {
644
+ success: true;
645
+ data: {
646
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
647
+ progress?: number | undefined;
648
+ resultType?: "image" | "video" | "audio" | undefined;
649
+ resultUrls?: string[] | undefined;
650
+ error?: {
651
+ message: string;
652
+ code?: string | undefined;
653
+ } | undefined;
654
+ creditsConsumed?: number | undefined;
655
+ };
656
+ }>;
657
+ readonly mediaCancelTask: (taskId: string) => Endpoint<void, {
658
+ success: false;
659
+ message: string;
660
+ code?: string | undefined;
661
+ } | {
662
+ success: true;
663
+ data: {
664
+ status: "canceled" | "processing";
665
+ };
666
+ }>;
667
+ readonly mediaTaskGroup: (groupId: string) => Endpoint<void, {
668
+ success: false;
669
+ message: string;
670
+ code?: string | undefined;
671
+ } | {
672
+ success: true;
673
+ data: {
674
+ groupId: string;
675
+ tasks: {
676
+ taskId: string;
677
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
678
+ resultUrls?: string[] | undefined;
679
+ error?: {
680
+ message: string;
681
+ code?: string | undefined;
682
+ } | undefined;
683
+ creditsConsumed?: number | undefined;
684
+ }[];
685
+ totalCreditsConsumed?: number | undefined;
686
+ };
687
+ }>;
688
+ readonly mediaModels: Endpoint<{
689
+ feature?: "imageGenerate" | "poster" | "imageEdit" | "upscale" | "outpaint" | "videoGenerate" | "digitalHuman" | "tts" | undefined;
690
+ }, {
691
+ success: false;
692
+ message: string;
693
+ code?: string | undefined;
694
+ } | {
695
+ success: true;
696
+ data: {
697
+ data: {
698
+ [x: string]: unknown;
699
+ id: string;
700
+ name?: string | undefined;
701
+ familyId?: string | undefined;
702
+ providerId?: string | undefined;
703
+ tags?: string[] | undefined;
704
+ capabilities?: {
705
+ common?: {
706
+ maxContextK?: number | undefined;
707
+ supportsStructuredOutput?: boolean | undefined;
708
+ supportsWebSearch?: boolean | undefined;
709
+ } | undefined;
710
+ params?: {
711
+ features?: string[] | undefined;
712
+ fields?: {
713
+ key: string;
714
+ title: string;
715
+ type: "number" | "boolean" | "text" | "select";
716
+ request: boolean;
717
+ description?: string | undefined;
718
+ unit?: string | undefined;
719
+ values?: (string | number | boolean)[] | undefined;
720
+ min?: number | undefined;
721
+ max?: number | undefined;
722
+ step?: number | undefined;
723
+ default?: string | number | boolean | undefined;
724
+ }[] | undefined;
725
+ } | undefined;
726
+ input?: {
727
+ maxImages?: number | undefined;
728
+ supportsMask?: boolean | undefined;
729
+ supportsReferenceVideo?: boolean | undefined;
730
+ supportsStartEnd?: boolean | undefined;
731
+ } | undefined;
732
+ output?: {
733
+ supportsMulti?: boolean | undefined;
734
+ supportsAudio?: boolean | undefined;
735
+ } | undefined;
736
+ } | undefined;
737
+ creditsPerCall?: number | undefined;
738
+ }[];
739
+ updatedAt?: string | undefined;
740
+ };
741
+ }>;
442
742
  };
443
743
  /** AI tools endpoints. */
444
744
  readonly aiTools: {
@@ -528,7 +828,7 @@ declare class SaaSContract {
528
828
  /** Feedback endpoints. */
529
829
  readonly feedback: {
530
830
  readonly submit: Endpoint<{
531
- type: "chat" | "ui" | "performance" | "bug" | "feature" | "other";
831
+ type: "feature" | "chat" | "ui" | "performance" | "bug" | "other";
532
832
  content: string;
533
833
  context: Record<string, unknown>;
534
834
  source?: "tenas" | "openloaf" | "openloaf-saas" | undefined;
@@ -539,7 +839,7 @@ declare class SaaSContract {
539
839
  readonly list: Endpoint<{
540
840
  page?: number | undefined;
541
841
  pageSize?: number | undefined;
542
- type?: "chat" | "ui" | "performance" | "bug" | "feature" | "other" | undefined;
842
+ type?: "feature" | "chat" | "ui" | "performance" | "bug" | "other" | undefined;
543
843
  source?: "tenas" | "openloaf" | "openloaf-saas" | undefined;
544
844
  saasStatus?: "unread" | "read" | "resolved" | "ignored" | undefined;
545
845
  keyword?: string | undefined;
@@ -551,7 +851,7 @@ declare class SaaSContract {
551
851
  items: {
552
852
  id: string;
553
853
  source: "tenas" | "openloaf" | "openloaf-saas";
554
- type: "chat" | "ui" | "performance" | "bug" | "feature" | "other";
854
+ type: "feature" | "chat" | "ui" | "performance" | "bug" | "other";
555
855
  saasStatus: "unread" | "read" | "resolved" | "ignored";
556
856
  content: string;
557
857
  context: Record<string, unknown>;
@@ -570,7 +870,7 @@ declare class SaaSContract {
570
870
  feedback: {
571
871
  id: string;
572
872
  source: "tenas" | "openloaf" | "openloaf-saas";
573
- type: "chat" | "ui" | "performance" | "bug" | "feature" | "other";
873
+ type: "feature" | "chat" | "ui" | "performance" | "bug" | "other";
574
874
  saasStatus: "unread" | "read" | "resolved" | "ignored";
575
875
  content: string;
576
876
  context: Record<string, unknown>;
@@ -671,7 +971,7 @@ declare class SaaSContract {
671
971
  user: {
672
972
  id: string;
673
973
  provider: string;
674
- membershipLevel: "free" | "vip" | "svip" | "infinity";
974
+ membershipLevel: "free" | "lite" | "pro" | "premium" | "infinity";
675
975
  creditsBalance: number;
676
976
  createdAt: string;
677
977
  updatedAt: string;
@@ -933,6 +1233,7 @@ declare const aiEndpoints: {
933
1233
  supportsAudio?: boolean | undefined;
934
1234
  } | undefined;
935
1235
  } | undefined;
1236
+ creditsPerCall?: number | undefined;
936
1237
  }[];
937
1238
  updatedAt?: string | undefined;
938
1239
  };
@@ -984,6 +1285,7 @@ declare const aiEndpoints: {
984
1285
  supportsAudio?: boolean | undefined;
985
1286
  } | undefined;
986
1287
  } | undefined;
1288
+ creditsPerCall?: number | undefined;
987
1289
  }[];
988
1290
  updatedAt?: string | undefined;
989
1291
  };
@@ -1035,6 +1337,7 @@ declare const aiEndpoints: {
1035
1337
  supportsAudio?: boolean | undefined;
1036
1338
  } | undefined;
1037
1339
  } | undefined;
1340
+ creditsPerCall?: number | undefined;
1038
1341
  }[];
1039
1342
  updatedAt?: string | undefined;
1040
1343
  };
@@ -1163,7 +1466,1071 @@ declare const aiEndpoints: {
1163
1466
  updatedAt?: string | undefined;
1164
1467
  };
1165
1468
  }>;
1166
- };
1469
+ readonly mediaGenerate: Endpoint<{
1470
+ prompt: string;
1471
+ feature: "imageGenerate";
1472
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:2" | undefined;
1473
+ resolution?: "1K" | "2K" | "4K" | undefined;
1474
+ mode?: "text" | "reference" | "sketch" | "character" | undefined;
1475
+ inputs?: {
1476
+ images?: {
1477
+ url?: string | undefined;
1478
+ base64?: string | undefined;
1479
+ mediaType?: string | undefined;
1480
+ }[] | undefined;
1481
+ isSketch?: boolean | undefined;
1482
+ } | undefined;
1483
+ count?: 2 | 1 | 4 | undefined;
1484
+ quality?: "standard" | "hd" | "draft" | undefined;
1485
+ seed?: number | undefined;
1486
+ style?: string | undefined;
1487
+ negativePrompt?: string | undefined;
1488
+ parameters?: Record<string, unknown> | undefined;
1489
+ } | {
1490
+ title: string;
1491
+ prompt: string;
1492
+ feature: "poster";
1493
+ subTitle?: string | undefined;
1494
+ bodyText?: string | undefined;
1495
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:2" | undefined;
1496
+ count?: 2 | 1 | 4 | undefined;
1497
+ quality?: "standard" | "hd" | "draft" | undefined;
1498
+ seed?: number | undefined;
1499
+ style?: string | undefined;
1500
+ negativePrompt?: string | undefined;
1501
+ parameters?: Record<string, unknown> | undefined;
1502
+ } | {
1503
+ mode: "instruct" | "stylize" | "colorize" | "inpaint" | "erase" | "eraseWatermark";
1504
+ inputs: {
1505
+ image: {
1506
+ url?: string | undefined;
1507
+ base64?: string | undefined;
1508
+ mediaType?: string | undefined;
1509
+ };
1510
+ mask?: {
1511
+ url?: string | undefined;
1512
+ base64?: string | undefined;
1513
+ mediaType?: string | undefined;
1514
+ } | undefined;
1515
+ };
1516
+ feature: "imageEdit";
1517
+ prompt?: string | undefined;
1518
+ strength?: number | undefined;
1519
+ count?: 2 | 1 | 4 | undefined;
1520
+ quality?: "standard" | "hd" | "draft" | undefined;
1521
+ seed?: number | undefined;
1522
+ style?: string | undefined;
1523
+ negativePrompt?: string | undefined;
1524
+ parameters?: Record<string, unknown> | undefined;
1525
+ } | {
1526
+ scale: 2 | 4;
1527
+ inputs: {
1528
+ image: {
1529
+ url?: string | undefined;
1530
+ base64?: string | undefined;
1531
+ mediaType?: string | undefined;
1532
+ };
1533
+ };
1534
+ feature: "upscale";
1535
+ count?: 2 | 1 | 4 | undefined;
1536
+ quality?: "standard" | "hd" | "draft" | undefined;
1537
+ seed?: number | undefined;
1538
+ style?: string | undefined;
1539
+ negativePrompt?: string | undefined;
1540
+ parameters?: Record<string, unknown> | undefined;
1541
+ } | {
1542
+ inputs: {
1543
+ image: {
1544
+ url?: string | undefined;
1545
+ base64?: string | undefined;
1546
+ mediaType?: string | undefined;
1547
+ };
1548
+ };
1549
+ direction: {
1550
+ top?: number | undefined;
1551
+ bottom?: number | undefined;
1552
+ left?: number | undefined;
1553
+ right?: number | undefined;
1554
+ };
1555
+ feature: "outpaint";
1556
+ prompt?: string | undefined;
1557
+ count?: 2 | 1 | 4 | undefined;
1558
+ quality?: "standard" | "hd" | "draft" | undefined;
1559
+ seed?: number | undefined;
1560
+ style?: string | undefined;
1561
+ negativePrompt?: string | undefined;
1562
+ parameters?: Record<string, unknown> | undefined;
1563
+ } | {
1564
+ prompt: string;
1565
+ duration: 5 | 10 | 15;
1566
+ feature: "videoGenerate";
1567
+ aspectRatio?: "1:1" | "16:9" | "9:16" | "4:3" | "3:2" | undefined;
1568
+ mode?: "text" | "withAudio" | "reference" | "firstFrame" | "startEnd" | "storyboard" | "motionControl" | undefined;
1569
+ inputs?: {
1570
+ startImage?: {
1571
+ url?: string | undefined;
1572
+ base64?: string | undefined;
1573
+ mediaType?: string | undefined;
1574
+ } | undefined;
1575
+ endImage?: {
1576
+ url?: string | undefined;
1577
+ base64?: string | undefined;
1578
+ mediaType?: string | undefined;
1579
+ } | undefined;
1580
+ images?: {
1581
+ url?: string | undefined;
1582
+ base64?: string | undefined;
1583
+ mediaType?: string | undefined;
1584
+ }[] | undefined;
1585
+ scenes?: {
1586
+ prompt: string;
1587
+ image?: {
1588
+ url?: string | undefined;
1589
+ base64?: string | undefined;
1590
+ mediaType?: string | undefined;
1591
+ } | undefined;
1592
+ }[] | undefined;
1593
+ } | undefined;
1594
+ withAudio?: boolean | undefined;
1595
+ motionPaths?: {
1596
+ startX: number;
1597
+ startY: number;
1598
+ endX: number;
1599
+ endY: number;
1600
+ strength?: number | undefined;
1601
+ }[] | undefined;
1602
+ camera?: {
1603
+ type: "pan" | "zoom" | "rotate" | "dolly" | "tilt";
1604
+ direction?: string | undefined;
1605
+ intensity?: number | undefined;
1606
+ } | undefined;
1607
+ count?: 2 | 1 | 4 | undefined;
1608
+ quality?: "standard" | "hd" | "draft" | undefined;
1609
+ seed?: number | undefined;
1610
+ style?: string | undefined;
1611
+ negativePrompt?: string | undefined;
1612
+ parameters?: Record<string, unknown> | undefined;
1613
+ } | {
1614
+ mode: "photo2video" | "lipSync";
1615
+ inputs: {
1616
+ person: {
1617
+ url?: string | undefined;
1618
+ base64?: string | undefined;
1619
+ mediaType?: string | undefined;
1620
+ };
1621
+ audio: {
1622
+ url?: string | undefined;
1623
+ base64?: string | undefined;
1624
+ mediaType?: string | undefined;
1625
+ };
1626
+ };
1627
+ feature: "digitalHuman";
1628
+ count?: 2 | 1 | 4 | undefined;
1629
+ quality?: "standard" | "hd" | "draft" | undefined;
1630
+ seed?: number | undefined;
1631
+ style?: string | undefined;
1632
+ negativePrompt?: string | undefined;
1633
+ parameters?: Record<string, unknown> | undefined;
1634
+ } | {
1635
+ text: string;
1636
+ feature: "tts";
1637
+ voice?: string | undefined;
1638
+ referenceAudio?: {
1639
+ url?: string | undefined;
1640
+ base64?: string | undefined;
1641
+ mediaType?: string | undefined;
1642
+ } | undefined;
1643
+ output?: {
1644
+ format?: "mp3" | "wav" | "opus" | undefined;
1645
+ sampleRate?: number | undefined;
1646
+ } | undefined;
1647
+ count?: 2 | 1 | 4 | undefined;
1648
+ quality?: "standard" | "hd" | "draft" | undefined;
1649
+ seed?: number | undefined;
1650
+ style?: string | undefined;
1651
+ negativePrompt?: string | undefined;
1652
+ parameters?: Record<string, unknown> | undefined;
1653
+ }, {
1654
+ success: false;
1655
+ message: string;
1656
+ code?: string | undefined;
1657
+ } | {
1658
+ success: true;
1659
+ data: {
1660
+ taskId: string;
1661
+ };
1662
+ }>;
1663
+ readonly mediaTask: (taskId: string) => Endpoint<void, {
1664
+ success: false;
1665
+ message: string;
1666
+ code?: string | undefined;
1667
+ } | {
1668
+ success: true;
1669
+ data: {
1670
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
1671
+ progress?: number | undefined;
1672
+ resultType?: "image" | "video" | "audio" | undefined;
1673
+ resultUrls?: string[] | undefined;
1674
+ error?: {
1675
+ message: string;
1676
+ code?: string | undefined;
1677
+ } | undefined;
1678
+ creditsConsumed?: number | undefined;
1679
+ };
1680
+ }>;
1681
+ readonly mediaCancelTask: (taskId: string) => Endpoint<void, {
1682
+ success: false;
1683
+ message: string;
1684
+ code?: string | undefined;
1685
+ } | {
1686
+ success: true;
1687
+ data: {
1688
+ status: "canceled" | "processing";
1689
+ };
1690
+ }>;
1691
+ readonly mediaTaskGroup: (groupId: string) => Endpoint<void, {
1692
+ success: false;
1693
+ message: string;
1694
+ code?: string | undefined;
1695
+ } | {
1696
+ success: true;
1697
+ data: {
1698
+ groupId: string;
1699
+ tasks: {
1700
+ taskId: string;
1701
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
1702
+ resultUrls?: string[] | undefined;
1703
+ error?: {
1704
+ message: string;
1705
+ code?: string | undefined;
1706
+ } | undefined;
1707
+ creditsConsumed?: number | undefined;
1708
+ }[];
1709
+ totalCreditsConsumed?: number | undefined;
1710
+ };
1711
+ }>;
1712
+ readonly mediaModels: Endpoint<{
1713
+ feature?: "imageGenerate" | "poster" | "imageEdit" | "upscale" | "outpaint" | "videoGenerate" | "digitalHuman" | "tts" | undefined;
1714
+ }, {
1715
+ success: false;
1716
+ message: string;
1717
+ code?: string | undefined;
1718
+ } | {
1719
+ success: true;
1720
+ data: {
1721
+ data: {
1722
+ [x: string]: unknown;
1723
+ id: string;
1724
+ name?: string | undefined;
1725
+ familyId?: string | undefined;
1726
+ providerId?: string | undefined;
1727
+ tags?: string[] | undefined;
1728
+ capabilities?: {
1729
+ common?: {
1730
+ maxContextK?: number | undefined;
1731
+ supportsStructuredOutput?: boolean | undefined;
1732
+ supportsWebSearch?: boolean | undefined;
1733
+ } | undefined;
1734
+ params?: {
1735
+ features?: string[] | undefined;
1736
+ fields?: {
1737
+ key: string;
1738
+ title: string;
1739
+ type: "number" | "boolean" | "text" | "select";
1740
+ request: boolean;
1741
+ description?: string | undefined;
1742
+ unit?: string | undefined;
1743
+ values?: (string | number | boolean)[] | undefined;
1744
+ min?: number | undefined;
1745
+ max?: number | undefined;
1746
+ step?: number | undefined;
1747
+ default?: string | number | boolean | undefined;
1748
+ }[] | undefined;
1749
+ } | undefined;
1750
+ input?: {
1751
+ maxImages?: number | undefined;
1752
+ supportsMask?: boolean | undefined;
1753
+ supportsReferenceVideo?: boolean | undefined;
1754
+ supportsStartEnd?: boolean | undefined;
1755
+ } | undefined;
1756
+ output?: {
1757
+ supportsMulti?: boolean | undefined;
1758
+ supportsAudio?: boolean | undefined;
1759
+ } | undefined;
1760
+ } | undefined;
1761
+ creditsPerCall?: number | undefined;
1762
+ }[];
1763
+ updatedAt?: string | undefined;
1764
+ };
1765
+ }>;
1766
+ };
1767
+
1768
+ /** Supported media generation features. */
1769
+ declare const mediaFeatureSchema: z.ZodEnum<{
1770
+ imageGenerate: "imageGenerate";
1771
+ poster: "poster";
1772
+ imageEdit: "imageEdit";
1773
+ upscale: "upscale";
1774
+ outpaint: "outpaint";
1775
+ videoGenerate: "videoGenerate";
1776
+ digitalHuman: "digitalHuman";
1777
+ tts: "tts";
1778
+ }>;
1779
+ /** Supported aspect ratios for media output. */
1780
+ declare const mediaAspectRatioSchema: z.ZodEnum<{
1781
+ "1:1": "1:1";
1782
+ "16:9": "16:9";
1783
+ "9:16": "9:16";
1784
+ "4:3": "4:3";
1785
+ "3:2": "3:2";
1786
+ }>;
1787
+ /** Supported output resolutions. */
1788
+ declare const mediaResolutionSchema: z.ZodEnum<{
1789
+ "1K": "1K";
1790
+ "2K": "2K";
1791
+ "4K": "4K";
1792
+ }>;
1793
+ /** Output quality levels. */
1794
+ declare const mediaQualitySchema: z.ZodEnum<{
1795
+ standard: "standard";
1796
+ hd: "hd";
1797
+ draft: "draft";
1798
+ }>;
1799
+ /**
1800
+ * Base media generate request schema (standalone, for reference/docs only).
1801
+ * 不直接用于 discriminatedUnion,仅作为公共字段的 schema 化参考。
1802
+ */
1803
+ declare const mediaGenerateBaseSchema: z.ZodObject<{
1804
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
1805
+ quality: z.ZodOptional<z.ZodEnum<{
1806
+ standard: "standard";
1807
+ hd: "hd";
1808
+ draft: "draft";
1809
+ }>>;
1810
+ seed: z.ZodOptional<z.ZodNumber>;
1811
+ style: z.ZodOptional<z.ZodString>;
1812
+ negativePrompt: z.ZodOptional<z.ZodString>;
1813
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1814
+ feature: z.ZodEnum<{
1815
+ imageGenerate: "imageGenerate";
1816
+ poster: "poster";
1817
+ imageEdit: "imageEdit";
1818
+ upscale: "upscale";
1819
+ outpaint: "outpaint";
1820
+ videoGenerate: "videoGenerate";
1821
+ digitalHuman: "digitalHuman";
1822
+ tts: "tts";
1823
+ }>;
1824
+ }, z.core.$strip>;
1825
+ /** F01: Image generation request. */
1826
+ declare const imageGenerateRequestSchema: z.ZodObject<{
1827
+ prompt: z.ZodString;
1828
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
1829
+ "1:1": "1:1";
1830
+ "16:9": "16:9";
1831
+ "9:16": "9:16";
1832
+ "4:3": "4:3";
1833
+ "3:2": "3:2";
1834
+ }>>;
1835
+ resolution: z.ZodOptional<z.ZodEnum<{
1836
+ "1K": "1K";
1837
+ "2K": "2K";
1838
+ "4K": "4K";
1839
+ }>>;
1840
+ mode: z.ZodOptional<z.ZodEnum<{
1841
+ text: "text";
1842
+ reference: "reference";
1843
+ sketch: "sketch";
1844
+ character: "character";
1845
+ }>>;
1846
+ inputs: z.ZodOptional<z.ZodObject<{
1847
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
1848
+ url: z.ZodOptional<z.ZodString>;
1849
+ base64: z.ZodOptional<z.ZodString>;
1850
+ mediaType: z.ZodOptional<z.ZodString>;
1851
+ }, z.core.$strip>>>;
1852
+ isSketch: z.ZodOptional<z.ZodBoolean>;
1853
+ }, z.core.$strip>>;
1854
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
1855
+ quality: z.ZodOptional<z.ZodEnum<{
1856
+ standard: "standard";
1857
+ hd: "hd";
1858
+ draft: "draft";
1859
+ }>>;
1860
+ seed: z.ZodOptional<z.ZodNumber>;
1861
+ style: z.ZodOptional<z.ZodString>;
1862
+ negativePrompt: z.ZodOptional<z.ZodString>;
1863
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1864
+ feature: z.ZodLiteral<"imageGenerate">;
1865
+ }, z.core.$strip>;
1866
+ /** F02: Poster generation request. */
1867
+ declare const posterRequestSchema: z.ZodObject<{
1868
+ title: z.ZodString;
1869
+ subTitle: z.ZodOptional<z.ZodString>;
1870
+ bodyText: z.ZodOptional<z.ZodString>;
1871
+ prompt: z.ZodString;
1872
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
1873
+ "1:1": "1:1";
1874
+ "16:9": "16:9";
1875
+ "9:16": "9:16";
1876
+ "4:3": "4:3";
1877
+ "3:2": "3:2";
1878
+ }>>;
1879
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
1880
+ quality: z.ZodOptional<z.ZodEnum<{
1881
+ standard: "standard";
1882
+ hd: "hd";
1883
+ draft: "draft";
1884
+ }>>;
1885
+ seed: z.ZodOptional<z.ZodNumber>;
1886
+ style: z.ZodOptional<z.ZodString>;
1887
+ negativePrompt: z.ZodOptional<z.ZodString>;
1888
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1889
+ feature: z.ZodLiteral<"poster">;
1890
+ }, z.core.$strip>;
1891
+ /** F03: Image editing request. */
1892
+ declare const imageEditRequestSchema: z.ZodObject<{
1893
+ prompt: z.ZodOptional<z.ZodString>;
1894
+ mode: z.ZodEnum<{
1895
+ instruct: "instruct";
1896
+ stylize: "stylize";
1897
+ colorize: "colorize";
1898
+ inpaint: "inpaint";
1899
+ erase: "erase";
1900
+ eraseWatermark: "eraseWatermark";
1901
+ }>;
1902
+ inputs: z.ZodObject<{
1903
+ image: z.ZodObject<{
1904
+ url: z.ZodOptional<z.ZodString>;
1905
+ base64: z.ZodOptional<z.ZodString>;
1906
+ mediaType: z.ZodOptional<z.ZodString>;
1907
+ }, z.core.$strip>;
1908
+ mask: z.ZodOptional<z.ZodObject<{
1909
+ url: z.ZodOptional<z.ZodString>;
1910
+ base64: z.ZodOptional<z.ZodString>;
1911
+ mediaType: z.ZodOptional<z.ZodString>;
1912
+ }, z.core.$strip>>;
1913
+ }, z.core.$strip>;
1914
+ strength: z.ZodOptional<z.ZodNumber>;
1915
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
1916
+ quality: z.ZodOptional<z.ZodEnum<{
1917
+ standard: "standard";
1918
+ hd: "hd";
1919
+ draft: "draft";
1920
+ }>>;
1921
+ seed: z.ZodOptional<z.ZodNumber>;
1922
+ style: z.ZodOptional<z.ZodString>;
1923
+ negativePrompt: z.ZodOptional<z.ZodString>;
1924
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1925
+ feature: z.ZodLiteral<"imageEdit">;
1926
+ }, z.core.$strip>;
1927
+ /** F04: Image upscale request. */
1928
+ declare const upscaleRequestSchema: z.ZodObject<{
1929
+ scale: z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<4>]>;
1930
+ inputs: z.ZodObject<{
1931
+ image: z.ZodObject<{
1932
+ url: z.ZodOptional<z.ZodString>;
1933
+ base64: z.ZodOptional<z.ZodString>;
1934
+ mediaType: z.ZodOptional<z.ZodString>;
1935
+ }, z.core.$strip>;
1936
+ }, z.core.$strip>;
1937
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
1938
+ quality: z.ZodOptional<z.ZodEnum<{
1939
+ standard: "standard";
1940
+ hd: "hd";
1941
+ draft: "draft";
1942
+ }>>;
1943
+ seed: z.ZodOptional<z.ZodNumber>;
1944
+ style: z.ZodOptional<z.ZodString>;
1945
+ negativePrompt: z.ZodOptional<z.ZodString>;
1946
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1947
+ feature: z.ZodLiteral<"upscale">;
1948
+ }, z.core.$strip>;
1949
+ /** F05: Image outpaint (canvas expansion) request. */
1950
+ declare const outpaintRequestSchema: z.ZodObject<{
1951
+ prompt: z.ZodOptional<z.ZodString>;
1952
+ inputs: z.ZodObject<{
1953
+ image: z.ZodObject<{
1954
+ url: z.ZodOptional<z.ZodString>;
1955
+ base64: z.ZodOptional<z.ZodString>;
1956
+ mediaType: z.ZodOptional<z.ZodString>;
1957
+ }, z.core.$strip>;
1958
+ }, z.core.$strip>;
1959
+ direction: z.ZodObject<{
1960
+ top: z.ZodOptional<z.ZodNumber>;
1961
+ bottom: z.ZodOptional<z.ZodNumber>;
1962
+ left: z.ZodOptional<z.ZodNumber>;
1963
+ right: z.ZodOptional<z.ZodNumber>;
1964
+ }, z.core.$strip>;
1965
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
1966
+ quality: z.ZodOptional<z.ZodEnum<{
1967
+ standard: "standard";
1968
+ hd: "hd";
1969
+ draft: "draft";
1970
+ }>>;
1971
+ seed: z.ZodOptional<z.ZodNumber>;
1972
+ style: z.ZodOptional<z.ZodString>;
1973
+ negativePrompt: z.ZodOptional<z.ZodString>;
1974
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
1975
+ feature: z.ZodLiteral<"outpaint">;
1976
+ }, z.core.$strip>;
1977
+ /** F07: Video generation request. */
1978
+ declare const videoGenerateRequestSchema: z.ZodObject<{
1979
+ prompt: z.ZodString;
1980
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
1981
+ "1:1": "1:1";
1982
+ "16:9": "16:9";
1983
+ "9:16": "9:16";
1984
+ "4:3": "4:3";
1985
+ "3:2": "3:2";
1986
+ }>>;
1987
+ duration: z.ZodUnion<readonly [z.ZodLiteral<5>, z.ZodLiteral<10>, z.ZodLiteral<15>]>;
1988
+ mode: z.ZodOptional<z.ZodEnum<{
1989
+ text: "text";
1990
+ withAudio: "withAudio";
1991
+ reference: "reference";
1992
+ firstFrame: "firstFrame";
1993
+ startEnd: "startEnd";
1994
+ storyboard: "storyboard";
1995
+ motionControl: "motionControl";
1996
+ }>>;
1997
+ inputs: z.ZodOptional<z.ZodObject<{
1998
+ startImage: z.ZodOptional<z.ZodObject<{
1999
+ url: z.ZodOptional<z.ZodString>;
2000
+ base64: z.ZodOptional<z.ZodString>;
2001
+ mediaType: z.ZodOptional<z.ZodString>;
2002
+ }, z.core.$strip>>;
2003
+ endImage: z.ZodOptional<z.ZodObject<{
2004
+ url: z.ZodOptional<z.ZodString>;
2005
+ base64: z.ZodOptional<z.ZodString>;
2006
+ mediaType: z.ZodOptional<z.ZodString>;
2007
+ }, z.core.$strip>>;
2008
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
2009
+ url: z.ZodOptional<z.ZodString>;
2010
+ base64: z.ZodOptional<z.ZodString>;
2011
+ mediaType: z.ZodOptional<z.ZodString>;
2012
+ }, z.core.$strip>>>;
2013
+ scenes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2014
+ prompt: z.ZodString;
2015
+ image: z.ZodOptional<z.ZodObject<{
2016
+ url: z.ZodOptional<z.ZodString>;
2017
+ base64: z.ZodOptional<z.ZodString>;
2018
+ mediaType: z.ZodOptional<z.ZodString>;
2019
+ }, z.core.$strip>>;
2020
+ }, z.core.$strip>>>;
2021
+ }, z.core.$strip>>;
2022
+ withAudio: z.ZodOptional<z.ZodBoolean>;
2023
+ motionPaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
2024
+ startX: z.ZodNumber;
2025
+ startY: z.ZodNumber;
2026
+ endX: z.ZodNumber;
2027
+ endY: z.ZodNumber;
2028
+ strength: z.ZodOptional<z.ZodNumber>;
2029
+ }, z.core.$strip>>>;
2030
+ camera: z.ZodOptional<z.ZodObject<{
2031
+ type: z.ZodEnum<{
2032
+ pan: "pan";
2033
+ zoom: "zoom";
2034
+ rotate: "rotate";
2035
+ dolly: "dolly";
2036
+ tilt: "tilt";
2037
+ }>;
2038
+ direction: z.ZodOptional<z.ZodString>;
2039
+ intensity: z.ZodOptional<z.ZodNumber>;
2040
+ }, z.core.$strip>>;
2041
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2042
+ quality: z.ZodOptional<z.ZodEnum<{
2043
+ standard: "standard";
2044
+ hd: "hd";
2045
+ draft: "draft";
2046
+ }>>;
2047
+ seed: z.ZodOptional<z.ZodNumber>;
2048
+ style: z.ZodOptional<z.ZodString>;
2049
+ negativePrompt: z.ZodOptional<z.ZodString>;
2050
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2051
+ feature: z.ZodLiteral<"videoGenerate">;
2052
+ }, z.core.$strip>;
2053
+ /** F09: Digital human (talking head / lip sync) request. */
2054
+ declare const digitalHumanRequestSchema: z.ZodObject<{
2055
+ mode: z.ZodEnum<{
2056
+ photo2video: "photo2video";
2057
+ lipSync: "lipSync";
2058
+ }>;
2059
+ inputs: z.ZodObject<{
2060
+ person: z.ZodObject<{
2061
+ url: z.ZodOptional<z.ZodString>;
2062
+ base64: z.ZodOptional<z.ZodString>;
2063
+ mediaType: z.ZodOptional<z.ZodString>;
2064
+ }, z.core.$strip>;
2065
+ audio: z.ZodObject<{
2066
+ url: z.ZodOptional<z.ZodString>;
2067
+ base64: z.ZodOptional<z.ZodString>;
2068
+ mediaType: z.ZodOptional<z.ZodString>;
2069
+ }, z.core.$strip>;
2070
+ }, z.core.$strip>;
2071
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2072
+ quality: z.ZodOptional<z.ZodEnum<{
2073
+ standard: "standard";
2074
+ hd: "hd";
2075
+ draft: "draft";
2076
+ }>>;
2077
+ seed: z.ZodOptional<z.ZodNumber>;
2078
+ style: z.ZodOptional<z.ZodString>;
2079
+ negativePrompt: z.ZodOptional<z.ZodString>;
2080
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2081
+ feature: z.ZodLiteral<"digitalHuman">;
2082
+ }, z.core.$strip>;
2083
+ /** F11: Text-to-speech request. */
2084
+ declare const ttsRequestSchema: z.ZodObject<{
2085
+ text: z.ZodString;
2086
+ voice: z.ZodOptional<z.ZodString>;
2087
+ referenceAudio: z.ZodOptional<z.ZodObject<{
2088
+ url: z.ZodOptional<z.ZodString>;
2089
+ base64: z.ZodOptional<z.ZodString>;
2090
+ mediaType: z.ZodOptional<z.ZodString>;
2091
+ }, z.core.$strip>>;
2092
+ output: z.ZodOptional<z.ZodObject<{
2093
+ format: z.ZodOptional<z.ZodEnum<{
2094
+ mp3: "mp3";
2095
+ wav: "wav";
2096
+ opus: "opus";
2097
+ }>>;
2098
+ sampleRate: z.ZodOptional<z.ZodNumber>;
2099
+ }, z.core.$strip>>;
2100
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2101
+ quality: z.ZodOptional<z.ZodEnum<{
2102
+ standard: "standard";
2103
+ hd: "hd";
2104
+ draft: "draft";
2105
+ }>>;
2106
+ seed: z.ZodOptional<z.ZodNumber>;
2107
+ style: z.ZodOptional<z.ZodString>;
2108
+ negativePrompt: z.ZodOptional<z.ZodString>;
2109
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2110
+ feature: z.ZodLiteral<"tts">;
2111
+ }, z.core.$strip>;
2112
+ /** Discriminated union of all media generation feature requests. */
2113
+ declare const mediaGenerateRequestSchema: z.ZodDiscriminatedUnion<[z.ZodObject<{
2114
+ prompt: z.ZodString;
2115
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
2116
+ "1:1": "1:1";
2117
+ "16:9": "16:9";
2118
+ "9:16": "9:16";
2119
+ "4:3": "4:3";
2120
+ "3:2": "3:2";
2121
+ }>>;
2122
+ resolution: z.ZodOptional<z.ZodEnum<{
2123
+ "1K": "1K";
2124
+ "2K": "2K";
2125
+ "4K": "4K";
2126
+ }>>;
2127
+ mode: z.ZodOptional<z.ZodEnum<{
2128
+ text: "text";
2129
+ reference: "reference";
2130
+ sketch: "sketch";
2131
+ character: "character";
2132
+ }>>;
2133
+ inputs: z.ZodOptional<z.ZodObject<{
2134
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
2135
+ url: z.ZodOptional<z.ZodString>;
2136
+ base64: z.ZodOptional<z.ZodString>;
2137
+ mediaType: z.ZodOptional<z.ZodString>;
2138
+ }, z.core.$strip>>>;
2139
+ isSketch: z.ZodOptional<z.ZodBoolean>;
2140
+ }, z.core.$strip>>;
2141
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2142
+ quality: z.ZodOptional<z.ZodEnum<{
2143
+ standard: "standard";
2144
+ hd: "hd";
2145
+ draft: "draft";
2146
+ }>>;
2147
+ seed: z.ZodOptional<z.ZodNumber>;
2148
+ style: z.ZodOptional<z.ZodString>;
2149
+ negativePrompt: z.ZodOptional<z.ZodString>;
2150
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2151
+ feature: z.ZodLiteral<"imageGenerate">;
2152
+ }, z.core.$strip>, z.ZodObject<{
2153
+ title: z.ZodString;
2154
+ subTitle: z.ZodOptional<z.ZodString>;
2155
+ bodyText: z.ZodOptional<z.ZodString>;
2156
+ prompt: z.ZodString;
2157
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
2158
+ "1:1": "1:1";
2159
+ "16:9": "16:9";
2160
+ "9:16": "9:16";
2161
+ "4:3": "4:3";
2162
+ "3:2": "3:2";
2163
+ }>>;
2164
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2165
+ quality: z.ZodOptional<z.ZodEnum<{
2166
+ standard: "standard";
2167
+ hd: "hd";
2168
+ draft: "draft";
2169
+ }>>;
2170
+ seed: z.ZodOptional<z.ZodNumber>;
2171
+ style: z.ZodOptional<z.ZodString>;
2172
+ negativePrompt: z.ZodOptional<z.ZodString>;
2173
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2174
+ feature: z.ZodLiteral<"poster">;
2175
+ }, z.core.$strip>, z.ZodObject<{
2176
+ prompt: z.ZodOptional<z.ZodString>;
2177
+ mode: z.ZodEnum<{
2178
+ instruct: "instruct";
2179
+ stylize: "stylize";
2180
+ colorize: "colorize";
2181
+ inpaint: "inpaint";
2182
+ erase: "erase";
2183
+ eraseWatermark: "eraseWatermark";
2184
+ }>;
2185
+ inputs: z.ZodObject<{
2186
+ image: z.ZodObject<{
2187
+ url: z.ZodOptional<z.ZodString>;
2188
+ base64: z.ZodOptional<z.ZodString>;
2189
+ mediaType: z.ZodOptional<z.ZodString>;
2190
+ }, z.core.$strip>;
2191
+ mask: z.ZodOptional<z.ZodObject<{
2192
+ url: z.ZodOptional<z.ZodString>;
2193
+ base64: z.ZodOptional<z.ZodString>;
2194
+ mediaType: z.ZodOptional<z.ZodString>;
2195
+ }, z.core.$strip>>;
2196
+ }, z.core.$strip>;
2197
+ strength: z.ZodOptional<z.ZodNumber>;
2198
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2199
+ quality: z.ZodOptional<z.ZodEnum<{
2200
+ standard: "standard";
2201
+ hd: "hd";
2202
+ draft: "draft";
2203
+ }>>;
2204
+ seed: z.ZodOptional<z.ZodNumber>;
2205
+ style: z.ZodOptional<z.ZodString>;
2206
+ negativePrompt: z.ZodOptional<z.ZodString>;
2207
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2208
+ feature: z.ZodLiteral<"imageEdit">;
2209
+ }, z.core.$strip>, z.ZodObject<{
2210
+ scale: z.ZodUnion<readonly [z.ZodLiteral<2>, z.ZodLiteral<4>]>;
2211
+ inputs: z.ZodObject<{
2212
+ image: z.ZodObject<{
2213
+ url: z.ZodOptional<z.ZodString>;
2214
+ base64: z.ZodOptional<z.ZodString>;
2215
+ mediaType: z.ZodOptional<z.ZodString>;
2216
+ }, z.core.$strip>;
2217
+ }, z.core.$strip>;
2218
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2219
+ quality: z.ZodOptional<z.ZodEnum<{
2220
+ standard: "standard";
2221
+ hd: "hd";
2222
+ draft: "draft";
2223
+ }>>;
2224
+ seed: z.ZodOptional<z.ZodNumber>;
2225
+ style: z.ZodOptional<z.ZodString>;
2226
+ negativePrompt: z.ZodOptional<z.ZodString>;
2227
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2228
+ feature: z.ZodLiteral<"upscale">;
2229
+ }, z.core.$strip>, z.ZodObject<{
2230
+ prompt: z.ZodOptional<z.ZodString>;
2231
+ inputs: z.ZodObject<{
2232
+ image: z.ZodObject<{
2233
+ url: z.ZodOptional<z.ZodString>;
2234
+ base64: z.ZodOptional<z.ZodString>;
2235
+ mediaType: z.ZodOptional<z.ZodString>;
2236
+ }, z.core.$strip>;
2237
+ }, z.core.$strip>;
2238
+ direction: z.ZodObject<{
2239
+ top: z.ZodOptional<z.ZodNumber>;
2240
+ bottom: z.ZodOptional<z.ZodNumber>;
2241
+ left: z.ZodOptional<z.ZodNumber>;
2242
+ right: z.ZodOptional<z.ZodNumber>;
2243
+ }, z.core.$strip>;
2244
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2245
+ quality: z.ZodOptional<z.ZodEnum<{
2246
+ standard: "standard";
2247
+ hd: "hd";
2248
+ draft: "draft";
2249
+ }>>;
2250
+ seed: z.ZodOptional<z.ZodNumber>;
2251
+ style: z.ZodOptional<z.ZodString>;
2252
+ negativePrompt: z.ZodOptional<z.ZodString>;
2253
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2254
+ feature: z.ZodLiteral<"outpaint">;
2255
+ }, z.core.$strip>, z.ZodObject<{
2256
+ prompt: z.ZodString;
2257
+ aspectRatio: z.ZodOptional<z.ZodEnum<{
2258
+ "1:1": "1:1";
2259
+ "16:9": "16:9";
2260
+ "9:16": "9:16";
2261
+ "4:3": "4:3";
2262
+ "3:2": "3:2";
2263
+ }>>;
2264
+ duration: z.ZodUnion<readonly [z.ZodLiteral<5>, z.ZodLiteral<10>, z.ZodLiteral<15>]>;
2265
+ mode: z.ZodOptional<z.ZodEnum<{
2266
+ text: "text";
2267
+ withAudio: "withAudio";
2268
+ reference: "reference";
2269
+ firstFrame: "firstFrame";
2270
+ startEnd: "startEnd";
2271
+ storyboard: "storyboard";
2272
+ motionControl: "motionControl";
2273
+ }>>;
2274
+ inputs: z.ZodOptional<z.ZodObject<{
2275
+ startImage: z.ZodOptional<z.ZodObject<{
2276
+ url: z.ZodOptional<z.ZodString>;
2277
+ base64: z.ZodOptional<z.ZodString>;
2278
+ mediaType: z.ZodOptional<z.ZodString>;
2279
+ }, z.core.$strip>>;
2280
+ endImage: z.ZodOptional<z.ZodObject<{
2281
+ url: z.ZodOptional<z.ZodString>;
2282
+ base64: z.ZodOptional<z.ZodString>;
2283
+ mediaType: z.ZodOptional<z.ZodString>;
2284
+ }, z.core.$strip>>;
2285
+ images: z.ZodOptional<z.ZodArray<z.ZodObject<{
2286
+ url: z.ZodOptional<z.ZodString>;
2287
+ base64: z.ZodOptional<z.ZodString>;
2288
+ mediaType: z.ZodOptional<z.ZodString>;
2289
+ }, z.core.$strip>>>;
2290
+ scenes: z.ZodOptional<z.ZodArray<z.ZodObject<{
2291
+ prompt: z.ZodString;
2292
+ image: z.ZodOptional<z.ZodObject<{
2293
+ url: z.ZodOptional<z.ZodString>;
2294
+ base64: z.ZodOptional<z.ZodString>;
2295
+ mediaType: z.ZodOptional<z.ZodString>;
2296
+ }, z.core.$strip>>;
2297
+ }, z.core.$strip>>>;
2298
+ }, z.core.$strip>>;
2299
+ withAudio: z.ZodOptional<z.ZodBoolean>;
2300
+ motionPaths: z.ZodOptional<z.ZodArray<z.ZodObject<{
2301
+ startX: z.ZodNumber;
2302
+ startY: z.ZodNumber;
2303
+ endX: z.ZodNumber;
2304
+ endY: z.ZodNumber;
2305
+ strength: z.ZodOptional<z.ZodNumber>;
2306
+ }, z.core.$strip>>>;
2307
+ camera: z.ZodOptional<z.ZodObject<{
2308
+ type: z.ZodEnum<{
2309
+ pan: "pan";
2310
+ zoom: "zoom";
2311
+ rotate: "rotate";
2312
+ dolly: "dolly";
2313
+ tilt: "tilt";
2314
+ }>;
2315
+ direction: z.ZodOptional<z.ZodString>;
2316
+ intensity: z.ZodOptional<z.ZodNumber>;
2317
+ }, z.core.$strip>>;
2318
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2319
+ quality: z.ZodOptional<z.ZodEnum<{
2320
+ standard: "standard";
2321
+ hd: "hd";
2322
+ draft: "draft";
2323
+ }>>;
2324
+ seed: z.ZodOptional<z.ZodNumber>;
2325
+ style: z.ZodOptional<z.ZodString>;
2326
+ negativePrompt: z.ZodOptional<z.ZodString>;
2327
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2328
+ feature: z.ZodLiteral<"videoGenerate">;
2329
+ }, z.core.$strip>, z.ZodObject<{
2330
+ mode: z.ZodEnum<{
2331
+ photo2video: "photo2video";
2332
+ lipSync: "lipSync";
2333
+ }>;
2334
+ inputs: z.ZodObject<{
2335
+ person: z.ZodObject<{
2336
+ url: z.ZodOptional<z.ZodString>;
2337
+ base64: z.ZodOptional<z.ZodString>;
2338
+ mediaType: z.ZodOptional<z.ZodString>;
2339
+ }, z.core.$strip>;
2340
+ audio: z.ZodObject<{
2341
+ url: z.ZodOptional<z.ZodString>;
2342
+ base64: z.ZodOptional<z.ZodString>;
2343
+ mediaType: z.ZodOptional<z.ZodString>;
2344
+ }, z.core.$strip>;
2345
+ }, z.core.$strip>;
2346
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2347
+ quality: z.ZodOptional<z.ZodEnum<{
2348
+ standard: "standard";
2349
+ hd: "hd";
2350
+ draft: "draft";
2351
+ }>>;
2352
+ seed: z.ZodOptional<z.ZodNumber>;
2353
+ style: z.ZodOptional<z.ZodString>;
2354
+ negativePrompt: z.ZodOptional<z.ZodString>;
2355
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2356
+ feature: z.ZodLiteral<"digitalHuman">;
2357
+ }, z.core.$strip>, z.ZodObject<{
2358
+ text: z.ZodString;
2359
+ voice: z.ZodOptional<z.ZodString>;
2360
+ referenceAudio: z.ZodOptional<z.ZodObject<{
2361
+ url: z.ZodOptional<z.ZodString>;
2362
+ base64: z.ZodOptional<z.ZodString>;
2363
+ mediaType: z.ZodOptional<z.ZodString>;
2364
+ }, z.core.$strip>>;
2365
+ output: z.ZodOptional<z.ZodObject<{
2366
+ format: z.ZodOptional<z.ZodEnum<{
2367
+ mp3: "mp3";
2368
+ wav: "wav";
2369
+ opus: "opus";
2370
+ }>>;
2371
+ sampleRate: z.ZodOptional<z.ZodNumber>;
2372
+ }, z.core.$strip>>;
2373
+ count: z.ZodOptional<z.ZodUnion<readonly [z.ZodLiteral<1>, z.ZodLiteral<2>, z.ZodLiteral<4>]>>;
2374
+ quality: z.ZodOptional<z.ZodEnum<{
2375
+ standard: "standard";
2376
+ hd: "hd";
2377
+ draft: "draft";
2378
+ }>>;
2379
+ seed: z.ZodOptional<z.ZodNumber>;
2380
+ style: z.ZodOptional<z.ZodString>;
2381
+ negativePrompt: z.ZodOptional<z.ZodString>;
2382
+ parameters: z.ZodOptional<z.ZodRecord<z.ZodString, z.ZodUnknown>>;
2383
+ feature: z.ZodLiteral<"tts">;
2384
+ }, z.core.$strip>], "feature">;
2385
+ /** Task status within a task group. */
2386
+ declare const mediaTaskStatusSchema: z.ZodEnum<{
2387
+ queued: "queued";
2388
+ running: "running";
2389
+ succeeded: "succeeded";
2390
+ failed: "failed";
2391
+ canceled: "canceled";
2392
+ }>;
2393
+ /** Individual task within a task group. */
2394
+ declare const mediaTaskItemSchema: z.ZodObject<{
2395
+ taskId: z.ZodString;
2396
+ status: z.ZodEnum<{
2397
+ queued: "queued";
2398
+ running: "running";
2399
+ succeeded: "succeeded";
2400
+ failed: "failed";
2401
+ canceled: "canceled";
2402
+ }>;
2403
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
2404
+ error: z.ZodOptional<z.ZodObject<{
2405
+ code: z.ZodOptional<z.ZodString>;
2406
+ message: z.ZodString;
2407
+ }, z.core.$strip>>;
2408
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
2409
+ }, z.core.$strip>;
2410
+ /** Task group data payload. */
2411
+ declare const mediaTaskGroupDataSchema: z.ZodObject<{
2412
+ groupId: z.ZodString;
2413
+ tasks: z.ZodArray<z.ZodObject<{
2414
+ taskId: z.ZodString;
2415
+ status: z.ZodEnum<{
2416
+ queued: "queued";
2417
+ running: "running";
2418
+ succeeded: "succeeded";
2419
+ failed: "failed";
2420
+ canceled: "canceled";
2421
+ }>;
2422
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
2423
+ error: z.ZodOptional<z.ZodObject<{
2424
+ code: z.ZodOptional<z.ZodString>;
2425
+ message: z.ZodString;
2426
+ }, z.core.$strip>>;
2427
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
2428
+ }, z.core.$strip>>;
2429
+ totalCreditsConsumed: z.ZodOptional<z.ZodNumber>;
2430
+ }, z.core.$strip>;
2431
+ /** Successful task group response. */
2432
+ declare const mediaTaskGroupSuccessSchema: z.ZodObject<{
2433
+ success: z.ZodLiteral<true>;
2434
+ data: z.ZodObject<{
2435
+ groupId: z.ZodString;
2436
+ tasks: z.ZodArray<z.ZodObject<{
2437
+ taskId: z.ZodString;
2438
+ status: z.ZodEnum<{
2439
+ queued: "queued";
2440
+ running: "running";
2441
+ succeeded: "succeeded";
2442
+ failed: "failed";
2443
+ canceled: "canceled";
2444
+ }>;
2445
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
2446
+ error: z.ZodOptional<z.ZodObject<{
2447
+ code: z.ZodOptional<z.ZodString>;
2448
+ message: z.ZodString;
2449
+ }, z.core.$strip>>;
2450
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
2451
+ }, z.core.$strip>>;
2452
+ totalCreditsConsumed: z.ZodOptional<z.ZodNumber>;
2453
+ }, z.core.$strip>;
2454
+ }, z.core.$strip>;
2455
+ /** Task group response (success or error). */
2456
+ declare const mediaTaskGroupResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
2457
+ success: z.ZodLiteral<true>;
2458
+ data: z.ZodObject<{
2459
+ groupId: z.ZodString;
2460
+ tasks: z.ZodArray<z.ZodObject<{
2461
+ taskId: z.ZodString;
2462
+ status: z.ZodEnum<{
2463
+ queued: "queued";
2464
+ running: "running";
2465
+ succeeded: "succeeded";
2466
+ failed: "failed";
2467
+ canceled: "canceled";
2468
+ }>;
2469
+ resultUrls: z.ZodOptional<z.ZodArray<z.ZodString>>;
2470
+ error: z.ZodOptional<z.ZodObject<{
2471
+ code: z.ZodOptional<z.ZodString>;
2472
+ message: z.ZodString;
2473
+ }, z.core.$strip>>;
2474
+ creditsConsumed: z.ZodOptional<z.ZodNumber>;
2475
+ }, z.core.$strip>>;
2476
+ totalCreditsConsumed: z.ZodOptional<z.ZodNumber>;
2477
+ }, z.core.$strip>;
2478
+ }, z.core.$strip>, z.ZodObject<{
2479
+ success: z.ZodLiteral<false>;
2480
+ code: z.ZodOptional<z.ZodString>;
2481
+ message: z.ZodString;
2482
+ }, z.core.$strip>]>;
2483
+ /** Query parameters for fetching v2 media models (filterable by feature). */
2484
+ declare const mediaModelsQuerySchema: z.ZodObject<{
2485
+ feature: z.ZodOptional<z.ZodEnum<{
2486
+ imageGenerate: "imageGenerate";
2487
+ poster: "poster";
2488
+ imageEdit: "imageEdit";
2489
+ upscale: "upscale";
2490
+ outpaint: "outpaint";
2491
+ videoGenerate: "videoGenerate";
2492
+ digitalHuman: "digitalHuman";
2493
+ tts: "tts";
2494
+ }>>;
2495
+ }, z.core.$strip>;
2496
+ /** All supported media generation features. */
2497
+ type MediaFeature = z.infer<typeof mediaFeatureSchema>;
2498
+ /** Supported aspect ratios. */
2499
+ type MediaAspectRatio = z.infer<typeof mediaAspectRatioSchema>;
2500
+ /** Supported resolutions. */
2501
+ type MediaResolution = z.infer<typeof mediaResolutionSchema>;
2502
+ /** Output quality levels. */
2503
+ type MediaQuality = z.infer<typeof mediaQualitySchema>;
2504
+ /** Base media generate request (all common fields). */
2505
+ type MediaGenerateBase = z.infer<typeof mediaGenerateBaseSchema>;
2506
+ /** F01: Image generation request. */
2507
+ type ImageGenerateRequest = z.infer<typeof imageGenerateRequestSchema>;
2508
+ /** F02: Poster generation request. */
2509
+ type PosterRequest = z.infer<typeof posterRequestSchema>;
2510
+ /** F03: Image editing request. */
2511
+ type ImageEditRequest = z.infer<typeof imageEditRequestSchema>;
2512
+ /** F04: Image upscale request. */
2513
+ type UpscaleRequest = z.infer<typeof upscaleRequestSchema>;
2514
+ /** F05: Image outpaint request. */
2515
+ type OutpaintRequest = z.infer<typeof outpaintRequestSchema>;
2516
+ /** F07: Video generation request. */
2517
+ type VideoGenerateRequest = z.infer<typeof videoGenerateRequestSchema>;
2518
+ /** F09: Digital human request. */
2519
+ type DigitalHumanRequest = z.infer<typeof digitalHumanRequestSchema>;
2520
+ /** F11: Text-to-speech request. */
2521
+ type TtsRequest = z.infer<typeof ttsRequestSchema>;
2522
+ /** Discriminated union of all media generation requests. */
2523
+ type MediaGenerateRequest = z.infer<typeof mediaGenerateRequestSchema>;
2524
+ /** Individual task within a task group. */
2525
+ type MediaTaskItem = z.infer<typeof mediaTaskItemSchema>;
2526
+ /** Task group data payload. */
2527
+ type MediaTaskGroupData = z.infer<typeof mediaTaskGroupDataSchema>;
2528
+ /** Successful task group response. */
2529
+ type MediaTaskGroupSuccess = z.infer<typeof mediaTaskGroupSuccessSchema>;
2530
+ /** Task group response (success or error). */
2531
+ type MediaTaskGroupResponse = z.infer<typeof mediaTaskGroupResponseSchema>;
2532
+ /** Query parameters for v2 media models. */
2533
+ type MediaModelsQuery = z.infer<typeof mediaModelsQuerySchema>;
1167
2534
 
1168
2535
  /** Optional client metadata shared by OpenAI-compatible chat requests. */
1169
2536
  declare const aiClientMetadataSchema: z.ZodObject<{
@@ -1625,6 +2992,7 @@ declare const aiModelSchema: z.ZodObject<{
1625
2992
  supportsAudio: z.ZodOptional<z.ZodBoolean>;
1626
2993
  }, z.core.$strip>>;
1627
2994
  }, z.core.$strip>>;
2995
+ creditsPerCall: z.ZodOptional<z.ZodNumber>;
1628
2996
  }, z.core.$loose>;
1629
2997
  declare const aiModelsPayloadSchema: z.ZodObject<{
1630
2998
  data: z.ZodArray<z.ZodObject<{
@@ -1671,6 +3039,7 @@ declare const aiModelsPayloadSchema: z.ZodObject<{
1671
3039
  supportsAudio: z.ZodOptional<z.ZodBoolean>;
1672
3040
  }, z.core.$strip>>;
1673
3041
  }, z.core.$strip>>;
3042
+ creditsPerCall: z.ZodOptional<z.ZodNumber>;
1674
3043
  }, z.core.$loose>>;
1675
3044
  updatedAt: z.ZodOptional<z.ZodString>;
1676
3045
  }, z.core.$strip>;
@@ -1721,6 +3090,7 @@ declare const aiModelsSuccessSchema: z.ZodObject<{
1721
3090
  supportsAudio: z.ZodOptional<z.ZodBoolean>;
1722
3091
  }, z.core.$strip>>;
1723
3092
  }, z.core.$strip>>;
3093
+ creditsPerCall: z.ZodOptional<z.ZodNumber>;
1724
3094
  }, z.core.$loose>>;
1725
3095
  updatedAt: z.ZodOptional<z.ZodString>;
1726
3096
  }, z.core.$strip>;
@@ -1772,6 +3142,7 @@ declare const aiModelsResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
1772
3142
  supportsAudio: z.ZodOptional<z.ZodBoolean>;
1773
3143
  }, z.core.$strip>>;
1774
3144
  }, z.core.$strip>>;
3145
+ creditsPerCall: z.ZodOptional<z.ZodNumber>;
1775
3146
  }, z.core.$loose>>;
1776
3147
  updatedAt: z.ZodOptional<z.ZodString>;
1777
3148
  }, z.core.$strip>;
@@ -2459,6 +3830,7 @@ declare class AiClient {
2459
3830
  supportsAudio?: boolean | undefined;
2460
3831
  } | undefined;
2461
3832
  } | undefined;
3833
+ creditsPerCall?: number | undefined;
2462
3834
  }[];
2463
3835
  updatedAt?: string | undefined;
2464
3836
  };
@@ -2511,6 +3883,7 @@ declare class AiClient {
2511
3883
  supportsAudio?: boolean | undefined;
2512
3884
  } | undefined;
2513
3885
  } | undefined;
3886
+ creditsPerCall?: number | undefined;
2514
3887
  }[];
2515
3888
  updatedAt?: string | undefined;
2516
3889
  };
@@ -2563,6 +3936,7 @@ declare class AiClient {
2563
3936
  supportsAudio?: boolean | undefined;
2564
3937
  } | undefined;
2565
3938
  } | undefined;
3939
+ creditsPerCall?: number | undefined;
2566
3940
  }[];
2567
3941
  updatedAt?: string | undefined;
2568
3942
  };
@@ -2699,9 +4073,125 @@ declare class AiClient {
2699
4073
  updatedAt?: string | undefined;
2700
4074
  };
2701
4075
  }>;
4076
+ /** Submit a media generation task (v2 unified endpoint). */
4077
+ mediaGenerate(payload: MediaGenerateRequest): Promise<{
4078
+ success: false;
4079
+ message: string;
4080
+ code?: string | undefined;
4081
+ } | {
4082
+ success: true;
4083
+ data: {
4084
+ taskId: string;
4085
+ };
4086
+ }>;
4087
+ /** Fetch media task status by ID (v2). */
4088
+ mediaTask(taskId: string): Promise<{
4089
+ success: false;
4090
+ message: string;
4091
+ code?: string | undefined;
4092
+ } | {
4093
+ success: true;
4094
+ data: {
4095
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
4096
+ progress?: number | undefined;
4097
+ resultType?: "image" | "video" | "audio" | undefined;
4098
+ resultUrls?: string[] | undefined;
4099
+ error?: {
4100
+ message: string;
4101
+ code?: string | undefined;
4102
+ } | undefined;
4103
+ creditsConsumed?: number | undefined;
4104
+ };
4105
+ }>;
4106
+ /** Cancel a media task by ID (v2). */
4107
+ mediaCancelTask(taskId: string): Promise<{
4108
+ success: false;
4109
+ message: string;
4110
+ code?: string | undefined;
4111
+ } | {
4112
+ success: true;
4113
+ data: {
4114
+ status: "canceled" | "processing";
4115
+ };
4116
+ }>;
4117
+ /** Fetch media task group status by group ID (v2). */
4118
+ mediaTaskGroup(groupId: string): Promise<{
4119
+ success: false;
4120
+ message: string;
4121
+ code?: string | undefined;
4122
+ } | {
4123
+ success: true;
4124
+ data: {
4125
+ groupId: string;
4126
+ tasks: {
4127
+ taskId: string;
4128
+ status: "queued" | "running" | "succeeded" | "failed" | "canceled";
4129
+ resultUrls?: string[] | undefined;
4130
+ error?: {
4131
+ message: string;
4132
+ code?: string | undefined;
4133
+ } | undefined;
4134
+ creditsConsumed?: number | undefined;
4135
+ }[];
4136
+ totalCreditsConsumed?: number | undefined;
4137
+ };
4138
+ }>;
4139
+ /** List available media models, optionally filtered by feature (v2). */
4140
+ mediaModels(feature?: string): Promise<{
4141
+ success: false;
4142
+ message: string;
4143
+ code?: string | undefined;
4144
+ } | {
4145
+ success: true;
4146
+ data: {
4147
+ data: {
4148
+ [x: string]: unknown;
4149
+ id: string;
4150
+ name?: string | undefined;
4151
+ familyId?: string | undefined;
4152
+ providerId?: string | undefined;
4153
+ tags?: string[] | undefined;
4154
+ capabilities?: {
4155
+ common?: {
4156
+ maxContextK?: number | undefined;
4157
+ supportsStructuredOutput?: boolean | undefined;
4158
+ supportsWebSearch?: boolean | undefined;
4159
+ } | undefined;
4160
+ params?: {
4161
+ features?: string[] | undefined;
4162
+ fields?: {
4163
+ key: string;
4164
+ title: string;
4165
+ type: "number" | "boolean" | "text" | "select";
4166
+ request: boolean;
4167
+ description?: string | undefined;
4168
+ unit?: string | undefined;
4169
+ values?: (string | number | boolean)[] | undefined;
4170
+ min?: number | undefined;
4171
+ max?: number | undefined;
4172
+ step?: number | undefined;
4173
+ default?: string | number | boolean | undefined;
4174
+ }[] | undefined;
4175
+ } | undefined;
4176
+ input?: {
4177
+ maxImages?: number | undefined;
4178
+ supportsMask?: boolean | undefined;
4179
+ supportsReferenceVideo?: boolean | undefined;
4180
+ supportsStartEnd?: boolean | undefined;
4181
+ } | undefined;
4182
+ output?: {
4183
+ supportsMulti?: boolean | undefined;
4184
+ supportsAudio?: boolean | undefined;
4185
+ } | undefined;
4186
+ } | undefined;
4187
+ creditsPerCall?: number | undefined;
4188
+ }[];
4189
+ updatedAt?: string | undefined;
4190
+ };
4191
+ }>;
2702
4192
  }
2703
4193
 
2704
- declare const AI_MODEL_TAGS: readonly ["image_generation", "image_multi_input", "image_input", "image_multi_generation", "image_edit", "video_generation", "chat", "reasoning", "tool_call", "image_analysis", "video_analysis", "audio_analysis", "code"];
4194
+ declare const AI_MODEL_TAGS: readonly ["image_generation", "image_multi_input", "image_input", "image_multi_generation", "image_edit", "video_generation", "audio_tts", "media:imageGenerate", "media:poster", "media:imageEdit", "media:upscale", "media:outpaint", "media:matting", "media:videoGenerate", "media:videoEdit", "media:digitalHuman", "media:motionTransfer", "media:tts", "media:music", "media:sfx", "chat", "reasoning", "tool_call", "image_analysis", "video_analysis", "audio_analysis", "code"];
2705
4195
  type AiModelTag = (typeof AI_MODEL_TAGS)[number];
2706
4196
  declare const AI_MODEL_TAG_LABELS: Record<AiModelTag, string>;
2707
4197
  declare const AI_MODEL_CAPABILITY_INPUT_KEYS: readonly ["maxImages", "supportsMask", "supportsReferenceVideo", "supportsStartEnd"];
@@ -2747,6 +4237,25 @@ type index$6_AiTaskResponse = AiTaskResponse;
2747
4237
  type index$6_AiVideoInputs = AiVideoInputs;
2748
4238
  type index$6_AiVideoOutput = AiVideoOutput;
2749
4239
  type index$6_AiVideoRequest = AiVideoRequest;
4240
+ type index$6_DigitalHumanRequest = DigitalHumanRequest;
4241
+ type index$6_ImageEditRequest = ImageEditRequest;
4242
+ type index$6_ImageGenerateRequest = ImageGenerateRequest;
4243
+ type index$6_MediaAspectRatio = MediaAspectRatio;
4244
+ type index$6_MediaFeature = MediaFeature;
4245
+ type index$6_MediaGenerateBase = MediaGenerateBase;
4246
+ type index$6_MediaGenerateRequest = MediaGenerateRequest;
4247
+ type index$6_MediaModelsQuery = MediaModelsQuery;
4248
+ type index$6_MediaQuality = MediaQuality;
4249
+ type index$6_MediaResolution = MediaResolution;
4250
+ type index$6_MediaTaskGroupData = MediaTaskGroupData;
4251
+ type index$6_MediaTaskGroupResponse = MediaTaskGroupResponse;
4252
+ type index$6_MediaTaskGroupSuccess = MediaTaskGroupSuccess;
4253
+ type index$6_MediaTaskItem = MediaTaskItem;
4254
+ type index$6_OutpaintRequest = OutpaintRequest;
4255
+ type index$6_PosterRequest = PosterRequest;
4256
+ type index$6_TtsRequest = TtsRequest;
4257
+ type index$6_UpscaleRequest = UpscaleRequest;
4258
+ type index$6_VideoGenerateRequest = VideoGenerateRequest;
2750
4259
  declare const index$6_aiAudioOutputSchema: typeof aiAudioOutputSchema;
2751
4260
  declare const index$6_aiAudioRequestSchema: typeof aiAudioRequestSchema;
2752
4261
  declare const index$6_aiChatCompletionsRequestSchema: typeof aiChatCompletionsRequestSchema;
@@ -2800,8 +4309,28 @@ declare const index$6_aiTaskSuccessSchema: typeof aiTaskSuccessSchema;
2800
4309
  declare const index$6_aiVideoInputsSchema: typeof aiVideoInputsSchema;
2801
4310
  declare const index$6_aiVideoOutputSchema: typeof aiVideoOutputSchema;
2802
4311
  declare const index$6_aiVideoRequestSchema: typeof aiVideoRequestSchema;
4312
+ declare const index$6_digitalHumanRequestSchema: typeof digitalHumanRequestSchema;
4313
+ declare const index$6_imageEditRequestSchema: typeof imageEditRequestSchema;
4314
+ declare const index$6_imageGenerateRequestSchema: typeof imageGenerateRequestSchema;
4315
+ declare const index$6_mediaAspectRatioSchema: typeof mediaAspectRatioSchema;
4316
+ declare const index$6_mediaFeatureSchema: typeof mediaFeatureSchema;
4317
+ declare const index$6_mediaGenerateBaseSchema: typeof mediaGenerateBaseSchema;
4318
+ declare const index$6_mediaGenerateRequestSchema: typeof mediaGenerateRequestSchema;
4319
+ declare const index$6_mediaModelsQuerySchema: typeof mediaModelsQuerySchema;
4320
+ declare const index$6_mediaQualitySchema: typeof mediaQualitySchema;
4321
+ declare const index$6_mediaResolutionSchema: typeof mediaResolutionSchema;
4322
+ declare const index$6_mediaTaskGroupDataSchema: typeof mediaTaskGroupDataSchema;
4323
+ declare const index$6_mediaTaskGroupResponseSchema: typeof mediaTaskGroupResponseSchema;
4324
+ declare const index$6_mediaTaskGroupSuccessSchema: typeof mediaTaskGroupSuccessSchema;
4325
+ declare const index$6_mediaTaskItemSchema: typeof mediaTaskItemSchema;
4326
+ declare const index$6_mediaTaskStatusSchema: typeof mediaTaskStatusSchema;
4327
+ declare const index$6_outpaintRequestSchema: typeof outpaintRequestSchema;
4328
+ declare const index$6_posterRequestSchema: typeof posterRequestSchema;
4329
+ declare const index$6_ttsRequestSchema: typeof ttsRequestSchema;
4330
+ declare const index$6_upscaleRequestSchema: typeof upscaleRequestSchema;
4331
+ declare const index$6_videoGenerateRequestSchema: typeof videoGenerateRequestSchema;
2803
4332
  declare namespace index$6 {
2804
- export { index$6_AI_MODEL_CAPABILITY_INPUT_KEYS as AI_MODEL_CAPABILITY_INPUT_KEYS, index$6_AI_MODEL_CAPABILITY_OUTPUT_KEYS as AI_MODEL_CAPABILITY_OUTPUT_KEYS, index$6_AI_MODEL_TAGS as AI_MODEL_TAGS, index$6_AI_MODEL_TAG_LABELS as AI_MODEL_TAG_LABELS, type index$6_AiAudioOutput as AiAudioOutput, type index$6_AiAudioRequest as AiAudioRequest, type index$6_AiChatCompletionsRequest as AiChatCompletionsRequest, type index$6_AiChatModel as AiChatModel, type index$6_AiChatModelsResponse as AiChatModelsResponse, type index$6_AiChatSessionMetadata as AiChatSessionMetadata, index$6_AiClient as AiClient, type index$6_AiClientMetadata as AiClientMetadata, type index$6_AiFileUploadResponse as AiFileUploadResponse, type index$6_AiImageInputs as AiImageInputs, type index$6_AiImageOutput as AiImageOutput, type index$6_AiImageRequest as AiImageRequest, type index$6_AiMediaInput as AiMediaInput, type index$6_AiModel as AiModel, type index$6_AiModelCapabilities as AiModelCapabilities, type index$6_AiModelCapabilitiesInput as AiModelCapabilitiesInput, type index$6_AiModelCapabilitiesOutput as AiModelCapabilitiesOutput, type index$6_AiModelCapabilityInputKey as AiModelCapabilityInputKey, type index$6_AiModelCapabilityOutputKey as AiModelCapabilityOutputKey, type index$6_AiModelTag as AiModelTag, type index$6_AiModelsResponse as AiModelsResponse, type index$6_AiModelsUpdatedAtData as AiModelsUpdatedAtData, type index$6_AiModelsUpdatedAtResponse as AiModelsUpdatedAtResponse, type index$6_AiProviderTemplate as AiProviderTemplate, type index$6_AiProviderTemplateModel as AiProviderTemplateModel, type index$6_AiProviderTemplatesResponse as AiProviderTemplatesResponse, type index$6_AiResponsesRequest as AiResponsesRequest, type index$6_AiTaskCancelResponse as AiTaskCancelResponse, type index$6_AiTaskCreatedResponse as AiTaskCreatedResponse, type index$6_AiTaskResponse as AiTaskResponse, type index$6_AiVideoInputs as AiVideoInputs, type index$6_AiVideoOutput as AiVideoOutput, type index$6_AiVideoRequest as AiVideoRequest, index$6_aiAudioOutputSchema as aiAudioOutputSchema, index$6_aiAudioRequestSchema as aiAudioRequestSchema, index$6_aiChatCompletionsRequestSchema as aiChatCompletionsRequestSchema, index$6_aiChatModelSchema as aiChatModelSchema, index$6_aiChatModelsPayloadSchema as aiChatModelsPayloadSchema, index$6_aiChatModelsResponseSchema as aiChatModelsResponseSchema, index$6_aiChatModelsSuccessSchema as aiChatModelsSuccessSchema, index$6_aiChatSessionMetadataSchema as aiChatSessionMetadataSchema, index$6_aiClientMetadataSchema as aiClientMetadataSchema, index$6_aiEndpoints as aiEndpoints, index$6_aiErrorResponseSchema as aiErrorResponseSchema, index$6_aiImageInputsSchema as aiImageInputsSchema, index$6_aiImageOutputSchema as aiImageOutputSchema, index$6_aiImageRequestSchema as aiImageRequestSchema, index$6_aiMediaInputSchema as aiMediaInputSchema, index$6_aiModelCapabilitiesInputSchema as aiModelCapabilitiesInputSchema, index$6_aiModelCapabilitiesOutputSchema as aiModelCapabilitiesOutputSchema, index$6_aiModelCapabilitiesSchema as aiModelCapabilitiesSchema, index$6_aiModelCapabilityCommonSchema as aiModelCapabilityCommonSchema, index$6_aiModelParameterFieldSchema as aiModelParameterFieldSchema, index$6_aiModelParamsSchema as aiModelParamsSchema, index$6_aiModelSchema as aiModelSchema, index$6_aiModelsPayloadSchema as aiModelsPayloadSchema, index$6_aiModelsRequestSchema as aiModelsRequestSchema, index$6_aiModelsResponseSchema as aiModelsResponseSchema, index$6_aiModelsSuccessSchema as aiModelsSuccessSchema, index$6_aiModelsUpdatedAtDataSchema as aiModelsUpdatedAtDataSchema, index$6_aiModelsUpdatedAtResponseSchema as aiModelsUpdatedAtResponseSchema, index$6_aiModelsUpdatedAtSuccessSchema as aiModelsUpdatedAtSuccessSchema, index$6_aiProviderTemplateModelSchema as aiProviderTemplateModelSchema, index$6_aiProviderTemplateSchema as aiProviderTemplateSchema, index$6_aiProviderTemplatesPayloadSchema as aiProviderTemplatesPayloadSchema, index$6_aiProviderTemplatesRequestSchema as aiProviderTemplatesRequestSchema, index$6_aiProviderTemplatesResponseSchema as aiProviderTemplatesResponseSchema, index$6_aiProviderTemplatesSuccessSchema as aiProviderTemplatesSuccessSchema, index$6_aiResponsesRequestSchema as aiResponsesRequestSchema, index$6_aiTaskCancelDataSchema as aiTaskCancelDataSchema, index$6_aiTaskCancelRequestSchema as aiTaskCancelRequestSchema, index$6_aiTaskCancelResponseSchema as aiTaskCancelResponseSchema, index$6_aiTaskCancelSuccessSchema as aiTaskCancelSuccessSchema, index$6_aiTaskCreatedDataSchema as aiTaskCreatedDataSchema, index$6_aiTaskCreatedResponseSchema as aiTaskCreatedResponseSchema, index$6_aiTaskCreatedSuccessSchema as aiTaskCreatedSuccessSchema, index$6_aiTaskDataSchema as aiTaskDataSchema, index$6_aiTaskErrorSchema as aiTaskErrorSchema, index$6_aiTaskRequestSchema as aiTaskRequestSchema, index$6_aiTaskResponseSchema as aiTaskResponseSchema, index$6_aiTaskResultTypeSchema as aiTaskResultTypeSchema, index$6_aiTaskStatusSchema as aiTaskStatusSchema, index$6_aiTaskSuccessSchema as aiTaskSuccessSchema, index$6_aiVideoInputsSchema as aiVideoInputsSchema, index$6_aiVideoOutputSchema as aiVideoOutputSchema, index$6_aiVideoRequestSchema as aiVideoRequestSchema };
4333
+ export { index$6_AI_MODEL_CAPABILITY_INPUT_KEYS as AI_MODEL_CAPABILITY_INPUT_KEYS, index$6_AI_MODEL_CAPABILITY_OUTPUT_KEYS as AI_MODEL_CAPABILITY_OUTPUT_KEYS, index$6_AI_MODEL_TAGS as AI_MODEL_TAGS, index$6_AI_MODEL_TAG_LABELS as AI_MODEL_TAG_LABELS, type index$6_AiAudioOutput as AiAudioOutput, type index$6_AiAudioRequest as AiAudioRequest, type index$6_AiChatCompletionsRequest as AiChatCompletionsRequest, type index$6_AiChatModel as AiChatModel, type index$6_AiChatModelsResponse as AiChatModelsResponse, type index$6_AiChatSessionMetadata as AiChatSessionMetadata, index$6_AiClient as AiClient, type index$6_AiClientMetadata as AiClientMetadata, type index$6_AiFileUploadResponse as AiFileUploadResponse, type index$6_AiImageInputs as AiImageInputs, type index$6_AiImageOutput as AiImageOutput, type index$6_AiImageRequest as AiImageRequest, type index$6_AiMediaInput as AiMediaInput, type index$6_AiModel as AiModel, type index$6_AiModelCapabilities as AiModelCapabilities, type index$6_AiModelCapabilitiesInput as AiModelCapabilitiesInput, type index$6_AiModelCapabilitiesOutput as AiModelCapabilitiesOutput, type index$6_AiModelCapabilityInputKey as AiModelCapabilityInputKey, type index$6_AiModelCapabilityOutputKey as AiModelCapabilityOutputKey, type index$6_AiModelTag as AiModelTag, type index$6_AiModelsResponse as AiModelsResponse, type index$6_AiModelsUpdatedAtData as AiModelsUpdatedAtData, type index$6_AiModelsUpdatedAtResponse as AiModelsUpdatedAtResponse, type index$6_AiProviderTemplate as AiProviderTemplate, type index$6_AiProviderTemplateModel as AiProviderTemplateModel, type index$6_AiProviderTemplatesResponse as AiProviderTemplatesResponse, type index$6_AiResponsesRequest as AiResponsesRequest, type index$6_AiTaskCancelResponse as AiTaskCancelResponse, type index$6_AiTaskCreatedResponse as AiTaskCreatedResponse, type index$6_AiTaskResponse as AiTaskResponse, type index$6_AiVideoInputs as AiVideoInputs, type index$6_AiVideoOutput as AiVideoOutput, type index$6_AiVideoRequest as AiVideoRequest, type index$6_DigitalHumanRequest as DigitalHumanRequest, type index$6_ImageEditRequest as ImageEditRequest, type index$6_ImageGenerateRequest as ImageGenerateRequest, type index$6_MediaAspectRatio as MediaAspectRatio, type index$6_MediaFeature as MediaFeature, type index$6_MediaGenerateBase as MediaGenerateBase, type index$6_MediaGenerateRequest as MediaGenerateRequest, type index$6_MediaModelsQuery as MediaModelsQuery, type index$6_MediaQuality as MediaQuality, type index$6_MediaResolution as MediaResolution, type index$6_MediaTaskGroupData as MediaTaskGroupData, type index$6_MediaTaskGroupResponse as MediaTaskGroupResponse, type index$6_MediaTaskGroupSuccess as MediaTaskGroupSuccess, type index$6_MediaTaskItem as MediaTaskItem, type index$6_OutpaintRequest as OutpaintRequest, type index$6_PosterRequest as PosterRequest, type index$6_TtsRequest as TtsRequest, type index$6_UpscaleRequest as UpscaleRequest, type index$6_VideoGenerateRequest as VideoGenerateRequest, index$6_aiAudioOutputSchema as aiAudioOutputSchema, index$6_aiAudioRequestSchema as aiAudioRequestSchema, index$6_aiChatCompletionsRequestSchema as aiChatCompletionsRequestSchema, index$6_aiChatModelSchema as aiChatModelSchema, index$6_aiChatModelsPayloadSchema as aiChatModelsPayloadSchema, index$6_aiChatModelsResponseSchema as aiChatModelsResponseSchema, index$6_aiChatModelsSuccessSchema as aiChatModelsSuccessSchema, index$6_aiChatSessionMetadataSchema as aiChatSessionMetadataSchema, index$6_aiClientMetadataSchema as aiClientMetadataSchema, index$6_aiEndpoints as aiEndpoints, index$6_aiErrorResponseSchema as aiErrorResponseSchema, index$6_aiImageInputsSchema as aiImageInputsSchema, index$6_aiImageOutputSchema as aiImageOutputSchema, index$6_aiImageRequestSchema as aiImageRequestSchema, index$6_aiMediaInputSchema as aiMediaInputSchema, index$6_aiModelCapabilitiesInputSchema as aiModelCapabilitiesInputSchema, index$6_aiModelCapabilitiesOutputSchema as aiModelCapabilitiesOutputSchema, index$6_aiModelCapabilitiesSchema as aiModelCapabilitiesSchema, index$6_aiModelCapabilityCommonSchema as aiModelCapabilityCommonSchema, index$6_aiModelParameterFieldSchema as aiModelParameterFieldSchema, index$6_aiModelParamsSchema as aiModelParamsSchema, index$6_aiModelSchema as aiModelSchema, index$6_aiModelsPayloadSchema as aiModelsPayloadSchema, index$6_aiModelsRequestSchema as aiModelsRequestSchema, index$6_aiModelsResponseSchema as aiModelsResponseSchema, index$6_aiModelsSuccessSchema as aiModelsSuccessSchema, index$6_aiModelsUpdatedAtDataSchema as aiModelsUpdatedAtDataSchema, index$6_aiModelsUpdatedAtResponseSchema as aiModelsUpdatedAtResponseSchema, index$6_aiModelsUpdatedAtSuccessSchema as aiModelsUpdatedAtSuccessSchema, index$6_aiProviderTemplateModelSchema as aiProviderTemplateModelSchema, index$6_aiProviderTemplateSchema as aiProviderTemplateSchema, index$6_aiProviderTemplatesPayloadSchema as aiProviderTemplatesPayloadSchema, index$6_aiProviderTemplatesRequestSchema as aiProviderTemplatesRequestSchema, index$6_aiProviderTemplatesResponseSchema as aiProviderTemplatesResponseSchema, index$6_aiProviderTemplatesSuccessSchema as aiProviderTemplatesSuccessSchema, index$6_aiResponsesRequestSchema as aiResponsesRequestSchema, index$6_aiTaskCancelDataSchema as aiTaskCancelDataSchema, index$6_aiTaskCancelRequestSchema as aiTaskCancelRequestSchema, index$6_aiTaskCancelResponseSchema as aiTaskCancelResponseSchema, index$6_aiTaskCancelSuccessSchema as aiTaskCancelSuccessSchema, index$6_aiTaskCreatedDataSchema as aiTaskCreatedDataSchema, index$6_aiTaskCreatedResponseSchema as aiTaskCreatedResponseSchema, index$6_aiTaskCreatedSuccessSchema as aiTaskCreatedSuccessSchema, index$6_aiTaskDataSchema as aiTaskDataSchema, index$6_aiTaskErrorSchema as aiTaskErrorSchema, index$6_aiTaskRequestSchema as aiTaskRequestSchema, index$6_aiTaskResponseSchema as aiTaskResponseSchema, index$6_aiTaskResultTypeSchema as aiTaskResultTypeSchema, index$6_aiTaskStatusSchema as aiTaskStatusSchema, index$6_aiTaskSuccessSchema as aiTaskSuccessSchema, index$6_aiVideoInputsSchema as aiVideoInputsSchema, index$6_aiVideoOutputSchema as aiVideoOutputSchema, index$6_aiVideoRequestSchema as aiVideoRequestSchema, index$6_digitalHumanRequestSchema as digitalHumanRequestSchema, index$6_imageEditRequestSchema as imageEditRequestSchema, index$6_imageGenerateRequestSchema as imageGenerateRequestSchema, index$6_mediaAspectRatioSchema as mediaAspectRatioSchema, index$6_mediaFeatureSchema as mediaFeatureSchema, index$6_mediaGenerateBaseSchema as mediaGenerateBaseSchema, index$6_mediaGenerateRequestSchema as mediaGenerateRequestSchema, index$6_mediaModelsQuerySchema as mediaModelsQuerySchema, index$6_mediaQualitySchema as mediaQualitySchema, index$6_mediaResolutionSchema as mediaResolutionSchema, index$6_mediaTaskGroupDataSchema as mediaTaskGroupDataSchema, index$6_mediaTaskGroupResponseSchema as mediaTaskGroupResponseSchema, index$6_mediaTaskGroupSuccessSchema as mediaTaskGroupSuccessSchema, index$6_mediaTaskItemSchema as mediaTaskItemSchema, index$6_mediaTaskStatusSchema as mediaTaskStatusSchema, index$6_outpaintRequestSchema as outpaintRequestSchema, index$6_posterRequestSchema as posterRequestSchema, index$6_ttsRequestSchema as ttsRequestSchema, index$6_upscaleRequestSchema as upscaleRequestSchema, index$6_videoGenerateRequestSchema as videoGenerateRequestSchema };
2805
4334
  }
2806
4335
 
2807
4336
  declare const aiToolsEndpoints: {
@@ -3268,7 +4797,7 @@ declare namespace index$3 {
3268
4797
  declare const feedbackEndpoints: {
3269
4798
  /** Submit feedback. */
3270
4799
  readonly submit: Endpoint<{
3271
- type: "chat" | "ui" | "performance" | "bug" | "feature" | "other";
4800
+ type: "feature" | "chat" | "ui" | "performance" | "bug" | "other";
3272
4801
  content: string;
3273
4802
  context: Record<string, unknown>;
3274
4803
  source?: "tenas" | "openloaf" | "openloaf-saas" | undefined;
@@ -3280,7 +4809,7 @@ declare const feedbackEndpoints: {
3280
4809
  readonly list: Endpoint<{
3281
4810
  page?: number | undefined;
3282
4811
  pageSize?: number | undefined;
3283
- type?: "chat" | "ui" | "performance" | "bug" | "feature" | "other" | undefined;
4812
+ type?: "feature" | "chat" | "ui" | "performance" | "bug" | "other" | undefined;
3284
4813
  source?: "tenas" | "openloaf" | "openloaf-saas" | undefined;
3285
4814
  saasStatus?: "unread" | "read" | "resolved" | "ignored" | undefined;
3286
4815
  keyword?: string | undefined;
@@ -3292,7 +4821,7 @@ declare const feedbackEndpoints: {
3292
4821
  items: {
3293
4822
  id: string;
3294
4823
  source: "tenas" | "openloaf" | "openloaf-saas";
3295
- type: "chat" | "ui" | "performance" | "bug" | "feature" | "other";
4824
+ type: "feature" | "chat" | "ui" | "performance" | "bug" | "other";
3296
4825
  saasStatus: "unread" | "read" | "resolved" | "ignored";
3297
4826
  content: string;
3298
4827
  context: Record<string, unknown>;
@@ -3312,7 +4841,7 @@ declare const feedbackEndpoints: {
3312
4841
  feedback: {
3313
4842
  id: string;
3314
4843
  source: "tenas" | "openloaf" | "openloaf-saas";
3315
- type: "chat" | "ui" | "performance" | "bug" | "feature" | "other";
4844
+ type: "feature" | "chat" | "ui" | "performance" | "bug" | "other";
3316
4845
  saasStatus: "unread" | "read" | "resolved" | "ignored";
3317
4846
  content: string;
3318
4847
  context: Record<string, unknown>;
@@ -3332,11 +4861,11 @@ declare const feedbackSourceSchema: z.ZodEnum<{
3332
4861
  }>;
3333
4862
  /** Feedback category schema. */
3334
4863
  declare const feedbackTypeSchema: z.ZodEnum<{
4864
+ feature: "feature";
3335
4865
  chat: "chat";
3336
4866
  ui: "ui";
3337
4867
  performance: "performance";
3338
4868
  bug: "bug";
3339
- feature: "feature";
3340
4869
  other: "other";
3341
4870
  }>;
3342
4871
  /** Feedback SaaS status schema. */
@@ -3354,11 +4883,11 @@ declare const feedbackSubmitRequestSchema: z.ZodObject<{
3354
4883
  "openloaf-saas": "openloaf-saas";
3355
4884
  }>>;
3356
4885
  type: z.ZodEnum<{
4886
+ feature: "feature";
3357
4887
  chat: "chat";
3358
4888
  ui: "ui";
3359
4889
  performance: "performance";
3360
4890
  bug: "bug";
3361
- feature: "feature";
3362
4891
  other: "other";
3363
4892
  }>;
3364
4893
  content: z.ZodString;
@@ -3378,11 +4907,11 @@ declare const feedbackListRequestSchema: z.ZodObject<{
3378
4907
  page: z.ZodOptional<z.ZodNumber>;
3379
4908
  pageSize: z.ZodOptional<z.ZodNumber>;
3380
4909
  type: z.ZodOptional<z.ZodEnum<{
4910
+ feature: "feature";
3381
4911
  chat: "chat";
3382
4912
  ui: "ui";
3383
4913
  performance: "performance";
3384
4914
  bug: "bug";
3385
- feature: "feature";
3386
4915
  other: "other";
3387
4916
  }>>;
3388
4917
  source: z.ZodOptional<z.ZodEnum<{
@@ -3409,11 +4938,11 @@ declare const feedbackItemSchema: z.ZodObject<{
3409
4938
  "openloaf-saas": "openloaf-saas";
3410
4939
  }>;
3411
4940
  type: z.ZodEnum<{
4941
+ feature: "feature";
3412
4942
  chat: "chat";
3413
4943
  ui: "ui";
3414
4944
  performance: "performance";
3415
4945
  bug: "bug";
3416
- feature: "feature";
3417
4946
  other: "other";
3418
4947
  }>;
3419
4948
  saasStatus: z.ZodEnum<{
@@ -3439,11 +4968,11 @@ declare const feedbackListPayloadSchema: z.ZodObject<{
3439
4968
  "openloaf-saas": "openloaf-saas";
3440
4969
  }>;
3441
4970
  type: z.ZodEnum<{
4971
+ feature: "feature";
3442
4972
  chat: "chat";
3443
4973
  ui: "ui";
3444
4974
  performance: "performance";
3445
4975
  bug: "bug";
3446
- feature: "feature";
3447
4976
  other: "other";
3448
4977
  }>;
3449
4978
  saasStatus: z.ZodEnum<{
@@ -3473,11 +5002,11 @@ declare const feedbackListResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3473
5002
  "openloaf-saas": "openloaf-saas";
3474
5003
  }>;
3475
5004
  type: z.ZodEnum<{
5005
+ feature: "feature";
3476
5006
  chat: "chat";
3477
5007
  ui: "ui";
3478
5008
  performance: "performance";
3479
5009
  bug: "bug";
3480
- feature: "feature";
3481
5010
  other: "other";
3482
5011
  }>;
3483
5012
  saasStatus: z.ZodEnum<{
@@ -3511,11 +5040,11 @@ declare const feedbackDetailPayloadSchema: z.ZodObject<{
3511
5040
  "openloaf-saas": "openloaf-saas";
3512
5041
  }>;
3513
5042
  type: z.ZodEnum<{
5043
+ feature: "feature";
3514
5044
  chat: "chat";
3515
5045
  ui: "ui";
3516
5046
  performance: "performance";
3517
5047
  bug: "bug";
3518
- feature: "feature";
3519
5048
  other: "other";
3520
5049
  }>;
3521
5050
  saasStatus: z.ZodEnum<{
@@ -3542,11 +5071,11 @@ declare const feedbackDetailResponseSchema: z.ZodUnion<readonly [z.ZodObject<{
3542
5071
  "openloaf-saas": "openloaf-saas";
3543
5072
  }>;
3544
5073
  type: z.ZodEnum<{
5074
+ feature: "feature";
3545
5075
  chat: "chat";
3546
5076
  ui: "ui";
3547
5077
  performance: "performance";
3548
5078
  bug: "bug";
3549
- feature: "feature";
3550
5079
  other: "other";
3551
5080
  }>;
3552
5081
  saasStatus: z.ZodEnum<{
@@ -4062,7 +5591,7 @@ declare const userEndpoints: {
4062
5591
  user: {
4063
5592
  id: string;
4064
5593
  provider: string;
4065
- membershipLevel: "free" | "vip" | "svip" | "infinity";
5594
+ membershipLevel: "free" | "lite" | "pro" | "premium" | "infinity";
4066
5595
  creditsBalance: number;
4067
5596
  createdAt: string;
4068
5597
  updatedAt: string;
@@ -4086,7 +5615,7 @@ declare class UserClient {
4086
5615
  user: {
4087
5616
  id: string;
4088
5617
  provider: string;
4089
- membershipLevel: "free" | "vip" | "svip" | "infinity";
5618
+ membershipLevel: "free" | "lite" | "pro" | "premium" | "infinity";
4090
5619
  creditsBalance: number;
4091
5620
  createdAt: string;
4092
5621
  updatedAt: string;
@@ -4100,8 +5629,9 @@ declare class UserClient {
4100
5629
  /** Membership level enum schema. */
4101
5630
  declare const userMembershipLevelSchema: z.ZodEnum<{
4102
5631
  free: "free";
4103
- vip: "vip";
4104
- svip: "svip";
5632
+ lite: "lite";
5633
+ pro: "pro";
5634
+ premium: "premium";
4105
5635
  infinity: "infinity";
4106
5636
  }>;
4107
5637
  /** Current user payload schema. */
@@ -4113,8 +5643,9 @@ declare const userSelfSchema: z.ZodObject<{
4113
5643
  provider: z.ZodString;
4114
5644
  membershipLevel: z.ZodEnum<{
4115
5645
  free: "free";
4116
- vip: "vip";
4117
- svip: "svip";
5646
+ lite: "lite";
5647
+ pro: "pro";
5648
+ premium: "premium";
4118
5649
  infinity: "infinity";
4119
5650
  }>;
4120
5651
  creditsBalance: z.ZodNumber;
@@ -4133,8 +5664,9 @@ declare const userSelfResponseSchema: z.ZodObject<{
4133
5664
  provider: z.ZodString;
4134
5665
  membershipLevel: z.ZodEnum<{
4135
5666
  free: "free";
4136
- vip: "vip";
4137
- svip: "svip";
5667
+ lite: "lite";
5668
+ pro: "pro";
5669
+ premium: "premium";
4138
5670
  infinity: "infinity";
4139
5671
  }>;
4140
5672
  creditsBalance: z.ZodNumber;
@@ -4229,4 +5761,4 @@ declare function createTrpcClient(options: TrpcClientOptions): _trpc_client.TRPC
4229
5761
  transformer: false;
4230
5762
  }, _trpc_server.TRPCDecorateCreateRouterOptions<_trpc_server.TRPCCreateRouterOptions>>>;
4231
5763
 
4232
- export { AI_MODEL_CAPABILITY_INPUT_KEYS, AI_MODEL_CAPABILITY_OUTPUT_KEYS, AI_MODEL_TAGS, AI_MODEL_TAG_LABELS, type AiAudioOutput, type AiAudioRequest, type AiChatCompletionsRequest, type AiChatModel, type AiChatModelsResponse, type AiChatSessionMetadata, AiClient, type AiClientMetadata, type AiFileUploadResponse, type AiImageInputs, type AiImageOutput, type AiImageRequest, type AiMediaInput, type AiModel, type AiModelCapabilities, type AiModelCapabilitiesInput, type AiModelCapabilitiesOutput, type AiModelCapabilityInputKey, type AiModelCapabilityOutputKey, type AiModelTag, type AiModelsResponse, type AiModelsUpdatedAtData, type AiModelsUpdatedAtResponse, type AiProviderTemplate, type AiProviderTemplateModel, type AiProviderTemplatesResponse, type AiResponsesRequest, type AiTaskCancelResponse, type AiTaskCreatedResponse, type AiTaskResponse, AiToolsClient, type AiVideoInputs, type AiVideoOutput, type AiVideoRequest, type AnalyzeSkillsRequest, type AnalyzeSkillsResponse, AuthClient, type AuthExchangeRequest, type AuthExchangeResponse, type AuthLogoutRequest, type AuthLogoutResponse, type AuthRefreshError, type AuthRefreshRequest, type AuthRefreshResponse, type AuthRefreshSuccess, AuxiliaryClient, type AuxiliaryInferRequest, type AuxiliaryInferResponse, type AuxiliaryQuota, type AuxiliaryQuotaResponse, Endpoint, type FeedbackAttachmentResponse, FeedbackClient, type FeedbackDetailPayload, type FeedbackDetailRequest, type FeedbackDetailResponse, type FeedbackListPayload, type FeedbackListRequest, type FeedbackListResponse, type FeedbackSaasStatus, type FeedbackSource, type FeedbackSubmitError, type FeedbackSubmitRequest, type FeedbackSubmitResponse, type FeedbackType, type HeaderInput, type HttpMethod, type RecommendActionsRequest, type RecommendActionsResponse, type ResponseType, SaaSClient, type SaaSClientOptions, SaaSContract, SaaSHttpError, SaaSNetworkError, SaaSSchemaError, type SkillArchiveFormat, type SkillListItem, type SkillOwnerSummary, type SkillSource, type SkillStatus, type SkillType, type SkillVersionSummary, type SkillVisibility, SkillsClient, type SkillsDetailResponse, type SkillsDownloadResponse, type SkillsListRequest, type SkillsListResponse, type SummarizeRequest, type SummarizeResponse, type TrpcClientOptions, UserClient, type UserMembershipLevel, type UserSelf, type UserSelfRequest, type UserSelfResponse, aiAudioOutputSchema, aiAudioRequestSchema, aiChatCompletionsRequestSchema, aiChatModelSchema, aiChatModelsPayloadSchema, aiChatModelsResponseSchema, aiChatModelsSuccessSchema, aiChatSessionMetadataSchema, aiClientMetadataSchema, aiEndpoints, aiErrorResponseSchema, aiImageInputsSchema, aiImageOutputSchema, aiImageRequestSchema, aiMediaInputSchema, aiModelCapabilitiesInputSchema, aiModelCapabilitiesOutputSchema, aiModelCapabilitiesSchema, aiModelCapabilityCommonSchema, aiModelParameterFieldSchema, aiModelParamsSchema, aiModelSchema, aiModelsPayloadSchema, aiModelsRequestSchema, aiModelsResponseSchema, aiModelsSuccessSchema, aiModelsUpdatedAtDataSchema, aiModelsUpdatedAtResponseSchema, aiModelsUpdatedAtSuccessSchema, index$6 as aiModule, aiProviderTemplateModelSchema, aiProviderTemplateSchema, aiProviderTemplatesPayloadSchema, aiProviderTemplatesRequestSchema, aiProviderTemplatesResponseSchema, aiProviderTemplatesSuccessSchema, aiResponsesRequestSchema, aiTaskCancelDataSchema, aiTaskCancelRequestSchema, aiTaskCancelResponseSchema, aiTaskCancelSuccessSchema, aiTaskCreatedDataSchema, aiTaskCreatedResponseSchema, aiTaskCreatedSuccessSchema, aiTaskDataSchema, aiTaskErrorSchema, aiTaskRequestSchema, aiTaskResponseSchema, aiTaskResultTypeSchema, aiTaskStatusSchema, aiTaskSuccessSchema, aiToolsEndpoints, index$5 as aiToolsModule, aiVideoInputsSchema, aiVideoOutputSchema, aiVideoRequestSchema, analyzeSkillsRequestSchema, analyzeSkillsResponseSchema, authEndpoints, authExchangeRequestSchema, authExchangeResponseSchema, authLogoutRequestSchema, authLogoutResponseSchema, index$4 as authModule, authRefreshErrorSchema, authRefreshRequestSchema, authRefreshResponseSchema, authRefreshSuccessSchema, authRefreshUserSchema, auxiliaryEndpoints, auxiliaryInferRequestSchema, auxiliaryInferResponseSchema, index$3 as auxiliaryModule, auxiliaryQuotaResponseSchema, contract, createTrpcClient, feedbackDetailPayloadSchema, feedbackDetailRequestSchema, feedbackDetailResponseSchema, feedbackEndpoints, feedbackItemSchema, feedbackListPayloadSchema, feedbackListRequestSchema, feedbackListResponseSchema, index$2 as feedbackModule, feedbackSaasStatusSchema, feedbackSourceSchema, feedbackSubmitErrorSchema, feedbackSubmitRequestSchema, feedbackSubmitResponseSchema, feedbackTypeSchema, mergeHeaders, normalizeHeaders, recommendActionsRequestSchema, recommendActionsResponseSchema, request, skillArchiveFormatSchema, skillListItemSchema, skillOwnerSummarySchema, skillSourceSchema, skillStatusSchema, skillTypeSchema, skillVersionSummarySchema, skillVisibilitySchema, skillsDetailRequestSchema, skillsDetailResponseSchema, skillsDownloadResponseSchema, skillsEndpoints, skillsListRequestSchema, skillsListResponseSchema, index$1 as skillsModule, summarizeRequestSchema, summarizeResponseSchema, userEndpoints, userMembershipLevelSchema, index as userModule, userSelfRequestSchema, userSelfResponseSchema, userSelfSchema };
5764
+ export { AI_MODEL_CAPABILITY_INPUT_KEYS, AI_MODEL_CAPABILITY_OUTPUT_KEYS, AI_MODEL_TAGS, AI_MODEL_TAG_LABELS, type AiAudioOutput, type AiAudioRequest, type AiChatCompletionsRequest, type AiChatModel, type AiChatModelsResponse, type AiChatSessionMetadata, AiClient, type AiClientMetadata, type AiFileUploadResponse, type AiImageInputs, type AiImageOutput, type AiImageRequest, type AiMediaInput, type AiModel, type AiModelCapabilities, type AiModelCapabilitiesInput, type AiModelCapabilitiesOutput, type AiModelCapabilityInputKey, type AiModelCapabilityOutputKey, type AiModelTag, type AiModelsResponse, type AiModelsUpdatedAtData, type AiModelsUpdatedAtResponse, type AiProviderTemplate, type AiProviderTemplateModel, type AiProviderTemplatesResponse, type AiResponsesRequest, type AiTaskCancelResponse, type AiTaskCreatedResponse, type AiTaskResponse, AiToolsClient, type AiVideoInputs, type AiVideoOutput, type AiVideoRequest, type AnalyzeSkillsRequest, type AnalyzeSkillsResponse, AuthClient, type AuthExchangeRequest, type AuthExchangeResponse, type AuthLogoutRequest, type AuthLogoutResponse, type AuthRefreshError, type AuthRefreshRequest, type AuthRefreshResponse, type AuthRefreshSuccess, AuxiliaryClient, type AuxiliaryInferRequest, type AuxiliaryInferResponse, type AuxiliaryQuota, type AuxiliaryQuotaResponse, type DigitalHumanRequest, Endpoint, type FeedbackAttachmentResponse, FeedbackClient, type FeedbackDetailPayload, type FeedbackDetailRequest, type FeedbackDetailResponse, type FeedbackListPayload, type FeedbackListRequest, type FeedbackListResponse, type FeedbackSaasStatus, type FeedbackSource, type FeedbackSubmitError, type FeedbackSubmitRequest, type FeedbackSubmitResponse, type FeedbackType, type HeaderInput, type HttpMethod, type ImageEditRequest, type ImageGenerateRequest, type MediaAspectRatio, type MediaFeature, type MediaGenerateBase, type MediaGenerateRequest, type MediaModelsQuery, type MediaQuality, type MediaResolution, type MediaTaskGroupData, type MediaTaskGroupResponse, type MediaTaskGroupSuccess, type MediaTaskItem, type OutpaintRequest, type PosterRequest, type RecommendActionsRequest, type RecommendActionsResponse, type ResponseType, SaaSClient, type SaaSClientOptions, SaaSContract, SaaSHttpError, SaaSNetworkError, SaaSSchemaError, type SkillArchiveFormat, type SkillListItem, type SkillOwnerSummary, type SkillSource, type SkillStatus, type SkillType, type SkillVersionSummary, type SkillVisibility, SkillsClient, type SkillsDetailResponse, type SkillsDownloadResponse, type SkillsListRequest, type SkillsListResponse, type SummarizeRequest, type SummarizeResponse, type TrpcClientOptions, type TtsRequest, type UpscaleRequest, UserClient, type UserMembershipLevel, type UserSelf, type UserSelfRequest, type UserSelfResponse, type VideoGenerateRequest, aiAudioOutputSchema, aiAudioRequestSchema, aiChatCompletionsRequestSchema, aiChatModelSchema, aiChatModelsPayloadSchema, aiChatModelsResponseSchema, aiChatModelsSuccessSchema, aiChatSessionMetadataSchema, aiClientMetadataSchema, aiEndpoints, aiErrorResponseSchema, aiImageInputsSchema, aiImageOutputSchema, aiImageRequestSchema, aiMediaInputSchema, aiModelCapabilitiesInputSchema, aiModelCapabilitiesOutputSchema, aiModelCapabilitiesSchema, aiModelCapabilityCommonSchema, aiModelParameterFieldSchema, aiModelParamsSchema, aiModelSchema, aiModelsPayloadSchema, aiModelsRequestSchema, aiModelsResponseSchema, aiModelsSuccessSchema, aiModelsUpdatedAtDataSchema, aiModelsUpdatedAtResponseSchema, aiModelsUpdatedAtSuccessSchema, index$6 as aiModule, aiProviderTemplateModelSchema, aiProviderTemplateSchema, aiProviderTemplatesPayloadSchema, aiProviderTemplatesRequestSchema, aiProviderTemplatesResponseSchema, aiProviderTemplatesSuccessSchema, aiResponsesRequestSchema, aiTaskCancelDataSchema, aiTaskCancelRequestSchema, aiTaskCancelResponseSchema, aiTaskCancelSuccessSchema, aiTaskCreatedDataSchema, aiTaskCreatedResponseSchema, aiTaskCreatedSuccessSchema, aiTaskDataSchema, aiTaskErrorSchema, aiTaskRequestSchema, aiTaskResponseSchema, aiTaskResultTypeSchema, aiTaskStatusSchema, aiTaskSuccessSchema, aiToolsEndpoints, index$5 as aiToolsModule, aiVideoInputsSchema, aiVideoOutputSchema, aiVideoRequestSchema, analyzeSkillsRequestSchema, analyzeSkillsResponseSchema, authEndpoints, authExchangeRequestSchema, authExchangeResponseSchema, authLogoutRequestSchema, authLogoutResponseSchema, index$4 as authModule, authRefreshErrorSchema, authRefreshRequestSchema, authRefreshResponseSchema, authRefreshSuccessSchema, authRefreshUserSchema, auxiliaryEndpoints, auxiliaryInferRequestSchema, auxiliaryInferResponseSchema, index$3 as auxiliaryModule, auxiliaryQuotaResponseSchema, contract, createTrpcClient, digitalHumanRequestSchema, feedbackDetailPayloadSchema, feedbackDetailRequestSchema, feedbackDetailResponseSchema, feedbackEndpoints, feedbackItemSchema, feedbackListPayloadSchema, feedbackListRequestSchema, feedbackListResponseSchema, index$2 as feedbackModule, feedbackSaasStatusSchema, feedbackSourceSchema, feedbackSubmitErrorSchema, feedbackSubmitRequestSchema, feedbackSubmitResponseSchema, feedbackTypeSchema, imageEditRequestSchema, imageGenerateRequestSchema, mediaAspectRatioSchema, mediaFeatureSchema, mediaGenerateBaseSchema, mediaGenerateRequestSchema, mediaModelsQuerySchema, mediaQualitySchema, mediaResolutionSchema, mediaTaskGroupDataSchema, mediaTaskGroupResponseSchema, mediaTaskGroupSuccessSchema, mediaTaskItemSchema, mediaTaskStatusSchema, mergeHeaders, normalizeHeaders, outpaintRequestSchema, posterRequestSchema, recommendActionsRequestSchema, recommendActionsResponseSchema, request, skillArchiveFormatSchema, skillListItemSchema, skillOwnerSummarySchema, skillSourceSchema, skillStatusSchema, skillTypeSchema, skillVersionSummarySchema, skillVisibilitySchema, skillsDetailRequestSchema, skillsDetailResponseSchema, skillsDownloadResponseSchema, skillsEndpoints, skillsListRequestSchema, skillsListResponseSchema, index$1 as skillsModule, summarizeRequestSchema, summarizeResponseSchema, ttsRequestSchema, upscaleRequestSchema, userEndpoints, userMembershipLevelSchema, index as userModule, userSelfRequestSchema, userSelfResponseSchema, userSelfSchema, videoGenerateRequestSchema };