@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
@@ -8,6 +8,7 @@ import { Train, TrainActionParams, TrainActionResponse, TrainTriggerParams, Trai
8
8
  import * as TrainingImagesAPI from "./training-images.js";
9
9
  import { TrainingImageAddParams, TrainingImageAddResponse, TrainingImageDeleteParams, TrainingImageDeleteResponse, TrainingImageReplacePairsParams, TrainingImageReplacePairsResponse, TrainingImageReplaceParams, TrainingImageReplaceResponse, TrainingImages } from "./training-images.js";
10
10
  import { APIPromise } from "../../core/api-promise.js";
11
+ import { ModelsCursor, type ModelsCursorParams, PagePromise } from "../../core/pagination.js";
11
12
  import { RequestOptions } from "../../internal/request-options.js";
12
13
  export declare class Models extends APIResource {
13
14
  description: DescriptionAPI.Description;
@@ -33,7 +34,7 @@ export declare class Models extends APIResource {
33
34
  * List all models. Supports both public access (via the `Authorization` header set
34
35
  * to `public-auth-token`) and authenticated user access (including API keys).
35
36
  */
36
- list(query?: ModelListParams | null | undefined, options?: RequestOptions): APIPromise<ModelListResponse>;
37
+ list(query?: ModelListParams | null | undefined, options?: RequestOptions): PagePromise<ModelListResponsesModelsCursor, ModelListResponse>;
37
38
  /**
38
39
  * Delete a model
39
40
  */
@@ -65,6 +66,7 @@ export declare class Models extends APIResource {
65
66
  */
66
67
  updateTags(modelID: string, body: ModelUpdateTagsParams, options?: RequestOptions): APIPromise<ModelUpdateTagsResponse>;
67
68
  }
69
+ export type ModelListResponsesModelsCursor = ModelsCursor<ModelListResponse>;
68
70
  export interface ModelCreateResponse {
69
71
  model: ModelCreateResponse.Model;
70
72
  }
@@ -763,46 +765,46 @@ export declare namespace ModelCreateResponse {
763
765
  * When these stats were last computed (ISO date)
764
766
  */
765
767
  computedAt: string;
768
+ /**
769
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
770
+ */
771
+ variantKey: string;
772
+ /**
773
+ * External quality score from arena.ai leaderboard
774
+ */
775
+ arenaScore?: Variant.ArenaScore;
766
776
  /**
767
777
  * Maximum cost per output asset (CU)
768
778
  */
769
- costPerAssetMaxCU: number;
779
+ costPerAssetMaxCU?: number;
770
780
  /**
771
781
  * Minimum cost per output asset (CU)
772
782
  */
773
- costPerAssetMinCU: number;
783
+ costPerAssetMinCU?: number;
774
784
  /**
775
785
  * Median cost per output asset (CU)
776
786
  */
777
- costPerAssetP50CU: number;
787
+ costPerAssetP50CU?: number;
778
788
  /**
779
789
  * Inference latency P50 per output asset (seconds)
780
790
  */
781
- inferenceLatencyP50Sec: number;
791
+ inferenceLatencyP50Sec?: number;
782
792
  /**
783
793
  * Inference latency P75 per output asset (seconds)
784
794
  */
785
- inferenceLatencyP75Sec: number;
795
+ inferenceLatencyP75Sec?: number;
786
796
  /**
787
- * Total latency P50 per output asset, including queue time (seconds)
788
- */
789
- totalLatencyP50Sec: number;
790
- /**
791
- * Total latency P75 per output asset, including queue time (seconds)
792
- */
793
- totalLatencyP75Sec: number;
794
- /**
795
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
797
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
796
798
  */
797
- variantKey: string;
799
+ resolution?: string;
798
800
  /**
799
- * External quality score from arena.ai leaderboard
801
+ * Total latency P50 per output asset, including queue time (seconds)
800
802
  */
801
- arenaScore?: Variant.ArenaScore;
803
+ totalLatencyP50Sec?: number;
802
804
  /**
803
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
805
+ * Total latency P75 per output asset, including queue time (seconds)
804
806
  */
805
- resolution?: string;
807
+ totalLatencyP75Sec?: number;
806
808
  }
807
809
  namespace Variant {
808
810
  /**
@@ -1761,46 +1763,46 @@ export declare namespace ModelRetrieveResponse {
1761
1763
  * When these stats were last computed (ISO date)
1762
1764
  */
1763
1765
  computedAt: string;
1766
+ /**
1767
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
1768
+ */
1769
+ variantKey: string;
1770
+ /**
1771
+ * External quality score from arena.ai leaderboard
1772
+ */
1773
+ arenaScore?: Variant.ArenaScore;
1764
1774
  /**
1765
1775
  * Maximum cost per output asset (CU)
1766
1776
  */
1767
- costPerAssetMaxCU: number;
1777
+ costPerAssetMaxCU?: number;
1768
1778
  /**
1769
1779
  * Minimum cost per output asset (CU)
1770
1780
  */
1771
- costPerAssetMinCU: number;
1781
+ costPerAssetMinCU?: number;
1772
1782
  /**
1773
1783
  * Median cost per output asset (CU)
1774
1784
  */
1775
- costPerAssetP50CU: number;
1785
+ costPerAssetP50CU?: number;
1776
1786
  /**
1777
1787
  * Inference latency P50 per output asset (seconds)
1778
1788
  */
1779
- inferenceLatencyP50Sec: number;
1789
+ inferenceLatencyP50Sec?: number;
1780
1790
  /**
1781
1791
  * Inference latency P75 per output asset (seconds)
1782
1792
  */
1783
- inferenceLatencyP75Sec: number;
1793
+ inferenceLatencyP75Sec?: number;
1784
1794
  /**
1785
- * Total latency P50 per output asset, including queue time (seconds)
1786
- */
1787
- totalLatencyP50Sec: number;
1788
- /**
1789
- * Total latency P75 per output asset, including queue time (seconds)
1790
- */
1791
- totalLatencyP75Sec: number;
1792
- /**
1793
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
1795
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
1794
1796
  */
1795
- variantKey: string;
1797
+ resolution?: string;
1796
1798
  /**
1797
- * External quality score from arena.ai leaderboard
1799
+ * Total latency P50 per output asset, including queue time (seconds)
1798
1800
  */
1799
- arenaScore?: Variant.ArenaScore;
1801
+ totalLatencyP50Sec?: number;
1800
1802
  /**
1801
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
1803
+ * Total latency P75 per output asset, including queue time (seconds)
1802
1804
  */
1803
- resolution?: string;
1805
+ totalLatencyP75Sec?: number;
1804
1806
  }
1805
1807
  namespace Variant {
1806
1808
  /**
@@ -2759,46 +2761,46 @@ export declare namespace ModelUpdateResponse {
2759
2761
  * When these stats were last computed (ISO date)
2760
2762
  */
2761
2763
  computedAt: string;
2764
+ /**
2765
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
2766
+ */
2767
+ variantKey: string;
2768
+ /**
2769
+ * External quality score from arena.ai leaderboard
2770
+ */
2771
+ arenaScore?: Variant.ArenaScore;
2762
2772
  /**
2763
2773
  * Maximum cost per output asset (CU)
2764
2774
  */
2765
- costPerAssetMaxCU: number;
2775
+ costPerAssetMaxCU?: number;
2766
2776
  /**
2767
2777
  * Minimum cost per output asset (CU)
2768
2778
  */
2769
- costPerAssetMinCU: number;
2779
+ costPerAssetMinCU?: number;
2770
2780
  /**
2771
2781
  * Median cost per output asset (CU)
2772
2782
  */
2773
- costPerAssetP50CU: number;
2783
+ costPerAssetP50CU?: number;
2774
2784
  /**
2775
2785
  * Inference latency P50 per output asset (seconds)
2776
2786
  */
2777
- inferenceLatencyP50Sec: number;
2787
+ inferenceLatencyP50Sec?: number;
2778
2788
  /**
2779
2789
  * Inference latency P75 per output asset (seconds)
2780
2790
  */
2781
- inferenceLatencyP75Sec: number;
2791
+ inferenceLatencyP75Sec?: number;
2782
2792
  /**
2783
- * Total latency P50 per output asset, including queue time (seconds)
2784
- */
2785
- totalLatencyP50Sec: number;
2786
- /**
2787
- * Total latency P75 per output asset, including queue time (seconds)
2788
- */
2789
- totalLatencyP75Sec: number;
2790
- /**
2791
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
2793
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
2792
2794
  */
2793
- variantKey: string;
2795
+ resolution?: string;
2794
2796
  /**
2795
- * External quality score from arena.ai leaderboard
2797
+ * Total latency P50 per output asset, including queue time (seconds)
2796
2798
  */
2797
- arenaScore?: Variant.ArenaScore;
2799
+ totalLatencyP50Sec?: number;
2798
2800
  /**
2799
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
2801
+ * Total latency P75 per output asset, including queue time (seconds)
2800
2802
  */
2801
- resolution?: string;
2803
+ totalLatencyP75Sec?: number;
2802
2804
  }
2803
2805
  namespace Variant {
2804
2806
  /**
@@ -3060,1005 +3062,996 @@ export declare namespace ModelUpdateResponse {
3060
3062
  }
3061
3063
  }
3062
3064
  export interface ModelListResponse {
3063
- models: Array<ModelListResponse.Model>;
3064
3065
  /**
3065
- * A token to query the next page of models
3066
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
3067
+ */
3068
+ id: string;
3069
+ /**
3070
+ * List of model capabilities (example: ["txt2img", "img2img",
3071
+ * "txt2img_ip_adapter", ...])
3072
+ */
3073
+ capabilities: Array<'3d23d' | 'audio2audio' | 'controlnet' | 'controlnet_img2img' | 'controlnet_inpaint' | 'controlnet_inpaint_ip_adapter' | 'controlnet_ip_adapter' | 'controlnet_reference' | 'controlnet_texture' | 'img23d' | 'img2img' | 'img2img_ip_adapter' | 'img2img_texture' | 'img2txt' | 'img2video' | 'inpaint' | 'inpaint_ip_adapter' | 'outpaint' | 'reference' | 'reference_texture' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2img_ip_adapter' | 'txt2img_texture' | 'txt2txt' | 'txt2video' | 'video23d' | 'video2img' | 'video2video'>;
3074
+ /**
3075
+ * A list of CollectionId this model belongs to
3076
+ */
3077
+ collectionIds: Array<string>;
3078
+ /**
3079
+ * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
3080
+ */
3081
+ createdAt: string;
3082
+ /**
3083
+ * Whether the model is a custom model and can be used only with POST
3084
+ * /generate/custom/{modelId} endpoint
3085
+ */
3086
+ custom: boolean;
3087
+ /**
3088
+ * List of all example asset IDs setup by the model owner
3089
+ */
3090
+ exampleAssetIds: Array<string>;
3091
+ /**
3092
+ * The privacy of the model (default: private)
3093
+ */
3094
+ privacy: 'private' | 'public' | 'unlisted';
3095
+ /**
3096
+ * The source of the model
3097
+ */
3098
+ source: 'civitai' | 'huggingface' | 'other' | 'scenario';
3099
+ /**
3100
+ * The model status
3101
+ */
3102
+ status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
3103
+ /**
3104
+ * The associated tags (example: ["sci-fi", "landscape"])
3105
+ */
3106
+ tags: Array<string>;
3107
+ /**
3108
+ * The total number of training images
3109
+ */
3110
+ trainingImagesNumber: number;
3111
+ /**
3112
+ * The model type (example: "flux.1-lora")
3113
+ */
3114
+ type: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora';
3115
+ /**
3116
+ * The model last update date as an ISO string (example:
3117
+ * "2023-02-03T11:19:41.579Z")
3118
+ */
3119
+ updatedAt: string;
3120
+ /**
3121
+ * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
3122
+ * 75: Team plan 100: Enterprise plan
3123
+ */
3124
+ accessRestrictions?: 0 | 100 | 25 | 50 | 75;
3125
+ /**
3126
+ * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
3127
+ */
3128
+ authorId?: string;
3129
+ /**
3130
+ * The class of the model
3131
+ */
3132
+ class?: ModelListResponse.Class;
3133
+ /**
3134
+ * List of base model IDs compliant with the model (example: ["flux.1-dev",
3135
+ * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
3136
+ */
3137
+ compliantModelIds?: Array<string>;
3138
+ /**
3139
+ * The concepts is required for the type model: composition
3140
+ */
3141
+ concepts?: Array<ModelListResponse.Concept>;
3142
+ /**
3143
+ * The epoch of the model. Only available for Flux Lora Trained models. If not set,
3144
+ * uses the final model epoch (latest)
3145
+ */
3146
+ epoch?: string;
3147
+ /**
3148
+ * The epochs of the model. Only available for Flux Lora Trained models.
3149
+ */
3150
+ epochs?: Array<ModelListResponse.Epoch>;
3151
+ /**
3152
+ * The inputs of the model. Only used for custom models. To retrieve this list, get
3153
+ * it by modelId with GET /models/{modelId}
3154
+ */
3155
+ inputs?: Array<ModelListResponse.Input>;
3156
+ /**
3157
+ * The model keyword, this is a legacy parameter, please use conceptPrompt in
3158
+ * parameters
3159
+ */
3160
+ modelKeyword?: string;
3161
+ /**
3162
+ * The model name (example: "Cinematic Realism")
3163
+ */
3164
+ name?: string;
3165
+ /**
3166
+ * Fine-tune the model's inferences with negative prompt embedding
3167
+ */
3168
+ negativePromptEmbedding?: string;
3169
+ /**
3170
+ * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
3171
+ */
3172
+ ownerId?: string;
3173
+ /**
3174
+ * The parameters of the model
3175
+ */
3176
+ parameters?: ModelListResponse.Parameters;
3177
+ /**
3178
+ * The id of the parent model
3179
+ */
3180
+ parentModelId?: string;
3181
+ /**
3182
+ * Aggregated performance stats
3183
+ */
3184
+ performanceStats?: ModelListResponse.PerformanceStats;
3185
+ /**
3186
+ * Fine-tune the model's inferences with prompt embedding
3187
+ */
3188
+ promptEmbedding?: string;
3189
+ /**
3190
+ * The model short description (example: "This model generates highly detailed
3191
+ * cinematic scenes.")
3192
+ */
3193
+ shortDescription?: string;
3194
+ /**
3195
+ * The date when the model will be soft deleted (only for Free plan)
3196
+ */
3197
+ softDeletionOn?: string;
3198
+ /**
3199
+ * A thumbnail for your model
3200
+ */
3201
+ thumbnail?: ModelListResponse.Thumbnail;
3202
+ /**
3203
+ * Array of training image pairs
3204
+ */
3205
+ trainingImagePairs?: Array<ModelListResponse.TrainingImagePair>;
3206
+ /**
3207
+ * The URLs of the first 3 training images of the model. To retrieve the full set
3208
+ * of images, get it by modelId
3209
+ */
3210
+ trainingImages?: Array<ModelListResponse.TrainingImage>;
3211
+ /**
3212
+ * Additional information about the training progress of the model
3213
+ */
3214
+ trainingProgress?: ModelListResponse.TrainingProgress;
3215
+ /**
3216
+ * Additional information about the model's training
3217
+ */
3218
+ trainingStats?: ModelListResponse.TrainingStats;
3219
+ /**
3220
+ * The UI configuration for the model
3221
+ */
3222
+ uiConfig?: ModelListResponse.UiConfig;
3223
+ /**
3224
+ * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
3066
3225
  */
3067
- nextPaginationToken?: string;
3226
+ userId?: string;
3068
3227
  }
3069
3228
  export declare namespace ModelListResponse {
3070
- interface Model {
3229
+ /**
3230
+ * The class of the model
3231
+ */
3232
+ interface Class {
3071
3233
  /**
3072
- * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
3234
+ * The category slug of the class (example: "art-style")
3073
3235
  */
3074
- id: string;
3236
+ category: string;
3075
3237
  /**
3076
- * List of model capabilities (example: ["txt2img", "img2img",
3077
- * "txt2img_ip_adapter", ...])
3238
+ * The concept prompt of the class (example: "a sks character design")
3078
3239
  */
3079
- capabilities: Array<'3d23d' | 'audio2audio' | 'controlnet' | 'controlnet_img2img' | 'controlnet_inpaint' | 'controlnet_inpaint_ip_adapter' | 'controlnet_ip_adapter' | 'controlnet_reference' | 'controlnet_texture' | 'img23d' | 'img2img' | 'img2img_ip_adapter' | 'img2img_texture' | 'img2txt' | 'img2video' | 'inpaint' | 'inpaint_ip_adapter' | 'outpaint' | 'reference' | 'reference_texture' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2img_ip_adapter' | 'txt2img_texture' | 'txt2txt' | 'txt2video' | 'video23d' | 'video2img' | 'video2video'>;
3240
+ conceptPrompt: string;
3080
3241
  /**
3081
- * A list of CollectionId this model belongs to
3242
+ * The model ID of the class (example: "stable-diffusion-v1-5")
3082
3243
  */
3083
- collectionIds: Array<string>;
3244
+ modelId: string;
3084
3245
  /**
3085
- * The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
3246
+ * The class name (example: "Character Design")
3086
3247
  */
3087
- createdAt: string;
3248
+ name: string;
3088
3249
  /**
3089
- * Whether the model is a custom model and can be used only with POST
3090
- * /generate/custom/{modelId} endpoint
3250
+ * The class prompt (example: "a character design")
3091
3251
  */
3092
- custom: boolean;
3252
+ prompt: string;
3093
3253
  /**
3094
- * List of all example asset IDs setup by the model owner
3254
+ * The class slug (example: "art-style-character-design")
3095
3255
  */
3096
- exampleAssetIds: Array<string>;
3256
+ slug: string;
3097
3257
  /**
3098
- * The privacy of the model (default: private)
3258
+ * The class status (only published classes are listed, but unpublished classes can
3259
+ * still appear in existing models)
3099
3260
  */
3100
- privacy: 'private' | 'public' | 'unlisted';
3261
+ status: 'published' | 'unpublished';
3101
3262
  /**
3102
- * The source of the model
3263
+ * Some example images URLs to showcase the class
3103
3264
  */
3104
- source: 'civitai' | 'huggingface' | 'other' | 'scenario';
3265
+ thumbnails: Array<string>;
3266
+ }
3267
+ interface Concept {
3105
3268
  /**
3106
- * The model status
3269
+ * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
3107
3270
  */
3108
- status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
3271
+ modelId: string;
3109
3272
  /**
3110
- * The associated tags (example: ["sci-fi", "landscape"])
3273
+ * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
3274
+ * is between 0 and 2.
3111
3275
  */
3112
- tags: Array<string>;
3276
+ scale: number;
3113
3277
  /**
3114
- * The total number of training images
3278
+ * The epoch of the model (example: "000001") Only available for Flux Lora Trained
3279
+ * models
3115
3280
  */
3116
- trainingImagesNumber: number;
3281
+ modelEpoch?: string;
3282
+ }
3283
+ interface Epoch {
3117
3284
  /**
3118
- * The model type (example: "flux.1-lora")
3285
+ * The epoch hash to identify the epoch
3119
3286
  */
3120
- type: 'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora';
3287
+ epoch: string;
3121
3288
  /**
3122
- * The model last update date as an ISO string (example:
3123
- * "2023-02-03T11:19:41.579Z")
3289
+ * The assets of the epoch if sample prompts as been supplied during training
3124
3290
  */
3125
- updatedAt: string;
3291
+ assets?: Array<Epoch.Asset>;
3292
+ }
3293
+ namespace Epoch {
3294
+ interface Asset {
3295
+ /**
3296
+ * The AssetId of the image during training (example:
3297
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
3298
+ */
3299
+ assetId: string;
3300
+ /**
3301
+ * The url of the asset
3302
+ */
3303
+ url: string;
3304
+ }
3305
+ }
3306
+ /**
3307
+ * Defines the input parameters for a model. Use this to understand the available
3308
+ * input parameters for a given `modelId` when calling
3309
+ * `POST /generate/custom/{modelId}`. See {@link
3310
+ * https://docs.scenario.com/docs/video-generation} for examples.
3311
+ */
3312
+ interface Input {
3126
3313
  /**
3127
- * The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
3128
- * 75: Team plan 100: Enterprise plan
3314
+ * The name that must be user to call the model through the API
3129
3315
  */
3130
- accessRestrictions?: 0 | 100 | 25 | 50 | 75;
3316
+ name: string;
3131
3317
  /**
3132
- * The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
3318
+ * The data type of the input
3133
3319
  */
3134
- authorId?: string;
3320
+ type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
3135
3321
  /**
3136
- * The class of the model
3322
+ * The allowed values for the input. For \`string\` or \`number\` types, creates a
3323
+ * single-select dropdown. For \`string_array\` type, creates a multi-select
3324
+ * dropdown.
3137
3325
  */
3138
- class?: Model.Class;
3326
+ allowedValues?: Array<unknown>;
3139
3327
  /**
3140
- * List of base model IDs compliant with the model (example: ["flux.1-dev",
3141
- * "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
3328
+ * Specifies the background behavior for the input. Only available for \`file\` and
3329
+ * \`file_array\` input types with kind \`image\`.
3142
3330
  */
3143
- compliantModelIds?: Array<string>;
3331
+ backgroundBehavior?: 'opaque' | 'transparent';
3144
3332
  /**
3145
- * The concepts is required for the type model: composition
3333
+ * Whether the input is a color or not. Only available for \`string\` input type.
3146
3334
  */
3147
- concepts?: Array<Model.Concept>;
3335
+ color?: boolean;
3148
3336
  /**
3149
- * The epoch of the model. Only available for Flux Lora Trained models. If not set,
3150
- * uses the final model epoch (latest)
3337
+ * Whether this input affects the model's cost calculation
3151
3338
  */
3152
- epoch?: string;
3339
+ costImpact?: boolean;
3153
3340
  /**
3154
- * The epochs of the model. Only available for Flux Lora Trained models.
3341
+ * The default value for the input
3155
3342
  */
3156
- epochs?: Array<Model.Epoch>;
3343
+ default?: unknown;
3157
3344
  /**
3158
- * The inputs of the model. Only used for custom models. To retrieve this list, get
3159
- * it by modelId with GET /models/{modelId}
3345
+ * Help text displayed in the UI to provide additional information about the input
3160
3346
  */
3161
- inputs?: Array<Model.Input>;
3347
+ description?: string;
3162
3348
  /**
3163
- * The model keyword, this is a legacy parameter, please use conceptPrompt in
3164
- * parameters
3349
+ * Used to visually group inputs together in the UI. Inputs with the same group
3350
+ * value appear consecutively in the UI.
3165
3351
  */
3166
- modelKeyword?: string;
3352
+ group?: string;
3167
3353
  /**
3168
- * The model name (example: "Cinematic Realism")
3354
+ * Hint text displayed in the UI as a tooltip to guide the user
3169
3355
  */
3170
- name?: string;
3356
+ hint?: string;
3171
3357
  /**
3172
- * Fine-tune the model's inferences with negative prompt embedding
3358
+ * The list of inputs which form an object within a container array. All inputs are
3359
+ * the same as the current object. This is only available for type inputs_array
3360
+ * inputs.
3173
3361
  */
3174
- negativePromptEmbedding?: string;
3362
+ inputs?: Array<{
3363
+ [key: string]: unknown;
3364
+ }>;
3175
3365
  /**
3176
- * The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
3366
+ * The asset kind of the input. Only taken into account for \`file\` and
3367
+ * \`file_array\` input types. If model provides multiple kinds, the input will be
3368
+ * not able to create the asset on the flight on API side with dataurl without
3369
+ * data:kind, prefix
3177
3370
  */
3178
- ownerId?: string;
3371
+ kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3179
3372
  /**
3180
- * The parameters of the model
3373
+ * The label displayed in the UI for this input
3181
3374
  */
3182
- parameters?: Model.Parameters;
3375
+ label?: string;
3183
3376
  /**
3184
- * The id of the parent model
3377
+ * The name of the file input field to use as the mask source
3185
3378
  */
3186
- parentModelId?: string;
3379
+ maskFrom?: string;
3187
3380
  /**
3188
- * Aggregated performance stats
3381
+ * The maximum allowed value. Only available for \`number\` and \`array\` input
3382
+ * types.
3189
3383
  */
3190
- performanceStats?: Model.PerformanceStats;
3384
+ max?: number;
3191
3385
  /**
3192
- * Fine-tune the model's inferences with prompt embedding
3386
+ * The maximum allowed length for \`string\` inputs. Also applies to each item in
3387
+ * \`string_array\`.
3193
3388
  */
3194
- promptEmbedding?: string;
3389
+ maxLength?: number;
3195
3390
  /**
3196
- * The model short description (example: "This model generates highly detailed
3197
- * cinematic scenes.")
3391
+ * The maximum allowed file size in bytes. Only applies to \`file\` and
3392
+ * \`file_array\` input types. Validated against \`asset.properties.size\` at job
3393
+ * creation time.
3198
3394
  */
3199
- shortDescription?: string;
3395
+ maxSize?: number;
3200
3396
  /**
3201
- * The date when the model will be soft deleted (only for Free plan)
3397
+ * The minimum allowed value. Only available for \`number\` and array input types.
3202
3398
  */
3203
- softDeletionOn?: string;
3399
+ min?: number;
3204
3400
  /**
3205
- * A thumbnail for your model
3401
+ * The minimum allowed length for string inputs. Also applies to each item in
3402
+ * \`string_array\`.
3206
3403
  */
3207
- thumbnail?: Model.Thumbnail;
3404
+ minLength?: number;
3208
3405
  /**
3209
- * Array of training image pairs
3406
+ * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
3407
+ * available for \`model_array\` input type.
3210
3408
  */
3211
- trainingImagePairs?: Array<Model.TrainingImagePair>;
3409
+ modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
3212
3410
  /**
3213
- * The URLs of the first 3 training images of the model. To retrieve the full set
3214
- * of images, get it by modelId
3411
+ * Whether this input represents a parent asset to assign to the produced assets.
3412
+ * Only available for \`file\` and \`file_array\` input types.
3413
+ *
3414
+ * For \`file_array\`, the parent asset is the first item in the array.
3215
3415
  */
3216
- trainingImages?: Array<Model.TrainingImage>;
3416
+ parent?: boolean;
3217
3417
  /**
3218
- * Additional information about the training progress of the model
3418
+ * Placeholder text for the input. Only available for 'string' input type.
3219
3419
  */
3220
- trainingProgress?: Model.TrainingProgress;
3420
+ placeholder?: string;
3221
3421
  /**
3222
- * Additional information about the model's training
3422
+ * Whether the input is a prompt. When true, displays as a text area with prompt
3423
+ * spark feature. Only available for \`string\` input type.
3223
3424
  */
3224
- trainingStats?: Model.TrainingStats;
3425
+ prompt?: boolean;
3225
3426
  /**
3226
- * The UI configuration for the model
3427
+ * Whether the input is used with prompt spark. Only available for \`string\` input
3428
+ * type.
3227
3429
  */
3228
- uiConfig?: Model.UiConfig;
3430
+ promptSpark?: boolean;
3229
3431
  /**
3230
- * (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
3432
+ * Set of rules that describes when this input is required:
3433
+ *
3434
+ * - \`always\`: Input is always required
3435
+ * - \`ifNotDefined\`: Input is required when another specified input is not
3436
+ * defined
3437
+ * - \`ifDefined\`: Input is required when another specified input is defined
3438
+ * - \`conditionalValues\`: Input is required when another input has a specific
3439
+ * value
3440
+ *
3441
+ * By default, the input is not required.
3231
3442
  */
3232
- userId?: string;
3233
- }
3234
- namespace Model {
3443
+ required?: Input.Required;
3235
3444
  /**
3236
- * The class of the model
3445
+ * The step increment for numeric inputs. Only available for \`number\` input type.
3237
3446
  */
3238
- interface Class {
3239
- /**
3240
- * The category slug of the class (example: "art-style")
3241
- */
3242
- category: string;
3243
- /**
3244
- * The concept prompt of the class (example: "a sks character design")
3245
- */
3246
- conceptPrompt: string;
3247
- /**
3248
- * The model ID of the class (example: "stable-diffusion-v1-5")
3249
- */
3250
- modelId: string;
3251
- /**
3252
- * The class name (example: "Character Design")
3253
- */
3254
- name: string;
3255
- /**
3256
- * The class prompt (example: "a character design")
3257
- */
3258
- prompt: string;
3259
- /**
3260
- * The class slug (example: "art-style-character-design")
3261
- */
3262
- slug: string;
3263
- /**
3264
- * The class status (only published classes are listed, but unpublished classes can
3265
- * still appear in existing models)
3266
- */
3267
- status: 'published' | 'unpublished';
3268
- /**
3269
- * Some example images URLs to showcase the class
3270
- */
3271
- thumbnails: Array<string>;
3272
- }
3273
- interface Concept {
3274
- /**
3275
- * The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
3276
- */
3277
- modelId: string;
3278
- /**
3279
- * The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
3280
- * is between 0 and 2.
3281
- */
3282
- scale: number;
3283
- /**
3284
- * The epoch of the model (example: "000001") Only available for Flux Lora Trained
3285
- * models
3286
- */
3287
- modelEpoch?: string;
3288
- }
3289
- interface Epoch {
3290
- /**
3291
- * The epoch hash to identify the epoch
3292
- */
3293
- epoch: string;
3294
- /**
3295
- * The assets of the epoch if sample prompts as been supplied during training
3296
- */
3297
- assets?: Array<Epoch.Asset>;
3298
- }
3299
- namespace Epoch {
3300
- interface Asset {
3301
- /**
3302
- * The AssetId of the image during training (example:
3303
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
3304
- */
3305
- assetId: string;
3306
- /**
3307
- * The url of the asset
3308
- */
3309
- url: string;
3310
- }
3311
- }
3447
+ step?: number;
3448
+ }
3449
+ namespace Input {
3312
3450
  /**
3313
- * Defines the input parameters for a model. Use this to understand the available
3314
- * input parameters for a given `modelId` when calling
3315
- * `POST /generate/custom/{modelId}`. See {@link
3316
- * https://docs.scenario.com/docs/video-generation} for examples.
3451
+ * Set of rules that describes when this input is required:
3452
+ *
3453
+ * - \`always\`: Input is always required
3454
+ * - \`ifNotDefined\`: Input is required when another specified input is not
3455
+ * defined
3456
+ * - \`ifDefined\`: Input is required when another specified input is defined
3457
+ * - \`conditionalValues\`: Input is required when another input has a specific
3458
+ * value
3459
+ *
3460
+ * By default, the input is not required.
3317
3461
  */
3318
- interface Input {
3319
- /**
3320
- * The name that must be user to call the model through the API
3321
- */
3322
- name: string;
3323
- /**
3324
- * The data type of the input
3325
- */
3326
- type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
3327
- /**
3328
- * The allowed values for the input. For \`string\` or \`number\` types, creates a
3329
- * single-select dropdown. For \`string_array\` type, creates a multi-select
3330
- * dropdown.
3331
- */
3332
- allowedValues?: Array<unknown>;
3333
- /**
3334
- * Specifies the background behavior for the input. Only available for \`file\` and
3335
- * \`file_array\` input types with kind \`image\`.
3336
- */
3337
- backgroundBehavior?: 'opaque' | 'transparent';
3338
- /**
3339
- * Whether the input is a color or not. Only available for \`string\` input type.
3340
- */
3341
- color?: boolean;
3342
- /**
3343
- * Whether this input affects the model's cost calculation
3344
- */
3345
- costImpact?: boolean;
3346
- /**
3347
- * The default value for the input
3348
- */
3349
- default?: unknown;
3350
- /**
3351
- * Help text displayed in the UI to provide additional information about the input
3352
- */
3353
- description?: string;
3354
- /**
3355
- * Used to visually group inputs together in the UI. Inputs with the same group
3356
- * value appear consecutively in the UI.
3357
- */
3358
- group?: string;
3359
- /**
3360
- * Hint text displayed in the UI as a tooltip to guide the user
3361
- */
3362
- hint?: string;
3363
- /**
3364
- * The list of inputs which form an object within a container array. All inputs are
3365
- * the same as the current object. This is only available for type inputs_array
3366
- * inputs.
3367
- */
3368
- inputs?: Array<{
3369
- [key: string]: unknown;
3370
- }>;
3371
- /**
3372
- * The asset kind of the input. Only taken into account for \`file\` and
3373
- * \`file_array\` input types. If model provides multiple kinds, the input will be
3374
- * not able to create the asset on the flight on API side with dataurl without
3375
- * data:kind, prefix
3376
- */
3377
- kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
3378
- /**
3379
- * The label displayed in the UI for this input
3380
- */
3381
- label?: string;
3382
- /**
3383
- * The name of the file input field to use as the mask source
3384
- */
3385
- maskFrom?: string;
3386
- /**
3387
- * The maximum allowed value. Only available for \`number\` and \`array\` input
3388
- * types.
3389
- */
3390
- max?: number;
3391
- /**
3392
- * The maximum allowed length for \`string\` inputs. Also applies to each item in
3393
- * \`string_array\`.
3394
- */
3395
- maxLength?: number;
3396
- /**
3397
- * The maximum allowed file size in bytes. Only applies to \`file\` and
3398
- * \`file_array\` input types. Validated against \`asset.properties.size\` at job
3399
- * creation time.
3400
- */
3401
- maxSize?: number;
3402
- /**
3403
- * The minimum allowed value. Only available for \`number\` and array input types.
3404
- */
3405
- min?: number;
3406
- /**
3407
- * The minimum allowed length for string inputs. Also applies to each item in
3408
- * \`string_array\`.
3409
- */
3410
- minLength?: number;
3462
+ interface Required {
3411
3463
  /**
3412
- * The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
3413
- * available for \`model_array\` input type.
3464
+ * Whether the input is always required
3414
3465
  */
3415
- modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
3466
+ always?: boolean;
3416
3467
  /**
3417
- * Whether this input represents a parent asset to assign to the produced assets.
3418
- * Only available for \`file\` and \`file_array\` input types.
3468
+ * Makes this input required when another input has a specific value:
3419
3469
  *
3420
- * For \`file_array\`, the parent asset is the first item in the array.
3421
- */
3422
- parent?: boolean;
3423
- /**
3424
- * Placeholder text for the input. Only available for 'string' input type.
3425
- */
3426
- placeholder?: string;
3427
- /**
3428
- * Whether the input is a prompt. When true, displays as a text area with prompt
3429
- * spark feature. Only available for \`string\` input type.
3430
- */
3431
- prompt?: boolean;
3432
- /**
3433
- * Whether the input is used with prompt spark. Only available for \`string\` input
3434
- * type.
3470
+ * - Key: name of the input to check
3471
+ * - Value: operation and allowed values that trigger the requirement
3435
3472
  */
3436
- promptSpark?: boolean;
3473
+ conditionalValues?: unknown;
3437
3474
  /**
3438
- * Set of rules that describes when this input is required:
3439
- *
3440
- * - \`always\`: Input is always required
3441
- * - \`ifNotDefined\`: Input is required when another specified input is not
3442
- * defined
3443
- * - \`ifDefined\`: Input is required when another specified input is defined
3444
- * - \`conditionalValues\`: Input is required when another input has a specific
3445
- * value
3475
+ * Makes this input required when another input is defined:
3446
3476
  *
3447
- * By default, the input is not required.
3448
- */
3449
- required?: Input.Required;
3450
- /**
3451
- * The step increment for numeric inputs. Only available for \`number\` input type.
3477
+ * - Key: name of the input that must be defined
3478
+ * - Value: message to display when this input is required
3452
3479
  */
3453
- step?: number;
3454
- }
3455
- namespace Input {
3480
+ ifDefined?: unknown;
3456
3481
  /**
3457
- * Set of rules that describes when this input is required:
3458
- *
3459
- * - \`always\`: Input is always required
3460
- * - \`ifNotDefined\`: Input is required when another specified input is not
3461
- * defined
3462
- * - \`ifDefined\`: Input is required when another specified input is defined
3463
- * - \`conditionalValues\`: Input is required when another input has a specific
3464
- * value
3482
+ * Makes this input required when another input is not defined:
3465
3483
  *
3466
- * By default, the input is not required.
3484
+ * - Key: name of the input that must be undefined
3485
+ * - Value: message to display when this input is required
3467
3486
  */
3468
- interface Required {
3469
- /**
3470
- * Whether the input is always required
3471
- */
3472
- always?: boolean;
3473
- /**
3474
- * Makes this input required when another input has a specific value:
3475
- *
3476
- * - Key: name of the input to check
3477
- * - Value: operation and allowed values that trigger the requirement
3478
- */
3479
- conditionalValues?: unknown;
3480
- /**
3481
- * Makes this input required when another input is defined:
3482
- *
3483
- * - Key: name of the input that must be defined
3484
- * - Value: message to display when this input is required
3485
- */
3486
- ifDefined?: unknown;
3487
- /**
3488
- * Makes this input required when another input is not defined:
3489
- *
3490
- * - Key: name of the input that must be undefined
3491
- * - Value: message to display when this input is required
3492
- */
3493
- ifNotDefined?: unknown;
3494
- }
3487
+ ifNotDefined?: unknown;
3495
3488
  }
3489
+ }
3490
+ /**
3491
+ * The parameters of the model
3492
+ */
3493
+ interface Parameters {
3496
3494
  /**
3497
- * The parameters of the model
3495
+ * Age group of the voice (for professional cloning)
3496
+ *
3497
+ * Only available for ElevenLabs voice training
3498
3498
  */
3499
- interface Parameters {
3500
- /**
3501
- * Age group of the voice (for professional cloning)
3502
- *
3503
- * Only available for ElevenLabs voice training
3504
- */
3505
- age?: string;
3506
- /**
3507
- * The batch size Less steps, and will increase the learning rate
3508
- *
3509
- * Only available for Flux LoRA training
3510
- */
3511
- batchSize?: number;
3512
- /**
3513
- * The prompt to specify images in the same class as provided instance images
3514
- *
3515
- * Only available for SD15 training
3516
- */
3517
- classPrompt?: string;
3518
- /**
3519
- * Type of voice cloning: "instant" (fast) or "professional" (higher quality,
3520
- * requires captcha)
3521
- *
3522
- * Only available for ElevenLabs voice training
3523
- */
3524
- cloneType?: string;
3525
- /**
3526
- * The prompt with identifier specifying the instance (or subject) of the class
3527
- * (example: "a daiton dog")
3528
- *
3529
- * Default value varies depending on the model type:
3530
- *
3531
- * - For SD1.5: "daiton" if no class is associated with the model
3532
- * - For SDXL: "daiton"
3533
- * - For Flux: ""
3534
- */
3535
- conceptPrompt?: string;
3536
- /**
3537
- * Gender of the voice (for professional cloning)
3538
- *
3539
- * Only available for ElevenLabs voice training
3540
- */
3541
- gender?: string;
3542
- /**
3543
- * Language of the audio samples (ISO 639-1 code)
3544
- *
3545
- * Only available for ElevenLabs voice training
3546
- */
3547
- language?: string;
3548
- /**
3549
- * Initial learning rate (after the potential warmup period)
3550
- *
3551
- * Default value varies depending on the model type:
3552
- *
3553
- * - For SD1.5 and SDXL: 0.000005
3554
- * - For Flux: 0.0001
3555
- */
3556
- learningRate?: number;
3557
- /**
3558
- * Initial learning rate (after the potential warmup period) for the text encoder
3559
- *
3560
- * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
3561
- * [SDXL: 0 | Flux LoRA: 0.000001]
3562
- */
3563
- learningRateTextEncoder?: number;
3564
- /**
3565
- * Initial learning rate (after the potential warmup period) for the UNet
3566
- *
3567
- * Only available for SDXL LoRA training
3568
- */
3569
- learningRateUnet?: number;
3570
- /**
3571
- * The scheduler type to use (default: "constant")
3572
- *
3573
- * Only available for SD15 and SDXL LoRA training
3574
- */
3575
- lrScheduler?: 'constant' | 'constant-with-warmup' | 'cosine' | 'cosine-with-restarts' | 'linear' | 'polynomial';
3576
- /**
3577
- * Maximum number of training steps to execute (default: varies depending on the
3578
- * model type)
3579
- *
3580
- * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
3581
- * instead
3582
- *
3583
- * Default value varies depending on the model type:
3584
- *
3585
- * - For SD1.5: round((number of training images \* 225) / 3)
3586
- * - For SDXL: number of training images \* 175
3587
- * - For Flux: number of training images \* 100
3588
- *
3589
- * Maximum value varies depending on the model type:
3590
- *
3591
- * - For SD1.5 and SDXL: [0, 40000]
3592
- * - For Flux: [0, 10000]
3593
- */
3594
- maxTrainSteps?: number;
3595
- /**
3596
- * The number of epochs to train for
3597
- *
3598
- * Only available for Flux LoRA training
3599
- */
3600
- nbEpochs?: number;
3601
- /**
3602
- * The number of times to repeat the training
3603
- *
3604
- * Only available for Flux LoRA training
3605
- */
3606
- nbRepeats?: number;
3607
- /**
3608
- * The number of training steps for the text encoder
3609
- *
3610
- * Only available for SDXL LoRA training
3611
- */
3612
- numTextTrainSteps?: number;
3613
- /**
3614
- * The number of training steps for the UNet
3615
- *
3616
- * Only available for SDXL LoRA training
3617
- */
3618
- numUNetTrainSteps?: number;
3619
- /**
3620
- * Optimize the model training task for a specific type of input images. The
3621
- * available values are:
3622
- *
3623
- * - "likeness": optimize training for likeness or portrait (targets specific
3624
- * transformer blocks)
3625
- * - "all": train all transformer blocks
3626
- * - "none": train no specific transformer blocks
3627
- *
3628
- * This parameter controls which double and single transformer blocks are trained
3629
- * during the LoRA training process.
3630
- *
3631
- * Only available for Flux LoRA training
3632
- */
3633
- optimizeFor?: 'likeness';
3634
- /**
3635
- * The weight of prior preservation loss
3636
- *
3637
- * Only available for SD15 and SDXL LoRA training
3638
- */
3639
- priorLossWeight?: number;
3640
- /**
3641
- * Whether to random crop or center crop images before resizing to the working
3642
- * resolution
3643
- *
3644
- * Only available for SD15 and SDXL LoRA training
3645
- */
3646
- randomCrop?: boolean;
3647
- /**
3648
- * Ratio of random crops
3649
- *
3650
- * Only available for SD15 and SDXL LoRA training
3651
- */
3652
- randomCropRatio?: number;
3653
- /**
3654
- * Scale of random crops
3655
- *
3656
- * Only available for SD15 and SDXL LoRA training
3657
- */
3658
- randomCropScale?: number;
3659
- /**
3660
- * The dimension of the LoRA update matrices
3661
- *
3662
- * Only available for SDXL (deprecated), Flux LoRA and Musubi training
3663
- *
3664
- * Default value varies depending on the model type:
3665
- *
3666
- * - For SDXL (deprecated): 64
3667
- * - For Flux: 16
3668
- * - For Musubi: 64
3669
- *
3670
- * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
3671
- * 128])
3672
- */
3673
- rank?: number;
3674
- /**
3675
- * Whether to remove background noise from audio samples before cloning. When
3676
- * enabled, each sample must be at least 5 seconds long.
3677
- *
3678
- * Only available for ElevenLabs voice training
3679
- */
3680
- removeBackgroundNoise?: boolean;
3681
- /**
3682
- * The prompts to use for each epoch Only available for Flux LoRA training
3683
- */
3684
- samplePrompts?: Array<string>;
3685
- /**
3686
- * The sample prompt images (AssetIds) paired with samplePrompts Only available for
3687
- * Flux LoRA training Must be the same length as samplePrompts
3688
- */
3689
- sampleSourceImages?: Array<string>;
3690
- /**
3691
- * Whether to scale the learning rate
3692
- *
3693
- * Note: Legacy parameter, will be ignored
3694
- *
3695
- * Only available for SD15 and SDXL LoRA training
3696
- */
3697
- scaleLr?: boolean;
3698
- /**
3699
- * Used to reproduce previous results. Default: randomly generated number.
3700
- *
3701
- * Only available for SD15 and SDXL LoRA training
3702
- */
3703
- seed?: number;
3704
- /**
3705
- * Whether to train the text encoder or not
3706
- *
3707
- * Example: For 100 steps and a value of 0.2, it means that the text encoder will
3708
- * be trained for 20 steps and then the UNet for 80 steps
3709
- *
3710
- * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
3711
- *
3712
- * Only available for SD15 and SDXL LoRA training
3713
- */
3714
- textEncoderTrainingRatio?: number;
3715
- /**
3716
- * Validation frequency. Cannot be greater than maxTrainSteps value
3717
- *
3718
- * Only available for SD15 and SDXL LoRA training
3719
- */
3720
- validationFrequency?: number;
3721
- /**
3722
- * Validation prompt
3723
- *
3724
- * Only available for SD15 and SDXL LoRA training
3725
- */
3726
- validationPrompt?: string;
3727
- /**
3728
- * Description of the voice characteristics
3729
- *
3730
- * Only available for ElevenLabs voice training
3731
- */
3732
- voiceDescription?: string;
3733
- /**
3734
- * The Weights And Bias key to use for logging. The maximum length is 40 characters
3735
- */
3736
- wandbKey?: string;
3737
- }
3499
+ age?: string;
3500
+ /**
3501
+ * The batch size Less steps, and will increase the learning rate
3502
+ *
3503
+ * Only available for Flux LoRA training
3504
+ */
3505
+ batchSize?: number;
3506
+ /**
3507
+ * The prompt to specify images in the same class as provided instance images
3508
+ *
3509
+ * Only available for SD15 training
3510
+ */
3511
+ classPrompt?: string;
3512
+ /**
3513
+ * Type of voice cloning: "instant" (fast) or "professional" (higher quality,
3514
+ * requires captcha)
3515
+ *
3516
+ * Only available for ElevenLabs voice training
3517
+ */
3518
+ cloneType?: string;
3519
+ /**
3520
+ * The prompt with identifier specifying the instance (or subject) of the class
3521
+ * (example: "a daiton dog")
3522
+ *
3523
+ * Default value varies depending on the model type:
3524
+ *
3525
+ * - For SD1.5: "daiton" if no class is associated with the model
3526
+ * - For SDXL: "daiton"
3527
+ * - For Flux: ""
3528
+ */
3529
+ conceptPrompt?: string;
3530
+ /**
3531
+ * Gender of the voice (for professional cloning)
3532
+ *
3533
+ * Only available for ElevenLabs voice training
3534
+ */
3535
+ gender?: string;
3536
+ /**
3537
+ * Language of the audio samples (ISO 639-1 code)
3538
+ *
3539
+ * Only available for ElevenLabs voice training
3540
+ */
3541
+ language?: string;
3542
+ /**
3543
+ * Initial learning rate (after the potential warmup period)
3544
+ *
3545
+ * Default value varies depending on the model type:
3546
+ *
3547
+ * - For SD1.5 and SDXL: 0.000005
3548
+ * - For Flux: 0.0001
3549
+ */
3550
+ learningRate?: number;
3551
+ /**
3552
+ * Initial learning rate (after the potential warmup period) for the text encoder
3553
+ *
3554
+ * Maximum [Flux LoRA: 0.001] Default [SDXL: 0.00005 | Flux LoRA: 0.00001] Minimum
3555
+ * [SDXL: 0 | Flux LoRA: 0.000001]
3556
+ */
3557
+ learningRateTextEncoder?: number;
3558
+ /**
3559
+ * Initial learning rate (after the potential warmup period) for the UNet
3560
+ *
3561
+ * Only available for SDXL LoRA training
3562
+ */
3563
+ learningRateUnet?: number;
3564
+ /**
3565
+ * The scheduler type to use (default: "constant")
3566
+ *
3567
+ * Only available for SD15 and SDXL LoRA training
3568
+ */
3569
+ lrScheduler?: 'constant' | 'constant-with-warmup' | 'cosine' | 'cosine-with-restarts' | 'linear' | 'polynomial';
3570
+ /**
3571
+ * Maximum number of training steps to execute (default: varies depending on the
3572
+ * model type)
3573
+ *
3574
+ * For SDXL LoRA training, please use `numTextTrainSteps` and `numUNetTrainSteps`
3575
+ * instead
3576
+ *
3577
+ * Default value varies depending on the model type:
3578
+ *
3579
+ * - For SD1.5: round((number of training images \* 225) / 3)
3580
+ * - For SDXL: number of training images \* 175
3581
+ * - For Flux: number of training images \* 100
3582
+ *
3583
+ * Maximum value varies depending on the model type:
3584
+ *
3585
+ * - For SD1.5 and SDXL: [0, 40000]
3586
+ * - For Flux: [0, 10000]
3587
+ */
3588
+ maxTrainSteps?: number;
3589
+ /**
3590
+ * The number of epochs to train for
3591
+ *
3592
+ * Only available for Flux LoRA training
3593
+ */
3594
+ nbEpochs?: number;
3595
+ /**
3596
+ * The number of times to repeat the training
3597
+ *
3598
+ * Only available for Flux LoRA training
3599
+ */
3600
+ nbRepeats?: number;
3601
+ /**
3602
+ * The number of training steps for the text encoder
3603
+ *
3604
+ * Only available for SDXL LoRA training
3605
+ */
3606
+ numTextTrainSteps?: number;
3607
+ /**
3608
+ * The number of training steps for the UNet
3609
+ *
3610
+ * Only available for SDXL LoRA training
3611
+ */
3612
+ numUNetTrainSteps?: number;
3613
+ /**
3614
+ * Optimize the model training task for a specific type of input images. The
3615
+ * available values are:
3616
+ *
3617
+ * - "likeness": optimize training for likeness or portrait (targets specific
3618
+ * transformer blocks)
3619
+ * - "all": train all transformer blocks
3620
+ * - "none": train no specific transformer blocks
3621
+ *
3622
+ * This parameter controls which double and single transformer blocks are trained
3623
+ * during the LoRA training process.
3624
+ *
3625
+ * Only available for Flux LoRA training
3626
+ */
3627
+ optimizeFor?: 'likeness';
3628
+ /**
3629
+ * The weight of prior preservation loss
3630
+ *
3631
+ * Only available for SD15 and SDXL LoRA training
3632
+ */
3633
+ priorLossWeight?: number;
3634
+ /**
3635
+ * Whether to random crop or center crop images before resizing to the working
3636
+ * resolution
3637
+ *
3638
+ * Only available for SD15 and SDXL LoRA training
3639
+ */
3640
+ randomCrop?: boolean;
3641
+ /**
3642
+ * Ratio of random crops
3643
+ *
3644
+ * Only available for SD15 and SDXL LoRA training
3645
+ */
3646
+ randomCropRatio?: number;
3647
+ /**
3648
+ * Scale of random crops
3649
+ *
3650
+ * Only available for SD15 and SDXL LoRA training
3651
+ */
3652
+ randomCropScale?: number;
3653
+ /**
3654
+ * The dimension of the LoRA update matrices
3655
+ *
3656
+ * Only available for SDXL (deprecated), Flux LoRA and Musubi training
3657
+ *
3658
+ * Default value varies depending on the model type:
3659
+ *
3660
+ * - For SDXL (deprecated): 64
3661
+ * - For Flux: 16
3662
+ * - For Musubi: 64
3663
+ *
3664
+ * Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
3665
+ * 128])
3666
+ */
3667
+ rank?: number;
3738
3668
  /**
3739
- * Aggregated performance stats
3669
+ * Whether to remove background noise from audio samples before cloning. When
3670
+ * enabled, each sample must be at least 5 seconds long.
3671
+ *
3672
+ * Only available for ElevenLabs voice training
3740
3673
  */
3741
- interface PerformanceStats {
3742
- /**
3743
- * Performance metrics per variant
3744
- */
3745
- variants: Array<PerformanceStats.Variant>;
3746
- /**
3747
- * Default variant key for quick model comparison
3748
- */
3749
- default?: string;
3750
- }
3751
- namespace PerformanceStats {
3752
- /**
3753
- * Performance stats for a model variant
3754
- */
3755
- interface Variant {
3756
- /**
3757
- * The generation capability (example: "txt2img", "img2video", "txt2audio")
3758
- */
3759
- capability: string;
3760
- /**
3761
- * When these stats were last computed (ISO date)
3762
- */
3763
- computedAt: string;
3764
- /**
3765
- * Maximum cost per output asset (CU)
3766
- */
3767
- costPerAssetMaxCU: number;
3768
- /**
3769
- * Minimum cost per output asset (CU)
3770
- */
3771
- costPerAssetMinCU: number;
3772
- /**
3773
- * Median cost per output asset (CU)
3774
- */
3775
- costPerAssetP50CU: number;
3776
- /**
3777
- * Inference latency P50 per output asset (seconds)
3778
- */
3779
- inferenceLatencyP50Sec: number;
3780
- /**
3781
- * Inference latency P75 per output asset (seconds)
3782
- */
3783
- inferenceLatencyP75Sec: number;
3784
- /**
3785
- * Total latency P50 per output asset, including queue time (seconds)
3786
- */
3787
- totalLatencyP50Sec: number;
3788
- /**
3789
- * Total latency P75 per output asset, including queue time (seconds)
3790
- */
3791
- totalLatencyP75Sec: number;
3792
- /**
3793
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
3794
- */
3795
- variantKey: string;
3796
- /**
3797
- * External quality score from arena.ai leaderboard
3798
- */
3799
- arenaScore?: Variant.ArenaScore;
3800
- /**
3801
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
3802
- */
3803
- resolution?: string;
3804
- }
3805
- namespace Variant {
3806
- /**
3807
- * External quality score from arena.ai leaderboard
3808
- */
3809
- interface ArenaScore {
3810
- /**
3811
- * Arena category (example: "text_to_image", "image_to_video")
3812
- */
3813
- arenaCategory: string;
3814
- /**
3815
- * Model name on arena.ai
3816
- */
3817
- arenaModelName: string;
3818
- /**
3819
- * When this score was last fetched (ISO date)
3820
- */
3821
- fetchedAt: string;
3822
- /**
3823
- * Rank in the arena category
3824
- */
3825
- rank: number;
3826
- /**
3827
- * ELO rating
3828
- */
3829
- rating: number;
3830
- /**
3831
- * ELO rating confidence interval lower bound
3832
- */
3833
- ratingLower: number;
3834
- /**
3835
- * ELO rating confidence interval upper bound
3836
- */
3837
- ratingUpper: number;
3838
- /**
3839
- * Number of human votes
3840
- */
3841
- votes: number;
3842
- }
3843
- }
3844
- }
3674
+ removeBackgroundNoise?: boolean;
3845
3675
  /**
3846
- * A thumbnail for your model
3676
+ * The prompts to use for each epoch Only available for Flux LoRA training
3847
3677
  */
3848
- interface Thumbnail {
3849
- /**
3850
- * The AssetId of the image used as a thumbnail for your model (example:
3851
- * "asset_GTrL3mq4SXWyMxkOHRxlpw")
3852
- */
3853
- assetId: string;
3854
- /**
3855
- * The url of the image used as a thumbnail for your model
3856
- */
3857
- url: string;
3858
- }
3859
- interface TrainingImagePair {
3860
- /**
3861
- * The instruction for the image pair, source to target
3862
- */
3863
- instruction?: string;
3864
- /**
3865
- * The source asset ID (must be a training asset)
3866
- */
3867
- sourceId?: string;
3868
- /**
3869
- * The target asset ID (must be a training asset)
3870
- */
3871
- targetId?: string;
3872
- }
3873
- interface TrainingImage {
3874
- /**
3875
- * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
3876
- */
3877
- id: string;
3878
- /**
3879
- * Automatic captioning of the image
3880
- */
3881
- automaticCaptioning: string;
3882
- /**
3883
- * The training image upload date as an ISO string (example:
3884
- * "2023-02-03T11:19:41.579Z")
3885
- */
3886
- createdAt: string;
3887
- /**
3888
- * Description for the image
3889
- */
3890
- description: string;
3891
- /**
3892
- * The URL of the image
3893
- */
3894
- downloadUrl: string;
3895
- /**
3896
- * The original file name of the image (example: "my-training-image.jpg")
3897
- */
3898
- name: string;
3899
- }
3678
+ samplePrompts?: Array<string>;
3900
3679
  /**
3901
- * Additional information about the training progress of the model
3680
+ * The sample prompt images (AssetIds) paired with samplePrompts Only available for
3681
+ * Flux LoRA training Must be the same length as samplePrompts
3902
3682
  */
3903
- interface TrainingProgress {
3904
- /**
3905
- * The stage of the request
3906
- */
3907
- stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'running-train' | 'starting-train';
3908
- /**
3909
- * Timestamp in milliseconds of the last time the training progress was updated
3910
- */
3911
- updatedAt: number;
3912
- /**
3913
- * Position of the job in the queue (ie. the number of job in the queue before this
3914
- * one)
3915
- */
3916
- position?: number;
3917
- /**
3918
- * The progress of the job
3919
- */
3920
- progress?: number;
3683
+ sampleSourceImages?: Array<string>;
3684
+ /**
3685
+ * Whether to scale the learning rate
3686
+ *
3687
+ * Note: Legacy parameter, will be ignored
3688
+ *
3689
+ * Only available for SD15 and SDXL LoRA training
3690
+ */
3691
+ scaleLr?: boolean;
3692
+ /**
3693
+ * Used to reproduce previous results. Default: randomly generated number.
3694
+ *
3695
+ * Only available for SD15 and SDXL LoRA training
3696
+ */
3697
+ seed?: number;
3698
+ /**
3699
+ * Whether to train the text encoder or not
3700
+ *
3701
+ * Example: For 100 steps and a value of 0.2, it means that the text encoder will
3702
+ * be trained for 20 steps and then the UNet for 80 steps
3703
+ *
3704
+ * Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
3705
+ *
3706
+ * Only available for SD15 and SDXL LoRA training
3707
+ */
3708
+ textEncoderTrainingRatio?: number;
3709
+ /**
3710
+ * Validation frequency. Cannot be greater than maxTrainSteps value
3711
+ *
3712
+ * Only available for SD15 and SDXL LoRA training
3713
+ */
3714
+ validationFrequency?: number;
3715
+ /**
3716
+ * Validation prompt
3717
+ *
3718
+ * Only available for SD15 and SDXL LoRA training
3719
+ */
3720
+ validationPrompt?: string;
3721
+ /**
3722
+ * Description of the voice characteristics
3723
+ *
3724
+ * Only available for ElevenLabs voice training
3725
+ */
3726
+ voiceDescription?: string;
3727
+ /**
3728
+ * The Weights And Bias key to use for logging. The maximum length is 40 characters
3729
+ */
3730
+ wandbKey?: string;
3731
+ }
3732
+ /**
3733
+ * Aggregated performance stats
3734
+ */
3735
+ interface PerformanceStats {
3736
+ /**
3737
+ * Performance metrics per variant
3738
+ */
3739
+ variants: Array<PerformanceStats.Variant>;
3740
+ /**
3741
+ * Default variant key for quick model comparison
3742
+ */
3743
+ default?: string;
3744
+ }
3745
+ namespace PerformanceStats {
3746
+ /**
3747
+ * Performance stats for a model variant
3748
+ */
3749
+ interface Variant {
3921
3750
  /**
3922
- * The remaining time in milliseconds
3751
+ * The generation capability (example: "txt2img", "img2video", "txt2audio")
3923
3752
  */
3924
- remainingTimeMs?: number;
3753
+ capability: string;
3925
3754
  /**
3926
- * The timestamp in millisecond marking the start of the process
3755
+ * When these stats were last computed (ISO date)
3927
3756
  */
3928
- startedAt?: number;
3929
- }
3930
- /**
3931
- * Additional information about the model's training
3932
- */
3933
- interface TrainingStats {
3757
+ computedAt: string;
3934
3758
  /**
3935
- * The training end time as an ISO date string
3759
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
3936
3760
  */
3937
- endedAt?: string;
3761
+ variantKey: string;
3938
3762
  /**
3939
- * The training queued duration in seconds
3763
+ * External quality score from arena.ai leaderboard
3940
3764
  */
3941
- queueDuration?: number;
3765
+ arenaScore?: Variant.ArenaScore;
3942
3766
  /**
3943
- * The training start time as an ISO date string
3767
+ * Maximum cost per output asset (CU)
3944
3768
  */
3945
- startedAt?: string;
3769
+ costPerAssetMaxCU?: number;
3946
3770
  /**
3947
- * The training duration in seconds
3771
+ * Minimum cost per output asset (CU)
3948
3772
  */
3949
- trainDuration?: number;
3950
- }
3951
- /**
3952
- * The UI configuration for the model
3953
- */
3954
- interface UiConfig {
3773
+ costPerAssetMinCU?: number;
3955
3774
  /**
3956
- * Configuration for the input properties
3775
+ * Median cost per output asset (CU)
3957
3776
  */
3958
- inputProperties?: {
3959
- [key: string]: UiConfig.InputProperties;
3960
- };
3777
+ costPerAssetP50CU?: number;
3961
3778
  /**
3962
- * Configuration for the loras component
3779
+ * Inference latency P50 per output asset (seconds)
3963
3780
  */
3964
- lorasComponent?: UiConfig.LorasComponent;
3781
+ inferenceLatencyP50Sec?: number;
3965
3782
  /**
3966
- * Configuration for the presets
3783
+ * Inference latency P75 per output asset (seconds)
3967
3784
  */
3968
- presets?: Array<UiConfig.Preset>;
3785
+ inferenceLatencyP75Sec?: number;
3969
3786
  /**
3970
- * Configuration for the resolution component
3787
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
3971
3788
  */
3972
- resolutionComponent?: UiConfig.ResolutionComponent;
3789
+ resolution?: string;
3973
3790
  /**
3974
- * Configuration for the selects
3791
+ * Total latency P50 per output asset, including queue time (seconds)
3975
3792
  */
3976
- selects?: {
3977
- [key: string]: unknown;
3978
- };
3793
+ totalLatencyP50Sec?: number;
3979
3794
  /**
3980
- * Configuration for the trigger generate button
3795
+ * Total latency P75 per output asset, including queue time (seconds)
3981
3796
  */
3982
- triggerGenerate?: UiConfig.TriggerGenerate;
3797
+ totalLatencyP75Sec?: number;
3983
3798
  }
3984
- namespace UiConfig {
3985
- interface InputProperties {
3986
- collapsed?: boolean;
3987
- }
3799
+ namespace Variant {
3988
3800
  /**
3989
- * Configuration for the loras component
3801
+ * External quality score from arena.ai leaderboard
3990
3802
  */
3991
- interface LorasComponent {
3803
+ interface ArenaScore {
3992
3804
  /**
3993
- * The label of the component
3805
+ * Arena category (example: "text_to_image", "image_to_video")
3994
3806
  */
3995
- label: string;
3807
+ arenaCategory: string;
3996
3808
  /**
3997
- * The input name of the model (model_array)
3809
+ * Model name on arena.ai
3998
3810
  */
3999
- modelInput: string;
3811
+ arenaModelName: string;
4000
3812
  /**
4001
- * The input name of the scale (number_array)
3813
+ * When this score was last fetched (ISO date)
4002
3814
  */
4003
- scaleInput: string;
3815
+ fetchedAt: string;
4004
3816
  /**
4005
- * The input model id (example: a composition or a single LoRA modelId) If
4006
- * specified, the model id will be attached to the output asset as a metadata If
4007
- * the model-decomposer parser is specified on it, modelInput and scaleInput will
4008
- * be automatically populated
3817
+ * Rank in the arena category
4009
3818
  */
4010
- modelIdInput?: string;
4011
- }
4012
- interface Preset {
4013
- fields: Array<string>;
4014
- presets: unknown;
4015
- }
4016
- /**
4017
- * Configuration for the resolution component
4018
- */
4019
- interface ResolutionComponent {
3819
+ rank: number;
4020
3820
  /**
4021
- * The input name of the height
3821
+ * ELO rating
4022
3822
  */
4023
- heightInput: string;
3823
+ rating: number;
4024
3824
  /**
4025
- * The label of the component
3825
+ * ELO rating confidence interval lower bound
4026
3826
  */
4027
- label: string;
3827
+ ratingLower: number;
4028
3828
  /**
4029
- * The resolution presets
3829
+ * ELO rating confidence interval upper bound
4030
3830
  */
4031
- presets: Array<ResolutionComponent.Preset>;
3831
+ ratingUpper: number;
4032
3832
  /**
4033
- * The input name of the width
3833
+ * Number of human votes
4034
3834
  */
4035
- widthInput: string;
4036
- }
4037
- namespace ResolutionComponent {
4038
- interface Preset {
4039
- height: number;
4040
- label: string;
4041
- width: number;
4042
- }
3835
+ votes: number;
4043
3836
  }
3837
+ }
3838
+ }
3839
+ /**
3840
+ * A thumbnail for your model
3841
+ */
3842
+ interface Thumbnail {
3843
+ /**
3844
+ * The AssetId of the image used as a thumbnail for your model (example:
3845
+ * "asset_GTrL3mq4SXWyMxkOHRxlpw")
3846
+ */
3847
+ assetId: string;
3848
+ /**
3849
+ * The url of the image used as a thumbnail for your model
3850
+ */
3851
+ url: string;
3852
+ }
3853
+ interface TrainingImagePair {
3854
+ /**
3855
+ * The instruction for the image pair, source to target
3856
+ */
3857
+ instruction?: string;
3858
+ /**
3859
+ * The source asset ID (must be a training asset)
3860
+ */
3861
+ sourceId?: string;
3862
+ /**
3863
+ * The target asset ID (must be a training asset)
3864
+ */
3865
+ targetId?: string;
3866
+ }
3867
+ interface TrainingImage {
3868
+ /**
3869
+ * The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
3870
+ */
3871
+ id: string;
3872
+ /**
3873
+ * Automatic captioning of the image
3874
+ */
3875
+ automaticCaptioning: string;
3876
+ /**
3877
+ * The training image upload date as an ISO string (example:
3878
+ * "2023-02-03T11:19:41.579Z")
3879
+ */
3880
+ createdAt: string;
3881
+ /**
3882
+ * Description for the image
3883
+ */
3884
+ description: string;
3885
+ /**
3886
+ * The URL of the image
3887
+ */
3888
+ downloadUrl: string;
3889
+ /**
3890
+ * The original file name of the image (example: "my-training-image.jpg")
3891
+ */
3892
+ name: string;
3893
+ }
3894
+ /**
3895
+ * Additional information about the training progress of the model
3896
+ */
3897
+ interface TrainingProgress {
3898
+ /**
3899
+ * The stage of the request
3900
+ */
3901
+ stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'running-train' | 'starting-train';
3902
+ /**
3903
+ * Timestamp in milliseconds of the last time the training progress was updated
3904
+ */
3905
+ updatedAt: number;
3906
+ /**
3907
+ * Position of the job in the queue (ie. the number of job in the queue before this
3908
+ * one)
3909
+ */
3910
+ position?: number;
3911
+ /**
3912
+ * The progress of the job
3913
+ */
3914
+ progress?: number;
3915
+ /**
3916
+ * The remaining time in milliseconds
3917
+ */
3918
+ remainingTimeMs?: number;
3919
+ /**
3920
+ * The timestamp in millisecond marking the start of the process
3921
+ */
3922
+ startedAt?: number;
3923
+ }
3924
+ /**
3925
+ * Additional information about the model's training
3926
+ */
3927
+ interface TrainingStats {
3928
+ /**
3929
+ * The training end time as an ISO date string
3930
+ */
3931
+ endedAt?: string;
3932
+ /**
3933
+ * The training queued duration in seconds
3934
+ */
3935
+ queueDuration?: number;
3936
+ /**
3937
+ * The training start time as an ISO date string
3938
+ */
3939
+ startedAt?: string;
3940
+ /**
3941
+ * The training duration in seconds
3942
+ */
3943
+ trainDuration?: number;
3944
+ }
3945
+ /**
3946
+ * The UI configuration for the model
3947
+ */
3948
+ interface UiConfig {
3949
+ /**
3950
+ * Configuration for the input properties
3951
+ */
3952
+ inputProperties?: {
3953
+ [key: string]: UiConfig.InputProperties;
3954
+ };
3955
+ /**
3956
+ * Configuration for the loras component
3957
+ */
3958
+ lorasComponent?: UiConfig.LorasComponent;
3959
+ /**
3960
+ * Configuration for the presets
3961
+ */
3962
+ presets?: Array<UiConfig.Preset>;
3963
+ /**
3964
+ * Configuration for the resolution component
3965
+ */
3966
+ resolutionComponent?: UiConfig.ResolutionComponent;
3967
+ /**
3968
+ * Configuration for the selects
3969
+ */
3970
+ selects?: {
3971
+ [key: string]: unknown;
3972
+ };
3973
+ /**
3974
+ * Configuration for the trigger generate button
3975
+ */
3976
+ triggerGenerate?: UiConfig.TriggerGenerate;
3977
+ }
3978
+ namespace UiConfig {
3979
+ interface InputProperties {
3980
+ collapsed?: boolean;
3981
+ }
3982
+ /**
3983
+ * Configuration for the loras component
3984
+ */
3985
+ interface LorasComponent {
4044
3986
  /**
4045
- * Configuration for the trigger generate button
3987
+ * The label of the component
4046
3988
  */
4047
- interface TriggerGenerate {
3989
+ label: string;
3990
+ /**
3991
+ * The input name of the model (model_array)
3992
+ */
3993
+ modelInput: string;
3994
+ /**
3995
+ * The input name of the scale (number_array)
3996
+ */
3997
+ scaleInput: string;
3998
+ /**
3999
+ * The input model id (example: a composition or a single LoRA modelId) If
4000
+ * specified, the model id will be attached to the output asset as a metadata If
4001
+ * the model-decomposer parser is specified on it, modelInput and scaleInput will
4002
+ * be automatically populated
4003
+ */
4004
+ modelIdInput?: string;
4005
+ }
4006
+ interface Preset {
4007
+ fields: Array<string>;
4008
+ presets: unknown;
4009
+ }
4010
+ /**
4011
+ * Configuration for the resolution component
4012
+ */
4013
+ interface ResolutionComponent {
4014
+ /**
4015
+ * The input name of the height
4016
+ */
4017
+ heightInput: string;
4018
+ /**
4019
+ * The label of the component
4020
+ */
4021
+ label: string;
4022
+ /**
4023
+ * The resolution presets
4024
+ */
4025
+ presets: Array<ResolutionComponent.Preset>;
4026
+ /**
4027
+ * The input name of the width
4028
+ */
4029
+ widthInput: string;
4030
+ }
4031
+ namespace ResolutionComponent {
4032
+ interface Preset {
4033
+ height: number;
4048
4034
  label: string;
4049
- /**
4050
- * The 'name' of the input where the trigger generate button will be displayed
4051
- * (after the input). Do not specify both position and after.
4052
- */
4053
- after?: string;
4054
- /**
4055
- * The position of the trigger generate button. If position specified, the button
4056
- * will be displayed at the specified position. Do not specify both position and
4057
- * after.
4058
- */
4059
- position?: 'bottom' | 'top';
4035
+ width: number;
4060
4036
  }
4061
4037
  }
4038
+ /**
4039
+ * Configuration for the trigger generate button
4040
+ */
4041
+ interface TriggerGenerate {
4042
+ label: string;
4043
+ /**
4044
+ * The 'name' of the input where the trigger generate button will be displayed
4045
+ * (after the input). Do not specify both position and after.
4046
+ */
4047
+ after?: string;
4048
+ /**
4049
+ * The position of the trigger generate button. If position specified, the button
4050
+ * will be displayed at the specified position. Do not specify both position and
4051
+ * after.
4052
+ */
4053
+ position?: 'bottom' | 'top';
4054
+ }
4062
4055
  }
4063
4056
  }
4064
4057
  export type ModelDeleteResponse = unknown;
@@ -4760,46 +4753,46 @@ export declare namespace ModelCopyResponse {
4760
4753
  * When these stats were last computed (ISO date)
4761
4754
  */
4762
4755
  computedAt: string;
4756
+ /**
4757
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
4758
+ */
4759
+ variantKey: string;
4760
+ /**
4761
+ * External quality score from arena.ai leaderboard
4762
+ */
4763
+ arenaScore?: Variant.ArenaScore;
4763
4764
  /**
4764
4765
  * Maximum cost per output asset (CU)
4765
4766
  */
4766
- costPerAssetMaxCU: number;
4767
+ costPerAssetMaxCU?: number;
4767
4768
  /**
4768
4769
  * Minimum cost per output asset (CU)
4769
4770
  */
4770
- costPerAssetMinCU: number;
4771
+ costPerAssetMinCU?: number;
4771
4772
  /**
4772
4773
  * Median cost per output asset (CU)
4773
4774
  */
4774
- costPerAssetP50CU: number;
4775
+ costPerAssetP50CU?: number;
4775
4776
  /**
4776
4777
  * Inference latency P50 per output asset (seconds)
4777
4778
  */
4778
- inferenceLatencyP50Sec: number;
4779
+ inferenceLatencyP50Sec?: number;
4779
4780
  /**
4780
4781
  * Inference latency P75 per output asset (seconds)
4781
4782
  */
4782
- inferenceLatencyP75Sec: number;
4783
- /**
4784
- * Total latency P50 per output asset, including queue time (seconds)
4785
- */
4786
- totalLatencyP50Sec: number;
4787
- /**
4788
- * Total latency P75 per output asset, including queue time (seconds)
4789
- */
4790
- totalLatencyP75Sec: number;
4783
+ inferenceLatencyP75Sec?: number;
4791
4784
  /**
4792
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
4785
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
4793
4786
  */
4794
- variantKey: string;
4787
+ resolution?: string;
4795
4788
  /**
4796
- * External quality score from arena.ai leaderboard
4789
+ * Total latency P50 per output asset, including queue time (seconds)
4797
4790
  */
4798
- arenaScore?: Variant.ArenaScore;
4791
+ totalLatencyP50Sec?: number;
4799
4792
  /**
4800
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
4793
+ * Total latency P75 per output asset, including queue time (seconds)
4801
4794
  */
4802
- resolution?: string;
4795
+ totalLatencyP75Sec?: number;
4803
4796
  }
4804
4797
  namespace Variant {
4805
4798
  /**
@@ -5765,46 +5758,46 @@ export declare namespace ModelGetBulkResponse {
5765
5758
  * When these stats were last computed (ISO date)
5766
5759
  */
5767
5760
  computedAt: string;
5761
+ /**
5762
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
5763
+ */
5764
+ variantKey: string;
5765
+ /**
5766
+ * External quality score from arena.ai leaderboard
5767
+ */
5768
+ arenaScore?: Variant.ArenaScore;
5768
5769
  /**
5769
5770
  * Maximum cost per output asset (CU)
5770
5771
  */
5771
- costPerAssetMaxCU: number;
5772
+ costPerAssetMaxCU?: number;
5772
5773
  /**
5773
5774
  * Minimum cost per output asset (CU)
5774
5775
  */
5775
- costPerAssetMinCU: number;
5776
+ costPerAssetMinCU?: number;
5776
5777
  /**
5777
5778
  * Median cost per output asset (CU)
5778
5779
  */
5779
- costPerAssetP50CU: number;
5780
+ costPerAssetP50CU?: number;
5780
5781
  /**
5781
5782
  * Inference latency P50 per output asset (seconds)
5782
5783
  */
5783
- inferenceLatencyP50Sec: number;
5784
+ inferenceLatencyP50Sec?: number;
5784
5785
  /**
5785
5786
  * Inference latency P75 per output asset (seconds)
5786
5787
  */
5787
- inferenceLatencyP75Sec: number;
5788
- /**
5789
- * Total latency P50 per output asset, including queue time (seconds)
5790
- */
5791
- totalLatencyP50Sec: number;
5792
- /**
5793
- * Total latency P75 per output asset, including queue time (seconds)
5794
- */
5795
- totalLatencyP75Sec: number;
5788
+ inferenceLatencyP75Sec?: number;
5796
5789
  /**
5797
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
5790
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
5798
5791
  */
5799
- variantKey: string;
5792
+ resolution?: string;
5800
5793
  /**
5801
- * External quality score from arena.ai leaderboard
5794
+ * Total latency P50 per output asset, including queue time (seconds)
5802
5795
  */
5803
- arenaScore?: Variant.ArenaScore;
5796
+ totalLatencyP50Sec?: number;
5804
5797
  /**
5805
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
5798
+ * Total latency P75 per output asset, including queue time (seconds)
5806
5799
  */
5807
- resolution?: string;
5800
+ totalLatencyP75Sec?: number;
5808
5801
  }
5809
5802
  namespace Variant {
5810
5803
  /**
@@ -6763,46 +6756,46 @@ export declare namespace ModelTransferResponse {
6763
6756
  * When these stats were last computed (ISO date)
6764
6757
  */
6765
6758
  computedAt: string;
6759
+ /**
6760
+ * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
6761
+ */
6762
+ variantKey: string;
6763
+ /**
6764
+ * External quality score from arena.ai leaderboard
6765
+ */
6766
+ arenaScore?: Variant.ArenaScore;
6766
6767
  /**
6767
6768
  * Maximum cost per output asset (CU)
6768
6769
  */
6769
- costPerAssetMaxCU: number;
6770
+ costPerAssetMaxCU?: number;
6770
6771
  /**
6771
6772
  * Minimum cost per output asset (CU)
6772
6773
  */
6773
- costPerAssetMinCU: number;
6774
+ costPerAssetMinCU?: number;
6774
6775
  /**
6775
6776
  * Median cost per output asset (CU)
6776
6777
  */
6777
- costPerAssetP50CU: number;
6778
+ costPerAssetP50CU?: number;
6778
6779
  /**
6779
6780
  * Inference latency P50 per output asset (seconds)
6780
6781
  */
6781
- inferenceLatencyP50Sec: number;
6782
+ inferenceLatencyP50Sec?: number;
6782
6783
  /**
6783
6784
  * Inference latency P75 per output asset (seconds)
6784
6785
  */
6785
- inferenceLatencyP75Sec: number;
6786
- /**
6787
- * Total latency P50 per output asset, including queue time (seconds)
6788
- */
6789
- totalLatencyP50Sec: number;
6790
- /**
6791
- * Total latency P75 per output asset, including queue time (seconds)
6792
- */
6793
- totalLatencyP75Sec: number;
6786
+ inferenceLatencyP75Sec?: number;
6794
6787
  /**
6795
- * Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
6788
+ * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
6796
6789
  */
6797
- variantKey: string;
6790
+ resolution?: string;
6798
6791
  /**
6799
- * External quality score from arena.ai leaderboard
6792
+ * Total latency P50 per output asset, including queue time (seconds)
6800
6793
  */
6801
- arenaScore?: Variant.ArenaScore;
6794
+ totalLatencyP50Sec?: number;
6802
6795
  /**
6803
- * The resolution bucket (example: "0.5K", "1K", "2K", "4K")
6796
+ * Total latency P75 per output asset, including queue time (seconds)
6804
6797
  */
6805
- resolution?: string;
6798
+ totalLatencyP75Sec?: number;
6806
6799
  }
6807
6800
  namespace Variant {
6808
6801
  /**
@@ -7476,7 +7469,7 @@ export declare namespace ModelUpdateParams {
7476
7469
  wandbKey?: string;
7477
7470
  }
7478
7471
  }
7479
- export interface ModelListParams {
7472
+ export interface ModelListParams extends ModelsCursorParams {
7480
7473
  /**
7481
7474
  * If set to true, returns the full list of models (including blacklisted models)
7482
7475
  * (only available for team admins)
@@ -7517,10 +7510,6 @@ export interface ModelListParams {
7517
7510
  * value is 500, minimum value is 1
7518
7511
  */
7519
7512
  pageSize?: number;
7520
- /**
7521
- * A token you received in a previous request to query the next page of items
7522
- */
7523
- paginationToken?: string;
7524
7513
  /**
7525
7514
  * The privacy of the models to return. The default value is `private`, possible
7526
7515
  * values are `private` and `public`
@@ -7689,7 +7678,7 @@ export interface ModelUpdateTagsParams {
7689
7678
  strict?: boolean;
7690
7679
  }
7691
7680
  export declare namespace Models {
7692
- export { type ModelCreateResponse as ModelCreateResponse, type ModelRetrieveResponse as ModelRetrieveResponse, type ModelUpdateResponse as ModelUpdateResponse, type ModelListResponse as ModelListResponse, type ModelDeleteResponse as ModelDeleteResponse, type ModelCopyResponse as ModelCopyResponse, type ModelDeleteImagesResponse as ModelDeleteImagesResponse, type ModelDownloadResponse as ModelDownloadResponse, type ModelGetBulkResponse as ModelGetBulkResponse, type ModelTransferResponse as ModelTransferResponse, type ModelUpdateTagsResponse as ModelUpdateTagsResponse, type ModelCreateParams as ModelCreateParams, type ModelRetrieveParams as ModelRetrieveParams, type ModelUpdateParams as ModelUpdateParams, type ModelListParams as ModelListParams, type ModelCopyParams as ModelCopyParams, type ModelDeleteImagesParams as ModelDeleteImagesParams, type ModelDownloadParams as ModelDownloadParams, type ModelGetBulkParams as ModelGetBulkParams, type ModelTransferParams as ModelTransferParams, type ModelUpdateTagsParams as ModelUpdateTagsParams, };
7681
+ export { type ModelCreateResponse as ModelCreateResponse, type ModelRetrieveResponse as ModelRetrieveResponse, type ModelUpdateResponse as ModelUpdateResponse, type ModelListResponse as ModelListResponse, type ModelDeleteResponse as ModelDeleteResponse, type ModelCopyResponse as ModelCopyResponse, type ModelDeleteImagesResponse as ModelDeleteImagesResponse, type ModelDownloadResponse as ModelDownloadResponse, type ModelGetBulkResponse as ModelGetBulkResponse, type ModelTransferResponse as ModelTransferResponse, type ModelUpdateTagsResponse as ModelUpdateTagsResponse, type ModelListResponsesModelsCursor as ModelListResponsesModelsCursor, type ModelCreateParams as ModelCreateParams, type ModelRetrieveParams as ModelRetrieveParams, type ModelUpdateParams as ModelUpdateParams, type ModelListParams as ModelListParams, type ModelCopyParams as ModelCopyParams, type ModelDeleteImagesParams as ModelDeleteImagesParams, type ModelDownloadParams as ModelDownloadParams, type ModelGetBulkParams as ModelGetBulkParams, type ModelTransferParams as ModelTransferParams, type ModelUpdateTagsParams as ModelUpdateTagsParams, };
7693
7682
  export { Description as Description, type DescriptionRetrieveResponse as DescriptionRetrieveResponse, type DescriptionUpdateResponse as DescriptionUpdateResponse, type DescriptionRetrieveParams as DescriptionRetrieveParams, type DescriptionUpdateParams as DescriptionUpdateParams, };
7694
7683
  export { Examples as Examples, type ExampleUpdateResponse as ExampleUpdateResponse, type ExampleListResponse as ExampleListResponse, type ExampleUpdateParams as ExampleUpdateParams, type ExampleListParams as ExampleListParams, };
7695
7684
  export { Train as Train, type TrainActionResponse as TrainActionResponse, type TrainTriggerResponse as TrainTriggerResponse, type TrainActionParams as TrainActionParams, type TrainTriggerParams as TrainTriggerParams, };