@byte_fluffy/nexra-sdk 0.1.0-alpha.4 → 0.1.0-alpha.6

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.
@@ -46,7 +46,8 @@ var image_generated_default = [
46
46
  minLength: 1,
47
47
  description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
48
48
  "x-ui": {
49
- order: 0
49
+ order: -1,
50
+ hidden: true
50
51
  },
51
52
  const: "openai/gpt-image-2.5-flare",
52
53
  examples: [
@@ -65,8 +66,8 @@ var image_generated_default = [
65
66
  }
66
67
  },
67
68
  image: {
68
- title: "\u8F93\u5165\u56FE\u7247",
69
- description: "\u7528\u4E8E\u56FE\u7247\u7F16\u8F91\uFF0C\u6700\u591A 16 \u5F20\u3002Task \u4E2D\u586B\u5199\u56FE\u7247 URL \u6216 Data URL\uFF1B\u6267\u884C\u65F6\u6309\u539F\u751F image[] \u5B57\u6BB5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u987A\u5E8F\u4E0D\u53D8\u3002",
69
+ title: "\u53C2\u8003\u56FE\u7247",
70
+ description: "\u7528\u4E8E\u56FE\u7247\u7F16\u8F91\uFF0C\u6700\u591A 16 \u5F20\uFF0C\u6BCF\u5F20\u5C0F\u4E8E 50 MB\u3002\u63D0\u4F9B\u8499\u7248\u65F6\uFF0C\u8499\u7248\u5E94\u7528\u4E8E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\uFF0C\u5E76\u4E14\u5FC5\u987B\u4E0E\u8BE5\u56FE\u683C\u5F0F\u548C\u5C3A\u5BF8\u4E00\u81F4\u3002Task \u4E2D\u586B\u5199\u56FE\u7247 URL \u6216 Data URL\uFF1B\u6267\u884C\u65F6\u6309\u539F\u751F image[] \u5B57\u6BB5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u987A\u5E8F\u4E0D\u53D8\u3002",
70
71
  anyOf: [
71
72
  {
72
73
  type: "string",
@@ -96,7 +97,7 @@ var image_generated_default = [
96
97
  pattern: "^(https?://|data:image/)",
97
98
  minLength: 1,
98
99
  title: "\u7F16\u8F91\u8499\u7248",
99
- description: "\u53EF\u9009\u7684\u4E00\u5F20 PNG \u8499\u7248\uFF0C\u9700\u540C\u65F6\u63D0\u4F9B\u8F93\u5165\u56FE\u7247\uFF1B\u5C3A\u5BF8\u4E0E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\u4E00\u81F4\uFF0C\u900F\u660E\u533A\u57DF\u7528\u4E8E\u7F16\u8F91\u3002Task \u4E2D\u586B\u5199 URL \u6216 Data URL\uFF0C\u6267\u884C\u65F6\u4E0A\u4F20\u4E3A mask \u6587\u4EF6\u3002",
100
+ description: "\u53EF\u9009\u7684\u4E00\u5F20\u8499\u7248\uFF0C\u9700\u540C\u65F6\u63D0\u4F9B\u8F93\u5165\u56FE\u7247\uFF1B\u6587\u4EF6\u5C0F\u4E8E 50 MB\uFF0C\u5FC5\u987B\u5305\u542B Alpha \u901A\u9053\uFF0C\u5E76\u4E0E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\u683C\u5F0F\u3001\u5C3A\u5BF8\u4E00\u81F4\u3002\u591A\u56FE\u7F16\u8F91\u65F6\u4EC5\u5E94\u7528\u4E8E\u7B2C\u4E00\u5F20\u56FE\u3002Task \u4E2D\u586B\u5199 URL \u6216 Data URL\uFF0C\u6267\u884C\u65F6\u4E0A\u4F20\u4E3A mask \u6587\u4EF6\u3002",
100
101
  "x-ui": {
101
102
  order: 3
102
103
  }
@@ -123,7 +124,8 @@ var image_generated_default = [
123
124
  minimum: 1,
124
125
  maximum: 10,
125
126
  "x-ui": {
126
- order: 5
127
+ order: 5,
128
+ control: "range"
127
129
  }
128
130
  },
129
131
  quality: {
@@ -146,7 +148,8 @@ var image_generated_default = [
146
148
  high: "\u9AD8",
147
149
  xhigh: "\u66F4\u9AD8",
148
150
  max: "\u6700\u9AD8"
149
- }
151
+ },
152
+ control: "segmented"
150
153
  }
151
154
  },
152
155
  output_format: {
@@ -154,15 +157,18 @@ var image_generated_default = [
154
157
  description: "\u8F93\u51FA\u56FE\u7247\u7684\u7F16\u7801\u683C\u5F0F\u3002",
155
158
  enum: [
156
159
  "png",
157
- "jpeg"
160
+ "jpeg",
161
+ "webp"
158
162
  ],
159
163
  title: "\u56FE\u7247\u683C\u5F0F",
160
164
  "x-ui": {
161
165
  order: 7,
162
166
  optionLabels: {
163
167
  png: "PNG",
164
- jpeg: "JPEG"
165
- }
168
+ jpeg: "JPEG",
169
+ webp: "WebP"
170
+ },
171
+ control: "segmented"
166
172
  }
167
173
  },
168
174
  output_compression: {
@@ -170,9 +176,11 @@ var image_generated_default = [
170
176
  minimum: 0,
171
177
  maximum: 100,
172
178
  multipleOf: 1,
173
- description: "JPEG \u538B\u7F29\u8D28\u91CF\uFF0C0\uFF5E100\uFF1B\u4EC5\u5728 output_format \u4E3A jpeg \u65F6\u4F7F\u7528\u3002",
179
+ description: "JPEG \u6216 WebP \u538B\u7F29\u8D28\u91CF\uFF0C0\uFF5E100\uFF1B\u4EC5\u5728 output_format \u4E3A jpeg \u6216 webp \u65F6\u4F7F\u7528\u3002",
174
180
  "x-ui": {
175
- order: 8
181
+ order: 8,
182
+ control: "range",
183
+ unit: "%"
176
184
  },
177
185
  title: "\u538B\u7F29\u8D28\u91CF"
178
186
  },
@@ -183,14 +191,15 @@ var image_generated_default = [
183
191
  "opaque",
184
192
  "transparent"
185
193
  ],
186
- description: "\u53EF\u9009\u62E9\u81EA\u52A8\u3001\u4E0D\u900F\u660E\u6216\u900F\u660E\u80CC\u666F\uFF1B\u900F\u660E\u80CC\u666F\u9700\u4F7F\u7528 PNG\u3002",
194
+ description: "\u53EF\u9009\u62E9\u81EA\u52A8\u3001\u4E0D\u900F\u660E\u6216\u900F\u660E\u80CC\u666F\uFF1B\u900F\u660E\u80CC\u666F\u9700\u4F7F\u7528 PNG \u6216 WebP\u3002",
187
195
  "x-ui": {
188
196
  order: 9,
189
197
  optionLabels: {
190
198
  auto: "\u81EA\u52A8",
191
199
  opaque: "\u4E0D\u900F\u660E",
192
200
  transparent: "\u900F\u660E"
193
- }
201
+ },
202
+ control: "segmented"
194
203
  },
195
204
  title: "\u80CC\u666F"
196
205
  },
@@ -206,7 +215,8 @@ var image_generated_default = [
206
215
  optionLabels: {
207
216
  auto: "\u81EA\u52A8",
208
217
  low: "\u4F4E"
209
- }
218
+ },
219
+ control: "segmented"
210
220
  },
211
221
  title: "\u5185\u5BB9\u5BA1\u6838"
212
222
  },
@@ -215,7 +225,8 @@ var image_generated_default = [
215
225
  title: "\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6",
216
226
  description: "\u4F20\u7ED9\u4E0A\u6E38\u7684\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6\uFF0C\u7528\u4E8E\u6EE5\u7528\u76D1\u6D4B\u3002",
217
227
  "x-ui": {
218
- order: 11
228
+ order: 99,
229
+ hidden: true
219
230
  }
220
231
  }
221
232
  },
@@ -261,7 +272,10 @@ var image_generated_default = [
261
272
  ],
262
273
  properties: {
263
274
  output_format: {
264
- const: "jpeg"
275
+ enum: [
276
+ "jpeg",
277
+ "webp"
278
+ ]
265
279
  }
266
280
  }
267
281
  }
