@scenario-labs/sdk 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (218) hide show
  1. package/CHANGELOG.md +48 -0
  2. package/README.md +44 -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 +21 -11
  8. package/client.js.map +1 -1
  9. package/client.mjs +21 -11
  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 +3 -0
  20. package/index.d.mts.map +1 -1
  21. package/index.d.ts +3 -0
  22. package/index.d.ts.map +1 -1
  23. package/index.js +9 -1
  24. package/index.js.map +1 -1
  25. package/index.mjs +3 -0
  26. package/index.mjs.map +1 -1
  27. package/internal/request-options.d.mts +1 -1
  28. package/internal/request-options.d.mts.map +1 -1
  29. package/internal/request-options.d.ts +1 -1
  30. package/internal/request-options.d.ts.map +1 -1
  31. package/lib/models.d.mts +34 -2
  32. package/lib/models.d.mts.map +1 -1
  33. package/lib/models.d.ts +34 -2
  34. package/lib/models.d.ts.map +1 -1
  35. package/lib/models.js +39 -2
  36. package/lib/models.js.map +1 -1
  37. package/lib/models.mjs +37 -1
  38. package/lib/models.mjs.map +1 -1
  39. package/lib/scenario.d.mts +2 -0
  40. package/lib/scenario.d.mts.map +1 -1
  41. package/lib/scenario.d.ts +2 -0
  42. package/lib/scenario.d.ts.map +1 -1
  43. package/lib/scenario.js +2 -0
  44. package/lib/scenario.js.map +1 -1
  45. package/lib/scenario.mjs +2 -0
  46. package/lib/scenario.mjs.map +1 -1
  47. package/lib/upload.d.mts +89 -0
  48. package/lib/upload.d.mts.map +1 -0
  49. package/lib/upload.d.ts +89 -0
  50. package/lib/upload.d.ts.map +1 -0
  51. package/lib/upload.js +193 -0
  52. package/lib/upload.js.map +1 -0
  53. package/lib/upload.mjs +156 -0
  54. package/lib/upload.mjs.map +1 -0
  55. package/lib/workflow.d.mts +19 -3
  56. package/lib/workflow.d.mts.map +1 -1
  57. package/lib/workflow.d.ts +19 -3
  58. package/lib/workflow.d.ts.map +1 -1
  59. package/lib/workflow.js +26 -5
  60. package/lib/workflow.js.map +1 -1
  61. package/lib/workflow.mjs +26 -5
  62. package/lib/workflow.mjs.map +1 -1
  63. package/lib/workflow_import_validator.d.mts +40 -0
  64. package/lib/workflow_import_validator.d.mts.map +1 -0
  65. package/lib/workflow_import_validator.d.ts +40 -0
  66. package/lib/workflow_import_validator.d.ts.map +1 -0
  67. package/lib/workflow_import_validator.js +69 -0
  68. package/lib/workflow_import_validator.js.map +1 -0
  69. package/lib/workflow_import_validator.mjs +64 -0
  70. package/lib/workflow_import_validator.mjs.map +1 -0
  71. package/lib/workflow_validator.d.mts +22 -0
  72. package/lib/workflow_validator.d.mts.map +1 -0
  73. package/lib/workflow_validator.d.ts +22 -0
  74. package/lib/workflow_validator.d.ts.map +1 -0
  75. package/lib/workflow_validator.js +124 -0
  76. package/lib/workflow_validator.js.map +1 -0
  77. package/lib/workflow_validator.mjs +121 -0
  78. package/lib/workflow_validator.mjs.map +1 -0
  79. package/package.json +11 -1
  80. package/pagination.d.mts +2 -0
  81. package/pagination.d.mts.map +1 -0
  82. package/pagination.d.ts +2 -0
  83. package/pagination.d.ts.map +1 -0
  84. package/pagination.js +6 -0
  85. package/pagination.js.map +1 -0
  86. package/pagination.mjs +2 -0
  87. package/pagination.mjs.map +1 -0
  88. package/resources/assets/assets.d.mts +631 -648
  89. package/resources/assets/assets.d.mts.map +1 -1
  90. package/resources/assets/assets.d.ts +631 -648
  91. package/resources/assets/assets.d.ts.map +1 -1
  92. package/resources/assets/assets.js +5 -4
  93. package/resources/assets/assets.js.map +1 -1
  94. package/resources/assets/assets.mjs +5 -4
  95. package/resources/assets/assets.mjs.map +1 -1
  96. package/resources/assets/index.d.mts +1 -1
  97. package/resources/assets/index.d.mts.map +1 -1
  98. package/resources/assets/index.d.ts +1 -1
  99. package/resources/assets/index.d.ts.map +1 -1
  100. package/resources/assets/index.js.map +1 -1
  101. package/resources/assets/index.mjs.map +1 -1
  102. package/resources/collections/assets.d.mts +8 -2
  103. package/resources/collections/assets.d.mts.map +1 -1
  104. package/resources/collections/assets.d.ts +8 -2
  105. package/resources/collections/assets.d.ts.map +1 -1
  106. package/resources/collections/assets.js +2 -2
  107. package/resources/collections/assets.js.map +1 -1
  108. package/resources/collections/assets.mjs +2 -2
  109. package/resources/collections/assets.mjs.map +1 -1
  110. package/resources/collections/collections.d.mts +42 -53
  111. package/resources/collections/collections.d.mts.map +1 -1
  112. package/resources/collections/collections.d.ts +42 -53
  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 +3 -3
  119. package/resources/collections/index.d.mts.map +1 -1
  120. package/resources/collections/index.d.ts +3 -3
  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 +2 -2
  124. package/resources/collections/index.mjs.map +1 -1
  125. package/resources/collections/models.d.mts +8 -2
  126. package/resources/collections/models.d.mts.map +1 -1
  127. package/resources/collections/models.d.ts +8 -2
  128. package/resources/collections/models.d.ts.map +1 -1
  129. package/resources/collections/models.js +2 -2
  130. package/resources/collections/models.js.map +1 -1
  131. package/resources/collections/models.mjs +2 -2
  132. package/resources/collections/models.mjs.map +1 -1
  133. package/resources/index.d.mts +7 -7
  134. package/resources/index.d.mts.map +1 -1
  135. package/resources/index.d.ts +7 -7
  136. package/resources/index.d.ts.map +1 -1
  137. package/resources/index.js.map +1 -1
  138. package/resources/index.mjs.map +1 -1
  139. package/resources/jobs.d.mts +369 -380
  140. package/resources/jobs.d.mts.map +1 -1
  141. package/resources/jobs.d.ts +369 -380
  142. package/resources/jobs.d.ts.map +1 -1
  143. package/resources/jobs.js +2 -1
  144. package/resources/jobs.js.map +1 -1
  145. package/resources/jobs.mjs +2 -1
  146. package/resources/jobs.mjs.map +1 -1
  147. package/resources/models/index.d.mts +1 -1
  148. package/resources/models/index.d.mts.map +1 -1
  149. package/resources/models/index.d.ts +1 -1
  150. package/resources/models/index.d.ts.map +1 -1
  151. package/resources/models/index.js.map +1 -1
  152. package/resources/models/index.mjs.map +1 -1
  153. package/resources/models/models.d.mts +956 -967
  154. package/resources/models/models.d.mts.map +1 -1
  155. package/resources/models/models.d.ts +956 -967
  156. package/resources/models/models.d.ts.map +1 -1
  157. package/resources/models/models.js +2 -1
  158. package/resources/models/models.js.map +1 -1
  159. package/resources/models/models.mjs +2 -1
  160. package/resources/models/models.mjs.map +1 -1
  161. package/resources/models/train.d.mts +38 -38
  162. package/resources/models/train.d.mts.map +1 -1
  163. package/resources/models/train.d.ts +38 -38
  164. package/resources/models/train.d.ts.map +1 -1
  165. package/resources/search.d.mts +215 -295
  166. package/resources/search.d.mts.map +1 -1
  167. package/resources/search.d.ts +215 -295
  168. package/resources/search.d.ts.map +1 -1
  169. package/resources/search.js +9 -2
  170. package/resources/search.js.map +1 -1
  171. package/resources/search.mjs +9 -2
  172. package/resources/search.mjs.map +1 -1
  173. package/resources/tags.d.mts +23 -35
  174. package/resources/tags.d.mts.map +1 -1
  175. package/resources/tags.d.ts +23 -35
  176. package/resources/tags.d.ts.map +1 -1
  177. package/resources/tags.js +2 -1
  178. package/resources/tags.js.map +1 -1
  179. package/resources/tags.mjs +2 -1
  180. package/resources/tags.mjs.map +1 -1
  181. package/resources/workflows.d.mts +688 -704
  182. package/resources/workflows.d.mts.map +1 -1
  183. package/resources/workflows.d.ts +688 -704
  184. package/resources/workflows.d.ts.map +1 -1
  185. package/resources/workflows.js +5 -1
  186. package/resources/workflows.js.map +1 -1
  187. package/resources/workflows.mjs +5 -1
  188. package/resources/workflows.mjs.map +1 -1
  189. package/src/client.ts +118 -15
  190. package/src/core/pagination.ts +497 -0
  191. package/src/index.ts +9 -0
  192. package/src/internal/request-options.ts +1 -1
  193. package/src/lib/models.ts +62 -2
  194. package/src/lib/scenario.ts +2 -0
  195. package/src/lib/upload.ts +250 -0
  196. package/src/lib/workflow.ts +39 -5
  197. package/src/lib/workflow_import_validator.ts +104 -0
  198. package/src/lib/workflow_validator.ts +167 -0
  199. package/src/pagination.ts +2 -0
  200. package/src/resources/assets/assets.ts +971 -905
  201. package/src/resources/assets/index.ts +3 -0
  202. package/src/resources/collections/assets.ts +14 -2
  203. package/src/resources/collections/collections.ts +49 -56
  204. package/src/resources/collections/index.ts +15 -2
  205. package/src/resources/collections/models.ts +14 -2
  206. package/src/resources/index.ts +10 -1
  207. package/src/resources/jobs.ts +613 -622
  208. package/src/resources/models/index.ts +1 -0
  209. package/src/resources/models/models.ts +1118 -1130
  210. package/src/resources/models/train.ts +40 -40
  211. package/src/resources/search.ts +239 -327
  212. package/src/resources/tags.ts +32 -39
  213. package/src/resources/workflows.ts +850 -864
  214. package/src/version.ts +1 -1
  215. package/version.d.mts +1 -1
  216. package/version.d.ts +1 -1
  217. package/version.js +1 -1
  218. package/version.mjs +1 -1
@@ -38,6 +38,7 @@ import {
38
38
  TrainingImages,
39
39
  } from './training-images';
40
40
  import { APIPromise } from '../../core/api-promise';
41
+ import { ModelsCursor, type ModelsCursorParams, PagePromise } from '../../core/pagination';
41
42
  import { RequestOptions } from '../../internal/request-options';
42
43
  import { path } from '../../internal/utils/path';
43
44
 
@@ -88,8 +89,8 @@ export class Models extends APIResource {
88
89
  list(
89
90
  query: ModelListParams | null | undefined = {},
90
91
  options?: RequestOptions,
91
- ): APIPromise<ModelListResponse> {
92
- return this._client.get('/models', { query, ...options });
92
+ ): PagePromise<ModelListResponsesModelsCursor, ModelListResponse> {
93
+ return this._client.getAPIList('/models', ModelsCursor<ModelListResponse>, { query, ...options });
93
94
  }
94
95
 
95
96
  /**
@@ -163,6 +164,8 @@ export class Models extends APIResource {
163
164
  }
164
165
  }
165
166
 
167
+ export type ModelListResponsesModelsCursor = ModelsCursor<ModelListResponse>;
168
+
166
169
  export interface ModelCreateResponse {
167
170
  model: ModelCreateResponse.Model;
168
171
  }
@@ -1102,54 +1105,54 @@ export namespace ModelCreateResponse {
1102
1105
  computedAt: string;
1103
1106
 
1104
1107
  /**
1105
- * Maximum cost per output asset (CU)
1108
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
1106
1109
  */
1107
- costPerAssetMaxCU: number;
1110
+ variantKey: string;
1108
1111
 
1109
1112
  /**
1110
- * Minimum cost per output asset (CU)
1113
+ * External quality score from arena.ai leaderboard
1111
1114
  */
1112
- costPerAssetMinCU: number;
1115
+ arenaScore?: Variant.ArenaScore;
1113
1116
 
1114
1117
  /**
1115
- * Median cost per output asset (CU)
1118
+ * Maximum cost per output asset (CU)
1116
1119
  */
1117
- costPerAssetP50CU: number;
1120
+ costPerAssetMaxCU?: number;
1118
1121
 
1119
1122
  /**
1120
- * Inference latency P50 per output asset (seconds)
1123
+ * Minimum cost per output asset (CU)
1121
1124
  */
1122
- inferenceLatencyP50Sec: number;
1125
+ costPerAssetMinCU?: number;
1123
1126
 
1124
1127
  /**
1125
- * Inference latency P75 per output asset (seconds)
1128
+ * Median cost per output asset (CU)
1126
1129
  */
1127
- inferenceLatencyP75Sec: number;
1130
+ costPerAssetP50CU?: number;
1128
1131
 
1129
1132
  /**
1130
- * Total latency P50 per output asset, including queue time (seconds)
1133
+ * Inference latency P50 per output asset (seconds)
1131
1134
  */
1132
- totalLatencyP50Sec: number;
1135
+ inferenceLatencyP50Sec?: number;
1133
1136
 
1134
1137
  /**
1135
- * Total latency P75 per output asset, including queue time (seconds)
1138
+ * Inference latency P75 per output asset (seconds)
1136
1139
  */
1137
- totalLatencyP75Sec: number;
1140
+ inferenceLatencyP75Sec?: number;
1138
1141
 
1139
1142
  /**
1140
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
1143
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
1141
1144
  */
1142
- variantKey: string;
1145
+ resolution?: string;
1143
1146
 
1144
1147
  /**
1145
- * External quality score from arena.ai leaderboard
1148
+ * Total latency P50 per output asset, including queue time (seconds)
1146
1149
  */
1147
- arenaScore?: Variant.ArenaScore;
1150
+ totalLatencyP50Sec?: number;
1148
1151
 
1149
1152
  /**
1150
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
1153
+ * Total latency P75 per output asset, including queue time (seconds)
1151
1154
  */
1152
- resolution?: string;
1155
+ totalLatencyP75Sec?: number;
1153
1156
  }
