@scenario-labs/sdk 0.3.0 → 1.1.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 (232) hide show
  1. package/CHANGELOG.md +30 -0
  2. package/README.md +40 -8
  3. package/client.d.mts +36 -16
  4. package/client.d.mts.map +1 -1
  5. package/client.d.ts +36 -16
  6. package/client.d.ts.map +1 -1
  7. package/client.js +10 -0
  8. package/client.js.map +1 -1
  9. package/client.mjs +10 -0
  10. package/client.mjs.map +1 -1
  11. package/core/pagination.d.mts +153 -0
  12. package/core/pagination.d.mts.map +1 -0
  13. package/core/pagination.d.ts +153 -0
  14. package/core/pagination.d.ts.map +1 -0
  15. package/core/pagination.js +276 -0
  16. package/core/pagination.js.map +1 -0
  17. package/core/pagination.mjs +263 -0
  18. package/core/pagination.mjs.map +1 -0
  19. package/index.d.mts +5 -1
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +5 -1
  22. package/index.d.ts.map +1 -1
  23. package/index.js +14 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +5 -1
  26. package/index.mjs.map +1 -1
  27. package/lib/asset.d.mts +55 -0
  28. package/lib/asset.d.mts.map +1 -0
  29. package/lib/asset.d.ts +55 -0
  30. package/lib/asset.d.ts.map +1 -0
  31. package/lib/asset.js +60 -0
  32. package/lib/asset.js.map +1 -0
  33. package/lib/asset.mjs +54 -0
  34. package/lib/asset.mjs.map +1 -0
  35. package/lib/job.d.mts +13 -1
  36. package/lib/job.d.mts.map +1 -1
  37. package/lib/job.d.ts +13 -1
  38. package/lib/job.d.ts.map +1 -1
  39. package/lib/job.js +18 -1
  40. package/lib/job.js.map +1 -1
  41. package/lib/job.mjs +16 -0
  42. package/lib/job.mjs.map +1 -1
  43. package/lib/models.d.mts +34 -2
  44. package/lib/models.d.mts.map +1 -1
  45. package/lib/models.d.ts +34 -2
  46. package/lib/models.d.ts.map +1 -1
  47. package/lib/models.js +39 -2
  48. package/lib/models.js.map +1 -1
  49. package/lib/models.mjs +37 -1
  50. package/lib/models.mjs.map +1 -1
  51. package/lib/scenario.d.mts +14 -0
  52. package/lib/scenario.d.mts.map +1 -1
  53. package/lib/scenario.d.ts +14 -0
  54. package/lib/scenario.d.ts.map +1 -1
  55. package/lib/scenario.js +14 -0
  56. package/lib/scenario.js.map +1 -1
  57. package/lib/scenario.mjs +14 -0
  58. package/lib/scenario.mjs.map +1 -1
  59. package/lib/upload.d.mts +143 -0
  60. package/lib/upload.d.mts.map +1 -0
  61. package/lib/upload.d.ts +143 -0
  62. package/lib/upload.d.ts.map +1 -0
  63. package/lib/upload.js +242 -0
  64. package/lib/upload.js.map +1 -0
  65. package/lib/upload.mjs +203 -0
  66. package/lib/upload.mjs.map +1 -0
  67. package/lib/workflow.d.mts +13 -2
  68. package/lib/workflow.d.mts.map +1 -1
  69. package/lib/workflow.d.ts +13 -2
  70. package/lib/workflow.d.ts.map +1 -1
  71. package/lib/workflow.js +17 -4
  72. package/lib/workflow.js.map +1 -1
  73. package/lib/workflow.mjs +17 -4
  74. package/lib/workflow.mjs.map +1 -1
  75. package/lib/workflow_import_validator.d.mts +40 -0
  76. package/lib/workflow_import_validator.d.mts.map +1 -0
  77. package/lib/workflow_import_validator.d.ts +40 -0
  78. package/lib/workflow_import_validator.d.ts.map +1 -0
  79. package/lib/workflow_import_validator.js +69 -0
  80. package/lib/workflow_import_validator.js.map +1 -0
  81. package/lib/workflow_import_validator.mjs +64 -0
  82. package/lib/workflow_import_validator.mjs.map +1 -0
  83. package/package.json +11 -1
  84. package/pagination.d.mts +2 -0
  85. package/pagination.d.mts.map +1 -0
  86. package/pagination.d.ts +2 -0
  87. package/pagination.d.ts.map +1 -0
  88. package/pagination.js +6 -0
  89. package/pagination.js.map +1 -0
  90. package/pagination.mjs +2 -0
  91. package/pagination.mjs.map +1 -0
  92. package/resources/assets/assets.d.mts +646 -669
  93. package/resources/assets/assets.d.mts.map +1 -1
  94. package/resources/assets/assets.d.ts +646 -669
  95. package/resources/assets/assets.d.ts.map +1 -1
  96. package/resources/assets/assets.js +3 -2
  97. package/resources/assets/assets.js.map +1 -1
  98. package/resources/assets/assets.mjs +3 -2
  99. package/resources/assets/assets.mjs.map +1 -1
  100. package/resources/assets/index.d.mts +1 -1
  101. package/resources/assets/index.d.mts.map +1 -1
  102. package/resources/assets/index.d.ts +1 -1
  103. package/resources/assets/index.d.ts.map +1 -1
  104. package/resources/assets/index.js.map +1 -1
  105. package/resources/assets/index.mjs.map +1 -1
  106. package/resources/assets/public.d.mts +12 -12
  107. package/resources/assets/public.d.mts.map +1 -1
  108. package/resources/assets/public.d.ts +12 -12
  109. package/resources/assets/public.d.ts.map +1 -1
  110. package/resources/collections/collections.d.mts +38 -49
  111. package/resources/collections/collections.d.mts.map +1 -1
  112. package/resources/collections/collections.d.ts +38 -49
  113. package/resources/collections/collections.d.ts.map +1 -1
  114. package/resources/collections/collections.js +5 -1
  115. package/resources/collections/collections.js.map +1 -1
  116. package/resources/collections/collections.mjs +5 -1
  117. package/resources/collections/collections.mjs.map +1 -1
  118. package/resources/collections/index.d.mts +1 -1
  119. package/resources/collections/index.d.mts.map +1 -1
  120. package/resources/collections/index.d.ts +1 -1
  121. package/resources/collections/index.d.ts.map +1 -1
  122. package/resources/collections/index.js.map +1 -1
  123. package/resources/collections/index.mjs.map +1 -1
  124. package/resources/generate.d.mts +1027 -242
  125. package/resources/generate.d.mts.map +1 -1
  126. package/resources/generate.d.ts +1027 -242
  127. package/resources/generate.d.ts.map +1 -1
  128. package/resources/generate.js +7 -0
  129. package/resources/generate.js.map +1 -1
  130. package/resources/generate.mjs +7 -0
  131. package/resources/generate.mjs.map +1 -1
  132. package/resources/index.d.mts +8 -8
  133. package/resources/index.d.mts.map +1 -1
  134. package/resources/index.d.ts +8 -8
  135. package/resources/index.d.ts.map +1 -1
  136. package/resources/index.js.map +1 -1
  137. package/resources/index.mjs.map +1 -1
  138. package/resources/jobs.d.mts +369 -380
  139. package/resources/jobs.d.mts.map +1 -1
  140. package/resources/jobs.d.ts +369 -380
  141. package/resources/jobs.d.ts.map +1 -1
  142. package/resources/jobs.js +2 -1
  143. package/resources/jobs.js.map +1 -1
  144. package/resources/jobs.mjs +2 -1
  145. package/resources/jobs.mjs.map +1 -1
  146. package/resources/models/description.d.mts +2 -2
  147. package/resources/models/description.d.mts.map +1 -1
  148. package/resources/models/description.d.ts +2 -2
  149. package/resources/models/description.d.ts.map +1 -1
  150. package/resources/models/examples.d.mts +4 -4
  151. package/resources/models/examples.d.mts.map +1 -1
  152. package/resources/models/examples.d.ts +4 -4
  153. package/resources/models/examples.d.ts.map +1 -1
  154. package/resources/models/index.d.mts +1 -1
  155. package/resources/models/index.d.mts.map +1 -1
  156. package/resources/models/index.d.ts +1 -1
  157. package/resources/models/index.d.ts.map +1 -1
  158. package/resources/models/index.js.map +1 -1
  159. package/resources/models/index.mjs.map +1 -1
  160. package/resources/models/models.d.mts +845 -856
  161. package/resources/models/models.d.mts.map +1 -1
  162. package/resources/models/models.d.ts +845 -856
  163. package/resources/models/models.d.ts.map +1 -1
  164. package/resources/models/models.js +2 -1
  165. package/resources/models/models.js.map +1 -1
  166. package/resources/models/models.mjs +2 -1
  167. package/resources/models/models.mjs.map +1 -1
  168. package/resources/models/train.d.mts +2 -2
  169. package/resources/models/train.d.mts.map +1 -1
  170. package/resources/models/train.d.ts +2 -2
  171. package/resources/models/train.d.ts.map +1 -1
  172. package/resources/search.d.mts +215 -295
  173. package/resources/search.d.mts.map +1 -1
  174. package/resources/search.d.ts +215 -295
  175. package/resources/search.d.ts.map +1 -1
  176. package/resources/search.js +9 -2
  177. package/resources/search.js.map +1 -1
  178. package/resources/search.mjs +9 -2
  179. package/resources/search.mjs.map +1 -1
  180. package/resources/tags.d.mts +23 -35
  181. package/resources/tags.d.mts.map +1 -1
  182. package/resources/tags.d.ts +23 -35
  183. package/resources/tags.d.ts.map +1 -1
  184. package/resources/tags.js +2 -1
  185. package/resources/tags.js.map +1 -1
  186. package/resources/tags.mjs +2 -1
  187. package/resources/tags.mjs.map +1 -1
  188. package/resources/usages.d.mts +3 -3
  189. package/resources/usages.d.mts.map +1 -1
  190. package/resources/usages.d.ts +3 -3
  191. package/resources/usages.d.ts.map +1 -1
  192. package/resources/workflows.d.mts +688 -704
  193. package/resources/workflows.d.mts.map +1 -1
  194. package/resources/workflows.d.ts +688 -704
  195. package/resources/workflows.d.ts.map +1 -1
  196. package/resources/workflows.js +5 -1
  197. package/resources/workflows.js.map +1 -1
  198. package/resources/workflows.mjs +5 -1
  199. package/resources/workflows.mjs.map +1 -1
  200. package/src/client.ts +107 -2
  201. package/src/core/pagination.ts +497 -0
  202. package/src/index.ts +11 -1
  203. package/src/lib/asset.ts +85 -0
  204. package/src/lib/job.ts +28 -1
  205. package/src/lib/models.ts +62 -2
  206. package/src/lib/scenario.ts +14 -0
  207. package/src/lib/upload.ts +344 -0
  208. package/src/lib/workflow.ts +29 -4
  209. package/src/lib/workflow_import_validator.ts +104 -0
  210. package/src/pagination.ts +2 -0
  211. package/src/resources/assets/assets.ts +930 -909
  212. package/src/resources/assets/index.ts +2 -0
  213. package/src/resources/assets/public.ts +17 -7
  214. package/src/resources/collections/collections.ts +45 -54
  215. package/src/resources/collections/index.ts +1 -0
  216. package/src/resources/generate.ts +1227 -136
  217. package/src/resources/index.ts +11 -1
  218. package/src/resources/jobs.ts +613 -622
  219. package/src/resources/models/description.ts +4 -0
  220. package/src/resources/models/examples.ts +8 -0
  221. package/src/resources/models/index.ts +1 -0
  222. package/src/resources/models/models.ts +1066 -1064
  223. package/src/resources/models/train.ts +4 -0
  224. package/src/resources/search.ts +239 -327
  225. package/src/resources/tags.ts +32 -39
  226. package/src/resources/usages.ts +5 -0
  227. package/src/resources/workflows.ts +850 -864
  228. package/src/version.ts +1 -1
  229. package/version.d.mts +1 -1
  230. package/version.d.ts +1 -1
  231. package/version.js +1 -1
  232. package/version.mjs +1 -1
