@scenario-labs/sdk 1.1.0 → 2.0.0

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 (236) hide show
  1. package/CHANGELOG.md +51 -0
  2. package/client.d.mts +6 -6
  3. package/client.d.mts.map +1 -1
  4. package/client.d.ts +6 -6
  5. package/client.d.ts.map +1 -1
  6. package/client.js +67 -43
  7. package/client.js.map +1 -1
  8. package/client.mjs +67 -44
  9. package/client.mjs.map +1 -1
  10. package/core/api-promise.js +7 -7
  11. package/core/api-promise.js.map +1 -1
  12. package/core/api-promise.mjs +7 -7
  13. package/core/api-promise.mjs.map +1 -1
  14. package/core/error.js +6 -0
  15. package/core/error.js.map +1 -1
  16. package/core/error.mjs +6 -0
  17. package/core/error.mjs.map +1 -1
  18. package/core/pagination.js +24 -6
  19. package/core/pagination.js.map +1 -1
  20. package/core/pagination.mjs +24 -6
  21. package/core/pagination.mjs.map +1 -1
  22. package/core/resource.js +1 -0
  23. package/core/resource.js.map +1 -1
  24. package/core/resource.mjs +1 -0
  25. package/core/resource.mjs.map +1 -1
  26. package/index.d.mts +1 -0
  27. package/index.d.mts.map +1 -1
  28. package/index.d.ts +1 -0
  29. package/index.d.ts.map +1 -1
  30. package/index.js +3 -1
  31. package/index.js.map +1 -1
  32. package/index.mjs +1 -0
  33. package/index.mjs.map +1 -1
  34. package/internal/detect-platform.js +1 -1
  35. package/internal/detect-platform.js.map +1 -1
  36. package/internal/detect-platform.mjs +1 -1
  37. package/internal/detect-platform.mjs.map +1 -1
  38. package/internal/qs/stringify.js +1 -1
  39. package/internal/qs/stringify.js.map +1 -1
  40. package/internal/qs/stringify.mjs +1 -1
  41. package/internal/qs/stringify.mjs.map +1 -1
  42. package/internal/request-options.d.mts +0 -4
  43. package/internal/request-options.d.mts.map +1 -1
  44. package/internal/request-options.d.ts +0 -4
  45. package/internal/request-options.d.ts.map +1 -1
  46. package/internal/request-options.js.map +1 -1
  47. package/internal/request-options.mjs.map +1 -1
  48. package/internal/to-file.js +2 -2
  49. package/internal/to-file.js.map +1 -1
  50. package/internal/to-file.mjs +2 -2
  51. package/internal/to-file.mjs.map +1 -1
  52. package/internal/tslib.js +0 -18
  53. package/internal/tslib.mjs +1 -17
  54. package/internal/types.d.mts +6 -6
  55. package/internal/types.d.mts.map +1 -1
  56. package/internal/types.d.ts +6 -6
  57. package/internal/types.d.ts.map +1 -1
  58. package/internal/utils/log.d.mts.map +1 -1
  59. package/internal/utils/log.d.ts.map +1 -1
  60. package/internal/utils/log.js +2 -0
  61. package/internal/utils/log.js.map +1 -1
  62. package/internal/utils/log.mjs +2 -0
  63. package/internal/utils/log.mjs.map +1 -1
  64. package/lib/job.js +3 -3
  65. package/lib/job.js.map +1 -1
  66. package/lib/job.mjs +3 -3
  67. package/lib/job.mjs.map +1 -1
  68. package/lib/models.js +1 -4
  69. package/lib/models.js.map +1 -1
  70. package/lib/models.mjs +1 -4
  71. package/lib/models.mjs.map +1 -1
  72. package/lib/scenario.js +6 -9
  73. package/lib/scenario.js.map +1 -1
  74. package/lib/scenario.mjs +6 -9
  75. package/lib/scenario.mjs.map +1 -1
  76. package/lib/upload.js +6 -6
  77. package/lib/upload.js.map +1 -1
  78. package/lib/upload.mjs +6 -6
  79. package/lib/upload.mjs.map +1 -1
  80. package/lib/workflow.d.mts +2 -2
  81. package/lib/workflow.d.mts.map +1 -1
  82. package/lib/workflow.d.ts +2 -2
  83. package/lib/workflow.d.ts.map +1 -1
  84. package/lib/workflow.js +2 -2
  85. package/lib/workflow.js.map +1 -1
  86. package/lib/workflow.mjs +2 -2
  87. package/lib/workflow.mjs.map +1 -1
  88. package/lib/workflow_converter.d.mts +174 -0
  89. package/lib/workflow_converter.d.mts.map +1 -0
  90. package/lib/workflow_converter.d.ts +174 -0
  91. package/lib/workflow_converter.d.ts.map +1 -0
  92. package/lib/workflow_converter.js +995 -0
  93. package/lib/workflow_converter.js.map +1 -0
  94. package/lib/workflow_converter.mjs +992 -0
  95. package/lib/workflow_converter.mjs.map +1 -0
  96. package/package.json +1 -1
  97. package/resources/assets/assets.d.mts +13 -5
  98. package/resources/assets/assets.d.mts.map +1 -1
  99. package/resources/assets/assets.d.ts +13 -5
  100. package/resources/assets/assets.d.ts.map +1 -1
  101. package/resources/assets/assets.js +1 -8
  102. package/resources/assets/assets.js.map +1 -1
  103. package/resources/assets/assets.mjs +1 -8
  104. package/resources/assets/assets.mjs.map +1 -1
  105. package/resources/assets/index.d.mts +0 -1
  106. package/resources/assets/index.d.mts.map +1 -1
  107. package/resources/assets/index.d.ts +0 -1
  108. package/resources/assets/index.d.ts.map +1 -1
  109. package/resources/assets/index.js +1 -3
  110. package/resources/assets/index.js.map +1 -1
  111. package/resources/assets/index.mjs +0 -1
  112. package/resources/assets/index.mjs.map +1 -1
  113. package/resources/collections/collections.js +2 -5
  114. package/resources/collections/collections.js.map +1 -1
  115. package/resources/collections/collections.mjs +2 -5
  116. package/resources/collections/collections.mjs.map +1 -1
  117. package/resources/generate.d.mts +96 -0
  118. package/resources/generate.d.mts.map +1 -1
  119. package/resources/generate.d.ts +96 -0
  120. package/resources/generate.d.ts.map +1 -1
  121. package/resources/index.d.mts +2 -1
  122. package/resources/index.d.mts.map +1 -1
  123. package/resources/index.d.ts +2 -1
  124. package/resources/index.d.ts.map +1 -1
  125. package/resources/index.js +3 -1
  126. package/resources/index.js.map +1 -1
  127. package/resources/index.mjs +1 -0
  128. package/resources/index.mjs.map +1 -1
  129. package/resources/jobs.d.mts +46 -3
  130. package/resources/jobs.d.mts.map +1 -1
  131. package/resources/jobs.d.ts +46 -3
  132. package/resources/jobs.d.ts.map +1 -1
  133. package/resources/models/examples.d.mts +24 -0
  134. package/resources/models/examples.d.mts.map +1 -1
  135. package/resources/models/examples.d.ts +24 -0
  136. package/resources/models/examples.d.ts.map +1 -1
  137. package/resources/models/models.d.mts +55 -11
  138. package/resources/models/models.d.mts.map +1 -1
  139. package/resources/models/models.d.ts +55 -11
  140. package/resources/models/models.d.ts.map +1 -1
  141. package/resources/models/models.js +4 -7
  142. package/resources/models/models.js.map +1 -1
  143. package/resources/models/models.mjs +4 -7
  144. package/resources/models/models.mjs.map +1 -1
  145. package/resources/models/train.d.mts +24 -0
  146. package/resources/models/train.d.mts.map +1 -1
  147. package/resources/models/train.d.ts +24 -0
  148. package/resources/models/train.d.ts.map +1 -1
  149. package/resources/oscu.d.mts +5 -0
  150. package/resources/oscu.d.mts.map +1 -1
  151. package/resources/oscu.d.ts +5 -0
  152. package/resources/oscu.d.ts.map +1 -1
  153. package/resources/oscu.js +5 -0
  154. package/resources/oscu.js.map +1 -1
  155. package/resources/oscu.mjs +5 -0
  156. package/resources/oscu.mjs.map +1 -1
  157. package/resources/pricing/index.d.mts +3 -0
  158. package/resources/pricing/index.d.mts.map +1 -0
  159. package/resources/pricing/index.d.ts +3 -0
  160. package/resources/pricing/index.d.ts.map +1 -0
  161. package/resources/pricing/index.js +9 -0
  162. package/resources/pricing/index.js.map +1 -0
  163. package/resources/pricing/index.mjs +4 -0
  164. package/resources/pricing/index.mjs.map +1 -0
  165. package/resources/pricing/oscu.d.mts +25 -0
  166. package/resources/pricing/oscu.d.mts.map +1 -0
  167. package/resources/pricing/oscu.d.ts +25 -0
  168. package/resources/pricing/oscu.d.ts.map +1 -0
  169. package/resources/pricing/oscu.js +16 -0
  170. package/resources/pricing/oscu.js.map +1 -0
  171. package/resources/pricing/oscu.mjs +12 -0
  172. package/resources/pricing/oscu.mjs.map +1 -0
  173. package/resources/pricing/pricing.d.mts +10 -0
  174. package/resources/pricing/pricing.d.mts.map +1 -0
  175. package/resources/pricing/pricing.d.ts +10 -0
  176. package/resources/pricing/pricing.d.ts.map +1 -0
  177. package/resources/pricing/pricing.js +14 -0
  178. package/resources/pricing/pricing.js.map +1 -0
  179. package/resources/pricing/pricing.mjs +9 -0
  180. package/resources/pricing/pricing.mjs.map +1 -0
  181. package/resources/pricing.d.mts +2 -0
  182. package/resources/pricing.d.mts.map +1 -0
  183. package/resources/pricing.d.ts +2 -0
  184. package/resources/pricing.d.ts.map +1 -0
  185. package/resources/pricing.js +6 -0
  186. package/resources/pricing.js.map +1 -0
  187. package/resources/pricing.mjs +3 -0
  188. package/resources/pricing.mjs.map +1 -0
  189. package/resources/usages.d.mts +29 -4
  190. package/resources/usages.d.mts.map +1 -1
  191. package/resources/usages.d.ts +29 -4
  192. package/resources/usages.d.ts.map +1 -1
  193. package/resources/workflows.d.mts +1298 -1152
  194. package/resources/workflows.d.mts.map +1 -1
  195. package/resources/workflows.d.ts +1298 -1152
  196. package/resources/workflows.d.ts.map +1 -1
  197. package/resources/workflows.js +8 -4
  198. package/resources/workflows.js.map +1 -1
  199. package/resources/workflows.mjs +8 -4
  200. package/resources/workflows.mjs.map +1 -1
  201. package/src/client.ts +24 -11
  202. package/src/index.ts +14 -0
  203. package/src/internal/request-options.ts +0 -2
  204. package/src/internal/types.ts +6 -8
  205. package/src/internal/utils/log.ts +2 -0
  206. package/src/lib/workflow.ts +4 -4
  207. package/src/lib/workflow_converter.ts +1250 -0
  208. package/src/resources/assets/assets.ts +17 -13
  209. package/src/resources/assets/index.ts +0 -6
  210. package/src/resources/generate.ts +112 -0
  211. package/src/resources/index.ts +3 -1
  212. package/src/resources/jobs.ts +54 -4
  213. package/src/resources/models/examples.ts +28 -0
  214. package/src/resources/models/models.ts +100 -11
  215. package/src/resources/models/train.ts +28 -0
  216. package/src/resources/oscu.ts +5 -0
  217. package/src/resources/pricing/index.ts +4 -0
  218. package/src/resources/pricing/oscu.ts +35 -0
  219. package/src/resources/pricing/pricing.ts +15 -0
  220. package/src/resources/pricing.ts +3 -0
  221. package/src/resources/usages.ts +33 -3
  222. package/src/resources/workflows.ts +1691 -1519
  223. package/src/version.ts +1 -1
  224. package/version.d.mts +1 -1
  225. package/version.d.ts +1 -1
  226. package/version.js +1 -1
  227. package/version.mjs +1 -1
  228. package/resources/assets/public.d.mts +0 -1538
  229. package/resources/assets/public.d.mts.map +0 -1
  230. package/resources/assets/public.d.ts +0 -1538
  231. package/resources/assets/public.d.ts.map +0 -1
  232. package/resources/assets/public.js +0 -28
  233. package/resources/assets/public.js.map +0 -1
  234. package/resources/assets/public.mjs +0 -24
  235. package/resources/assets/public.mjs.map +0 -1
  236. package/src/resources/assets/public.ts +0 -2461
