@scenario-labs/sdk 3.3.0 → 3.4.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 +34 -0
- package/client.d.mts +4 -4
- package/client.d.mts.map +1 -1
- package/client.d.ts +4 -4
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/index.d.mts +1 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -1
- package/index.d.ts.map +1 -1
- package/index.js +2 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -1
- package/index.mjs.map +1 -1
- package/lib/asset.d.mts +1 -1
- package/lib/asset.d.ts +1 -1
- package/lib/asset.js +1 -1
- package/lib/asset.mjs +1 -1
- package/lib/upload.d.mts +10 -5
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +10 -5
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs.map +1 -1
- package/lib/user_selection_limits.d.mts +13 -0
- package/lib/user_selection_limits.d.mts.map +1 -0
- package/lib/user_selection_limits.d.ts +13 -0
- package/lib/user_selection_limits.d.ts.map +1 -0
- package/lib/user_selection_limits.js +16 -0
- package/lib/user_selection_limits.js.map +1 -0
- package/lib/user_selection_limits.mjs +13 -0
- package/lib/user_selection_limits.mjs.map +1 -0
- package/lib/workflow.d.mts +4 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +4 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +5 -1
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +5 -1
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_converter.d.mts +6 -0
- package/lib/workflow_converter.d.mts.map +1 -1
- package/lib/workflow_converter.d.ts +6 -0
- package/lib/workflow_converter.d.ts.map +1 -1
- package/lib/workflow_converter.js +155 -53
- package/lib/workflow_converter.js.map +1 -1
- package/lib/workflow_converter.mjs +155 -53
- package/lib/workflow_converter.mjs.map +1 -1
- package/lib/workflow_import_validator.d.mts +17 -2
- package/lib/workflow_import_validator.d.mts.map +1 -1
- package/lib/workflow_import_validator.d.ts +17 -2
- package/lib/workflow_import_validator.d.ts.map +1 -1
- package/lib/workflow_import_validator.js +100 -1
- package/lib/workflow_import_validator.js.map +1 -1
- package/lib/workflow_import_validator.mjs +99 -1
- package/lib/workflow_import_validator.mjs.map +1 -1
- package/lib/workflow_validator.d.mts +1 -1
- package/lib/workflow_validator.d.mts.map +1 -1
- package/lib/workflow_validator.d.ts +1 -1
- package/lib/workflow_validator.d.ts.map +1 -1
- package/lib/workflow_validator.js +10 -11
- package/lib/workflow_validator.js.map +1 -1
- package/lib/workflow_validator.mjs +7 -8
- package/lib/workflow_validator.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +126 -30
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +126 -30
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +12 -0
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +12 -0
- 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/generate.d.mts +120 -9
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +120 -9
- 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 +36 -0
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +36 -0
- package/resources/jobs.d.ts.map +1 -1
- package/resources/models/description.d.mts +4 -4
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +4 -4
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +40 -6
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +40 -6
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +1353 -199
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +1353 -199
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +13 -0
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +13 -0
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +36 -2
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +36 -2
- package/resources/models/train.d.ts.map +1 -1
- package/resources/recommendations.d.mts +16 -5
- package/resources/recommendations.d.mts.map +1 -1
- package/resources/recommendations.d.ts +16 -5
- package/resources/recommendations.d.ts.map +1 -1
- package/resources/usages.d.mts +14 -2
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +14 -2
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +152 -9
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +152 -9
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +2 -3
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +2 -3
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +8 -0
- package/src/index.ts +1 -0
- package/src/lib/asset.ts +1 -1
- package/src/lib/upload.ts +10 -5
- package/src/lib/user_selection_limits.ts +14 -0
- package/src/lib/workflow.ts +12 -1
- package/src/lib/workflow_converter.ts +176 -55
- package/src/lib/workflow_import_validator.ts +116 -1
- package/src/lib/workflow_validator.ts +12 -8
- package/src/resources/assets/assets.ts +164 -4
- package/src/resources/assets/index.ts +2 -0
- package/src/resources/generate.ts +142 -0
- package/src/resources/index.ts +4 -0
- package/src/resources/jobs.ts +42 -0
- package/src/resources/models/description.ts +6 -0
- package/src/resources/models/examples.ts +48 -0
- package/src/resources/models/index.ts +2 -0
- package/src/resources/models/models.ts +1610 -114
- package/src/resources/models/train.ts +42 -0
- package/src/resources/recommendations.ts +18 -3
- package/src/resources/usages.ts +16 -0
- package/src/resources/workflows.ts +176 -9
- 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
|
@@ -210,6 +210,24 @@ export class Models extends APIResource {
|
|
|
210
210
|
});
|
|
211
211
|
}
|
|
212
212
|
|
|
213
|
+
/**
|
|
214
|
+
* Restore a model deleted in the last 30 days, back to the status it had (an
|
|
215
|
+
* interrupted training comes back as `training-canceled`). Tags and collections
|
|
216
|
+
* are not restored. Max plan and above only. Returns 400 if the model is not
|
|
217
|
+
* deleted, and 410 if it was deleted more than 30 days ago or permanently.
|
|
218
|
+
*/
|
|
219
|
+
restore(
|
|
220
|
+
modelID: string,
|
|
221
|
+
params: ModelRestoreParams | null | undefined = {},
|
|
222
|
+
options?: RequestOptions,
|
|
223
|
+
): APIPromise<ModelRestoreResponse> {
|
|
224
|
+
const { originalAssets, projectId } = params ?? {};
|
|
225
|
+
return this._client.post(path`/models/${modelID}/restore`, {
|
|
226
|
+
...options,
|
|
227
|
+
query: { originalAssets, projectId, ...omitUndefined(options?.query) },
|
|
228
|
+
});
|
|
229
|
+
}
|
|
230
|
+
|
|
213
231
|
/**
|
|
214
232
|
* Transfer (with a copy or a full ownership change) a model to a new owner,
|
|
215
233
|
* including all of its training images
|
|
@@ -294,6 +312,7 @@ export namespace ModelCreateResponse {
|
|
|
294
312
|
| 'video23d'
|
|
295
313
|
| 'video2audio'
|
|
296
314
|
| 'video2img'
|
|
315
|
+
| 'video2txt'
|
|
297
316
|
| 'video2video'
|
|
298
317
|
>;
|
|
299
318
|
|
|
@@ -412,6 +431,12 @@ export namespace ModelCreateResponse {
|
|
|
412
431
|
*/
|
|
413
432
|
concepts?: Array<Model.Concept>;
|
|
414
433
|
|
|
434
|
+
/**
|
|
435
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
436
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
437
|
+
*/
|
|
438
|
+
deletedAt?: string;
|
|
439
|
+
|
|
415
440
|
/**
|
|
416
441
|
* When true, credits spent on a generation with this model are not automatically
|
|
417
442
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -754,6 +779,13 @@ export namespace ModelCreateResponse {
|
|
|
754
779
|
*/
|
|
755
780
|
min?: number;
|
|
756
781
|
|
|
782
|
+
/**
|
|
783
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
784
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
785
|
+
* \`asset.properties.duration\` at job creation time.
|
|
786
|
+
*/
|
|
787
|
+
minDuration?: number;
|
|
788
|
+
|
|
757
789
|
/**
|
|
758
790
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
759
791
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -1643,6 +1675,7 @@ export namespace ModelRetrieveResponse {
|
|
|
1643
1675
|
| 'video23d'
|
|
1644
1676
|
| 'video2audio'
|
|
1645
1677
|
| 'video2img'
|
|
1678
|
+
| 'video2txt'
|
|
1646
1679
|
| 'video2video'
|
|
1647
1680
|
>;
|
|
1648
1681
|
|
|
@@ -1761,6 +1794,12 @@ export namespace ModelRetrieveResponse {
|
|
|
1761
1794
|
*/
|
|
1762
1795
|
concepts?: Array<Model.Concept>;
|
|
1763
1796
|
|
|
1797
|
+
/**
|
|
1798
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
1799
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
1800
|
+
*/
|
|
1801
|
+
deletedAt?: string;
|
|
1802
|
+
|
|
1764
1803
|
/**
|
|
1765
1804
|
* When true, credits spent on a generation with this model are not automatically
|
|
1766
1805
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -2103,6 +2142,13 @@ export namespace ModelRetrieveResponse {
|
|
|
2103
2142
|
*/
|
|
2104
2143
|
min?: number;
|
|
2105
2144
|
|
|
2145
|
+
/**
|
|
2146
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
2147
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
2148
|
+
* \`asset.properties.duration\` at job creation time.
|
|
2149
|
+
*/
|
|
2150
|
+
minDuration?: number;
|
|
2151
|
+
|
|
2106
2152
|
/**
|
|
2107
2153
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
2108
2154
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -2992,6 +3038,7 @@ export namespace ModelUpdateResponse {
|
|
|
2992
3038
|
| 'video23d'
|
|
2993
3039
|
| 'video2audio'
|
|
2994
3040
|
| 'video2img'
|
|
3041
|
+
| 'video2txt'
|
|
2995
3042
|
| 'video2video'
|
|
2996
3043
|
>;
|
|
2997
3044
|
|
|
@@ -3110,6 +3157,12 @@ export namespace ModelUpdateResponse {
|
|
|
3110
3157
|
*/
|
|
3111
3158
|
concepts?: Array<Model.Concept>;
|
|
3112
3159
|
|
|
3160
|
+
/**
|
|
3161
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
3162
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
3163
|
+
*/
|
|
3164
|
+
deletedAt?: string;
|
|
3165
|
+
|
|
3113
3166
|
/**
|
|
3114
3167
|
* When true, credits spent on a generation with this model are not automatically
|
|
3115
3168
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -3452,6 +3505,13 @@ export namespace ModelUpdateResponse {
|
|
|
3452
3505
|
*/
|
|
3453
3506
|
min?: number;
|
|
3454
3507
|
|
|
3508
|
+
/**
|
|
3509
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
3510
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
3511
|
+
* \`asset.properties.duration\` at job creation time.
|
|
3512
|
+
*/
|
|
3513
|
+
minDuration?: number;
|
|
3514
|
+
|
|
3455
3515
|
/**
|
|
3456
3516
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
3457
3517
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -4336,6 +4396,7 @@ export interface ModelListResponse {
|
|
|
4336
4396
|
| 'video23d'
|
|
4337
4397
|
| 'video2audio'
|
|
4338
4398
|
| 'video2img'
|
|
4399
|
+
| 'video2txt'
|
|
4339
4400
|
| 'video2video'
|
|
4340
4401
|
>;
|
|
4341
4402
|
|
|
@@ -4454,6 +4515,12 @@ export interface ModelListResponse {
|
|
|
4454
4515
|
*/
|
|
4455
4516
|
concepts?: Array<ModelListResponse.Concept>;
|
|
4456
4517
|
|
|
4518
|
+
/**
|
|
4519
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
4520
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
4521
|
+
*/
|
|
4522
|
+
deletedAt?: string;
|
|
4523
|
+
|
|
4457
4524
|
/**
|
|
4458
4525
|
* When true, credits spent on a generation with this model are not automatically
|
|
4459
4526
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -4796,6 +4863,13 @@ export namespace ModelListResponse {
|
|
|
4796
4863
|
*/
|
|
4797
4864
|
min?: number;
|
|
4798
4865
|
|
|
4866
|
+
/**
|
|
4867
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
4868
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
4869
|
+
* \`asset.properties.duration\` at job creation time.
|
|
4870
|
+
*/
|
|
4871
|
+
minDuration?: number;
|
|
4872
|
+
|
|
4799
4873
|
/**
|
|
4800
4874
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
4801
4875
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -5686,6 +5760,7 @@ export namespace ModelCopyResponse {
|
|
|
5686
5760
|
| 'video23d'
|
|
5687
5761
|
| 'video2audio'
|
|
5688
5762
|
| 'video2img'
|
|
5763
|
+
| 'video2txt'
|
|
5689
5764
|
| 'video2video'
|
|
5690
5765
|
>;
|
|
5691
5766
|
|
|
@@ -5804,6 +5879,12 @@ export namespace ModelCopyResponse {
|
|
|
5804
5879
|
*/
|
|
5805
5880
|
concepts?: Array<Model.Concept>;
|
|
5806
5881
|
|
|
5882
|
+
/**
|
|
5883
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
5884
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
5885
|
+
*/
|
|
5886
|
+
deletedAt?: string;
|
|
5887
|
+
|
|
5807
5888
|
/**
|
|
5808
5889
|
* When true, credits spent on a generation with this model are not automatically
|
|
5809
5890
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -6146,6 +6227,13 @@ export namespace ModelCopyResponse {
|
|
|
6146
6227
|
*/
|
|
6147
6228
|
min?: number;
|
|
6148
6229
|
|
|
6230
|
+
/**
|
|
6231
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
6232
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
6233
|
+
* \`asset.properties.duration\` at job creation time.
|
|
6234
|
+
*/
|
|
6235
|
+
minDuration?: number;
|
|
6236
|
+
|
|
6149
6237
|
/**
|
|
6150
6238
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
6151
6239
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -7096,6 +7184,7 @@ export namespace ModelGetBulkResponse {
|
|
|
7096
7184
|
| 'video23d'
|
|
7097
7185
|
| 'video2audio'
|
|
7098
7186
|
| 'video2img'
|
|
7187
|
+
| 'video2txt'
|
|
7099
7188
|
| 'video2video'
|
|
7100
7189
|
>;
|
|
7101
7190
|
|
|
@@ -7131,6 +7220,12 @@ export namespace ModelGetBulkResponse {
|
|
|
7131
7220
|
*/
|
|
7132
7221
|
custom?: boolean;
|
|
7133
7222
|
|
|
7223
|
+
/**
|
|
7224
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
7225
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
7226
|
+
*/
|
|
7227
|
+
deletedAt?: string;
|
|
7228
|
+
|
|
7134
7229
|
/**
|
|
7135
7230
|
* When true, credits spent on a generation with this model are not automatically
|
|
7136
7231
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -7504,6 +7599,13 @@ export namespace ModelGetBulkResponse {
|
|
|
7504
7599
|
*/
|
|
7505
7600
|
min?: number;
|
|
7506
7601
|
|
|
7602
|
+
/**
|
|
7603
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
7604
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
7605
|
+
* \`asset.properties.duration\` at job creation time.
|
|
7606
|
+
*/
|
|
7607
|
+
minDuration?: number;
|
|
7608
|
+
|
|
7507
7609
|
/**
|
|
7508
7610
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
7509
7611
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -8345,11 +8447,11 @@ export namespace ModelGetBulkResponse {
|
|
|
8345
8447
|
}
|
|
8346
8448
|
}
|
|
8347
8449
|
|
|
8348
|
-
export interface
|
|
8349
|
-
model:
|
|
8450
|
+
export interface ModelRestoreResponse {
|
|
8451
|
+
model: ModelRestoreResponse.Model;
|
|
8350
8452
|
}
|
|
8351
8453
|
|
|
8352
|
-
export namespace
|
|
8454
|
+
export namespace ModelRestoreResponse {
|
|
8353
8455
|
export interface Model {
|
|
8354
8456
|
/**
|
|
8355
8457
|
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
@@ -8393,6 +8495,7 @@ export namespace ModelTransferResponse {
|
|
|
8393
8495
|
| 'video23d'
|
|
8394
8496
|
| 'video2audio'
|
|
8395
8497
|
| 'video2img'
|
|
8498
|
+
| 'video2txt'
|
|
8396
8499
|
| 'video2video'
|
|
8397
8500
|
>;
|
|
8398
8501
|
|
|
@@ -8511,6 +8614,12 @@ export namespace ModelTransferResponse {
|
|
|
8511
8614
|
*/
|
|
8512
8615
|
concepts?: Array<Model.Concept>;
|
|
8513
8616
|
|
|
8617
|
+
/**
|
|
8618
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
8619
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
8620
|
+
*/
|
|
8621
|
+
deletedAt?: string;
|
|
8622
|
+
|
|
8514
8623
|
/**
|
|
8515
8624
|
* When true, credits spent on a generation with this model are not automatically
|
|
8516
8625
|
* refunded if the generation fails. Absent or false means failed generations are
|
|
@@ -8853,6 +8962,13 @@ export namespace ModelTransferResponse {
|
|
|
8853
8962
|
*/
|
|
8854
8963
|
min?: number;
|
|
8855
8964
|
|
|
8965
|
+
/**
|
|
8966
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
8967
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
8968
|
+
* \`asset.properties.duration\` at job creation time.
|
|
8969
|
+
*/
|
|
8970
|
+
minDuration?: number;
|
|
8971
|
+
|
|
8856
8972
|
/**
|
|
8857
8973
|
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
8858
8974
|
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
@@ -9694,134 +9810,1497 @@ export namespace ModelTransferResponse {
|
|
|
9694
9810
|
}
|
|
9695
9811
|
}
|
|
9696
9812
|
|
|
9697
|
-
export interface
|
|
9698
|
-
|
|
9699
|
-
* The list of added tags
|
|
9700
|
-
*/
|
|
9701
|
-
added: Array<string>;
|
|
9702
|
-
|
|
9703
|
-
/**
|
|
9704
|
-
* The list of deleted tags
|
|
9705
|
-
*/
|
|
9706
|
-
deleted: Array<string>;
|
|
9813
|
+
export interface ModelTransferResponse {
|
|
9814
|
+
model: ModelTransferResponse.Model;
|
|
9707
9815
|
}
|
|
9708
9816
|
|
|
9709
|
-
export
|
|
9710
|
-
|
|
9711
|
-
|
|
9712
|
-
|
|
9713
|
-
|
|
9714
|
-
|
|
9715
|
-
/**
|
|
9716
|
-
* Query param: The projectId used for ownership resource management. Either to
|
|
9717
|
-
* assert ownership or to set the owner of the resource(s)
|
|
9718
|
-
*/
|
|
9719
|
-
projectId?: string;
|
|
9817
|
+
export namespace ModelTransferResponse {
|
|
9818
|
+
export interface Model {
|
|
9819
|
+
/**
|
|
9820
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
9821
|
+
*/
|
|
9822
|
+
id: string;
|
|
9720
9823
|
|
|
9721
|
-
|
|
9722
|
-
|
|
9723
|
-
|
|
9724
|
-
|
|
9725
|
-
|
|
9726
|
-
|
|
9727
|
-
|
|
9728
|
-
|
|
9824
|
+
/**
|
|
9825
|
+
* List of model capabilities (example: ["txt2img", "img2img",
|
|
9826
|
+
* "txt2img_ip_adapter", ...])
|
|
9827
|
+
*/
|
|
9828
|
+
capabilities: Array<
|
|
9829
|
+
| '3d23d'
|
|
9830
|
+
| 'audio2audio'
|
|
9831
|
+
| 'audio2txt'
|
|
9832
|
+
| 'audio2video'
|
|
9833
|
+
| 'controlnet'
|
|
9834
|
+
| 'controlnet_img2img'
|
|
9835
|
+
| 'controlnet_inpaint'
|
|
9836
|
+
| 'controlnet_inpaint_ip_adapter'
|
|
9837
|
+
| 'controlnet_ip_adapter'
|
|
9838
|
+
| 'controlnet_reference'
|
|
9839
|
+
| 'controlnet_texture'
|
|
9840
|
+
| 'img23d'
|
|
9841
|
+
| 'img2img'
|
|
9842
|
+
| 'img2img_ip_adapter'
|
|
9843
|
+
| 'img2img_texture'
|
|
9844
|
+
| 'img2txt'
|
|
9845
|
+
| 'img2video'
|
|
9846
|
+
| 'inpaint'
|
|
9847
|
+
| 'inpaint_ip_adapter'
|
|
9848
|
+
| 'outpaint'
|
|
9849
|
+
| 'reference'
|
|
9850
|
+
| 'reference_texture'
|
|
9851
|
+
| 'txt23d'
|
|
9852
|
+
| 'txt2audio'
|
|
9853
|
+
| 'txt2img'
|
|
9854
|
+
| 'txt2img_ip_adapter'
|
|
9855
|
+
| 'txt2img_texture'
|
|
9856
|
+
| 'txt2txt'
|
|
9857
|
+
| 'txt2video'
|
|
9858
|
+
| 'video23d'
|
|
9859
|
+
| 'video2audio'
|
|
9860
|
+
| 'video2img'
|
|
9861
|
+
| 'video2txt'
|
|
9862
|
+
| 'video2video'
|
|
9863
|
+
>;
|
|
9729
9864
|
|
|
9730
|
-
|
|
9731
|
-
|
|
9732
|
-
|
|
9733
|
-
|
|
9734
|
-
classSlug?: string;
|
|
9865
|
+
/**
|
|
9866
|
+
* A list of CollectionId this model belongs to
|
|
9867
|
+
*/
|
|
9868
|
+
collectionIds: Array<string>;
|
|
9735
9869
|
|
|
9736
|
-
|
|
9737
|
-
|
|
9738
|
-
|
|
9739
|
-
|
|
9870
|
+
/**
|
|
9871
|
+
* The model creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
9872
|
+
*/
|
|
9873
|
+
createdAt: string;
|
|
9740
9874
|
|
|
9741
|
-
|
|
9742
|
-
|
|
9743
|
-
|
|
9744
|
-
|
|
9745
|
-
|
|
9746
|
-
*/
|
|
9747
|
-
concepts?: Array<ModelCreateParams.Concept>;
|
|
9875
|
+
/**
|
|
9876
|
+
* Whether the model is a custom model and can be used only with POST
|
|
9877
|
+
* /generate/custom/{modelId} endpoint
|
|
9878
|
+
*/
|
|
9879
|
+
custom: boolean;
|
|
9748
9880
|
|
|
9749
|
-
|
|
9750
|
-
|
|
9751
|
-
|
|
9752
|
-
|
|
9753
|
-
* training based on training data.
|
|
9754
|
-
*/
|
|
9755
|
-
name?: string;
|
|
9881
|
+
/**
|
|
9882
|
+
* List of all example asset IDs setup by the model owner
|
|
9883
|
+
*/
|
|
9884
|
+
exampleAssetIds: Array<string>;
|
|
9756
9885
|
|
|
9757
|
-
|
|
9758
|
-
|
|
9759
|
-
|
|
9760
|
-
|
|
9761
|
-
* If not set, the model's short description will be automatically generated when
|
|
9762
|
-
* starting training based on training data.
|
|
9763
|
-
*/
|
|
9764
|
-
shortDescription?: string;
|
|
9886
|
+
/**
|
|
9887
|
+
* The privacy of the model (default: private)
|
|
9888
|
+
*/
|
|
9889
|
+
privacy: 'private' | 'public' | 'unlisted';
|
|
9765
9890
|
|
|
9766
|
-
|
|
9767
|
-
|
|
9768
|
-
|
|
9769
|
-
|
|
9770
|
-
*/
|
|
9771
|
-
type?:
|
|
9772
|
-
| 'custom'
|
|
9773
|
-
| 'elevenlabs-voice'
|
|
9774
|
-
| 'flux.1'
|
|
9775
|
-
| 'flux.1-composition'
|
|
9776
|
-
| 'flux.1-kontext-dev'
|
|
9777
|
-
| 'flux.1-kontext-lora'
|
|
9778
|
-
| 'flux.1-krea-dev'
|
|
9779
|
-
| 'flux.1-krea-lora'
|
|
9780
|
-
| 'flux.1-lora'
|
|
9781
|
-
| 'flux.1-pro'
|
|
9782
|
-
| 'flux.1.1-pro-ultra'
|
|
9783
|
-
| 'flux.2-dev-edit-lora'
|
|
9784
|
-
| 'flux.2-dev-lora'
|
|
9785
|
-
| 'flux.2-klein-4b-edit-lora'
|
|
9786
|
-
| 'flux.2-klein-4b-lora'
|
|
9787
|
-
| 'flux.2-klein-9b-edit-lora'
|
|
9788
|
-
| 'flux.2-klein-9b-lora'
|
|
9789
|
-
| 'flux.2-klein-base-4b-edit-lora'
|
|
9790
|
-
| 'flux.2-klein-base-4b-lora'
|
|
9791
|
-
| 'flux.2-klein-base-9b-edit-lora'
|
|
9792
|
-
| 'flux.2-klein-base-9b-lora'
|
|
9793
|
-
| 'flux1.1-pro'
|
|
9794
|
-
| 'gpt-image-1'
|
|
9795
|
-
| 'qwen-image-2512-lora'
|
|
9796
|
-
| 'qwen-image-edit-2509-lora'
|
|
9797
|
-
| 'qwen-image-edit-2511-lora'
|
|
9798
|
-
| 'qwen-image-edit-lora'
|
|
9799
|
-
| 'qwen-image-lora'
|
|
9800
|
-
| 'zimage-de-turbo-lora'
|
|
9801
|
-
| 'zimage-lora'
|
|
9802
|
-
| 'zimage-turbo-lora';
|
|
9803
|
-
}
|
|
9891
|
+
/**
|
|
9892
|
+
* The source of the model
|
|
9893
|
+
*/
|
|
9894
|
+
source: 'civitai' | 'huggingface' | 'other' | 'scenario';
|
|
9804
9895
|
|
|
9805
|
-
export namespace ModelCreateParams {
|
|
9806
|
-
export interface Concept {
|
|
9807
9896
|
/**
|
|
9808
|
-
* The model
|
|
9897
|
+
* The model status
|
|
9809
9898
|
*/
|
|
9810
|
-
|
|
9899
|
+
status: 'copying' | 'failed' | 'new' | 'trained' | 'training' | 'training-canceled';
|
|
9811
9900
|
|
|
9812
9901
|
/**
|
|
9813
|
-
* The
|
|
9814
|
-
* is between 0 and 2.
|
|
9902
|
+
* The associated tags (example: ["sci-fi", "landscape"])
|
|
9815
9903
|
*/
|
|
9816
|
-
|
|
9904
|
+
tags: Array<string>;
|
|
9817
9905
|
|
|
9818
9906
|
/**
|
|
9819
|
-
* The
|
|
9820
|
-
* models
|
|
9907
|
+
* The total number of training images
|
|
9821
9908
|
*/
|
|
9822
|
-
|
|
9823
|
-
|
|
9824
|
-
|
|
9909
|
+
trainingImagesNumber: number;
|
|
9910
|
+
|
|
9911
|
+
/**
|
|
9912
|
+
* The model type (example: "flux.1-lora")
|
|
9913
|
+
*/
|
|
9914
|
+
type:
|
|
9915
|
+
| 'custom'
|
|
9916
|
+
| 'elevenlabs-voice'
|
|
9917
|
+
| 'flux.1'
|
|
9918
|
+
| 'flux.1-composition'
|
|
9919
|
+
| 'flux.1-kontext-dev'
|
|
9920
|
+
| 'flux.1-kontext-lora'
|
|
9921
|
+
| 'flux.1-krea-dev'
|
|
9922
|
+
| 'flux.1-krea-lora'
|
|
9923
|
+
| 'flux.1-lora'
|
|
9924
|
+
| 'flux.1-pro'
|
|
9925
|
+
| 'flux.1.1-pro-ultra'
|
|
9926
|
+
| 'flux.2-dev-edit-lora'
|
|
9927
|
+
| 'flux.2-dev-lora'
|
|
9928
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
9929
|
+
| 'flux.2-klein-4b-lora'
|
|
9930
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
9931
|
+
| 'flux.2-klein-9b-lora'
|
|
9932
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
9933
|
+
| 'flux.2-klein-base-4b-lora'
|
|
9934
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
9935
|
+
| 'flux.2-klein-base-9b-lora'
|
|
9936
|
+
| 'flux1.1-pro'
|
|
9937
|
+
| 'gpt-image-1'
|
|
9938
|
+
| 'qwen-image-2512-lora'
|
|
9939
|
+
| 'qwen-image-edit-2509-lora'
|
|
9940
|
+
| 'qwen-image-edit-2511-lora'
|
|
9941
|
+
| 'qwen-image-edit-lora'
|
|
9942
|
+
| 'qwen-image-lora'
|
|
9943
|
+
| 'zimage-de-turbo-lora'
|
|
9944
|
+
| 'zimage-lora'
|
|
9945
|
+
| 'zimage-turbo-lora';
|
|
9946
|
+
|
|
9947
|
+
/**
|
|
9948
|
+
* The model last update date as an ISO string (example:
|
|
9949
|
+
* "2023-02-03T11:19:41.579Z")
|
|
9950
|
+
*/
|
|
9951
|
+
updatedAt: string;
|
|
9952
|
+
|
|
9953
|
+
/**
|
|
9954
|
+
* The access restrictions of the model 0: Free plan 25: Starter plan 50: Pro plan
|
|
9955
|
+
* 75: Max plan 100: Enterprise plan
|
|
9956
|
+
*/
|
|
9957
|
+
accessRestrictions?: 0 | 100 | 25 | 50 | 75;
|
|
9958
|
+
|
|
9959
|
+
/**
|
|
9960
|
+
* The author user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
|
|
9961
|
+
*/
|
|
9962
|
+
authorId?: string;
|
|
9963
|
+
|
|
9964
|
+
/**
|
|
9965
|
+
* The class of the model
|
|
9966
|
+
*/
|
|
9967
|
+
class?: Model.Class;
|
|
9968
|
+
|
|
9969
|
+
/**
|
|
9970
|
+
* List of base model IDs compliant with the model (example: ["flux.1-dev",
|
|
9971
|
+
* "flux.1-schnell"]) This attribute is mainly used for Flux LoRA models
|
|
9972
|
+
*/
|
|
9973
|
+
compliantModelIds?: Array<string>;
|
|
9974
|
+
|
|
9975
|
+
/**
|
|
9976
|
+
* The concepts is required for the type model: composition
|
|
9977
|
+
*/
|
|
9978
|
+
concepts?: Array<Model.Concept>;
|
|
9979
|
+
|
|
9980
|
+
/**
|
|
9981
|
+
* The model deletion date as an ISO string (example: "2023-02-03T11:19:41.579Z").
|
|
9982
|
+
* Only set on deleted models, listed with `status=deleted`.
|
|
9983
|
+
*/
|
|
9984
|
+
deletedAt?: string;
|
|
9985
|
+
|
|
9986
|
+
/**
|
|
9987
|
+
* When true, credits spent on a generation with this model are not automatically
|
|
9988
|
+
* refunded if the generation fails. Absent or false means failed generations are
|
|
9989
|
+
* refunded as usual.
|
|
9990
|
+
*/
|
|
9991
|
+
disableRefund?: boolean;
|
|
9992
|
+
|
|
9993
|
+
/**
|
|
9994
|
+
* The epoch of the model. Only available for Flux Lora Trained models. If not set,
|
|
9995
|
+
* uses the final model epoch (latest)
|
|
9996
|
+
*/
|
|
9997
|
+
epoch?: string;
|
|
9998
|
+
|
|
9999
|
+
/**
|
|
10000
|
+
* The epochs of the model. Only available for Flux Lora Trained models.
|
|
10001
|
+
*/
|
|
10002
|
+
epochs?: Array<Model.Epoch>;
|
|
10003
|
+
|
|
10004
|
+
/**
|
|
10005
|
+
* The inputs of the model. Only used for custom models. To retrieve this list, get
|
|
10006
|
+
* it by modelId with GET /models/{modelId}
|
|
10007
|
+
*/
|
|
10008
|
+
inputs?: Array<Model.Input>;
|
|
10009
|
+
|
|
10010
|
+
/**
|
|
10011
|
+
* The ID of the job that trained the model, returned to the model owner only
|
|
10012
|
+
* (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
10013
|
+
*/
|
|
10014
|
+
jobId?: string;
|
|
10015
|
+
|
|
10016
|
+
/**
|
|
10017
|
+
* The model keyword, this is a legacy parameter, please use conceptPrompt in
|
|
10018
|
+
* parameters
|
|
10019
|
+
*/
|
|
10020
|
+
modelKeyword?: string;
|
|
10021
|
+
|
|
10022
|
+
/**
|
|
10023
|
+
* The model name (example: "Cinematic Realism")
|
|
10024
|
+
*/
|
|
10025
|
+
name?: string;
|
|
10026
|
+
|
|
10027
|
+
/**
|
|
10028
|
+
* Fine-tune the model's inferences with negative prompt embedding
|
|
10029
|
+
*/
|
|
10030
|
+
negativePromptEmbedding?: string;
|
|
10031
|
+
|
|
10032
|
+
/**
|
|
10033
|
+
* The owner ID (example: "team_VFhihHKMRZyDDnZAJwLb2Q")
|
|
10034
|
+
*/
|
|
10035
|
+
ownerId?: string;
|
|
10036
|
+
|
|
10037
|
+
/**
|
|
10038
|
+
* The parameters of the model
|
|
10039
|
+
*/
|
|
10040
|
+
parameters?: Model.Parameters;
|
|
10041
|
+
|
|
10042
|
+
/**
|
|
10043
|
+
* The id of the parent model
|
|
10044
|
+
*/
|
|
10045
|
+
parentModelId?: string;
|
|
10046
|
+
|
|
10047
|
+
/**
|
|
10048
|
+
* Aggregated performance stats
|
|
10049
|
+
*/
|
|
10050
|
+
performanceStats?: Model.PerformanceStats;
|
|
10051
|
+
|
|
10052
|
+
/**
|
|
10053
|
+
* Fine-tune the model's inferences with prompt embedding
|
|
10054
|
+
*/
|
|
10055
|
+
promptEmbedding?: string;
|
|
10056
|
+
|
|
10057
|
+
/**
|
|
10058
|
+
* The model short description (example: "This model generates highly detailed
|
|
10059
|
+
* cinematic scenes.")
|
|
10060
|
+
*/
|
|
10061
|
+
shortDescription?: string;
|
|
10062
|
+
|
|
10063
|
+
/**
|
|
10064
|
+
* The date when the model will be soft deleted (only for Free plan)
|
|
10065
|
+
*/
|
|
10066
|
+
softDeletionOn?: string;
|
|
10067
|
+
|
|
10068
|
+
/**
|
|
10069
|
+
* A thumbnail for your model
|
|
10070
|
+
*/
|
|
10071
|
+
thumbnail?: Model.Thumbnail;
|
|
10072
|
+
|
|
10073
|
+
/**
|
|
10074
|
+
* Array of training image pairs
|
|
10075
|
+
*/
|
|
10076
|
+
trainingImagePairs?: Array<Model.TrainingImagePair>;
|
|
10077
|
+
|
|
10078
|
+
/**
|
|
10079
|
+
* The URLs of the first 3 training images of the model. To retrieve the full set
|
|
10080
|
+
* of images, get it by modelId
|
|
10081
|
+
*/
|
|
10082
|
+
trainingImages?: Array<Model.TrainingImage>;
|
|
10083
|
+
|
|
10084
|
+
/**
|
|
10085
|
+
* Additional information about the training progress of the model
|
|
10086
|
+
*/
|
|
10087
|
+
trainingProgress?: Model.TrainingProgress;
|
|
10088
|
+
|
|
10089
|
+
/**
|
|
10090
|
+
* Additional information about the model's training
|
|
10091
|
+
*/
|
|
10092
|
+
trainingStats?: Model.TrainingStats;
|
|
10093
|
+
|
|
10094
|
+
/**
|
|
10095
|
+
* The UI configuration for the model
|
|
10096
|
+
*/
|
|
10097
|
+
uiConfig?: Model.UiConfig;
|
|
10098
|
+
|
|
10099
|
+
/**
|
|
10100
|
+
* (Deprecated) The user ID (example: "user_VFhihHKMRZyDDnZAJwLb2Q")
|
|
10101
|
+
*/
|
|
10102
|
+
userId?: string;
|
|
10103
|
+
}
|
|
10104
|
+
|
|
10105
|
+
export namespace Model {
|
|
10106
|
+
/**
|
|
10107
|
+
* The class of the model
|
|
10108
|
+
*/
|
|
10109
|
+
export interface Class {
|
|
10110
|
+
/**
|
|
10111
|
+
* The category slug of the class (example: "art-style")
|
|
10112
|
+
*/
|
|
10113
|
+
category: string;
|
|
10114
|
+
|
|
10115
|
+
/**
|
|
10116
|
+
* The concept prompt of the class (example: "a sks character design")
|
|
10117
|
+
*/
|
|
10118
|
+
conceptPrompt: string;
|
|
10119
|
+
|
|
10120
|
+
/**
|
|
10121
|
+
* The model ID of the class. Only available for legacy models.
|
|
10122
|
+
*/
|
|
10123
|
+
modelId: string;
|
|
10124
|
+
|
|
10125
|
+
/**
|
|
10126
|
+
* The class name (example: "Character Design")
|
|
10127
|
+
*/
|
|
10128
|
+
name: string;
|
|
10129
|
+
|
|
10130
|
+
/**
|
|
10131
|
+
* The class prompt (example: "a character design")
|
|
10132
|
+
*/
|
|
10133
|
+
prompt: string;
|
|
10134
|
+
|
|
10135
|
+
/**
|
|
10136
|
+
* The class slug (example: "art-style-character-design")
|
|
10137
|
+
*/
|
|
10138
|
+
slug: string;
|
|
10139
|
+
|
|
10140
|
+
/**
|
|
10141
|
+
* The class status (only published classes are listed, but unpublished classes can
|
|
10142
|
+
* still appear in existing models)
|
|
10143
|
+
*/
|
|
10144
|
+
status: 'published' | 'unpublished';
|
|
10145
|
+
|
|
10146
|
+
/**
|
|
10147
|
+
* Some example images URLs to showcase the class
|
|
10148
|
+
*/
|
|
10149
|
+
thumbnails: Array<string>;
|
|
10150
|
+
}
|
|
10151
|
+
|
|
10152
|
+
export interface Concept {
|
|
10153
|
+
/**
|
|
10154
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
10155
|
+
*/
|
|
10156
|
+
modelId: string;
|
|
10157
|
+
|
|
10158
|
+
/**
|
|
10159
|
+
* The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
|
|
10160
|
+
* is between 0 and 2.
|
|
10161
|
+
*/
|
|
10162
|
+
scale: number;
|
|
10163
|
+
|
|
10164
|
+
/**
|
|
10165
|
+
* The epoch of the model (example: "000001") Only available for Flux Lora Trained
|
|
10166
|
+
* models
|
|
10167
|
+
*/
|
|
10168
|
+
modelEpoch?: string;
|
|
10169
|
+
}
|
|
10170
|
+
|
|
10171
|
+
export interface Epoch {
|
|
10172
|
+
/**
|
|
10173
|
+
* The epoch hash to identify the epoch
|
|
10174
|
+
*/
|
|
10175
|
+
epoch: string;
|
|
10176
|
+
|
|
10177
|
+
/**
|
|
10178
|
+
* The assets of the epoch if sample prompts as been supplied during training
|
|
10179
|
+
*/
|
|
10180
|
+
assets?: Array<Epoch.Asset>;
|
|
10181
|
+
}
|
|
10182
|
+
|
|
10183
|
+
export namespace Epoch {
|
|
10184
|
+
export interface Asset {
|
|
10185
|
+
/**
|
|
10186
|
+
* The AssetId of the image during training (example:
|
|
10187
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
10188
|
+
*/
|
|
10189
|
+
assetId: string;
|
|
10190
|
+
|
|
10191
|
+
/**
|
|
10192
|
+
* The url of the asset
|
|
10193
|
+
*/
|
|
10194
|
+
url: string;
|
|
10195
|
+
}
|
|
10196
|
+
}
|
|
10197
|
+
|
|
10198
|
+
/**
|
|
10199
|
+
* Defines the input parameters for a model. Use this to understand the available
|
|
10200
|
+
* input parameters for a given `modelId` when calling
|
|
10201
|
+
* `POST /generate/custom/{modelId}`. See {@link
|
|
10202
|
+
* https://docs.scenario.com/get-started/generation/video-generation} for examples.
|
|
10203
|
+
*/
|
|
10204
|
+
export interface Input {
|
|
10205
|
+
/**
|
|
10206
|
+
* The name that must be user to call the model through the API
|
|
10207
|
+
*/
|
|
10208
|
+
name: string;
|
|
10209
|
+
|
|
10210
|
+
/**
|
|
10211
|
+
* The data type of the input
|
|
10212
|
+
*/
|
|
10213
|
+
type:
|
|
10214
|
+
| 'boolean'
|
|
10215
|
+
| 'file'
|
|
10216
|
+
| 'file_array'
|
|
10217
|
+
| 'inputs_array'
|
|
10218
|
+
| 'model'
|
|
10219
|
+
| 'model_array'
|
|
10220
|
+
| 'number'
|
|
10221
|
+
| 'number_array'
|
|
10222
|
+
| 'string'
|
|
10223
|
+
| 'string_array';
|
|
10224
|
+
|
|
10225
|
+
/**
|
|
10226
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
10227
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
10228
|
+
* dropdown.
|
|
10229
|
+
*/
|
|
10230
|
+
allowedValues?: Array<unknown>;
|
|
10231
|
+
|
|
10232
|
+
/**
|
|
10233
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
10234
|
+
* \`file_array\` input types with kind \`image\`.
|
|
10235
|
+
*/
|
|
10236
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
10237
|
+
|
|
10238
|
+
/**
|
|
10239
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
10240
|
+
*/
|
|
10241
|
+
color?: boolean;
|
|
10242
|
+
|
|
10243
|
+
/**
|
|
10244
|
+
* Whether this input affects the model's cost calculation
|
|
10245
|
+
*/
|
|
10246
|
+
costImpact?: boolean;
|
|
10247
|
+
|
|
10248
|
+
/**
|
|
10249
|
+
* The default value for the input
|
|
10250
|
+
*/
|
|
10251
|
+
default?: unknown;
|
|
10252
|
+
|
|
10253
|
+
/**
|
|
10254
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
10255
|
+
*/
|
|
10256
|
+
description?: string;
|
|
10257
|
+
|
|
10258
|
+
/**
|
|
10259
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
10260
|
+
* value appear consecutively in the UI.
|
|
10261
|
+
*/
|
|
10262
|
+
group?: string;
|
|
10263
|
+
|
|
10264
|
+
/**
|
|
10265
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
10266
|
+
*/
|
|
10267
|
+
hint?: string;
|
|
10268
|
+
|
|
10269
|
+
/**
|
|
10270
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
10271
|
+
* the same as the current object. This is only available for type inputs_array
|
|
10272
|
+
* inputs.
|
|
10273
|
+
*/
|
|
10274
|
+
inputs?: Array<{ [key: string]: unknown }>;
|
|
10275
|
+
|
|
10276
|
+
/**
|
|
10277
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
10278
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
10279
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
10280
|
+
* data:kind, prefix \`file\` and \`file_array\` inputs always expose a kind: when
|
|
10281
|
+
* a model does not declare one, \`image\` is returned, which is the kind used at
|
|
10282
|
+
* generation time.
|
|
10283
|
+
*/
|
|
10284
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
|
|
10285
|
+
|
|
10286
|
+
/**
|
|
10287
|
+
* The label displayed in the UI for this input
|
|
10288
|
+
*/
|
|
10289
|
+
label?: string;
|
|
10290
|
+
|
|
10291
|
+
/**
|
|
10292
|
+
* The name of the file input field to use as the mask source
|
|
10293
|
+
*/
|
|
10294
|
+
maskFrom?: string;
|
|
10295
|
+
|
|
10296
|
+
/**
|
|
10297
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
10298
|
+
* types.
|
|
10299
|
+
*/
|
|
10300
|
+
max?: number;
|
|
10301
|
+
|
|
10302
|
+
/**
|
|
10303
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
10304
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
10305
|
+
* \`asset.properties.duration\` at job creation time.
|
|
10306
|
+
*/
|
|
10307
|
+
maxDuration?: number;
|
|
10308
|
+
|
|
10309
|
+
/**
|
|
10310
|
+
* The maximum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
10311
|
+
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
10312
|
+
* ITEMS instead — the length of each item is not constrained.
|
|
10313
|
+
*/
|
|
10314
|
+
maxLength?: number;
|
|
10315
|
+
|
|
10316
|
+
/**
|
|
10317
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
10318
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
10319
|
+
* creation time.
|
|
10320
|
+
*/
|
|
10321
|
+
maxSize?: number;
|
|
10322
|
+
|
|
10323
|
+
/**
|
|
10324
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
10325
|
+
*/
|
|
10326
|
+
min?: number;
|
|
10327
|
+
|
|
10328
|
+
/**
|
|
10329
|
+
* The minimum allowed media duration in seconds. Only applies to \`file\` and
|
|
10330
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
10331
|
+
* \`asset.properties.duration\` at job creation time.
|
|
10332
|
+
*/
|
|
10333
|
+
minDuration?: number;
|
|
10334
|
+
|
|
10335
|
+
/**
|
|
10336
|
+
* The minimum allowed length for \`string\` and \`model\` inputs, in characters.
|
|
10337
|
+
* For the array types (\`string_array\`, \`model_array\`) it bounds the NUMBER OF
|
|
10338
|
+
* ITEMS instead — the length of each item is not constrained.
|
|
10339
|
+
*/
|
|
10340
|
+
minLength?: number;
|
|
10341
|
+
|
|
10342
|
+
/**
|
|
10343
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
10344
|
+
* available for \`model_array\` input type.
|
|
10345
|
+
*/
|
|
10346
|
+
modelTypes?: Array<
|
|
10347
|
+
| 'custom'
|
|
10348
|
+
| 'elevenlabs-voice'
|
|
10349
|
+
| 'flux.1'
|
|
10350
|
+
| 'flux.1-composition'
|
|
10351
|
+
| 'flux.1-kontext-dev'
|
|
10352
|
+
| 'flux.1-kontext-lora'
|
|
10353
|
+
| 'flux.1-krea-dev'
|
|
10354
|
+
| 'flux.1-krea-lora'
|
|
10355
|
+
| 'flux.1-lora'
|
|
10356
|
+
| 'flux.1-pro'
|
|
10357
|
+
| 'flux.1.1-pro-ultra'
|
|
10358
|
+
| 'flux.2-dev-edit-lora'
|
|
10359
|
+
| 'flux.2-dev-lora'
|
|
10360
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
10361
|
+
| 'flux.2-klein-4b-lora'
|
|
10362
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
10363
|
+
| 'flux.2-klein-9b-lora'
|
|
10364
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
10365
|
+
| 'flux.2-klein-base-4b-lora'
|
|
10366
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
10367
|
+
| 'flux.2-klein-base-9b-lora'
|
|
10368
|
+
| 'flux1.1-pro'
|
|
10369
|
+
| 'gpt-image-1'
|
|
10370
|
+
| 'qwen-image-2512-lora'
|
|
10371
|
+
| 'qwen-image-edit-2509-lora'
|
|
10372
|
+
| 'qwen-image-edit-2511-lora'
|
|
10373
|
+
| 'qwen-image-edit-lora'
|
|
10374
|
+
| 'qwen-image-lora'
|
|
10375
|
+
| 'zimage-de-turbo-lora'
|
|
10376
|
+
| 'zimage-lora'
|
|
10377
|
+
| 'zimage-turbo-lora'
|
|
10378
|
+
>;
|
|
10379
|
+
|
|
10380
|
+
/**
|
|
10381
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
10382
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
10383
|
+
*
|
|
10384
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
10385
|
+
*/
|
|
10386
|
+
parent?: boolean;
|
|
10387
|
+
|
|
10388
|
+
/**
|
|
10389
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
10390
|
+
*/
|
|
10391
|
+
placeholder?: string;
|
|
10392
|
+
|
|
10393
|
+
/**
|
|
10394
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
10395
|
+
* spark feature. Only available for \`string\` input type.
|
|
10396
|
+
*/
|
|
10397
|
+
prompt?: boolean;
|
|
10398
|
+
|
|
10399
|
+
/**
|
|
10400
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
10401
|
+
* type.
|
|
10402
|
+
*/
|
|
10403
|
+
promptSpark?: boolean;
|
|
10404
|
+
|
|
10405
|
+
/**
|
|
10406
|
+
* Set of rules that describes when this input is required:
|
|
10407
|
+
*
|
|
10408
|
+
* - \`always\`: Input is always required
|
|
10409
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
10410
|
+
* defined
|
|
10411
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
10412
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
10413
|
+
*
|
|
10414
|
+
* By default, the input is not required.
|
|
10415
|
+
*/
|
|
10416
|
+
required?: Input.Required;
|
|
10417
|
+
|
|
10418
|
+
/**
|
|
10419
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
10420
|
+
*/
|
|
10421
|
+
step?: number;
|
|
10422
|
+
}
|
|
10423
|
+
|
|
10424
|
+
export namespace Input {
|
|
10425
|
+
/**
|
|
10426
|
+
* Set of rules that describes when this input is required:
|
|
10427
|
+
*
|
|
10428
|
+
* - \`always\`: Input is always required
|
|
10429
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
10430
|
+
* defined
|
|
10431
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
10432
|
+
* - \`conditional\`: Input is required when other inputs have specific values
|
|
10433
|
+
*
|
|
10434
|
+
* By default, the input is not required.
|
|
10435
|
+
*/
|
|
10436
|
+
export interface Required {
|
|
10437
|
+
/**
|
|
10438
|
+
* Whether the input is always required
|
|
10439
|
+
*/
|
|
10440
|
+
always?: boolean;
|
|
10441
|
+
|
|
10442
|
+
/**
|
|
10443
|
+
* Makes this input required when other inputs have one of the listed values
|
|
10444
|
+
*/
|
|
10445
|
+
conditional?: Required.Conditional;
|
|
10446
|
+
|
|
10447
|
+
/**
|
|
10448
|
+
* Makes this input required when another input is defined:
|
|
10449
|
+
*
|
|
10450
|
+
* - Key: name of the input that must be defined
|
|
10451
|
+
* - Value: message to display when this input is required
|
|
10452
|
+
*/
|
|
10453
|
+
ifDefined?: unknown;
|
|
10454
|
+
|
|
10455
|
+
/**
|
|
10456
|
+
* Makes this input required when another input is not defined:
|
|
10457
|
+
*
|
|
10458
|
+
* - Key: name of the input that must be undefined
|
|
10459
|
+
* - Value: message to display when this input is required
|
|
10460
|
+
*/
|
|
10461
|
+
ifNotDefined?: unknown;
|
|
10462
|
+
}
|
|
10463
|
+
|
|
10464
|
+
export namespace Required {
|
|
10465
|
+
/**
|
|
10466
|
+
* Makes this input required when other inputs have one of the listed values
|
|
10467
|
+
*/
|
|
10468
|
+
export interface Conditional {
|
|
10469
|
+
/**
|
|
10470
|
+
* The conditions to check:
|
|
10471
|
+
*
|
|
10472
|
+
* - Key: name of the input to check
|
|
10473
|
+
* - Value: values of that input that satisfy the condition
|
|
10474
|
+
*/
|
|
10475
|
+
values: unknown;
|
|
10476
|
+
|
|
10477
|
+
/**
|
|
10478
|
+
* How the conditions combine: \`and\` (all must match) or \`or\` (any must match)
|
|
10479
|
+
*/
|
|
10480
|
+
operator?: 'and' | 'or';
|
|
10481
|
+
}
|
|
10482
|
+
}
|
|
10483
|
+
}
|
|
10484
|
+
|
|
10485
|
+
/**
|
|
10486
|
+
* The parameters of the model
|
|
10487
|
+
*/
|
|
10488
|
+
export interface Parameters {
|
|
10489
|
+
/**
|
|
10490
|
+
* Age group of the voice (for professional cloning)
|
|
10491
|
+
*
|
|
10492
|
+
* Only available for ElevenLabs voice training
|
|
10493
|
+
*/
|
|
10494
|
+
age?: string;
|
|
10495
|
+
|
|
10496
|
+
/**
|
|
10497
|
+
* The batch size Less steps, and will increase the learning rate
|
|
10498
|
+
*
|
|
10499
|
+
* Only available for Flux LoRA training
|
|
10500
|
+
*/
|
|
10501
|
+
batchSize?: number;
|
|
10502
|
+
|
|
10503
|
+
/**
|
|
10504
|
+
* The prompt to specify images in the same class as provided instance images
|
|
10505
|
+
*
|
|
10506
|
+
* Deprecated legacy training parameter.
|
|
10507
|
+
*/
|
|
10508
|
+
classPrompt?: string;
|
|
10509
|
+
|
|
10510
|
+
/**
|
|
10511
|
+
* Type of voice cloning: "instant" (fast) or "professional" (higher quality,
|
|
10512
|
+
* requires captcha)
|
|
10513
|
+
*
|
|
10514
|
+
* Only available for ElevenLabs voice training
|
|
10515
|
+
*/
|
|
10516
|
+
cloneType?: string;
|
|
10517
|
+
|
|
10518
|
+
/**
|
|
10519
|
+
* The prompt with identifier specifying the instance (or subject) of the class
|
|
10520
|
+
* (example: "a daiton dog")
|
|
10521
|
+
*
|
|
10522
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
10523
|
+
* an empty string.
|
|
10524
|
+
*/
|
|
10525
|
+
conceptPrompt?: string;
|
|
10526
|
+
|
|
10527
|
+
/**
|
|
10528
|
+
* Gender of the voice (for professional cloning)
|
|
10529
|
+
*
|
|
10530
|
+
* Only available for ElevenLabs voice training
|
|
10531
|
+
*/
|
|
10532
|
+
gender?: string;
|
|
10533
|
+
|
|
10534
|
+
/**
|
|
10535
|
+
* Language of the audio samples (ISO 639-1 code)
|
|
10536
|
+
*
|
|
10537
|
+
* Only available for ElevenLabs voice training
|
|
10538
|
+
*/
|
|
10539
|
+
language?: string;
|
|
10540
|
+
|
|
10541
|
+
/**
|
|
10542
|
+
* Initial learning rate (after the potential warmup period)
|
|
10543
|
+
*
|
|
10544
|
+
* Default value varies depending on the model type. For Flux LoRA, the default is
|
|
10545
|
+
* 0.0001.
|
|
10546
|
+
*/
|
|
10547
|
+
learningRate?: number;
|
|
10548
|
+
|
|
10549
|
+
/**
|
|
10550
|
+
* Initial learning rate (after the potential warmup period) for the text encoder
|
|
10551
|
+
*
|
|
10552
|
+
* Maximum [Flux LoRA: 0.001] Default [Flux LoRA: 0.00001] Minimum [Flux LoRA:
|
|
10553
|
+
* 0.000001]
|
|
10554
|
+
*/
|
|
10555
|
+
learningRateTextEncoder?: number;
|
|
10556
|
+
|
|
10557
|
+
/**
|
|
10558
|
+
* Initial learning rate (after the potential warmup period) for the UNet
|
|
10559
|
+
*
|
|
10560
|
+
* Deprecated legacy training parameter.
|
|
10561
|
+
*/
|
|
10562
|
+
learningRateUnet?: number;
|
|
10563
|
+
|
|
10564
|
+
/**
|
|
10565
|
+
* The scheduler type to use (default: "constant")
|
|
10566
|
+
*
|
|
10567
|
+
* Deprecated legacy training parameter.
|
|
10568
|
+
*/
|
|
10569
|
+
lrScheduler?:
|
|
10570
|
+
| 'constant'
|
|
10571
|
+
| 'constant-with-warmup'
|
|
10572
|
+
| 'cosine'
|
|
10573
|
+
| 'cosine-with-restarts'
|
|
10574
|
+
| 'linear'
|
|
10575
|
+
| 'polynomial';
|
|
10576
|
+
|
|
10577
|
+
/**
|
|
10578
|
+
* Maximum number of training steps to execute (default: varies depending on the
|
|
10579
|
+
* model type)
|
|
10580
|
+
*
|
|
10581
|
+
* Default value varies depending on the model type:
|
|
10582
|
+
*
|
|
10583
|
+
* - For Flux: number of training images \* 100
|
|
10584
|
+
*
|
|
10585
|
+
* Maximum value varies depending on the model type:
|
|
10586
|
+
*
|
|
10587
|
+
* - For Flux: [0, 10000]
|
|
10588
|
+
*/
|
|
10589
|
+
maxTrainSteps?: number;
|
|
10590
|
+
|
|
10591
|
+
/**
|
|
10592
|
+
* The number of epochs to train for
|
|
10593
|
+
*
|
|
10594
|
+
* Only available for Flux LoRA training
|
|
10595
|
+
*/
|
|
10596
|
+
nbEpochs?: number;
|
|
10597
|
+
|
|
10598
|
+
/**
|
|
10599
|
+
* The number of times to repeat the training
|
|
10600
|
+
*
|
|
10601
|
+
* Only available for Flux LoRA training
|
|
10602
|
+
*/
|
|
10603
|
+
nbRepeats?: number;
|
|
10604
|
+
|
|
10605
|
+
/**
|
|
10606
|
+
* The number of training steps for the text encoder
|
|
10607
|
+
*
|
|
10608
|
+
* Deprecated legacy training parameter.
|
|
10609
|
+
*/
|
|
10610
|
+
numTextTrainSteps?: number;
|
|
10611
|
+
|
|
10612
|
+
/**
|
|
10613
|
+
* The number of training steps for the UNet
|
|
10614
|
+
*
|
|
10615
|
+
* Deprecated legacy training parameter.
|
|
10616
|
+
*/
|
|
10617
|
+
numUNetTrainSteps?: number;
|
|
10618
|
+
|
|
10619
|
+
/**
|
|
10620
|
+
* Optimize the model training task for a specific type of input images. The
|
|
10621
|
+
* available values are:
|
|
10622
|
+
*
|
|
10623
|
+
* - "likeness": optimize training for likeness or portrait (targets specific
|
|
10624
|
+
* transformer blocks)
|
|
10625
|
+
* - "all": train all transformer blocks
|
|
10626
|
+
* - "none": train no specific transformer blocks
|
|
10627
|
+
*
|
|
10628
|
+
* This parameter controls which double and single transformer blocks are trained
|
|
10629
|
+
* during the LoRA training process.
|
|
10630
|
+
*
|
|
10631
|
+
* Only available for Flux LoRA training
|
|
10632
|
+
*/
|
|
10633
|
+
optimizeFor?: 'likeness';
|
|
10634
|
+
|
|
10635
|
+
/**
|
|
10636
|
+
* The weight of prior preservation loss
|
|
10637
|
+
*
|
|
10638
|
+
* Deprecated legacy training parameter.
|
|
10639
|
+
*/
|
|
10640
|
+
priorLossWeight?: number;
|
|
10641
|
+
|
|
10642
|
+
/**
|
|
10643
|
+
* Whether to random crop or center crop images before resizing to the working
|
|
10644
|
+
* resolution
|
|
10645
|
+
*
|
|
10646
|
+
* Deprecated legacy training parameter.
|
|
10647
|
+
*/
|
|
10648
|
+
randomCrop?: boolean;
|
|
10649
|
+
|
|
10650
|
+
/**
|
|
10651
|
+
* Ratio of random crops
|
|
10652
|
+
*
|
|
10653
|
+
* Deprecated legacy training parameter.
|
|
10654
|
+
*/
|
|
10655
|
+
randomCropRatio?: number;
|
|
10656
|
+
|
|
10657
|
+
/**
|
|
10658
|
+
* Scale of random crops
|
|
10659
|
+
*
|
|
10660
|
+
* Deprecated legacy training parameter.
|
|
10661
|
+
*/
|
|
10662
|
+
randomCropScale?: number;
|
|
10663
|
+
|
|
10664
|
+
/**
|
|
10665
|
+
* The dimension of the LoRA update matrices
|
|
10666
|
+
*
|
|
10667
|
+
* Only available for Flux LoRA and Musubi training
|
|
10668
|
+
*
|
|
10669
|
+
* Default value varies depending on the model type:
|
|
10670
|
+
*
|
|
10671
|
+
* - For Flux: 16
|
|
10672
|
+
* - For Musubi: 64
|
|
10673
|
+
*
|
|
10674
|
+
* Each trainer enforces its own tighter limit (Flux LoRA: [2; 64], Musubi: [2;
|
|
10675
|
+
* 128])
|
|
10676
|
+
*/
|
|
10677
|
+
rank?: number;
|
|
10678
|
+
|
|
10679
|
+
/**
|
|
10680
|
+
* Whether to remove background noise from audio samples before cloning. When
|
|
10681
|
+
* enabled, each sample must be at least 5 seconds long.
|
|
10682
|
+
*
|
|
10683
|
+
* Only available for ElevenLabs voice training
|
|
10684
|
+
*/
|
|
10685
|
+
removeBackgroundNoise?: boolean;
|
|
10686
|
+
|
|
10687
|
+
/**
|
|
10688
|
+
* The prompts to use for each epoch Only available for Flux LoRA training
|
|
10689
|
+
*/
|
|
10690
|
+
samplePrompts?: Array<string>;
|
|
10691
|
+
|
|
10692
|
+
/**
|
|
10693
|
+
* The sample prompt images (AssetIds) paired with samplePrompts Only available for
|
|
10694
|
+
* Flux LoRA training Must be the same length as samplePrompts
|
|
10695
|
+
*/
|
|
10696
|
+
sampleSourceImages?: Array<string>;
|
|
10697
|
+
|
|
10698
|
+
/**
|
|
10699
|
+
* Whether to scale the learning rate
|
|
10700
|
+
*
|
|
10701
|
+
* Note: Legacy parameter, will be ignored
|
|
10702
|
+
*
|
|
10703
|
+
* Deprecated legacy training parameter.
|
|
10704
|
+
*/
|
|
10705
|
+
scaleLr?: boolean;
|
|
10706
|
+
|
|
10707
|
+
/**
|
|
10708
|
+
* Used to reproduce previous results. Default: randomly generated number.
|
|
10709
|
+
*
|
|
10710
|
+
* Deprecated legacy training parameter.
|
|
10711
|
+
*/
|
|
10712
|
+
seed?: number;
|
|
10713
|
+
|
|
10714
|
+
/**
|
|
10715
|
+
* Whether to train the text encoder or not
|
|
10716
|
+
*
|
|
10717
|
+
* Example: For 100 steps and a value of 0.2, it means that the text encoder will
|
|
10718
|
+
* be trained for 20 steps and then the UNet for 80 steps
|
|
10719
|
+
*
|
|
10720
|
+
* Note: Legacy parameter, please use `numTextTrainSteps` and `numUNetTrainSteps`
|
|
10721
|
+
*
|
|
10722
|
+
* Deprecated legacy training parameter.
|
|
10723
|
+
*/
|
|
10724
|
+
textEncoderTrainingRatio?: number;
|
|
10725
|
+
|
|
10726
|
+
/**
|
|
10727
|
+
* Validation frequency. Cannot be greater than maxTrainSteps value
|
|
10728
|
+
*
|
|
10729
|
+
* Deprecated legacy training parameter.
|
|
10730
|
+
*/
|
|
10731
|
+
validationFrequency?: number;
|
|
10732
|
+
|
|
10733
|
+
/**
|
|
10734
|
+
* Validation prompt
|
|
10735
|
+
*
|
|
10736
|
+
* Deprecated legacy training parameter.
|
|
10737
|
+
*/
|
|
10738
|
+
validationPrompt?: string;
|
|
10739
|
+
|
|
10740
|
+
/**
|
|
10741
|
+
* Description of the voice characteristics
|
|
10742
|
+
*
|
|
10743
|
+
* Only available for ElevenLabs voice training
|
|
10744
|
+
*/
|
|
10745
|
+
voiceDescription?: string;
|
|
10746
|
+
|
|
10747
|
+
/**
|
|
10748
|
+
* The Weights And Bias key to use for logging. The maximum length is 40 characters
|
|
10749
|
+
*/
|
|
10750
|
+
wandbKey?: string;
|
|
10751
|
+
}
|
|
10752
|
+
|
|
10753
|
+
/**
|
|
10754
|
+
* Aggregated performance stats
|
|
10755
|
+
*/
|
|
10756
|
+
export interface PerformanceStats {
|
|
10757
|
+
/**
|
|
10758
|
+
* Performance metrics per variant
|
|
10759
|
+
*/
|
|
10760
|
+
variants: Array<PerformanceStats.Variant>;
|
|
10761
|
+
|
|
10762
|
+
/**
|
|
10763
|
+
* Default variant key for quick model comparison
|
|
10764
|
+
*/
|
|
10765
|
+
default?: string;
|
|
10766
|
+
}
|
|
10767
|
+
|
|
10768
|
+
export namespace PerformanceStats {
|
|
10769
|
+
/**
|
|
10770
|
+
* Performance stats for a model variant
|
|
10771
|
+
*/
|
|
10772
|
+
export interface Variant {
|
|
10773
|
+
/**
|
|
10774
|
+
* The generation capability (example: "txt2img", "img2video", "txt2audio")
|
|
10775
|
+
*/
|
|
10776
|
+
capability: string;
|
|
10777
|
+
|
|
10778
|
+
/**
|
|
10779
|
+
* When these stats were last computed (ISO date)
|
|
10780
|
+
*/
|
|
10781
|
+
computedAt: string;
|
|
10782
|
+
|
|
10783
|
+
/**
|
|
10784
|
+
* Unique variant identifier (example: "txt2img:1K", "img2video:2K", "txt2audio")
|
|
10785
|
+
*/
|
|
10786
|
+
variantKey: string;
|
|
10787
|
+
|
|
10788
|
+
/**
|
|
10789
|
+
* External quality score from arena.ai leaderboard
|
|
10790
|
+
*/
|
|
10791
|
+
arenaScore?: Variant.ArenaScore;
|
|
10792
|
+
|
|
10793
|
+
/**
|
|
10794
|
+
* Maximum cost per output asset (CU)
|
|
10795
|
+
*/
|
|
10796
|
+
costPerAssetMaxCU?: number;
|
|
10797
|
+
|
|
10798
|
+
/**
|
|
10799
|
+
* Minimum cost per output asset (CU)
|
|
10800
|
+
*/
|
|
10801
|
+
costPerAssetMinCU?: number;
|
|
10802
|
+
|
|
10803
|
+
/**
|
|
10804
|
+
* Median cost per output asset (CU)
|
|
10805
|
+
*/
|
|
10806
|
+
costPerAssetP50CU?: number;
|
|
10807
|
+
|
|
10808
|
+
/**
|
|
10809
|
+
* Inference latency P50 per output asset (seconds)
|
|
10810
|
+
*/
|
|
10811
|
+
inferenceLatencyP50Sec?: number;
|
|
10812
|
+
|
|
10813
|
+
/**
|
|
10814
|
+
* Inference latency P75 per output asset (seconds)
|
|
10815
|
+
*/
|
|
10816
|
+
inferenceLatencyP75Sec?: number;
|
|
10817
|
+
|
|
10818
|
+
/**
|
|
10819
|
+
* The resolution bucket (example: "0.5K", "1K", "2K", "4K")
|
|
10820
|
+
*/
|
|
10821
|
+
resolution?: string;
|
|
10822
|
+
|
|
10823
|
+
/**
|
|
10824
|
+
* Total latency P50 per output asset, including queue time (seconds)
|
|
10825
|
+
*/
|
|
10826
|
+
totalLatencyP50Sec?: number;
|
|
10827
|
+
|
|
10828
|
+
/**
|
|
10829
|
+
* Total latency P75 per output asset, including queue time (seconds)
|
|
10830
|
+
*/
|
|
10831
|
+
totalLatencyP75Sec?: number;
|
|
10832
|
+
}
|
|
10833
|
+
|
|
10834
|
+
export namespace Variant {
|
|
10835
|
+
/**
|
|
10836
|
+
* External quality score from arena.ai leaderboard
|
|
10837
|
+
*/
|
|
10838
|
+
export interface ArenaScore {
|
|
10839
|
+
/**
|
|
10840
|
+
* Arena category (example: "text_to_image", "image_to_video")
|
|
10841
|
+
*/
|
|
10842
|
+
arenaCategory: string;
|
|
10843
|
+
|
|
10844
|
+
/**
|
|
10845
|
+
* Model name on arena.ai
|
|
10846
|
+
*/
|
|
10847
|
+
arenaModelName: string;
|
|
10848
|
+
|
|
10849
|
+
/**
|
|
10850
|
+
* When this score was last fetched (ISO date)
|
|
10851
|
+
*/
|
|
10852
|
+
fetchedAt: string;
|
|
10853
|
+
|
|
10854
|
+
/**
|
|
10855
|
+
* Rank in the arena category
|
|
10856
|
+
*/
|
|
10857
|
+
rank: number;
|
|
10858
|
+
|
|
10859
|
+
/**
|
|
10860
|
+
* ELO rating
|
|
10861
|
+
*/
|
|
10862
|
+
rating: number;
|
|
10863
|
+
|
|
10864
|
+
/**
|
|
10865
|
+
* ELO rating confidence interval lower bound
|
|
10866
|
+
*/
|
|
10867
|
+
ratingLower: number;
|
|
10868
|
+
|
|
10869
|
+
/**
|
|
10870
|
+
* ELO rating confidence interval upper bound
|
|
10871
|
+
*/
|
|
10872
|
+
ratingUpper: number;
|
|
10873
|
+
|
|
10874
|
+
/**
|
|
10875
|
+
* Number of human votes
|
|
10876
|
+
*/
|
|
10877
|
+
votes: number;
|
|
10878
|
+
}
|
|
10879
|
+
}
|
|
10880
|
+
}
|
|
10881
|
+
|
|
10882
|
+
/**
|
|
10883
|
+
* A thumbnail for your model
|
|
10884
|
+
*/
|
|
10885
|
+
export interface Thumbnail {
|
|
10886
|
+
/**
|
|
10887
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
10888
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
10889
|
+
*/
|
|
10890
|
+
assetId: string;
|
|
10891
|
+
|
|
10892
|
+
/**
|
|
10893
|
+
* The url of the image used as a thumbnail for your model
|
|
10894
|
+
*/
|
|
10895
|
+
url: string;
|
|
10896
|
+
}
|
|
10897
|
+
|
|
10898
|
+
export interface TrainingImagePair {
|
|
10899
|
+
/**
|
|
10900
|
+
* The instruction for the image pair, source to target
|
|
10901
|
+
*/
|
|
10902
|
+
instruction?: string;
|
|
10903
|
+
|
|
10904
|
+
/**
|
|
10905
|
+
* The source asset ID (must be a training asset)
|
|
10906
|
+
*/
|
|
10907
|
+
sourceId?: string;
|
|
10908
|
+
|
|
10909
|
+
/**
|
|
10910
|
+
* The target asset ID (must be a training asset)
|
|
10911
|
+
*/
|
|
10912
|
+
targetId?: string;
|
|
10913
|
+
}
|
|
10914
|
+
|
|
10915
|
+
export interface TrainingImage {
|
|
10916
|
+
/**
|
|
10917
|
+
* The training image ID (example: "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
10918
|
+
*/
|
|
10919
|
+
id: string;
|
|
10920
|
+
|
|
10921
|
+
/**
|
|
10922
|
+
* Automatic captioning of the image
|
|
10923
|
+
*/
|
|
10924
|
+
automaticCaptioning: string;
|
|
10925
|
+
|
|
10926
|
+
/**
|
|
10927
|
+
* The training image upload date as an ISO string (example:
|
|
10928
|
+
* "2023-02-03T11:19:41.579Z")
|
|
10929
|
+
*/
|
|
10930
|
+
createdAt: string;
|
|
10931
|
+
|
|
10932
|
+
/**
|
|
10933
|
+
* Description for the image
|
|
10934
|
+
*/
|
|
10935
|
+
description: string;
|
|
10936
|
+
|
|
10937
|
+
/**
|
|
10938
|
+
* The URL of the image
|
|
10939
|
+
*/
|
|
10940
|
+
downloadUrl: string;
|
|
10941
|
+
|
|
10942
|
+
/**
|
|
10943
|
+
* The original file name of the image (example: "my-training-image.jpg")
|
|
10944
|
+
*/
|
|
10945
|
+
name: string;
|
|
10946
|
+
}
|
|
10947
|
+
|
|
10948
|
+
/**
|
|
10949
|
+
* Additional information about the training progress of the model
|
|
10950
|
+
*/
|
|
10951
|
+
export interface TrainingProgress {
|
|
10952
|
+
/**
|
|
10953
|
+
* The stage of the request
|
|
10954
|
+
*/
|
|
10955
|
+
stage:
|
|
10956
|
+
| 'pending'
|
|
10957
|
+
| 'pending-captcha'
|
|
10958
|
+
| 'queued-for-train'
|
|
10959
|
+
| 'ready-for-captcha'
|
|
10960
|
+
| 'running-train'
|
|
10961
|
+
| 'starting-train';
|
|
10962
|
+
|
|
10963
|
+
/**
|
|
10964
|
+
* Timestamp in milliseconds of the last time the training progress was updated
|
|
10965
|
+
*/
|
|
10966
|
+
updatedAt: number;
|
|
10967
|
+
|
|
10968
|
+
/**
|
|
10969
|
+
* Signed URL of the captcha image to read aloud during PVC voice cloning. Only
|
|
10970
|
+
* present when stage === 'pending-captcha'. Overwritten on each retry.
|
|
10971
|
+
*/
|
|
10972
|
+
captchaImageUrl?: string;
|
|
10973
|
+
|
|
10974
|
+
/**
|
|
10975
|
+
* Position of the job in the queue (ie. the number of job in the queue before this
|
|
10976
|
+
* one)
|
|
10977
|
+
*/
|
|
10978
|
+
position?: number;
|
|
10979
|
+
|
|
10980
|
+
/**
|
|
10981
|
+
* The progress of the job
|
|
10982
|
+
*/
|
|
10983
|
+
progress?: number;
|
|
10984
|
+
|
|
10985
|
+
/**
|
|
10986
|
+
* The remaining time in milliseconds
|
|
10987
|
+
*/
|
|
10988
|
+
remainingTimeMs?: number;
|
|
10989
|
+
|
|
10990
|
+
/**
|
|
10991
|
+
* Last recoverable failure message during PVC. Present when the model has bounced
|
|
10992
|
+
* back to stage === 'ready-for-captcha' after a step 2 or step 3 failure (e.g.
|
|
10993
|
+
* captcha rejected, time limit exceeded). Surface above the retry button so the
|
|
10994
|
+
* user understands why they're back here.
|
|
10995
|
+
*/
|
|
10996
|
+
retryableError?: string;
|
|
10997
|
+
|
|
10998
|
+
/**
|
|
10999
|
+
* Number of consecutive PVC step 2 / step 3 failures on this voice model. The
|
|
11000
|
+
* model is marked Failed when this reaches the platform's max retries.
|
|
11001
|
+
*/
|
|
11002
|
+
retryCount?: number;
|
|
11003
|
+
|
|
11004
|
+
/**
|
|
11005
|
+
* The timestamp in millisecond marking the start of the process
|
|
11006
|
+
*/
|
|
11007
|
+
startedAt?: number;
|
|
11008
|
+
}
|
|
11009
|
+
|
|
11010
|
+
/**
|
|
11011
|
+
* Additional information about the model's training
|
|
11012
|
+
*/
|
|
11013
|
+
export interface TrainingStats {
|
|
11014
|
+
/**
|
|
11015
|
+
* The training end time as an ISO date string
|
|
11016
|
+
*/
|
|
11017
|
+
endedAt?: string;
|
|
11018
|
+
|
|
11019
|
+
/**
|
|
11020
|
+
* The training queued duration in seconds
|
|
11021
|
+
*/
|
|
11022
|
+
queueDuration?: number;
|
|
11023
|
+
|
|
11024
|
+
/**
|
|
11025
|
+
* The training start time as an ISO date string
|
|
11026
|
+
*/
|
|
11027
|
+
startedAt?: string;
|
|
11028
|
+
|
|
11029
|
+
/**
|
|
11030
|
+
* The training duration in seconds
|
|
11031
|
+
*/
|
|
11032
|
+
trainDuration?: number;
|
|
11033
|
+
}
|
|
11034
|
+
|
|
11035
|
+
/**
|
|
11036
|
+
* The UI configuration for the model
|
|
11037
|
+
*/
|
|
11038
|
+
export interface UiConfig {
|
|
11039
|
+
/**
|
|
11040
|
+
* Configuration for the input properties
|
|
11041
|
+
*/
|
|
11042
|
+
inputProperties?: { [key: string]: UiConfig.InputProperties };
|
|
11043
|
+
|
|
11044
|
+
/**
|
|
11045
|
+
* Configuration for the loras component
|
|
11046
|
+
*/
|
|
11047
|
+
lorasComponent?: UiConfig.LorasComponent;
|
|
11048
|
+
|
|
11049
|
+
/**
|
|
11050
|
+
* Configuration for the provider outputs exposed by `exposeOutput`
|
|
11051
|
+
*/
|
|
11052
|
+
outputProperties?: { [key: string]: UiConfig.OutputProperties };
|
|
11053
|
+
|
|
11054
|
+
/**
|
|
11055
|
+
* Configuration for the presets
|
|
11056
|
+
*/
|
|
11057
|
+
presets?: Array<UiConfig.Preset>;
|
|
11058
|
+
|
|
11059
|
+
/**
|
|
11060
|
+
* Configuration for the resolution component
|
|
11061
|
+
*/
|
|
11062
|
+
resolutionComponent?: UiConfig.ResolutionComponent;
|
|
11063
|
+
|
|
11064
|
+
/**
|
|
11065
|
+
* Configuration for the selects
|
|
11066
|
+
*/
|
|
11067
|
+
selects?: { [key: string]: unknown };
|
|
11068
|
+
|
|
11069
|
+
/**
|
|
11070
|
+
* Configuration for the trigger generate button
|
|
11071
|
+
*/
|
|
11072
|
+
triggerGenerate?: UiConfig.TriggerGenerate;
|
|
11073
|
+
}
|
|
11074
|
+
|
|
11075
|
+
export namespace UiConfig {
|
|
11076
|
+
export interface InputProperties {
|
|
11077
|
+
collapsed?: boolean;
|
|
11078
|
+
}
|
|
11079
|
+
|
|
11080
|
+
/**
|
|
11081
|
+
* Configuration for the loras component
|
|
11082
|
+
*/
|
|
11083
|
+
export interface LorasComponent {
|
|
11084
|
+
/**
|
|
11085
|
+
* The label of the component
|
|
11086
|
+
*/
|
|
11087
|
+
label: string;
|
|
11088
|
+
|
|
11089
|
+
/**
|
|
11090
|
+
* The input name of the model (model_array)
|
|
11091
|
+
*/
|
|
11092
|
+
modelInput: string;
|
|
11093
|
+
|
|
11094
|
+
/**
|
|
11095
|
+
* The input name of the scale (number_array)
|
|
11096
|
+
*/
|
|
11097
|
+
scaleInput: string;
|
|
11098
|
+
|
|
11099
|
+
/**
|
|
11100
|
+
* The input model id (example: a composition or a single LoRA modelId) If
|
|
11101
|
+
* specified, the model id will be attached to the output asset as a metadata If
|
|
11102
|
+
* the model-decomposer parser is specified on it, modelInput and scaleInput will
|
|
11103
|
+
* be automatically populated
|
|
11104
|
+
*/
|
|
11105
|
+
modelIdInput?: string;
|
|
11106
|
+
}
|
|
11107
|
+
|
|
11108
|
+
export interface OutputProperties {
|
|
11109
|
+
label: string;
|
|
11110
|
+
}
|
|
11111
|
+
|
|
11112
|
+
export interface Preset {
|
|
11113
|
+
fields: Array<string>;
|
|
11114
|
+
|
|
11115
|
+
presets: unknown;
|
|
11116
|
+
}
|
|
11117
|
+
|
|
11118
|
+
/**
|
|
11119
|
+
* Configuration for the resolution component
|
|
11120
|
+
*/
|
|
11121
|
+
export interface ResolutionComponent {
|
|
11122
|
+
/**
|
|
11123
|
+
* The input name of the height
|
|
11124
|
+
*/
|
|
11125
|
+
heightInput: string;
|
|
11126
|
+
|
|
11127
|
+
/**
|
|
11128
|
+
* The label of the component
|
|
11129
|
+
*/
|
|
11130
|
+
label: string;
|
|
11131
|
+
|
|
11132
|
+
/**
|
|
11133
|
+
* The resolution presets
|
|
11134
|
+
*/
|
|
11135
|
+
presets: Array<ResolutionComponent.Preset>;
|
|
11136
|
+
|
|
11137
|
+
/**
|
|
11138
|
+
* The input name of the width
|
|
11139
|
+
*/
|
|
11140
|
+
widthInput: string;
|
|
11141
|
+
}
|
|
11142
|
+
|
|
11143
|
+
export namespace ResolutionComponent {
|
|
11144
|
+
export interface Preset {
|
|
11145
|
+
height: number;
|
|
11146
|
+
|
|
11147
|
+
label: string;
|
|
11148
|
+
|
|
11149
|
+
width: number;
|
|
11150
|
+
}
|
|
11151
|
+
}
|
|
11152
|
+
|
|
11153
|
+
/**
|
|
11154
|
+
* Configuration for the trigger generate button
|
|
11155
|
+
*/
|
|
11156
|
+
export interface TriggerGenerate {
|
|
11157
|
+
label: string;
|
|
11158
|
+
|
|
11159
|
+
/**
|
|
11160
|
+
* The 'name' of the input where the trigger generate button will be displayed
|
|
11161
|
+
* (after the input). Do not specify both position and after.
|
|
11162
|
+
*/
|
|
11163
|
+
after?: string;
|
|
11164
|
+
|
|
11165
|
+
/**
|
|
11166
|
+
* The position of the trigger generate button. If position specified, the button
|
|
11167
|
+
* will be displayed at the specified position. Do not specify both position and
|
|
11168
|
+
* after.
|
|
11169
|
+
*/
|
|
11170
|
+
position?: 'bottom' | 'top';
|
|
11171
|
+
}
|
|
11172
|
+
}
|
|
11173
|
+
}
|
|
11174
|
+
}
|
|
11175
|
+
|
|
11176
|
+
export interface ModelUpdateTagsResponse {
|
|
11177
|
+
/**
|
|
11178
|
+
* The list of added tags
|
|
11179
|
+
*/
|
|
11180
|
+
added: Array<string>;
|
|
11181
|
+
|
|
11182
|
+
/**
|
|
11183
|
+
* The list of deleted tags
|
|
11184
|
+
*/
|
|
11185
|
+
deleted: Array<string>;
|
|
11186
|
+
}
|
|
11187
|
+
|
|
11188
|
+
export interface ModelCreateParams {
|
|
11189
|
+
/**
|
|
11190
|
+
* Query param: If set to true, returns the original asset without transformation
|
|
11191
|
+
*/
|
|
11192
|
+
originalAssets?: boolean;
|
|
11193
|
+
|
|
11194
|
+
/**
|
|
11195
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
11196
|
+
* assert ownership or to set the owner of the resource(s)
|
|
11197
|
+
*/
|
|
11198
|
+
projectId?: string;
|
|
11199
|
+
|
|
11200
|
+
/**
|
|
11201
|
+
* Body param: The ID of the base model to use as a starting point for the training
|
|
11202
|
+
* (example: "flux.1-dev")
|
|
11203
|
+
*
|
|
11204
|
+
* Value is automatically set based on the model's type. In case of doubt leave it
|
|
11205
|
+
* empty.
|
|
11206
|
+
*/
|
|
11207
|
+
baseModelId?: string;
|
|
11208
|
+
|
|
11209
|
+
/**
|
|
11210
|
+
* Body param: The slug of the class you want to use (ex:
|
|
11211
|
+
* "characters-npcs-mobs-characters"). Set to null to unset the class
|
|
11212
|
+
*/
|
|
11213
|
+
classSlug?: string;
|
|
11214
|
+
|
|
11215
|
+
/**
|
|
11216
|
+
* Body param: List of collection IDs to add the model to
|
|
11217
|
+
*/
|
|
11218
|
+
collectionIds?: Array<string>;
|
|
11219
|
+
|
|
11220
|
+
/**
|
|
11221
|
+
* Body param: The concepts is required for composition models. With one or more
|
|
11222
|
+
* loras
|
|
11223
|
+
*
|
|
11224
|
+
* Only applicable to Flux based models.
|
|
11225
|
+
*/
|
|
11226
|
+
concepts?: Array<ModelCreateParams.Concept>;
|
|
11227
|
+
|
|
11228
|
+
/**
|
|
11229
|
+
* Body param: The model's name (ex: "Cinematic Realism").
|
|
11230
|
+
*
|
|
11231
|
+
* If not set, the model's name will be automatically generated when starting
|
|
11232
|
+
* training based on training data.
|
|
11233
|
+
*/
|
|
11234
|
+
name?: string;
|
|
11235
|
+
|
|
11236
|
+
/**
|
|
11237
|
+
* Body param: The model's short description (ex: "This model generates highly
|
|
11238
|
+
* detailed cinematic scenes.").
|
|
11239
|
+
*
|
|
11240
|
+
* If not set, the model's short description will be automatically generated when
|
|
11241
|
+
* starting training based on training data.
|
|
11242
|
+
*/
|
|
11243
|
+
shortDescription?: string;
|
|
11244
|
+
|
|
11245
|
+
/**
|
|
11246
|
+
* Body param: The model's type (ex: "flux.1-lora").
|
|
11247
|
+
*
|
|
11248
|
+
* The type can only be changed if the model has the "new" status.
|
|
11249
|
+
*/
|
|
11250
|
+
type?:
|
|
11251
|
+
| 'custom'
|
|
11252
|
+
| 'elevenlabs-voice'
|
|
11253
|
+
| 'flux.1'
|
|
11254
|
+
| 'flux.1-composition'
|
|
11255
|
+
| 'flux.1-kontext-dev'
|
|
11256
|
+
| 'flux.1-kontext-lora'
|
|
11257
|
+
| 'flux.1-krea-dev'
|
|
11258
|
+
| 'flux.1-krea-lora'
|
|
11259
|
+
| 'flux.1-lora'
|
|
11260
|
+
| 'flux.1-pro'
|
|
11261
|
+
| 'flux.1.1-pro-ultra'
|
|
11262
|
+
| 'flux.2-dev-edit-lora'
|
|
11263
|
+
| 'flux.2-dev-lora'
|
|
11264
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
11265
|
+
| 'flux.2-klein-4b-lora'
|
|
11266
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
11267
|
+
| 'flux.2-klein-9b-lora'
|
|
11268
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
11269
|
+
| 'flux.2-klein-base-4b-lora'
|
|
11270
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
11271
|
+
| 'flux.2-klein-base-9b-lora'
|
|
11272
|
+
| 'flux1.1-pro'
|
|
11273
|
+
| 'gpt-image-1'
|
|
11274
|
+
| 'qwen-image-2512-lora'
|
|
11275
|
+
| 'qwen-image-edit-2509-lora'
|
|
11276
|
+
| 'qwen-image-edit-2511-lora'
|
|
11277
|
+
| 'qwen-image-edit-lora'
|
|
11278
|
+
| 'qwen-image-lora'
|
|
11279
|
+
| 'zimage-de-turbo-lora'
|
|
11280
|
+
| 'zimage-lora'
|
|
11281
|
+
| 'zimage-turbo-lora';
|
|
11282
|
+
}
|
|
11283
|
+
|
|
11284
|
+
export namespace ModelCreateParams {
|
|
11285
|
+
export interface Concept {
|
|
11286
|
+
/**
|
|
11287
|
+
* The model ID (example: "model_eyVcnFJcR92BxBkz7N6g5w")
|
|
11288
|
+
*/
|
|
11289
|
+
modelId: string;
|
|
11290
|
+
|
|
11291
|
+
/**
|
|
11292
|
+
* The scale of the model (example: 1.0) For Flux Kontext Prompt Editing, the scale
|
|
11293
|
+
* is between 0 and 2.
|
|
11294
|
+
*/
|
|
11295
|
+
scale: number;
|
|
11296
|
+
|
|
11297
|
+
/**
|
|
11298
|
+
* The epoch of the model (example: "000001") Only available for Flux Lora Trained
|
|
11299
|
+
* models
|
|
11300
|
+
*/
|
|
11301
|
+
modelEpoch?: string;
|
|
11302
|
+
}
|
|
11303
|
+
}
|
|
9825
11304
|
|
|
9826
11305
|
export interface ModelRetrieveParams {
|
|
9827
11306
|
/**
|
|
@@ -10319,7 +11798,9 @@ export interface ModelListParams extends ModelsCursorParams {
|
|
|
10319
11798
|
sortDirection?: 'asc' | 'desc';
|
|
10320
11799
|
|
|
10321
11800
|
/**
|
|
10322
|
-
* The status of the models to return. Only available when
|
|
11801
|
+
* The status of the models to return. Only available when
|
|
11802
|
+
* privacy=private/unlisted. "deleted" returns the models deleted in the last 30
|
|
11803
|
+
* days, each with its `deletedAt` date
|
|
10323
11804
|
*/
|
|
10324
11805
|
status?: 'new' | 'training' | 'trained' | 'failed' | 'deleted';
|
|
10325
11806
|
|
|
@@ -10558,6 +12039,19 @@ export interface ModelGetBulkParams {
|
|
|
10558
12039
|
trainingImagesPreview?: boolean;
|
|
10559
12040
|
}
|
|
10560
12041
|
|
|
12042
|
+
export interface ModelRestoreParams {
|
|
12043
|
+
/**
|
|
12044
|
+
* If set to true, returns the original asset without transformation
|
|
12045
|
+
*/
|
|
12046
|
+
originalAssets?: boolean;
|
|
12047
|
+
|
|
12048
|
+
/**
|
|
12049
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
12050
|
+
* or to set the owner of the resource(s)
|
|
12051
|
+
*/
|
|
12052
|
+
projectId?: string;
|
|
12053
|
+
}
|
|
12054
|
+
|
|
10561
12055
|
export interface ModelTransferParams {
|
|
10562
12056
|
/**
|
|
10563
12057
|
* Body param: The id of the project to copy and transfer the model to
|
|
@@ -10622,6 +12116,7 @@ export declare namespace Models {
|
|
|
10622
12116
|
type ModelDeleteImagesResponse as ModelDeleteImagesResponse,
|
|
10623
12117
|
type ModelDownloadResponse as ModelDownloadResponse,
|
|
10624
12118
|
type ModelGetBulkResponse as ModelGetBulkResponse,
|
|
12119
|
+
type ModelRestoreResponse as ModelRestoreResponse,
|
|
10625
12120
|
type ModelTransferResponse as ModelTransferResponse,
|
|
10626
12121
|
type ModelUpdateTagsResponse as ModelUpdateTagsResponse,
|
|
10627
12122
|
type ModelListResponsesModelsCursor as ModelListResponsesModelsCursor,
|
|
@@ -10634,6 +12129,7 @@ export declare namespace Models {
|
|
|
10634
12129
|
type ModelDeleteImagesParams as ModelDeleteImagesParams,
|
|
10635
12130
|
type ModelDownloadParams as ModelDownloadParams,
|
|
10636
12131
|
type ModelGetBulkParams as ModelGetBulkParams,
|
|
12132
|
+
type ModelRestoreParams as ModelRestoreParams,
|
|
10637
12133
|
type ModelTransferParams as ModelTransferParams,
|
|
10638
12134
|
type ModelUpdateTagsParams as ModelUpdateTagsParams,
|
|
10639
12135
|
};
|