@byte_fluffy/nexra-sdk 0.1.0-alpha.11 → 0.1.0-alpha.13

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.
package/dist/catalog.js CHANGED
@@ -6,7 +6,7 @@ import {
6
6
  getModelSpec,
7
7
  listModelSpecs,
8
8
  projectMediaGeometry
9
- } from "./chunk-MSPJPDVY.js";
9
+ } from "./chunk-JQ3P2VAK.js";
10
10
  export {
11
11
  CatalogClient,
12
12
  applyMediaGeometry,
@@ -19878,8 +19878,9 @@ var video_generated_default = [
19878
19878
  }
19879
19879
  ]
19880
19880
  },
19881
- description: "Audio inputs; assign a role when the model exposes role-specific behavior.",
19881
+ description: "Audio references; each audio must accompany at least one reference image or video.",
19882
19882
  minItems: 1,
19883
+ maxItems: 3,
19883
19884
  "x-ui": {
19884
19885
  order: 3,
19885
19886
  control: "media",
@@ -19946,6 +19947,7 @@ var video_generated_default = [
19946
19947
  },
19947
19948
  description: "Image inputs; assign a role when the model exposes role-specific behavior.",
19948
19949
  minItems: 1,
19950
+ maxItems: 9,
19949
19951
  "x-ui": {
19950
19952
  order: 1,
19951
19953
  control: "media",
@@ -20055,6 +20057,7 @@ var video_generated_default = [
20055
20057
  },
20056
20058
  description: "Video inputs; assign a role when the model exposes role-specific behavior.",
20057
20059
  minItems: 1,
20060
+ maxItems: 3,
20058
20061
  "x-ui": {
20059
20062
  order: 2,
20060
20063
  control: "media",
@@ -20287,6 +20290,27 @@ var video_generated_default = [
20287
20290
  }
20288
20291
  }
20289
20292
  },
20293
+ {
20294
+ if: {
20295
+ required: [
20296
+ "audios"
20297
+ ]
20298
+ },
20299
+ then: {
20300
+ anyOf: [
20301
+ {
20302
+ required: [
20303
+ "images"
20304
+ ]
20305
+ },
20306
+ {
20307
+ required: [
20308
+ "videos"
20309
+ ]
20310
+ }
20311
+ ]
20312
+ }
20313
+ },
20290
20314
  {
20291
20315
  if: {
20292
20316
  anyOf: [
@@ -20679,6 +20703,41 @@ var video_generated_default = [
20679
20703
  }
20680
20704
  ],
20681
20705
  allOf: [
20706
+ {
20707
+ if: {
20708
+ required: [
20709
+ "images"
20710
+ ],
20711
+ properties: {
20712
+ images: {
20713
+ type: "array",
20714
+ contains: {
20715
+ anyOf: [
20716
+ {
20717
+ type: "string"
20718
+ },
20719
+ {
20720
+ type: "object",
20721
+ not: {
20722
+ required: [
20723
+ "role"
20724
+ ]
20725
+ }
20726
+ }
20727
+ ]
20728
+ }
20729
+ }
20730
+ }
20731
+ },
20732
+ then: {
20733
+ properties: {
20734
+ images: {
20735
+ type: "array",
20736
+ maxItems: 1
20737
+ }
20738
+ }
20739
+ }
20740
+ },
20682
20741
  {
20683
20742
  if: {
20684
20743
  required: [
@@ -21079,6 +21138,41 @@ var video_generated_default = [
21079
21138
  }
21080
21139
  ],
21081
21140
  allOf: [
21141
+ {
21142
+ if: {
21143
+ required: [
21144
+ "images"
21145
+ ],
21146
+ properties: {
21147
+ images: {
21148
+ type: "array",
21149
+ contains: {
21150
+ anyOf: [
21151
+ {
21152
+ type: "string"
21153
+ },
21154
+ {
21155
+ type: "object",
21156
+ not: {
21157
+ required: [
21158
+ "role"
21159
+ ]
21160
+ }
21161
+ }
21162
+ ]
21163
+ }
21164
+ }
21165
+ }
21166
+ },
21167
+ then: {
21168
+ properties: {
21169
+ images: {
21170
+ type: "array",
21171
+ maxItems: 1
21172
+ }
21173
+ }
21174
+ }
21175
+ },
21082
21176
  {
21083
21177
  description: "\u4F7F\u7528\u53C2\u8003\u56FE\u65F6\u5FC5\u987B\u586B\u5199\u63D0\u793A\u8BCD\uFF0C\u56FE\u7247\u6307\u5B9A\u7528\u9014\u65F6\u53EA\u80FD\u9009\u62E9\u53C2\u8003\u56FE\u3002",
21084
21178
  if: {
@@ -21641,6 +21735,169 @@ var video_generated_default = [
21641
21735
  }
21642
21736
  ],
21643
21737
  allOf: [
21738
+ {
21739
+ not: {
21740
+ anyOf: [
21741
+ {
21742
+ required: [
21743
+ "images"
21744
+ ],
21745
+ properties: {
21746
+ images: {
21747
+ type: "array",
21748
+ contains: {
21749
+ type: "object",
21750
+ required: [
21751
+ "role"
21752
+ ],
21753
+ properties: {
21754
+ role: {
21755
+ const: "reference_image"
21756
+ }
21757
+ }
21758
+ },
21759
+ minContains: 6
21760
+ }
21761
+ }
21762
+ },
21763
+ {
21764
+ required: [
21765
+ "images",
21766
+ "videos"
21767
+ ],
21768
+ properties: {
21769
+ images: {
21770
+ type: "array",
21771
+ contains: {
21772
+ type: "object",
21773
+ required: [
21774
+ "role"
21775
+ ],
21776
+ properties: {
21777
+ role: {
21778
+ const: "reference_image"
21779
+ }
21780
+ }
21781
+ },
21782
+ minContains: 1
21783
+ },
21784
+ videos: {
21785
+ type: "array",
21786
+ minItems: 5
21787
+ }
21788
+ }
21789
+ },
21790
+ {
21791
+ required: [
21792
+ "images",
21793
+ "videos"
21794
+ ],
21795
+ properties: {
21796
+ images: {
21797
+ type: "array",
21798
+ contains: {
21799
+ type: "object",
21800
+ required: [
21801
+ "role"
21802
+ ],
21803
+ properties: {
21804
+ role: {
21805
+ const: "reference_image"
21806
+ }
21807
+ }
21808
+ },
21809
+ minContains: 2
21810
+ },
21811
+ videos: {
21812
+ type: "array",
21813
+ minItems: 4
21814
+ }
21815
+ }
21816
+ },
21817
+ {
21818
+ required: [
21819
+ "images",
21820
+ "videos"
21821
+ ],
21822
+ properties: {
21823
+ images: {
21824
+ type: "array",
21825
+ contains: {
21826
+ type: "object",
21827
+ required: [
21828
+ "role"
21829
+ ],
21830
+ properties: {
21831
+ role: {
21832
+ const: "reference_image"
21833
+ }
21834
+ }
21835
+ },
21836
+ minContains: 3
21837
+ },
21838
+ videos: {
21839
+ type: "array",
21840
+ minItems: 3
21841
+ }
21842
+ }
21843
+ },
21844
+ {
21845
+ required: [
21846
+ "images",
21847
+ "videos"
21848
+ ],
21849
+ properties: {
21850
+ images: {
21851
+ type: "array",
21852
+ contains: {
21853
+ type: "object",
21854
+ required: [
21855
+ "role"
21856
+ ],
21857
+ properties: {
21858
+ role: {
21859
+ const: "reference_image"
21860
+ }
21861
+ }
21862
+ },
21863
+ minContains: 4
21864
+ },
21865
+ videos: {
21866
+ type: "array",
21867
+ minItems: 2
21868
+ }
21869
+ }
21870
+ },
21871
+ {
21872
+ required: [
21873
+ "images",
21874
+ "videos"
21875
+ ],
21876
+ properties: {
21877
+ images: {
21878
+ type: "array",
21879
+ contains: {
21880
+ type: "object",
21881
+ required: [
21882
+ "role"
21883
+ ],
21884
+ properties: {
21885
+ role: {
21886
+ const: "reference_image"
21887
+ }
21888
+ }
21889
+ },
21890
+ minContains: 5
21891
+ },
21892
+ videos: {
21893
+ type: "array",
21894
+ minItems: 1
21895
+ }
21896
+ }
21897
+ }
21898
+ ]
21899
+ }
21900
+ },
21644
21901
  {
21645
21902
  properties: {
21646
21903
  images: {
@@ -27502,9 +27759,7 @@ var video_generated_default = [
27502
27759
  ],
27503
27760
  capabilities: {
27504
27761
  inputModalities: [
27505
- "text",
27506
- "image",
27507
- "video"
27762
+ "text"
27508
27763
  ],
27509
27764
  outputModalities: [
27510
27765
  "video"
@@ -27518,9 +27773,7 @@ var video_generated_default = [
27518
27773
  {
27519
27774
  operation: "video.generate",
27520
27775
  inputModalities: [
27521
- "text",
27522
- "image",
27523
- "video"
27776
+ "text"
27524
27777
  ],
27525
27778
  outputModalities: [
27526
27779
  "video"
@@ -28697,7 +28950,7 @@ var video_generated_default = [
28697
28950
  order: 6,
28698
28951
  control: "segmented"
28699
28952
  },
28700
- default: "medium"
28953
+ default: "low"
28701
28954
  },
28702
28955
  images: {
28703
28956
  type: "array",
@@ -29517,6 +29770,15 @@ var video_generated_default = [
29517
29770
  },
29518
29771
  default: 5
29519
29772
  },
29773
+ with_audio: {
29774
+ type: "boolean",
29775
+ description: "Generate synchronized audio with the video.",
29776
+ default: false,
29777
+ "x-ui": {
29778
+ order: 6,
29779
+ control: "toggle"
29780
+ }
29781
+ },
29520
29782
  images: {
29521
29783
  type: "array",
29522
29784
  items: {
@@ -29646,20 +29908,55 @@ var video_generated_default = [
29646
29908
  ],
29647
29909
  allOf: [
29648
29910
  {
29649
- properties: {
29650
- images: {
29651
- type: "array",
29652
- allOf: [
29653
- {
29654
- contains: {
29655
- type: "object",
29656
- required: [
29657
- "role"
29658
- ],
29659
- properties: {
29660
- role: {
29661
- const: "first_frame"
29662
- }
29911
+ if: {
29912
+ required: [
29913
+ "images"
29914
+ ],
29915
+ properties: {
29916
+ images: {
29917
+ type: "array",
29918
+ contains: {
29919
+ anyOf: [
29920
+ {
29921
+ type: "string"
29922
+ },
29923
+ {
29924
+ type: "object",
29925
+ not: {
29926
+ required: [
29927
+ "role"
29928
+ ]
29929
+ }
29930
+ }
29931
+ ]
29932
+ }
29933
+ }
29934
+ }
29935
+ },
29936
+ then: {
29937
+ properties: {
29938
+ images: {
29939
+ type: "array",
29940
+ maxItems: 1
29941
+ }
29942
+ }
29943
+ }
29944
+ },
29945
+ {
29946
+ properties: {
29947
+ images: {
29948
+ type: "array",
29949
+ allOf: [
29950
+ {
29951
+ contains: {
29952
+ type: "object",
29953
+ required: [
29954
+ "role"
29955
+ ],
29956
+ properties: {
29957
+ role: {
29958
+ const: "first_frame"
29959
+ }
29663
29960
  }
29664
29961
  },
29665
29962
  minContains: 0,
@@ -30282,7 +30579,7 @@ var video_generated_default = [
30282
30579
  }
30283
30580
  ]
30284
30581
  },
30285
- description: "Audio inputs; assign a role when the model exposes role-specific behavior.",
30582
+ description: "Audio references; each audio must accompany at least one reference image or video.",
30286
30583
  minItems: 1,
30287
30584
  maxItems: 3,
30288
30585
  "x-ui": {
@@ -30383,7 +30680,7 @@ var video_generated_default = [
30383
30680
  },
30384
30681
  ratio: {
30385
30682
  type: "string",
30386
- description: "Requested output aspect ratio.",
30683
+ description: "Text-to-video defaults to 16:9; frame input always uses adaptive; reference input defaults to adaptive unless a concrete ratio is supplied.",
30387
30684
  enum: [
30388
30685
  "adaptive",
30389
30686
  "21:9",
@@ -30405,8 +30702,7 @@ var video_generated_default = [
30405
30702
  "3:4": "3:4",
30406
30703
  "9:16": "9:16"
30407
30704
  }
30408
- },
30409
- default: "16:9"
30705
+ }
30410
30706
  },
30411
30707
  resolution: {
30412
30708
  type: "string",
@@ -30721,6 +31017,27 @@ var video_generated_default = [
30721
31017
  }
30722
31018
  }
30723
31019
  },
31020
+ {
31021
+ if: {
31022
+ required: [
31023
+ "audios"
31024
+ ]
31025
+ },
31026
+ then: {
31027
+ anyOf: [
31028
+ {
31029
+ required: [
31030
+ "images"
31031
+ ]
31032
+ },
31033
+ {
31034
+ required: [
31035
+ "videos"
31036
+ ]
31037
+ }
31038
+ ]
31039
+ }
31040
+ },
30724
31041
  {
30725
31042
  if: {
30726
31043
  anyOf: [
@@ -30792,47 +31109,6 @@ var video_generated_default = [
30792
31109
  }
30793
31110
  }
30794
31111
  },
30795
- {
30796
- if: {
30797
- required: [
30798
- "images"
30799
- ],
30800
- properties: {
30801
- images: {
30802
- type: "array",
30803
- contains: {
30804
- type: "object",
30805
- required: [
30806
- "role"
30807
- ],
30808
- properties: {
30809
- role: {
30810
- const: "last_frame"
30811
- }
30812
- }
30813
- }
30814
- }
30815
- }
30816
- },
30817
- then: {
30818
- properties: {
30819
- images: {
30820
- type: "array",
30821
- contains: {
30822
- type: "object",
30823
- required: [
30824
- "role"
30825
- ],
30826
- properties: {
30827
- role: {
30828
- const: "first_frame"
30829
- }
30830
- }
30831
- }
30832
- }
30833
- }
30834
- }
30835
- },
30836
31112
  {
30837
31113
  if: {
30838
31114
  required: [
@@ -31509,6 +31785,13 @@ var video_generated_default = [
31509
31785
  "texts"
31510
31786
  ],
31511
31787
  properties: {
31788
+ resolution: {
31789
+ type: "string",
31790
+ enum: [
31791
+ "720p",
31792
+ "1080p"
31793
+ ]
31794
+ },
31512
31795
  images: {
31513
31796
  type: "array",
31514
31797
  items: {
@@ -31535,7 +31818,57 @@ var video_generated_default = [
31535
31818
  properties: {
31536
31819
  images: {
31537
31820
  type: "array",
31538
- maxItems: 2
31821
+ maxItems: 2,
31822
+ allOf: [
31823
+ {
31824
+ contains: {
31825
+ type: "object",
31826
+ required: [
31827
+ "role"
31828
+ ],
31829
+ properties: {
31830
+ role: {
31831
+ const: "first_frame"
31832
+ }
31833
+ }
31834
+ },
31835
+ minContains: 0,
31836
+ maxContains: 1
31837
+ },
31838
+ {
31839
+ contains: {
31840
+ type: "object",
31841
+ required: [
31842
+ "role"
31843
+ ],
31844
+ properties: {
31845
+ role: {
31846
+ const: "last_frame"
31847
+ }
31848
+ }
31849
+ },
31850
+ minContains: 0,
31851
+ maxContains: 1
31852
+ },
31853
+ {
31854
+ if: {
31855
+ contains: {
31856
+ type: "object",
31857
+ required: [
31858
+ "role"
31859
+ ],
31860
+ properties: {
31861
+ role: {
31862
+ const: "last_frame"
31863
+ }
31864
+ }
31865
+ }
31866
+ },
31867
+ then: {
31868
+ minItems: 2
31869
+ }
31870
+ }
31871
+ ]
31539
31872
  }
31540
31873
  }
31541
31874
  }
@@ -31632,27 +31965,25 @@ var video_generated_default = [
31632
31965
  control: "segmented",
31633
31966
  optionLabels: {
31634
31967
  "1:1": "1:1",
31635
- "16:9": "16:9\uFF08\u9ED8\u8BA4\uFF09",
31968
+ "16:9": "16:9",
31636
31969
  "9:16": "9:16",
31637
31970
  "4:3": "4:3",
31638
31971
  "3:4": "3:4",
31639
31972
  "3:2": "3:2",
31640
31973
  "2:3": "2:3"
31641
31974
  }
31642
- },
31643
- default: "16:9"
31975
+ }
31644
31976
  },
31645
31977
  duration: {
31646
31978
  type: "integer",
31647
- description: "\u8F93\u51FA/\u5EF6\u5C55\u65F6\u957F\uFF0C1\uFF5E15 \u79D2\uFF1Bextend-video \u8868\u793A\u65B0\u589E\u7247\u6BB5\u65F6\u957F\uFF1Bedit-video \u4E0D\u652F\u6301\u81EA\u5B9A\u4E49 duration\u3002",
31979
+ description: "\u751F\u6210\u65F6\u957F\u4E3A 1\uFF5E15 \u79D2\u4E14\u9ED8\u8BA4 5 \u79D2\uFF1Bextend-video \u8868\u793A\u65B0\u589E\u7247\u6BB5\u65F6\u957F\uFF0C\u4EC5\u5141\u8BB8 2\uFF5E10 \u79D2\u4E14\u9ED8\u8BA4 6 \u79D2\uFF1Bedit-video \u4E0D\u63A5\u53D7 duration\u3002",
31648
31980
  minimum: 1,
31649
31981
  maximum: 15,
31650
31982
  multipleOf: 1,
31651
31983
  "x-ui": {
31652
31984
  order: 6,
31653
31985
  control: "range"
31654
- },
31655
- default: 5
31986
+ }
31656
31987
  },
31657
31988
  images: {
31658
31989
  type: "array",
@@ -31748,8 +32079,9 @@ var video_generated_default = [
31748
32079
  }
31749
32080
  ]
31750
32081
  },
31751
- description: "\u56FE\u751F\u89C6\u9891\u4F20 1 \u5F20 first_frame/default\uFF1B\u53C2\u8003\u56FE\u751F\u89C6\u9891\u4F20 1 \u5F20\u6216\u591A\u5F20 reference_image\uFF1B\u652F\u6301\u516C\u7F51 URL\u3001data:image/...;base64 \u6216 Files API file_id\u3002",
32082
+ description: "\u56FE\u751F\u89C6\u9891\u4F20 1 \u5F20 first_frame/default\uFF1B\u53C2\u8003\u56FE\u751F\u89C6\u9891\u6700\u591A\u4F20 7 \u5F20 reference_image\uFF1B\u652F\u6301\u516C\u7F51 URL\u3001data:image/...;base64 \u6216 Files API file_id\u3002",
31752
32083
  minItems: 1,
32084
+ maxItems: 7,
31753
32085
  "x-ui": {
31754
32086
  order: 1,
31755
32087
  control: "media",
@@ -31921,45 +32253,224 @@ var video_generated_default = [
31921
32253
  }
31922
32254
  },
31923
32255
  additionalProperties: false,
31924
- required: [
31925
- "texts"
31926
- ]
31927
- },
31928
- outputSchema: {
31929
- type: "object",
31930
- properties: {
31931
- videos: {
31932
- type: "array",
31933
- items: {
31934
- type: "string",
31935
- format: "uri"
31936
- },
31937
- description: "`content` \u4E3A\u751F\u6210\u540E\u7684\u89C6\u9891 URL \u5B57\u7B26\u4E32\u6570\u7EC4\uFF1B\u89C6\u9891\u751F\u6210\u4E3A\u5F02\u6B65\u4E0A\u6E38\u4EFB\u52A1\uFF0Ccreate_model_task \u4F1A\u8FD4\u56DE task_id \u5E76\u7531\u7F51\u5173\u8F6E\u8BE2\u3002"
31938
- }
31939
- },
31940
- additionalProperties: false
31941
- },
31942
- metering: {
31943
- schemaVersion: 1,
31944
- kind: "non_token",
31945
- metrics: [
32256
+ anyOf: [
31946
32257
  {
31947
- metric: "requests",
31948
- requirement: "required"
32258
+ required: [
32259
+ "texts"
32260
+ ]
31949
32261
  },
31950
32262
  {
31951
- metric: "output_video_seconds",
31952
- requirement: "required"
32263
+ required: [
32264
+ "images"
32265
+ ]
32266
+ }
32267
+ ],
32268
+ allOf: [
32269
+ {
32270
+ if: {
32271
+ required: [
32272
+ "mode"
32273
+ ],
32274
+ properties: {
32275
+ mode: {
32276
+ const: "text-to-video"
32277
+ }
32278
+ }
32279
+ },
32280
+ then: {
32281
+ required: [
32282
+ "texts"
32283
+ ],
32284
+ not: {
32285
+ anyOf: [
32286
+ {
32287
+ required: [
32288
+ "images"
32289
+ ]
32290
+ },
32291
+ {
32292
+ required: [
32293
+ "videos"
32294
+ ]
32295
+ }
32296
+ ]
32297
+ }
32298
+ }
31953
32299
  },
31954
32300
  {
31955
- metric: "input_images",
31956
- requirement: "required"
32301
+ if: {
32302
+ required: [
32303
+ "mode"
32304
+ ],
32305
+ properties: {
32306
+ mode: {
32307
+ const: "image-to-video"
32308
+ }
32309
+ }
32310
+ },
32311
+ then: {
32312
+ required: [
32313
+ "images"
32314
+ ],
32315
+ properties: {
32316
+ images: {
32317
+ type: "array",
32318
+ maxItems: 1
32319
+ }
32320
+ },
32321
+ not: {
32322
+ required: [
32323
+ "videos"
32324
+ ]
32325
+ }
32326
+ }
31957
32327
  },
31958
32328
  {
31959
- metric: "input_video_seconds",
31960
- requirement: "conditional",
31961
- whenFeature: "task_input_video_v1"
31962
- }
32329
+ if: {
32330
+ required: [
32331
+ "mode"
32332
+ ],
32333
+ properties: {
32334
+ mode: {
32335
+ const: "reference-to-video"
32336
+ }
32337
+ }
32338
+ },
32339
+ then: {
32340
+ required: [
32341
+ "images"
32342
+ ],
32343
+ not: {
32344
+ required: [
32345
+ "videos"
32346
+ ]
32347
+ }
32348
+ }
32349
+ },
32350
+ {
32351
+ if: {
32352
+ required: [
32353
+ "mode"
32354
+ ],
32355
+ properties: {
32356
+ mode: {
32357
+ const: "edit-video"
32358
+ }
32359
+ }
32360
+ },
32361
+ then: {
32362
+ required: [
32363
+ "texts",
32364
+ "videos"
32365
+ ],
32366
+ not: {
32367
+ anyOf: [
32368
+ {
32369
+ required: [
32370
+ "images"
32371
+ ]
32372
+ },
32373
+ {
32374
+ required: [
32375
+ "duration"
32376
+ ]
32377
+ },
32378
+ {
32379
+ required: [
32380
+ "aspect_ratio"
32381
+ ]
32382
+ },
32383
+ {
32384
+ required: [
32385
+ "resolution"
32386
+ ]
32387
+ }
32388
+ ]
32389
+ }
32390
+ }
32391
+ },
32392
+ {
32393
+ if: {
32394
+ required: [
32395
+ "mode"
32396
+ ],
32397
+ properties: {
32398
+ mode: {
32399
+ const: "extend-video"
32400
+ }
32401
+ }
32402
+ },
32403
+ then: {
32404
+ required: [
32405
+ "texts",
32406
+ "videos"
32407
+ ],
32408
+ properties: {
32409
+ duration: {
32410
+ type: "integer",
32411
+ minimum: 2,
32412
+ maximum: 10,
32413
+ default: 6
32414
+ }
32415
+ },
32416
+ not: {
32417
+ anyOf: [
32418
+ {
32419
+ required: [
32420
+ "images"
32421
+ ]
32422
+ },
32423
+ {
32424
+ required: [
32425
+ "aspect_ratio"
32426
+ ]
32427
+ },
32428
+ {
32429
+ required: [
32430
+ "resolution"
32431
+ ]
32432
+ }
32433
+ ]
32434
+ }
32435
+ }
32436
+ }
32437
+ ]
32438
+ },
32439
+ outputSchema: {
32440
+ type: "object",
32441
+ properties: {
32442
+ videos: {
32443
+ type: "array",
32444
+ items: {
32445
+ type: "string",
32446
+ format: "uri"
32447
+ },
32448
+ description: "`content` \u4E3A\u751F\u6210\u540E\u7684\u89C6\u9891 URL \u5B57\u7B26\u4E32\u6570\u7EC4\uFF1B\u89C6\u9891\u751F\u6210\u4E3A\u5F02\u6B65\u4E0A\u6E38\u4EFB\u52A1\uFF0Ccreate_model_task \u4F1A\u8FD4\u56DE task_id \u5E76\u7531\u7F51\u5173\u8F6E\u8BE2\u3002"
32449
+ }
32450
+ },
32451
+ additionalProperties: false
32452
+ },
32453
+ metering: {
32454
+ schemaVersion: 1,
32455
+ kind: "non_token",
32456
+ metrics: [
32457
+ {
32458
+ metric: "requests",
32459
+ requirement: "required"
32460
+ },
32461
+ {
32462
+ metric: "output_video_seconds",
32463
+ requirement: "required"
32464
+ },
32465
+ {
32466
+ metric: "input_images",
32467
+ requirement: "required"
32468
+ },
32469
+ {
32470
+ metric: "input_video_seconds",
32471
+ requirement: "conditional",
32472
+ whenFeature: "task_input_video_v1"
32473
+ }
31963
32474
  ]
31964
32475
  }
31965
32476
  }
@@ -31990,6 +32501,7 @@ var video_generated_default = [
31990
32501
  inputModes: [
31991
32502
  "text-to-video",
31992
32503
  "image-to-video",
32504
+ "reference-to-video",
31993
32505
  "audio-to-video"
31994
32506
  ],
31995
32507
  features: []
@@ -32025,15 +32537,14 @@ var video_generated_default = [
32025
32537
  control: "segmented",
32026
32538
  optionLabels: {
32027
32539
  "1:1": "1:1",
32028
- "16:9": "16:9\uFF08\u9ED8\u8BA4\uFF09",
32540
+ "16:9": "16:9",
32029
32541
  "9:16": "9:16",
32030
32542
  "4:3": "4:3",
32031
32543
  "3:4": "3:4",
32032
32544
  "3:2": "3:2",
32033
32545
  "2:3": "2:3"
32034
32546
  }
32035
- },
32036
- default: "16:9"
32547
+ }
32037
32548
  },
32038
32549
  duration: {
32039
32550
  type: "integer",
@@ -32066,6 +32577,7 @@ var video_generated_default = [
32066
32577
  type: "string",
32067
32578
  enum: [
32068
32579
  "first_frame",
32580
+ "last_frame",
32069
32581
  "reference_image"
32070
32582
  ]
32071
32583
  }
@@ -32090,6 +32602,7 @@ var video_generated_default = [
32090
32602
  type: "string",
32091
32603
  enum: [
32092
32604
  "first_frame",
32605
+ "last_frame",
32093
32606
  "reference_image"
32094
32607
  ]
32095
32608
  }
@@ -32110,6 +32623,7 @@ var video_generated_default = [
32110
32623
  type: "string",
32111
32624
  enum: [
32112
32625
  "first_frame",
32626
+ "last_frame",
32113
32627
  "reference_image"
32114
32628
  ]
32115
32629
  }
@@ -32130,6 +32644,7 @@ var video_generated_default = [
32130
32644
  type: "string",
32131
32645
  enum: [
32132
32646
  "first_frame",
32647
+ "last_frame",
32133
32648
  "reference_image"
32134
32649
  ]
32135
32650
  }
@@ -32142,8 +32657,8 @@ var video_generated_default = [
32142
32657
  ]
32143
32658
  },
32144
32659
  minItems: 1,
32145
- maxItems: 7,
32146
- description: "Optional first-frame image or up to seven reference images.",
32660
+ maxItems: 9,
32661
+ description: "Optional first and last frame pins plus up to seven reference images.",
32147
32662
  "x-ui": {
32148
32663
  order: 1,
32149
32664
  control: "media",
@@ -32154,6 +32669,7 @@ var video_generated_default = [
32154
32669
  ],
32155
32670
  roles: [
32156
32671
  "first_frame",
32672
+ "last_frame",
32157
32673
  "reference_image"
32158
32674
  ]
32159
32675
  }
@@ -32250,10 +32766,230 @@ var video_generated_default = [
32250
32766
  }
32251
32767
  },
32252
32768
  additionalProperties: false,
32253
- required: [
32254
- "texts"
32769
+ anyOf: [
32770
+ {
32771
+ required: [
32772
+ "texts"
32773
+ ]
32774
+ },
32775
+ {
32776
+ required: [
32777
+ "images"
32778
+ ]
32779
+ }
32255
32780
  ],
32256
32781
  allOf: [
32782
+ {
32783
+ properties: {
32784
+ images: {
32785
+ type: "array",
32786
+ allOf: [
32787
+ {
32788
+ contains: {
32789
+ type: "object",
32790
+ properties: {
32791
+ role: {
32792
+ const: "first_frame"
32793
+ }
32794
+ },
32795
+ required: [
32796
+ "role"
32797
+ ]
32798
+ },
32799
+ minContains: 0,
32800
+ maxContains: 1
32801
+ },
32802
+ {
32803
+ contains: {
32804
+ type: "object",
32805
+ properties: {
32806
+ role: {
32807
+ const: "last_frame"
32808
+ }
32809
+ },
32810
+ required: [
32811
+ "role"
32812
+ ]
32813
+ },
32814
+ minContains: 0,
32815
+ maxContains: 1
32816
+ },
32817
+ {
32818
+ contains: {
32819
+ type: "object",
32820
+ properties: {
32821
+ role: {
32822
+ const: "reference_image"
32823
+ }
32824
+ },
32825
+ required: [
32826
+ "role"
32827
+ ]
32828
+ },
32829
+ minContains: 0,
32830
+ maxContains: 7
32831
+ }
32832
+ ]
32833
+ }
32834
+ }
32835
+ },
32836
+ {
32837
+ if: {
32838
+ required: [
32839
+ "images"
32840
+ ],
32841
+ properties: {
32842
+ images: {
32843
+ type: "array",
32844
+ minItems: 8
32845
+ }
32846
+ }
32847
+ },
32848
+ then: {
32849
+ properties: {
32850
+ images: {
32851
+ type: "array",
32852
+ contains: {
32853
+ type: "object",
32854
+ properties: {
32855
+ role: {
32856
+ enum: [
32857
+ "first_frame",
32858
+ "last_frame"
32859
+ ]
32860
+ }
32861
+ },
32862
+ required: [
32863
+ "role"
32864
+ ]
32865
+ }
32866
+ }
32867
+ }
32868
+ }
32869
+ },
32870
+ {
32871
+ if: {
32872
+ required: [
32873
+ "images"
32874
+ ],
32875
+ properties: {
32876
+ images: {
32877
+ type: "array",
32878
+ minItems: 9
32879
+ }
32880
+ }
32881
+ },
32882
+ then: {
32883
+ properties: {
32884
+ images: {
32885
+ type: "array",
32886
+ allOf: [
32887
+ {
32888
+ contains: {
32889
+ type: "object",
32890
+ properties: {
32891
+ role: {
32892
+ const: "first_frame"
32893
+ }
32894
+ },
32895
+ required: [
32896
+ "role"
32897
+ ]
32898
+ }
32899
+ },
32900
+ {
32901
+ contains: {
32902
+ type: "object",
32903
+ properties: {
32904
+ role: {
32905
+ const: "last_frame"
32906
+ }
32907
+ },
32908
+ required: [
32909
+ "role"
32910
+ ]
32911
+ }
32912
+ }
32913
+ ]
32914
+ }
32915
+ }
32916
+ }
32917
+ },
32918
+ {
32919
+ if: {
32920
+ required: [
32921
+ "mode"
32922
+ ],
32923
+ properties: {
32924
+ mode: {
32925
+ const: "text-to-video"
32926
+ }
32927
+ }
32928
+ },
32929
+ then: {
32930
+ required: [
32931
+ "texts"
32932
+ ],
32933
+ not: {
32934
+ anyOf: [
32935
+ {
32936
+ required: [
32937
+ "images"
32938
+ ]
32939
+ },
32940
+ {
32941
+ required: [
32942
+ "audios"
32943
+ ]
32944
+ }
32945
+ ]
32946
+ }
32947
+ }
32948
+ },
32949
+ {
32950
+ if: {
32951
+ required: [
32952
+ "mode"
32953
+ ],
32954
+ properties: {
32955
+ mode: {
32956
+ const: "image-to-video"
32957
+ }
32958
+ }
32959
+ },
32960
+ then: {
32961
+ required: [
32962
+ "images"
32963
+ ],
32964
+ properties: {
32965
+ images: {
32966
+ type: "array",
32967
+ maxItems: 1,
32968
+ not: {
32969
+ contains: {
32970
+ type: "object",
32971
+ properties: {
32972
+ role: {
32973
+ enum: [
32974
+ "last_frame",
32975
+ "reference_image"
32976
+ ]
32977
+ }
32978
+ },
32979
+ required: [
32980
+ "role"
32981
+ ]
32982
+ }
32983
+ }
32984
+ }
32985
+ },
32986
+ not: {
32987
+ required: [
32988
+ "audios"
32989
+ ]
32990
+ }
32991
+ }
32992
+ },
32257
32993
  {
32258
32994
  if: {
32259
32995
  required: [
@@ -32597,6 +33333,7 @@ var video_generated_default = [
32597
33333
  description: "Requested output aspect ratio.",
32598
33334
  enum: [
32599
33335
  "adaptive",
33336
+ "21:9",
32600
33337
  "16:9",
32601
33338
  "9:16",
32602
33339
  "1:1",
@@ -33391,7 +34128,7 @@ var NexraWaitTimeoutError = class extends Error {
33391
34128
  };
33392
34129
 
33393
34130
  // src/generated/version.generated.ts
33394
- var SDK_VERSION = "0.1.0-alpha.11";
34131
+ var SDK_VERSION = "0.1.0-alpha.13";
33395
34132
 
33396
34133
  // src/transport.ts
33397
34134
  var DEFAULT_BASE_URL = "https://api.nexra-ai.com/v1";
package/dist/index.js CHANGED
@@ -16,7 +16,7 @@ import {
16
16
  projectMediaGeometry,
17
17
  queryString,
18
18
  sleep
19
- } from "./chunk-MSPJPDVY.js";
19
+ } from "./chunk-JQ3P2VAK.js";
20
20
  import {
21
21
  ceilDecimal,
22
22
  multiplyDecimal
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@byte_fluffy/nexra-sdk",
3
- "version": "0.1.0-alpha.11",
3
+ "version": "0.1.0-alpha.13",
4
4
  "type": "module",
5
5
  "types": "./dist/index.d.ts",
6
6
  "sideEffects": false,