@@ -280,7 +294,10 @@ var image_generated_default = [
280
294
  then: {
281
295
  properties: {
282
296
  output_format: {
283
- const: "png"
297
+ enum: [
298
+ "png",
299
+ "webp"
300
+ ]
284
301
  }
285
302
  }
286
303
  }
@@ -570,7 +587,8 @@ var image_generated_default = [
570
587
  minLength: 1,
571
588
  description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
572
589
  "x-ui": {
573
- order: 0
590
+ order: -1,
591
+ hidden: true
574
592
  },
575
593
  const: "openai/gpt-image-2.5-sunburst",
576
594
  examples: [
@@ -589,8 +607,8 @@ var image_generated_default = [
589
607
  }
590
608
  },
591
609
  image: {
592
- title: "\u8F93\u5165\u56FE\u7247",
593
- description: "\u7528\u4E8E\u56FE\u7247\u7F16\u8F91\uFF0C\u6700\u591A 16 \u5F20\u3002Task \u4E2D\u586B\u5199\u56FE\u7247 URL \u6216 Data URL\uFF1B\u6267\u884C\u65F6\u6309\u539F\u751F image[] \u5B57\u6BB5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u987A\u5E8F\u4E0D\u53D8\u3002",
610
+ title: "\u53C2\u8003\u56FE\u7247",
611
+ description: "\u7528\u4E8E\u56FE\u7247\u7F16\u8F91\uFF0C\u6700\u591A 16 \u5F20\uFF0C\u6BCF\u5F20\u5C0F\u4E8E 50 MB\u3002\u63D0\u4F9B\u8499\u7248\u65F6\uFF0C\u8499\u7248\u5E94\u7528\u4E8E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\uFF0C\u5E76\u4E14\u5FC5\u987B\u4E0E\u8BE5\u56FE\u683C\u5F0F\u548C\u5C3A\u5BF8\u4E00\u81F4\u3002Task \u4E2D\u586B\u5199\u56FE\u7247 URL \u6216 Data URL\uFF1B\u6267\u884C\u65F6\u6309\u539F\u751F image[] \u5B57\u6BB5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u987A\u5E8F\u4E0D\u53D8\u3002",
594
612
  anyOf: [
595
613
  {
596
614
  type: "string",
@@ -620,7 +638,7 @@ var image_generated_default = [
620
638
  pattern: "^(https?://|data:image/)",
621
639
  minLength: 1,
622
640
  title: "\u7F16\u8F91\u8499\u7248",
623
- description: "\u53EF\u9009\u7684\u4E00\u5F20 PNG \u8499\u7248\uFF0C\u9700\u540C\u65F6\u63D0\u4F9B\u8F93\u5165\u56FE\u7247\uFF1B\u5C3A\u5BF8\u4E0E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\u4E00\u81F4\uFF0C\u900F\u660E\u533A\u57DF\u7528\u4E8E\u7F16\u8F91\u3002Task \u4E2D\u586B\u5199 URL \u6216 Data URL\uFF0C\u6267\u884C\u65F6\u4E0A\u4F20\u4E3A mask \u6587\u4EF6\u3002",
641
+ description: "\u53EF\u9009\u7684\u4E00\u5F20\u8499\u7248\uFF0C\u9700\u540C\u65F6\u63D0\u4F9B\u8F93\u5165\u56FE\u7247\uFF1B\u6587\u4EF6\u5C0F\u4E8E 50 MB\uFF0C\u5FC5\u987B\u5305\u542B Alpha \u901A\u9053\uFF0C\u5E76\u4E0E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\u683C\u5F0F\u3001\u5C3A\u5BF8\u4E00\u81F4\u3002\u591A\u56FE\u7F16\u8F91\u65F6\u4EC5\u5E94\u7528\u4E8E\u7B2C\u4E00\u5F20\u56FE\u3002Task \u4E2D\u586B\u5199 URL \u6216 Data URL\uFF0C\u6267\u884C\u65F6\u4E0A\u4F20\u4E3A mask \u6587\u4EF6\u3002",
624
642
  "x-ui": {
625
643
  order: 3
626
644
  }
@@ -647,7 +665,8 @@ var image_generated_default = [
647
665
  minimum: 1,
648
666
  maximum: 10,
649
667
  "x-ui": {
650
- order: 5
668
+ order: 5,
669
+ control: "range"
651
670
  }
652
671
  },
653
672
  quality: {
@@ -670,7 +689,8 @@ var image_generated_default = [
670
689
  high: "\u9AD8",
671
690
  xhigh: "\u66F4\u9AD8",
672
691
  max: "\u6700\u9AD8"
673
- }
692
+ },
693
+ control: "segmented"
674
694
  }
675
695
  },
676
696
  output_format: {
@@ -678,15 +698,18 @@ var image_generated_default = [
678
698
  description: "\u8F93\u51FA\u56FE\u7247\u7684\u7F16\u7801\u683C\u5F0F\u3002",
679
699
  enum: [
680
700
  "png",
681
- "jpeg"
701
+ "jpeg",
702
+ "webp"
682
703
  ],
683
704
  title: "\u56FE\u7247\u683C\u5F0F",
684
705
  "x-ui": {
685
706
  order: 7,
686
707
  optionLabels: {
687
708
  png: "PNG",
688
- jpeg: "JPEG"
689
- }
709
+ jpeg: "JPEG",
710
+ webp: "WebP"
711
+ },
712
+ control: "segmented"
690
713
  }
691
714
  },
692
715
  output_compression: {
@@ -694,9 +717,11 @@ var image_generated_default = [
694
717
  minimum: 0,
695
718
  maximum: 100,
696
719
  multipleOf: 1,
697
- description: "JPEG \u538B\u7F29\u8D28\u91CF\uFF0C0\uFF5E100\uFF1B\u4EC5\u5728 output_format \u4E3A jpeg \u65F6\u4F7F\u7528\u3002",
720
+ description: "JPEG \u6216 WebP \u538B\u7F29\u8D28\u91CF\uFF0C0\uFF5E100\uFF1B\u4EC5\u5728 output_format \u4E3A jpeg \u6216 webp \u65F6\u4F7F\u7528\u3002",
698
721
  "x-ui": {
699
- order: 8
722
+ order: 8,
723
+ control: "range",
724
+ unit: "%"
700
725
  },
701
726
  title: "\u538B\u7F29\u8D28\u91CF"
702
727
  },
@@ -707,14 +732,15 @@ var image_generated_default = [
707
732
  "opaque",
708
733
  "transparent"
709
734
  ],
710
- description: "\u53EF\u9009\u62E9\u81EA\u52A8\u3001\u4E0D\u900F\u660E\u6216\u900F\u660E\u80CC\u666F\uFF1B\u900F\u660E\u80CC\u666F\u9700\u4F7F\u7528 PNG\u3002",
735
+ description: "\u53EF\u9009\u62E9\u81EA\u52A8\u3001\u4E0D\u900F\u660E\u6216\u900F\u660E\u80CC\u666F\uFF1B\u900F\u660E\u80CC\u666F\u9700\u4F7F\u7528 PNG \u6216 WebP\u3002",
711
736
  "x-ui": {
712
737
  order: 9,
713
738
  optionLabels: {
714
739
  auto: "\u81EA\u52A8",
715
740
  opaque: "\u4E0D\u900F\u660E",
716
741
  transparent: "\u900F\u660E"
717
- }
742
+ },
743
+ control: "segmented"
718
744
  },
719
745
  title: "\u80CC\u666F"
720
746
  },
@@ -730,7 +756,8 @@ var image_generated_default = [
730
756
  optionLabels: {
731
757
  auto: "\u81EA\u52A8",
732
758
  low: "\u4F4E"
733
- }
759
+ },
760
+ control: "segmented"
734
761
  },
735
762
  title: "\u5185\u5BB9\u5BA1\u6838"
736
763
  },
@@ -739,7 +766,8 @@ var image_generated_default = [
739
766
  title: "\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6",
740
767
  description: "\u4F20\u7ED9\u4E0A\u6E38\u7684\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6\uFF0C\u7528\u4E8E\u6EE5\u7528\u76D1\u6D4B\u3002",
741
768
  "x-ui": {
742
- order: 11
769
+ order: 99,
770
+ hidden: true
743
771
  }
744
772
  }
745
773
  },
@@ -785,7 +813,10 @@ var image_generated_default = [
785
813
  ],
786
814
  properties: {
787
815
  output_format: {
788
- const: "jpeg"
816
+ enum: [
817
+ "jpeg",
818
+ "webp"
819
+ ]
789
820
  }
790
821
  }
791
822
  }
