@scenario-labs/sdk 0.1.2 → 0.2.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 (275) hide show
  1. package/CHANGELOG.md +31 -0
  2. package/LICENSE +4 -198
  3. package/README.md +29 -29
  4. package/client.d.mts +35 -18
  5. package/client.d.mts.map +1 -1
  6. package/client.d.ts +35 -18
  7. package/client.d.ts.map +1 -1
  8. package/client.js +88 -50
  9. package/client.js.map +1 -1
  10. package/client.mjs +86 -48
  11. package/client.mjs.map +1 -1
  12. package/core/api-promise.d.mts +2 -2
  13. package/core/api-promise.d.mts.map +1 -1
  14. package/core/api-promise.d.ts +2 -2
  15. package/core/api-promise.d.ts.map +1 -1
  16. package/core/api-promise.js.map +1 -1
  17. package/core/api-promise.mjs.map +1 -1
  18. package/core/error.d.mts +2 -2
  19. package/core/error.d.mts.map +1 -1
  20. package/core/error.d.ts +2 -2
  21. package/core/error.d.ts.map +1 -1
  22. package/core/error.js +4 -4
  23. package/core/error.js.map +1 -1
  24. package/core/error.mjs +2 -2
  25. package/core/error.mjs.map +1 -1
  26. package/core/resource.d.mts +3 -3
  27. package/core/resource.d.mts.map +1 -1
  28. package/core/resource.d.ts +3 -3
  29. package/core/resource.d.ts.map +1 -1
  30. package/core/resource.js.map +1 -1
  31. package/core/resource.mjs.map +1 -1
  32. package/index.d.mts +8 -3
  33. package/index.d.mts.map +1 -1
  34. package/index.d.ts +8 -3
  35. package/index.d.ts.map +1 -1
  36. package/index.js +16 -6
  37. package/index.js.map +1 -1
  38. package/index.mjs +7 -3
  39. package/index.mjs.map +1 -1
  40. package/internal/parse.d.mts +2 -2
  41. package/internal/parse.d.mts.map +1 -1
  42. package/internal/parse.d.ts +2 -2
  43. package/internal/parse.d.ts.map +1 -1
  44. package/internal/parse.js.map +1 -1
  45. package/internal/parse.mjs.map +1 -1
  46. package/internal/request-options.d.mts +4 -0
  47. package/internal/request-options.d.mts.map +1 -1
  48. package/internal/request-options.d.ts +4 -0
  49. package/internal/request-options.d.ts.map +1 -1
  50. package/internal/request-options.js.map +1 -1
  51. package/internal/request-options.mjs.map +1 -1
  52. package/internal/shims.js +1 -1
  53. package/internal/shims.js.map +1 -1
  54. package/internal/shims.mjs +1 -1
  55. package/internal/shims.mjs.map +1 -1
  56. package/internal/uploads.d.mts +4 -4
  57. package/internal/uploads.d.mts.map +1 -1
  58. package/internal/uploads.d.ts +4 -4
  59. package/internal/uploads.d.ts.map +1 -1
  60. package/internal/uploads.js.map +1 -1
  61. package/internal/uploads.mjs.map +1 -1
  62. package/internal/utils/base64.js +2 -2
  63. package/internal/utils/base64.js.map +1 -1
  64. package/internal/utils/base64.mjs +3 -3
  65. package/internal/utils/base64.mjs.map +1 -1
  66. package/internal/utils/log.d.mts +3 -3
  67. package/internal/utils/log.d.mts.map +1 -1
  68. package/internal/utils/log.d.ts +3 -3
  69. package/internal/utils/log.d.ts.map +1 -1
  70. package/internal/utils/log.js.map +1 -1
  71. package/internal/utils/log.mjs.map +1 -1
  72. package/internal/utils/path.js +1 -1
  73. package/internal/utils/path.js.map +1 -1
  74. package/internal/utils/path.mjs +2 -2
  75. package/internal/utils/path.mjs.map +1 -1
  76. package/internal/utils/values.js +5 -5
  77. package/internal/utils/values.js.map +1 -1
  78. package/internal/utils/values.mjs +6 -6
  79. package/internal/utils/values.mjs.map +1 -1
  80. package/lib/generate.d.mts +19 -0
  81. package/lib/generate.d.mts.map +1 -0
  82. package/lib/generate.d.ts +19 -0
  83. package/lib/generate.d.ts.map +1 -0
  84. package/lib/generate.js +35 -0
  85. package/lib/generate.js.map +1 -0
  86. package/lib/generate.mjs +31 -0
  87. package/lib/generate.mjs.map +1 -0
  88. package/lib/job.d.mts +48 -0
  89. package/lib/job.d.mts.map +1 -0
  90. package/lib/job.d.ts +48 -0
  91. package/lib/job.d.ts.map +1 -0
  92. package/lib/job.js +50 -0
  93. package/lib/job.js.map +1 -0
  94. package/lib/job.mjs +45 -0
  95. package/lib/job.mjs.map +1 -0
  96. package/lib/models.d.mts +20 -0
  97. package/lib/models.d.mts.map +1 -0
  98. package/lib/models.d.ts +20 -0
  99. package/lib/models.d.ts.map +1 -0
  100. package/lib/models.js +28 -0
  101. package/lib/models.js.map +1 -0
  102. package/lib/models.mjs +23 -0
  103. package/lib/models.mjs.map +1 -0
  104. package/lib/scenario.d.mts +39 -0
  105. package/lib/scenario.d.mts.map +1 -0
  106. package/lib/scenario.d.ts +39 -0
  107. package/lib/scenario.d.ts.map +1 -0
  108. package/lib/scenario.js +46 -0
  109. package/lib/scenario.js.map +1 -0
  110. package/lib/scenario.mjs +42 -0
  111. package/lib/scenario.mjs.map +1 -0
  112. package/lib/workflow.d.mts +48 -0
  113. package/lib/workflow.d.mts.map +1 -0
  114. package/lib/workflow.d.ts +48 -0
  115. package/lib/workflow.d.ts.map +1 -0
  116. package/lib/workflow.js +59 -0
  117. package/lib/workflow.js.map +1 -0
  118. package/lib/workflow.mjs +54 -0
  119. package/lib/workflow.mjs.map +1 -0
  120. package/package.json +14 -4
  121. package/resources/assets/assets.d.mts +401 -96
  122. package/resources/assets/assets.d.mts.map +1 -1
  123. package/resources/assets/assets.d.ts +401 -96
  124. package/resources/assets/assets.d.ts.map +1 -1
  125. package/resources/assets/assets.js +2 -2
  126. package/resources/assets/assets.js.map +1 -1
  127. package/resources/assets/assets.mjs +2 -2
  128. package/resources/assets/assets.mjs.map +1 -1
  129. package/resources/assets/index.d.mts +1 -1
  130. package/resources/assets/index.d.mts.map +1 -1
  131. package/resources/assets/index.d.ts +1 -1
  132. package/resources/assets/index.d.ts.map +1 -1
  133. package/resources/assets/index.js.map +1 -1
  134. package/resources/assets/index.mjs.map +1 -1
  135. package/resources/assets/public.d.mts +30 -27
  136. package/resources/assets/public.d.mts.map +1 -1
  137. package/resources/assets/public.d.ts +30 -27
  138. package/resources/assets/public.d.ts.map +1 -1
  139. package/resources/assets/public.js +2 -2
  140. package/resources/assets/public.js.map +1 -1
  141. package/resources/assets/public.mjs +2 -2
  142. package/resources/assets/public.mjs.map +1 -1
  143. package/resources/collections/assets.d.mts +2 -8
  144. package/resources/collections/assets.d.mts.map +1 -1
  145. package/resources/collections/assets.d.ts +2 -8
  146. package/resources/collections/assets.d.ts.map +1 -1
  147. package/resources/collections/assets.js +2 -2
  148. package/resources/collections/assets.js.map +1 -1
  149. package/resources/collections/assets.mjs +2 -2
  150. package/resources/collections/assets.mjs.map +1 -1
  151. package/resources/collections/collections.d.mts +5 -5
  152. package/resources/collections/collections.d.mts.map +1 -1
  153. package/resources/collections/collections.d.ts +5 -5
  154. package/resources/collections/collections.d.ts.map +1 -1
  155. package/resources/collections/collections.js.map +1 -1
  156. package/resources/collections/collections.mjs.map +1 -1
  157. package/resources/collections/index.d.mts +2 -2
  158. package/resources/collections/index.d.mts.map +1 -1
  159. package/resources/collections/index.d.ts +2 -2
  160. package/resources/collections/index.d.ts.map +1 -1
  161. package/resources/collections/index.js.map +1 -1
  162. package/resources/collections/index.mjs +2 -2
  163. package/resources/collections/index.mjs.map +1 -1
  164. package/resources/collections/models.d.mts +2 -8
  165. package/resources/collections/models.d.mts.map +1 -1
  166. package/resources/collections/models.d.ts +2 -8
  167. package/resources/collections/models.d.ts.map +1 -1
  168. package/resources/collections/models.js +2 -2
  169. package/resources/collections/models.js.map +1 -1
  170. package/resources/collections/models.mjs +2 -2
  171. package/resources/collections/models.mjs.map +1 -1
  172. package/resources/generate.d.mts +4188 -1370
  173. package/resources/generate.d.mts.map +1 -1
  174. package/resources/generate.d.ts +4188 -1370
  175. package/resources/generate.d.ts.map +1 -1
  176. package/resources/index.d.mts +2 -2
  177. package/resources/index.d.mts.map +1 -1
  178. package/resources/index.d.ts +2 -2
  179. package/resources/index.d.ts.map +1 -1
  180. package/resources/index.js.map +1 -1
  181. package/resources/index.mjs.map +1 -1
  182. package/resources/jobs.d.mts +943 -33
  183. package/resources/jobs.d.mts.map +1 -1
  184. package/resources/jobs.d.ts +943 -33
  185. package/resources/jobs.d.ts.map +1 -1
  186. package/resources/jobs.js +3 -2
  187. package/resources/jobs.js.map +1 -1
  188. package/resources/jobs.mjs +3 -2
  189. package/resources/jobs.mjs.map +1 -1
  190. package/resources/models/description.d.mts +8 -8
  191. package/resources/models/description.d.mts.map +1 -1
  192. package/resources/models/description.d.ts +8 -8
  193. package/resources/models/description.d.ts.map +1 -1
  194. package/resources/models/examples.d.mts +640 -34
  195. package/resources/models/examples.d.mts.map +1 -1
  196. package/resources/models/examples.d.ts +640 -34
  197. package/resources/models/examples.d.ts.map +1 -1
  198. package/resources/models/models.d.mts +1323 -301
  199. package/resources/models/models.d.mts.map +1 -1
  200. package/resources/models/models.d.ts +1323 -301
  201. package/resources/models/models.d.ts.map +1 -1
  202. package/resources/models/models.js.map +1 -1
  203. package/resources/models/models.mjs.map +1 -1
  204. package/resources/models/train.d.mts +718 -90
  205. package/resources/models/train.d.mts.map +1 -1
  206. package/resources/models/train.d.ts +718 -90
  207. package/resources/models/train.d.ts.map +1 -1
  208. package/resources/models/train.js +9 -4
  209. package/resources/models/train.js.map +1 -1
  210. package/resources/models/train.mjs +9 -4
  211. package/resources/models/train.mjs.map +1 -1
  212. package/resources/models/training-images.d.mts +2 -2
  213. package/resources/models/training-images.d.mts.map +1 -1
  214. package/resources/models/training-images.d.ts +2 -2
  215. package/resources/models/training-images.d.ts.map +1 -1
  216. package/resources/search.d.mts +6 -31
  217. package/resources/search.d.mts.map +1 -1
  218. package/resources/search.d.ts +6 -31
  219. package/resources/search.d.ts.map +1 -1
  220. package/resources/search.js +6 -2
  221. package/resources/search.js.map +1 -1
  222. package/resources/search.mjs +6 -2
  223. package/resources/search.mjs.map +1 -1
  224. package/resources/tags.d.mts +1 -1
  225. package/resources/tags.d.ts +1 -1
  226. package/resources/usages.d.mts +401 -16
  227. package/resources/usages.d.mts.map +1 -1
  228. package/resources/usages.d.ts +401 -16
  229. package/resources/usages.d.ts.map +1 -1
  230. package/resources/workflows.d.mts +2738 -101
  231. package/resources/workflows.d.mts.map +1 -1
  232. package/resources/workflows.d.ts +2738 -101
  233. package/resources/workflows.d.ts.map +1 -1
  234. package/src/client.ts +102 -44
  235. package/src/core/api-promise.ts +4 -4
  236. package/src/core/error.ts +2 -2
  237. package/src/core/resource.ts +3 -3
  238. package/src/index.ts +8 -3
  239. package/src/internal/parse.ts +2 -2
  240. package/src/internal/request-options.ts +2 -0
  241. package/src/internal/shims.ts +1 -1
  242. package/src/internal/uploads.ts +5 -5
  243. package/src/internal/utils/base64.ts +3 -3
  244. package/src/internal/utils/log.ts +3 -3
  245. package/src/internal/utils/path.ts +2 -2
  246. package/src/internal/utils/values.ts +6 -6
  247. package/src/lib/generate.ts +77 -0
  248. package/src/lib/job.ts +78 -0
  249. package/src/lib/models.ts +27 -0
  250. package/src/lib/scenario.ts +39 -0
  251. package/src/lib/workflow.ts +90 -0
  252. package/src/resources/assets/assets.ts +742 -212
  253. package/src/resources/assets/index.ts +0 -1
  254. package/src/resources/assets/public.ts +151 -29
  255. package/src/resources/collections/assets.ts +2 -14
  256. package/src/resources/collections/collections.ts +3 -5
  257. package/src/resources/collections/index.ts +2 -14
  258. package/src/resources/collections/models.ts +2 -14
  259. package/src/resources/generate.ts +6254 -2217
  260. package/src/resources/index.ts +2 -3
  261. package/src/resources/jobs.ts +1355 -26
  262. package/src/resources/models/description.ts +50 -8
  263. package/src/resources/models/examples.ts +906 -56
  264. package/src/resources/models/models.ts +1867 -330
  265. package/src/resources/models/train.ts +976 -98
  266. package/src/resources/models/training-images.ts +2 -2
  267. package/src/resources/search.ts +13 -39
  268. package/src/resources/tags.ts +1 -1
  269. package/src/resources/usages.ts +544 -11
  270. package/src/resources/workflows.ts +4586 -914
  271. package/src/version.ts +1 -1
  272. package/version.d.mts +1 -1
  273. package/version.d.ts +1 -1
  274. package/version.js +1 -1
  275. package/version.mjs +1 -1