@@ -10,8 +10,6 @@ import {
10
10
  DownloadRequestParams,
11
11
  DownloadRequestResponse,
12
12
  } from './download';
13
- import * as PublicAPI from './public';
14
- import { Public, PublicListParams, PublicListResponse, PublicRetrieveResponse } from './public';
15
13
  import { APIPromise } from '../../core/api-promise';
16
14
  import {
17
15
  AssetsCursor,
@@ -25,7 +23,6 @@ import { path } from '../../internal/utils/path';
25
23
 
26
24
  export class Assets extends APIResource {
27
25
  download: DownloadAPI.Download = new DownloadAPI.Download(this._client);
28
- public: PublicAPI.Public = new PublicAPI.Public(this._client);
29
26
 
30
27
  /**
31
28
  * Get the details of an asset. Supports both public access (via the
@@ -9491,6 +9488,13 @@ export namespace AssetUploadResponse {
9491
9488
  */
9492
9489
  max?: number;
9493
9490
 
9491
+ /**
9492
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
9493
+ * \`file_array\` input types for video and audio assets. Validated against
9494
+ * \`asset.properties.duration\` at job creation time.
9495
+ */
9496
+ maxDuration?: number;
9497
+
9494
9498
  /**
9495
9499
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
9496
9500
  * \`string_array\`.
@@ -9717,6 +9721,13 @@ export namespace AssetUploadResponse {
9717
9721
  */
9718
9722
  max?: number;
9719
9723
 
9724
+ /**
9725
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
9726
+ * \`file_array\` input types for video and audio assets. Validated against
9727
+ * \`asset.properties.duration\` at job creation time.
9728
+ */
9729
+ maxDuration?: number;
9730
+
9720
9731
  /**
9721
9732
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
9722
9733
  * \`string_array\`.
@@ -10296,7 +10307,7 @@ export interface AssetListParams extends AssetsCursorParams {
10296
10307
  * video2video, video2img, txt2img, img2img, txt2video, uploaded, uploaded-video,
10297
10308
  * uploaded-audio, uploaded-3d, uploaded-avatar, upscale-video
10298
10309
  */
10299
- types?:
10310
+ types?: Array<
10300
10311
  | 'inference-txt2img'
10301
10312
  | 'inference-txt2img-ip-adapter'
10302
10313
  | 'inference-txt2img-texture'
@@ -10371,7 +10382,8 @@ export interface AssetListParams extends AssetsCursorParams {
10371
10382
  | 'uploaded-audio'
10372
10383
  | 'uploaded-3d'
10373
10384
  | 'uploaded-avatar'
10374
- | 'upscale-video';
10385
+ | 'upscale-video'
10386
+ >;
10375
10387
 
10376
10388
  /**
10377
10389
  * Filter results to only return assets updated after the specified ISO string date
@@ -10523,7 +10535,6 @@ export interface AssetUploadParams {
10523
10535
  }
10524
10536
 
10525
10537
  Assets.Download = Download;
10526
- Assets.Public = Public;
10527
10538
 
10528
10539
  export declare namespace Assets {
10529
10540
  export {
@@ -10561,11 +10572,4 @@ export declare namespace Assets {
10561
10572
  type DownloadRequestParams as DownloadRequestParams,
10562
10573
  type DownloadRequestBatchParams as DownloadRequestBatchParams,
10563
10574
  };
10564
-
10565
- export {
10566
- Public as Public,
10567
- type PublicRetrieveResponse as PublicRetrieveResponse,
10568
- type PublicListResponse as PublicListResponse,
10569
- type PublicListParams as PublicListParams,
10570
- };
10571
10575
  }
@@ -35,9 +35,3 @@ export {
35
35
  type DownloadRequestParams,
36
36
  type DownloadRequestBatchParams,
37
37
  } from './download';
38
- export {
39
- Public,
40
- type PublicRetrieveResponse,
41
- type PublicListResponse,
42
- type PublicListParams,
43
- } from './public';
@@ -509,6 +509,13 @@ export namespace GenerateCaptionResponse {
509
509
  */
510
510
  max?: number;
511
511
 
512
+ /**
513
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
514
+ * \`file_array\` input types for video and audio assets. Validated against
515
+ * \`asset.properties.duration\` at job creation time.
516
+ */
517
+ maxDuration?: number;
518
+
512
519
  /**
513
520
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
514
521
  * \`string_array\`.
@@ -735,6 +742,13 @@ export namespace GenerateCaptionResponse {
735
742
  */
736
743
  max?: number;
737
744
 
745
+ /**
746
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
747
+ * \`file_array\` input types for video and audio assets. Validated against
748
+ * \`asset.properties.duration\` at job creation time.
749
+ */
750
+ maxDuration?: number;
751
+
738
752
  /**
739
753
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
740
754
  * \`string_array\`.
@@ -1481,6 +1495,13 @@ export namespace GenerateDescribeStyleResponse {
1481
1495
  */
1482
1496
  max?: number;
1483
1497
 
1498
+ /**
1499
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
1500
+ * \`file_array\` input types for video and audio assets. Validated against
1501
+ * \`asset.properties.duration\` at job creation time.
1502
+ */
1503
+ maxDuration?: number;
1504
+
1484
1505
  /**
1485
1506
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
1486
1507
  * \`string_array\`.
@@ -1707,6 +1728,13 @@ export namespace GenerateDescribeStyleResponse {
1707
1728
  */
1708
1729
  max?: number;
1709
1730
 
1731
+ /**
1732
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
1733
+ * \`file_array\` input types for video and audio assets. Validated against
1734
+ * \`asset.properties.duration\` at job creation time.
1735
+ */
1736
+ maxDuration?: number;
1737
+
1710
1738
  /**
1711
1739
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
1712
1740
  * \`string_array\`.
@@ -2445,6 +2473,13 @@ export namespace GenerateDetectResponse {
2445
2473
  */
2446
2474
  max?: number;
2447
2475
 
2476
+ /**
2477
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
2478
+ * \`file_array\` input types for video and audio assets. Validated against
2479
+ * \`asset.properties.duration\` at job creation time.
2480
+ */
2481
+ maxDuration?: number;
2482
+
2448
2483
  /**
2449
2484
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
2450
2485
  * \`string_array\`.
@@ -2671,6 +2706,13 @@ export namespace GenerateDetectResponse {
2671
2706
  */
2672
2707
  max?: number;
2673
2708
 
2709
+ /**
2710
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
2711
+ * \`file_array\` input types for video and audio assets. Validated against
2712
+ * \`asset.properties.duration\` at job creation time.
2713
+ */
2714
+ maxDuration?: number;
2715
+
2674
2716
  /**
2675
2717
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
2676
2718
  * \`string_array\`.
@@ -4524,6 +4566,13 @@ export namespace GenerateEmbedResponse {
4524
4566
  */
4525
4567
  max?: number;
4526
4568
 
4569
+ /**
4570
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
4571
+ * \`file_array\` input types for video and audio assets. Validated against
4572
+ * \`asset.properties.duration\` at job creation time.
4573
+ */
4574
+ maxDuration?: number;
4575
+
4527
4576
  /**
4528
4577
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
4529
4578
  * \`string_array\`.
@@ -4750,6 +4799,13 @@ export namespace GenerateEmbedResponse {
4750
4799
  */
4751
4800
  max?: number;
4752
4801
 
4802
+ /**
4803
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
4804
+ * \`file_array\` input types for video and audio assets. Validated against
4805
+ * \`asset.properties.duration\` at job creation time.
4806
+ */
4807
+ maxDuration?: number;
4808
+
4753
4809
  /**
4754
4810
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
4755
4811
  * \`string_array\`.
@@ -5488,6 +5544,13 @@ export namespace GeneratePatchResponse {
5488
5544
  */
5489
5545
  max?: number;
5490
5546
 
5547
+ /**
5548
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
5549
+ * \`file_array\` input types for video and audio assets. Validated against
5550
+ * \`asset.properties.duration\` at job creation time.
5551
+ */
5552
+ maxDuration?: number;
5553
+
5491
5554
  /**
5492
5555
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
5493
5556
  * \`string_array\`.
@@ -5714,6 +5777,13 @@ export namespace GeneratePatchResponse {
5714
5777
  */
5715
5778
  max?: number;
5716
5779
 
5780
+ /**
5781
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
5782
+ * \`file_array\` input types for video and audio assets. Validated against
5783
+ * \`asset.properties.duration\` at job creation time.
5784
+ */
5785
+ maxDuration?: number;
5786
+
5717
5787
  /**
5718
5788
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
5719
5789
  * \`string_array\`.
@@ -7570,6 +7640,13 @@ export namespace GeneratePromptResponse {
7570
7640
  */
7571
7641
  max?: number;
7572
7642
 
7643
+ /**
7644
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
7645
+ * \`file_array\` input types for video and audio assets. Validated against
7646
+ * \`asset.properties.duration\` at job creation time.
7647
+ */
7648
+ maxDuration?: number;
7649
+
7573
7650
  /**
7574
7651
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
7575
7652
  * \`string_array\`.
@@ -7796,6 +7873,13 @@ export namespace GeneratePromptResponse {
7796
7873
  */
7797
7874
  max?: number;
7798
7875
 
7876
+ /**
7877
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
7878
+ * \`file_array\` input types for video and audio assets. Validated against
7879
+ * \`asset.properties.duration\` at job creation time.
7880
+ */
7881
+ maxDuration?: number;
7882
+
7799
7883
  /**
7800
7884
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
7801
7885
  * \`string_array\`.
@@ -8532,6 +8616,13 @@ export namespace GenerateRunModelResponse {
8532
8616
  */
8533
8617
  max?: number;
8534
8618
 
8619
+ /**
8620
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
8621
+ * \`file_array\` input types for video and audio assets. Validated against
8622
+ * \`asset.properties.duration\` at job creation time.
8623
+ */
8624
+ maxDuration?: number;
8625
+
8535
8626
  /**
8536
8627
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
8537
8628
  * \`string_array\`.
@@ -8758,6 +8849,13 @@ export namespace GenerateRunModelResponse {
8758
8849
  */
8759
8850
  max?: number;
8760
8851
 
8852
+ /**
8853
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
8854
+ * \`file_array\` input types for video and audio assets. Validated against
8855
+ * \`asset.properties.duration\` at job creation time.
8856
+ */
8857
+ maxDuration?: number;
8858
+
8761
8859
  /**
8762
8860
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
8763
8861
  * \`string_array\`.
@@ -9504,6 +9602,13 @@ export namespace GenerateTranslateResponse {
9504
9602
  */
9505
9603
  max?: number;
9506
9604
 
9605
+ /**
9606
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
9607
+ * \`file_array\` input types for video and audio assets. Validated against
9608
+ * \`asset.properties.duration\` at job creation time.
9609
+ */
9610
+ maxDuration?: number;
9611
+
9507
9612
  /**
9508
9613
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
9509
9614
  * \`string_array\`.
@@ -9730,6 +9835,13 @@ export namespace GenerateTranslateResponse {
9730
9835
  */
9731
9836
  max?: number;
9732
9837
 
9838
+ /**
9839
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
9840
+ * \`file_array\` input types for video and audio assets. Validated against
9841
+ * \`asset.properties.duration\` at job creation time.
9842
+ */
9843
+ maxDuration?: number;
9844
+
9733
9845
  /**
9734
9846
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
9735
9847
  * \`string_array\`.
@@ -93,6 +93,7 @@ export {
93
93
  type ModelListResponsesModelsCursor,
94
94
  } from './models/models';
95
95
  export { Oscu, type OscuRetrievePricesResponse } from './oscu';
96
+ export { Pricing } from './pricing/pricing';
96
97
  export {
97
98
  Search,
98
99
  type SearchAssetSearchResponse,
@@ -119,14 +120,15 @@ export {
119
120
  type WorkflowUpdateResponse,
120
121
  type WorkflowListResponse,
121
122
  type WorkflowDeleteResponse,
122
- type WorkflowApproveUserResponse,
123
123
  type WorkflowGetTagsResponse,
124
124
  type WorkflowRunResponse,
125
+ type WorkflowUserApprovalResponse,
125
126
  type WorkflowCreateParams,
126
127
  type WorkflowUpdateParams,
127
128
  type WorkflowListParams,
128
129
  type WorkflowApproveUserParams,
129
130
  type WorkflowGetTagsParams,
130
131
  type WorkflowRunParams,
132
+ type WorkflowUserApprovalParams,
131
133
  type WorkflowListResponsesWorkflowsCursor,
132
134
  } from './workflows';
@@ -436,6 +436,13 @@ export namespace JobRetrieveResponse {
436
436
  */
437
437
  max?: number;
438
438
 
439
+ /**
440
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
441
+ * \`file_array\` input types for video and audio assets. Validated against
442
+ * \`asset.properties.duration\` at job creation time.
443
+ */
444
+ maxDuration?: number;
445
+
439
446
  /**
440
447
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
441
448
  * \`string_array\`.
@@ -662,6 +669,13 @@ export namespace JobRetrieveResponse {
662
669
  */
663
670
  max?: number;
664
671
 
672
+ /**
673
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
674
+ * \`file_array\` input types for video and audio assets. Validated against
675
+ * \`asset.properties.duration\` at job creation time.
676
+ */
677
+ maxDuration?: number;
678
+
665
679
  /**
666
680
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
667
681
  * \`string_array\`.
@@ -1383,6 +1397,13 @@ export namespace JobListResponse {
1383
1397
  */
1384
1398
  max?: number;
1385
1399
 
1400
+ /**
1401
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
1402
+ * \`file_array\` input types for video and audio assets. Validated against
1403
+ * \`asset.properties.duration\` at job creation time.
1404
+ */
1405
+ maxDuration?: number;
1406
+
1386
1407
  /**
1387
1408
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
1388
1409
  * \`string_array\`.
@@ -1609,6 +1630,13 @@ export namespace JobListResponse {
1609
1630
  */
1610
1631
  max?: number;
1611
1632
 
1633
+ /**
1634
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
1635
+ * \`file_array\` input types for video and audio assets. Validated against
1636
+ * \`asset.properties.duration\` at job creation time.
1637
+ */
1638
+ maxDuration?: number;
1639
+
1612
1640
  /**
1613
1641
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
1614
1642
  * \`string_array\`.
@@ -2334,6 +2362,13 @@ export namespace JobTriggerActionResponse {
2334
2362
  */
2335
2363
  max?: number;
2336
2364
 
2365
+ /**
2366
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
2367
+ * \`file_array\` input types for video and audio assets. Validated against
2368
+ * \`asset.properties.duration\` at job creation time.
2369
+ */
2370
+ maxDuration?: number;
2371
+
2337
2372
  /**
2338
2373
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
2339
2374
  * \`string_array\`.
@@ -2560,6 +2595,13 @@ export namespace JobTriggerActionResponse {
2560
2595
  */
2561
2596
  max?: number;
2562
2597
 
2598
+ /**
2599
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
2600
+ * \`file_array\` input types for video and audio assets. Validated against
2601
+ * \`asset.properties.duration\` at job creation time.
2602
+ */
2603
+ maxDuration?: number;
2604
+
2563
2605
  /**
2564
2606
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
2565
2607
  * \`string_array\`.
@@ -2964,10 +3006,17 @@ export interface JobListParams extends JobsCursorParams {
2964
3006
  | 'workflow';
2965
3007
 
2966
3008
  /**
2967
- * The types of the jobs to return. If "types" is defined, "type" will be ignored.
2968
- * Optional.
3009
+ * The types of the jobs to return, comma separated. If "types" is defined, "type"
3010
+ * will be ignored. Can be any of the following values: assets-download,
3011
+ * model-training, flux-model-training, musubi-model-training, inference, pixelate,
3012
+ * embed, remove-background, vectorize, canvas-export, image-generation,
3013
+ * image-prompt-editing, caption, generate-prompt, describe-style, translate,
3014
+ * detection, restyle, repaint, reframe, segment, skybox-base-360,
3015
+ * skybox-upscale-360, skybox-hdri, skybox-3d, texture, upscale, upscale-skybox,
3016
+ * upscale-texture, flux, openai-image-generation, upload, custom,
3017
+ * mesh-preview-rendering, workflow. Optional.
2969
3018
  */
2970
- types?:
3019
+ types?: Array<
2971
3020
  | 'assets-download'
2972
3021
  | 'model-training'
2973
3022
  | 'flux-model-training'
@@ -3002,7 +3051,8 @@ export interface JobListParams extends JobsCursorParams {
3002
3051
  | 'upload'
3003
3052
  | 'custom'
3004
3053
  | 'mesh-preview-rendering'
3005
- | 'workflow';
3054
+ | 'workflow'
3055
+ >;
3006
3056
 
3007
3057
  workflowId?: unknown;
3008
3058
  }
@@ -1935,6 +1935,13 @@ export namespace ExampleUpdateResponse {
1935
1935
  */
1936
1936
  max?: number;
1937
1937
 
1938
+ /**
1939
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
1940
+ * \`file_array\` input types for video and audio assets. Validated against
1941
+ * \`asset.properties.duration\` at job creation time.
1942
+ */
1943
+ maxDuration?: number;
1944
+
1938
1945
  /**
1939
1946
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
1940
1947
  * \`string_array\`.
@@ -2161,6 +2168,13 @@ export namespace ExampleUpdateResponse {
2161
2168
  */
2162
2169
  max?: number;
2163
2170
 
2171
+ /**
2172
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
2173
+ * \`file_array\` input types for video and audio assets. Validated against
2174
+ * \`asset.properties.duration\` at job creation time.
2175
+ */
2176
+ maxDuration?: number;
2177
+
2164
2178
  /**
2165
2179
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
2166
2180
  * \`string_array\`.
@@ -4395,6 +4409,13 @@ export namespace ExampleListResponse {
4395
4409
  */
4396
4410
  max?: number;
4397
4411
 
4412
+ /**
4413
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
4414
+ * \`file_array\` input types for video and audio assets. Validated against
4415
+ * \`asset.properties.duration\` at job creation time.
4416
+ */
4417
+ maxDuration?: number;
4418
+
4398
4419
  /**
4399
4420
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
4400
4421
  * \`string_array\`.
@@ -4621,6 +4642,13 @@ export namespace ExampleListResponse {
4621
4642
  */
4622
4643
  max?: number;
4623
4644
 
4645
+ /**
4646
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
4647
+ * \`file_array\` input types for video and audio assets. Validated against
4648
+ * \`asset.properties.duration\` at job creation time.
4649
+ */
4650
+ maxDuration?: number;
4651
+
4624
4652
  /**
4625
4653
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
4626
4654
  * \`string_array\`.
@@ -638,6 +638,13 @@ export namespace ModelCreateResponse {
638
638
  */
639
639
  max?: number;
640
640
 
641
+ /**
642
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
643
+ * \`file_array\` input types for video and audio assets. Validated against
644
+ * \`asset.properties.duration\` at job creation time.
645
+ */
646
+ maxDuration?: number;
647
+
641
648
  /**
642
649
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
643
650
  * \`string_array\`.
@@ -1936,6 +1943,13 @@ export namespace ModelRetrieveResponse {
1936
1943
  */
1937
1944
  max?: number;
1938
1945
 
1946
+ /**
1947
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
1948
+ * \`file_array\` input types for video and audio assets. Validated against
1949
+ * \`asset.properties.duration\` at job creation time.
1950
+ */
1951
+ maxDuration?: number;
1952
+
1939
1953
  /**
1940
1954
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
1941
1955
  * \`string_array\`.
@@ -3234,6 +3248,13 @@ export namespace ModelUpdateResponse {
3234
3248
  */
3235
3249
  max?: number;
3236
3250
 
3251
+ /**
3252
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
3253
+ * \`file_array\` input types for video and audio assets. Validated against
3254
+ * \`asset.properties.duration\` at job creation time.
3255
+ */
3256
+ maxDuration?: number;
3257
+
3237
3258
  /**
3238
3259
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
3239
3260
  * \`string_array\`.
@@ -4527,6 +4548,13 @@ export namespace ModelListResponse {
4527
4548
  */
4528
4549
  max?: number;
4529
4550
 
4551
+ /**
4552
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
4553
+ * \`file_array\` input types for video and audio assets. Validated against
4554
+ * \`asset.properties.duration\` at job creation time.
4555
+ */
4556
+ maxDuration?: number;
4557
+
4530
4558
  /**
4531
4559
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
4532
4560
  * \`string_array\`.
@@ -5826,6 +5854,13 @@ export namespace ModelCopyResponse {
5826
5854
  */
5827
5855
  max?: number;
5828
5856
 
5857
+ /**
5858
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
5859
+ * \`file_array\` input types for video and audio assets. Validated against
5860
+ * \`asset.properties.duration\` at job creation time.
5861
+ */
5862
+ maxDuration?: number;
5863
+
5829
5864
  /**
5830
5865
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
5831
5866
  * \`string_array\`.
@@ -7133,6 +7168,13 @@ export namespace ModelGetBulkResponse {
7133
7168
  */
7134
7169
  max?: number;
7135
7170
 
7171
+ /**
7172
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
7173
+ * \`file_array\` input types for video and audio assets. Validated against
7174
+ * \`asset.properties.duration\` at job creation time.
7175
+ */
7176
+ maxDuration?: number;
7177
+
7136
7178
  /**
7137
7179
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
7138
7180
  * \`string_array\`.
@@ -8431,6 +8473,13 @@ export namespace ModelTransferResponse {
8431
8473
  */
8432
8474
  max?: number;
8433
8475
 
8476
+ /**
8477
+ * The maximum allowed media duration in seconds. Only applies to \`file\` and
8478
+ * \`file_array\` input types for video and audio assets. Validated against
8479
+ * \`asset.properties.duration\` at job creation time.
8480
+ */
8481
+ maxDuration?: number;
8482
+
8434
8483
  /**
8435
8484
  * The maximum allowed length for \`string\` inputs. Also applies to each item in
8436
8485
  * \`string_array\`.
@@ -9892,11 +9941,12 @@ export interface ModelListParams extends ModelsCursorParams {
9892
9941
  tags?: string;
9893
9942
 
9894
9943
  /**
9895
- * List all the models of a specific type. Can be any of the following values:
9896
- * sd-1_5, sd-1_5-lora, sd-1_5-composition, sd-xl, sd-xl-lora, sd-xl-composition,
9897
- * flux.1, flux.1-lora, flux.1-kontext-dev, flux.1-krea-dev, flux.1-kontext-lora,
9898
- * flux.1-krea-lora, flux.1-composition, flux.1-pro, flux1.1-pro,
9899
- * flux.1.1-pro-ultra, flux.2-dev-lora, flux.2-dev-edit-lora, flux.2-klein-4b-lora,
9944
+ * List all the models of a specific type. The parameter "type" and "types" cannot
9945
+ * be used together. Can be any of the following values: sd-1_5, sd-1_5-lora,
9946
+ * sd-1_5-composition, sd-xl, sd-xl-lora, sd-xl-composition, flux.1, flux.1-lora,
9947
+ * flux.1-kontext-dev, flux.1-krea-dev, flux.1-kontext-lora, flux.1-krea-lora,
9948
+ * flux.1-composition, flux.1-pro, flux1.1-pro, flux.1.1-pro-ultra,
9949
+ * flux.2-dev-lora, flux.2-dev-edit-lora, flux.2-klein-4b-lora,
9900
9950
  * flux.2-klein-9b-lora, flux.2-klein-base-4b-lora, flux.2-klein-base-9b-lora,
9901
9951
  * flux.2-klein-4b-edit-lora, flux.2-klein-9b-edit-lora,
9902
9952
  * flux.2-klein-base-4b-edit-lora, flux.2-klein-base-9b-edit-lora, gpt-image-1,
@@ -9945,11 +9995,12 @@ export interface ModelListParams extends ModelsCursorParams {
9945
9995
  | 'elevenlabs-voice';
9946
9996
 
9947
9997
  /**
9948
- * List of types, comma separated. Can be any of the following values: sd-1_5,
9949
- * sd-1_5-lora, sd-1_5-composition, sd-xl, sd-xl-lora, sd-xl-composition, flux.1,
9950
- * flux.1-lora, flux.1-kontext-dev, flux.1-krea-dev, flux.1-kontext-lora,
9951
- * flux.1-krea-lora, flux.1-composition, flux.1-pro, flux1.1-pro,
9952
- * flux.1.1-pro-ultra, flux.2-dev-lora, flux.2-dev-edit-lora, flux.2-klein-4b-lora,
9998
+ * List of types, comma separated. The parameter "type" and "types" cannot be used
9999
+ * together. Can be any of the following values: sd-1_5, sd-1_5-lora,
10000
+ * sd-1_5-composition, sd-xl, sd-xl-lora, sd-xl-composition, flux.1, flux.1-lora,
10001
+ * flux.1-kontext-dev, flux.1-krea-dev, flux.1-kontext-lora, flux.1-krea-lora,
10002
+ * flux.1-composition, flux.1-pro, flux1.1-pro, flux.1.1-pro-ultra,
10003
+ * flux.2-dev-lora, flux.2-dev-edit-lora, flux.2-klein-4b-lora,
9953
10004
  * flux.2-klein-9b-lora, flux.2-klein-base-4b-lora, flux.2-klein-base-9b-lora,
9954
10005
  * flux.2-klein-4b-edit-lora, flux.2-klein-9b-edit-lora,
9955
10006
  * flux.2-klein-base-4b-edit-lora, flux.2-klein-base-9b-edit-lora, gpt-image-1,
@@ -9958,7 +10009,45 @@ export interface ModelListParams extends ModelsCursorParams {
9958
10009
  * zimage-turbo-lora, zimage-de-turbo-lora, custom, elevenlabs-voice. Only
9959
10010
  * available when privacy=public
9960
10011
  */
9961
- types?: string;
10012
+ types?: Array<
10013
+ | 'sd-1_5'
10014
+ | 'sd-1_5-lora'
10015
+ | 'sd-1_5-composition'
10016
+ | 'sd-xl'
10017
+ | 'sd-xl-lora'
10018
+ | 'sd-xl-composition'
10019
+ | 'flux.1'
10020
+ | 'flux.1-lora'
10021
+ | 'flux.1-kontext-dev'
10022
+ | 'flux.1-krea-dev'
10023
+ | 'flux.1-kontext-lora'
10024
+ | 'flux.1-krea-lora'
10025
+ | 'flux.1-composition'
10026
+ | 'flux.1-pro'
10027
+ | 'flux1.1-pro'
10028
+ | 'flux.1.1-pro-ultra'
10029
+ | 'flux.2-dev-lora'
10030
+ | 'flux.2-dev-edit-lora'
10031
+ | 'flux.2-klein-4b-lora'
10032
+ | 'flux.2-klein-9b-lora'
10033
+ | 'flux.2-klein-base-4b-lora'
10034
+ | 'flux.2-klein-base-9b-lora'
10035
+ | 'flux.2-klein-4b-edit-lora'
10036
+ | 'flux.2-klein-9b-edit-lora'
10037
+ | 'flux.2-klein-base-4b-edit-lora'
10038
+ | 'flux.2-klein-base-9b-edit-lora'
10039
+ | 'gpt-image-1'
10040
+ | 'qwen-image-lora'
10041
+ | 'qwen-image-2512-lora'
10042
+ | 'qwen-image-edit-lora'
10043
+ | 'qwen-image-edit-2509-lora'
10044
+ | 'qwen-image-edit-2511-lora'
10045
+ | 'zimage-lora'
10046
+ | 'zimage-turbo-lora'
10047
+ | 'zimage-de-turbo-lora'
10048
+ | 'custom'
10049
+ | 'elevenlabs-voice'
10050
+ >;
9962
10051
 
9963
10052
  /**
9964
10053
  * Filter results to only return models updated after the specified ISO string date