@@ -804,7 +835,10 @@ var image_generated_default = [
804
835
  then: {
805
836
  properties: {
806
837
  output_format: {
807
- const: "png"
838
+ enum: [
839
+ "png",
840
+ "webp"
841
+ ]
808
842
  }
809
843
  }
810
844
  }
@@ -2240,7 +2274,8 @@ var image_generated_default = [
2240
2274
  title: "\u6A21\u578B ID",
2241
2275
  description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
2242
2276
  "x-ui": {
2243
- order: 0
2277
+ order: -1,
2278
+ hidden: true
2244
2279
  },
2245
2280
  examples: [
2246
2281
  "bytedance/doubao-seedream-5-0-260128"
@@ -2293,7 +2328,13 @@ var image_generated_default = [
2293
2328
  "2048x2048"
2294
2329
  ],
2295
2330
  "x-ui": {
2296
- order: 3
2331
+ order: 3,
2332
+ control: "select",
2333
+ optionLabels: {
2334
+ "2K": "2K",
2335
+ "3K": "3K",
2336
+ "4K": "4K"
2337
+ }
2297
2338
  }
2298
2339
  },
2299
2340
  response_format: {
@@ -2303,7 +2344,11 @@ var image_generated_default = [
2303
2344
  "b64_json"
2304
2345
  ],
2305
2346
  title: "\u54CD\u5E94\u56FE\u7247\u5F62\u5F0F",
2306
- description: "url \u8FD4\u56DE\u56FE\u7247\u5730\u5740\uFF0Cb64_json \u8FD4\u56DE Base64 \u56FE\u7247\u6570\u636E\u3002"
2347
+ description: "url \u8FD4\u56DE\u56FE\u7247\u5730\u5740\uFF0Cb64_json \u8FD4\u56DE Base64 \u56FE\u7247\u6570\u636E\u3002",
2348
+ "x-ui": {
2349
+ hidden: true,
2350
+ order: 98
2351
+ }
2307
2352
  },
2308
2353
  output_format: {
2309
2354
  type: "string",
@@ -2311,12 +2356,23 @@ var image_generated_default = [
2311
2356
  "png",
2312
2357
  "jpeg"
2313
2358
  ],
2314
- title: "\u56FE\u7247\u683C\u5F0F"
2359
+ title: "\u56FE\u7247\u683C\u5F0F",
2360
+ "x-ui": {
2361
+ control: "segmented",
2362
+ order: 4,
2363
+ optionLabels: {
2364
+ png: "PNG",
2365
+ jpeg: "JPEG"
2366
+ }
2367
+ }
2315
2368
  },
2316
2369
  watermark: {
2317
2370
  type: "boolean",
2318
2371
  title: "\u6C34\u5370",
2319
- description: "\u662F\u5426\u6DFB\u52A0\u6C34\u5370\u3002"
2372
+ description: "\u662F\u5426\u6DFB\u52A0\u6C34\u5370\u3002",
2373
+ "x-ui": {
2374
+ order: 5
2375
+ }
2320
2376
  }
2321
2377
  },
2322
2378
  required: [
@@ -2445,7 +2501,8 @@ var image_generated_default = [
2445
2501
  title: "\u6A21\u578B ID",
2446
2502
  description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
2447
2503
  "x-ui": {
2448
- order: 0
2504
+ order: -1,
2505
+ hidden: true
2449
2506
  },
2450
2507
  examples: [
2451
2508
  "bytedance/doubao-seedream-5-0-pro-260628"
@@ -2498,7 +2555,13 @@ var image_generated_default = [
2498
2555
  "2048x2048"
2499
2556
  ],
2500
2557
  "x-ui": {
2501
- order: 3
2558
+ order: 3,
2559
+ control: "select",
2560
+ optionLabels: {
2561
+ "1K": "1K",
2562
+ "1.5K": "1.5K",
2563
+ "2K": "2K"
2564
+ }
2502
2565
  }
2503
2566
  },
2504
2567
  response_format: {
@@ -2508,7 +2571,11 @@ var image_generated_default = [
2508
2571
  "b64_json"
2509
2572
  ],
2510
2573
  title: "\u54CD\u5E94\u56FE\u7247\u5F62\u5F0F",
2511
- description: "url \u8FD4\u56DE\u56FE\u7247\u5730\u5740\uFF0Cb64_json \u8FD4\u56DE Base64 \u56FE\u7247\u6570\u636E\u3002"
2574
+ description: "url \u8FD4\u56DE\u56FE\u7247\u5730\u5740\uFF0Cb64_json \u8FD4\u56DE Base64 \u56FE\u7247\u6570\u636E\u3002",
2575
+ "x-ui": {
2576
+ hidden: true,
2577
+ order: 98
2578
+ }
2512
2579
  },
2513
2580
  output_format: {
2514
2581
  type: "string",
@@ -2516,17 +2583,31 @@ var image_generated_default = [
2516
2583
  "png",
2517
2584
  "jpeg"
2518
2585
  ],
2519
- title: "\u56FE\u7247\u683C\u5F0F"
2586
+ title: "\u56FE\u7247\u683C\u5F0F",
2587
+ "x-ui": {
2588
+ control: "segmented",
2589
+ order: 4,
2590
+ optionLabels: {
2591
+ png: "PNG",
2592
+ jpeg: "JPEG"
2593
+ }
2594
+ }
2520
2595
  },
2521
2596
  watermark: {
2522
2597
  type: "boolean",
2523
2598
  title: "\u6C34\u5370",
2524
- description: "\u662F\u5426\u6DFB\u52A0\u6C34\u5370\u3002"
2599
+ description: "\u662F\u5426\u6DFB\u52A0\u6C34\u5370\u3002",
2600
+ "x-ui": {
2601
+ order: 5
2602
+ }
2525
2603
  },
2526
2604
  layer_decomposition: {
2527
2605
  type: "boolean",
2528
2606
  title: "\u56FE\u7247\u5206\u5C42",
2529
- description: "\u5C06\u4E00\u5F20\u56FE\u7247\u5206\u89E3\u4E3A\u591A\u4E2A\u56FE\u5C42\u3002"
2607
+ description: "\u5C06\u4E00\u5F20\u56FE\u7247\u5206\u89E3\u4E3A\u591A\u4E2A\u56FE\u5C42\u3002",
2608
+ "x-ui": {
2609
+ order: 6
2610
+ }
2530
2611
  },
2531
2612
  optimize_prompt_options: {
2532
2613
  type: "object",
@@ -2802,7 +2883,8 @@ var image_generated_default = [
2802
2883
  accept: [
2803
2884
  "url"
2804
2885
  ]
2805
- }
2886
+ },
2887
+ title: "\u53C2\u8003\u56FE\u7247"
2806
2888
  },
2807
2889
  ratio: {
2808
2890
  type: "string",
@@ -2821,7 +2903,7 @@ var image_generated_default = [
2821
2903
  ],
2822
2904
  "x-ui": {
2823
2905
  order: 2,
2824
- control: "segmented",
2906
+ control: "select",
2825
2907
  optionLabels: {
2826
2908
  "1:1": "1:1",
2827
2909
  "16:9": "16:9",
@@ -2830,7 +2912,8 @@ var image_generated_default = [
2830
2912
  "4:3": "4:3"
2831
2913
  }
2832
2914
  },
2833
- default: "1:1"
2915
+ default: "1:1",
2916
+ title: "\u753B\u9762\u6BD4\u4F8B"
2834
2917
  },
2835
2918
  resolution: {
2836
2919
  type: "string",
@@ -2843,15 +2926,17 @@ var image_generated_default = [
2843
2926
  control: "segmented",
2844
2927
  optionLabels: {
2845
2928
  "1K": "1K"
2846
- }
2929
+ },
2930
+ hidden: true
2847
2931
  },
2848
- default: "1K"
2932
+ default: "1K",
2933
+ title: "\u5206\u8FA8\u7387"
2849
2934
  },
2850
2935
  texts: {
2851
2936
  type: "string",
2852
2937
  description: "Describe the image to generate or the requested change to an input image.",
2853
2938
  minLength: 1,
2854
- title: "Prompt",
2939
+ title: "\u63D0\u793A\u8BCD",
2855
2940
  "x-ui": {
2856
2941
  order: 0,
2857
2942
  control: "textarea"
@@ -3019,7 +3104,8 @@ var image_generated_default = [
3019
3104
  accept: [
3020
3105
  "url"
3021
3106
  ]
3022
- }
3107
+ },
3108
+ title: "\u53C2\u8003\u56FE\u7247"
3023
3109
  },
3024
3110
  ratio: {
3025
3111
  type: "string",
@@ -3062,7 +3148,8 @@ var image_generated_default = [
3062
3148
  "9:21": "9:21"
3063
3149
  }
3064
3150
  },
3065
- default: "1:1"
3151
+ default: "1:1",
3152
+ title: "\u753B\u9762\u6BD4\u4F8B"
3066
3153
  },
3067
3154
  resolution: {
3068
3155
  type: "string",
@@ -3083,13 +3170,14 @@ var image_generated_default = [
3083
3170
  "4K": "4K"
3084
3171
  }
3085
3172
  },
3086
- default: "1K"
3173
+ default: "1K",
3174
+ title: "\u5206\u8FA8\u7387"
3087
3175
  },
3088
3176
  texts: {
3089
3177
  type: "string",
3090
3178
  description: "Describe the image to generate or the requested change to an input image.",
3091
3179
  minLength: 1,
3092
- title: "Prompt",
3180
+ title: "\u63D0\u793A\u8BCD",
3093
3181
  "x-ui": {
3094
3182
  order: 0,
3095
3183
  control: "textarea"
@@ -3258,7 +3346,8 @@ var image_generated_default = [
3258
3346
  accept: [
3259
3347
  "url"
3260
3348
  ]
3261
- }
3349
+ },
3350
+ title: "\u53C2\u8003\u56FE\u7247"
3262
3351
  },
3263
3352
  ratio: {
3264
3353
  type: "string",
@@ -3301,7 +3390,8 @@ var image_generated_default = [
3301
3390
  "9:21": "9:21"
3302
3391
  }
3303
3392
  },