1154
1157
 
1155
1158
  export namespace Variant {
@@ -2398,54 +2401,54 @@ export namespace ModelRetrieveResponse {
2398
2401
  computedAt: string;
2399
2402
 
2400
2403
  /**
2401
- * Maximum cost per output asset (CU)
2404
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
2402
2405
  */
2403
- costPerAssetMaxCU: number;
2406
+ variantKey: string;
2404
2407
 
2405
2408
  /**
2406
- * Minimum cost per output asset (CU)
2409
+ * External quality score from arena.ai leaderboard
2407
2410
  */
2408
- costPerAssetMinCU: number;
2411
+ arenaScore?: Variant.ArenaScore;
2409
2412
 
2410
2413
  /**
2411
- * Median cost per output asset (CU)
2414
+ * Maximum cost per output asset (CU)
2412
2415
  */
2413
- costPerAssetP50CU: number;
2416
+ costPerAssetMaxCU?: number;
2414
2417
 
2415
2418
  /**
2416
- * Inference latency P50 per output asset (seconds)
2419
+ * Minimum cost per output asset (CU)
2417
2420
  */
2418
- inferenceLatencyP50Sec: number;
2421
+ costPerAssetMinCU?: number;
2419
2422
 
2420
2423
  /**
2421
- * Inference latency P75 per output asset (seconds)
2424
+ * Median cost per output asset (CU)
2422
2425
  */
2423
- inferenceLatencyP75Sec: number;
2426
+ costPerAssetP50CU?: number;
2424
2427
 
2425
2428
  /**
2426
- * Total latency P50 per output asset, including queue time (seconds)
2429
+ * Inference latency P50 per output asset (seconds)
2427
2430
  */
2428
- totalLatencyP50Sec: number;
2431
+ inferenceLatencyP50Sec?: number;
2429
2432
 
2430
2433
  /**
2431
- * Total latency P75 per output asset, including queue time (seconds)
2434
+ * Inference latency P75 per output asset (seconds)
2432
2435
  */
2433
- totalLatencyP75Sec: number;
2436
+ inferenceLatencyP75Sec?: number;
2434
2437
 
2435
2438
  /**
2436
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
2439
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
2437
2440
  */
2438
- variantKey: string;
2441
+ resolution?: string;
2439
2442
 
2440
2443
  /**
2441
- * External quality score from arena.ai leaderboard
2444
+ * Total latency P50 per output asset, including queue time (seconds)
2442
2445
  */
2443
- arenaScore?: Variant.ArenaScore;
2446
+ totalLatencyP50Sec?: number;
2444
2447
 
2445
2448
  /**
2446
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
2449
+ * Total latency P75 per output asset, including queue time (seconds)
2447
2450
  */
2448
- resolution?: string;
2451
+ totalLatencyP75Sec?: number;
2449
2452
  }
2450
2453
 
2451
2454
  export namespace Variant {
@@ -3694,54 +3697,54 @@ export namespace ModelUpdateResponse {
3694
3697
  computedAt: string;
3695
3698
 
3696
3699
  /**
3697
- * Maximum cost per output asset (CU)
3700
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
3698
3701
  */
3699
- costPerAssetMaxCU: number;
3702
+ variantKey: string;
3700
3703
 
3701
3704
  /**
3702
- * Minimum cost per output asset (CU)
3705
+ * External quality score from arena.ai leaderboard
3703
3706
  */
3704
- costPerAssetMinCU: number;
3707
+ arenaScore?: Variant.ArenaScore;
3705
3708
 
3706
3709
  /**
3707
- * Median cost per output asset (CU)
3710
+ * Maximum cost per output asset (CU)
3708
3711
  */
3709
- costPerAssetP50CU: number;
3712
+ costPerAssetMaxCU?: number;
3710
3713
 
3711
3714
  /**
3712
- * Inference latency P50 per output asset (seconds)
3715
+ * Minimum cost per output asset (CU)
3713
3716
  */
3714
- inferenceLatencyP50Sec: number;
3717
+ costPerAssetMinCU?: number;
3715
3718
 
3716
3719
  /**
3717
- * Inference latency P75 per output asset (seconds)
3720
+ * Median cost per output asset (CU)
3718
3721
  */
3719
- inferenceLatencyP75Sec: number;
3722
+ costPerAssetP50CU?: number;
3720
3723
 
3721
3724
  /**
3722
- * Total latency P50 per output asset, including queue time (seconds)
3725
+ * Inference latency P50 per output asset (seconds)
3723
3726
  */
3724
- totalLatencyP50Sec: number;
3727
+ inferenceLatencyP50Sec?: number;
3725
3728
 
3726
3729
  /**
3727
- * Total latency P75 per output asset, including queue time (seconds)
3730
+ * Inference latency P75 per output asset (seconds)
3728
3731
  */
3729
- totalLatencyP75Sec: number;
3732
+ inferenceLatencyP75Sec?: number;
3730
3733
 
3731
3734
  /**
3732
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
3735
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
3733
3736
  */
3734
- variantKey: string;
3737
+ resolution?: string;
3735
3738
 
3736
3739
  /**
3737
- * External quality score from arena.ai leaderboard
3740
+ * Total latency P50 per output asset, including queue time (seconds)
3738
3741
  */
3739
- arenaScore?: Variant.ArenaScore;
3742
+ totalLatencyP50Sec?: number;
3740
3743
 
3741
3744
  /**
3742
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
3745
+ * Total latency P75 per output asset, including queue time (seconds)
3743
3746
  */
3744
- resolution?: string;
3747
+ totalLatencyP75Sec?: number;
3745
3748
  }
3746
3749
 
3747
3750
  export namespace Variant {
@@ -4052,1302 +4055,1291 @@ export namespace ModelUpdateResponse {
4052
4055
  }
4053
4056
 
4054
4057
  export interface ModelListResponse {
4055
- models: Array<ModelListResponse.Model>;
4058
+ /**
4059
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
4060
+ */
4061
+ id: string;
4056
4062
 
4057
4063
  /**
4058
- * A token to query the next page of models
4064
+ * List of model capabilities (example: ["txt2img", "img2img",
4065
+ * "txt2img_ip_adapter", ...])
4059
4066
  */
4060
- nextPaginationToken?: string;
4061
- }
4067
+ capabilities: Array<
4068
+ | '3d23d'
4069
+ | 'audio2audio'
4070
+ | 'controlnet'
4071
+ | 'controlnet_img2img'
4072
+ | 'controlnet_inpaint'
4073
+ | 'controlnet_inpaint_ip_adapter'
4074
+ | 'controlnet_ip_adapter'
4075
+ | 'controlnet_reference'
4076
+ | 'controlnet_texture'
4077
+ | 'img23d'
4078
+ | 'img2img'
4079
+ | 'img2img_ip_adapter'
4080
+ | 'img2img_texture'
4081
+ | 'img2txt'
4082
+ | 'img2video'
4083
+ | 'inpaint'
4084
+ | 'inpaint_ip_adapter'
4085
+ | 'outpaint'
4086
+ | 'reference'
4087
+ | 'reference_texture'
4088
+ | 'txt23d'
4089
+ | 'txt2audio'
4090
+ | 'txt2img'
4091
+ | 'txt2img_ip_adapter'
4092
+ | 'txt2img_texture'
4093
+ | 'txt2txt'
4094
+ | 'txt2video'
4095
+ | 'video23d'
4096
+ | 'video2img'
4097
+ | 'video2video'
4098
+ >;
4062
4099
 
4063
- export namespace ModelListResponse {
4064
- export interface Model {
4065
- /**
4066
- * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
4067
- */
4068
- id: string;
4100
+ /**
4101
+ * A list of CollectionId this model belongs to
4102
+ */
4103
+ collectionIds: Array<string>;
4069
4104
 
4070
- /**
4071
- * List of model capabilities (example: ["txt2img", "img2img",
4072
- * "txt2img_ip_adapter", ...])
4073
- */
4074
- capabilities: Array<
4075
- | '3d23d'
4076
- | 'audio2audio'
4077
- | 'controlnet'
4078
- | 'controlnet_img2img'
4079
- | 'controlnet_inpaint'
4080
- | 'controlnet_inpaint_ip_adapter'
4081
- | 'controlnet_ip_adapter'
4082
- | 'controlnet_reference'
4083
- | 'controlnet_texture'
4084
- | 'img23d'
4085
- | 'img2img'
4086
- | 'img2img_ip_adapter'
4087
- | 'img2img_texture'
4088
- | 'img2txt'
4089
- | 'img2video'
4090
- | 'inpaint'
4091
- | 'inpaint_ip_adapter'
4092
- | 'outpaint'
4093
- | 'reference'
4094
- | 'reference_texture'
4095
- | 'txt23d'
4096
- | 'txt2audio'
4097
- | 'txt2img'
4098
- | 'txt2img_ip_adapter'
4099
- | 'txt2img_texture'
4100
- | 'txt2txt'
4101
- | 'txt2video'
4102
- | 'video23d'
4103
- | 'video2img'
4104
- | 'video2video'
4105
- >;
4105
+ /**
4106
+ * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
4107
+ */
4108
+ createdAt: string;
4106
4109
 
4107
- /**
4108
- * A list of CollectionId this model belongs to
4109
- */
4110
- collectionIds: Array<string>;
4110
+ /**
4111
+ * Whether the model is a custom model and can be used only with POST
4112
+ * /generate/custom/{modelId} endpoint
4113
+ */
4114
+ custom: boolean;
4111
4115
 
4112
- /**
4113
- * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
4114
- */
4115
- createdAt: string;
4116
+ /**
4117
+ * List of all example asset IDs setup by the model owner
4118
+ */
4119
+ exampleAssetIds: Array<string>;
4116
4120
 
4117
- /**
4118
- * Whether the model is a custom model and can be used only with POST
4119
- * /generate/custom/{modelId} endpoint
4120
- */
4121
- custom: boolean;
4121
+ /**
4122
+ * The privacy of the model (default: private)
4123
+ */
4124
+ privacy: 'private' | 'public' | 'unlisted';
4122
4125
 
4123
- /**
4124
- * List of all example asset IDs setup by the model owner
4125
- */
4126
- exampleAssetIds: Array<string>;
4126
+ /**
4127
+ * The source of the model
4128
+ */
4129
+ source: 'civitai' | 'huggingface' | 'other' | 'scenario';
4127
4130
 
4128
- /**
4129
- * The privacy of the model (default: private)
4130
- */
4131
- privacy: 'private' | 'public' | 'unlisted';
4131
+ /**
4132
+ * The model status
4133
+ */
4134
+ status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
4132
4135
 
4133
- /**
4134
- * The source of the model
4135
- */
4136
- source: 'civitai' | 'huggingface' | 'other' | 'scenario';
4136
+ /**
4137
+ * The associated tags (example: ["sci-fi", "landscape"])
4138
+ */
4139
+ tags: Array<string>;
4137
4140
 
4138
- /**
4139
- * The model status
4140
- */
4141
- status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
4141
+ /**
4142
+ * The total number of training images
4143
+ */
4144
+ trainingImagesNumber: number;
4142
4145
 
4143
- /**
4144
- * The associated tags (example: ["sci-fi", "landscape"])
4145
- */
4146
- tags: Array<string>;
4146
+ /**
4147
+ * The model type (example: "flux.1-lora")
4148
+ */
4149
+ type:
4150
+ | 'custom'
4151
+ | 'elevenlabs-voice'
4152
+ | 'flux.1'
4153
+ | 'flux.1-composition'
4154
+ | 'flux.1-kontext-dev'
4155
+ | 'flux.1-kontext-lora'
4156
+ | 'flux.1-krea-dev'
4157
+ | 'flux.1-krea-lora'
4158
+ | 'flux.1-lora'
4159
+ | 'flux.1-pro'
4160
+ | 'flux.1.1-pro-ultra'
4161
+ | 'flux.2-dev-edit-lora'
4162
+ | 'flux.2-dev-lora'
4163
+ | 'flux.2-klein-4b-edit-lora'
4164
+ | 'flux.2-klein-4b-lora'
4165
+ | 'flux.2-klein-9b-edit-lora'
4166
+ | 'flux.2-klein-9b-lora'
4167
+ | 'flux.2-klein-base-4b-edit-lora'
4168
+ | 'flux.2-klein-base-4b-lora'
4169
+ | 'flux.2-klein-base-9b-edit-lora'
4170
+ | 'flux.2-klein-base-9b-lora'
4171
+ | 'flux1.1-pro'
4172
+ | 'gpt-image-1'
4173
+ | 'qwen-image-2512-lora'
4174
+ | 'qwen-image-edit-2509-lora'
4175
+ | 'qwen-image-edit-2511-lora'
4176
+ | 'qwen-image-edit-lora'
4177
+ | 'qwen-image-lora'
4178
+ | 'sd-1_5'
4179
+ | 'sd-1_5-composition'
4180
+ | 'sd-1_5-lora'
4181
+ | 'sd-xl'
4182
+ | 'sd-xl-composition'
4183
+ | 'sd-xl-lora'
4184
+ | 'zimage-de-turbo-lora'
4185
+ | 'zimage-lora'
4186
+ | 'zimage-turbo-lora';
4147
4187
 
4148
- /**
4149
- * The total number of training images
4150
- */
4151
- trainingImagesNumber: number;
4188
+ /**
4189
+ * The model last update date as an ISO string (example:
4190
+ * "2023-02-03T11:19:41.579Z")
4191
+ */
4192
+ updatedAt: string;
4152
4193
 
4153
- /**
4154
- * The model type (example: "flux.1-lora")
4155
- */
4156
- type:
4157
- | 'custom'
4158
- | 'elevenlabs-voice'
4159
- | 'flux.1'
4160
- | 'flux.1-composition'
4161
- | 'flux.1-kontext-dev'
4162
- | 'flux.1-kontext-lora'
4163
- | 'flux.1-krea-dev'
4164
- | 'flux.1-krea-lora'
4165
- | 'flux.1-lora'
4166
- | 'flux.1-pro'
4167
- | 'flux.1.1-pro-ultra'
4168
- | 'flux.2-dev-edit-lora'
4169
- | 'flux.2-dev-lora'
4170
- | 'flux.2-klein-4b-edit-lora'
4171
- | 'flux.2-klein-4b-lora'
4172
- | 'flux.2-klein-9b-edit-lora'
4173
- | 'flux.2-klein-9b-lora'
4174
- | 'flux.2-klein-base-4b-edit-lora'
4175
- | 'flux.2-klein-base-4b-lora'
4176
- | 'flux.2-klein-base-9b-edit-lora'
4177
- | 'flux.2-klein-base-9b-lora'
4178
- | 'flux1.1-pro'
4179
- | 'gpt-image-1'
4180
- | 'qwen-image-2512-lora'
4181
- | 'qwen-image-edit-2509-lora'
4182
- | 'qwen-image-edit-2511-lora'
4183
- | 'qwen-image-edit-lora'
4184
- | 'qwen-image-lora'
4185
- | 'sd-1_5'
4186
- | 'sd-1_5-composition'
4187
- | 'sd-1_5-lora'
4188
- | 'sd-xl'
4189
- | 'sd-xl-composition'
4190
- | 'sd-xl-lora'
4191
- | 'zimage-de-turbo-lora'
4192
- | 'zimage-lora'
4193
- | 'zimage-turbo-lora';
4194
+ /**
4195
+ * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
4196
+ * 75: Team plan 100: Enterprise plan
4197
+ */
4198
+ accessRestrictions?: 0 | 100 | 25 | 50 | 75;
4199
+
4200
+ /**
4201
+ * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
4202
+ */
4203
+ authorId?: string;
4204
+
4205
+ /**
4206
+ * The class of the model
4207
+ */
4208
+ class?: ModelListResponse.Class;
4209
+
4210
+ /**
4211
+ * List of base model IDs compliant with the model (example: ["flux.1-dev",
4212
+ * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
4213
+ */
4214
+ compliantModelIds?: Array<string>;
4215
+
4216
+ /**
4217
+ * The concepts is required for the type model: composition
4218
+ */
4219
+ concepts?: Array<ModelListResponse.Concept>;
4220
+
4221
+ /**
4222
+ * The epoch of the model. Only available for Flux Lora Trained models. If not set,
4223
+ * uses the final model epoch (latest)
4224
+ */
4225
+ epoch?: string;
4226
+
4227
+ /**
4228
+ * The epochs of the model. Only available for Flux Lora Trained models.
4229
+ */
4230
+ epochs?: Array<ModelListResponse.Epoch>;
4231
+
4232
+ /**
4233
+ * The inputs of the model. Only used for custom models. To retrieve this list, get
4234
+ * it by modelId with GET /models/{modelId}
4235
+ */
4236
+ inputs?: Array<ModelListResponse.Input>;
4237
+
4238
+ /**
4239
+ * The model keyword, this is a legacy parameter, please use conceptPrompt in
4240
+ * parameters
4241
+ */
4242
+ modelKeyword?: string;
4243
+
4244
+ /**
4245
+ * The model name (example: "Cinematic Realism")
4246
+ */
4247
+ name?: string;
4248
+
4249
+ /**
4250
+ * Fine-tune the model's inferences with negative prompt embedding
4251
+ */
4252
+ negativePromptEmbedding?: string;
4253
+
4254
+ /**
4255
+ * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
4256
+ */
4257
+ ownerId?: string;
4258
+
4259
+ /**
4260
+ * The parameters of the model
4261
+ */
4262
+ parameters?: ModelListResponse.Parameters;
4263
+
4264
+ /**
4265
+ * The id of the parent model
4266
+ */
4267
+ parentModelId?: string;
4268
+
4269
+ /**
4270
+ * Aggregated performance stats
4271
+ */
4272
+ performanceStats?: ModelListResponse.PerformanceStats;
4273
+
4274
+ /**
4275
+ * Fine-tune the model's inferences with prompt embedding
4276
+ */
4277
+ promptEmbedding?: string;
4278
+
4279
+ /**
4280
+ * The model short description (example: "This model generates highly detailed
4281
+ * cinematic scenes.")
4282
+ */
4283
+ shortDescription?: string;
4284
+
4285
+ /**
4286
+ * The date when the model will be soft deleted (only for Free plan)
4287
+ */
4288
+ softDeletionOn?: string;
4289
+
4290
+ /**
4291
+ * A thumbnail for your model
4292
+ */
4293
+ thumbnail?: ModelListResponse.Thumbnail;
4294
+
4295
+ /**
4296
+ * Array of training image pairs
4297
+ */
4298
+ trainingImagePairs?: Array<ModelListResponse.TrainingImagePair>;
4299
+
4300
+ /**
4301
+ * The URLs of the first 3 training images of the model. To retrieve the full set
4302
+ * of images, get it by modelId
4303
+ */
4304
+ trainingImages?: Array<ModelListResponse.TrainingImage>;
4305
+
4306
+ /**
4307
+ * Additional information about the training progress of the model
4308
+ */
4309
+ trainingProgress?: ModelListResponse.TrainingProgress;
4310
+
4311
+ /**
4312
+ * Additional information about the model's training
4313
+ */
4314
+ trainingStats?: ModelListResponse.TrainingStats;
4315
+
4316
+ /**
4317
+ * The UI configuration for the model
4318
+ */
4319
+ uiConfig?: ModelListResponse.UiConfig;
4320
+
4321
+ /**
4322
+ * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
4323
+ */
4324
+ userId?: string;
4325
+ }
4194
4326
 
4327
+ export namespace ModelListResponse {
4328
+ /**
4329
+ * The class of the model
4330
+ */
4331
+ export interface Class {
4195
4332
  /**
4196
- * The model last update date as an ISO string (example:
4197
- * "2023-02-03T11:19:41.579Z")
4333
+ * The category slug of the class (example: "art-style")
4198
4334
  */
4199
- updatedAt: string;
4335
+ category: string;
4200
4336
 
4201
4337
  /**
4202
- * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
4203
- * 75: Team plan 100: Enterprise plan
4338
+ * The concept prompt of the class (example: "a sks character design")
4204
4339
  */
4205
- accessRestrictions?: 0 | 100 | 25 | 50 | 75;
4340
+ conceptPrompt: string;
4206
4341
 
4207
4342
  /**
4208
- * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
4343
+ * The model ID of the class (example: "stable-diffusion-v1-5")
4209
4344
  */
4210
- authorId?: string;
4345
+ modelId: string;
4211
4346
 
4212
4347
  /**
4213
- * The class of the model
4348
+ * The class name (example: "Character Design")
4214
4349
  */
4215
- class?: Model.Class;
4350
+ name: string;
4216
4351
 
4217
4352
  /**
4218
- * List of base model IDs compliant with the model (example: ["flux.1-dev",
4219
- * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
4353
+ * The class prompt (example: "a character design")
4220
4354
  */
4221
- compliantModelIds?: Array<string>;
4355
+ prompt: string;
4222
4356
 
4223
4357
  /**
4224
- * The concepts is required for the type model: composition
4358
+ * The class slug (example: "art-style-character-design")
4225
4359
  */
4226
- concepts?: Array<Model.Concept>;
4360
+ slug: string;
4227
4361
 
4228
4362
  /**
4229
- * The epoch of the model. Only available for Flux Lora Trained models. If not set,
4230
- * uses the final model epoch (latest)
4363
+ * The class status (only published classes are listed, but unpublished classes can
4364
+ * still appear in existing models)
4231
4365
  */
4232
- epoch?: string;
4366
+ status: 'published' | 'unpublished';
4233
4367
 
4234
4368
  /**
4235
- * The epochs of the model. Only available for Flux Lora Trained models.
4369
+ * Some example images URLs to showcase the class
4236
4370
  */
4237
- epochs?: Array<Model.Epoch>;
4371
+ thumbnails: Array<string>;
4372
+ }
4238
4373
 
4374
+ export interface Concept {
4239
4375
  /**
4240
- * The inputs of the model. Only used for custom models. To retrieve this list, get
4241
- * it by modelId with GET /models/{modelId}
4376
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
4242
4377
  */
4243
- inputs?: Array<Model.Input>;
4378
+ modelId: string;
4244
4379
 
4245
4380
  /**
4246
- * The model keyword, this is a legacy parameter, please use conceptPrompt in
4247
- * parameters
4381
+ * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
4382
+ * is between 0 and 2.
4248
4383
  */
4249
- modelKeyword?: string;
4384
+ scale: number;
4250
4385
 
4251
4386
  /**
4252
- * The model name (example: "Cinematic Realism")
4387
+ * The epoch of the model (example: "000001") Only available for Flux Lora Trained
4388
+ * models
4253
4389
  */
4254
- name?: string;
4390
+ modelEpoch?: string;
4391
+ }
4255
4392
 
4393
+ export interface Epoch {
4256
4394
  /**
4257
- * Fine-tune the model's inferences with negative prompt embedding
4395
+ * The epoch hash to identify the epoch
4258
4396
  */
4259
- negativePromptEmbedding?: string;
4397
+ epoch: string;
4260
4398
 
4261
4399
  /**
4262
- * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
4400
+ * The assets of the epoch if sample prompts as been supplied during training
4263
4401
  */
4264
- ownerId?: string;
4402
+ assets?: Array<Epoch.Asset>;
4403
+ }
4404
+
4405
+ export namespace Epoch {
4406
+ export interface Asset {
4407
+ /**
4408
+ * The AssetId of the image during training (example:
4409
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
4410
+ */
4411
+ assetId: string;
4412
+
4413
+ /**
4414
+ * The url of the asset
4415
+ */
4416
+ url: string;
4417
+ }
4418
+ }
4265
4419
 
4420
+ /**
4421
+ * Defines the input parameters for a model. Use this to understand the available
4422
+ * input parameters for a given `modelId` when calling
4423
+ * `POST /generate/custom/{modelId}`. See {@link
4424
+ * https://docs.scenario.com/docs/video-generation} for examples.
4425
+ */
4426
+ export interface Input {
4266
4427
  /**
4267
- * The parameters of the model
4428
+ * The name that must be user to call the model through the API
4268
4429
  */
4269
- parameters?: Model.Parameters;
4430
+ name: string;
4270
4431
 
4271
4432
  /**
4272
- * The id of the parent model
4433
+ * The data type of the input
4273
4434
  */
4274
- parentModelId?: string;
4435
+ type:
4436
+ | 'boolean'
4437
+ | 'file'
4438
+ | 'file_array'
4439
+ | 'inputs_array'
4440
+ | 'model'
4441
+ | 'model_array'
4442
+ | 'number'
4443
+ | 'number_array'
4444
+ | 'string'
4445
+ | 'string_array';
4275
4446
 
4276
4447
  /**
4277
- * Aggregated performance stats
4448
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
4449
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
4450
+ * dropdown.
4278
4451
  */
4279
- performanceStats?: Model.PerformanceStats;
4452
+ allowedValues?: Array<unknown>;
4280
4453
 
4281
4454
  /**
4282
- * Fine-tune the model's inferences with prompt embedding
4455
+ * Specifies the background behavior for the input. Only available for \`file\` and
4456
+ * \`file_array\` input types with kind \`image\`.
4283
4457
  */
4284
- promptEmbedding?: string;
4458
+ backgroundBehavior?: 'opaque' | 'transparent';
4285
4459
 
4286
4460
  /**
4287
- * The model short description (example: "This model generates highly detailed
4288
- * cinematic scenes.")
4461
+ * Whether the input is a color or not. Only available for \`string\` input type.
4289
4462
  */
4290
- shortDescription?: string;
4463
+ color?: boolean;
4291
4464
 
4292
4465
  /**
4293
- * The date when the model will be soft deleted (only for Free plan)
4466
+ * Whether this input affects the model's cost calculation
4294
4467
  */
4295
- softDeletionOn?: string;
4468
+ costImpact?: boolean;
4296
4469
 
4297
4470
  /**
4298
- * A thumbnail for your model
4471
+ * The default value for the input
4299
4472
  */
4300
- thumbnail?: Model.Thumbnail;
4473
+ default?: unknown;
4301
4474
 
4302
4475
  /**
4303
- * Array of training image pairs
4476
+ * Help text displayed in the UI to provide additional information about the input
4304
4477
  */
4305
- trainingImagePairs?: Array<Model.TrainingImagePair>;
4478
+ description?: string;
4306
4479
 
4307
4480
  /**
4308
- * The URLs of the first 3 training images of the model. To retrieve the full set
4309
- * of images, get it by modelId
4481
+ * Used to visually group inputs together in the UI. Inputs with the same group
4482
+ * value appear consecutively in the UI.
4310
4483
  */
4311
- trainingImages?: Array<Model.TrainingImage>;
4484
+ group?: string;
4312
4485
 
4313
4486
  /**
4314
- * Additional information about the training progress of the model
4487
+ * Hint text displayed in the UI as a tooltip to guide the user
4315
4488
  */
4316
- trainingProgress?: Model.TrainingProgress;
4489
+ hint?: string;
4317
4490
 
4318
4491
  /**
4319
- * Additional information about the model's training
4492
+ * The list of inputs which form an object within a container array. All inputs are
4493
+ * the same as the current object. This is only available for type inputs_array
4494
+ * inputs.
4320
4495
  */
4321
- trainingStats?: Model.TrainingStats;
4496
+ inputs?: Array<{ [key: string]: unknown }>;
4322
4497
 
4323
4498
  /**
4324
- * The UI configuration for the model
4499
+ * The asset kind of the input. Only taken into account for \`file\` and
4500
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
4501
+ * not able to create the asset on the flight on API side with dataurl without
4502
+ * data:kind, prefix
4325
4503
  */
4326
- uiConfig?: Model.UiConfig;
4504
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4327
4505
 
4328
4506
  /**
4329
- * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
4507
+ * The label displayed in the UI for this input
4330
4508
  */
4331
- userId?: string;
4332
- }
4509
+ label?: string;
4333
4510
 
4334
- export namespace Model {
4335
4511
  /**
4336
- * The class of the model
4512
+ * The name of the file input field to use as the mask source
4337
4513
  */
4338
- export interface Class {
4339
- /**
4340
- * The category slug of the class (example: "art-style")
4341
- */
4342
- category: string;
4343
-
4344
- /**
4345
- * The concept prompt of the class (example: "a sks character design")
4346
- */
4347
- conceptPrompt: string;
4348
-
4349
- /**
4350
- * The model ID of the class (example: "stable-diffusion-v1-5")
4351
- */
4352
- modelId: string;
4353
-
4354
- /**
4355
- * The class name (example: "Character Design")
4356
- */
4357
- name: string;
4358
-
4359
- /**
4360
- * The class prompt (example: "a character design")
4361
- */
4362
- prompt: string;
4363
-
4364
- /**
4365
- * The class slug (example: "art-style-character-design")
4366
- */
4367
- slug: string;
4514
+ maskFrom?: string;
4368
4515
 
4369
- /**
4370
- * The class status (only published classes are listed, but unpublished classes can
4371
- * still appear in existing models)
4372
- */
4373
- status: 'published' | 'unpublished';
4374
-
4375
- /**
4376
- * Some example images URLs to showcase the class
4377
- */
4378
- thumbnails: Array<string>;
4379
- }
4380
-
4381
- export interface Concept {
4382
- /**
4383
- * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
4384
- */
4385
- modelId: string;
4516
+ /**
4517
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
4518
+ * types.
4519
+ */
4520
+ max?: number;
4386
4521
 
4387
- /**
4388
- * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
4389
- * is between 0 and 2.
4390
- */
4391
- scale: number;
4522
+ /**
4523
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
4524
+ * \`string_array\`.
4525
+ */
4526
+ maxLength?: number;
4392
4527
 
4393
- /**
4394
- * The epoch of the model (example: "000001") Only available for Flux Lora Trained
4395
- * models
4396
- */
4397
- modelEpoch?: string;
4398
- }
4528
+ /**
4529
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
4530
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4531
+ * creation time.
4532
+ */
4533
+ maxSize?: number;
4399
4534
 
4400
- export interface Epoch {
4401
- /**
4402
- * The epoch hash to identify the epoch
4403
- */
4404
- epoch: string;
4535
+ /**
4536
+ * The minimum allowed value. Only available for \`number\` and array input types.
4537
+ */
4538
+ min?: number;
4405
4539
 
4406
- /**
4407
- * The assets of the epoch if sample prompts as been supplied during training
4408
- */
4409
- assets?: Array<Epoch.Asset>;
4410
- }
4540
+ /**
4541
+ * The minimum allowed length for string inputs. Also applies to each item in
4542
+ * \`string_array\`.
4543
+ */
4544
+ minLength?: number;
4411
4545
 
4412
- export namespace Epoch {
4413
- export interface Asset {
4414
- /**
4415
- * The AssetId of the image during training (example:
4416
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
4417
- */
4418
- assetId: string;
4546
+ /**
4547
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
4548
+ * available for \`model_array\` input type.
4549
+ */
4550
+ modelTypes?: Array<
4551
+ | 'custom'
4552
+ | 'elevenlabs-voice'
4553
+ | 'flux.1'
4554
+ | 'flux.1-composition'
4555
+ | 'flux.1-kontext-dev'
4556
+ | 'flux.1-kontext-lora'
4557
+ | 'flux.1-krea-dev'
4558
+ | 'flux.1-krea-lora'
4559
+ | 'flux.1-lora'
4560
+ | 'flux.1-pro'
4561
+ | 'flux.1.1-pro-ultra'
4562
+ | 'flux.2-dev-edit-lora'
4563
+ | 'flux.2-dev-lora'
4564
+ | 'flux.2-klein-4b-edit-lora'
4565
+ | 'flux.2-klein-4b-lora'
4566
+ | 'flux.2-klein-9b-edit-lora'
4567
+ | 'flux.2-klein-9b-lora'
4568
+ | 'flux.2-klein-base-4b-edit-lora'
4569
+ | 'flux.2-klein-base-4b-lora'
4570
+ | 'flux.2-klein-base-9b-edit-lora'
4571
+ | 'flux.2-klein-base-9b-lora'
4572
+ | 'flux1.1-pro'
4573
+ | 'gpt-image-1'
4574
+ | 'qwen-image-2512-lora'
4575
+ | 'qwen-image-edit-2509-lora'
4576
+ | 'qwen-image-edit-2511-lora'
4577
+ | 'qwen-image-edit-lora'
4578
+ | 'qwen-image-lora'
4579
+ | 'sd-1_5'
4580
+ | 'sd-1_5-composition'
4581
+ | 'sd-1_5-lora'
4582
+ | 'sd-xl'
4583
+ | 'sd-xl-composition'
4584
+ | 'sd-xl-lora'
4585
+ | 'zimage-de-turbo-lora'
4586
+ | 'zimage-lora'
4587
+ | 'zimage-turbo-lora'
4588
+ >;
4419
4589
 
4420
- /**
4421
- * The url of the asset
4422
- */
4423
- url: string;
4424
- }
4425
- }
4590
+ /**
4591
+ * Whether this input represents a parent asset to assign to the produced assets.
4592
+ * Only available for \`file\` and \`file_array\` input types.
4593
+ *
4594
+ * For \`file_array\`, the parent asset is the first item in the array.
4595
+ */
4596
+ parent?: boolean;
4426
4597
 
4427
4598
  /**
4428
- * Defines the input parameters for a model. Use this to understand the available
4429
- * input parameters for a given `modelId` when calling
4430
- * `POST /generate/custom/{modelId}`. See {@link
4431
- * https://docs.scenario.com/docs/video-generation} for examples.
4599
+ * Placeholder text for the input. Only available for 'string' input type.
4432
4600
  */
4433
- export interface Input {
4434
- /**
4435
- * The name that must be user to call the model through the API
4436
- */
4437
- name: string;
4601
+ placeholder?: string;
4438
4602
 
4439
- /**
4440
- * The data type of the input
4441
- */
4442
- type:
4443
- | 'boolean'
4444
- | 'file'
4445
- | 'file_array'
4446
- | 'inputs_array'
4447
- | 'model'
4448
- | 'model_array'
4449
- | 'number'
4450
- | 'number_array'
4451
- | 'string'
4452
- | 'string_array';
4603
+ /**
4604
+ * Whether the input is a prompt. When true, displays as a text area with prompt
4605
+ * spark feature. Only available for \`string\` input type.
4606
+ */
4607
+ prompt?: boolean;
4453
4608
 
4454
- /**
4455
- * The allowed values for the input. For \`string\` or \`number\` types, creates a
4456
- * single-select dropdown. For \`string_array\` type, creates a multi-select
4457
- * dropdown.
4458
- */
4459
- allowedValues?: Array<unknown>;
4609
+ /**
4610
+ * Whether the input is used with prompt spark. Only available for \`string\` input
4611
+ * type.
4612
+ */
4613
+ promptSpark?: boolean;
4460
4614
 
4461
- /**
4462
- * Specifies the background behavior for the input. Only available for \`file\` and
4463
- * \`file_array\` input types with kind \`image\`.
4464
- */
4465
- backgroundBehavior?: 'opaque' | 'transparent';
4615
+ /**
4616
+ * Set of rules that describes when this input is required:
4617
+ *
4618
+ * - \`always\`: Input is always required
4619
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4620
+ * defined
4621
+ * - \`ifDefined\`: Input is required when another specified input is defined
4622
+ * - \`conditionalValues\`: Input is required when another input has a specific
4623
+ * value
4624
+ *
4625
+ * By default, the input is not required.
4626
+ */
4627
+ required?: Input.Required;
4466
4628
 
4467
- /**
4468
- * Whether the input is a color or not. Only available for \`string\` input type.
4469
- */
4470
- color?: boolean;
4629
+ /**
4630
+ * The step increment for numeric inputs. Only available for \`number\` input type.
4631
+ */
4632
+ step?: number;
4633
+ }
4471
4634
 
4635
+ export namespace Input {
4636
+ /**
4637
+ * Set of rules that describes when this input is required:
4638
+ *
4639
+ * - \`always\`: Input is always required
4640
+ * - \`ifNotDefined\`: Input is required when another specified input is not
4641
+ * defined
4642
+ * - \`ifDefined\`: Input is required when another specified input is defined
4643
+ * - \`conditionalValues\`: Input is required when another input has a specific
4644
+ * value
4645
+ *
4646
+ * By default, the input is not required.
4647
+ */
4648
+ export interface Required {
4472
4649
  /**
4473
- * Whether this input affects the model's cost calculation
4650
+ * Whether the input is always required
4474
4651
  */
4475
- costImpact?: boolean;
4652
+ always?: boolean;
4476
4653
 
4477
4654
  /**
4478
- * The default value for the input
4655
+ * Makes this input required when another input has a specific value:
4656
+ *
4657
+ * - Key: name of the input to check
4658
+ * - Value: operation and allowed values that trigger the requirement
4479
4659
  */
4480
- default?: unknown;
4660
+ conditionalValues?: unknown;
4481
4661
 
4482
4662
  /**
4483
- * Help text displayed in the UI to provide additional information about the input
4663
+ * Makes this input required when another input is defined:
4664
+ *
4665
+ * - Key: name of the input that must be defined
4666
+ * - Value: message to display when this input is required
4484
4667
  */
4485
- description?: string;
4668
+ ifDefined?: unknown;
4486
4669
 
4487
4670
  /**
4488
- * Used to visually group inputs together in the UI. Inputs with the same group
4489
- * value appear consecutively in the UI.
4671
+ * Makes this input required when another input is not defined:
4672
+ *
4673
+ * - Key: name of the input that must be undefined
4674
+ * - Value: message to display when this input is required
4490
4675
  */
4491
- group?: string;
4676
+ ifNotDefined?: unknown;
4677
+ }
4678
+ }
4492
4679
 
4493
- /**
4494
- * Hint text displayed in the UI as a tooltip to guide the user
4495
- */
4496
- hint?: string;
4680
+ /**
4681
+ * The parameters of the model
4682
+ */
4683
+ export interface Parameters {
4684
+ /**
4685
+ * Age group of the voice (for professional cloning)
4686
+ *
4687
+ * Only available for ElevenLabs voice training
4688
+ */
4689
+ age?: string;
4497
4690
 
4498
- /**
4499
- * The list of inputs which form an object within a container array. All inputs are
4500
- * the same as the current object. This is only available for type inputs_array
4501
- * inputs.
4502
- */
4503
- inputs?: Array<{ [key: string]: unknown }>;
4691
+ /**
4692
+ * The batch size Less steps, and will increase the learning rate
4693
+ *
4694
+ * Only available for Flux LoRA training
4695
+ */
4696
+ batchSize?: number;
4504
4697
 
4505
- /**
4506
- * The asset kind of the input. Only taken into account for \`file\` and
4507
- * \`file_array\` input types. If model provides multiple kinds, the input will be
4508
- * not able to create the asset on the flight on API side with dataurl without
4509
- * data:kind, prefix
4510
- */
4511
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
4698
+ /**
4699
+ * The prompt to specify images in the same class as provided instance images
4700
+ *
4701
+ * Only available for SD15 training
4702
+ */
4703
+ classPrompt?: string;
4512
4704
 
4513
- /**
4514
- * The label displayed in the UI for this input
4515
- */
4516
- label?: string;
4705
+ /**
4706
+ * Type of voice cloning: "instant" (fast) or "professional" (higher quality,
4707
+ * requires captcha)
4708
+ *
4709
+ * Only available for ElevenLabs voice training
4710
+ */
4711
+ cloneType?: string;
4517
4712
 
4518
- /**
4519
- * The name of the file input field to use as the mask source
4520
- */
4521
- maskFrom?: string;
4713
+ /**
4714
+ * The prompt with identifier specifying the instance (or subject) of the class
4715
+ * (example: "a daiton dog")
4716
+ *
4717
+ * Default value varies depending on the model type:
4718
+ *
4719
+ * - For SD1.5: "daiton" if no class is associated with the model
4720
+ * - For SDXL: "daiton"
4721
+ * - For Flux: ""
4722
+ */
4723
+ conceptPrompt?: string;
4522
4724
 
4523
- /**
4524
- * The maximum allowed value. Only available for \`number\` and \`array\` input
4525
- * types.
4526
- */
4527
- max?: number;
4725
+ /**
4726
+ * Gender of the voice (for professional cloning)
4727
+ *
4728
+ * Only available for ElevenLabs voice training
4729
+ */
4730
+ gender?: string;
4528
4731
 
4529
- /**
4530
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
4531
- * \`string_array\`.
4532
- */
4533
- maxLength?: number;
4732
+ /**
4733
+ * Language of the audio samples (ISO 639-1 code)
4734
+ *
4735
+ * Only available for ElevenLabs voice training
4736
+ */
4737
+ language?: string;
4534
4738
 
4535
- /**
4536
- * The maximum allowed file size in bytes. Only applies to \`file\` and
4537
- * \`file_array\` input types. Validated against \`asset.properties.size\` at job
4538
- * creation time.
4539
- */
4540
- maxSize?: number;
4739
+ /**
4740
+ * Initial learning rate (after the potential warmup period)
4741
+ *
4742
+ * Default value varies depending on the model type:
4743
+ *
4744
+ * - For SD1.5 and SDXL: 0.000005
4745
+ * - For Flux: 0.0001
4746
+ */
4747
+ learningRate?: number;
4541
4748
 
4542
- /**
4543
- * The minimum allowed value. Only available for \`number\` and array input types.
4544
- */
4545
- min?: number;
4749
+ /**
4750
+ * Initial learning rate (after the potential warmup period) for the text encoder
4751
+ *
4752
+ * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
4753
+ * [SDXL: 0 | Flux LoRA: 0.000001]
4754
+ */
4755
+ learningRateTextEncoder?: number;
4546
4756
 
4547
- /**
4548
- * The minimum allowed length for string inputs. Also applies to each item in
4549
- * \`string_array\`.
4550
- */
4551
- minLength?: number;
4757
+ /**
4758
+ * Initial learning rate (after the potential warmup period) for the UNet
4759
+ *
4760
+ * Only available for SDXL LoRA training
4761
+ */
4762
+ learningRateUnet?: number;
4552
4763
 
4553
- /**
4554
- * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
4555
- * available for \`model_array\` input type.
4556
- */
4557
- modelTypes?: Array<
4558
- | 'custom'
4559
- | 'elevenlabs-voice'
4560
- | 'flux.1'
4561
- | 'flux.1-composition'
4562
- | 'flux.1-kontext-dev'
4563
- | 'flux.1-kontext-lora'
4564
- | 'flux.1-krea-dev'
4565
- | 'flux.1-krea-lora'
4566
- | 'flux.1-lora'
4567
- | 'flux.1-pro'
4568
- | 'flux.1.1-pro-ultra'
4569
- | 'flux.2-dev-edit-lora'
4570
- | 'flux.2-dev-lora'
4571
- | 'flux.2-klein-4b-edit-lora'
4572
- | 'flux.2-klein-4b-lora'
4573
- | 'flux.2-klein-9b-edit-lora'
4574
- | 'flux.2-klein-9b-lora'
4575
- | 'flux.2-klein-base-4b-edit-lora'
4576
- | 'flux.2-klein-base-4b-lora'
4577
- | 'flux.2-klein-base-9b-edit-lora'
4578
- | 'flux.2-klein-base-9b-lora'
4579
- | 'flux1.1-pro'
4580
- | 'gpt-image-1'
4581
- | 'qwen-image-2512-lora'
4582
- | 'qwen-image-edit-2509-lora'
4583
- | 'qwen-image-edit-2511-lora'
4584
- | 'qwen-image-edit-lora'
4585
- | 'qwen-image-lora'
4586
- | 'sd-1_5'
4587
- | 'sd-1_5-composition'
4588
- | 'sd-1_5-lora'
4589
- | 'sd-xl'
4590
- | 'sd-xl-composition'
4591
- | 'sd-xl-lora'
4592
- | 'zimage-de-turbo-lora'
4593
- | 'zimage-lora'
4594
- | 'zimage-turbo-lora'
4595
- >;
4596
-
4597
- /**
4598
- * Whether this input represents a parent asset to assign to the produced assets.
4599
- * Only available for \`file\` and \`file_array\` input types.
4600
- *
4601
- * For \`file_array\`, the parent asset is the first item in the array.
4602
- */
4603
- parent?: boolean;
4604
-
4605
- /**
4606
- * Placeholder text for the input. Only available for 'string' input type.
4607
- */
4608
- placeholder?: string;
4609
-
4610
- /**
4611
- * Whether the input is a prompt. When true, displays as a text area with prompt
4612
- * spark feature. Only available for \`string\` input type.
4613
- */
4614
- prompt?: boolean;
4615
-
4616
- /**
4617
- * Whether the input is used with prompt spark. Only available for \`string\` input
4618
- * type.
4619
- */
4620
- promptSpark?: boolean;
4621
-
4622
- /**
4623
- * Set of rules that describes when this input is required:
4624
- *
4625
- * - \`always\`: Input is always required
4626
- * - \`ifNotDefined\`: Input is required when another specified input is not
4627
- * defined
4628
- * - \`ifDefined\`: Input is required when another specified input is defined
4629
- * - \`conditionalValues\`: Input is required when another input has a specific
4630
- * value
4631
- *
4632
- * By default, the input is not required.
4633
- */
4634
- required?: Input.Required;
4635
-
4636
- /**
4637
- * The step increment for numeric inputs. Only available for \`number\` input type.
4638
- */
4639
- step?: number;
4640
- }
4641
-
4642
- export namespace Input {
4643
- /**
4644
- * Set of rules that describes when this input is required:
4645
- *
4646
- * - \`always\`: Input is always required
4647
- * - \`ifNotDefined\`: Input is required when another specified input is not
4648
- * defined
4649
- * - \`ifDefined\`: Input is required when another specified input is defined
4650
- * - \`conditionalValues\`: Input is required when another input has a specific
4651
- * value
4652
- *
4653
- * By default, the input is not required.
4654
- */
4655
- export interface Required {
4656
- /**
4657
- * Whether the input is always required
4658
- */
4659
- always?: boolean;
4660
-
4661
- /**
4662
- * Makes this input required when another input has a specific value:
4663
- *
4664
- * - Key: name of the input to check
4665
- * - Value: operation and allowed values that trigger the requirement
4666
- */
4667
- conditionalValues?: unknown;
4668
-
4669
- /**
4670
- * Makes this input required when another input is defined:
4671
- *
4672
- * - Key: name of the input that must be defined
4673
- * - Value: message to display when this input is required
4674
- */
4675
- ifDefined?: unknown;
4676
-
4677
- /**
4678
- * Makes this input required when another input is not defined:
4679
- *
4680
- * - Key: name of the input that must be undefined
4681
- * - Value: message to display when this input is required
4682
- */
4683
- ifNotDefined?: unknown;
4684
- }
4685
- }
4764
+ /**
4765
+ * The scheduler type to use (default: "constant")
4766
+ *
4767
+ * Only available for SD15 and SDXL LoRA training
4768
+ */
4769
+ lrScheduler?:
4770
+ | 'constant'
4771
+ | 'constant-with-warmup'
4772
+ | 'cosine'
4773
+ | 'cosine-with-restarts'
4774
+ | 'linear'
4775
+ | 'polynomial';
4686
4776
 
4687
4777
  /**
4688
- * The parameters of the model
4778
+ * Maximum number of training steps to execute (default: varies depending on the
4779
+ * model type)
4780
+ *
4781
+ * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
4782
+ * instead
4783
+ *
4784
+ * Default value varies depending on the model type:
4785
+ *
4786
+ * - For SD1.5: round((number of training images \* 225) / 3)
4787
+ * - For SDXL: number of training images \* 175
4788
+ * - For Flux: number of training images \* 100
4789
+ *
4790
+ * Maximum value varies depending on the model type:
4791
+ *
4792
+ * - For SD1.5 and SDXL: [0, 40000]
4793
+ * - For Flux: [0, 10000]
4689
4794
  */
4690
- export interface Parameters {
4691
- /**
4692
- * Age group of the voice (for professional cloning)
4693
- *
4694
- * Only available for ElevenLabs voice training
4695
- */
4696
- age?: string;
4795
+ maxTrainSteps?: number;
4697
4796
 
4698
- /**
4699
- * The batch size Less steps, and will increase the learning rate
4700
- *
4701
- * Only available for Flux LoRA training
4702
- */
4703
- batchSize?: number;
4797
+ /**
4798
+ * The number of epochs to train for
4799
+ *
4800
+ * Only available for Flux LoRA training
4801
+ */
4802
+ nbEpochs?: number;
4704
4803
 
4705
- /**
4706
- * The prompt to specify images in the same class as provided instance images
4707
- *
4708
- * Only available for SD15 training
4709
- */
4710
- classPrompt?: string;
4804
+ /**
4805
+ * The number of times to repeat the training
4806
+ *
4807
+ * Only available for Flux LoRA training
4808
+ */
4809
+ nbRepeats?: number;
4711
4810
 
4712
- /**
4713
- * Type of voice cloning: "instant" (fast) or "professional" (higher quality,
4714
- * requires captcha)
4715
- *
4716
- * Only available for ElevenLabs voice training
4717
- */
4718
- cloneType?: string;
4811
+ /**
4812
+ * The number of training steps for the text encoder
4813
+ *
4814
+ * Only available for SDXL LoRA training
4815
+ */
4816
+ numTextTrainSteps?: number;
4719
4817
 
4720
- /**
4721
- * The prompt with identifier specifying the instance (or subject) of the class
4722
- * (example: "a daiton dog")
4723
- *
4724
- * Default value varies depending on the model type:
4725
- *
4726
- * - For SD1.5: "daiton" if no class is associated with the model
4727
- * - For SDXL: "daiton"
4728
- * - For Flux: ""
4729
- */
4730
- conceptPrompt?: string;
4818
+ /**
4819
+ * The number of training steps for the UNet
4820
+ *
4821
+ * Only available for SDXL LoRA training
4822
+ */
4823
+ numUNetTrainSteps?: number;
4731
4824
 
4732
- /**
4733
- * Gender of the voice (for professional cloning)
4734
- *
4735
- * Only available for ElevenLabs voice training
4736
- */
4737
- gender?: string;
4825
+ /**
4826
+ * Optimize the model training task for a specific type of input images. The
4827
+ * available values are:
4828
+ *
4829
+ * - "likeness": optimize training for likeness or portrait (targets specific
4830
+ * transformer blocks)
4831
+ * - "all": train all transformer blocks
4832
+ * - "none": train no specific transformer blocks
4833
+ *
4834
+ * This parameter controls which double and single transformer blocks are trained
4835
+ * during the LoRA training process.
4836
+ *
4837
+ * Only available for Flux LoRA training
4838
+ */
4839
+ optimizeFor?: 'likeness';
4738
4840
 
4739
- /**
4740
- * Language of the audio samples (ISO 639-1 code)
4741
- *
4742
- * Only available for ElevenLabs voice training
4743
- */
4744
- language?: string;
4841
+ /**
4842
+ * The weight of prior preservation loss
4843
+ *
4844
+ * Only available for SD15 and SDXL LoRA training
4845
+ */
4846
+ priorLossWeight?: number;
4745
4847
 
4746
- /**
4747
- * Initial learning rate (after the potential warmup period)
4748
- *
4749
- * Default value varies depending on the model type:
4750
- *
4751
- * - For SD1.5 and SDXL: 0.000005
4752
- * - For Flux: 0.0001
4753
- */
4754
- learningRate?: number;
4848
+ /**
4849
+ * Whether to random crop or center crop images before resizing to the working
4850
+ * resolution
4851
+ *
4852
+ * Only available for SD15 and SDXL LoRA training
4853
+ */
4854
+ randomCrop?: boolean;
4755
4855
 
4756
- /**
4757
- * Initial learning rate (after the potential warmup period) for the text encoder
4758
- *
4759
- * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
4760
- * [SDXL: 0 | Flux LoRA: 0.000001]
4761
- */
4762
- learningRateTextEncoder?: number;
4856
+ /**
4857
+ * Ratio of random crops
4858
+ *
4859
+ * Only available for SD15 and SDXL LoRA training
4860
+ */
4861
+ randomCropRatio?: number;
4763
4862
 
4764
- /**
4765
- * Initial learning rate (after the potential warmup period) for the UNet
4766
- *
4767
- * Only available for SDXL LoRA training
4768
- */
4769
- learningRateUnet?: number;
4863
+ /**
4864
+ * Scale of random crops
4865
+ *
4866
+ * Only available for SD15 and SDXL LoRA training
4867
+ */
4868
+ randomCropScale?: number;
4770
4869
 
4771
- /**
4772
- * The scheduler type to use (default: "constant")
4773
- *
4774
- * Only available for SD15 and SDXL LoRA training
4775
- */
4776
- lrScheduler?:
4777
- | 'constant'
4778
- | 'constant-with-warmup'
4779
- | 'cosine'
4780
- | 'cosine-with-restarts'
4781
- | 'linear'
4782
- | 'polynomial';
4870
+ /**
4871
+ * The dimension of the LoRA update matrices
4872
+ *
4873
+ * Only available for SDXL (deprecated), Flux LoRA and Musubi training
4874
+ *
4875
+ * Default value varies depending on the model type:
4876
+ *
4877
+ * - For SDXL (deprecated): 64
4878
+ * - For Flux: 16
4879
+ * - For Musubi: 64
4880
+ *
4881
+ * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
4882
+ * 128])
4883
+ */
4884
+ rank?: number;
4783
4885
 
4784
- /**
4785
- * Maximum number of training steps to execute (default: varies depending on the
4786
- * model type)
4787
- *
4788
- * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
4789
- * instead
4790
- *
4791
- * Default value varies depending on the model type:
4792
- *
4793
- * - For SD1.5: round((number of training images \* 225) / 3)
4794
- * - For SDXL: number of training images \* 175
4795
- * - For Flux: number of training images \* 100
4796
- *
4797
- * Maximum value varies depending on the model type:
4798
- *
4799
- * - For SD1.5 and SDXL: [0, 40000]
4800
- * - For Flux: [0, 10000]
4801
- */
4802
- maxTrainSteps?: number;
4886
+ /**
4887
+ * Whether to remove background noise from audio samples before cloning. When
4888
+ * enabled, each sample must be at least 5 seconds long.
4889
+ *
4890
+ * Only available for ElevenLabs voice training
4891
+ */
4892
+ removeBackgroundNoise?: boolean;
4803
4893
 
4804
- /**
4805
- * The number of epochs to train for
4806
- *
4807
- * Only available for Flux LoRA training
4808
- */
4809
- nbEpochs?: number;
4894
+ /**
4895
+ * The prompts to use for each epoch Only available for Flux LoRA training
4896
+ */
4897
+ samplePrompts?: Array<string>;
4810
4898
 
4811
- /**
4812
- * The number of times to repeat the training
4813
- *
4814
- * Only available for Flux LoRA training
4815
- */
4816
- nbRepeats?: number;
4899
+ /**
4900
+ * The sample prompt images (AssetIds) paired with samplePrompts Only available for
4901
+ * Flux LoRA training Must be the same length as samplePrompts
4902
+ */
4903
+ sampleSourceImages?: Array<string>;
4817
4904
 
4818
- /**
4819
- * The number of training steps for the text encoder
4820
- *
4821
- * Only available for SDXL LoRA training
4822
- */
4823
- numTextTrainSteps?: number;
4905
+ /**
4906
+ * Whether to scale the learning rate
4907
+ *
4908
+ * Note: Legacy parameter, will be ignored
4909
+ *
4910
+ * Only available for SD15 and SDXL LoRA training
4911
+ */
4912
+ scaleLr?: boolean;
4824
4913
 
4825
- /**
4826
- * The number of training steps for the UNet
4827
- *
4828
- * Only available for SDXL LoRA training
4829
- */
4830
- numUNetTrainSteps?: number;
4914
+ /**
4915
+ * Used to reproduce previous results. Default: randomly generated number.
4916
+ *
4917
+ * Only available for SD15 and SDXL LoRA training
4918
+ */
4919
+ seed?: number;
4831
4920
 
4832
- /**
4833
- * Optimize the model training task for a specific type of input images. The
4834
- * available values are:
4835
- *
4836
- * - "likeness": optimize training for likeness or portrait (targets specific
4837
- * transformer blocks)
4838
- * - "all": train all transformer blocks
4839
- * - "none": train no specific transformer blocks
4840
- *
4841
- * This parameter controls which double and single transformer blocks are trained
4842
- * during the LoRA training process.
4843
- *
4844
- * Only available for Flux LoRA training
4845
- */
4846
- optimizeFor?: 'likeness';
4921
+ /**
4922
+ * Whether to train the text encoder or not
4923
+ *
4924
+ * Example: For 100 steps and a value of 0.2, it means that the text encoder will
4925
+ * be trained for 20 steps and then the UNet for 80 steps
4926
+ *
4927
+ * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
4928
+ *
4929
+ * Only available for SD15 and SDXL LoRA training
4930
+ */
4931
+ textEncoderTrainingRatio?: number;
4847
4932
 
4848
- /**
4849
- * The weight of prior preservation loss
4850
- *
4851
- * Only available for SD15 and SDXL LoRA training
4852
- */
4853
- priorLossWeight?: number;
4933
+ /**
4934
+ * Validation frequency. Cannot be greater than maxTrainSteps value
4935
+ *
4936
+ * Only available for SD15 and SDXL LoRA training
4937
+ */
4938
+ validationFrequency?: number;
4854
4939
 
4855
- /**
4856
- * Whether to random crop or center crop images before resizing to the working
4857
- * resolution
4858
- *
4859
- * Only available for SD15 and SDXL LoRA training
4860
- */
4861
- randomCrop?: boolean;
4940
+ /**
4941
+ * Validation prompt
4942
+ *
4943
+ * Only available for SD15 and SDXL LoRA training
4944
+ */
4945
+ validationPrompt?: string;
4862
4946
 
4863
- /**
4864
- * Ratio of random crops
4865
- *
4866
- * Only available for SD15 and SDXL LoRA training
4867
- */
4868
- randomCropRatio?: number;
4947
+ /**
4948
+ * Description of the voice characteristics
4949
+ *
4950
+ * Only available for ElevenLabs voice training
4951
+ */
4952
+ voiceDescription?: string;
4869
4953
 
4870
- /**
4871
- * Scale of random crops
4872
- *
4873
- * Only available for SD15 and SDXL LoRA training
4874
- */
4875
- randomCropScale?: number;
4954
+ /**
4955
+ * The Weights And Bias key to use for logging. The maximum length is 40 characters
4956
+ */
4957
+ wandbKey?: string;
4958
+ }
4876
4959
 
4877
- /**
4878
- * The dimension of the LoRA update matrices
4879
- *
4880
- * Only available for SDXL (deprecated), Flux LoRA and Musubi training
4881
- *
4882
- * Default value varies depending on the model type:
4883
- *
4884
- * - For SDXL (deprecated): 64
4885
- * - For Flux: 16
4886
- * - For Musubi: 64
4887
- *
4888
- * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
4889
- * 128])
4890
- */
4891
- rank?: number;
4960
+ /**
4961
+ * Aggregated performance stats
4962
+ */
4963
+ export interface PerformanceStats {
4964
+ /**
4965
+ * Performance metrics per variant
4966
+ */
4967
+ variants: Array<PerformanceStats.Variant>;
4892
4968
 
4969
+ /**
4970
+ * Default variant key for quick model comparison
4971
+ */
4972
+ default?: string;
4973
+ }
4974
+
4975
+ export namespace PerformanceStats {
4976
+ /**
4977
+ * Performance stats for a model variant
4978
+ */
4979
+ export interface Variant {
4893
4980
  /**
4894
- * Whether to remove background noise from audio samples before cloning. When
4895
- * enabled, each sample must be at least 5 seconds long.
4896
- *
4897
- * Only available for ElevenLabs voice training
4981
+ * The generation capability (example: "txt2img", "img2video", "txt2audio")
4898
4982
  */
4899
- removeBackgroundNoise?: boolean;
4983
+ capability: string;
4900
4984
 
4901
4985
  /**
4902
- * The prompts to use for each epoch Only available for Flux LoRA training
4986
+ * When these stats were last computed (ISO date)
4903
4987
  */
4904
- samplePrompts?: Array<string>;
4988
+ computedAt: string;
4905
4989
 
4906
4990
  /**
4907
- * The sample prompt images (AssetIds) paired with samplePrompts Only available for
4908
- * Flux LoRA training Must be the same length as samplePrompts
4991
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
4909
4992
  */
4910
- sampleSourceImages?: Array<string>;
4993
+ variantKey: string;
4911
4994
 
4912
4995
  /**
4913
- * Whether to scale the learning rate
4914
- *
4915
- * Note: Legacy parameter, will be ignored
4916
- *
4917
- * Only available for SD15 and SDXL LoRA training
4996
+ * External quality score from arena.ai leaderboard
4918
4997
  */
4919
- scaleLr?: boolean;
4998
+ arenaScore?: Variant.ArenaScore;
4920
4999
 
4921
5000
  /**
4922
- * Used to reproduce previous results. Default: randomly generated number.
4923
- *
4924
- * Only available for SD15 and SDXL LoRA training
5001
+ * Maximum cost per output asset (CU)
4925
5002
  */
4926
- seed?: number;
5003
+ costPerAssetMaxCU?: number;
4927
5004
 
4928
5005
  /**
4929
- * Whether to train the text encoder or not
4930
- *
4931
- * Example: For 100 steps and a value of 0.2, it means that the text encoder will
4932
- * be trained for 20 steps and then the UNet for 80 steps
4933
- *
4934
- * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
4935
- *
4936
- * Only available for SD15 and SDXL LoRA training
5006
+ * Minimum cost per output asset (CU)
4937
5007
  */
4938
- textEncoderTrainingRatio?: number;
5008
+ costPerAssetMinCU?: number;
4939
5009
 
4940
5010
  /**
4941
- * Validation frequency. Cannot be greater than maxTrainSteps value
4942
- *
4943
- * Only available for SD15 and SDXL LoRA training
5011
+ * Median cost per output asset (CU)
4944
5012
  */
4945
- validationFrequency?: number;
5013
+ costPerAssetP50CU?: number;
4946
5014
 
4947
5015
  /**
4948
- * Validation prompt
4949
- *
4950
- * Only available for SD15 and SDXL LoRA training
5016
+ * Inference latency P50 per output asset (seconds)
4951
5017
  */
4952
- validationPrompt?: string;
5018
+ inferenceLatencyP50Sec?: number;
4953
5019
 
4954
5020
  /**
4955
- * Description of the voice characteristics
4956
- *
4957
- * Only available for ElevenLabs voice training
5021
+ * Inference latency P75 per output asset (seconds)
4958
5022
  */
4959
- voiceDescription?: string;
5023
+ inferenceLatencyP75Sec?: number;
4960
5024
 
4961
5025
  /**
4962
- * The Weights And Bias key to use for logging. The maximum length is 40 characters
5026
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
4963
5027
  */
4964
- wandbKey?: string;
4965
- }
5028
+ resolution?: string;
4966
5029
 
4967
- /**
4968
- * Aggregated performance stats
4969
- */
4970
- export interface PerformanceStats {
4971
5030
  /**
4972
- * Performance metrics per variant
5031
+ * Total latency P50 per output asset, including queue time (seconds)
4973
5032
  */
4974
- variants: Array<PerformanceStats.Variant>;
5033
+ totalLatencyP50Sec?: number;
4975
5034
 
4976
5035
  /**
4977
- * Default variant key for quick model comparison
5036
+ * Total latency P75 per output asset, including queue time (seconds)
4978
5037
  */
4979
- default?: string;
5038
+ totalLatencyP75Sec?: number;
4980
5039
  }
4981
5040
 
4982
- export namespace PerformanceStats {
5041
+ export namespace Variant {
4983
5042
  /**
4984
- * Performance stats for a model variant
5043
+ * External quality score from arena.ai leaderboard
4985
5044
  */
4986
- export interface Variant {
4987
- /**
4988
- * The generation capability (example: "txt2img", "img2video", "txt2audio")
4989
- */
4990
- capability: string;
4991
-
4992
- /**
4993
- * When these stats were last computed (ISO date)
4994
- */
4995
- computedAt: string;
4996
-
5045
+ export interface ArenaScore {
4997
5046
  /**
4998
- * Maximum cost per output asset (CU)
5047
+ * Arena category (example: "text_to_image", "image_to_video")
4999
5048
  */
5000
- costPerAssetMaxCU: number;
5049
+ arenaCategory: string;
5001
5050
 
5002
5051
  /**
5003
- * Minimum cost per output asset (CU)
5052
+ * Model name on arena.ai
5004
5053
  */
5005
- costPerAssetMinCU: number;
5054
+ arenaModelName: string;
5006
5055
 
5007
5056
  /**
5008
- * Median cost per output asset (CU)
5057
+ * When this score was last fetched (ISO date)
5009
5058
  */
5010
- costPerAssetP50CU: number;
5059
+ fetchedAt: string;
5011
5060
 
5012
5061
  /**
5013
- * Inference latency P50 per output asset (seconds)
5062
+ * Rank in the arena category
5014
5063
  */
5015
- inferenceLatencyP50Sec: number;
5064
+ rank: number;
5016
5065
 
5017
5066
  /**
5018
- * Inference latency P75 per output asset (seconds)
5067
+ * ELO rating
5019
5068
  */
5020
- inferenceLatencyP75Sec: number;
5069
+ rating: number;
5021
5070
 
5022
5071
  /**
5023
- * Total latency P50 per output asset, including queue time (seconds)
5072
+ * ELO rating confidence interval lower bound
5024
5073
  */
5025
- totalLatencyP50Sec: number;
5074
+ ratingLower: number;
5026
5075
 
5027
5076
  /**
5028
- * Total latency P75 per output asset, including queue time (seconds)
5077
+ * ELO rating confidence interval upper bound
5029
5078
  */
5030
- totalLatencyP75Sec: number;
5079
+ ratingUpper: number;
5031
5080
 
5032
5081
  /**
5033
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
5082
+ * Number of human votes
5034
5083
  */
5035
- variantKey: string;
5084
+ votes: number;
5085
+ }
5086
+ }
5087
+ }
5036
5088
 
5037
- /**
5038
- * External quality score from arena.ai leaderboard
5039
- */
5040
- arenaScore?: Variant.ArenaScore;
5089
+ /**
5090
+ * A thumbnail for your model
5091
+ */
5092
+ export interface Thumbnail {
5093
+ /**
5094
+ * The AssetId of the image used as a thumbnail for your model (example:
5095
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
5096
+ */
5097
+ assetId: string;
5041
5098
 
5042
- /**
5043
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
5044
- */
5045
- resolution?: string;
5046
- }
5099
+ /**
5100
+ * The url of the image used as a thumbnail for your model
5101
+ */
5102
+ url: string;
5103
+ }
5047
5104
 
5048
- export namespace Variant {
5049
- /**
5050
- * External quality score from arena.ai leaderboard
5051
- */
5052
- export interface ArenaScore {
5053
- /**
5054
- * Arena category (example: "text_to_image", "image_to_video")
5055
- */
5056
- arenaCategory: string;
5105
+ export interface TrainingImagePair {
5106
+ /**
5107
+ * The instruction for the image pair, source to target
5108
+ */
5109
+ instruction?: string;
5057
5110
 
5058
- /**
5059
- * Model name on arena.ai
5060
- */
5061
- arenaModelName: string;
5111
+ /**
5112
+ * The source asset ID (must be a training asset)
5113
+ */
5114
+ sourceId?: string;
5062
5115
 
5063
- /**
5064
- * When this score was last fetched (ISO date)
5065
- */
5066
- fetchedAt: string;
5116
+ /**
5117
+ * The target asset ID (must be a training asset)
5118
+ */
5119
+ targetId?: string;
5120
+ }
5067
5121
 
5068
- /**
5069
- * Rank in the arena category
5070
- */
5071
- rank: number;
5122
+ export interface TrainingImage {
5123
+ /**
5124
+ * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
5125
+ */
5126
+ id: string;
5072
5127
 
5073
- /**
5074
- * ELO rating
5075
- */
5076
- rating: number;
5128
+ /**
5129
+ * Automatic captioning of the image
5130
+ */
5131
+ automaticCaptioning: string;
5077
5132
 
5078
- /**
5079
- * ELO rating confidence interval lower bound
5080
- */
5081
- ratingLower: number;
5133
+ /**
5134
+ * The training image upload date as an ISO string (example:
5135
+ * "2023-02-03T11:19:41.579Z")
5136
+ */
5137
+ createdAt: string;
5082
5138
 
5083
- /**
5084
- * ELO rating confidence interval upper bound
5085
- */
5086
- ratingUpper: number;
5139
+ /**
5140
+ * Description for the image
5141
+ */
5142
+ description: string;
5087
5143
 
5088
- /**
5089
- * Number of human votes
5090
- */
5091
- votes: number;
5092
- }
5093
- }
5094
- }
5144
+ /**
5145
+ * The URL of the image
5146
+ */
5147
+ downloadUrl: string;
5095
5148
 
5096
5149
  /**
5097
- * A thumbnail for your model
5150
+ * The original file name of the image (example: "my-training-image.jpg")
5098
5151
  */
5099
- export interface Thumbnail {
5100
- /**
5101
- * The AssetId of the image used as a thumbnail for your model (example:
5102
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
5103
- */
5104
- assetId: string;
5152
+ name: string;
5153
+ }
5105
5154
 
5106
- /**
5107
- * The url of the image used as a thumbnail for your model
5108
- */
5109
- url: string;
5110
- }
5155
+ /**
5156
+ * Additional information about the training progress of the model
5157
+ */
5158
+ export interface TrainingProgress {
5159
+ /**
5160
+ * The stage of the request
5161
+ */
5162
+ stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'running-train' | 'starting-train';
5111
5163
 
5112
- export interface TrainingImagePair {
5113
- /**
5114
- * The instruction for the image pair, source to target
5115
- */
5116
- instruction?: string;
5164
+ /**
5165
+ * Timestamp in milliseconds of the last time the training progress was updated
5166
+ */
5167
+ updatedAt: number;
5117
5168
 
5118
- /**
5119
- * The source asset ID (must be a training asset)
5120
- */
5121
- sourceId?: string;
5169
+ /**
5170
+ * Position of the job in the queue (ie. the number of job in the queue before this
5171
+ * one)
5172
+ */
5173
+ position?: number;
5122
5174
 
5123
- /**
5124
- * The target asset ID (must be a training asset)
5125
- */
5126
- targetId?: string;
5127
- }
5175
+ /**
5176
+ * The progress of the job
5177
+ */
5178
+ progress?: number;
5128
5179
 
5129
- export interface TrainingImage {
5130
- /**
5131
- * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
5132
- */
5133
- id: string;
5180
+ /**
5181
+ * The remaining time in milliseconds
5182
+ */
5183
+ remainingTimeMs?: number;
5134
5184
 
5135
- /**
5136
- * Automatic captioning of the image
5137
- */
5138
- automaticCaptioning: string;
5185
+ /**
5186
+ * The timestamp in millisecond marking the start of the process
5187
+ */
5188
+ startedAt?: number;
5189
+ }
5139
5190
 
5140
- /**
5141
- * The training image upload date as an ISO string (example:
5142
- * "2023-02-03T11:19:41.579Z")
5143
- */
5144
- createdAt: string;
5191
+ /**
5192
+ * Additional information about the model's training
5193
+ */
5194
+ export interface TrainingStats {
5195
+ /**
5196
+ * The training end time as an ISO date string
5197
+ */
5198
+ endedAt?: string;
5145
5199
 
5146
- /**
5147
- * Description for the image
5148
- */
5149
- description: string;
5200
+ /**
5201
+ * The training queued duration in seconds
5202
+ */
5203
+ queueDuration?: number;
5150
5204
 
5151
- /**
5152
- * The URL of the image
5153
- */
5154
- downloadUrl: string;
5205
+ /**
5206
+ * The training start time as an ISO date string
5207
+ */
5208
+ startedAt?: string;
5155
5209
 
5156
- /**
5157
- * The original file name of the image (example: "my-training-image.jpg")
5158
- */
5159
- name: string;
5160
- }
5210
+ /**
5211
+ * The training duration in seconds
5212
+ */
5213
+ trainDuration?: number;
5214
+ }
5161
5215
 
5216
+ /**
5217
+ * The UI configuration for the model
5218
+ */
5219
+ export interface UiConfig {
5162
5220
  /**
5163
- * Additional information about the training progress of the model
5221
+ * Configuration for the input properties
5164
5222
  */
5165
- export interface TrainingProgress {
5166
- /**
5167
- * The stage of the request
5168
- */
5169
- stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'running-train' | 'starting-train';
5223
+ inputProperties?: { [key: string]: UiConfig.InputProperties };
5170
5224
 
5171
- /**
5172
- * Timestamp in milliseconds of the last time the training progress was updated
5173
- */
5174
- updatedAt: number;
5225
+ /**
5226
+ * Configuration for the loras component
5227
+ */
5228
+ lorasComponent?: UiConfig.LorasComponent;
5175
5229
 
5176
- /**
5177
- * Position of the job in the queue (ie. the number of job in the queue before this
5178
- * one)
5179
- */
5180
- position?: number;
5230
+ /**
5231
+ * Configuration for the presets
5232
+ */
5233
+ presets?: Array<UiConfig.Preset>;
5181
5234
 
5182
- /**
5183
- * The progress of the job
5184
- */
5185
- progress?: number;
5235
+ /**
5236
+ * Configuration for the resolution component
5237
+ */
5238
+ resolutionComponent?: UiConfig.ResolutionComponent;
5186
5239
 
5187
- /**
5188
- * The remaining time in milliseconds
5189
- */
5190
- remainingTimeMs?: number;
5240
+ /**
5241
+ * Configuration for the selects
5242
+ */
5243
+ selects?: { [key: string]: unknown };
5191
5244
 
5192
- /**
5193
- * The timestamp in millisecond marking the start of the process
5194
- */
5195
- startedAt?: number;
5245
+ /**
5246
+ * Configuration for the trigger generate button
5247
+ */
5248
+ triggerGenerate?: UiConfig.TriggerGenerate;
5249
+ }
5250
+
5251
+ export namespace UiConfig {
5252
+ export interface InputProperties {
5253
+ collapsed?: boolean;
5196
5254
  }
5197
5255
 
5198
5256
  /**
5199
- * Additional information about the model's training
5257
+ * Configuration for the loras component
5200
5258
  */
5201
- export interface TrainingStats {
5259
+ export interface LorasComponent {
5202
5260
  /**
5203
- * The training end time as an ISO date string
5261
+ * The label of the component
5204
5262
  */
5205
- endedAt?: string;
5263
+ label: string;
5206
5264
 
5207
5265
  /**
5208
- * The training queued duration in seconds
5266
+ * The input name of the model (model_array)
5209
5267
  */
5210
- queueDuration?: number;
5268
+ modelInput: string;
5211
5269
 
5212
5270
  /**
5213
- * The training start time as an ISO date string
5271
+ * The input name of the scale (number_array)
5214
5272
  */
5215
- startedAt?: string;
5273
+ scaleInput: string;
5216
5274
 
5217
5275
  /**
5218
- * The training duration in seconds
5276
+ * The input model id (example: a composition or a single LoRA modelId) If
5277
+ * specified, the model id will be attached to the output asset as a metadata If
5278
+ * the model-decomposer parser is specified on it, modelInput and scaleInput will
5279
+ * be automatically populated
5219
5280
  */
5220
- trainDuration?: number;
5281
+ modelIdInput?: string;
5221
5282
  }
5222
5283
 
5223
- /**
5224
- * The UI configuration for the model
5225
- */
5226
- export interface UiConfig {
5227
- /**
5228
- * Configuration for the input properties
5229
- */
5230
- inputProperties?: { [key: string]: UiConfig.InputProperties };
5284
+ export interface Preset {
5285
+ fields: Array<string>;
5231
5286
 
5232
- /**
5233
- * Configuration for the loras component
5234
- */
5235
- lorasComponent?: UiConfig.LorasComponent;
5287
+ presets: unknown;
5288
+ }
5236
5289
 
5290
+ /**
5291
+ * Configuration for the resolution component
5292
+ */
5293
+ export interface ResolutionComponent {
5237
5294
  /**
5238
- * Configuration for the presets
5295
+ * The input name of the height
5239
5296
  */
5240
- presets?: Array<UiConfig.Preset>;
5297
+ heightInput: string;
5241
5298
 
5242
5299
  /**
5243
- * Configuration for the resolution component
5300
+ * The label of the component
5244
5301
  */
5245
- resolutionComponent?: UiConfig.ResolutionComponent;
5302
+ label: string;
5246
5303
 
5247
5304
  /**
5248
- * Configuration for the selects
5305
+ * The resolution presets
5249
5306
  */
5250
- selects?: { [key: string]: unknown };
5307
+ presets: Array<ResolutionComponent.Preset>;
5251
5308
 
5252
5309
  /**
5253
- * Configuration for the trigger generate button
5310
+ * The input name of the width
5254
5311
  */
5255
- triggerGenerate?: UiConfig.TriggerGenerate;
5312
+ widthInput: string;
5256
5313
  }
5257
5314
 
5258
- export namespace UiConfig {
5259
- export interface InputProperties {
5260
- collapsed?: boolean;
5261
- }
5315
+ export namespace ResolutionComponent {
5316
+ export interface Preset {
5317
+ height: number;
5262
5318
 
5263
- /**
5264
- * Configuration for the loras component
5265
- */
5266
- export interface LorasComponent {
5267
- /**
5268
- * The label of the component
5269
- */
5270
5319
  label: string;
5271
5320
 
5272
- /**
5273
- * The input name of the model (model_array)
5274
- */
5275
- modelInput: string;
5276
-
5277
- /**
5278
- * The input name of the scale (number_array)
5279
- */
5280
- scaleInput: string;
5281
-
5282
- /**
5283
- * The input model id (example: a composition or a single LoRA modelId) If
5284
- * specified, the model id will be attached to the output asset as a metadata If
5285
- * the model-decomposer parser is specified on it, modelInput and scaleInput will
5286
- * be automatically populated
5287
- */
5288
- modelIdInput?: string;
5321
+ width: number;
5289
5322
  }
5323
+ }
5290
5324
 
5291
- export interface Preset {
5292
- fields: Array<string>;
5293
-
5294
- presets: unknown;
5295
- }
5325
+ /**
5326
+ * Configuration for the trigger generate button
5327
+ */
5328
+ export interface TriggerGenerate {
5329
+ label: string;
5296
5330
 
5297
5331
  /**
5298
- * Configuration for the resolution component
5332
+ * The 'name' of the input where the trigger generate button will be displayed
5333
+ * (after the input). Do not specify both position and after.
5299
5334
  */
5300
- export interface ResolutionComponent {
5301
- /**
5302
- * The input name of the height
5303
- */
5304
- heightInput: string;
5305
-
5306
- /**
5307
- * The label of the component
5308
- */
5309
- label: string;
5310
-
5311
- /**
5312
- * The resolution presets
5313
- */
5314
- presets: Array<ResolutionComponent.Preset>;
5315
-
5316
- /**
5317
- * The input name of the width
5318
- */
5319
- widthInput: string;
5320
- }
5321
-
5322
- export namespace ResolutionComponent {
5323
- export interface Preset {
5324
- height: number;
5325
-
5326
- label: string;
5327
-
5328
- width: number;
5329
- }
5330
- }
5335
+ after?: string;
5331
5336
 
5332
5337
  /**
5333
- * Configuration for the trigger generate button
5338
+ * The position of the trigger generate button. If position specified, the button
5339
+ * will be displayed at the specified position. Do not specify both position and
5340
+ * after.
5334
5341
  */
5335
- export interface TriggerGenerate {
5336
- label: string;
5337
-
5338
- /**
5339
- * The 'name' of the input where the trigger generate button will be displayed
5340
- * (after the input). Do not specify both position and after.
5341
- */
5342
- after?: string;
5343
-
5344
- /**
5345
- * The position of the trigger generate button. If position specified, the button
5346
- * will be displayed at the specified position. Do not specify both position and
5347
- * after.
5348
- */
5349
- position?: 'bottom' | 'top';
5350
- }
5342
+ position?: 'bottom' | 'top';
5351
5343
  }
5352
5344
  }
5353
5345
  }
@@ -6293,54 +6285,54 @@ export namespace ModelCopyResponse {
6293
6285
  computedAt: string;
6294
6286
 
6295
6287
  /**
6296
- * Maximum cost per output asset (CU)
6288
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
6297
6289
  */
6298
- costPerAssetMaxCU: number;
6290
+ variantKey: string;
6299
6291
 
6300
6292
  /**
6301
- * Minimum cost per output asset (CU)
6293
+ * External quality score from arena.ai leaderboard
6302
6294
  */
6303
- costPerAssetMinCU: number;
6295
+ arenaScore?: Variant.ArenaScore;
6304
6296
 
6305
6297
  /**
6306
- * Median cost per output asset (CU)
6298
+ * Maximum cost per output asset (CU)
6307
6299
  */
6308
- costPerAssetP50CU: number;
6300
+ costPerAssetMaxCU?: number;
6309
6301
 
6310
6302
  /**
6311
- * Inference latency P50 per output asset (seconds)
6303
+ * Minimum cost per output asset (CU)
6312
6304
  */
6313
- inferenceLatencyP50Sec: number;
6305
+ costPerAssetMinCU?: number;
6314
6306
 
6315
6307
  /**
6316
- * Inference latency P75 per output asset (seconds)
6308
+ * Median cost per output asset (CU)
6317
6309
  */
6318
- inferenceLatencyP75Sec: number;
6310
+ costPerAssetP50CU?: number;
6319
6311
 
6320
6312
  /**
6321
- * Total latency P50 per output asset, including queue time (seconds)
6313
+ * Inference latency P50 per output asset (seconds)
6322
6314
  */
6323
- totalLatencyP50Sec: number;
6315
+ inferenceLatencyP50Sec?: number;
6324
6316
 
6325
6317
  /**
6326
- * Total latency P75 per output asset, including queue time (seconds)
6318
+ * Inference latency P75 per output asset (seconds)
6327
6319
  */
6328
- totalLatencyP75Sec: number;
6320
+ inferenceLatencyP75Sec?: number;
6329
6321
 
6330
6322
  /**
6331
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
6323
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
6332
6324
  */
6333
- variantKey: string;
6325
+ resolution?: string;
6334
6326
 
6335
6327
  /**
6336
- * External quality score from arena.ai leaderboard
6328
+ * Total latency P50 per output asset, including queue time (seconds)
6337
6329
  */
6338
- arenaScore?: Variant.ArenaScore;
6330
+ totalLatencyP50Sec?: number;
6339
6331
 
6340
6332
  /**
6341
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
6333
+ * Total latency P75 per output asset, including queue time (seconds)
6342
6334
  */
6343
- resolution?: string;
6335
+ totalLatencyP75Sec?: number;
6344
6336
  }
6345
6337
 
6346
6338
  export namespace Variant {
@@ -7598,54 +7590,54 @@ export namespace ModelGetBulkResponse {
7598
7590
  computedAt: string;
7599
7591
 
7600
7592
  /**
7601
- * Maximum cost per output asset (CU)
7593
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
7602
7594
  */
7603
- costPerAssetMaxCU: number;
7595
+ variantKey: string;
7604
7596
 
7605
7597
  /**
7606
- * Minimum cost per output asset (CU)
7598
+ * External quality score from arena.ai leaderboard
7607
7599
  */
7608
- costPerAssetMinCU: number;
7600
+ arenaScore?: Variant.ArenaScore;
7609
7601
 
7610
7602
  /**
7611
- * Median cost per output asset (CU)
7603
+ * Maximum cost per output asset (CU)
7612
7604
  */
7613
- costPerAssetP50CU: number;
7605
+ costPerAssetMaxCU?: number;
7614
7606
 
7615
7607
  /**
7616
- * Inference latency P50 per output asset (seconds)
7608
+ * Minimum cost per output asset (CU)
7617
7609
  */
7618
- inferenceLatencyP50Sec: number;
7610
+ costPerAssetMinCU?: number;
7619
7611
 
7620
7612
  /**
7621
- * Inference latency P75 per output asset (seconds)
7613
+ * Median cost per output asset (CU)
7622
7614
  */
7623
- inferenceLatencyP75Sec: number;
7615
+ costPerAssetP50CU?: number;
7624
7616
 
7625
7617
  /**
7626
- * Total latency P50 per output asset, including queue time (seconds)
7618
+ * Inference latency P50 per output asset (seconds)
7627
7619
  */
7628
- totalLatencyP50Sec: number;
7620
+ inferenceLatencyP50Sec?: number;
7629
7621
 
7630
7622
  /**
7631
- * Total latency P75 per output asset, including queue time (seconds)
7623
+ * Inference latency P75 per output asset (seconds)
7632
7624
  */
7633
- totalLatencyP75Sec: number;
7625
+ inferenceLatencyP75Sec?: number;
7634
7626
 
7635
7627
  /**
7636
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
7628
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
7637
7629
  */
7638
- variantKey: string;
7630
+ resolution?: string;
7639
7631
 
7640
7632
  /**
7641
- * External quality score from arena.ai leaderboard
7633
+ * Total latency P50 per output asset, including queue time (seconds)
7642
7634
  */
7643
- arenaScore?: Variant.ArenaScore;
7635
+ totalLatencyP50Sec?: number;
7644
7636
 
7645
7637
  /**
7646
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
7638
+ * Total latency P75 per output asset, including queue time (seconds)
7647
7639
  */
7648
- resolution?: string;
7640
+ totalLatencyP75Sec?: number;
7649
7641
  }
7650
7642
 
7651
7643
  export namespace Variant {
@@ -8894,54 +8886,54 @@ export namespace ModelTransferResponse {
8894
8886
  computedAt: string;
8895
8887
 
8896
8888
  /**
8897
- * Maximum cost per output asset (CU)
8889
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
8898
8890
  */
8899
- costPerAssetMaxCU: number;
8891
+ variantKey: string;
8900
8892
 
8901
8893
  /**
8902
- * Minimum cost per output asset (CU)
8894
+ * External quality score from arena.ai leaderboard
8903
8895
  */
8904
- costPerAssetMinCU: number;
8896
+ arenaScore?: Variant.ArenaScore;
8905
8897
 
8906
8898
  /**
8907
- * Median cost per output asset (CU)
8899
+ * Maximum cost per output asset (CU)
8908
8900
  */
8909
- costPerAssetP50CU: number;
8901
+ costPerAssetMaxCU?: number;
8910
8902
 
8911
8903
  /**
8912
- * Inference latency P50 per output asset (seconds)
8904
+ * Minimum cost per output asset (CU)
8913
8905
  */
8914
- inferenceLatencyP50Sec: number;
8906
+ costPerAssetMinCU?: number;
8915
8907
 
8916
8908
  /**
8917
- * Inference latency P75 per output asset (seconds)
8909
+ * Median cost per output asset (CU)
8918
8910
  */
8919
- inferenceLatencyP75Sec: number;
8911
+ costPerAssetP50CU?: number;
8920
8912
 
8921
8913
  /**
8922
- * Total latency P50 per output asset, including queue time (seconds)
8914
+ * Inference latency P50 per output asset (seconds)
8923
8915
  */
8924
- totalLatencyP50Sec: number;
8916
+ inferenceLatencyP50Sec?: number;
8925
8917
 
8926
8918
  /**
8927
- * Total latency P75 per output asset, including queue time (seconds)
8919
+ * Inference latency P75 per output asset (seconds)
8928
8920
  */
8929
- totalLatencyP75Sec: number;
8921
+ inferenceLatencyP75Sec?: number;
8930
8922
 
8931
8923
  /**
8932
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
8924
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
8933
8925
  */
8934
- variantKey: string;
8926
+ resolution?: string;
8935
8927
 
8936
8928
  /**
8937
- * External quality score from arena.ai leaderboard
8929
+ * Total latency P50 per output asset, including queue time (seconds)
8938
8930
  */
8939
- arenaScore?: Variant.ArenaScore;
8931
+ totalLatencyP50Sec?: number;
8940
8932
 
8941
8933
  /**
8942
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
8934
+ * Total latency P75 per output asset, including queue time (seconds)
8943
8935
  */
8944
- resolution?: string;
8936
+ totalLatencyP75Sec?: number;
8945
8937
  }
8946
8938
 
8947
8939
  export namespace Variant {
@@ -9804,7 +9796,7 @@ export namespace ModelUpdateParams {
9804
9796
  }
9805
9797
  }
9806
9798
 
9807
- export interface ModelListParams {
9799
+ export interface ModelListParams extends ModelsCursorParams {
9808
9800
  /**
9809
9801
  * If set to true, returns the full list of models (including blacklisted models)
9810
9802
  * (only available for team admins)
@@ -9853,11 +9845,6 @@ export interface ModelListParams {
9853
9845
  */
9854
9846
  pageSize?: number;
9855
9847
 
9856
- /**
9857
- * A token you received in a previous request to query the next page of items
9858
- */
9859
- paginationToken?: string;
9860
-
9861
9848
  /**
9862
9849
  * The privacy of the models to return. The default value is `private`, possible
9863
9850
  * values are `private` and `public`
@@ -10106,6 +10093,7 @@ export declare namespace Models {
10106
10093
  type ModelGetBulkResponse as ModelGetBulkResponse,
10107
10094
  type ModelTransferResponse as ModelTransferResponse,
10108
10095
  type ModelUpdateTagsResponse as ModelUpdateTagsResponse,
10096
+ type ModelListResponsesModelsCursor as ModelListResponsesModelsCursor,
10109
10097
  type ModelCreateParams as ModelCreateParams,
10110
10098
  type ModelRetrieveParams as ModelRetrieveParams,
10111
10099
  type ModelUpdateParams as ModelUpdateParams,