@@ -212,8 +212,10 @@ export namespace ExampleUpdateResponse {
212
212
  | 'upscale-texture'
213
213
  | 'upscale-video'
214
214
  | 'vectorization'
215
+ | 'video23d'
215
216
  | 'video2img'
216
- | 'video2video';
217
+ | 'video2video'
218
+ | 'voice-clone';
217
219
 
218
220
  /**
219
221
  * The actual status
@@ -393,8 +395,10 @@ export namespace ExampleUpdateResponse {
393
395
  | 'upscale-texture'
394
396
  | 'upscale-video'
395
397
  | 'vectorization'
398
+ | 'video23d'
396
399
  | 'video2img'
397
- | 'video2video';
400
+ | 'video2video'
401
+ | 'voice-clone';
398
402
 
399
403
  /**
400
404
  * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
@@ -421,7 +425,7 @@ export namespace ExampleUpdateResponse {
421
425
  /**
422
426
  * A bounding box around the object of interest, in the format [x1, y1, x2, y2].
423
427
  */
424
- bbox?: Array<unknown>;
428
+ bbox?: Array<number>;
425
429
 
426
430
  /**
427
431
  * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
@@ -663,6 +667,7 @@ export namespace ExampleUpdateResponse {
663
667
  */
664
668
  modelType?:
665
669
  | 'custom'
670
+ | 'elevenlabs-voice'
666
671
  | 'flux.1'
667
672
  | 'flux.1-composition'
668
673
  | 'flux.1-kontext-dev'
@@ -672,14 +677,32 @@ export namespace ExampleUpdateResponse {
672
677
  | 'flux.1-lora'
673
678
  | 'flux.1-pro'
674
679
  | 'flux.1.1-pro-ultra'
680
+ | 'flux.2-dev-edit-lora'
681
+ | 'flux.2-dev-lora'
682
+ | 'flux.2-klein-4b-edit-lora'
683
+ | 'flux.2-klein-4b-lora'
684
+ | 'flux.2-klein-9b-edit-lora'
685
+ | 'flux.2-klein-9b-lora'
686
+ | 'flux.2-klein-base-4b-edit-lora'
687
+ | 'flux.2-klein-base-4b-lora'
688
+ | 'flux.2-klein-base-9b-edit-lora'
689
+ | 'flux.2-klein-base-9b-lora'
675
690
  | 'flux1.1-pro'
676
691
  | 'gpt-image-1'
692
+ | 'qwen-image-2512-lora'
693
+ | 'qwen-image-edit-2509-lora'
694
+ | 'qwen-image-edit-2511-lora'
695
+ | 'qwen-image-edit-lora'
696
+ | 'qwen-image-lora'
677
697
  | 'sd-1_5'
678
698
  | 'sd-1_5-composition'
679
699
  | 'sd-1_5-lora'
680
700
  | 'sd-xl'
681
701
  | 'sd-xl-composition'
682
- | 'sd-xl-lora';
702
+ | 'sd-xl-lora'
703
+ | 'zimage-de-turbo-lora'
704
+ | 'zimage-lora'
705
+ | 'zimage-turbo-lora';
683
706
 
684
707
  name?: string;
685
708
 
@@ -732,7 +755,7 @@ export namespace ExampleUpdateResponse {
732
755
  * List of points (label, x, y) in the image where label = 0 for background and 1
733
756
  * for object.
734
757
  */
735
- points?: Array<Array<unknown>>;
758
+ points?: Array<Array<number>>;
736
759
 
737
760
  /**
738
761
  * How polished is the surface? 0 is like a rough surface, 1 is like a mirror
@@ -817,7 +840,8 @@ export namespace ExampleUpdateResponse {
817
840
  scheduler?: string;
818
841
 
819
842
  /**
820
- * The seed used to generate this asset
843
+ * The seed used to generate this asset. <!> Can be a string or a number in some
844
+ * cases <!>.
821
845
  */
822
846
  seed?: string;
823
847
 
@@ -1031,7 +1055,7 @@ export namespace ExampleUpdateResponse {
1031
1055
  /**
1032
1056
  * Bounding box dimensions [width, height, depth]
1033
1057
  */
1034
- dimensions?: Array<unknown>;
1058
+ dimensions?: Array<number>;
1035
1059
 
1036
1060
  /**
1037
1061
  * Duration of the media in seconds
@@ -1397,21 +1421,7 @@ export namespace ExampleUpdateResponse {
1397
1421
  * Note: if you use a value that is not supported by the model family, this will
1398
1422
  * result in an error.
1399
1423
  */
1400
- modality?:
1401
- | 'blur'
1402
- | 'canny'
1403
- | 'depth'
1404
- | 'gray'
1405
- | 'illusion'
1406
- | 'lineart'
1407
- | 'lines'
1408
- | 'low-quality'
1409
- | 'normal-map'
1410
- | 'pose'
1411
- | 'scribble'
1412
- | 'seg'
1413
- | 'sketch'
1414
- | 'tile';
1424
+ modality?: string;
1415
1425
 
1416
1426
  /**
1417
1427
  * The epoch of the model to use for the inference. Only available for Flux Lora
@@ -1565,6 +1575,7 @@ export namespace ExampleUpdateResponse {
1565
1575
  | 'model-download'
1566
1576
  | 'model-import'
1567
1577
  | 'model-training'
1578
+ | 'musubi-model-training'
1568
1579
  | 'openai-image-generation'
1569
1580
  | 'patch-image'
1570
1581
  | 'pixelate'
@@ -1646,20 +1657,37 @@ export namespace ExampleUpdateResponse {
1646
1657
  */
1647
1658
  assetIds?: Array<string>;
1648
1659
 
1660
+ /**
1661
+ * Eventual error for the job
1662
+ */
1663
+ error?: string | null;
1664
+
1649
1665
  /**
1650
1666
  * The flow of the job. Only available for workflow jobs.
1651
1667
  */
1652
1668
  flow?: Array<Metadata.Flow>;
1653
1669
 
1670
+ /**
1671
+ * Actionable hint for the user explaining what went wrong and how to resolve it.
1672
+ */
1673
+ hint?: string;
1674
+
1654
1675
  /**
1655
1676
  * The inputs for the job
1656
1677
  */
1657
- input?: unknown;
1678
+ input?: { [key: string]: unknown };
1679
+
1680
+ /**
1681
+ * May contain the output of the job for specific custom models jobs. Only
1682
+ * available for custom models which generate non-assets outputs. Example: LLM text
1683
+ * results.
1684
+ */
1685
+ output?: { [key: string]: unknown };
1658
1686
 
1659
1687
  /**
1660
- * The output of the job
1688
+ * For voice-clone jobs: the ID of the model being trained.
1661
1689
  */
1662
- output?: unknown;
1690
+ outputModelId?: string;
1663
1691
 
1664
1692
  /**
1665
1693
  * The workflow ID of the job if job is part of a workflow.
@@ -1689,8 +1717,11 @@ export namespace ExampleUpdateResponse {
1689
1717
  */
1690
1718
  type:
1691
1719
  | 'custom-model'
1720
+ | 'for-each'
1692
1721
  | 'generate-prompt'
1722
+ | 'list'
1693
1723
  | 'logic'
1724
+ | 'model'
1694
1725
  | 'remove-background'
1695
1726
  | 'transform'
1696
1727
  | 'user-approval'
@@ -1701,17 +1732,46 @@ export namespace ExampleUpdateResponse {
1701
1732
  */
1702
1733
  assets?: Array<Flow.Asset>;
1703
1734
 
1735
+ /**
1736
+ * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
1737
+ * `count` times regardless of array input. When not set, the loop iterates over
1738
+ * the resolved array input. Only available for ForEach nodes.
1739
+ */
1740
+ count?: number;
1741
+
1704
1742
  /**
1705
1743
  * The nodes that this node depends on. Only available for nodes that have
1706
1744
  * dependencies. Mainly used for user approval nodes.
1707
1745
  */
1708
1746
  dependsOn?: Array<string>;
1709
1747
 
1748
+ /**
1749
+ * If true, the outputs of this node will be included in the workflow job's final
1750
+ * output. Only applicable to producing nodes (custom-model, inference, etc.). By
1751
+ * default, only last nodes (nodes not referenced by other nodes) contribute to
1752
+ * outputs. Set this to true to also include intermediate nodes in the final
1753
+ * output. Note: This should only be set to `true` or left undefined.
1754
+ */
1755
+ includeOutputsInWorkflowJob?: true;
1756
+
1710
1757
  /**
1711
1758
  * The inputs of the node.
1712
1759
  */
1713
1760
  inputs?: Array<Flow.Input>;
1714
1761
 
1762
+ /**
1763
+ * Statically-configured items for a List node. The node outputs this array as-is
1764
+ * when executed. Only available for List nodes. The values can be strings,
1765
+ * numbers, or asset IDs.
1766
+ */
1767
+ items?: Array<string>;
1768
+
1769
+ /**
1770
+ * Zero-based index of the iteration this node copy belongs to. Set on
1771
+ * dynamically-created copies of loop body nodes.
1772
+ */
1773
+ iterationIndex?: number;
1774
+
1715
1775
  /**
1716
1776
  * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
1717
1777
  * only available for nodes started. A node "Pending" for a running workflow job is
@@ -1729,11 +1789,29 @@ export namespace ExampleUpdateResponse {
1729
1789
  */
1730
1790
  logicType?: 'if-else';
1731
1791
 
1792
+ /**
1793
+ * IDs of the body template nodes that belong to this ForEach loop. At runtime
1794
+ * these templates are cloned once per iteration and marked Skipped. Only available
1795
+ * for ForEach nodes.
1796
+ */
1797
+ loopBodyNodeIds?: Array<string>;
1798
+
1799
+ /**
1800
+ * ID of the ForEach node that spawned this iteration copy. Set on
1801
+ * dynamically-created copies of loop body nodes.
1802
+ */
1803
+ loopNodeId?: string;
1804
+
1732
1805
  /**
1733
1806
  * The model id for the node. Mainly used for custom model tasks.
1734
1807
  */
1735
1808
  modelId?: string;
1736
1809
 
1810
+ /**
1811
+ * The output of the node. Only available for logic nodes.
1812
+ */
1813
+ output?: unknown;
1814
+
1737
1815
  /**
1738
1816
  * The workflow id for the node. Mainly used for workflow tasks.
1739
1817
  */
@@ -1794,6 +1872,11 @@ export namespace ExampleUpdateResponse {
1794
1872
  */
1795
1873
  costImpact?: boolean;
1796
1874
 
1875
+ /**
1876
+ * The default value for the input
1877
+ */
1878
+ default?: unknown;
1879
+
1797
1880
  /**
1798
1881
  * Help text displayed in the UI to provide additional information about the input
1799
1882
  */
@@ -1815,11 +1898,20 @@ export namespace ExampleUpdateResponse {
1815
1898
  * the same as the current object. This is only available for type inputs_array
1816
1899
  * inputs.
1817
1900
  */
1818
- inputs?: Array<unknown>;
1901
+ inputs?: Array<{ [key: string]: unknown }>;
1902
+
1903
+ /**
1904
+ * The configured items for inputs_array type inputs. Each item is an array of
1905
+ * SubNodeInput that need ref/value resolution. Only available for inputs_array
1906
+ * type.
1907
+ */
1908
+ items?: Array<Array<Input.Item>>;
1819
1909
 
1820
1910
  /**
1821
1911
  * The asset kind of the input. Only taken into account for \`file\` and
1822
- * \`file_array\` input types.
1912
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
1913
+ * not able to create the asset on the flight on API side with dataurl without
1914
+ * data:kind, prefix
1823
1915
  */
1824
1916
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1825
1917
 
@@ -1845,6 +1937,13 @@ export namespace ExampleUpdateResponse {
1845
1937
  */
1846
1938
  maxLength?: number;
1847
1939
 
1940
+ /**
1941
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
1942
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
1943
+ * creation time.
1944
+ */
1945
+ maxSize?: number;
1946
+
1848
1947
  /**
1849
1948
  * The minimum allowed value. Only available for \`number\` and array input types.
1850
1949
  */
@@ -1862,6 +1961,7 @@ export namespace ExampleUpdateResponse {
1862
1961
  */
1863
1962
  modelTypes?: Array<
1864
1963
  | 'custom'
1964
+ | 'elevenlabs-voice'
1865
1965
  | 'flux.1'
1866
1966
  | 'flux.1-composition'
1867
1967
  | 'flux.1-kontext-dev'
@@ -1871,14 +1971,32 @@ export namespace ExampleUpdateResponse {
1871
1971
  | 'flux.1-lora'
1872
1972
  | 'flux.1-pro'
1873
1973
  | 'flux.1.1-pro-ultra'
1974
+ | 'flux.2-dev-edit-lora'
1975
+ | 'flux.2-dev-lora'
1976
+ | 'flux.2-klein-4b-edit-lora'
1977
+ | 'flux.2-klein-4b-lora'
1978
+ | 'flux.2-klein-9b-edit-lora'
1979
+ | 'flux.2-klein-9b-lora'
1980
+ | 'flux.2-klein-base-4b-edit-lora'
1981
+ | 'flux.2-klein-base-4b-lora'
1982
+ | 'flux.2-klein-base-9b-edit-lora'
1983
+ | 'flux.2-klein-base-9b-lora'
1874
1984
  | 'flux1.1-pro'
1875
1985
  | 'gpt-image-1'
1986
+ | 'qwen-image-2512-lora'
1987
+ | 'qwen-image-edit-2509-lora'
1988
+ | 'qwen-image-edit-2511-lora'
1989
+ | 'qwen-image-edit-lora'
1990
+ | 'qwen-image-lora'
1876
1991
  | 'sd-1_5'
1877
1992
  | 'sd-1_5-composition'
1878
1993
  | 'sd-1_5-lora'
1879
1994
  | 'sd-xl'
1880
1995
  | 'sd-xl-composition'
1881
1996
  | 'sd-xl-lora'
1997
+ | 'zimage-de-turbo-lora'
1998
+ | 'zimage-lora'
1999
+ | 'zimage-turbo-lora'
1882
2000
  >;
1883
2001
 
1884
2002
  /**
@@ -1930,9 +2048,316 @@ export namespace ExampleUpdateResponse {
1930
2048
  * The step increment for numeric inputs. Only available for \`number\` input type.
1931
2049
  */
1932
2050
  step?: number;
2051
+
2052
+ /**
2053
+ * The value of the input. This is the value of the input that will be used to run
2054
+ * the node. Only available for flows managed by a WorkflowJob.
2055
+ */
2056
+ value?: unknown;
1933
2057
  }
1934
2058
 
1935
2059
  export namespace Input {
2060
+ /**
2061
+ * A sub-input within an inputs_array item. Same as NodeInput but without the
2062
+ * recursive items field.
2063
+ */
2064
+ export interface Item {
2065
+ /**
2066
+ * The name that must be user to call the model through the API
2067
+ */
2068
+ name: string;
2069
+
2070
+ /**
2071
+ * The data type of the input
2072
+ */
2073
+ type:
2074
+ | 'boolean'
2075
+ | 'file'
2076
+ | 'file_array'
2077
+ | 'inputs_array'
2078
+ | 'model'
2079
+ | 'model_array'
2080
+ | 'number'
2081
+ | 'number_array'
2082
+ | 'string'
2083
+ | 'string_array';
2084
+
2085
+ /**
2086
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
2087
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
2088
+ * dropdown.
2089
+ */
2090
+ allowedValues?: Array<unknown>;
2091
+
2092
+ /**
2093
+ * Specifies the background behavior for the input. Only available for \`file\` and
2094
+ * \`file_array\` input types with kind \`image\`.
2095
+ */
2096
+ backgroundBehavior?: 'opaque' | 'transparent';
2097
+
2098
+ /**
2099
+ * Whether the input is a color or not. Only available for \`string\` input type.
2100
+ */
2101
+ color?: boolean;
2102
+
2103
+ /**
2104
+ * Whether this input affects the model's cost calculation
2105
+ */
2106
+ costImpact?: boolean;
2107
+
2108
+ /**
2109
+ * The default value for the input
2110
+ */
2111
+ default?: unknown;
2112
+
2113
+ /**
2114
+ * Help text displayed in the UI to provide additional information about the input
2115
+ */
2116
+ description?: string;
2117
+
2118
+ /**
2119
+ * Used to visually group inputs together in the UI. Inputs with the same group
2120
+ * value appear consecutively in the UI.
2121
+ */
2122
+ group?: string;
2123
+
2124
+ /**
2125
+ * Hint text displayed in the UI as a tooltip to guide the user
2126
+ */
2127
+ hint?: string;
2128
+
2129
+ /**
2130
+ * The list of inputs which form an object within a container array. All inputs are
2131
+ * the same as the current object. This is only available for type inputs_array
2132
+ * inputs.
2133
+ */
2134
+ inputs?: Array<{ [key: string]: unknown }>;
2135
+
2136
+ /**
2137
+ * The asset kind of the input. Only taken into account for \`file\` and
2138
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
2139
+ * not able to create the asset on the flight on API side with dataurl without
2140
+ * data:kind, prefix
2141
+ */
2142
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
2143
+
2144
+ /**
2145
+ * The label displayed in the UI for this input
2146
+ */
2147
+ label?: string;
2148
+
2149
+ /**
2150
+ * The name of the file input field to use as the mask source
2151
+ */
2152
+ maskFrom?: string;
2153
+
2154
+ /**
2155
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
2156
+ * types.
2157
+ */
2158
+ max?: number;
2159
+
2160
+ /**
2161
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
2162
+ * \`string_array\`.
2163
+ */
2164
+ maxLength?: number;
2165
+
2166
+ /**
2167
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
2168
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
2169
+ * creation time.
2170
+ */
2171
+ maxSize?: number;
2172
+
2173
+ /**
2174
+ * The minimum allowed value. Only available for \`number\` and array input types.
2175
+ */
2176
+ min?: number;
2177
+
2178
+ /**
2179
+ * The minimum allowed length for string inputs. Also applies to each item in
2180
+ * \`string_array\`.
2181
+ */
2182
+ minLength?: number;
2183
+
2184
+ /**
2185
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
2186
+ * available for \`model_array\` input type.
2187
+ */
2188
+ modelTypes?: Array<
2189
+ | 'custom'
2190
+ | 'elevenlabs-voice'
2191
+ | 'flux.1'
2192
+ | 'flux.1-composition'
2193
+ | 'flux.1-kontext-dev'
2194
+ | 'flux.1-kontext-lora'
2195
+ | 'flux.1-krea-dev'
2196
+ | 'flux.1-krea-lora'
2197
+ | 'flux.1-lora'
2198
+ | 'flux.1-pro'
2199
+ | 'flux.1.1-pro-ultra'
2200
+ | 'flux.2-dev-edit-lora'
2201
+ | 'flux.2-dev-lora'
2202
+ | 'flux.2-klein-4b-edit-lora'
2203
+ | 'flux.2-klein-4b-lora'
2204
+ | 'flux.2-klein-9b-edit-lora'
2205
+ | 'flux.2-klein-9b-lora'
2206
+ | 'flux.2-klein-base-4b-edit-lora'
2207
+ | 'flux.2-klein-base-4b-lora'
2208
+ | 'flux.2-klein-base-9b-edit-lora'
2209
+ | 'flux.2-klein-base-9b-lora'
2210
+ | 'flux1.1-pro'
2211
+ | 'gpt-image-1'
2212
+ | 'qwen-image-2512-lora'
2213
+ | 'qwen-image-edit-2509-lora'
2214
+ | 'qwen-image-edit-2511-lora'
2215
+ | 'qwen-image-edit-lora'
2216
+ | 'qwen-image-lora'
2217
+ | 'sd-1_5'
2218
+ | 'sd-1_5-composition'
2219
+ | 'sd-1_5-lora'
2220
+ | 'sd-xl'
2221
+ | 'sd-xl-composition'
2222
+ | 'sd-xl-lora'
2223
+ | 'zimage-de-turbo-lora'
2224
+ | 'zimage-lora'
2225
+ | 'zimage-turbo-lora'
2226
+ >;
2227
+
2228
+ /**
2229
+ * Whether this input represents a parent asset to assign to the produced assets.
2230
+ * Only available for \`file\` and \`file_array\` input types.
2231
+ *
2232
+ * For \`file_array\`, the parent asset is the first item in the array.
2233
+ */
2234
+ parent?: boolean;
2235
+
2236
+ /**
2237
+ * Placeholder text for the input. Only available for 'string' input type.
2238
+ */
2239
+ placeholder?: string;
2240
+
2241
+ /**
2242
+ * Whether the input is a prompt. When true, displays as a text area with prompt
2243
+ * spark feature. Only available for \`string\` input type.
2244
+ */
2245
+ prompt?: boolean;
2246
+
2247
+ /**
2248
+ * Whether the input is used with prompt spark. Only available for \`string\` input
2249
+ * type.
2250
+ */
2251
+ promptSpark?: boolean;
2252
+
2253
+ /**
2254
+ * The reference to another input or output of the same workflow. Must have at
2255
+ * least one of node or conditional.
2256
+ */
2257
+ ref?: Item.Ref;
2258
+
2259
+ /**
2260
+ * Set of rules that describes when this input is required:
2261
+ *
2262
+ * - \`always\`: Input is always required
2263
+ * - \`ifNotDefined\`: Input is required when another specified input is not
2264
+ * defined
2265
+ * - \`ifDefined\`: Input is required when another specified input is defined
2266
+ * - \`conditionalValues\`: Input is required when another input has a specific
2267
+ * value
2268
+ *
2269
+ * By default, the input is not required.
2270
+ */
2271
+ required?: Item.Required;
2272
+
2273
+ /**
2274
+ * The step increment for numeric inputs. Only available for \`number\` input type.
2275
+ */
2276
+ step?: number;
2277
+
2278
+ /**
2279
+ * The value of the input. This is the value of the input that will be used to run
2280
+ * the node. Only available for flows managed by a WorkflowJob.
2281
+ */
2282
+ value?: unknown;
2283
+ }
2284
+
2285
+ export namespace Item {
2286
+ /**
2287
+ * The reference to another input or output of the same workflow. Must have at
2288
+ * least one of node or conditional.
2289
+ */
2290
+ export interface Ref {
2291
+ /**
2292
+ * The conditional nodes to reference. If the conditional nodes are successful, the
2293
+ * node will be successful. If the conditional nodes are skipped, the node will be
2294
+ * skipped. Contains an array of node ids used to check the status of the nodes.
2295
+ */
2296
+ conditional?: Array<string>;
2297
+
2298
+ /**
2299
+ * This is the desired node output value if ref is an if/else node.
2300
+ */
2301
+ equal?: string;
2302
+
2303
+ /**
2304
+ * The name of the input or output to reference. If the type is 'workflow', the
2305
+ * name is the name of the input of the workflow is required If the type is 'node',
2306
+ * the name is not mandatory, except if you want all outputs of the node. To get
2307
+ * all outputs of a node, you can use the name 'all'.
2308
+ */
2309
+ name?: string;
2310
+
2311
+ /**
2312
+ * The node id or 'workflow' if the source is a workflow input.
2313
+ */
2314
+ node?: string;
2315
+ }
2316
+
2317
+ /**
2318
+ * Set of rules that describes when this input is required:
2319
+ *
2320
+ * - \`always\`: Input is always required
2321
+ * - \`ifNotDefined\`: Input is required when another specified input is not
2322
+ * defined
2323
+ * - \`ifDefined\`: Input is required when another specified input is defined
2324
+ * - \`conditionalValues\`: Input is required when another input has a specific
2325
+ * value
2326
+ *
2327
+ * By default, the input is not required.
2328
+ */
2329
+ export interface Required {
2330
+ /**
2331
+ * Whether the input is always required
2332
+ */
2333
+ always?: boolean;
2334
+
2335
+ /**
2336
+ * Makes this input required when another input has a specific value:
2337
+ *
2338
+ * - Key: name of the input to check
2339
+ * - Value: operation and allowed values that trigger the requirement
2340
+ */
2341
+ conditionalValues?: unknown;
2342
+
2343
+ /**
2344
+ * Makes this input required when another input is defined:
2345
+ *
2346
+ * - Key: name of the input that must be defined
2347
+ * - Value: message to display when this input is required
2348
+ */
2349
+ ifDefined?: unknown;
2350
+
2351
+ /**
2352
+ * Makes this input required when another input is not defined:
2353
+ *
2354
+ * - Key: name of the input that must be undefined
2355
+ * - Value: message to display when this input is required
2356
+ */
2357
+ ifNotDefined?: unknown;
2358
+ }
2359
+ }
2360
+
1936
2361
  /**
1937
2362
  * The reference to another input or output of the same workflow. Must have at
1938
2363
  * least one of node or conditional.
@@ -2243,8 +2668,10 @@ export namespace ExampleListResponse {
2243
2668
  | 'upscale-texture'
2244
2669
  | 'upscale-video'
2245
2670
  | 'vectorization'
2671
+ | 'video23d'
2246
2672
  | 'video2img'
2247
- | 'video2video';
2673
+ | 'video2video'
2674
+ | 'voice-clone';
2248
2675
 
2249
2676
  /**
2250
2677
  * The actual status
@@ -2424,8 +2851,10 @@ export namespace ExampleListResponse {
2424
2851
  | 'upscale-texture'
2425
2852
  | 'upscale-video'
2426
2853
  | 'vectorization'
2854
+ | 'video23d'
2427
2855
  | 'video2img'
2428
- | 'video2video';
2856
+ | 'video2video'
2857
+ | 'voice-clone';
2429
2858
 
2430
2859
  /**
2431
2860
  * How angular is the surface? 0 is like a sphere, 1 is like a mechanical object
@@ -2452,7 +2881,7 @@ export namespace ExampleListResponse {
2452
2881
  /**
2453
2882
  * A bounding box around the object of interest, in the format [x1, y1, x2, y2].
2454
2883
  */
2455
- bbox?: Array<unknown>;
2884
+ bbox?: Array<number>;
2456
2885
 
2457
2886
  /**
2458
2887
  * Remove small dark spots (i.e. “pepper”) and connect small bright cracks.
@@ -2694,6 +3123,7 @@ export namespace ExampleListResponse {
2694
3123
  */
2695
3124
  modelType?:
2696
3125
  | 'custom'
3126
+ | 'elevenlabs-voice'
2697
3127
  | 'flux.1'
2698
3128
  | 'flux.1-composition'
2699
3129
  | 'flux.1-kontext-dev'
@@ -2703,14 +3133,32 @@ export namespace ExampleListResponse {
2703
3133
  | 'flux.1-lora'
2704
3134
  | 'flux.1-pro'
2705
3135
  | 'flux.1.1-pro-ultra'
3136
+ | 'flux.2-dev-edit-lora'
3137
+ | 'flux.2-dev-lora'
3138
+ | 'flux.2-klein-4b-edit-lora'
3139
+ | 'flux.2-klein-4b-lora'
3140
+ | 'flux.2-klein-9b-edit-lora'
3141
+ | 'flux.2-klein-9b-lora'
3142
+ | 'flux.2-klein-base-4b-edit-lora'
3143
+ | 'flux.2-klein-base-4b-lora'
3144
+ | 'flux.2-klein-base-9b-edit-lora'
3145
+ | 'flux.2-klein-base-9b-lora'
2706
3146
  | 'flux1.1-pro'
2707
3147
  | 'gpt-image-1'
3148
+ | 'qwen-image-2512-lora'
3149
+ | 'qwen-image-edit-2509-lora'
3150
+ | 'qwen-image-edit-2511-lora'
3151
+ | 'qwen-image-edit-lora'
3152
+ | 'qwen-image-lora'
2708
3153
  | 'sd-1_5'
2709
3154
  | 'sd-1_5-composition'
2710
3155
  | 'sd-1_5-lora'
2711
3156
  | 'sd-xl'
2712
3157
  | 'sd-xl-composition'
2713
- | 'sd-xl-lora';
3158
+ | 'sd-xl-lora'
3159
+ | 'zimage-de-turbo-lora'
3160
+ | 'zimage-lora'
3161
+ | 'zimage-turbo-lora';
2714
3162
 
2715
3163
  name?: string;
2716
3164
 
@@ -2763,7 +3211,7 @@ export namespace ExampleListResponse {
2763
3211
  * List of points (label, x, y) in the image where label = 0 for background and 1
2764
3212
  * for object.
2765
3213
  */
2766
- points?: Array<Array<unknown>>;
3214
+ points?: Array<Array<number>>;
2767
3215
 
2768
3216
  /**
2769
3217
  * How polished is the surface? 0 is like a rough surface, 1 is like a mirror
@@ -2848,7 +3296,8 @@ export namespace ExampleListResponse {
2848
3296
  scheduler?: string;
2849
3297
 
2850
3298
  /**
2851
- * The seed used to generate this asset
3299
+ * The seed used to generate this asset. <!> Can be a string or a number in some
3300
+ * cases <!>.
2852
3301
  */
2853
3302
  seed?: string;
2854
3303
 
@@ -3062,7 +3511,7 @@ export namespace ExampleListResponse {
3062
3511
  /**
3063
3512
  * Bounding box dimensions [width, height, depth]
3064
3513
  */
3065
- dimensions?: Array<unknown>;
3514
+ dimensions?: Array<number>;
3066
3515
 
3067
3516
  /**
3068
3517
  * Duration of the media in seconds
@@ -3428,21 +3877,7 @@ export namespace ExampleListResponse {
3428
3877
  * Note: if you use a value that is not supported by the model family, this will
3429
3878
  * result in an error.
3430
3879
  */
3431
- modality?:
3432
- | 'blur'
3433
- | 'canny'
3434
- | 'depth'
3435
- | 'gray'
3436
- | 'illusion'
3437
- | 'lineart'
3438
- | 'lines'
3439
- | 'low-quality'
3440
- | 'normal-map'
3441
- | 'pose'
3442
- | 'scribble'
3443
- | 'seg'
3444
- | 'sketch'
3445
- | 'tile';
3880
+ modality?: string;
3446
3881
 
3447
3882
  /**
3448
3883
  * The epoch of the model to use for the inference. Only available for Flux Lora
@@ -3596,6 +4031,7 @@ export namespace ExampleListResponse {
3596
4031
  | 'model-download'
3597
4032
  | 'model-import'
3598
4033
  | 'model-training'
4034
+ | 'musubi-model-training'
3599
4035
  | 'openai-image-generation'
3600
4036
  | 'patch-image'
3601
4037
  | 'pixelate'
@@ -3677,20 +4113,37 @@ export namespace ExampleListResponse {
3677
4113
  */
3678
4114
  assetIds?: Array<string>;
3679
4115
 
4116
+ /**
4117
+ * Eventual error for the job
4118
+ */
4119
+ error?: string | null;
4120
+
3680
4121
  /**
3681
4122
  * The flow of the job. Only available for workflow jobs.
3682
4123
  */
3683
4124
  flow?: Array<Metadata.Flow>;
3684
4125
 
4126
+ /**
4127
+ * Actionable hint for the user explaining what went wrong and how to resolve it.
4128
+ */
4129
+ hint?: string;
4130
+
3685
4131
  /**
3686
4132
  * The inputs for the job
3687
4133
  */
3688
- input?: unknown;
4134
+ input?: { [key: string]: unknown };
4135
+
4136
+ /**
4137
+ * May contain the output of the job for specific custom models jobs. Only
4138
+ * available for custom models which generate non-assets outputs. Example: LLM text
4139
+ * results.
4140
+ */
4141
+ output?: { [key: string]: unknown };
3689
4142
 
3690
4143
  /**
3691
- * The output of the job
4144
+ * For voice-clone jobs: the ID of the model being trained.
3692
4145
  */
3693
- output?: unknown;
4146
+ outputModelId?: string;
3694
4147
 
3695
4148
  /**
3696
4149
  * The workflow ID of the job if job is part of a workflow.
@@ -3720,8 +4173,11 @@ export namespace ExampleListResponse {
3720
4173
  */
3721
4174
  type:
3722
4175
  | 'custom-model'
4176
+ | 'for-each'
3723
4177
  | 'generate-prompt'
4178
+ | 'list'
3724
4179
  | 'logic'
4180
+ | 'model'
3725
4181
  | 'remove-background'
3726
4182
  | 'transform'
3727
4183
  | 'user-approval'
@@ -3732,17 +4188,46 @@ export namespace ExampleListResponse {
3732
4188
  */
3733
4189
  assets?: Array<Flow.Asset>;
3734
4190
 
4191
+ /**
4192
+ * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
4193
+ * `count` times regardless of array input. When not set, the loop iterates over
4194
+ * the resolved array input. Only available for ForEach nodes.
4195
+ */
4196
+ count?: number;
4197
+
3735
4198
  /**
3736
4199
  * The nodes that this node depends on. Only available for nodes that have
3737
4200
  * dependencies. Mainly used for user approval nodes.
3738
4201
  */
3739
4202
  dependsOn?: Array<string>;
3740
4203
 
4204
+ /**
4205
+ * If true, the outputs of this node will be included in the workflow job's final
4206
+ * output. Only applicable to producing nodes (custom-model, inference, etc.). By
4207
+ * default, only last nodes (nodes not referenced by other nodes) contribute to
4208
+ * outputs. Set this to true to also include intermediate nodes in the final
4209
+ * output. Note: This should only be set to `true` or left undefined.
4210
+ */
4211
+ includeOutputsInWorkflowJob?: true;
4212
+
3741
4213
  /**
3742
4214
  * The inputs of the node.
3743
4215
  */
3744
4216
  inputs?: Array<Flow.Input>;
3745
4217
 
4218
+ /**
4219
+ * Statically-configured items for a List node. The node outputs this array as-is
4220
+ * when executed. Only available for List nodes. The values can be strings,
4221
+ * numbers, or asset IDs.
4222
+ */
4223
+ items?: Array<string>;
4224
+
4225
+ /**
4226
+ * Zero-based index of the iteration this node copy belongs to. Set on
4227
+ * dynamically-created copies of loop body nodes.
4228
+ */
4229
+ iterationIndex?: number;
4230
+
3746
4231
  /**
3747
4232
  * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
3748
4233
  * only available for nodes started. A node "Pending" for a running workflow job is
@@ -3760,11 +4245,29 @@ export namespace ExampleListResponse {
3760
4245
  */
3761
4246
  logicType?: 'if-else';
3762
4247
 
4248
+ /**
4249
+ * IDs of the body template nodes that belong to this ForEach loop. At runtime
4250
+ * these templates are cloned once per iteration and marked Skipped. Only available
4251
+ * for ForEach nodes.
4252
+ */
4253
+ loopBodyNodeIds?: Array<string>;
4254
+
4255
+ /**
4256
+ * ID of the ForEach node that spawned this iteration copy. Set on
4257
+ * dynamically-created copies of loop body nodes.
4258
+ */
4259
+ loopNodeId?: string;
4260
+
3763
4261
  /**
3764
4262
  * The model id for the node. Mainly used for custom model tasks.
3765
4263
  */
3766
4264
  modelId?: string;
3767
4265
 
4266
+ /**
4267
+ * The output of the node. Only available for logic nodes.
4268
+ */
4269
+ output?: unknown;
4270
+
3768
4271
  /**
3769
4272
  * The workflow id for the node. Mainly used for workflow tasks.
3770
4273
  */
@@ -3825,6 +4328,11 @@ export namespace ExampleListResponse {
3825
4328
  */
3826
4329
  costImpact?: boolean;
3827
4330
 
4331
+ /**
4332
+ * The default value for the input
4333
+ */
4334
+ default?: unknown;
4335
+
3828
4336
  /**
3829
4337
  * Help text displayed in the UI to provide additional information about the input
3830
4338
  */
@@ -3846,11 +4354,20 @@ export namespace ExampleListResponse {
3846
4354
  * the same as the current object. This is only available for type inputs_array
3847
4355
  * inputs.
3848
4356
  */
3849
- inputs?: Array<unknown>;
4357
+ inputs?: Array<{ [key: string]: unknown }>;
4358
+
4359
+ /**
4360
+ * The configured items for inputs_array type inputs. Each item is an array of
4361
+ * SubNodeInput that need ref/value resolution. Only available for inputs_array
4362
+ * type.
4363
+ */
4364
+ items?: Array<Array<Input.Item>>;
3850
4365
 
3851
4366
  /**
3852
4367
  * The asset kind of the input. Only taken into account for \`file\` and
3853
- * \`file_array\` input types.
4368
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
4369
+ * not able to create the asset on the flight on API side with dataurl without
4370
+ * data:kind, prefix
3854
4371
  */
3855
4372
  kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3856
4373
 
@@ -3876,6 +4393,13 @@ export namespace ExampleListResponse {
3876
4393
  */
3877
4394
  maxLength?: number;
3878
4395
 
4396
+ /**
4397
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
4398
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4399
+ * creation time.
4400
+ */
4401
+ maxSize?: number;
4402
+
3879
4403
  /**
3880
4404
  * The minimum allowed value. Only available for \`number\` and array input types.
3881
4405
  */
@@ -3893,6 +4417,7 @@ export namespace ExampleListResponse {
3893
4417
  */
3894
4418
  modelTypes?: Array<
3895
4419
  | 'custom'
4420
+ | 'elevenlabs-voice'
3896
4421
  | 'flux.1'
3897
4422
  | 'flux.1-composition'
3898
4423
  | 'flux.1-kontext-dev'
@@ -3902,14 +4427,32 @@ export namespace ExampleListResponse {
3902
4427
  | 'flux.1-lora'
3903
4428
  | 'flux.1-pro'
3904
4429
  | 'flux.1.1-pro-ultra'
4430
+ | 'flux.2-dev-edit-lora'
4431
+ | 'flux.2-dev-lora'
4432
+ | 'flux.2-klein-4b-edit-lora'
4433
+ | 'flux.2-klein-4b-lora'
4434
+ | 'flux.2-klein-9b-edit-lora'
4435
+ | 'flux.2-klein-9b-lora'
4436
+ | 'flux.2-klein-base-4b-edit-lora'
4437
+ | 'flux.2-klein-base-4b-lora'
4438
+ | 'flux.2-klein-base-9b-edit-lora'
4439
+ | 'flux.2-klein-base-9b-lora'
3905
4440
  | 'flux1.1-pro'
3906
4441
  | 'gpt-image-1'
4442
+ | 'qwen-image-2512-lora'
4443
+ | 'qwen-image-edit-2509-lora'
4444
+ | 'qwen-image-edit-2511-lora'
4445
+ | 'qwen-image-edit-lora'
4446
+ | 'qwen-image-lora'
3907
4447
  | 'sd-1_5'
3908
4448
  | 'sd-1_5-composition'
3909
4449
  | 'sd-1_5-lora'
3910
4450
  | 'sd-xl'
3911
4451
  | 'sd-xl-composition'
3912
4452
  | 'sd-xl-lora'
4453
+ | 'zimage-de-turbo-lora'
4454
+ | 'zimage-lora'
4455
+ | 'zimage-turbo-lora'
3913
4456
  >;
3914
4457
 
3915
4458
  /**
@@ -3961,9 +4504,316 @@ export namespace ExampleListResponse {
3961
4504
  * The step increment for numeric inputs. Only available for \`number\` input type.
3962
4505
  */
3963
4506
  step?: number;
4507
+
4508
+ /**
4509
+ * The value of the input. This is the value of the input that will be used to run
4510
+ * the node. Only available for flows managed by a WorkflowJob.
4511
+ */
4512
+ value?: unknown;
3964
4513
  }
3965
4514
 
3966
4515
  export namespace Input {
4516
+ /**
4517
+ * A sub-input within an inputs_array item. Same as NodeInput but without the
4518
+ * recursive items field.
4519
+ */
4520
+ export interface Item {
4521
+ /**
4522
+ * The name that must be user to call the model through the API
4523
+ */
4524
+ name: string;
4525
+
4526
+ /**
4527
+ * The data type of the input
4528
+ */
4529
+ type:
4530
+ | 'boolean'
4531
+ | 'file'
4532
+ | 'file_array'
4533
+ | 'inputs_array'
4534
+ | 'model'
4535
+ | 'model_array'
4536
+ | 'number'
4537
+ | 'number_array'
4538
+ | 'string'
4539
+ | 'string_array';
4540
+
4541
+ /**
4542
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
4543
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
4544
+ * dropdown.
4545
+ */
4546
+ allowedValues?: Array<unknown>;
4547
+
4548
+ /**
4549
+ * Specifies the background behavior for the input. Only available for \`file\` and
4550
+ * \`file_array\` input types with kind \`image\`.
4551
+ */
4552
+ backgroundBehavior?: 'opaque' | 'transparent';
4553
+
4554
+ /**
4555
+ * Whether the input is a color or not. Only available for \`string\` input type.
4556
+ */
4557
+ color?: boolean;
4558
+
4559
+ /**
4560
+ * Whether this input affects the model's cost calculation
4561
+ */
4562
+ costImpact?: boolean;
4563
+
4564
+ /**
4565
+ * The default value for the input
4566
+ */
4567
+ default?: unknown;
4568
+
4569
+ /**
4570
+ * Help text displayed in the UI to provide additional information about the input
4571
+ */
4572
+ description?: string;
4573
+
4574
+ /**
4575
+ * Used to visually group inputs together in the UI. Inputs with the same group
4576
+ * value appear consecutively in the UI.
4577
+ */
4578
+ group?: string;
4579
+
4580
+ /**
4581
+ * Hint text displayed in the UI as a tooltip to guide the user
4582
+ */
4583
+ hint?: string;
4584
+
4585
+ /**
4586
+ * The list of inputs which form an object within a container array. All inputs are
4587
+ * the same as the current object. This is only available for type inputs_array
4588
+ * inputs.
4589
+ */
4590
+ inputs?: Array<{ [key: string]: unknown }>;
4591
+
4592
+ /**
4593
+ * The asset kind of the input. Only taken into account for \`file\` and
4594
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
4595
+ * not able to create the asset on the flight on API side with dataurl without
4596
+ * data:kind, prefix
4597
+ */
4598
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4599
+
4600
+ /**
4601
+ * The label displayed in the UI for this input
4602
+ */
4603
+ label?: string;
4604
+
4605
+ /**
4606
+ * The name of the file input field to use as the mask source
4607
+ */
4608
+ maskFrom?: string;
4609
+
4610
+ /**
4611
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
4612
+ * types.
4613
+ */
4614
+ max?: number;
4615
+
4616
+ /**
4617
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
4618
+ * \`string_array\`.
4619
+ */
4620
+ maxLength?: number;
4621
+
4622
+ /**
4623
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
4624
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4625
+ * creation time.
4626
+ */
4627
+ maxSize?: number;
4628
+
4629
+ /**
4630
+ * The minimum allowed value. Only available for \`number\` and array input types.
4631
+ */
4632
+ min?: number;
4633
+
4634
+ /**
4635
+ * The minimum allowed length for string inputs. Also applies to each item in
4636
+ * \`string_array\`.
4637
+ */
4638
+ minLength?: number;
4639
+
4640
+ /**
4641
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
4642
+ * available for \`model_array\` input type.
4643
+ */
4644
+ modelTypes?: Array<
4645
+ | 'custom'
4646
+ | 'elevenlabs-voice'
4647
+ | 'flux.1'
4648
+ | 'flux.1-composition'
4649
+ | 'flux.1-kontext-dev'
4650
+ | 'flux.1-kontext-lora'
4651
+ | 'flux.1-krea-dev'
4652
+ | 'flux.1-krea-lora'
4653
+ | 'flux.1-lora'
4654
+ | 'flux.1-pro'
4655
+ | 'flux.1.1-pro-ultra'
4656
+ | 'flux.2-dev-edit-lora'
4657
+ | 'flux.2-dev-lora'
4658
+ | 'flux.2-klein-4b-edit-lora'
4659
+ | 'flux.2-klein-4b-lora'
4660
+ | 'flux.2-klein-9b-edit-lora'
4661
+ | 'flux.2-klein-9b-lora'
4662
+ | 'flux.2-klein-base-4b-edit-lora'
4663
+ | 'flux.2-klein-base-4b-lora'
4664
+ | 'flux.2-klein-base-9b-edit-lora'
4665
+ | 'flux.2-klein-base-9b-lora'
4666
+ | 'flux1.1-pro'
4667
+ | 'gpt-image-1'
4668
+ | 'qwen-image-2512-lora'
4669
+ | 'qwen-image-edit-2509-lora'
4670
+ | 'qwen-image-edit-2511-lora'
4671
+ | 'qwen-image-edit-lora'
4672
+ | 'qwen-image-lora'
4673
+ | 'sd-1_5'
4674
+ | 'sd-1_5-composition'
4675
+ | 'sd-1_5-lora'
4676
+ | 'sd-xl'
4677
+ | 'sd-xl-composition'
4678
+ | 'sd-xl-lora'
4679
+ | 'zimage-de-turbo-lora'
4680
+ | 'zimage-lora'
4681
+ | 'zimage-turbo-lora'
4682
+ >;
4683
+
4684
+ /**
4685
+ * Whether this input represents a parent asset to assign to the produced assets.
4686
+ * Only available for \`file\` and \`file_array\` input types.
4687
+ *
4688
+ * For \`file_array\`, the parent asset is the first item in the array.
4689
+ */
4690
+ parent?: boolean;
4691
+
4692
+ /**
4693
+ * Placeholder text for the input. Only available for 'string' input type.
4694
+ */
4695
+ placeholder?: string;
4696
+
4697
+ /**
4698
+ * Whether the input is a prompt. When true, displays as a text area with prompt
4699
+ * spark feature. Only available for \`string\` input type.
4700
+ */
4701
+ prompt?: boolean;
4702
+
4703
+ /**
4704
+ * Whether the input is used with prompt spark. Only available for \`string\` input
4705
+ * type.
4706
+ */
4707
+ promptSpark?: boolean;
4708
+
4709
+ /**
4710
+ * The reference to another input or output of the same workflow. Must have at
4711
+ * least one of node or conditional.
4712
+ */
4713
+ ref?: Item.Ref;
4714
+
4715
+ /**
4716
+ * Set of rules that describes when this input is required:
4717
+ *
4718
+ * - \`always\`: Input is always required
4719
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4720
+ * defined
4721
+ * - \`ifDefined\`: Input is required when another specified input is defined
4722
+ * - \`conditionalValues\`: Input is required when another input has a specific
4723
+ * value
4724
+ *
4725
+ * By default, the input is not required.
4726
+ */
4727
+ required?: Item.Required;
4728
+
4729
+ /**
4730
+ * The step increment for numeric inputs. Only available for \`number\` input type.
4731
+ */
4732
+ step?: number;
4733
+
4734
+ /**
4735
+ * The value of the input. This is the value of the input that will be used to run
4736
+ * the node. Only available for flows managed by a WorkflowJob.
4737
+ */
4738
+ value?: unknown;
4739
+ }
4740
+
4741
+ export namespace Item {
4742
+ /**
4743
+ * The reference to another input or output of the same workflow. Must have at
4744
+ * least one of node or conditional.
4745
+ */
4746
+ export interface Ref {
4747
+ /**
4748
+ * The conditional nodes to reference. If the conditional nodes are successful, the
4749
+ * node will be successful. If the conditional nodes are skipped, the node will be
4750
+ * skipped. Contains an array of node ids used to check the status of the nodes.
4751
+ */
4752
+ conditional?: Array<string>;
4753
+
4754
+ /**
4755
+ * This is the desired node output value if ref is an if/else node.
4756
+ */
4757
+ equal?: string;
4758
+
4759
+ /**
4760
+ * The name of the input or output to reference. If the type is 'workflow', the
4761
+ * name is the name of the input of the workflow is required If the type is 'node',
4762
+ * the name is not mandatory, except if you want all outputs of the node. To get
4763
+ * all outputs of a node, you can use the name 'all'.
4764
+ */
4765
+ name?: string;
4766
+
4767
+ /**
4768
+ * The node id or 'workflow' if the source is a workflow input.
4769
+ */
4770
+ node?: string;
4771
+ }
4772
+
4773
+ /**
4774
+ * Set of rules that describes when this input is required:
4775
+ *
4776
+ * - \`always\`: Input is always required
4777
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4778
+ * defined
4779
+ * - \`ifDefined\`: Input is required when another specified input is defined
4780
+ * - \`conditionalValues\`: Input is required when another input has a specific
4781
+ * value
4782
+ *
4783
+ * By default, the input is not required.
4784
+ */
4785
+ export interface Required {
4786
+ /**
4787
+ * Whether the input is always required
4788
+ */
4789
+ always?: boolean;
4790
+
4791
+ /**
4792
+ * Makes this input required when another input has a specific value:
4793
+ *
4794
+ * - Key: name of the input to check
4795
+ * - Value: operation and allowed values that trigger the requirement
4796
+ */
4797
+ conditionalValues?: unknown;
4798
+
4799
+ /**
4800
+ * Makes this input required when another input is defined:
4801
+ *
4802
+ * - Key: name of the input that must be defined
4803
+ * - Value: message to display when this input is required
4804
+ */
4805
+ ifDefined?: unknown;
4806
+
4807
+ /**
4808
+ * Makes this input required when another input is not defined:
4809
+ *
4810
+ * - Key: name of the input that must be undefined
4811
+ * - Value: message to display when this input is required
4812
+ */
4813
+ ifNotDefined?: unknown;
4814
+ }
4815
+ }
4816
+
3967
4817
  /**
3968
4818
  * The reference to another input or output of the same workflow. Must have at
3969
4819
  * least one of node or conditional.
@@ -4105,14 +4955,14 @@ export interface ExampleUpdateParams {
4105
4955
  /**
4106
4956
  * Query param: If set to true, returns the original asset without transformation
4107
4957
  */
4108
- originalAssets?: string;
4958
+ originalAssets?: boolean;
4109
4959
  }
4110
4960
 
4111
4961
  export interface ExampleListParams {
4112
4962
  /**
4113
4963
  * If set to true, returns the original asset without transformation
4114
4964
  */
4115
- originalAssets?: string;
4965
+ originalAssets?: boolean;
4116
4966
  }
4117
4967
 
4118
4968
  export declare namespace Examples {