3304
- default: "1:1"
3393
+ default: "1:1",
3394
+ title: "\u753B\u9762\u6BD4\u4F8B"
3305
3395
  },
3306
3396
  resolution: {
3307
3397
  type: "string",
@@ -3314,15 +3404,17 @@ var image_generated_default = [
3314
3404
  control: "segmented",
3315
3405
  optionLabels: {
3316
3406
  "1K": "1K"
3317
- }
3407
+ },
3408
+ hidden: true
3318
3409
  },
3319
- default: "1K"
3410
+ default: "1K",
3411
+ title: "\u5206\u8FA8\u7387"
3320
3412
  },
3321
3413
  texts: {
3322
3414
  type: "string",
3323
3415
  description: "Describe the image to generate or the requested change to an input image.",
3324
3416
  minLength: 1,
3325
- title: "Prompt",
3417
+ title: "\u63D0\u793A\u8BCD",
3326
3418
  "x-ui": {
3327
3419
  order: 0,
3328
3420
  control: "textarea"
@@ -3489,7 +3581,8 @@ var image_generated_default = [
3489
3581
  accept: [
3490
3582
  "url"
3491
3583
  ]
3492
- }
3584
+ },
3585
+ title: "\u53C2\u8003\u56FE\u7247"
3493
3586
  },
3494
3587
  ratio: {
3495
3588
  type: "string",
@@ -3522,7 +3615,8 @@ var image_generated_default = [
3522
3615
  "21:9": "21:9"
3523
3616
  }
3524
3617
  },
3525
- default: "1:1"
3618
+ default: "1:1",
3619
+ title: "\u753B\u9762\u6BD4\u4F8B"
3526
3620
  },
3527
3621
  resolution: {
3528
3622
  type: "string",
@@ -3541,13 +3635,14 @@ var image_generated_default = [
3541
3635
  "4K": "4K"
3542
3636
  }
3543
3637
  },
3544
- default: "1K"
3638
+ default: "1K",
3639
+ title: "\u5206\u8FA8\u7387"
3545
3640
  },
3546
3641
  texts: {
3547
3642
  type: "string",
3548
3643
  description: "Describe the image to generate or the requested change to an input image.",
3549
3644
  minLength: 1,
3550
- title: "Prompt",
3645
+ title: "\u63D0\u793A\u8BCD",
3551
3646
  "x-ui": {
3552
3647
  order: 0,
3553
3648
  control: "textarea"
@@ -3663,7 +3758,8 @@ var image_generated_default = [
3663
3758
  minLength: 1,
3664
3759
  description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
3665
3760
  "x-ui": {
3666
- order: 0
3761
+ order: -1,
3762
+ hidden: true
3667
3763
  },
3668
3764
  const: "openai/gpt-image-2",
3669
3765
  examples: [
@@ -3682,8 +3778,8 @@ var image_generated_default = [
3682
3778
  }
3683
3779
  },
3684
3780
  image: {
3685
- title: "\u8F93\u5165\u56FE\u7247",
3686
- description: "\u7528\u4E8E\u56FE\u7247\u7F16\u8F91\uFF0C\u6700\u591A 16 \u5F20\u3002Task \u4E2D\u586B\u5199\u56FE\u7247 URL \u6216 Data URL\uFF1B\u6267\u884C\u65F6\u6309\u539F\u751F image[] \u5B57\u6BB5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u987A\u5E8F\u4E0D\u53D8\u3002",
3781
+ title: "\u53C2\u8003\u56FE\u7247",
3782
+ description: "\u7528\u4E8E\u56FE\u7247\u7F16\u8F91\uFF0C\u6700\u591A 16 \u5F20\uFF0C\u6BCF\u5F20\u5C0F\u4E8E 50 MB\u3002\u63D0\u4F9B\u8499\u7248\u65F6\uFF0C\u8499\u7248\u5E94\u7528\u4E8E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\uFF0C\u5E76\u4E14\u5FC5\u987B\u4E0E\u8BE5\u56FE\u683C\u5F0F\u548C\u5C3A\u5BF8\u4E00\u81F4\u3002Task \u4E2D\u586B\u5199\u56FE\u7247 URL \u6216 Data URL\uFF1B\u6267\u884C\u65F6\u6309\u539F\u751F image[] \u5B57\u6BB5\u4E0A\u4F20\u6587\u4EF6\uFF0C\u987A\u5E8F\u4E0D\u53D8\u3002",
3687
3783
  anyOf: [
3688
3784
  {
3689
3785
  type: "string",
@@ -3713,7 +3809,7 @@ var image_generated_default = [
3713
3809
  pattern: "^(https?://|data:image/)",
3714
3810
  minLength: 1,
3715
3811
  title: "\u7F16\u8F91\u8499\u7248",
3716
- description: "\u53EF\u9009\u7684\u4E00\u5F20 PNG \u8499\u7248\uFF0C\u9700\u540C\u65F6\u63D0\u4F9B\u8F93\u5165\u56FE\u7247\uFF1B\u5C3A\u5BF8\u4E0E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\u4E00\u81F4\uFF0C\u900F\u660E\u533A\u57DF\u7528\u4E8E\u7F16\u8F91\u3002Task \u4E2D\u586B\u5199 URL \u6216 Data URL\uFF0C\u6267\u884C\u65F6\u4E0A\u4F20\u4E3A mask \u6587\u4EF6\u3002",
3812
+ description: "\u53EF\u9009\u7684\u4E00\u5F20\u8499\u7248\uFF0C\u9700\u540C\u65F6\u63D0\u4F9B\u8F93\u5165\u56FE\u7247\uFF1B\u6587\u4EF6\u5C0F\u4E8E 50 MB\uFF0C\u5FC5\u987B\u5305\u542B Alpha \u901A\u9053\uFF0C\u5E76\u4E0E\u7B2C\u4E00\u5F20\u8F93\u5165\u56FE\u683C\u5F0F\u3001\u5C3A\u5BF8\u4E00\u81F4\u3002\u591A\u56FE\u7F16\u8F91\u65F6\u4EC5\u5E94\u7528\u4E8E\u7B2C\u4E00\u5F20\u56FE\u3002Task \u4E2D\u586B\u5199 URL \u6216 Data URL\uFF0C\u6267\u884C\u65F6\u4E0A\u4F20\u4E3A mask \u6587\u4EF6\u3002",
3717
3813
  "x-ui": {
3718
3814
  order: 3
3719
3815
  }
@@ -3740,7 +3836,8 @@ var image_generated_default = [
3740
3836
  minimum: 1,
3741
3837
  maximum: 10,
3742
3838
  "x-ui": {
3743
- order: 5
3839
+ order: 5,
3840
+ control: "range"
3744
3841
  }
3745
3842
  },
3746
3843
  quality: {
@@ -3759,7 +3856,8 @@ var image_generated_default = [
3759
3856
  low: "\u4F4E",
3760
3857
  medium: "\u4E2D",
3761
3858
  high: "\u9AD8"
3762
- }
3859
+ },
3860
+ control: "segmented"
3763
3861
  }
3764
3862
  },
3765
3863
  output_format: {
@@ -3775,7 +3873,8 @@ var image_generated_default = [
3775
3873
  optionLabels: {
3776
3874
  png: "PNG",
3777
3875
  jpeg: "JPEG"
3778
- }
3876
+ },
3877
+ control: "segmented"
3779
3878
  }
3780
3879
  },
3781
3880
  output_compression: {
@@ -3783,9 +3882,11 @@ var image_generated_default = [
3783
3882
  minimum: 0,
3784
3883
  maximum: 100,
3785
3884
  multipleOf: 1,
3786
- description: "JPEG \u538B\u7F29\u8D28\u91CF\uFF0C0\uFF5E100\uFF1B\u4EC5\u5728 output_format \u4E3A jpeg \u65F6\u4F7F\u7528\u3002",
3885
+ description: "JPEG \u538B\u7F29\u8D28\u91CF\uFF0C0\uFF5E100\uFF1B\u5F53\u524D Azure \u90E8\u7F72\u63A5\u53E3\u4EC5\u5728 output_format \u4E3A jpeg \u65F6\u652F\u6301\u3002",
3787
3886
  "x-ui": {
3788
- order: 8
3887
+ order: 8,
3888
+ control: "range",
3889
+ unit: "%"
3789
3890
  },
3790
3891
  title: "\u538B\u7F29\u8D28\u91CF"
3791
3892
  },
@@ -3796,14 +3897,15 @@ var image_generated_default = [
3796
3897
  "opaque",
3797
3898
  "transparent"
3798
3899
  ],
3799
- description: "\u53EF\u9009\u62E9\u81EA\u52A8\u3001\u4E0D\u900F\u660E\u6216\u900F\u660E\u80CC\u666F\uFF1B\u900F\u660E\u80CC\u666F\u4E3A\u4E0A\u6E38\u9884\u89C8\u80FD\u529B\uFF0C\u9700\u4F7F\u7528 PNG\u3002",
3900
+ description: "\u53EF\u9009\u62E9\u81EA\u52A8\u3001\u4E0D\u900F\u660E\u6216\u900F\u660E\u80CC\u666F\uFF1B\u5F53\u524D Azure \u90E8\u7F72\u63A5\u53E3\u7684\u900F\u660E\u80CC\u666F\u9700\u4F7F\u7528 PNG\u3002",
3800
3901
  "x-ui": {
3801
3902
  order: 9,
3802
3903
  optionLabels: {
3803
3904
  auto: "\u81EA\u52A8",
3804
3905
  opaque: "\u4E0D\u900F\u660E",
3805
3906
  transparent: "\u900F\u660E"
3806
- }
3907
+ },
3908
+ control: "segmented"
3807
3909
  },
3808
3910
  title: "\u80CC\u666F"
3809
3911
  },
@@ -3819,7 +3921,8 @@ var image_generated_default = [
3819
3921
  optionLabels: {
3820
3922
  auto: "\u81EA\u52A8",
3821
3923
  low: "\u4F4E"
3822
- }
3924
+ },
3925
+ control: "segmented"
3823
3926
  },
3824
3927
  title: "\u5185\u5BB9\u5BA1\u6838"
3825
3928
  },
@@ -3828,7 +3931,8 @@ var image_generated_default = [
3828
3931
  title: "\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6",
3829
3932
  description: "\u4F20\u7ED9\u4E0A\u6E38\u7684\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6\uFF0C\u7528\u4E8E\u6EE5\u7528\u76D1\u6D4B\u3002",
3830
3933
  "x-ui": {
3831
- order: 11
3934
+ order: 99,
3935
+ hidden: true
3832
3936
  }
3833
3937
  }
3834
3938
  },
