@scenario-labs/sdk 0.1.3 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +23 -0
- package/LICENSE +1 -1
- package/README.md +29 -29
- package/client.d.mts +35 -18
- package/client.d.mts.map +1 -1
- package/client.d.ts +35 -18
- package/client.d.ts.map +1 -1
- package/client.js +88 -50
- package/client.js.map +1 -1
- package/client.mjs +86 -48
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +8 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +8 -3
- package/index.d.ts.map +1 -1
- package/index.js +16 -6
- package/index.js.map +1 -1
- package/index.mjs +7 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +4 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +4 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/lib/generate.d.mts +19 -0
- package/lib/generate.d.mts.map +1 -0
- package/lib/generate.d.ts +19 -0
- package/lib/generate.d.ts.map +1 -0
- package/lib/generate.js +35 -0
- package/lib/generate.js.map +1 -0
- package/lib/generate.mjs +31 -0
- package/lib/generate.mjs.map +1 -0
- package/lib/job.d.mts +48 -0
- package/lib/job.d.mts.map +1 -0
- package/lib/job.d.ts +48 -0
- package/lib/job.d.ts.map +1 -0
- package/lib/job.js +50 -0
- package/lib/job.js.map +1 -0
- package/lib/job.mjs +45 -0
- package/lib/job.mjs.map +1 -0
- package/lib/models.d.mts +20 -0
- package/lib/models.d.mts.map +1 -0
- package/lib/models.d.ts +20 -0
- package/lib/models.d.ts.map +1 -0
- package/lib/models.js +28 -0
- package/lib/models.js.map +1 -0
- package/lib/models.mjs +23 -0
- package/lib/models.mjs.map +1 -0
- package/lib/scenario.d.mts +39 -0
- package/lib/scenario.d.mts.map +1 -0
- package/lib/scenario.d.ts +39 -0
- package/lib/scenario.d.ts.map +1 -0
- package/lib/scenario.js +46 -0
- package/lib/scenario.js.map +1 -0
- package/lib/scenario.mjs +42 -0
- package/lib/scenario.mjs.map +1 -0
- package/lib/workflow.d.mts +48 -0
- package/lib/workflow.d.mts.map +1 -0
- package/lib/workflow.d.ts +48 -0
- package/lib/workflow.d.ts.map +1 -0
- package/lib/workflow.js +59 -0
- package/lib/workflow.js.map +1 -0
- package/lib/workflow.mjs +54 -0
- package/lib/workflow.mjs.map +1 -0
- package/package.json +13 -3
- package/resources/assets/assets.d.mts +401 -96
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +401 -96
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +2 -2
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +2 -2
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/assets/public.d.mts +30 -27
- package/resources/assets/public.d.mts.map +1 -1
- package/resources/assets/public.d.ts +30 -27
- package/resources/assets/public.d.ts.map +1 -1
- package/resources/assets/public.js +2 -2
- package/resources/assets/public.js.map +1 -1
- package/resources/assets/public.mjs +2 -2
- package/resources/assets/public.mjs.map +1 -1
- package/resources/collections/assets.d.mts +2 -8
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +2 -8
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +2 -2
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +2 -2
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +5 -5
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +5 -5
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +2 -2
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +2 -2
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs +2 -2
- package/resources/collections/index.mjs.map +1 -1
- package/resources/collections/models.d.mts +2 -8
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +2 -8
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +2 -2
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +2 -2
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +4188 -1370
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +4188 -1370
- package/resources/generate.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +943 -33
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +943 -33
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +3 -2
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +3 -2
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +8 -8
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +8 -8
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +640 -34
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +640 -34
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +1323 -301
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +1323 -301
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +718 -90
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +718 -90
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +9 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +9 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +2 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +2 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/search.d.mts +6 -31
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +6 -31
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +6 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +6 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +1 -1
- package/resources/tags.d.ts +1 -1
- package/resources/usages.d.mts +401 -16
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +401 -16
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +2738 -101
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +2738 -101
- package/resources/workflows.d.ts.map +1 -1
- package/src/client.ts +102 -44
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +8 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/request-options.ts +2 -0
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/lib/generate.ts +77 -0
- package/src/lib/job.ts +78 -0
- package/src/lib/models.ts +27 -0
- package/src/lib/scenario.ts +39 -0
- package/src/lib/workflow.ts +90 -0
- package/src/resources/assets/assets.ts +742 -212
- package/src/resources/assets/index.ts +0 -1
- package/src/resources/assets/public.ts +151 -29
- package/src/resources/collections/assets.ts +2 -14
- package/src/resources/collections/collections.ts +3 -5
- package/src/resources/collections/index.ts +2 -14
- package/src/resources/collections/models.ts +2 -14
- package/src/resources/generate.ts +6254 -2217
- package/src/resources/index.ts +2 -3
- package/src/resources/jobs.ts +1355 -26
- package/src/resources/models/description.ts +50 -8
- package/src/resources/models/examples.ts +906 -56
- package/src/resources/models/models.ts +1867 -330
- package/src/resources/models/train.ts +976 -98
- package/src/resources/models/training-images.ts +2 -2
- package/src/resources/search.ts +13 -39
- package/src/resources/tags.ts +1 -1
- package/src/resources/usages.ts +544 -11
- package/src/resources/workflows.ts +4586 -914
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -5,7 +5,7 @@ export declare class Train extends APIResource {
|
|
|
5
5
|
/**
|
|
6
6
|
* Trigger an action on a model training: cancel
|
|
7
7
|
*/
|
|
8
|
-
action(modelID: string,
|
|
8
|
+
action(modelID: string, params: TrainActionParams, options?: RequestOptions): APIPromise<TrainActionResponse>;
|
|
9
9
|
/**
|
|
10
10
|
* Trigger the given `modelId` training
|
|
11
11
|
*/
|
|
@@ -24,7 +24,7 @@ export declare namespace TrainActionResponse {
|
|
|
24
24
|
* List of model capabilities (example: ["txt2img", "img2img",
|
|
25
25
|
* "txt2img_ip_adapter", ...])
|
|
26
26
|
*/
|
|
27
|
-
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' | 'video2img' | 'video2video'>;
|
|
27
|
+
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'>;
|
|
28
28
|
/**
|
|
29
29
|
* A list of CollectionId this model belongs to
|
|
30
30
|
*/
|
|
@@ -65,7 +65,7 @@ export declare namespace TrainActionResponse {
|
|
|
65
65
|
/**
|
|
66
66
|
* The model type (example: "flux.1-lora")
|
|
67
67
|
*/
|
|
68
|
-
type: 'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora';
|
|
68
|
+
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';
|
|
69
69
|
/**
|
|
70
70
|
* The model last update date as an ISO string (example:
|
|
71
71
|
* "2023-02-03T11:19:41.579Z")
|
|
@@ -75,7 +75,7 @@ export declare namespace TrainActionResponse {
|
|
|
75
75
|
* The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
|
|
76
76
|
* 75: Team plan 100: Enterprise plan
|
|
77
77
|
*/
|
|
78
|
-
accessRestrictions?:
|
|
78
|
+
accessRestrictions?: 0 | 100 | 25 | 50 | 75;
|
|
79
79
|
/**
|
|
80
80
|
* The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
|
|
81
81
|
*/
|
|
@@ -84,10 +84,6 @@ export declare namespace TrainActionResponse {
|
|
|
84
84
|
* The class of the model
|
|
85
85
|
*/
|
|
86
86
|
class?: Model.Class;
|
|
87
|
-
/**
|
|
88
|
-
* Compliance and regulatory metadata for the model
|
|
89
|
-
*/
|
|
90
|
-
complianceMetadata?: Model.ComplianceMetadata;
|
|
91
87
|
/**
|
|
92
88
|
* List of base model IDs compliant with the model (example: ["flux.1-dev",
|
|
93
89
|
* "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
|
|
@@ -136,6 +132,10 @@ export declare namespace TrainActionResponse {
|
|
|
136
132
|
* The id of the parent model
|
|
137
133
|
*/
|
|
138
134
|
parentModelId?: string;
|
|
135
|
+
/**
|
|
136
|
+
* Aggregated performance stats
|
|
137
|
+
*/
|
|
138
|
+
performanceStats?: Model.PerformanceStats;
|
|
139
139
|
/**
|
|
140
140
|
* Fine-tune the model's inferences with prompt embedding
|
|
141
141
|
*/
|
|
@@ -218,31 +218,6 @@ export declare namespace TrainActionResponse {
|
|
|
218
218
|
*/
|
|
219
219
|
thumbnails: Array<string>;
|
|
220
220
|
}
|
|
221
|
-
/**
|
|
222
|
-
* Compliance and regulatory metadata for the model
|
|
223
|
-
*/
|
|
224
|
-
interface ComplianceMetadata {
|
|
225
|
-
/**
|
|
226
|
-
* Data processing comment (e.g., zeroRetention, temporaryRetention, etc.)
|
|
227
|
-
*/
|
|
228
|
-
dataProcessingComment?: 'researchOnly' | 'serviceImprovement' | 'temporaryRetention' | 'zeroRetention';
|
|
229
|
-
/**
|
|
230
|
-
* URL to license terms
|
|
231
|
-
*/
|
|
232
|
-
licenseTerms?: string;
|
|
233
|
-
/**
|
|
234
|
-
* The maintainer of the model
|
|
235
|
-
*/
|
|
236
|
-
maintainer?: 'Fal' | 'Provider' | 'Replicate' | 'Scenario';
|
|
237
|
-
/**
|
|
238
|
-
* The provider of the model (examples: 'Google', 'AWS', 'BFL', 'Meshy', etc.)
|
|
239
|
-
*/
|
|
240
|
-
modelProvider?: string;
|
|
241
|
-
/**
|
|
242
|
-
* The sub-processor used for the model
|
|
243
|
-
*/
|
|
244
|
-
subProcessor?: 'AWS' | 'Fal' | 'Modal' | 'Provider' | 'Replicate';
|
|
245
|
-
}
|
|
246
221
|
interface Concept {
|
|
247
222
|
/**
|
|
248
223
|
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
@@ -316,6 +291,10 @@ export declare namespace TrainActionResponse {
|
|
|
316
291
|
* Whether this input affects the model's cost calculation
|
|
317
292
|
*/
|
|
318
293
|
costImpact?: boolean;
|
|
294
|
+
/**
|
|
295
|
+
* The default value for the input
|
|
296
|
+
*/
|
|
297
|
+
default?: unknown;
|
|
319
298
|
/**
|
|
320
299
|
* Help text displayed in the UI to provide additional information about the input
|
|
321
300
|
*/
|
|
@@ -334,10 +313,14 @@ export declare namespace TrainActionResponse {
|
|
|
334
313
|
* the same as the current object. This is only available for type inputs_array
|
|
335
314
|
* inputs.
|
|
336
315
|
*/
|
|
337
|
-
inputs?: Array<
|
|
316
|
+
inputs?: Array<{
|
|
317
|
+
[key: string]: unknown;
|
|
318
|
+
}>;
|
|
338
319
|
/**
|
|
339
320
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
340
|
-
* \`file_array\` input types.
|
|
321
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
322
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
323
|
+
* data:kind, prefix
|
|
341
324
|
*/
|
|
342
325
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
343
326
|
/**
|
|
@@ -358,6 +341,12 @@ export declare namespace TrainActionResponse {
|
|
|
358
341
|
* \`string_array\`.
|
|
359
342
|
*/
|
|
360
343
|
maxLength?: number;
|
|
344
|
+
/**
|
|
345
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
346
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
347
|
+
* creation time.
|
|
348
|
+
*/
|
|
349
|
+
maxSize?: number;
|
|
361
350
|
/**
|
|
362
351
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
363
352
|
*/
|
|
@@ -371,7 +360,7 @@ export declare namespace TrainActionResponse {
|
|
|
371
360
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
372
361
|
* available for \`model_array\` input type.
|
|
373
362
|
*/
|
|
374
|
-
modelTypes?: Array<'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
363
|
+
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'>;
|
|
375
364
|
/**
|
|
376
365
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
377
366
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -456,6 +445,12 @@ export declare namespace TrainActionResponse {
|
|
|
456
445
|
* The parameters of the model
|
|
457
446
|
*/
|
|
458
447
|
interface Parameters {
|
|
448
|
+
/**
|
|
449
|
+
* Age group of the voice (for professional cloning)
|
|
450
|
+
*
|
|
451
|
+
* Only available for ElevenLabs voice training
|
|
452
|
+
*/
|
|
453
|
+
age?: string;
|
|
459
454
|
/**
|
|
460
455
|
* The batch size Less steps, and will increase the learning rate
|
|
461
456
|
*
|
|
@@ -468,6 +463,13 @@ export declare namespace TrainActionResponse {
|
|
|
468
463
|
* Only available for SD15 training
|
|
469
464
|
*/
|
|
470
465
|
classPrompt?: string;
|
|
466
|
+
/**
|
|
467
|
+
* Type of voice cloning: "instant" (fast) or "professional" (higher quality,
|
|
468
|
+
* requires captcha)
|
|
469
|
+
*
|
|
470
|
+
* Only available for ElevenLabs voice training
|
|
471
|
+
*/
|
|
472
|
+
cloneType?: string;
|
|
471
473
|
/**
|
|
472
474
|
* The prompt with identifier specifying the instance (or subject) of the class
|
|
473
475
|
* (example: "a daiton dog")
|
|
@@ -479,6 +481,18 @@ export declare namespace TrainActionResponse {
|
|
|
479
481
|
* - For Flux: ""
|
|
480
482
|
*/
|
|
481
483
|
conceptPrompt?: string;
|
|
484
|
+
/**
|
|
485
|
+
* Gender of the voice (for professional cloning)
|
|
486
|
+
*
|
|
487
|
+
* Only available for ElevenLabs voice training
|
|
488
|
+
*/
|
|
489
|
+
gender?: string;
|
|
490
|
+
/**
|
|
491
|
+
* Language of the audio samples (ISO 639-1 code)
|
|
492
|
+
*
|
|
493
|
+
* Only available for ElevenLabs voice training
|
|
494
|
+
*/
|
|
495
|
+
language?: string;
|
|
482
496
|
/**
|
|
483
497
|
* Initial learning rate (after the potential warmup period)
|
|
484
498
|
*
|
|
@@ -593,14 +607,25 @@ export declare namespace TrainActionResponse {
|
|
|
593
607
|
/**
|
|
594
608
|
* The dimension of the LoRA update matrices
|
|
595
609
|
*
|
|
596
|
-
* Only available for SDXL
|
|
610
|
+
* Only available for SDXL (deprecated), Flux LoRA and Musubi training
|
|
597
611
|
*
|
|
598
612
|
* Default value varies depending on the model type:
|
|
599
613
|
*
|
|
600
|
-
* - For SDXL: 64
|
|
614
|
+
* - For SDXL (deprecated): 64
|
|
601
615
|
* - For Flux: 16
|
|
616
|
+
* - For Musubi: 64
|
|
617
|
+
*
|
|
618
|
+
* Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
|
|
619
|
+
* 128])
|
|
602
620
|
*/
|
|
603
621
|
rank?: number;
|
|
622
|
+
/**
|
|
623
|
+
* Whether to remove background noise from audio samples before cloning. When
|
|
624
|
+
* enabled, each sample must be at least 5 seconds long.
|
|
625
|
+
*
|
|
626
|
+
* Only available for ElevenLabs voice training
|
|
627
|
+
*/
|
|
628
|
+
removeBackgroundNoise?: boolean;
|
|
604
629
|
/**
|
|
605
630
|
* The prompts to use for each epoch Only available for Flux LoRA training
|
|
606
631
|
*/
|
|
@@ -647,11 +672,124 @@ export declare namespace TrainActionResponse {
|
|
|
647
672
|
* Only available for SD15 and SDXL LoRA training
|
|
648
673
|
*/
|
|
649
674
|
validationPrompt?: string;
|
|
675
|
+
/**
|
|
676
|
+
* Description of the voice characteristics
|
|
677
|
+
*
|
|
678
|
+
* Only available for ElevenLabs voice training
|
|
679
|
+
*/
|
|
680
|
+
voiceDescription?: string;
|
|
650
681
|
/**
|
|
651
682
|
* The Weights And Bias key to use for logging. The maximum length is 40 characters
|
|
652
683
|
*/
|
|
653
684
|
wandbKey?: string;
|
|
654
685
|
}
|
|
686
|
+
/**
|
|
687
|
+
* Aggregated performance stats
|
|
688
|
+
*/
|
|
689
|
+
interface PerformanceStats {
|
|
690
|
+
/**
|
|
691
|
+
* Performance metrics per variant
|
|
692
|
+
*/
|
|
693
|
+
variants: Array<PerformanceStats.Variant>;
|
|
694
|
+
/**
|
|
695
|
+
* Default variant key for quick model comparison
|
|
696
|
+
*/
|
|
697
|
+
default?: string;
|
|
698
|
+
}
|
|
699
|
+
namespace PerformanceStats {
|
|
700
|
+
/**
|
|
701
|
+
* Performance stats for a model variant
|
|
702
|
+
*/
|
|
703
|
+
interface Variant {
|
|
704
|
+
/**
|
|
705
|
+
* The generation capability (example: "txt2img", "img2video", "txt2audio")
|
|
706
|
+
*/
|
|
707
|
+
capability: string;
|
|
708
|
+
/**
|
|
709
|
+
* When these stats were last computed (ISO date)
|
|
710
|
+
*/
|
|
711
|
+
computedAt: string;
|
|
712
|
+
/**
|
|
713
|
+
* Maximum cost per output asset (CU)
|
|
714
|
+
*/
|
|
715
|
+
costPerAssetMaxCU: number;
|
|
716
|
+
/**
|
|
717
|
+
* Minimum cost per output asset (CU)
|
|
718
|
+
*/
|
|
719
|
+
costPerAssetMinCU: number;
|
|
720
|
+
/**
|
|
721
|
+
* Median cost per output asset (CU)
|
|
722
|
+
*/
|
|
723
|
+
costPerAssetP50CU: number;
|
|
724
|
+
/**
|
|
725
|
+
* Inference latency P50 per output asset (seconds)
|
|
726
|
+
*/
|
|
727
|
+
inferenceLatencyP50Sec: number;
|
|
728
|
+
/**
|
|
729
|
+
* Inference latency P75 per output asset (seconds)
|
|
730
|
+
*/
|
|
731
|
+
inferenceLatencyP75Sec: number;
|
|
732
|
+
/**
|
|
733
|
+
* Total latency P50 per output asset, including queue time (seconds)
|
|
734
|
+
*/
|
|
735
|
+
totalLatencyP50Sec: number;
|
|
736
|
+
/**
|
|
737
|
+
* Total latency P75 per output asset, including queue time (seconds)
|
|
738
|
+
*/
|
|
739
|
+
totalLatencyP75Sec: number;
|
|
740
|
+
/**
|
|
741
|
+
* Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
|
|
742
|
+
*/
|
|
743
|
+
variantKey: string;
|
|
744
|
+
/**
|
|
745
|
+
* External quality score from arena.ai leaderboard
|
|
746
|
+
*/
|
|
747
|
+
arenaScore?: Variant.ArenaScore;
|
|
748
|
+
/**
|
|
749
|
+
* The resolution bucket (example: "0.5K", "1K", "2K", "4K")
|
|
750
|
+
*/
|
|
751
|
+
resolution?: string;
|
|
752
|
+
}
|
|
753
|
+
namespace Variant {
|
|
754
|
+
/**
|
|
755
|
+
* External quality score from arena.ai leaderboard
|
|
756
|
+
*/
|
|
757
|
+
interface ArenaScore {
|
|
758
|
+
/**
|
|
759
|
+
* Arena category (example: "text_to_image", "image_to_video")
|
|
760
|
+
*/
|
|
761
|
+
arenaCategory: string;
|
|
762
|
+
/**
|
|
763
|
+
* Model name on arena.ai
|
|
764
|
+
*/
|
|
765
|
+
arenaModelName: string;
|
|
766
|
+
/**
|
|
767
|
+
* When this score was last fetched (ISO date)
|
|
768
|
+
*/
|
|
769
|
+
fetchedAt: string;
|
|
770
|
+
/**
|
|
771
|
+
* Rank in the arena category
|
|
772
|
+
*/
|
|
773
|
+
rank: number;
|
|
774
|
+
/**
|
|
775
|
+
* ELO rating
|
|
776
|
+
*/
|
|
777
|
+
rating: number;
|
|
778
|
+
/**
|
|
779
|
+
* ELO rating confidence interval lower bound
|
|
780
|
+
*/
|
|
781
|
+
ratingLower: number;
|
|
782
|
+
/**
|
|
783
|
+
* ELO rating confidence interval upper bound
|
|
784
|
+
*/
|
|
785
|
+
ratingUpper: number;
|
|
786
|
+
/**
|
|
787
|
+
* Number of human votes
|
|
788
|
+
*/
|
|
789
|
+
votes: number;
|
|
790
|
+
}
|
|
791
|
+
}
|
|
792
|
+
}
|
|
655
793
|
/**
|
|
656
794
|
* A thumbnail for your model
|
|
657
795
|
*/
|
|
@@ -714,7 +852,7 @@ export declare namespace TrainActionResponse {
|
|
|
714
852
|
/**
|
|
715
853
|
* The stage of the request
|
|
716
854
|
*/
|
|
717
|
-
stage: 'pending' | 'queued-for-train' | 'running-train' | 'starting-train';
|
|
855
|
+
stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'running-train' | 'starting-train';
|
|
718
856
|
/**
|
|
719
857
|
* Timestamp in milliseconds of the last time the training progress was updated
|
|
720
858
|
*/
|
|
@@ -896,7 +1034,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
896
1034
|
/**
|
|
897
1035
|
* The type of job
|
|
898
1036
|
*/
|
|
899
|
-
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
1037
|
+
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'musubi-model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
900
1038
|
/**
|
|
901
1039
|
* Metadata of the job with some additional information
|
|
902
1040
|
*/
|
|
@@ -940,18 +1078,36 @@ export declare namespace TrainTriggerResponse {
|
|
|
940
1078
|
* List of produced assets for this job
|
|
941
1079
|
*/
|
|
942
1080
|
assetIds?: Array<string>;
|
|
1081
|
+
/**
|
|
1082
|
+
* Eventual error for the job
|
|
1083
|
+
*/
|
|
1084
|
+
error?: string | null;
|
|
943
1085
|
/**
|
|
944
1086
|
* The flow of the job. Only available for workflow jobs.
|
|
945
1087
|
*/
|
|
946
1088
|
flow?: Array<Metadata.Flow>;
|
|
1089
|
+
/**
|
|
1090
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
1091
|
+
*/
|
|
1092
|
+
hint?: string;
|
|
947
1093
|
/**
|
|
948
1094
|
* The inputs for the job
|
|
949
1095
|
*/
|
|
950
|
-
input?:
|
|
1096
|
+
input?: {
|
|
1097
|
+
[key: string]: unknown;
|
|
1098
|
+
};
|
|
1099
|
+
/**
|
|
1100
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
1101
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
1102
|
+
* results.
|
|
1103
|
+
*/
|
|
1104
|
+
output?: {
|
|
1105
|
+
[key: string]: unknown;
|
|
1106
|
+
};
|
|
951
1107
|
/**
|
|
952
|
-
*
|
|
1108
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
953
1109
|
*/
|
|
954
|
-
|
|
1110
|
+
outputModelId?: string;
|
|
955
1111
|
/**
|
|
956
1112
|
* The workflow ID of the job if job is part of a workflow.
|
|
957
1113
|
*/
|
|
@@ -974,20 +1130,45 @@ export declare namespace TrainTriggerResponse {
|
|
|
974
1130
|
/**
|
|
975
1131
|
* The type of the job for the node.
|
|
976
1132
|
*/
|
|
977
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
1133
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
978
1134
|
/**
|
|
979
1135
|
* List of produced assets for this node.
|
|
980
1136
|
*/
|
|
981
1137
|
assets?: Array<Flow.Asset>;
|
|
1138
|
+
/**
|
|
1139
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
1140
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
1141
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
1142
|
+
*/
|
|
1143
|
+
count?: number;
|
|
982
1144
|
/**
|
|
983
1145
|
* The nodes that this node depends on. Only available for nodes that have
|
|
984
1146
|
* dependencies. Mainly used for user approval nodes.
|
|
985
1147
|
*/
|
|
986
1148
|
dependsOn?: Array<string>;
|
|
1149
|
+
/**
|
|
1150
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
1151
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
1152
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
1153
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
1154
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
1155
|
+
*/
|
|
1156
|
+
includeOutputsInWorkflowJob?: true;
|
|
987
1157
|
/**
|
|
988
1158
|
* The inputs of the node.
|
|
989
1159
|
*/
|
|
990
1160
|
inputs?: Array<Flow.Input>;
|
|
1161
|
+
/**
|
|
1162
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
1163
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
1164
|
+
* numbers, or asset IDs.
|
|
1165
|
+
*/
|
|
1166
|
+
items?: Array<string>;
|
|
1167
|
+
/**
|
|
1168
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
1169
|
+
* dynamically-created copies of loop body nodes.
|
|
1170
|
+
*/
|
|
1171
|
+
iterationIndex?: number;
|
|
991
1172
|
/**
|
|
992
1173
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
993
1174
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -1002,10 +1183,25 @@ export declare namespace TrainTriggerResponse {
|
|
|
1002
1183
|
* The type of the logic for the node. Only available for logic nodes.
|
|
1003
1184
|
*/
|
|
1004
1185
|
logicType?: 'if-else';
|
|
1186
|
+
/**
|
|
1187
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
1188
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
1189
|
+
* for ForEach nodes.
|
|
1190
|
+
*/
|
|
1191
|
+
loopBodyNodeIds?: Array<string>;
|
|
1192
|
+
/**
|
|
1193
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
1194
|
+
* dynamically-created copies of loop body nodes.
|
|
1195
|
+
*/
|
|
1196
|
+
loopNodeId?: string;
|
|
1005
1197
|
/**
|
|
1006
1198
|
* The model id for the node. Mainly used for custom model tasks.
|
|
1007
1199
|
*/
|
|
1008
1200
|
modelId?: string;
|
|
1201
|
+
/**
|
|
1202
|
+
* The output of the node. Only available for logic nodes.
|
|
1203
|
+
*/
|
|
1204
|
+
output?: unknown;
|
|
1009
1205
|
/**
|
|
1010
1206
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
1011
1207
|
*/
|
|
@@ -1047,6 +1243,10 @@ export declare namespace TrainTriggerResponse {
|
|
|
1047
1243
|
* Whether this input affects the model's cost calculation
|
|
1048
1244
|
*/
|
|
1049
1245
|
costImpact?: boolean;
|
|
1246
|
+
/**
|
|
1247
|
+
* The default value for the input
|
|
1248
|
+
*/
|
|
1249
|
+
default?: unknown;
|
|
1050
1250
|
/**
|
|
1051
1251
|
* Help text displayed in the UI to provide additional information about the input
|
|
1052
1252
|
*/
|
|
@@ -1065,10 +1265,20 @@ export declare namespace TrainTriggerResponse {
|
|
|
1065
1265
|
* the same as the current object. This is only available for type inputs_array
|
|
1066
1266
|
* inputs.
|
|
1067
1267
|
*/
|
|
1068
|
-
inputs?: Array<
|
|
1268
|
+
inputs?: Array<{
|
|
1269
|
+
[key: string]: unknown;
|
|
1270
|
+
}>;
|
|
1271
|
+
/**
|
|
1272
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
1273
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
1274
|
+
* type.
|
|
1275
|
+
*/
|
|
1276
|
+
items?: Array<Array<Input.Item>>;
|
|
1069
1277
|
/**
|
|
1070
1278
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1071
|
-
* \`file_array\` input types.
|
|
1279
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1280
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1281
|
+
* data:kind, prefix
|
|
1072
1282
|
*/
|
|
1073
1283
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1074
1284
|
/**
|
|
@@ -1089,6 +1299,12 @@ export declare namespace TrainTriggerResponse {
|
|
|
1089
1299
|
* \`string_array\`.
|
|
1090
1300
|
*/
|
|
1091
1301
|
maxLength?: number;
|
|
1302
|
+
/**
|
|
1303
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1304
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1305
|
+
* creation time.
|
|
1306
|
+
*/
|
|
1307
|
+
maxSize?: number;
|
|
1092
1308
|
/**
|
|
1093
1309
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1094
1310
|
*/
|
|
@@ -1102,7 +1318,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
1102
1318
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1103
1319
|
* available for \`model_array\` input type.
|
|
1104
1320
|
*/
|
|
1105
|
-
modelTypes?: Array<'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
1321
|
+
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'>;
|
|
1106
1322
|
/**
|
|
1107
1323
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1108
1324
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -1146,8 +1362,232 @@ export declare namespace TrainTriggerResponse {
|
|
|
1146
1362
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1147
1363
|
*/
|
|
1148
1364
|
step?: number;
|
|
1365
|
+
/**
|
|
1366
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1367
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1368
|
+
*/
|
|
1369
|
+
value?: unknown;
|
|
1149
1370
|
}
|
|
1150
1371
|
namespace Input {
|
|
1372
|
+
/**
|
|
1373
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
1374
|
+
* recursive items field.
|
|
1375
|
+
*/
|
|
1376
|
+
interface Item {
|
|
1377
|
+
/**
|
|
1378
|
+
* The name that must be user to call the model through the API
|
|
1379
|
+
*/
|
|
1380
|
+
name: string;
|
|
1381
|
+
/**
|
|
1382
|
+
* The data type of the input
|
|
1383
|
+
*/
|
|
1384
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
1385
|
+
/**
|
|
1386
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
1387
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
1388
|
+
* dropdown.
|
|
1389
|
+
*/
|
|
1390
|
+
allowedValues?: Array<unknown>;
|
|
1391
|
+
/**
|
|
1392
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
1393
|
+
* \`file_array\` input types with kind \`image\`.
|
|
1394
|
+
*/
|
|
1395
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
1396
|
+
/**
|
|
1397
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
1398
|
+
*/
|
|
1399
|
+
color?: boolean;
|
|
1400
|
+
/**
|
|
1401
|
+
* Whether this input affects the model's cost calculation
|
|
1402
|
+
*/
|
|
1403
|
+
costImpact?: boolean;
|
|
1404
|
+
/**
|
|
1405
|
+
* The default value for the input
|
|
1406
|
+
*/
|
|
1407
|
+
default?: unknown;
|
|
1408
|
+
/**
|
|
1409
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
1410
|
+
*/
|
|
1411
|
+
description?: string;
|
|
1412
|
+
/**
|
|
1413
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
1414
|
+
* value appear consecutively in the UI.
|
|
1415
|
+
*/
|
|
1416
|
+
group?: string;
|
|
1417
|
+
/**
|
|
1418
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
1419
|
+
*/
|
|
1420
|
+
hint?: string;
|
|
1421
|
+
/**
|
|
1422
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
1423
|
+
* the same as the current object. This is only available for type inputs_array
|
|
1424
|
+
* inputs.
|
|
1425
|
+
*/
|
|
1426
|
+
inputs?: Array<{
|
|
1427
|
+
[key: string]: unknown;
|
|
1428
|
+
}>;
|
|
1429
|
+
/**
|
|
1430
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1431
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1432
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1433
|
+
* data:kind, prefix
|
|
1434
|
+
*/
|
|
1435
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1436
|
+
/**
|
|
1437
|
+
* The label displayed in the UI for this input
|
|
1438
|
+
*/
|
|
1439
|
+
label?: string;
|
|
1440
|
+
/**
|
|
1441
|
+
* The name of the file input field to use as the mask source
|
|
1442
|
+
*/
|
|
1443
|
+
maskFrom?: string;
|
|
1444
|
+
/**
|
|
1445
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
1446
|
+
* types.
|
|
1447
|
+
*/
|
|
1448
|
+
max?: number;
|
|
1449
|
+
/**
|
|
1450
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1451
|
+
* \`string_array\`.
|
|
1452
|
+
*/
|
|
1453
|
+
maxLength?: number;
|
|
1454
|
+
/**
|
|
1455
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1456
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1457
|
+
* creation time.
|
|
1458
|
+
*/
|
|
1459
|
+
maxSize?: number;
|
|
1460
|
+
/**
|
|
1461
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1462
|
+
*/
|
|
1463
|
+
min?: number;
|
|
1464
|
+
/**
|
|
1465
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
1466
|
+
* \`string_array\`.
|
|
1467
|
+
*/
|
|
1468
|
+
minLength?: number;
|
|
1469
|
+
/**
|
|
1470
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1471
|
+
* available for \`model_array\` input type.
|
|
1472
|
+
*/
|
|
1473
|
+
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'>;
|
|
1474
|
+
/**
|
|
1475
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1476
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
1477
|
+
*
|
|
1478
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1479
|
+
*/
|
|
1480
|
+
parent?: boolean;
|
|
1481
|
+
/**
|
|
1482
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
1483
|
+
*/
|
|
1484
|
+
placeholder?: string;
|
|
1485
|
+
/**
|
|
1486
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1487
|
+
* spark feature. Only available for \`string\` input type.
|
|
1488
|
+
*/
|
|
1489
|
+
prompt?: boolean;
|
|
1490
|
+
/**
|
|
1491
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1492
|
+
* type.
|
|
1493
|
+
*/
|
|
1494
|
+
promptSpark?: boolean;
|
|
1495
|
+
/**
|
|
1496
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1497
|
+
* least one of node or conditional.
|
|
1498
|
+
*/
|
|
1499
|
+
ref?: Item.Ref;
|
|
1500
|
+
/**
|
|
1501
|
+
* Set of rules that describes when this input is required:
|
|
1502
|
+
*
|
|
1503
|
+
* - \`always\`: Input is always required
|
|
1504
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1505
|
+
* defined
|
|
1506
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1507
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1508
|
+
* value
|
|
1509
|
+
*
|
|
1510
|
+
* By default, the input is not required.
|
|
1511
|
+
*/
|
|
1512
|
+
required?: Item.Required;
|
|
1513
|
+
/**
|
|
1514
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1515
|
+
*/
|
|
1516
|
+
step?: number;
|
|
1517
|
+
/**
|
|
1518
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1519
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1520
|
+
*/
|
|
1521
|
+
value?: unknown;
|
|
1522
|
+
}
|
|
1523
|
+
namespace Item {
|
|
1524
|
+
/**
|
|
1525
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1526
|
+
* least one of node or conditional.
|
|
1527
|
+
*/
|
|
1528
|
+
interface Ref {
|
|
1529
|
+
/**
|
|
1530
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1531
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1532
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1533
|
+
*/
|
|
1534
|
+
conditional?: Array<string>;
|
|
1535
|
+
/**
|
|
1536
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1537
|
+
*/
|
|
1538
|
+
equal?: string;
|
|
1539
|
+
/**
|
|
1540
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1541
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1542
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1543
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1544
|
+
*/
|
|
1545
|
+
name?: string;
|
|
1546
|
+
/**
|
|
1547
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1548
|
+
*/
|
|
1549
|
+
node?: string;
|
|
1550
|
+
}
|
|
1551
|
+
/**
|
|
1552
|
+
* Set of rules that describes when this input is required:
|
|
1553
|
+
*
|
|
1554
|
+
* - \`always\`: Input is always required
|
|
1555
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1556
|
+
* defined
|
|
1557
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1558
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1559
|
+
* value
|
|
1560
|
+
*
|
|
1561
|
+
* By default, the input is not required.
|
|
1562
|
+
*/
|
|
1563
|
+
interface Required {
|
|
1564
|
+
/**
|
|
1565
|
+
* Whether the input is always required
|
|
1566
|
+
*/
|
|
1567
|
+
always?: boolean;
|
|
1568
|
+
/**
|
|
1569
|
+
* Makes this input required when another input has a specific value:
|
|
1570
|
+
*
|
|
1571
|
+
* - Key: name of the input to check
|
|
1572
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1573
|
+
*/
|
|
1574
|
+
conditionalValues?: unknown;
|
|
1575
|
+
/**
|
|
1576
|
+
* Makes this input required when another input is defined:
|
|
1577
|
+
*
|
|
1578
|
+
* - Key: name of the input that must be defined
|
|
1579
|
+
* - Value: message to display when this input is required
|
|
1580
|
+
*/
|
|
1581
|
+
ifDefined?: unknown;
|
|
1582
|
+
/**
|
|
1583
|
+
* Makes this input required when another input is not defined:
|
|
1584
|
+
*
|
|
1585
|
+
* - Key: name of the input that must be undefined
|
|
1586
|
+
* - Value: message to display when this input is required
|
|
1587
|
+
*/
|
|
1588
|
+
ifNotDefined?: unknown;
|
|
1589
|
+
}
|
|
1590
|
+
}
|
|
1151
1591
|
/**
|
|
1152
1592
|
* The reference to another input or output of the same workflow. Must have at
|
|
1153
1593
|
* least one of node or conditional.
|
|
@@ -1262,7 +1702,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
1262
1702
|
* List of model capabilities (example: ["txt2img", "img2img",
|
|
1263
1703
|
* "txt2img_ip_adapter", ...])
|
|
1264
1704
|
*/
|
|
1265
|
-
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' | 'video2img' | 'video2video'>;
|
|
1705
|
+
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'>;
|
|
1266
1706
|
/**
|
|
1267
1707
|
* A list of CollectionId this model belongs to
|
|
1268
1708
|
*/
|
|
@@ -1303,7 +1743,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
1303
1743
|
/**
|
|
1304
1744
|
* The model type (example: "flux.1-lora")
|
|
1305
1745
|
*/
|
|
1306
|
-
type: 'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora';
|
|
1746
|
+
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';
|
|
1307
1747
|
/**
|
|
1308
1748
|
* The model last update date as an ISO string (example:
|
|
1309
1749
|
* "2023-02-03T11:19:41.579Z")
|
|
@@ -1313,7 +1753,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
1313
1753
|
* The access restrictions of the model 0: Free plan 25: Creator plan 50: Pro plan
|
|
1314
1754
|
* 75: Team plan 100: Enterprise plan
|
|
1315
1755
|
*/
|
|
1316
|
-
accessRestrictions?:
|
|
1756
|
+
accessRestrictions?: 0 | 100 | 25 | 50 | 75;
|
|
1317
1757
|
/**
|
|
1318
1758
|
* The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
|
|
1319
1759
|
*/
|
|
@@ -1322,10 +1762,6 @@ export declare namespace TrainTriggerResponse {
|
|
|
1322
1762
|
* The class of the model
|
|
1323
1763
|
*/
|
|
1324
1764
|
class?: Model.Class;
|
|
1325
|
-
/**
|
|
1326
|
-
* Compliance and regulatory metadata for the model
|
|
1327
|
-
*/
|
|
1328
|
-
complianceMetadata?: Model.ComplianceMetadata;
|
|
1329
1765
|
/**
|
|
1330
1766
|
* List of base model IDs compliant with the model (example: ["flux.1-dev",
|
|
1331
1767
|
* "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
|
|
@@ -1374,6 +1810,10 @@ export declare namespace TrainTriggerResponse {
|
|
|
1374
1810
|
* The id of the parent model
|
|
1375
1811
|
*/
|
|
1376
1812
|
parentModelId?: string;
|
|
1813
|
+
/**
|
|
1814
|
+
* Aggregated performance stats
|
|
1815
|
+
*/
|
|
1816
|
+
performanceStats?: Model.PerformanceStats;
|
|
1377
1817
|
/**
|
|
1378
1818
|
* Fine-tune the model's inferences with prompt embedding
|
|
1379
1819
|
*/
|
|
@@ -1456,31 +1896,6 @@ export declare namespace TrainTriggerResponse {
|
|
|
1456
1896
|
*/
|
|
1457
1897
|
thumbnails: Array<string>;
|
|
1458
1898
|
}
|
|
1459
|
-
/**
|
|
1460
|
-
* Compliance and regulatory metadata for the model
|
|
1461
|
-
*/
|
|
1462
|
-
interface ComplianceMetadata {
|
|
1463
|
-
/**
|
|
1464
|
-
* Data processing comment (e.g., zeroRetention, temporaryRetention, etc.)
|
|
1465
|
-
*/
|
|
1466
|
-
dataProcessingComment?: 'researchOnly' | 'serviceImprovement' | 'temporaryRetention' | 'zeroRetention';
|
|
1467
|
-
/**
|
|
1468
|
-
* URL to license terms
|
|
1469
|
-
*/
|
|
1470
|
-
licenseTerms?: string;
|
|
1471
|
-
/**
|
|
1472
|
-
* The maintainer of the model
|
|
1473
|
-
*/
|
|
1474
|
-
maintainer?: 'Fal' | 'Provider' | 'Replicate' | 'Scenario';
|
|
1475
|
-
/**
|
|
1476
|
-
* The provider of the model (examples: 'Google', 'AWS', 'BFL', 'Meshy', etc.)
|
|
1477
|
-
*/
|
|
1478
|
-
modelProvider?: string;
|
|
1479
|
-
/**
|
|
1480
|
-
* The sub-processor used for the model
|
|
1481
|
-
*/
|
|
1482
|
-
subProcessor?: 'AWS' | 'Fal' | 'Modal' | 'Provider' | 'Replicate';
|
|
1483
|
-
}
|
|
1484
1899
|
interface Concept {
|
|
1485
1900
|
/**
|
|
1486
1901
|
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
@@ -1554,6 +1969,10 @@ export declare namespace TrainTriggerResponse {
|
|
|
1554
1969
|
* Whether this input affects the model's cost calculation
|
|
1555
1970
|
*/
|
|
1556
1971
|
costImpact?: boolean;
|
|
1972
|
+
/**
|
|
1973
|
+
* The default value for the input
|
|
1974
|
+
*/
|
|
1975
|
+
default?: unknown;
|
|
1557
1976
|
/**
|
|
1558
1977
|
* Help text displayed in the UI to provide additional information about the input
|
|
1559
1978
|
*/
|
|
@@ -1572,10 +1991,14 @@ export declare namespace TrainTriggerResponse {
|
|
|
1572
1991
|
* the same as the current object. This is only available for type inputs_array
|
|
1573
1992
|
* inputs.
|
|
1574
1993
|
*/
|
|
1575
|
-
inputs?: Array<
|
|
1994
|
+
inputs?: Array<{
|
|
1995
|
+
[key: string]: unknown;
|
|
1996
|
+
}>;
|
|
1576
1997
|
/**
|
|
1577
1998
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1578
|
-
* \`file_array\` input types.
|
|
1999
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
2000
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
2001
|
+
* data:kind, prefix
|
|
1579
2002
|
*/
|
|
1580
2003
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1581
2004
|
/**
|
|
@@ -1596,6 +2019,12 @@ export declare namespace TrainTriggerResponse {
|
|
|
1596
2019
|
* \`string_array\`.
|
|
1597
2020
|
*/
|
|
1598
2021
|
maxLength?: number;
|
|
2022
|
+
/**
|
|
2023
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
2024
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
2025
|
+
* creation time.
|
|
2026
|
+
*/
|
|
2027
|
+
maxSize?: number;
|
|
1599
2028
|
/**
|
|
1600
2029
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1601
2030
|
*/
|
|
@@ -1609,7 +2038,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
1609
2038
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1610
2039
|
* available for \`model_array\` input type.
|
|
1611
2040
|
*/
|
|
1612
|
-
modelTypes?: Array<'custom' | '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' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
2041
|
+
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'>;
|
|
1613
2042
|
/**
|
|
1614
2043
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1615
2044
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -1694,6 +2123,12 @@ export declare namespace TrainTriggerResponse {
|
|
|
1694
2123
|
* The parameters of the model
|
|
1695
2124
|
*/
|
|
1696
2125
|
interface Parameters {
|
|
2126
|
+
/**
|
|
2127
|
+
* Age group of the voice (for professional cloning)
|
|
2128
|
+
*
|
|
2129
|
+
* Only available for ElevenLabs voice training
|
|
2130
|
+
*/
|
|
2131
|
+
age?: string;
|
|
1697
2132
|
/**
|
|
1698
2133
|
* The batch size Less steps, and will increase the learning rate
|
|
1699
2134
|
*
|
|
@@ -1706,6 +2141,13 @@ export declare namespace TrainTriggerResponse {
|
|
|
1706
2141
|
* Only available for SD15 training
|
|
1707
2142
|
*/
|
|
1708
2143
|
classPrompt?: string;
|
|
2144
|
+
/**
|
|
2145
|
+
* Type of voice cloning: "instant" (fast) or "professional" (higher quality,
|
|
2146
|
+
* requires captcha)
|
|
2147
|
+
*
|
|
2148
|
+
* Only available for ElevenLabs voice training
|
|
2149
|
+
*/
|
|
2150
|
+
cloneType?: string;
|
|
1709
2151
|
/**
|
|
1710
2152
|
* The prompt with identifier specifying the instance (or subject) of the class
|
|
1711
2153
|
* (example: "a daiton dog")
|
|
@@ -1717,6 +2159,18 @@ export declare namespace TrainTriggerResponse {
|
|
|
1717
2159
|
* - For Flux: ""
|
|
1718
2160
|
*/
|
|
1719
2161
|
conceptPrompt?: string;
|
|
2162
|
+
/**
|
|
2163
|
+
* Gender of the voice (for professional cloning)
|
|
2164
|
+
*
|
|
2165
|
+
* Only available for ElevenLabs voice training
|
|
2166
|
+
*/
|
|
2167
|
+
gender?: string;
|
|
2168
|
+
/**
|
|
2169
|
+
* Language of the audio samples (ISO 639-1 code)
|
|
2170
|
+
*
|
|
2171
|
+
* Only available for ElevenLabs voice training
|
|
2172
|
+
*/
|
|
2173
|
+
language?: string;
|
|
1720
2174
|
/**
|
|
1721
2175
|
* Initial learning rate (after the potential warmup period)
|
|
1722
2176
|
*
|
|
@@ -1831,14 +2285,25 @@ export declare namespace TrainTriggerResponse {
|
|
|
1831
2285
|
/**
|
|
1832
2286
|
* The dimension of the LoRA update matrices
|
|
1833
2287
|
*
|
|
1834
|
-
* Only available for SDXL
|
|
2288
|
+
* Only available for SDXL (deprecated), Flux LoRA and Musubi training
|
|
1835
2289
|
*
|
|
1836
2290
|
* Default value varies depending on the model type:
|
|
1837
2291
|
*
|
|
1838
|
-
* - For SDXL: 64
|
|
2292
|
+
* - For SDXL (deprecated): 64
|
|
1839
2293
|
* - For Flux: 16
|
|
2294
|
+
* - For Musubi: 64
|
|
2295
|
+
*
|
|
2296
|
+
* Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
|
|
2297
|
+
* 128])
|
|
1840
2298
|
*/
|
|
1841
2299
|
rank?: number;
|
|
2300
|
+
/**
|
|
2301
|
+
* Whether to remove background noise from audio samples before cloning. When
|
|
2302
|
+
* enabled, each sample must be at least 5 seconds long.
|
|
2303
|
+
*
|
|
2304
|
+
* Only available for ElevenLabs voice training
|
|
2305
|
+
*/
|
|
2306
|
+
removeBackgroundNoise?: boolean;
|
|
1842
2307
|
/**
|
|
1843
2308
|
* The prompts to use for each epoch Only available for Flux LoRA training
|
|
1844
2309
|
*/
|
|
@@ -1885,11 +2350,124 @@ export declare namespace TrainTriggerResponse {
|
|
|
1885
2350
|
* Only available for SD15 and SDXL LoRA training
|
|
1886
2351
|
*/
|
|
1887
2352
|
validationPrompt?: string;
|
|
2353
|
+
/**
|
|
2354
|
+
* Description of the voice characteristics
|
|
2355
|
+
*
|
|
2356
|
+
* Only available for ElevenLabs voice training
|
|
2357
|
+
*/
|
|
2358
|
+
voiceDescription?: string;
|
|
1888
2359
|
/**
|
|
1889
2360
|
* The Weights And Bias key to use for logging. The maximum length is 40 characters
|
|
1890
2361
|
*/
|
|
1891
2362
|
wandbKey?: string;
|
|
1892
2363
|
}
|
|
2364
|
+
/**
|
|
2365
|
+
* Aggregated performance stats
|
|
2366
|
+
*/
|
|
2367
|
+
interface PerformanceStats {
|
|
2368
|
+
/**
|
|
2369
|
+
* Performance metrics per variant
|
|
2370
|
+
*/
|
|
2371
|
+
variants: Array<PerformanceStats.Variant>;
|
|
2372
|
+
/**
|
|
2373
|
+
* Default variant key for quick model comparison
|
|
2374
|
+
*/
|
|
2375
|
+
default?: string;
|
|
2376
|
+
}
|
|
2377
|
+
namespace PerformanceStats {
|
|
2378
|
+
/**
|
|
2379
|
+
* Performance stats for a model variant
|
|
2380
|
+
*/
|
|
2381
|
+
interface Variant {
|
|
2382
|
+
/**
|
|
2383
|
+
* The generation capability (example: "txt2img", "img2video", "txt2audio")
|
|
2384
|
+
*/
|
|
2385
|
+
capability: string;
|
|
2386
|
+
/**
|
|
2387
|
+
* When these stats were last computed (ISO date)
|
|
2388
|
+
*/
|
|
2389
|
+
computedAt: string;
|
|
2390
|
+
/**
|
|
2391
|
+
* Maximum cost per output asset (CU)
|
|
2392
|
+
*/
|
|
2393
|
+
costPerAssetMaxCU: number;
|
|
2394
|
+
/**
|
|
2395
|
+
* Minimum cost per output asset (CU)
|
|
2396
|
+
*/
|
|
2397
|
+
costPerAssetMinCU: number;
|
|
2398
|
+
/**
|
|
2399
|
+
* Median cost per output asset (CU)
|
|
2400
|
+
*/
|
|
2401
|
+
costPerAssetP50CU: number;
|
|
2402
|
+
/**
|
|
2403
|
+
* Inference latency P50 per output asset (seconds)
|
|
2404
|
+
*/
|
|
2405
|
+
inferenceLatencyP50Sec: number;
|
|
2406
|
+
/**
|
|
2407
|
+
* Inference latency P75 per output asset (seconds)
|
|
2408
|
+
*/
|
|
2409
|
+
inferenceLatencyP75Sec: number;
|
|
2410
|
+
/**
|
|
2411
|
+
* Total latency P50 per output asset, including queue time (seconds)
|
|
2412
|
+
*/
|
|
2413
|
+
totalLatencyP50Sec: number;
|
|
2414
|
+
/**
|
|
2415
|
+
* Total latency P75 per output asset, including queue time (seconds)
|
|
2416
|
+
*/
|
|
2417
|
+
totalLatencyP75Sec: number;
|
|
2418
|
+
/**
|
|
2419
|
+
* Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
|
|
2420
|
+
*/
|
|
2421
|
+
variantKey: string;
|
|
2422
|
+
/**
|
|
2423
|
+
* External quality score from arena.ai leaderboard
|
|
2424
|
+
*/
|
|
2425
|
+
arenaScore?: Variant.ArenaScore;
|
|
2426
|
+
/**
|
|
2427
|
+
* The resolution bucket (example: "0.5K", "1K", "2K", "4K")
|
|
2428
|
+
*/
|
|
2429
|
+
resolution?: string;
|
|
2430
|
+
}
|
|
2431
|
+
namespace Variant {
|
|
2432
|
+
/**
|
|
2433
|
+
* External quality score from arena.ai leaderboard
|
|
2434
|
+
*/
|
|
2435
|
+
interface ArenaScore {
|
|
2436
|
+
/**
|
|
2437
|
+
* Arena category (example: "text_to_image", "image_to_video")
|
|
2438
|
+
*/
|
|
2439
|
+
arenaCategory: string;
|
|
2440
|
+
/**
|
|
2441
|
+
* Model name on arena.ai
|
|
2442
|
+
*/
|
|
2443
|
+
arenaModelName: string;
|
|
2444
|
+
/**
|
|
2445
|
+
* When this score was last fetched (ISO date)
|
|
2446
|
+
*/
|
|
2447
|
+
fetchedAt: string;
|
|
2448
|
+
/**
|
|
2449
|
+
* Rank in the arena category
|
|
2450
|
+
*/
|
|
2451
|
+
rank: number;
|
|
2452
|
+
/**
|
|
2453
|
+
* ELO rating
|
|
2454
|
+
*/
|
|
2455
|
+
rating: number;
|
|
2456
|
+
/**
|
|
2457
|
+
* ELO rating confidence interval lower bound
|
|
2458
|
+
*/
|
|
2459
|
+
ratingLower: number;
|
|
2460
|
+
/**
|
|
2461
|
+
* ELO rating confidence interval upper bound
|
|
2462
|
+
*/
|
|
2463
|
+
ratingUpper: number;
|
|
2464
|
+
/**
|
|
2465
|
+
* Number of human votes
|
|
2466
|
+
*/
|
|
2467
|
+
votes: number;
|
|
2468
|
+
}
|
|
2469
|
+
}
|
|
2470
|
+
}
|
|
1893
2471
|
/**
|
|
1894
2472
|
* A thumbnail for your model
|
|
1895
2473
|
*/
|
|
@@ -1952,7 +2530,7 @@ export declare namespace TrainTriggerResponse {
|
|
|
1952
2530
|
/**
|
|
1953
2531
|
* The stage of the request
|
|
1954
2532
|
*/
|
|
1955
|
-
stage: 'pending' | 'queued-for-train' | 'running-train' | 'starting-train';
|
|
2533
|
+
stage: 'pending' | 'pending-captcha' | 'queued-for-train' | 'running-train' | 'starting-train';
|
|
1956
2534
|
/**
|
|
1957
2535
|
* Timestamp in milliseconds of the last time the training progress was updated
|
|
1958
2536
|
*/
|
|
@@ -2111,19 +2689,27 @@ export declare namespace TrainTriggerResponse {
|
|
|
2111
2689
|
}
|
|
2112
2690
|
export interface TrainActionParams {
|
|
2113
2691
|
/**
|
|
2114
|
-
* The action to perform on the model training
|
|
2692
|
+
* Body param: The action to perform on the model training
|
|
2115
2693
|
*/
|
|
2116
2694
|
action: 'cancel';
|
|
2695
|
+
/**
|
|
2696
|
+
* Query param: If set to true, returns the original asset without transformation
|
|
2697
|
+
*/
|
|
2698
|
+
originalAssets?: boolean;
|
|
2117
2699
|
}
|
|
2118
2700
|
export interface TrainTriggerParams {
|
|
2119
2701
|
/**
|
|
2120
2702
|
* Query param
|
|
2121
2703
|
*/
|
|
2122
|
-
dryRun?:
|
|
2704
|
+
dryRun?: unknown;
|
|
2123
2705
|
/**
|
|
2124
2706
|
* Query param: If set to true, returns the original asset without transformation
|
|
2125
2707
|
*/
|
|
2126
|
-
originalAssets?:
|
|
2708
|
+
originalAssets?: boolean;
|
|
2709
|
+
/**
|
|
2710
|
+
* Query param: Simulate the number of training images, used for dryRun purpose
|
|
2711
|
+
*/
|
|
2712
|
+
trainingImagesCount?: number;
|
|
2127
2713
|
/**
|
|
2128
2714
|
* Body param
|
|
2129
2715
|
*/
|
|
@@ -2131,6 +2717,12 @@ export interface TrainTriggerParams {
|
|
|
2131
2717
|
}
|
|
2132
2718
|
export declare namespace TrainTriggerParams {
|
|
2133
2719
|
interface Parameters {
|
|
2720
|
+
/**
|
|
2721
|
+
* Age group of the voice (for professional cloning)
|
|
2722
|
+
*
|
|
2723
|
+
* Only available for ElevenLabs voice training
|
|
2724
|
+
*/
|
|
2725
|
+
age?: string;
|
|
2134
2726
|
/**
|
|
2135
2727
|
* The batch size Less steps, and will increase the learning rate
|
|
2136
2728
|
*
|
|
@@ -2143,6 +2735,13 @@ export declare namespace TrainTriggerParams {
|
|
|
2143
2735
|
* Only available for SD15 training
|
|
2144
2736
|
*/
|
|
2145
2737
|
classPrompt?: string;
|
|
2738
|
+
/**
|
|
2739
|
+
* Type of voice cloning: "instant" (fast) or "professional" (higher quality,
|
|
2740
|
+
* requires captcha)
|
|
2741
|
+
*
|
|
2742
|
+
* Only available for ElevenLabs voice training
|
|
2743
|
+
*/
|
|
2744
|
+
cloneType?: string;
|
|
2146
2745
|
/**
|
|
2147
2746
|
* The prompt with identifier specifying the instance (or subject) of the class
|
|
2148
2747
|
* (example: "a daiton dog")
|
|
@@ -2154,6 +2753,18 @@ export declare namespace TrainTriggerParams {
|
|
|
2154
2753
|
* - For Flux: ""
|
|
2155
2754
|
*/
|
|
2156
2755
|
conceptPrompt?: string;
|
|
2756
|
+
/**
|
|
2757
|
+
* Gender of the voice (for professional cloning)
|
|
2758
|
+
*
|
|
2759
|
+
* Only available for ElevenLabs voice training
|
|
2760
|
+
*/
|
|
2761
|
+
gender?: string;
|
|
2762
|
+
/**
|
|
2763
|
+
* Language of the audio samples (ISO 639-1 code)
|
|
2764
|
+
*
|
|
2765
|
+
* Only available for ElevenLabs voice training
|
|
2766
|
+
*/
|
|
2767
|
+
language?: string;
|
|
2157
2768
|
/**
|
|
2158
2769
|
* Initial learning rate (after the potential warmup period)
|
|
2159
2770
|
*
|
|
@@ -2268,14 +2879,25 @@ export declare namespace TrainTriggerParams {
|
|
|
2268
2879
|
/**
|
|
2269
2880
|
* The dimension of the LoRA update matrices
|
|
2270
2881
|
*
|
|
2271
|
-
* Only available for SDXL
|
|
2882
|
+
* Only available for SDXL (deprecated), Flux LoRA and Musubi training
|
|
2272
2883
|
*
|
|
2273
2884
|
* Default value varies depending on the model type:
|
|
2274
2885
|
*
|
|
2275
|
-
* - For SDXL: 64
|
|
2886
|
+
* - For SDXL (deprecated): 64
|
|
2276
2887
|
* - For Flux: 16
|
|
2888
|
+
* - For Musubi: 64
|
|
2889
|
+
*
|
|
2890
|
+
* Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
|
|
2891
|
+
* 128])
|
|
2277
2892
|
*/
|
|
2278
2893
|
rank?: number;
|
|
2894
|
+
/**
|
|
2895
|
+
* Whether to remove background noise from audio samples before cloning. When
|
|
2896
|
+
* enabled, each sample must be at least 5 seconds long.
|
|
2897
|
+
*
|
|
2898
|
+
* Only available for ElevenLabs voice training
|
|
2899
|
+
*/
|
|
2900
|
+
removeBackgroundNoise?: boolean;
|
|
2279
2901
|
/**
|
|
2280
2902
|
* The prompts to use for each epoch Only available for Flux LoRA training
|
|
2281
2903
|
*/
|
|
@@ -2322,6 +2944,12 @@ export declare namespace TrainTriggerParams {
|
|
|
2322
2944
|
* Only available for SD15 and SDXL LoRA training
|
|
2323
2945
|
*/
|
|
2324
2946
|
validationPrompt?: string;
|
|
2947
|
+
/**
|
|
2948
|
+
* Description of the voice characteristics
|
|
2949
|
+
*
|
|
2950
|
+
* Only available for ElevenLabs voice training
|
|
2951
|
+
*/
|
|
2952
|
+
voiceDescription?: string;
|
|
2325
2953
|
/**
|
|
2326
2954
|
* The Weights And Bias key to use for logging. The maximum length is 40 characters
|
|
2327
2955
|
*/
|