@@ -2,6 +2,7 @@
2
2
 
3
3
  import { APIResource } from '../core/resource';
4
4
  import { APIPromise } from '../core/api-promise';
5
+ import { JobsCursor, type JobsCursorParams, PagePromise } from '../core/pagination';
5
6
  import { RequestOptions } from '../internal/request-options';
6
7
  import { path } from '../internal/utils/path';
7
8
 
@@ -19,8 +20,11 @@ export class Jobs extends APIResource {
19
20
  * view of all operations running on the platform along with their status and
20
21
  * results.
21
22
  */
22
- list(query: JobListParams | null | undefined = {}, options?: RequestOptions): APIPromise<JobListResponse> {
23
- return this._client.get('/jobs', { query, ...options });
23
+ list(
24
+ query: JobListParams | null | undefined = {},
25
+ options?: RequestOptions,
26
+ ): PagePromise<JobListResponsesJobsCursor, JobListResponse> {
27
+ return this._client.getAPIList('/jobs', JobsCursor<JobListResponse>, { query, ...options });
24
28
  }
25
29
 
26
30
  /**
@@ -36,6 +40,8 @@ export class Jobs extends APIResource {
36
40
  }
37
41
  }
38
42
 
43
+ export type JobListResponsesJobsCursor = JobsCursor<JobListResponse>;
44
+
39
45
  export interface JobRetrieveResponse {
40
46
  job: JobRetrieveResponse.Job;
41
47
  }
@@ -989,302 +995,525 @@ export namespace JobRetrieveResponse {
989
995
  }
990
996
 
991
997
  export interface JobListResponse {
992
- jobs: Array<JobListResponse.Job>;
998
+ /**
999
+ * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1000
+ */
1001
+ createdAt: string;
1002
+
1003
+ /**
1004
+ * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
1005
+ */
1006
+ jobId: string;
1007
+
1008
+ /**
1009
+ * The type of job
1010
+ */
1011
+ jobType:
1012
+ | 'assets-download'
1013
+ | 'canvas-export'
1014
+ | 'caption'
1015
+ | 'caption-llava'
1016
+ | 'custom'
1017
+ | 'describe-style'
1018
+ | 'detection'
1019
+ | 'embed'
1020
+ | 'flux'
1021
+ | 'flux-model-training'
1022
+ | 'generate-prompt'
1023
+ | 'image-generation'
1024
+ | 'image-prompt-editing'
1025
+ | 'inference'
1026
+ | 'mesh-preview-rendering'
1027
+ | 'model-download'
1028
+ | 'model-import'
1029
+ | 'model-training'
1030
+ | 'musubi-model-training'
1031
+ | 'openai-image-generation'
1032
+ | 'patch-image'
1033
+ | 'pixelate'
1034
+ | 'reframe'
1035
+ | 'remove-background'
1036
+ | 'repaint'
1037
+ | 'restyle'
1038
+ | 'segment'
1039
+ | 'skybox-3d'
1040
+ | 'skybox-base-360'
1041
+ | 'skybox-hdri'
1042
+ | 'skybox-upscale-360'
1043
+ | 'texture'
1044
+ | 'translate'
1045
+ | 'upload'
1046
+ | 'upscale'
1047
+ | 'upscale-skybox'
1048
+ | 'upscale-texture'
1049
+ | 'vectorize'
1050
+ | 'workflow';
1051
+
1052
+ /**
1053
+ * Metadata of the job with some additional information
1054
+ */
1055
+ metadata: JobListResponse.Metadata;
1056
+
1057
+ /**
1058
+ * Progress of the job (between 0 and 1)
1059
+ */
1060
+ progress: number;
1061
+
1062
+ /**
1063
+ * The current status of the job
1064
+ */
1065
+ status:
1066
+ | 'canceled'
1067
+ | 'failure'
1068
+ | 'finalizing'
1069
+ | 'in-progress'
1070
+ | 'pending'
1071
+ | 'queued'
1072
+ | 'success'
1073
+ | 'warming-up';
1074
+
1075
+ /**
1076
+ * The history of the different statuses the job went through with the ISO string
1077
+ * date of when the job reached each statuses.
1078
+ */
1079
+ statusHistory: Array<JobListResponse.StatusHistory>;
1080
+
1081
+ /**
1082
+ * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1083
+ */
1084
+ updatedAt: string;
1085
+
1086
+ /**
1087
+ * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
1088
+ */
1089
+ authorId?: string;
1090
+
1091
+ /**
1092
+ * The billing of the job
1093
+ */
1094
+ billing?: JobListResponse.Billing;
993
1095
 
994
1096
  /**
995
- * A token to query the next page of jobs
1097
+ * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
996
1098
  */
997
- nextPaginationToken?: string;
1099
+ ownerId?: string;
998
1100
  }
999
1101
 
1000
1102
  export namespace JobListResponse {
1001
- export interface Job {
1103
+ /**
1104
+ * Metadata of the job with some additional information
1105
+ */
1106
+ export interface Metadata {
1002
1107
  /**
1003
- * The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1108
+ * List of produced assets for this job
1004
1109
  */
1005
- createdAt: string;
1110
+ assetIds?: Array<string>;
1006
1111
 
1007
1112
  /**
1008
- * The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
1113
+ * Eventual error for the job
1009
1114
  */
1010
- jobId: string;
1115
+ error?: string | null;
1011
1116
 
1012
1117
  /**
1013
- * The type of job
1118
+ * The flow of the job. Only available for workflow jobs.
1014
1119
  */
1015
- jobType:
1016
- | 'assets-download'
1017
- | 'canvas-export'
1018
- | 'caption'
1019
- | 'caption-llava'
1020
- | 'custom'
1021
- | 'describe-style'
1022
- | 'detection'
1023
- | 'embed'
1024
- | 'flux'
1025
- | 'flux-model-training'
1026
- | 'generate-prompt'
1027
- | 'image-generation'
1028
- | 'image-prompt-editing'
1029
- | 'inference'
1030
- | 'mesh-preview-rendering'
1031
- | 'model-download'
1032
- | 'model-import'
1033
- | 'model-training'
1034
- | 'musubi-model-training'
1035
- | 'openai-image-generation'
1036
- | 'patch-image'
1037
- | 'pixelate'
1038
- | 'reframe'
1039
- | 'remove-background'
1040
- | 'repaint'
1041
- | 'restyle'
1042
- | 'segment'
1043
- | 'skybox-3d'
1044
- | 'skybox-base-360'
1045
- | 'skybox-hdri'
1046
- | 'skybox-upscale-360'
1047
- | 'texture'
1048
- | 'translate'
1049
- | 'upload'
1050
- | 'upscale'
1051
- | 'upscale-skybox'
1052
- | 'upscale-texture'
1053
- | 'vectorize'
1054
- | 'workflow';
1120
+ flow?: Array<Metadata.Flow>;
1055
1121
 
1056
1122
  /**
1057
- * Metadata of the job with some additional information
1123
+ * Actionable hint for the user explaining what went wrong and how to resolve it.
1058
1124
  */
1059
- metadata: Job.Metadata;
1125
+ hint?: string;
1060
1126
 
1061
1127
  /**
1062
- * Progress of the job (between 0 and 1)
1128
+ * The inputs for the job
1063
1129
  */
1064
- progress: number;
1130
+ input?: { [key: string]: unknown };
1065
1131
 
1066
1132
  /**
1067
- * The current status of the job
1133
+ * May contain the output of the job for specific custom models jobs. Only
1134
+ * available for custom models which generate non-assets outputs. Example: LLM text
1135
+ * results.
1068
1136
  */
1069
- status:
1070
- | 'canceled'
1071
- | 'failure'
1072
- | 'finalizing'
1073
- | 'in-progress'
1074
- | 'pending'
1075
- | 'queued'
1076
- | 'success'
1077
- | 'warming-up';
1137
+ output?: { [key: string]: unknown };
1078
1138
 
1079
1139
  /**
1080
- * The history of the different statuses the job went through with the ISO string
1081
- * date of when the job reached each statuses.
1140
+ * For voice-clone jobs: the ID of the model being trained.
1082
1141
  */
1083
- statusHistory: Array<Job.StatusHistory>;
1142
+ outputModelId?: string;
1084
1143
 
1085
1144
  /**
1086
- * The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
1145
+ * The workflow ID of the job if job is part of a workflow.
1087
1146
  */
1088
- updatedAt: string;
1147
+ workflowId?: string;
1089
1148
 
1090
1149
  /**
1091
- * The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
1150
+ * The workflow job ID of the job if job is part of a workflow job.
1092
1151
  */
1093
- authorId?: string;
1152
+ workflowJobId?: string;
1153
+ }
1094
1154
 
1095
- /**
1096
- * The billing of the job
1097
- */
1098
- billing?: Job.Billing;
1155
+ export namespace Metadata {
1156
+ export interface Flow {
1157
+ /**
1158
+ * The id of the node.
1159
+ */
1160
+ id: string;
1099
1161
 
1100
- /**
1101
- * The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
1102
- */
1103
- ownerId?: string;
1104
- }
1162
+ /**
1163
+ * The status of the node. Only available for WorkflowJob nodes.
1164
+ */
1165
+ status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
1105
1166
 
1106
- export namespace Job {
1107
- /**
1108
- * Metadata of the job with some additional information
1109
- */
1110
- export interface Metadata {
1111
1167
  /**
1112
- * List of produced assets for this job
1168
+ * The type of the job for the node.
1113
1169
  */
1114
- assetIds?: Array<string>;
1170
+ type:
1171
+ | 'custom-model'
1172
+ | 'for-each'
1173
+ | 'generate-prompt'
1174
+ | 'list'
1175
+ | 'logic'
1176
+ | 'model'
1177
+ | 'remove-background'
1178
+ | 'transform'
1179
+ | 'user-approval'
1180
+ | 'workflow';
1115
1181
 
1116
1182
  /**
1117
- * Eventual error for the job
1183
+ * List of produced assets for this node.
1118
1184
  */
1119
- error?: string | null;
1185
+ assets?: Array<Flow.Asset>;
1120
1186
 
1121
1187
  /**
1122
- * The flow of the job. Only available for workflow jobs.
1188
+ * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
1189
+ * `count` times regardless of array input. When not set, the loop iterates over
1190
+ * the resolved array input. Only available for ForEach nodes.
1123
1191
  */
1124
- flow?: Array<Metadata.Flow>;
1192
+ count?: number;
1125
1193
 
1126
1194
  /**
1127
- * Actionable hint for the user explaining what went wrong and how to resolve it.
1195
+ * The nodes that this node depends on. Only available for nodes that have
1196
+ * dependencies. Mainly used for user approval nodes.
1128
1197
  */
1129
- hint?: string;
1198
+ dependsOn?: Array<string>;
1130
1199
 
1131
1200
  /**
1132
- * The inputs for the job
1201
+ * If true, the outputs of this node will be included in the workflow job's final
1202
+ * output. Only applicable to producing nodes (custom-model, inference, etc.). By
1203
+ * default, only last nodes (nodes not referenced by other nodes) contribute to
1204
+ * outputs. Set this to true to also include intermediate nodes in the final
1205
+ * output. Note: This should only be set to `true` or left undefined.
1133
1206
  */
1134
- input?: { [key: string]: unknown };
1207
+ includeOutputsInWorkflowJob?: true;
1135
1208
 
1136
1209
  /**
1137
- * May contain the output of the job for specific custom models jobs. Only
1138
- * available for custom models which generate non-assets outputs. Example: LLM text
1139
- * results.
1210
+ * The inputs of the node.
1140
1211
  */
1141
- output?: { [key: string]: unknown };
1212
+ inputs?: Array<Flow.Input>;
1142
1213
 
1143
1214
  /**
1144
- * For voice-clone jobs: the ID of the model being trained.
1215
+ * Statically-configured items for a List node. The node outputs this array as-is
1216
+ * when executed. Only available for List nodes. The values can be strings,
1217
+ * numbers, or asset IDs.
1145
1218
  */
1146
- outputModelId?: string;
1219
+ items?: Array<string>;
1147
1220
 
1148
1221
  /**
1149
- * The workflow ID of the job if job is part of a workflow.
1222
+ * Zero-based index of the iteration this node copy belongs to. Set on
1223
+ * dynamically-created copies of loop body nodes.
1150
1224
  */
1151
- workflowId?: string;
1225
+ iterationIndex?: number;
1152
1226
 
1153
1227
  /**
1154
- * The workflow job ID of the job if job is part of a workflow job.
1228
+ * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
1229
+ * only available for nodes started. A node "Pending" for a running workflow job is
1230
+ * not started.
1155
1231
  */
1156
- workflowJobId?: string;
1232
+ jobId?: string;
1233
+
1234
+ /**
1235
+ * The logic of the node. Only available for logic nodes.
1236
+ */
1237
+ logic?: Flow.Logic;
1238
+
1239
+ /**
1240
+ * The type of the logic for the node. Only available for logic nodes.
1241
+ */
1242
+ logicType?: 'if-else';
1243
+
1244
+ /**
1245
+ * IDs of the body template nodes that belong to this ForEach loop. At runtime
1246
+ * these templates are cloned once per iteration and marked Skipped. Only available
1247
+ * for ForEach nodes.
1248
+ */
1249
+ loopBodyNodeIds?: Array<string>;
1250
+
1251
+ /**
1252
+ * ID of the ForEach node that spawned this iteration copy. Set on
1253
+ * dynamically-created copies of loop body nodes.
1254
+ */
1255
+ loopNodeId?: string;
1256
+
1257
+ /**
1258
+ * The model id for the node. Mainly used for custom model tasks.
1259
+ */
1260
+ modelId?: string;
1261
+
1262
+ /**
1263
+ * The output of the node. Only available for logic nodes.
1264
+ */
1265
+ output?: unknown;
1266
+
1267
+ /**
1268
+ * The workflow id for the node. Mainly used for workflow tasks.
1269
+ */
1270
+ workflowId?: string;
1157
1271
  }
1158
1272
 
1159
- export namespace Metadata {
1160
- export interface Flow {
1161
- /**
1162
- * The id of the node.
1163
- */
1164
- id: string;
1273
+ export namespace Flow {
1274
+ export interface Asset {
1275
+ assetId: string;
1276
+
1277
+ url: string;
1278
+ }
1165
1279
 
1280
+ /**
1281
+ * This is used to run the flow.
1282
+ */
1283
+ export interface Input {
1166
1284
  /**
1167
- * The status of the node. Only available for WorkflowJob nodes.
1285
+ * The name that must be user to call the model through the API
1168
1286
  */
1169
- status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
1287
+ name: string;
1170
1288
 
1171
1289
  /**
1172
- * The type of the job for the node.
1290
+ * The data type of the input
1173
1291
  */
1174
1292
  type:
1175
- | 'custom-model'
1176
- | 'for-each'
1177
- | 'generate-prompt'
1178
- | 'list'
1179
- | 'logic'
1293
+ | 'boolean'
1294
+ | 'file'
1295
+ | 'file_array'
1296
+ | 'inputs_array'
1180
1297
  | 'model'
1181
- | 'remove-background'
1182
- | 'transform'
1183
- | 'user-approval'
1184
- | 'workflow';
1298
+ | 'model_array'
1299
+ | 'number'
1300
+ | 'number_array'
1301
+ | 'string'
1302
+ | 'string_array';
1185
1303
 
1186
1304
  /**
1187
- * List of produced assets for this node.
1305
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
1306
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
1307
+ * dropdown.
1188
1308
  */
1189
- assets?: Array<Flow.Asset>;
1309
+ allowedValues?: Array<unknown>;
1190
1310
 
1191
1311
  /**
1192
- * Fixed number of iterations for a ForEach node. When set, the loop runs exactly
1193
- * `count` times regardless of array input. When not set, the loop iterates over
1194
- * the resolved array input. Only available for ForEach nodes.
1312
+ * Specifies the background behavior for the input. Only available for \`file\` and
1313
+ * \`file_array\` input types with kind \`image\`.
1195
1314
  */
1196
- count?: number;
1315
+ backgroundBehavior?: 'opaque' | 'transparent';
1197
1316
 
1198
1317
  /**
1199
- * The nodes that this node depends on. Only available for nodes that have
1200
- * dependencies. Mainly used for user approval nodes.
1318
+ * Whether the input is a color or not. Only available for \`string\` input type.
1201
1319
  */
1202
- dependsOn?: Array<string>;
1320
+ color?: boolean;
1203
1321
 
1204
1322
  /**
1205
- * If true, the outputs of this node will be included in the workflow job's final
1206
- * output. Only applicable to producing nodes (custom-model, inference, etc.). By
1207
- * default, only last nodes (nodes not referenced by other nodes) contribute to
1208
- * outputs. Set this to true to also include intermediate nodes in the final
1209
- * output. Note: This should only be set to `true` or left undefined.
1323
+ * Whether this input affects the model's cost calculation
1210
1324
  */
1211
- includeOutputsInWorkflowJob?: true;
1325
+ costImpact?: boolean;
1212
1326
 
1213
1327
  /**
1214
- * The inputs of the node.
1328
+ * The default value for the input
1215
1329
  */
1216
- inputs?: Array<Flow.Input>;
1330
+ default?: unknown;
1217
1331
 
1218
1332
  /**
1219
- * Statically-configured items for a List node. The node outputs this array as-is
1220
- * when executed. Only available for List nodes. The values can be strings,
1221
- * numbers, or asset IDs.
1333
+ * Help text displayed in the UI to provide additional information about the input
1222
1334
  */
1223
- items?: Array<string>;
1335
+ description?: string;
1224
1336
 
1225
1337
  /**
1226
- * Zero-based index of the iteration this node copy belongs to. Set on
1227
- * dynamically-created copies of loop body nodes.
1338
+ * Used to visually group inputs together in the UI. Inputs with the same group
1339
+ * value appear consecutively in the UI.
1228
1340
  */
1229
- iterationIndex?: number;
1341
+ group?: string;
1230
1342
 
1231
1343
  /**
1232
- * If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
1233
- * only available for nodes started. A node "Pending" for a running workflow job is
1234
- * not started.
1344
+ * Hint text displayed in the UI as a tooltip to guide the user
1235
1345
  */
1236
- jobId?: string;
1346
+ hint?: string;
1237
1347
 
1238
1348
  /**
1239
- * The logic of the node. Only available for logic nodes.
1349
+ * The list of inputs which form an object within a container array. All inputs are
1350
+ * the same as the current object. This is only available for type inputs_array
1351
+ * inputs.
1240
1352
  */
1241
- logic?: Flow.Logic;
1353
+ inputs?: Array<{ [key: string]: unknown }>;
1242
1354
 
1243
1355
  /**
1244
- * The type of the logic for the node. Only available for logic nodes.
1356
+ * The configured items for inputs_array type inputs. Each item is an array of
1357
+ * SubNodeInput that need ref/value resolution. Only available for inputs_array
1358
+ * type.
1245
1359
  */
1246
- logicType?: 'if-else';
1360
+ items?: Array<Array<Input.Item>>;
1247
1361
 
1248
1362
  /**
1249
- * IDs of the body template nodes that belong to this ForEach loop. At runtime
1250
- * these templates are cloned once per iteration and marked Skipped. Only available
1251
- * for ForEach nodes.
1363
+ * The asset kind of the input. Only taken into account for \`file\` and
1364
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
1365
+ * not able to create the asset on the flight on API side with dataurl without
1366
+ * data:kind, prefix
1252
1367
  */
1253
- loopBodyNodeIds?: Array<string>;
1368
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1254
1369
 
1255
1370
  /**
1256
- * ID of the ForEach node that spawned this iteration copy. Set on
1257
- * dynamically-created copies of loop body nodes.
1371
+ * The label displayed in the UI for this input
1258
1372
  */
1259
- loopNodeId?: string;
1373
+ label?: string;
1260
1374
 
1261
1375
  /**
1262
- * The model id for the node. Mainly used for custom model tasks.
1376
+ * The name of the file input field to use as the mask source
1263
1377
  */
1264
- modelId?: string;
1378
+ maskFrom?: string;
1265
1379
 
1266
1380
  /**
1267
- * The output of the node. Only available for logic nodes.
1381
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
1382
+ * types.
1268
1383
  */
1269
- output?: unknown;
1384
+ max?: number;
1270
1385
 
1271
1386
  /**
1272
- * The workflow id for the node. Mainly used for workflow tasks.
1387
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
1388
+ * \`string_array\`.
1273
1389
  */
1274
- workflowId?: string;
1275
- }
1390
+ maxLength?: number;
1276
1391
 
1277
- export namespace Flow {
1278
- export interface Asset {
1279
- assetId: string;
1392
+ /**
1393
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
1394
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
1395
+ * creation time.
1396
+ */
1397
+ maxSize?: number;
1280
1398
 
1281
- url: string;
1282
- }
1399
+ /**
1400
+ * The minimum allowed value. Only available for \`number\` and array input types.
1401
+ */
1402
+ min?: number;
1283
1403
 
1284
1404
  /**
1285
- * This is used to run the flow.
1405
+ * The minimum allowed length for string inputs. Also applies to each item in
1406
+ * \`string_array\`.
1286
1407
  */
1287
- export interface Input {
1408
+ minLength?: number;
1409
+
1410
+ /**
1411
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
1412
+ * available for \`model_array\` input type.
1413
+ */
1414
+ modelTypes?: Array<
1415
+ | 'custom'
1416
+ | 'elevenlabs-voice'
1417
+ | 'flux.1'
1418
+ | 'flux.1-composition'
1419
+ | 'flux.1-kontext-dev'
1420
+ | 'flux.1-kontext-lora'
1421
+ | 'flux.1-krea-dev'
1422
+ | 'flux.1-krea-lora'
1423
+ | 'flux.1-lora'
1424
+ | 'flux.1-pro'
1425
+ | 'flux.1.1-pro-ultra'
1426
+ | 'flux.2-dev-edit-lora'
1427
+ | 'flux.2-dev-lora'
1428
+ | 'flux.2-klein-4b-edit-lora'
1429
+ | 'flux.2-klein-4b-lora'
1430
+ | 'flux.2-klein-9b-edit-lora'
1431
+ | 'flux.2-klein-9b-lora'
1432
+ | 'flux.2-klein-base-4b-edit-lora'
1433
+ | 'flux.2-klein-base-4b-lora'
1434
+ | 'flux.2-klein-base-9b-edit-lora'
1435
+ | 'flux.2-klein-base-9b-lora'
1436
+ | 'flux1.1-pro'
1437
+ | 'gpt-image-1'
1438
+ | 'qwen-image-2512-lora'
1439
+ | 'qwen-image-edit-2509-lora'
1440
+ | 'qwen-image-edit-2511-lora'
1441
+ | 'qwen-image-edit-lora'
1442
+ | 'qwen-image-lora'
1443
+ | 'sd-1_5'
1444
+ | 'sd-1_5-composition'
1445
+ | 'sd-1_5-lora'
1446
+ | 'sd-xl'
1447
+ | 'sd-xl-composition'
1448
+ | 'sd-xl-lora'
1449
+ | 'zimage-de-turbo-lora'
1450
+ | 'zimage-lora'
1451
+ | 'zimage-turbo-lora'
1452
+ >;
1453
+
1454
+ /**
1455
+ * Whether this input represents a parent asset to assign to the produced assets.
1456
+ * Only available for \`file\` and \`file_array\` input types.
1457
+ *
1458
+ * For \`file_array\`, the parent asset is the first item in the array.
1459
+ */
1460
+ parent?: boolean;
1461
+
1462
+ /**
1463
+ * Placeholder text for the input. Only available for 'string' input type.
1464
+ */
1465
+ placeholder?: string;
1466
+
1467
+ /**
1468
+ * Whether the input is a prompt. When true, displays as a text area with prompt
1469
+ * spark feature. Only available for \`string\` input type.
1470
+ */
1471
+ prompt?: boolean;
1472
+
1473
+ /**
1474
+ * Whether the input is used with prompt spark. Only available for \`string\` input
1475
+ * type.
1476
+ */
1477
+ promptSpark?: boolean;
1478
+
1479
+ /**
1480
+ * The reference to another input or output of the same workflow. Must have at
1481
+ * least one of node or conditional.
1482
+ */
1483
+ ref?: Input.Ref;
1484
+
1485
+ /**
1486
+ * Set of rules that describes when this input is required:
1487
+ *
1488
+ * - \`always\`: Input is always required
1489
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1490
+ * defined
1491
+ * - \`ifDefined\`: Input is required when another specified input is defined
1492
+ * - \`conditionalValues\`: Input is required when another input has a specific
1493
+ * value
1494
+ *
1495
+ * By default, the input is not required.
1496
+ */
1497
+ required?: Input.Required;
1498
+
1499
+ /**
1500
+ * The step increment for numeric inputs. Only available for \`number\` input type.
1501
+ */
1502
+ step?: number;
1503
+
1504
+ /**
1505
+ * The value of the input. This is the value of the input that will be used to run
1506
+ * the node. Only available for flows managed by a WorkflowJob.
1507
+ */
1508
+ value?: unknown;
1509
+ }
1510
+
1511
+ export namespace Input {
1512
+ /**
1513
+ * A sub-input within an inputs_array item. Same as NodeInput but without the
1514
+ * recursive items field.
1515
+ */
1516
+ export interface Item {
1288
1517
  /**
1289
1518
  * The name that must be user to call the model through the API
1290
1519
  */
@@ -1356,13 +1585,6 @@ export namespace JobListResponse {
1356
1585
  */
1357
1586
  inputs?: Array<{ [key: string]: unknown }>;
1358
1587
 
1359
- /**
1360
- * The configured items for inputs_array type inputs. Each item is an array of
1361
- * SubNodeInput that need ref/value resolution. Only available for inputs_array
1362
- * type.
1363
- */
1364
- items?: Array<Array<Input.Item>>;
1365
-
1366
1588
  /**
1367
1589
  * The asset kind of the input. Only taken into account for \`file\` and
1368
1590
  * \`file_array\` input types. If model provides multiple kinds, the input will be
@@ -1405,415 +1627,114 @@ export namespace JobListResponse {
1405
1627
  */
1406
1628
  min?: number;
1407
1629
 
1408
- /**
1409
- * The minimum allowed length for string inputs. Also applies to each item in
1410
- * \`string_array\`.
1411
- */
1412
- minLength?: number;
1413
-
1414
- /**
1415
- * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
1416
- * available for \`model_array\` input type.
1417
- */
1418
- modelTypes?: Array<
1419
- | 'custom'
1420
- | 'elevenlabs-voice'
1421
- | 'flux.1'
1422
- | 'flux.1-composition'
1423
- | 'flux.1-kontext-dev'
1424
- | 'flux.1-kontext-lora'
1425
- | 'flux.1-krea-dev'
1426
- | 'flux.1-krea-lora'
1427
- | 'flux.1-lora'
1428
- | 'flux.1-pro'
1429
- | 'flux.1.1-pro-ultra'
1430
- | 'flux.2-dev-edit-lora'
1431
- | 'flux.2-dev-lora'
1432
- | 'flux.2-klein-4b-edit-lora'
1433
- | 'flux.2-klein-4b-lora'
1434
- | 'flux.2-klein-9b-edit-lora'
1435
- | 'flux.2-klein-9b-lora'
1436
- | 'flux.2-klein-base-4b-edit-lora'
1437
- | 'flux.2-klein-base-4b-lora'
1438
- | 'flux.2-klein-base-9b-edit-lora'
1439
- | 'flux.2-klein-base-9b-lora'
1440
- | 'flux1.1-pro'
1441
- | 'gpt-image-1'
1442
- | 'qwen-image-2512-lora'
1443
- | 'qwen-image-edit-2509-lora'
1444
- | 'qwen-image-edit-2511-lora'
1445
- | 'qwen-image-edit-lora'
1446
- | 'qwen-image-lora'
1447
- | 'sd-1_5'
1448
- | 'sd-1_5-composition'
1449
- | 'sd-1_5-lora'
1450
- | 'sd-xl'
1451
- | 'sd-xl-composition'
1452
- | 'sd-xl-lora'
1453
- | 'zimage-de-turbo-lora'
1454
- | 'zimage-lora'
1455
- | 'zimage-turbo-lora'
1456
- >;
1457
-
1458
- /**
1459
- * Whether this input represents a parent asset to assign to the produced assets.
1460
- * Only available for \`file\` and \`file_array\` input types.
1461
- *
1462
- * For \`file_array\`, the parent asset is the first item in the array.
1463
- */
1464
- parent?: boolean;
1465
-
1466
- /**
1467
- * Placeholder text for the input. Only available for 'string' input type.
1468
- */
1469
- placeholder?: string;
1470
-
1471
- /**
1472
- * Whether the input is a prompt. When true, displays as a text area with prompt
1473
- * spark feature. Only available for \`string\` input type.
1474
- */
1475
- prompt?: boolean;
1476
-
1477
- /**
1478
- * Whether the input is used with prompt spark. Only available for \`string\` input
1479
- * type.
1480
- */
1481
- promptSpark?: boolean;
1482
-
1483
- /**
1484
- * The reference to another input or output of the same workflow. Must have at
1485
- * least one of node or conditional.
1486
- */
1487
- ref?: Input.Ref;
1488
-
1489
- /**
1490
- * Set of rules that describes when this input is required:
1491
- *
1492
- * - \`always\`: Input is always required
1493
- * - \`ifNotDefined\`: Input is required when another specified input is not
1494
- * defined
1495
- * - \`ifDefined\`: Input is required when another specified input is defined
1496
- * - \`conditionalValues\`: Input is required when another input has a specific
1497
- * value
1498
- *
1499
- * By default, the input is not required.
1500
- */
1501
- required?: Input.Required;
1502
-
1503
- /**
1504
- * The step increment for numeric inputs. Only available for \`number\` input type.
1505
- */
1506
- step?: number;
1507
-
1508
- /**
1509
- * The value of the input. This is the value of the input that will be used to run
1510
- * the node. Only available for flows managed by a WorkflowJob.
1511
- */
1512
- value?: unknown;
1513
- }
1514
-
1515
- export namespace Input {
1516
- /**
1517
- * A sub-input within an inputs_array item. Same as NodeInput but without the
1518
- * recursive items field.
1519
- */
1520
- export interface Item {
1521
- /**
1522
- * The name that must be user to call the model through the API
1523
- */
1524
- name: string;
1525
-
1526
- /**
1527
- * The data type of the input
1528
- */
1529
- type:
1530
- | 'boolean'
1531
- | 'file'
1532
- | 'file_array'
1533
- | 'inputs_array'
1534
- | 'model'
1535
- | 'model_array'
1536
- | 'number'
1537
- | 'number_array'
1538
- | 'string'
1539
- | 'string_array';
1540
-
1541
- /**
1542
- * The allowed values for the input. For \`string\` or \`number\` types, creates a
1543
- * single-select dropdown. For \`string_array\` type, creates a multi-select
1544
- * dropdown.
1545
- */
1546
- allowedValues?: Array<unknown>;
1547
-
1548
- /**
1549
- * Specifies the background behavior for the input. Only available for \`file\` and
1550
- * \`file_array\` input types with kind \`image\`.
1551
- */
1552
- backgroundBehavior?: 'opaque' | 'transparent';
1553
-
1554
- /**
1555
- * Whether the input is a color or not. Only available for \`string\` input type.
1556
- */
1557
- color?: boolean;
1558
-
1559
- /**
1560
- * Whether this input affects the model's cost calculation
1561
- */
1562
- costImpact?: boolean;
1563
-
1564
- /**
1565
- * The default value for the input
1566
- */
1567
- default?: unknown;
1568
-
1569
- /**
1570
- * Help text displayed in the UI to provide additional information about the input
1571
- */
1572
- description?: string;
1573
-
1574
- /**
1575
- * Used to visually group inputs together in the UI. Inputs with the same group
1576
- * value appear consecutively in the UI.
1577
- */
1578
- group?: string;
1579
-
1580
- /**
1581
- * Hint text displayed in the UI as a tooltip to guide the user
1582
- */
1583
- hint?: string;
1584
-
1585
- /**
1586
- * The list of inputs which form an object within a container array. All inputs are
1587
- * the same as the current object. This is only available for type inputs_array
1588
- * inputs.
1589
- */
1590
- inputs?: Array<{ [key: string]: unknown }>;
1591
-
1592
- /**
1593
- * The asset kind of the input. Only taken into account for \`file\` and
1594
- * \`file_array\` input types. If model provides multiple kinds, the input will be
1595
- * not able to create the asset on the flight on API side with dataurl without
1596
- * data:kind, prefix
1597
- */
1598
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
1599
-
1600
- /**
1601
- * The label displayed in the UI for this input
1602
- */
1603
- label?: string;
1604
-
1605
- /**
1606
- * The name of the file input field to use as the mask source
1607
- */
1608
- maskFrom?: string;
1609
-
1610
- /**
1611
- * The maximum allowed value. Only available for \`number\` and \`array\` input
1612
- * types.
1613
- */
1614
- max?: number;
1615
-
1616
- /**
1617
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
1618
- * \`string_array\`.
1619
- */
1620
- maxLength?: number;
1621
-
1622
- /**
1623
- * The maximum allowed file size in bytes. Only applies to \`file\` and
1624
- * \`file_array\` input types. Validated against \`asset.properties.size\` at job
1625
- * creation time.
1626
- */
1627
- maxSize?: number;
1628
-
1629
- /**
1630
- * The minimum allowed value. Only available for \`number\` and array input types.
1631
- */
1632
- min?: number;
1633
-
1634
- /**
1635
- * The minimum allowed length for string inputs. Also applies to each item in
1636
- * \`string_array\`.
1637
- */
1638
- minLength?: number;
1639
-
1640
- /**
1641
- * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
1642
- * available for \`model_array\` input type.
1643
- */
1644
- modelTypes?: Array<
1645
- | 'custom'
1646
- | 'elevenlabs-voice'
1647
- | 'flux.1'
1648
- | 'flux.1-composition'
1649
- | 'flux.1-kontext-dev'
1650
- | 'flux.1-kontext-lora'
1651
- | 'flux.1-krea-dev'
1652
- | 'flux.1-krea-lora'
1653
- | 'flux.1-lora'
1654
- | 'flux.1-pro'
1655
- | 'flux.1.1-pro-ultra'
1656
- | 'flux.2-dev-edit-lora'
1657
- | 'flux.2-dev-lora'
1658
- | 'flux.2-klein-4b-edit-lora'
1659
- | 'flux.2-klein-4b-lora'
1660
- | 'flux.2-klein-9b-edit-lora'
1661
- | 'flux.2-klein-9b-lora'
1662
- | 'flux.2-klein-base-4b-edit-lora'
1663
- | 'flux.2-klein-base-4b-lora'
1664
- | 'flux.2-klein-base-9b-edit-lora'
1665
- | 'flux.2-klein-base-9b-lora'
1666
- | 'flux1.1-pro'
1667
- | 'gpt-image-1'
1668
- | 'qwen-image-2512-lora'
1669
- | 'qwen-image-edit-2509-lora'
1670
- | 'qwen-image-edit-2511-lora'
1671
- | 'qwen-image-edit-lora'
1672
- | 'qwen-image-lora'
1673
- | 'sd-1_5'
1674
- | 'sd-1_5-composition'
1675
- | 'sd-1_5-lora'
1676
- | 'sd-xl'
1677
- | 'sd-xl-composition'
1678
- | 'sd-xl-lora'
1679
- | 'zimage-de-turbo-lora'
1680
- | 'zimage-lora'
1681
- | 'zimage-turbo-lora'
1682
- >;
1683
-
1684
- /**
1685
- * Whether this input represents a parent asset to assign to the produced assets.
1686
- * Only available for \`file\` and \`file_array\` input types.
1687
- *
1688
- * For \`file_array\`, the parent asset is the first item in the array.
1689
- */
1690
- parent?: boolean;
1691
-
1692
- /**
1693
- * Placeholder text for the input. Only available for 'string' input type.
1694
- */
1695
- placeholder?: string;
1696
-
1697
- /**
1698
- * Whether the input is a prompt. When true, displays as a text area with prompt
1699
- * spark feature. Only available for \`string\` input type.
1700
- */
1701
- prompt?: boolean;
1702
-
1703
- /**
1704
- * Whether the input is used with prompt spark. Only available for \`string\` input
1705
- * type.
1706
- */
1707
- promptSpark?: boolean;
1708
-
1709
- /**
1710
- * The reference to another input or output of the same workflow. Must have at
1711
- * least one of node or conditional.
1712
- */
1713
- ref?: Item.Ref;
1714
-
1715
- /**
1716
- * Set of rules that describes when this input is required:
1717
- *
1718
- * - \`always\`: Input is always required
1719
- * - \`ifNotDefined\`: Input is required when another specified input is not
1720
- * defined
1721
- * - \`ifDefined\`: Input is required when another specified input is defined
1722
- * - \`conditionalValues\`: Input is required when another input has a specific
1723
- * value
1724
- *
1725
- * By default, the input is not required.
1726
- */
1727
- required?: Item.Required;
1728
-
1729
- /**
1730
- * The step increment for numeric inputs. Only available for \`number\` input type.
1731
- */
1732
- step?: number;
1630
+ /**
1631
+ * The minimum allowed length for string inputs. Also applies to each item in
1632
+ * \`string_array\`.
1633
+ */
1634
+ minLength?: number;
1733
1635
 
1734
- /**
1735
- * The value of the input. This is the value of the input that will be used to run
1736
- * the node. Only available for flows managed by a WorkflowJob.
1737
- */
1738
- value?: unknown;
1739
- }
1636
+ /**
1637
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
1638
+ * available for \`model_array\` input type.
1639
+ */
1640
+ modelTypes?: Array<
1641
+ | 'custom'
1642
+ | 'elevenlabs-voice'
1643
+ | 'flux.1'
1644
+ | 'flux.1-composition'
1645
+ | 'flux.1-kontext-dev'
1646
+ | 'flux.1-kontext-lora'
1647
+ | 'flux.1-krea-dev'
1648
+ | 'flux.1-krea-lora'
1649
+ | 'flux.1-lora'
1650
+ | 'flux.1-pro'
1651
+ | 'flux.1.1-pro-ultra'
1652
+ | 'flux.2-dev-edit-lora'
1653
+ | 'flux.2-dev-lora'
1654
+ | 'flux.2-klein-4b-edit-lora'
1655
+ | 'flux.2-klein-4b-lora'
1656
+ | 'flux.2-klein-9b-edit-lora'
1657
+ | 'flux.2-klein-9b-lora'
1658
+ | 'flux.2-klein-base-4b-edit-lora'
1659
+ | 'flux.2-klein-base-4b-lora'
1660
+ | 'flux.2-klein-base-9b-edit-lora'
1661
+ | 'flux.2-klein-base-9b-lora'
1662
+ | 'flux1.1-pro'
1663
+ | 'gpt-image-1'
1664
+ | 'qwen-image-2512-lora'
1665
+ | 'qwen-image-edit-2509-lora'
1666
+ | 'qwen-image-edit-2511-lora'
1667
+ | 'qwen-image-edit-lora'
1668
+ | 'qwen-image-lora'
1669
+ | 'sd-1_5'
1670
+ | 'sd-1_5-composition'
1671
+ | 'sd-1_5-lora'
1672
+ | 'sd-xl'
1673
+ | 'sd-xl-composition'
1674
+ | 'sd-xl-lora'
1675
+ | 'zimage-de-turbo-lora'
1676
+ | 'zimage-lora'
1677
+ | 'zimage-turbo-lora'
1678
+ >;
1740
1679
 
1741
- export namespace Item {
1742
- /**
1743
- * The reference to another input or output of the same workflow. Must have at
1744
- * least one of node or conditional.
1745
- */
1746
- export interface Ref {
1747
- /**
1748
- * The conditional nodes to reference. If the conditional nodes are successful, the
1749
- * node will be successful. If the conditional nodes are skipped, the node will be
1750
- * skipped. Contains an array of node ids used to check the status of the nodes.
1751
- */
1752
- conditional?: Array<string>;
1680
+ /**
1681
+ * Whether this input represents a parent asset to assign to the produced assets.
1682
+ * Only available for \`file\` and \`file_array\` input types.
1683
+ *
1684
+ * For \`file_array\`, the parent asset is the first item in the array.
1685
+ */
1686
+ parent?: boolean;
1753
1687
 
1754
- /**
1755
- * This is the desired node output value if ref is an if/else node.
1756
- */
1757
- equal?: string;
1688
+ /**
1689
+ * Placeholder text for the input. Only available for 'string' input type.
1690
+ */
1691
+ placeholder?: string;
1758
1692
 
1759
- /**
1760
- * The name of the input or output to reference. If the type is 'workflow', the
1761
- * name is the name of the input of the workflow is required If the type is 'node',
1762
- * the name is not mandatory, except if you want all outputs of the node. To get
1763
- * all outputs of a node, you can use the name 'all'.
1764
- */
1765
- name?: string;
1693
+ /**
1694
+ * Whether the input is a prompt. When true, displays as a text area with prompt
1695
+ * spark feature. Only available for \`string\` input type.
1696
+ */
1697
+ prompt?: boolean;
1766
1698
 
1767
- /**
1768
- * The node id or 'workflow' if the source is a workflow input.
1769
- */
1770
- node?: string;
1771
- }
1699
+ /**
1700
+ * Whether the input is used with prompt spark. Only available for \`string\` input
1701
+ * type.
1702
+ */
1703
+ promptSpark?: boolean;
1772
1704
 
1773
- /**
1774
- * Set of rules that describes when this input is required:
1775
- *
1776
- * - \`always\`: Input is always required
1777
- * - \`ifNotDefined\`: Input is required when another specified input is not
1778
- * defined
1779
- * - \`ifDefined\`: Input is required when another specified input is defined
1780
- * - \`conditionalValues\`: Input is required when another input has a specific
1781
- * value
1782
- *
1783
- * By default, the input is not required.
1784
- */
1785
- export interface Required {
1786
- /**
1787
- * Whether the input is always required
1788
- */
1789
- always?: boolean;
1705
+ /**
1706
+ * The reference to another input or output of the same workflow. Must have at
1707
+ * least one of node or conditional.
1708
+ */
1709
+ ref?: Item.Ref;
1790
1710
 
1791
- /**
1792
- * Makes this input required when another input has a specific value:
1793
- *
1794
- * - Key: name of the input to check
1795
- * - Value: operation and allowed values that trigger the requirement
1796
- */
1797
- conditionalValues?: unknown;
1711
+ /**
1712
+ * Set of rules that describes when this input is required:
1713
+ *
1714
+ * - \`always\`: Input is always required
1715
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1716
+ * defined
1717
+ * - \`ifDefined\`: Input is required when another specified input is defined
1718
+ * - \`conditionalValues\`: Input is required when another input has a specific
1719
+ * value
1720
+ *
1721
+ * By default, the input is not required.
1722
+ */
1723
+ required?: Item.Required;
1798
1724
 
1799
- /**
1800
- * Makes this input required when another input is defined:
1801
- *
1802
- * - Key: name of the input that must be defined
1803
- * - Value: message to display when this input is required
1804
- */
1805
- ifDefined?: unknown;
1725
+ /**
1726
+ * The step increment for numeric inputs. Only available for \`number\` input type.
1727
+ */
1728
+ step?: number;
1806
1729
 
1807
- /**
1808
- * Makes this input required when another input is not defined:
1809
- *
1810
- * - Key: name of the input that must be undefined
1811
- * - Value: message to display when this input is required
1812
- */
1813
- ifNotDefined?: unknown;
1814
- }
1815
- }
1730
+ /**
1731
+ * The value of the input. This is the value of the input that will be used to run
1732
+ * the node. Only available for flows managed by a WorkflowJob.
1733
+ */
1734
+ value?: unknown;
1735
+ }
1816
1736
 
1737
+ export namespace Item {
1817
1738
  /**
1818
1739
  * The reference to another input or output of the same workflow. Must have at
1819
1740
  * least one of node or conditional.
@@ -1890,59 +1811,133 @@ export namespace JobListResponse {
1890
1811
  }
1891
1812
 
1892
1813
  /**
1893
- * The logic of the node. Only available for logic nodes.
1814
+ * The reference to another input or output of the same workflow. Must have at
1815
+ * least one of node or conditional.
1894
1816
  */
1895
- export interface Logic {
1817
+ export interface Ref {
1896
1818
  /**
1897
- * The cases of the logic. Only available for if/else nodes.
1819
+ * The conditional nodes to reference. If the conditional nodes are successful, the
1820
+ * node will be successful. If the conditional nodes are skipped, the node will be
1821
+ * skipped. Contains an array of node ids used to check the status of the nodes.
1898
1822
  */
1899
- cases?: Array<Logic.Case>;
1823
+ conditional?: Array<string>;
1900
1824
 
1901
1825
  /**
1902
- * The default case of the logic. Contains the id/output of the node to execute if
1903
- * no case is matched. Only available for if/else nodes.
1826
+ * This is the desired node output value if ref is an if/else node.
1904
1827
  */
1905
- default?: string;
1828
+ equal?: string;
1906
1829
 
1907
1830
  /**
1908
- * The transform of the logic. Only available for transform nodes.
1831
+ * The name of the input or output to reference. If the type is 'workflow', the
1832
+ * name is the name of the input of the workflow is required If the type is 'node',
1833
+ * the name is not mandatory, except if you want all outputs of the node. To get
1834
+ * all outputs of a node, you can use the name 'all'.
1909
1835
  */
1910
- transform?: string;
1836
+ name?: string;
1837
+
1838
+ /**
1839
+ * The node id or 'workflow' if the source is a workflow input.
1840
+ */
1841
+ node?: string;
1911
1842
  }
1912
1843
 
1913
- export namespace Logic {
1914
- export interface Case {
1915
- condition: string;
1844
+ /**
1845
+ * Set of rules that describes when this input is required:
1846
+ *
1847
+ * - \`always\`: Input is always required
1848
+ * - \`ifNotDefined\`: Input is required when another specified input is not
1849
+ * defined
1850
+ * - \`ifDefined\`: Input is required when another specified input is defined
1851
+ * - \`conditionalValues\`: Input is required when another input has a specific
1852
+ * value
1853
+ *
1854
+ * By default, the input is not required.
1855
+ */
1856
+ export interface Required {
1857
+ /**
1858
+ * Whether the input is always required
1859
+ */
1860
+ always?: boolean;
1916
1861
 
1917
- value: string;
1918
- }
1862
+ /**
1863
+ * Makes this input required when another input has a specific value:
1864
+ *
1865
+ * - Key: name of the input to check
1866
+ * - Value: operation and allowed values that trigger the requirement
1867
+ */
1868
+ conditionalValues?: unknown;
1869
+
1870
+ /**
1871
+ * Makes this input required when another input is defined:
1872
+ *
1873
+ * - Key: name of the input that must be defined
1874
+ * - Value: message to display when this input is required
1875
+ */
1876
+ ifDefined?: unknown;
1877
+
1878
+ /**
1879
+ * Makes this input required when another input is not defined:
1880
+ *
1881
+ * - Key: name of the input that must be undefined
1882
+ * - Value: message to display when this input is required
1883
+ */
1884
+ ifNotDefined?: unknown;
1919
1885
  }
1920
1886
  }
1921
- }
1922
1887
 
1923
- export interface StatusHistory {
1924
- date: string;
1888
+ /**
1889
+ * The logic of the node. Only available for logic nodes.
1890
+ */
1891
+ export interface Logic {
1892
+ /**
1893
+ * The cases of the logic. Only available for if/else nodes.
1894
+ */
1895
+ cases?: Array<Logic.Case>;
1925
1896
 
1926
- status:
1927
- | 'canceled'
1928
- | 'failure'
1929
- | 'finalizing'
1930
- | 'in-progress'
1931
- | 'pending'
1932
- | 'queued'
1933
- | 'success'
1934
- | 'warming-up';
1935
- }
1897
+ /**
1898
+ * The default case of the logic. Contains the id/output of the node to execute if
1899
+ * no case is matched. Only available for if/else nodes.
1900
+ */
1901
+ default?: string;
1936
1902
 
1937
- /**
1938
- * The billing of the job
1939
- */
1940
- export interface Billing {
1941
- cuCost: number;
1903
+ /**
1904
+ * The transform of the logic. Only available for transform nodes.
1905
+ */
1906
+ transform?: string;
1907
+ }
1942
1908
 
1943
- cuDiscount: number;
1909
+ export namespace Logic {
1910
+ export interface Case {
1911
+ condition: string;
1912
+
1913
+ value: string;
1914
+ }
1915
+ }
1944
1916
  }
1945
1917
  }
1918
+
1919
+ export interface StatusHistory {
1920
+ date: string;
1921
+
1922
+ status:
1923
+ | 'canceled'
1924
+ | 'failure'
1925
+ | 'finalizing'
1926
+ | 'in-progress'
1927
+ | 'pending'
1928
+ | 'queued'
1929
+ | 'success'
1930
+ | 'warming-up';
1931
+ }
1932
+
1933
+ /**
1934
+ * The billing of the job
1935
+ */
1936
+ export interface Billing {
1937
+ cuCost: number;
1938
+
1939
+ cuDiscount: number;
1940
+ }
1946
1941
  }
1947
1942
 
1948
1943
  export interface JobTriggerActionResponse {
@@ -2897,7 +2892,7 @@ export namespace JobTriggerActionResponse {
2897
2892
  }
2898
2893
  }
2899
2894
 
2900
- export interface JobListParams {
2895
+ export interface JobListParams extends JobsCursorParams {
2901
2896
  /**
2902
2897
  * The authorId of the jobs to return. Optional.
2903
2898
  */
@@ -2914,11 +2909,6 @@ export interface JobListParams {
2914
2909
  */
2915
2910
  pageSize?: number;
2916
2911
 
2917
- /**
2918
- * A token you received in a previous request to query the next page of items
2919
- */
2920
- paginationToken?: string;
2921
-
2922
2912
  /**
2923
2913
  * The status of the jobs to return. Optional.
2924
2914
  */
@@ -3035,6 +3025,7 @@ export declare namespace Jobs {
3035
3025
  type JobRetrieveResponse as JobRetrieveResponse,
3036
3026
  type JobListResponse as JobListResponse,
3037
3027
  type JobTriggerActionResponse as JobTriggerActionResponse,
3028
+ type JobListResponsesJobsCursor as JobListResponsesJobsCursor,
3038
3029
  type JobListParams as JobListParams,
3039
3030
  type JobTriggerActionParams as JobTriggerActionParams,
3040
3031
  };