@@ -3873,7 +3977,9 @@ var image_generated_default = [
3873
3977
  ],
3874
3978
  properties: {
3875
3979
  output_format: {
3876
- const: "jpeg"
3980
+ enum: [
3981
+ "jpeg"
3982
+ ]
3877
3983
  }
3878
3984
  }
3879
3985
  }
@@ -3892,7 +3998,9 @@ var image_generated_default = [
3892
3998
  then: {
3893
3999
  properties: {
3894
4000
  output_format: {
3895
- const: "png"
4001
+ enum: [
4002
+ "png"
4003
+ ]
3896
4004
  }
3897
4005
  }
3898
4006
  }
@@ -5035,7 +5143,7 @@ var image_generated_default = [
5035
5143
  contractVersion: 2,
5036
5144
  developer: "runninghub",
5037
5145
  displayName: "RunningHub Midjourney V8.2 Preview",
5038
- summary: "RunningHub \u60A0\u8239 V8.2 \u9884\u89C8\u7248\u56FE\u7247\u751F\u6210\uFF0C\u652F\u6301\u56FE\u7247\u4E0E\u98CE\u683C\u53C2\u8003\u3001\u539F\u751F 2K \u8F93\u51FA\u3002",
5146
+ summary: "RunningHub \u60A0\u8239 V8.2 \u9884\u89C8\u7248\u56FE\u7247\u751F\u6210\uFF0C\u5F3A\u5316\u5BA1\u7F8E\u3001\u6750\u8D28\u5149\u7167\u3001\u89D2\u8272\u4E00\u81F4\u6027\u3001\u5C40\u90E8\u91CD\u7ED8\u6548\u679C\u548C\u968F\u673A\u98CE\u683C\u8349\u7A3F\u8868\u73B0\uFF0C\u652F\u6301\u5355\u56FE/\u98CE\u683C\u53C2\u8003\u4E0E\u539F\u751F 2K \u8F93\u51FA\uFF1B\u5F53\u524D\u63A5\u53E3\u672A\u63D0\u4F9B\u8499\u7248\u7F16\u8F91\uFF0C\u4E14\u9884\u89C8\u7248\u53C2\u6570\u903B\u8F91\u548C\u8F93\u51FA\u7A33\u5B9A\u6027\u53EF\u80FD\u53D8\u5316\u3002",
5039
5147
  kind: "image",
5040
5148
  family: "Midjourney",
5041
5149
  versionLabel: "8.2 Preview",
@@ -5498,7 +5606,8 @@ var image_generated_default = [
5498
5606
  title: "\u6A21\u578B ID",
5499
5607
  description: "Nexra \u516C\u5171\u6A21\u578B ID\uFF0C\u5FC5\u987B\u4E0E\u5916\u5C42 modelId \u76F8\u540C\u3002",
5500
5608
  "x-ui": {
5501
- order: 0
5609
+ order: -1,
5610
+ hidden: true
5502
5611
  },
5503
5612
  const: "xai/grok-imagine-image-quality",
5504
5613
  examples: [
@@ -5732,13 +5841,29 @@ var image_generated_default = [
5732
5841
  "19.5:9",
5733
5842
  "9:19.5",
5734
5843
  "20:9",
5735
- "9:20",
5736
- "21:9",
5737
- "5:2"
5844
+ "9:20"
5738
5845
  ],
5739
5846
  "x-ui": {
5740
5847
  order: 4,
5741
- control: "select"
5848
+ control: "select",
5849
+ optionLabels: {
5850
+ auto: "\u81EA\u52A8",
5851
+ "1:1": "1:1",
5852
+ "16:9": "16:9",
5853
+ "9:16": "9:16",
5854
+ "4:3": "4:3",
5855
+ "3:4": "3:4",
5856
+ "3:2": "3:2",
5857
+ "2:3": "2:3",
5858
+ "2:1": "2:1",
5859
+ "1:2": "1:2",
5860
+ "19.5:9": "19.5:9",
5861
+ "9:19.5": "9:19.5",
5862
+ "20:9": "20:9",
5863
+ "9:20": "9:20",
5864
+ "21:9": "21:9",
5865
+ "5:2": "5:2"
5866
+ }
5742
5867
  },
5743
5868
  title: "\u753B\u9762\u6BD4\u4F8B"
5744
5869
  },
@@ -5751,7 +5876,11 @@ var image_generated_default = [
5751
5876
  title: "\u8F93\u51FA\u5206\u8FA8\u7387",
5752
5877
  "x-ui": {
5753
5878
  order: 5,
5754
- control: "select"
5879
+ control: "segmented",
5880
+ optionLabels: {
5881
+ "1k": "1K",
5882
+ "2k": "2K"
5883
+ }
5755
5884
  }
5756
5885
  },
5757
5886
  n: {
@@ -5764,7 +5893,7 @@ var image_generated_default = [
5764
5893
  title: "\u8F93\u51FA\u5F20\u6570",
5765
5894
  "x-ui": {
5766
5895
  order: 6,
5767
- control: "number"
5896
+ control: "range"
5768
5897
  }
5769
5898
  },
5770
5899
  response_format: {
@@ -5780,13 +5909,14 @@ var image_generated_default = [
5780
5909
  title: "\u56FE\u7247\u8FD4\u56DE\u683C\u5F0F",
5781
5910
  description: "url \u8FD4\u56DE\u56FE\u7247\u5730\u5740\uFF1Bb64_json \u8FD4\u56DE Base64\u3002",
5782
5911
  "x-ui": {
5783
- order: 7,
5912
+ order: 98,
5784
5913
  control: "select",
5785
5914
  optionLabels: {
5786
5915
  url: "\u56FE\u7247 URL",
5787
5916
  b64_json: "Base64",
5788
5917
  null: "\u4E0A\u6E38\u9ED8\u8BA4"
5789
- }
5918
+ },
5919
+ hidden: true
5790
5920
  }
5791
5921
  },
5792
5922
  user: {
@@ -5797,7 +5927,68 @@ var image_generated_default = [
5797
5927
  title: "\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6",
5798
5928
  description: "\u4F20\u7ED9 xAI \u7684\u7EC8\u7AEF\u7528\u6237\u6807\u8BC6\uFF0C\u7528\u4E8E\u6EE5\u7528\u76D1\u6D4B\u3002",
5799
5929
  "x-ui": {
5800
- order: 8
5930
+ order: 99,
5931
+ hidden: true
5932
+ }
5933
+ },
5934
+ storage_options: {
5935
+ type: [
5936
+ "object",
5937
+ "null"
5938
+ ],
5939
+ title: "\u4E0A\u6E38\u6587\u4EF6\u4FDD\u5B58\u9009\u9879",
5940
+ description: "\u5C06\u751F\u6210\u6216\u7F16\u8F91\u7ED3\u679C\u4FDD\u5B58\u5230 xAI Files API\uFF1Bfilename \u5FC5\u586B\u3002",
5941
+ required: [
5942
+ "filename"
5943
+ ],
5944
+ properties: {
5945
+ filename: {
5946
+ type: "string",
5947
+ minLength: 1,
5948
+ title: "\u6587\u4EF6\u540D"
5949
+ },
5950
+ expires_after: {
5951
+ type: [
5952
+ "integer",
5953
+ "null"
5954
+ ],
5955
+ minimum: 3600,
5956
+ maximum: 2592e3,
5957
+ title: "\u6587\u4EF6\u6709\u6548\u671F",
5958
+ description: "\u6587\u4EF6\u81EA\u52A8\u8FC7\u671F\u79D2\u6570\uFF0C\u8303\u56F4\u4E3A 3600 \u5230 2592000\uFF1B\u7559\u7A7A\u8868\u793A\u6C38\u4E45\u4FDD\u5B58\u3002"
5959
+ },
5960
+ public_url: {
5961
+ title: "\u516C\u5F00\u5730\u5740\u9009\u9879",
5962
+ description: "true \u4F7F\u7528\u9ED8\u8BA4\u8BBE\u7F6E\u521B\u5EFA\u516C\u5F00\u5730\u5740\uFF0Cfalse \u6216\u7559\u7A7A\u8868\u793A\u4E0D\u521B\u5EFA\uFF1B\u4E5F\u53EF\u5355\u72EC\u8BBE\u7F6E\u516C\u5F00\u5730\u5740\u6709\u6548\u671F\u3002",
5963
+ oneOf: [
5964
+ {
5965
+ type: "boolean"
5966
+ },
5967
+ {
5968
+ type: "object",
5969
+ properties: {
5970
+ expires_after: {
5971
+ type: [
5972
+ "integer",
5973
+ "null"
5974
+ ],
5975
+ minimum: 3600,
5976
+ maximum: 2592e3,
5977
+ title: "\u516C\u5F00\u5730\u5740\u6709\u6548\u671F",
5978
+ description: "\u516C\u5F00\u5730\u5740\u81EA\u52A8\u8FC7\u671F\u79D2\u6570\uFF0C\u8303\u56F4\u4E3A 3600 \u5230 2592000\u3002"
5979
+ }
5980
+ },
5981
+ additionalProperties: true
5982
+ },
5983
+ {
5984
+ type: "null"
5985
+ }
5986
+ ]
5987
+ }
5988
+ },
5989
+ additionalProperties: true,
5990
+ "x-ui": {
5991
+ order: 9
5801
5992
  }
5802
5993
  }
5803
5994
  },
@@ -5974,6 +6165,33 @@ var image_generated_default = [
5974
6165
  ],
5975
6166
  title: "\u8F93\u5165 Token"
5976
6167
  },
6168
+ input_tokens_details: {
6169
+ type: [
6170
+ "object",
6171
+ "null"
6172
+ ],
6173
+ title: "\u8F93\u5165 Token \u660E\u7EC6",
6174
+ required: [
6175
+ "cached_tokens",
6176
+ "image_tokens",
6177
+ "text_tokens"
6178
+ ],
6179
+ properties: {
6180
+ cached_tokens: {
6181
+ type: "integer",
6182
+ title: "\u7F13\u5B58\u6587\u672C Token"
6183
+ },
6184
+ image_tokens: {
6185
+ type: "integer",
6186
+ title: "\u8F93\u5165\u56FE\u7247 Token"
6187
+ },
6188
+ text_tokens: {
6189
+ type: "integer",
6190
+ title: "\u8F93\u5165\u6587\u672C Token"
6191
+ }
6192
+ },
6193
+ additionalProperties: true
6194
+ },
5977
6195
  output_tokens: {
5978
6196
  type: [
5979
6197
  "integer",
@@ -5981,6 +6199,33 @@ var image_generated_default = [
5981
6199
  ],
5982
6200
  title: "\u8F93\u51FA Token"
5983
6201
  },
6202
+ output_tokens_details: {
6203
+ type: [
6204
+ "object",
6205
+ "null"
6206
+ ],
6207
+ title: "\u8F93\u51FA Token \u660E\u7EC6",
6208
+ required: [
6209
+ "image_tokens",
6210
+ "reasoning_tokens",
6211
+ "text_tokens"
6212
+ ],
6213
+ properties: {
6214
+ image_tokens: {
6215
+ type: "integer",
6216
+ title: "\u8F93\u51FA\u56FE\u7247 Token"
6217
+ },
6218
+ reasoning_tokens: {
6219
+ type: "integer",
6220
+ title: "\u63A8\u7406 Token"
6221
+ },
6222
+ text_tokens: {
6223
+ type: "integer",
6224
+ title: "\u8F93\u51FA\u6587\u672C Token"
6225
+ }
6226
+ },
6227
+ additionalProperties: true
6228
+ },
5984
6229
  total_tokens: {
5985
6230
  type: [
5986
6231
  "integer",
@@ -6028,6 +6273,347 @@ var generatedCatalog = Object.freeze([
6028
6273
  ...image_generated_default
6029
6274
  ]);
6030
6275
 
6276
+ // src/catalog/media-geometry.ts
6277
+ var RATIO_FIELDS = ["ratio", "aspect_ratio", "aspectRatio"];
6278
+ var QUALITY_FIELDS = ["quality"];
6279
+ var TIER_PATTERN = /^(\d+(?:\.\d+)?)k$/i;
6280
+ var PIXEL_PATTERN = /^([1-9]\d{2,4})[x*]([1-9]\d{2,4})$/i;
6281
+ var QUALITY_LABELS = {
6282
+ auto: "\u81EA\u52A8",
6283
+ low: "\u4F4E",
6284
+ medium: "\u4E2D\u7B49",
6285
+ high: "\u9AD8",
6286
+ xhigh: "\u66F4\u9AD8",
6287
+ max: "\u6700\u9AD8",
6288
+ "1": "\u4F4E",
6289
+ "2": "\u4E2D\u7B49",
6290
+ "4": "\u9AD8"
6291
+ };
6292
+ var UNIFIED_TO_NUMERIC_QUALITY = {
6293
+ low: "1",
6294
+ medium: "2",
6295
+ high: "4"
6296
+ };
6297
+ var PIXEL_SIZE_BY_RATIO = {
6298
+ "1K": { "1:1": "1024x1024", "16:9": "1792x1008", "9:16": "1008x1792", "4:3": "1344x1008", "3:4": "1008x1344", "3:2": "1536x1024", "2:3": "1024x1536", "21:9": "2016x864", "9:21": "864x2016" },
6299
+ "2K": { "1:1": "2048x2048", "16:9": "2560x1440", "9:16": "1440x2560", "4:3": "2048x1536", "3:4": "1536x2048", "3:2": "2016x1344", "2:3": "1344x2016", "21:9": "2352x1008", "9:21": "1008x2352" },
6300
+ "4K": { "1:1": "2880x2880", "16:9": "3840x2160", "9:16": "2160x3840", "4:3": "3264x2448", "3:4": "2448x3264", "3:2": "3504x2336", "2:3": "2336x3504", "21:9": "3808x1632", "9:21": "1632x3808" }
6301
+ };
6302
+ var LITE_TIER_SIZE_BY_RATIO = {
6303
+ "1K": { "1:1": "1K", "4:3": "1152x864", "3:4": "864x1152", "16:9": "1424x800", "9:16": "800x1424", "3:2": "1248x832", "2:3": "832x1248", "21:9": "1568x672" },
6304
+ "2K": { "1:1": "2K", "4:3": "2304x1728", "3:4": "1728x2304", "16:9": "2848x1600", "9:16": "1600x2848", "3:2": "2496x1664", "2:3": "1664x2496", "21:9": "3136x1344" },
6305
+ "3K": { "1:1": "3K", "4:3": "3456x2592", "3:4": "2592x3456", "16:9": "4096x2304", "9:16": "2304x4096", "3:2": "3744x2496", "2:3": "2496x3744", "21:9": "4704x2016" },
6306
+ "4K": { "1:1": "4K", "4:3": "4704x3520", "3:4": "3520x4704", "16:9": "5504x3040", "9:16": "3040x5504", "3:2": "4992x3328", "2:3": "3328x4992", "21:9": "6240x2656" }
6307
+ };
6308
+ var PRO_TIER_SIZE_BY_RATIO = {
6309
+ "1K": { "1:1": "1K", "4:3": "1152x864", "3:4": "864x1152", "16:9": "1424x800", "9:16": "800x1424", "3:2": "1248x832", "2:3": "832x1248", "21:9": "1568x672" },
6310
+ "1.5K": { "1:1": "1.5K", "4:3": "1792x1344", "3:4": "1344x1792", "16:9": "2048x1152", "9:16": "1152x2048", "3:2": "1872x1248", "2:3": "1248x1872", "21:9": "2352x1008" },
6311
+ "2K": { "1:1": "2K", "4:3": "2368x1776", "3:4": "1776x2368", "16:9": "2816x1584", "9:16": "1584x2816", "3:2": "2496x1664", "2:3": "1664x2496", "21:9": "3136x1344" }
6312
+ };
6313
+ function isObject(value) {
6314
+ return Boolean(value) && typeof value === "object" && !Array.isArray(value);
6315
+ }
6316
+ function propertiesOf(schema) {
6317
+ if (!isObject(schema)) return {};
6318
+ return isObject(schema.properties) ? schema.properties : {};
6319
+ }
6320
+ function stringList(value) {
6321
+ if (!Array.isArray(value)) return [];
6322
+ return value.filter((item) => typeof item === "string" && item.length > 0);
6323
+ }
6324
+ function stringOptions(property) {
6325
+ const fromEnum = stringList(property.enum);
6326
+ if (fromEnum.length) return fromEnum;
6327
+ return stringList(property.examples);
6328
+ }
6329
+ function optionLabelsOf(property, options, fallback) {
6330
+ const ui = isObject(property["x-ui"]) ? property["x-ui"] : {};
6331
+ const fromSchema = isObject(ui.optionLabels) ? ui.optionLabels : {};
6332
+ const labels = {};
6333
+ for (const option of options) {
6334
+ const schemaLabel = fromSchema[option];
6335
+ labels[option] = typeof schemaLabel === "string" && schemaLabel ? schemaLabel : fallback[option] ?? option;
6336
+ }
6337
+ return labels;
6338
+ }
6339
+ function defaultOf(property, options) {
6340
+ return typeof property.default === "string" && property.default ? property.default : options[0];
6341
+ }
6342
+ function displayTier(value) {
6343
+ const matched = TIER_PATTERN.exec(value.trim());
6344
+ return matched ? `${matched[1]}K` : value.trim();
6345
+ }
6346
+ function sizeSeparator(property) {
6347
+ const pattern = typeof property.pattern === "string" ? property.pattern : "";
6348
+ if (pattern.includes("\\*") || pattern.includes("*")) return "*";
6349
+ return "x";
6350
+ }
6351
+ function collectTiers(property) {
6352
+ const fromText = [...stringOptions(property), typeof property.pattern === "string" ? property.pattern : ""].flatMap((text) => text.match(/\d+(?:\.\d+)?[kK]/g) ?? []);
6353
+ const unique = [...new Set(fromText.map(displayTier))];
6354
+ return unique;
6355
+ }
6356
+ function locate(root, names) {
6357
+ const nested = propertiesOf(root.parameters);
6358
+ for (const field of names) {
6359
+ if (isObject(root[field])) return { field, property: root[field] };
6360
+ }
6361
+ for (const field of names) {
6362
+ if (isObject(nested[field])) return { field, nest: "parameters", property: nested[field] };
6363
+ }
6364
+ return void 0;
6365
+ }
6366
+ function inspect(schema) {
6367
+ const root = propertiesOf(schema);
6368
+ const size = locate(root, ["size"]);
6369
+ const ratio = locate(root, RATIO_FIELDS);
6370
+ const resolution = locate(root, ["resolution"]);
6371
+ const quality = locate(root, QUALITY_FIELDS);
6372
+ if (resolution && ratio) return { kind: "resolution-ratio", size, ratio, resolution, quality };
6373
+ if (ratio && !size) return { kind: "ratio-only", size, ratio, resolution, quality };
6374
+ if (size) {
6375
+ const tiers = collectTiers(size.property);
6376
+ const kind = tiers.length > 0 ? "tier-size" : "pixel-size";
6377
+ return { kind, size, ratio, resolution, quality };
6378
+ }
6379
+ return { kind: "none", size, ratio, resolution, quality };
6380
+ }
6381
+ function identityLabels(options) {
6382
+ return Object.fromEntries(options.map((option) => [option, option]));
6383
+ }
6384
+ function pixelDimensions(size) {
6385
+ const matched = PIXEL_PATTERN.exec(size.replaceAll("*", "x"));
6386
+ return matched ? [Number(matched[1]), Number(matched[2])] : void 0;
6387
+ }
6388
+ function maxExampleEdge(property) {
6389
+ const edges = stringList(property.examples).flatMap((example) => pixelDimensions(example) ?? []);
6390
+ return edges.length ? Math.max(...edges) : void 0;
6391
+ }
6392
+ function matchesSize(property, mapped) {
6393
+ const size = rewriteSeparator(mapped, sizeSeparator(property));
6394
+ const pattern = typeof property.pattern === "string" ? property.pattern : "";
6395
+ if (pattern) {
6396
+ try {
6397
+ if (!new RegExp(pattern).test(size)) return false;
6398
+ } catch {
6399
+ return false;
6400
+ }
6401
+ }
6402
+ const dims = pixelDimensions(size);
6403
+ const exampleMax = maxExampleEdge(property);
6404
+ const kTiers = collectTiers(property);
6405
+ if (kTiers.length === 0 && dims && exampleMax !== void 0 && exampleMax <= 2048 && Math.max(dims[0], dims[1]) > 2048) return false;
6406
+ return true;
6407
+ }
6408
+ function filterTable(table, property, allowedTiers) {
6409
+ const filtered = {};
6410
+ for (const [resolution, ratios] of Object.entries(table)) {
6411
+ if (allowedTiers && !allowedTiers.includes(resolution)) continue;
6412
+ const kept = {};
6413
+ for (const [ratio, mapped] of Object.entries(ratios)) {
6414
+ if (matchesSize(property, mapped)) kept[ratio] = mapped;
6415
+ }
6416
+ if (Object.keys(kept).length > 0) filtered[resolution] = kept;
6417
+ }
6418
+ return filtered;
6419
+ }
6420
+ function tableFor(kind, size) {
6421
+ if (!size) return void 0;
6422
+ if (kind === "pixel-size") {
6423
+ const source = sizeSeparator(size.property) === "*" ? { "1K": PIXEL_SIZE_BY_RATIO["1K"] } : PIXEL_SIZE_BY_RATIO;
6424
+ return filterTable(source, size.property);
6425
+ }
6426
+ if (kind === "tier-size") {
6427
+ const tiers = collectTiers(size.property);
6428
+ const source = tiers.includes("1.5K") ? PRO_TIER_SIZE_BY_RATIO : LITE_TIER_SIZE_BY_RATIO;
6429
+ return filterTable(source, size.property, tiers);
6430
+ }
6431
+ return void 0;
6432
+ }
6433
+ function rewriteSeparator(size, separator) {
6434
+ return separator === "*" ? size.replaceAll("x", "*") : size.replaceAll("*", "x");
6435
+ }
6436
+ function matchOption(property, value, label) {
6437
+ const options = stringOptions(property);
6438
+ if (options.length === 0) return value;
6439
+ const exact = options.find((option) => option === value);
6440
+ if (exact) return exact;
6441
+ const ignoredCase = options.find((option) => option.toLowerCase() === value.toLowerCase());
6442
+ if (ignoredCase) return ignoredCase;
6443
+ throw new Error(`Nexra catalog has no ${label} option ${value}`);
6444
+ }
6445
+ function fieldView(located, options, fallbackLabels) {
6446
+ return {
6447
+ field: located.field,
6448
+ ...located.nest ? { nest: located.nest } : {},
6449
+ options,
6450
+ default: defaultOf(located.property, options),
6451
+ optionLabels: optionLabelsOf(located.property, options, fallbackLabels)
6452
+ };
6453
+ }
6454
+ function ratioView(located, options) {
6455
+ const view = fieldView(located, options, identityLabels(options));
6456
+ return { ...view, optionLabels: identityLabels(options) };
6457
+ }
6458
+ function writeField(output, located, value) {
6459
+ if (!located.nest) {
6460
+ output[located.field] = value;
6461
+ return;
6462
+ }
6463
+ const current = output[located.nest];
6464
+ const nested = isObject(current) ? { ...current } : {};
6465
+ nested[located.field] = value;
6466
+ output[located.nest] = nested;
6467
+ }
6468
+ function readField(input, located) {
6469
+ if (!located.nest) {
6470
+ const value2 = input[located.field];
6471
+ return typeof value2 === "string" ? value2 : void 0;
6472
+ }
6473
+ const nested = input[located.nest];
6474
+ if (!isObject(nested)) return void 0;
6475
+ const value = nested[located.field];
6476
+ return typeof value === "string" ? value : void 0;
6477
+ }
6478
+ function reverseLookup(table, size) {
6479
+ const normalized = size.replaceAll("*", "x");
6480
+ if (TIER_PATTERN.test(normalized)) return { resolution: displayTier(normalized), ratio: "1:1" };
6481
+ for (const [resolution, ratios] of Object.entries(table)) {
6482
+ for (const [ratio, mapped] of Object.entries(ratios)) {
6483
+ if (mapped.replaceAll("*", "x") === normalized) return { resolution, ratio };
6484
+ }
6485
+ }
6486
+ return void 0;
6487
+ }
6488
+ function projectMediaGeometry(inputSchema) {
6489
+ const inspected = inspect(inputSchema);
6490
+ const table = tableFor(inspected.kind, inspected.size);
6491
+ const quality = inspected.quality ? fieldView(inspected.quality, stringOptions(inspected.quality.property), QUALITY_LABELS) : void 0;
6492
+ if (inspected.kind === "resolution-ratio" && inspected.resolution && inspected.ratio) {
6493
+ const resolutionOptions = stringOptions(inspected.resolution.property).map(displayTier);
6494
+ const ratioOptions = stringOptions(inspected.ratio.property);
6495
+ return {
6496
+ kind: inspected.kind,
6497
+ resolution: fieldView(inspected.resolution, resolutionOptions, identityLabels(resolutionOptions)),
6498
+ ratio: ratioView(inspected.ratio, ratioOptions),
6499
+ ...quality ? { quality } : {}
6500
+ };
6501
+ }
6502
+ if (inspected.kind === "ratio-only" && inspected.ratio) {
6503
+ const ratioOptions = stringOptions(inspected.ratio.property);
6504
+ return { kind: inspected.kind, ratio: ratioView(inspected.ratio, ratioOptions), ...quality ? { quality } : {} };
6505
+ }
6506
+ if ((inspected.kind === "pixel-size" || inspected.kind === "tier-size") && inspected.size && table) {
6507
+ const resolutionOptions = Object.keys(table);
6508
+ const ratioOptions = [...new Set(Object.values(table).flatMap((ratios) => Object.keys(ratios)))];
6509
+ return {
6510
+ kind: inspected.kind,
6511
+ resolution: {
6512
+ field: "resolution",
6513
+ options: resolutionOptions,
6514
+ default: resolutionOptions.includes("2K") ? "2K" : resolutionOptions[0],
6515
+ optionLabels: identityLabels(resolutionOptions)
6516
+ },
6517
+ ratio: {
6518
+ field: "ratio",
6519
+ options: ratioOptions,
6520
+ default: ratioOptions.includes("1:1") ? "1:1" : ratioOptions[0],
6521
+ optionLabels: identityLabels(ratioOptions)
6522
+ },
6523
+ ...quality ? { quality } : {}
6524
+ };
6525
+ }
6526
+ return { kind: "none", ...quality ? { quality } : {} };
6527
+ }
6528
+ function encodeMediaGeometry(inputSchema, geometry) {
6529
+ const inspected = inspect(inputSchema);
6530
+ const output = {};
6531
+ const resolution = geometry.resolution?.trim();
6532
+ const ratio = geometry.ratio?.trim();
6533
+ const quality = geometry.quality?.trim();
6534
+ if (inspected.kind === "resolution-ratio" && inspected.resolution && inspected.ratio) {
6535
+ if (resolution) writeField(output, inspected.resolution, matchOption(inspected.resolution.property, resolution, "resolution"));
6536
+ if (ratio) writeField(output, inspected.ratio, matchOption(inspected.ratio.property, ratio, "ratio"));
6537
+ } else if (inspected.kind === "ratio-only" && inspected.ratio && ratio) {
6538
+ writeField(output, inspected.ratio, matchOption(inspected.ratio.property, ratio, "ratio"));
6539
+ } else if ((inspected.kind === "pixel-size" || inspected.kind === "tier-size") && inspected.size && resolution && ratio) {
6540
+ const table = tableFor(inspected.kind, inspected.size);
6541
+ const mapped = table?.[displayTier(resolution)]?.[ratio];
6542
+ if (!mapped) throw new Error(`Nexra catalog has no size for ${ratio} ${displayTier(resolution)}`);
6543
+ writeField(output, inspected.size, rewriteSeparator(mapped, sizeSeparator(inspected.size.property)));
6544
+ }
6545
+ if (quality && inspected.quality) {
6546
+ const options = stringOptions(inspected.quality.property);
6547
+ const numeric = UNIFIED_TO_NUMERIC_QUALITY[quality];
6548
+ const candidate = numeric && options.includes(numeric) ? numeric : quality;
6549
+ writeField(output, inspected.quality, matchOption(inspected.quality.property, candidate, "quality"));
6550
+ }
6551
+ return output;
6552
+ }
6553
+ function decodeMediaGeometry(inputSchema, nativeInput) {
6554
+ const inspected = inspect(inputSchema);
6555
+ const quality = inspected.quality ? readField(nativeInput, inspected.quality) : void 0;
6556
+ const decodedQuality = quality && UNIFIED_TO_NUMERIC_QUALITY.low && quality === "1" ? "low" : quality === "2" ? "medium" : quality === "4" ? "high" : quality;
6557
+ if (inspected.kind === "resolution-ratio" && inspected.resolution && inspected.ratio) {
6558
+ const resolution = readField(nativeInput, inspected.resolution);
6559
+ const ratio = readField(nativeInput, inspected.ratio);
6560
+ return {
6561
+ ...resolution ? { resolution: displayTier(resolution) } : {},
6562
+ ...ratio && ratio !== "auto" ? { ratio } : {},
6563
+ ...decodedQuality ? { quality: decodedQuality } : {}
6564
+ };
6565
+ }
6566
+ if (inspected.kind === "ratio-only" && inspected.ratio) {
6567
+ const ratio = readField(nativeInput, inspected.ratio);
6568
+ return { ...ratio ? { ratio } : {}, ...decodedQuality ? { quality: decodedQuality } : {} };
6569
+ }
6570
+ if ((inspected.kind === "pixel-size" || inspected.kind === "tier-size") && inspected.size) {
6571
+ const size = readField(nativeInput, inspected.size);
6572
+ const table = tableFor(inspected.kind, inspected.size);
6573
+ const mapped = size && table ? reverseLookup(table, size) : void 0;
6574
+ return { ...mapped, ...decodedQuality ? { quality: decodedQuality } : {} };
6575
+ }
6576
+ return decodedQuality ? { quality: decodedQuality } : {};
6577
+ }
6578
+ function unifiedFromInput(input) {
6579
+ return {
6580
+ ...typeof input.resolution === "string" ? { resolution: input.resolution } : {},
6581
+ ...typeof input.ratio === "string" ? { ratio: input.ratio } : typeof input.aspectRatio === "string" ? { ratio: input.aspectRatio } : typeof input.aspect_ratio === "string" ? { ratio: input.aspect_ratio } : {},
6582
+ ...typeof input.quality === "string" ? { quality: input.quality } : {}
6583
+ };
6584
+ }
6585
+ function applyMediaGeometry(inputSchema, input) {
6586
+ const inspected = inspect(inputSchema);
6587
+ const next = { ...input };
6588
+ if (inspected.size?.nest === "parameters" && isObject(input.parameters)) {
6589
+ next.parameters = { ...input.parameters };
6590
+ }
6591
+ const nativeSize = inspected.size ? readField(next, inspected.size) : void 0;
6592
+ const unified = unifiedFromInput(next);
6593
+ const shouldEncode = Boolean(
6594
+ (unified.resolution || unified.ratio || unified.quality) && !nativeSize
6595
+ );
6596
+ if (!shouldEncode) return next;
6597
+ const encoded = encodeMediaGeometry(inputSchema, unified);
6598
+ if (isObject(encoded.parameters) && isObject(next.parameters)) {
6599
+ next.parameters = { ...next.parameters, ...encoded.parameters };
6600
+ } else {
6601
+ Object.assign(next, encoded);
6602
+ }
6603
+ const ratioField = inspected.ratio?.field;
6604
+ if (inspected.kind === "pixel-size" || inspected.kind === "tier-size") {
6605
+ delete next.resolution;
6606
+ delete next.ratio;
6607
+ delete next.aspectRatio;
6608
+ delete next.aspect_ratio;
6609
+ } else {
6610
+ if (ratioField !== "ratio") delete next.ratio;
6611
+ if (ratioField !== "aspectRatio") delete next.aspectRatio;
6612
+ if (ratioField !== "aspect_ratio") delete next.aspect_ratio;
6613
+ }
6614
+ return next;
6615
+ }
6616
+
6031
6617
  // src/errors.ts
6032
6618
  var NexraApiError = class extends Error {
6033
6619
  status;
@@ -6065,7 +6651,7 @@ var NexraWaitTimeoutError = class extends Error {
6065
6651
  };
6066
6652
 
6067
6653
  // src/generated/version.generated.ts
6068
- var SDK_VERSION = "0.1.0-alpha.4";
6654
+ var SDK_VERSION = "0.1.0-alpha.6";
6069
6655
 
6070
6656
  // src/transport.ts
6071
6657
  var DEFAULT_BASE_URL = "https://api.nexra-ai.com/v1";
@@ -6202,9 +6788,12 @@ var CatalogClient = class {
6202
6788
  }
6203
6789
  transport;
6204
6790
  quote(request, signal) {
6791
+ const spec = getModelSpec(request.modelId);
6792
+ const schema = spec?.operations.find((operation) => operation.operation === request.operation)?.inputSchema ?? spec?.operations[0]?.inputSchema;
6793
+ const input = schema ? applyMediaGeometry(schema, request.input) : request.input;
6205
6794
  return this.transport.json(
6206
6795
  "/catalog/quotes",
6207
- { method: "POST", ...jsonBody(request), signal },
6796
+ { method: "POST", ...jsonBody({ ...request, input }), signal },
6208
6797
  { retryable: false }
6209
6798
  );
6210
6799
  }
@@ -6233,6 +6822,10 @@ export {
6233
6822
  jsonBody,
6234
6823
  queryString,
6235
6824
  sleep,
6825
+ projectMediaGeometry,
6826
+ encodeMediaGeometry,
6827
+ decodeMediaGeometry,
6828
+ applyMediaGeometry,
6236
6829
  CatalogClient,
6237
6830
  getModelSpec,
6238
6831
  listModelSpecs