@scenario-labs/sdk 1.1.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +51 -0
- package/client.d.mts +6 -6
- package/client.d.mts.map +1 -1
- package/client.d.ts +6 -6
- package/client.d.ts.map +1 -1
- package/client.js +67 -43
- package/client.js.map +1 -1
- package/client.mjs +67 -44
- package/client.mjs.map +1 -1
- package/core/api-promise.js +7 -7
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs +7 -7
- package/core/api-promise.mjs.map +1 -1
- package/core/error.js +6 -0
- package/core/error.js.map +1 -1
- package/core/error.mjs +6 -0
- package/core/error.mjs.map +1 -1
- package/core/pagination.js +24 -6
- package/core/pagination.js.map +1 -1
- package/core/pagination.mjs +24 -6
- package/core/pagination.mjs.map +1 -1
- package/core/resource.js +1 -0
- package/core/resource.js.map +1 -1
- package/core/resource.mjs +1 -0
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +1 -0
- package/index.d.mts.map +1 -1
- package/index.d.ts +1 -0
- package/index.d.ts.map +1 -1
- package/index.js +3 -1
- package/index.js.map +1 -1
- package/index.mjs +1 -0
- package/index.mjs.map +1 -1
- package/internal/detect-platform.js +1 -1
- package/internal/detect-platform.js.map +1 -1
- package/internal/detect-platform.mjs +1 -1
- package/internal/detect-platform.mjs.map +1 -1
- package/internal/qs/stringify.js +1 -1
- package/internal/qs/stringify.js.map +1 -1
- package/internal/qs/stringify.mjs +1 -1
- package/internal/qs/stringify.mjs.map +1 -1
- package/internal/request-options.d.mts +0 -4
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -4
- 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/to-file.js +2 -2
- package/internal/to-file.js.map +1 -1
- package/internal/to-file.mjs +2 -2
- package/internal/to-file.mjs.map +1 -1
- package/internal/tslib.js +0 -18
- package/internal/tslib.mjs +1 -17
- package/internal/types.d.mts +6 -6
- package/internal/types.d.mts.map +1 -1
- package/internal/types.d.ts +6 -6
- package/internal/types.d.ts.map +1 -1
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js +2 -0
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs +2 -0
- package/internal/utils/log.mjs.map +1 -1
- package/lib/job.js +3 -3
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +3 -3
- package/lib/job.mjs.map +1 -1
- package/lib/models.js +1 -4
- package/lib/models.js.map +1 -1
- package/lib/models.mjs +1 -4
- package/lib/models.mjs.map +1 -1
- package/lib/scenario.js +6 -9
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +6 -9
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.js +6 -6
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +6 -6
- package/lib/upload.mjs.map +1 -1
- package/lib/workflow.d.mts +2 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +2 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +2 -2
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +2 -2
- package/lib/workflow.mjs.map +1 -1
- package/lib/workflow_converter.d.mts +174 -0
- package/lib/workflow_converter.d.mts.map +1 -0
- package/lib/workflow_converter.d.ts +174 -0
- package/lib/workflow_converter.d.ts.map +1 -0
- package/lib/workflow_converter.js +995 -0
- package/lib/workflow_converter.js.map +1 -0
- package/lib/workflow_converter.mjs +992 -0
- package/lib/workflow_converter.mjs.map +1 -0
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +13 -5
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +13 -5
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +1 -8
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +1 -8
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +0 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +0 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js +1 -3
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs +0 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/collections/collections.js +2 -5
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +2 -5
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/generate.d.mts +96 -0
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +96 -0
- package/resources/generate.d.ts.map +1 -1
- package/resources/index.d.mts +2 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +46 -3
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +46 -3
- package/resources/jobs.d.ts.map +1 -1
- package/resources/models/examples.d.mts +24 -0
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +24 -0
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +55 -11
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +55 -11
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +4 -7
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +4 -7
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +24 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +24 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/oscu.d.mts +5 -0
- package/resources/oscu.d.mts.map +1 -1
- package/resources/oscu.d.ts +5 -0
- package/resources/oscu.d.ts.map +1 -1
- package/resources/oscu.js +5 -0
- package/resources/oscu.js.map +1 -1
- package/resources/oscu.mjs +5 -0
- package/resources/oscu.mjs.map +1 -1
- package/resources/pricing/index.d.mts +3 -0
- package/resources/pricing/index.d.mts.map +1 -0
- package/resources/pricing/index.d.ts +3 -0
- package/resources/pricing/index.d.ts.map +1 -0
- package/resources/pricing/index.js +9 -0
- package/resources/pricing/index.js.map +1 -0
- package/resources/pricing/index.mjs +4 -0
- package/resources/pricing/index.mjs.map +1 -0
- package/resources/pricing/oscu.d.mts +25 -0
- package/resources/pricing/oscu.d.mts.map +1 -0
- package/resources/pricing/oscu.d.ts +25 -0
- package/resources/pricing/oscu.d.ts.map +1 -0
- package/resources/pricing/oscu.js +16 -0
- package/resources/pricing/oscu.js.map +1 -0
- package/resources/pricing/oscu.mjs +12 -0
- package/resources/pricing/oscu.mjs.map +1 -0
- package/resources/pricing/pricing.d.mts +10 -0
- package/resources/pricing/pricing.d.mts.map +1 -0
- package/resources/pricing/pricing.d.ts +10 -0
- package/resources/pricing/pricing.d.ts.map +1 -0
- package/resources/pricing/pricing.js +14 -0
- package/resources/pricing/pricing.js.map +1 -0
- package/resources/pricing/pricing.mjs +9 -0
- package/resources/pricing/pricing.mjs.map +1 -0
- package/resources/pricing.d.mts +2 -0
- package/resources/pricing.d.mts.map +1 -0
- package/resources/pricing.d.ts +2 -0
- package/resources/pricing.d.ts.map +1 -0
- package/resources/pricing.js +6 -0
- package/resources/pricing.js.map +1 -0
- package/resources/pricing.mjs +3 -0
- package/resources/pricing.mjs.map +1 -0
- package/resources/usages.d.mts +29 -4
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +29 -4
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +1298 -1152
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +1298 -1152
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +8 -4
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +8 -4
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +24 -11
- package/src/index.ts +14 -0
- package/src/internal/request-options.ts +0 -2
- package/src/internal/types.ts +6 -8
- package/src/internal/utils/log.ts +2 -0
- package/src/lib/workflow.ts +4 -4
- package/src/lib/workflow_converter.ts +1250 -0
- package/src/resources/assets/assets.ts +17 -13
- package/src/resources/assets/index.ts +0 -6
- package/src/resources/generate.ts +112 -0
- package/src/resources/index.ts +3 -1
- package/src/resources/jobs.ts +54 -4
- package/src/resources/models/examples.ts +28 -0
- package/src/resources/models/models.ts +100 -11
- package/src/resources/models/train.ts +28 -0
- package/src/resources/oscu.ts +5 -0
- package/src/resources/pricing/index.ts +4 -0
- package/src/resources/pricing/oscu.ts +35 -0
- package/src/resources/pricing/pricing.ts +15 -0
- package/src/resources/pricing.ts +3 -0
- package/src/resources/usages.ts +33 -3
- package/src/resources/workflows.ts +1691 -1519
- 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
- package/resources/assets/public.d.mts +0 -1538
- package/resources/assets/public.d.mts.map +0 -1
- package/resources/assets/public.d.ts +0 -1538
- package/resources/assets/public.d.ts.map +0 -1
- package/resources/assets/public.js +0 -28
- package/resources/assets/public.js.map +0 -1
- package/resources/assets/public.mjs +0 -24
- package/resources/assets/public.mjs.map +0 -1
- package/src/resources/assets/public.ts +0 -2461
|
@@ -53,15 +53,9 @@ export class Workflows extends APIResource {
|
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
|
-
*
|
|
56
|
+
* @deprecated Use `userApproval()` instead
|
|
57
57
|
*/
|
|
58
|
-
approveUser
|
|
59
|
-
workflowID: string,
|
|
60
|
-
body: WorkflowApproveUserParams,
|
|
61
|
-
options?: RequestOptions,
|
|
62
|
-
): APIPromise<WorkflowApproveUserResponse> {
|
|
63
|
-
return this._client.put(path`/workflows/${workflowID}/user-approval`, { body, ...options });
|
|
64
|
-
}
|
|
58
|
+
approveUser = this.userApproval;
|
|
65
59
|
|
|
66
60
|
/**
|
|
67
61
|
* Get all unique tags from workflows in a project (all privacy levels). Optionally
|
|
@@ -89,6 +83,17 @@ export class Workflows extends APIResource {
|
|
|
89
83
|
...options,
|
|
90
84
|
});
|
|
91
85
|
}
|
|
86
|
+
|
|
87
|
+
/**
|
|
88
|
+
* Approve a user approval node in a workflow
|
|
89
|
+
*/
|
|
90
|
+
userApproval(
|
|
91
|
+
workflowID: string,
|
|
92
|
+
body: WorkflowUserApprovalParams,
|
|
93
|
+
options?: RequestOptions,
|
|
94
|
+
): APIPromise<WorkflowUserApprovalResponse> {
|
|
95
|
+
return this._client.put(path`/workflows/${workflowID}/user-approval`, { body, ...options });
|
|
96
|
+
}
|
|
92
97
|
}
|
|
93
98
|
|
|
94
99
|
export type WorkflowListResponsesWorkflowsCursor = WorkflowsCursor<WorkflowListResponse>;
|
|
@@ -433,6 +438,13 @@ export namespace WorkflowCreateResponse {
|
|
|
433
438
|
*/
|
|
434
439
|
max?: number;
|
|
435
440
|
|
|
441
|
+
/**
|
|
442
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
443
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
444
|
+
* \`asset.properties.duration\` at job creation time.
|
|
445
|
+
*/
|
|
446
|
+
maxDuration?: number;
|
|
447
|
+
|
|
436
448
|
/**
|
|
437
449
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
438
450
|
* \`string_array\`.
|
|
@@ -659,6 +671,13 @@ export namespace WorkflowCreateResponse {
|
|
|
659
671
|
*/
|
|
660
672
|
max?: number;
|
|
661
673
|
|
|
674
|
+
/**
|
|
675
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
676
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
677
|
+
* \`asset.properties.duration\` at job creation time.
|
|
678
|
+
*/
|
|
679
|
+
maxDuration?: number;
|
|
680
|
+
|
|
662
681
|
/**
|
|
663
682
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
664
683
|
* \`string_array\`.
|
|
@@ -1067,6 +1086,13 @@ export namespace WorkflowCreateResponse {
|
|
|
1067
1086
|
*/
|
|
1068
1087
|
max?: number;
|
|
1069
1088
|
|
|
1089
|
+
/**
|
|
1090
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
1091
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
1092
|
+
* \`asset.properties.duration\` at job creation time.
|
|
1093
|
+
*/
|
|
1094
|
+
maxDuration?: number;
|
|
1095
|
+
|
|
1070
1096
|
/**
|
|
1071
1097
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1072
1098
|
* \`string_array\`.
|
|
@@ -1738,6 +1764,13 @@ export namespace WorkflowRetrieveResponse {
|
|
|
1738
1764
|
*/
|
|
1739
1765
|
max?: number;
|
|
1740
1766
|
|
|
1767
|
+
/**
|
|
1768
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
1769
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
1770
|
+
* \`asset.properties.duration\` at job creation time.
|
|
1771
|
+
*/
|
|
1772
|
+
maxDuration?: number;
|
|
1773
|
+
|
|
1741
1774
|
/**
|
|
1742
1775
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1743
1776
|
* \`string_array\`.
|
|
@@ -1964,6 +1997,13 @@ export namespace WorkflowRetrieveResponse {
|
|
|
1964
1997
|
*/
|
|
1965
1998
|
max?: number;
|
|
1966
1999
|
|
|
2000
|
+
/**
|
|
2001
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
2002
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
2003
|
+
* \`asset.properties.duration\` at job creation time.
|
|
2004
|
+
*/
|
|
2005
|
+
maxDuration?: number;
|
|
2006
|
+
|
|
1967
2007
|
/**
|
|
1968
2008
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1969
2009
|
* \`string_array\`.
|
|
@@ -2372,6 +2412,13 @@ export namespace WorkflowRetrieveResponse {
|
|
|
2372
2412
|
*/
|
|
2373
2413
|
max?: number;
|
|
2374
2414
|
|
|
2415
|
+
/**
|
|
2416
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
2417
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
2418
|
+
* \`asset.properties.duration\` at job creation time.
|
|
2419
|
+
*/
|
|
2420
|
+
maxDuration?: number;
|
|
2421
|
+
|
|
2375
2422
|
/**
|
|
2376
2423
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
2377
2424
|
* \`string_array\`.
|
|
@@ -3043,6 +3090,13 @@ export namespace WorkflowUpdateResponse {
|
|
|
3043
3090
|
*/
|
|
3044
3091
|
max?: number;
|
|
3045
3092
|
|
|
3093
|
+
/**
|
|
3094
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
3095
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
3096
|
+
* \`asset.properties.duration\` at job creation time.
|
|
3097
|
+
*/
|
|
3098
|
+
maxDuration?: number;
|
|
3099
|
+
|
|
3046
3100
|
/**
|
|
3047
3101
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3048
3102
|
* \`string_array\`.
|
|
@@ -3269,6 +3323,13 @@ export namespace WorkflowUpdateResponse {
|
|
|
3269
3323
|
*/
|
|
3270
3324
|
max?: number;
|
|
3271
3325
|
|
|
3326
|
+
/**
|
|
3327
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
3328
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
3329
|
+
* \`asset.properties.duration\` at job creation time.
|
|
3330
|
+
*/
|
|
3331
|
+
maxDuration?: number;
|
|
3332
|
+
|
|
3272
3333
|
/**
|
|
3273
3334
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3274
3335
|
* \`string_array\`.
|
|
@@ -3677,6 +3738,13 @@ export namespace WorkflowUpdateResponse {
|
|
|
3677
3738
|
*/
|
|
3678
3739
|
max?: number;
|
|
3679
3740
|
|
|
3741
|
+
/**
|
|
3742
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
3743
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
3744
|
+
* \`asset.properties.duration\` at job creation time.
|
|
3745
|
+
*/
|
|
3746
|
+
maxDuration?: number;
|
|
3747
|
+
|
|
3680
3748
|
/**
|
|
3681
3749
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3682
3750
|
* \`string_array\`.
|
|
@@ -4343,6 +4411,13 @@ export namespace WorkflowListResponse {
|
|
|
4343
4411
|
*/
|
|
4344
4412
|
max?: number;
|
|
4345
4413
|
|
|
4414
|
+
/**
|
|
4415
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
4416
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
4417
|
+
* \`asset.properties.duration\` at job creation time.
|
|
4418
|
+
*/
|
|
4419
|
+
maxDuration?: number;
|
|
4420
|
+
|
|
4346
4421
|
/**
|
|
4347
4422
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4348
4423
|
* \`string_array\`.
|
|
@@ -4569,6 +4644,13 @@ export namespace WorkflowListResponse {
|
|
|
4569
4644
|
*/
|
|
4570
4645
|
max?: number;
|
|
4571
4646
|
|
|
4647
|
+
/**
|
|
4648
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
4649
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
4650
|
+
* \`asset.properties.duration\` at job creation time.
|
|
4651
|
+
*/
|
|
4652
|
+
maxDuration?: number;
|
|
4653
|
+
|
|
4572
4654
|
/**
|
|
4573
4655
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4574
4656
|
* \`string_array\`.
|
|
@@ -4977,6 +5059,13 @@ export namespace WorkflowListResponse {
|
|
|
4977
5059
|
*/
|
|
4978
5060
|
max?: number;
|
|
4979
5061
|
|
|
5062
|
+
/**
|
|
5063
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
5064
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
5065
|
+
* \`asset.properties.duration\` at job creation time.
|
|
5066
|
+
*/
|
|
5067
|
+
maxDuration?: number;
|
|
5068
|
+
|
|
4980
5069
|
/**
|
|
4981
5070
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4982
5071
|
* \`string_array\`.
|
|
@@ -5309,11 +5398,20 @@ export namespace WorkflowListResponse {
|
|
|
5309
5398
|
|
|
5310
5399
|
export type WorkflowDeleteResponse = unknown;
|
|
5311
5400
|
|
|
5312
|
-
export interface
|
|
5313
|
-
|
|
5401
|
+
export interface WorkflowGetTagsResponse {
|
|
5402
|
+
/**
|
|
5403
|
+
* Array of unique tags from workflows in the project
|
|
5404
|
+
*/
|
|
5405
|
+
tags: Array<string>;
|
|
5406
|
+
}
|
|
5407
|
+
|
|
5408
|
+
export interface WorkflowRunResponse {
|
|
5409
|
+
job: WorkflowRunResponse.Job;
|
|
5410
|
+
|
|
5411
|
+
workflow: WorkflowRunResponse.Workflow;
|
|
5314
5412
|
}
|
|
5315
5413
|
|
|
5316
|
-
export namespace
|
|
5414
|
+
export namespace WorkflowRunResponse {
|
|
5317
5415
|
export interface Job {
|
|
5318
5416
|
/**
|
|
5319
5417
|
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
@@ -5703,6 +5801,13 @@ export namespace WorkflowApproveUserResponse {
|
|
|
5703
5801
|
*/
|
|
5704
5802
|
max?: number;
|
|
5705
5803
|
|
|
5804
|
+
/**
|
|
5805
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
5806
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
5807
|
+
* \`asset.properties.duration\` at job creation time.
|
|
5808
|
+
*/
|
|
5809
|
+
maxDuration?: number;
|
|
5810
|
+
|
|
5706
5811
|
/**
|
|
5707
5812
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5708
5813
|
* \`string_array\`.
|
|
@@ -5929,6 +6034,13 @@ export namespace WorkflowApproveUserResponse {
|
|
|
5929
6034
|
*/
|
|
5930
6035
|
max?: number;
|
|
5931
6036
|
|
|
6037
|
+
/**
|
|
6038
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
6039
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
6040
|
+
* \`asset.properties.duration\` at job creation time.
|
|
6041
|
+
*/
|
|
6042
|
+
maxDuration?: number;
|
|
6043
|
+
|
|
5932
6044
|
/**
|
|
5933
6045
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5934
6046
|
* \`string_array\`.
|
|
@@ -6259,313 +6371,484 @@ export namespace WorkflowApproveUserResponse {
|
|
|
6259
6371
|
cuDiscount: number;
|
|
6260
6372
|
}
|
|
6261
6373
|
}
|
|
6262
|
-
}
|
|
6263
|
-
|
|
6264
|
-
export interface WorkflowGetTagsResponse {
|
|
6265
|
-
/**
|
|
6266
|
-
* Array of unique tags from workflows in the project
|
|
6267
|
-
*/
|
|
6268
|
-
tags: Array<string>;
|
|
6269
|
-
}
|
|
6270
6374
|
|
|
6271
|
-
export interface
|
|
6272
|
-
|
|
6375
|
+
export interface Workflow {
|
|
6376
|
+
/**
|
|
6377
|
+
* Unique identifier of the workflow.
|
|
6378
|
+
*/
|
|
6379
|
+
id: string;
|
|
6273
6380
|
|
|
6274
|
-
|
|
6275
|
-
|
|
6381
|
+
/**
|
|
6382
|
+
* User that created the workflow.
|
|
6383
|
+
*/
|
|
6384
|
+
authorId: string;
|
|
6276
6385
|
|
|
6277
|
-
export namespace WorkflowRunResponse {
|
|
6278
|
-
export interface Job {
|
|
6279
6386
|
/**
|
|
6280
|
-
*
|
|
6387
|
+
* ISO string
|
|
6281
6388
|
*/
|
|
6282
6389
|
createdAt: string;
|
|
6283
6390
|
|
|
6284
6391
|
/**
|
|
6285
|
-
*
|
|
6392
|
+
* Full description of what the workflow does.
|
|
6286
6393
|
*/
|
|
6287
|
-
|
|
6394
|
+
description: string;
|
|
6288
6395
|
|
|
6289
6396
|
/**
|
|
6290
|
-
* The
|
|
6397
|
+
* The UI data about the workflow. This is managed by scenario webapp.
|
|
6291
6398
|
*/
|
|
6292
|
-
|
|
6293
|
-
| 'assets-download'
|
|
6294
|
-
| 'canvas-export'
|
|
6295
|
-
| 'caption'
|
|
6296
|
-
| 'caption-llava'
|
|
6297
|
-
| 'custom'
|
|
6298
|
-
| 'describe-style'
|
|
6299
|
-
| 'detection'
|
|
6300
|
-
| 'embed'
|
|
6301
|
-
| 'flux'
|
|
6302
|
-
| 'flux-model-training'
|
|
6303
|
-
| 'generate-prompt'
|
|
6304
|
-
| 'image-generation'
|
|
6305
|
-
| 'image-prompt-editing'
|
|
6306
|
-
| 'inference'
|
|
6307
|
-
| 'mesh-preview-rendering'
|
|
6308
|
-
| 'model-download'
|
|
6309
|
-
| 'model-import'
|
|
6310
|
-
| 'model-training'
|
|
6311
|
-
| 'musubi-model-training'
|
|
6312
|
-
| 'openai-image-generation'
|
|
6313
|
-
| 'patch-image'
|
|
6314
|
-
| 'pixelate'
|
|
6315
|
-
| 'reframe'
|
|
6316
|
-
| 'remove-background'
|
|
6317
|
-
| 'repaint'
|
|
6318
|
-
| 'restyle'
|
|
6319
|
-
| 'segment'
|
|
6320
|
-
| 'skybox-3d'
|
|
6321
|
-
| 'skybox-base-360'
|
|
6322
|
-
| 'skybox-hdri'
|
|
6323
|
-
| 'skybox-upscale-360'
|
|
6324
|
-
| 'texture'
|
|
6325
|
-
| 'translate'
|
|
6326
|
-
| 'upload'
|
|
6327
|
-
| 'upscale'
|
|
6328
|
-
| 'upscale-skybox'
|
|
6329
|
-
| 'upscale-texture'
|
|
6330
|
-
| 'vectorize'
|
|
6331
|
-
| 'workflow';
|
|
6399
|
+
editorInfo: { [key: string]: unknown };
|
|
6332
6400
|
|
|
6333
6401
|
/**
|
|
6334
|
-
*
|
|
6402
|
+
* The flow of the workflow.
|
|
6335
6403
|
*/
|
|
6336
|
-
|
|
6404
|
+
flow: Array<Workflow.Flow>;
|
|
6337
6405
|
|
|
6338
6406
|
/**
|
|
6339
|
-
*
|
|
6407
|
+
* The inputs of the workflow.
|
|
6340
6408
|
*/
|
|
6341
|
-
|
|
6409
|
+
inputs: Array<Workflow.Input>;
|
|
6342
6410
|
|
|
6343
6411
|
/**
|
|
6344
|
-
*
|
|
6412
|
+
* Human-readable name of the workflow.
|
|
6345
6413
|
*/
|
|
6346
|
-
|
|
6347
|
-
| 'canceled'
|
|
6348
|
-
| 'failure'
|
|
6349
|
-
| 'finalizing'
|
|
6350
|
-
| 'in-progress'
|
|
6351
|
-
| 'pending'
|
|
6352
|
-
| 'queued'
|
|
6353
|
-
| 'success'
|
|
6354
|
-
| 'warming-up';
|
|
6414
|
+
name: string;
|
|
6355
6415
|
|
|
6356
6416
|
/**
|
|
6357
|
-
*
|
|
6358
|
-
* date of when the job reached each statuses.
|
|
6417
|
+
* Project that owns the workflow.
|
|
6359
6418
|
*/
|
|
6360
|
-
|
|
6419
|
+
ownerId: string;
|
|
6361
6420
|
|
|
6362
6421
|
/**
|
|
6363
|
-
*
|
|
6422
|
+
* Visibility setting for the workflow.
|
|
6364
6423
|
*/
|
|
6365
|
-
|
|
6424
|
+
privacy: 'private' | 'public' | 'unlisted';
|
|
6366
6425
|
|
|
6367
6426
|
/**
|
|
6368
|
-
*
|
|
6427
|
+
* Short summary of the workflow.
|
|
6369
6428
|
*/
|
|
6370
|
-
|
|
6429
|
+
shortDescription: string;
|
|
6371
6430
|
|
|
6372
6431
|
/**
|
|
6373
|
-
*
|
|
6432
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
6374
6433
|
*/
|
|
6375
|
-
|
|
6434
|
+
status: 'deleted' | 'draft' | 'ready';
|
|
6376
6435
|
|
|
6377
6436
|
/**
|
|
6378
|
-
* The
|
|
6437
|
+
* The tag set of the workflow.
|
|
6379
6438
|
*/
|
|
6380
|
-
|
|
6381
|
-
}
|
|
6439
|
+
tagSet: Array<string>;
|
|
6382
6440
|
|
|
6383
|
-
export namespace Job {
|
|
6384
6441
|
/**
|
|
6385
|
-
*
|
|
6442
|
+
* ISO string
|
|
6386
6443
|
*/
|
|
6387
|
-
|
|
6388
|
-
/**
|
|
6389
|
-
* List of produced assets for this job
|
|
6390
|
-
*/
|
|
6391
|
-
assetIds?: Array<string>;
|
|
6392
|
-
|
|
6393
|
-
/**
|
|
6394
|
-
* Eventual error for the job
|
|
6395
|
-
*/
|
|
6396
|
-
error?: string | null;
|
|
6444
|
+
updatedAt: string;
|
|
6397
6445
|
|
|
6398
|
-
|
|
6399
|
-
|
|
6400
|
-
|
|
6401
|
-
|
|
6446
|
+
/**
|
|
6447
|
+
* A representation of an asset after being processed by the workflow
|
|
6448
|
+
*/
|
|
6449
|
+
after?: Workflow.After;
|
|
6402
6450
|
|
|
6403
|
-
|
|
6404
|
-
|
|
6405
|
-
|
|
6406
|
-
|
|
6451
|
+
/**
|
|
6452
|
+
* A representation of an asset before being processed by the workflow
|
|
6453
|
+
*/
|
|
6454
|
+
before?: Workflow.Before;
|
|
6407
6455
|
|
|
6408
|
-
|
|
6409
|
-
|
|
6410
|
-
|
|
6411
|
-
|
|
6456
|
+
/**
|
|
6457
|
+
* Embedding is a map of embedding version into embedding date
|
|
6458
|
+
*/
|
|
6459
|
+
embedding?: unknown;
|
|
6412
6460
|
|
|
6413
|
-
|
|
6414
|
-
|
|
6415
|
-
|
|
6416
|
-
|
|
6417
|
-
|
|
6418
|
-
output?: { [key: string]: unknown };
|
|
6461
|
+
/**
|
|
6462
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
6463
|
+
* except by the author or a project admin.
|
|
6464
|
+
*/
|
|
6465
|
+
isLocked?: boolean;
|
|
6419
6466
|
|
|
6420
|
-
|
|
6421
|
-
* For voice-clone jobs: the ID of the model being trained.
|
|
6422
|
-
*/
|
|
6423
|
-
outputModelId?: string;
|
|
6467
|
+
lastIndexedAt?: string;
|
|
6424
6468
|
|
|
6425
|
-
|
|
6426
|
-
|
|
6427
|
-
|
|
6428
|
-
|
|
6469
|
+
/**
|
|
6470
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
6471
|
+
*/
|
|
6472
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
6429
6473
|
|
|
6430
|
-
|
|
6431
|
-
|
|
6432
|
-
|
|
6433
|
-
|
|
6434
|
-
|
|
6474
|
+
/**
|
|
6475
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
6476
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
6477
|
+
* in the Ready state.
|
|
6478
|
+
*/
|
|
6479
|
+
lastReadyFlowUpdatedAt?: string;
|
|
6435
6480
|
|
|
6436
|
-
|
|
6437
|
-
|
|
6438
|
-
|
|
6439
|
-
|
|
6440
|
-
|
|
6441
|
-
|
|
6481
|
+
/**
|
|
6482
|
+
* ISO string timestamp when lock state was last changed.
|
|
6483
|
+
*/
|
|
6484
|
+
lockedStateChangedAt?: string;
|
|
6485
|
+
|
|
6486
|
+
/**
|
|
6487
|
+
* UserId of the user who last changed the lock state.
|
|
6488
|
+
*/
|
|
6489
|
+
lockedStateChangedBy?: string;
|
|
6490
|
+
|
|
6491
|
+
/**
|
|
6492
|
+
* Asset kinds produced by this workflow (if specified).
|
|
6493
|
+
*/
|
|
6494
|
+
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
6495
|
+
|
|
6496
|
+
/**
|
|
6497
|
+
* Currently the thumbnail is identical to the after asset.
|
|
6498
|
+
*/
|
|
6499
|
+
thumbnail?: Workflow.Thumbnail;
|
|
6500
|
+
|
|
6501
|
+
/**
|
|
6502
|
+
* The UI configuration for the workflow. This is managed by scenario webapp.
|
|
6503
|
+
*/
|
|
6504
|
+
uiConfig?: Workflow.UiConfig;
|
|
6505
|
+
}
|
|
6506
|
+
|
|
6507
|
+
export namespace Workflow {
|
|
6508
|
+
export interface Flow {
|
|
6509
|
+
/**
|
|
6510
|
+
* The id of the node.
|
|
6511
|
+
*/
|
|
6512
|
+
id: string;
|
|
6513
|
+
|
|
6514
|
+
/**
|
|
6515
|
+
* The type of the job for the node.
|
|
6516
|
+
*/
|
|
6517
|
+
type:
|
|
6518
|
+
| 'custom-model'
|
|
6519
|
+
| 'for-each'
|
|
6520
|
+
| 'generate-prompt'
|
|
6521
|
+
| 'list'
|
|
6522
|
+
| 'logic'
|
|
6523
|
+
| 'model'
|
|
6524
|
+
| 'remove-background'
|
|
6525
|
+
| 'transform'
|
|
6526
|
+
| 'user-approval'
|
|
6527
|
+
| 'workflow';
|
|
6528
|
+
|
|
6529
|
+
/**
|
|
6530
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
6531
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
6532
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
6533
|
+
*/
|
|
6534
|
+
count?: number;
|
|
6535
|
+
|
|
6536
|
+
/**
|
|
6537
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
6538
|
+
* dependencies. Mainly used for user approval nodes.
|
|
6539
|
+
*/
|
|
6540
|
+
dependsOn?: Array<string>;
|
|
6442
6541
|
|
|
6542
|
+
/**
|
|
6543
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
6544
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
6545
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
6546
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
6547
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
6548
|
+
*/
|
|
6549
|
+
includeOutputsInWorkflowJob?: true;
|
|
6550
|
+
|
|
6551
|
+
/**
|
|
6552
|
+
* The inputs of the node.
|
|
6553
|
+
*/
|
|
6554
|
+
inputs?: Array<Flow.Input>;
|
|
6555
|
+
|
|
6556
|
+
/**
|
|
6557
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
6558
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
6559
|
+
* numbers, or asset IDs.
|
|
6560
|
+
*/
|
|
6561
|
+
items?: Array<string>;
|
|
6562
|
+
|
|
6563
|
+
/**
|
|
6564
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
6565
|
+
* dynamically-created copies of loop body nodes.
|
|
6566
|
+
*/
|
|
6567
|
+
iterationIndex?: number;
|
|
6568
|
+
|
|
6569
|
+
/**
|
|
6570
|
+
* The logic of the node. Only available for logic nodes.
|
|
6571
|
+
*/
|
|
6572
|
+
logic?: Flow.Logic;
|
|
6573
|
+
|
|
6574
|
+
/**
|
|
6575
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
6576
|
+
*/
|
|
6577
|
+
logicType?: 'if-else';
|
|
6578
|
+
|
|
6579
|
+
/**
|
|
6580
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
6581
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
6582
|
+
* for ForEach nodes.
|
|
6583
|
+
*/
|
|
6584
|
+
loopBodyNodeIds?: Array<string>;
|
|
6585
|
+
|
|
6586
|
+
/**
|
|
6587
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
6588
|
+
* dynamically-created copies of loop body nodes.
|
|
6589
|
+
*/
|
|
6590
|
+
loopNodeId?: string;
|
|
6591
|
+
|
|
6592
|
+
/**
|
|
6593
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
6594
|
+
*/
|
|
6595
|
+
modelId?: string;
|
|
6596
|
+
|
|
6597
|
+
/**
|
|
6598
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
6599
|
+
*/
|
|
6600
|
+
workflowId?: string;
|
|
6601
|
+
}
|
|
6602
|
+
|
|
6603
|
+
export namespace Flow {
|
|
6604
|
+
/**
|
|
6605
|
+
* This is used to run the flow.
|
|
6606
|
+
*/
|
|
6607
|
+
export interface Input {
|
|
6443
6608
|
/**
|
|
6444
|
-
* The
|
|
6609
|
+
* The name that must be user to call the model through the API
|
|
6445
6610
|
*/
|
|
6446
|
-
|
|
6611
|
+
name: string;
|
|
6447
6612
|
|
|
6448
6613
|
/**
|
|
6449
|
-
* The type of the
|
|
6614
|
+
* The data type of the input
|
|
6450
6615
|
*/
|
|
6451
6616
|
type:
|
|
6452
|
-
| '
|
|
6453
|
-
| '
|
|
6454
|
-
| '
|
|
6455
|
-
| '
|
|
6456
|
-
| 'logic'
|
|
6617
|
+
| 'boolean'
|
|
6618
|
+
| 'file'
|
|
6619
|
+
| 'file_array'
|
|
6620
|
+
| 'inputs_array'
|
|
6457
6621
|
| 'model'
|
|
6458
|
-
| '
|
|
6459
|
-
| '
|
|
6460
|
-
| '
|
|
6461
|
-
| '
|
|
6622
|
+
| 'model_array'
|
|
6623
|
+
| 'number'
|
|
6624
|
+
| 'number_array'
|
|
6625
|
+
| 'string'
|
|
6626
|
+
| 'string_array';
|
|
6462
6627
|
|
|
6463
6628
|
/**
|
|
6464
|
-
*
|
|
6629
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
6630
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
6631
|
+
* dropdown.
|
|
6465
6632
|
*/
|
|
6466
|
-
|
|
6633
|
+
allowedValues?: Array<unknown>;
|
|
6467
6634
|
|
|
6468
6635
|
/**
|
|
6469
|
-
*
|
|
6470
|
-
*
|
|
6471
|
-
* the resolved array input. Only available for ForEach nodes.
|
|
6636
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
6637
|
+
* \`file_array\` input types with kind \`image\`.
|
|
6472
6638
|
*/
|
|
6473
|
-
|
|
6639
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
6474
6640
|
|
|
6475
6641
|
/**
|
|
6476
|
-
*
|
|
6477
|
-
* dependencies. Mainly used for user approval nodes.
|
|
6642
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
6478
6643
|
*/
|
|
6479
|
-
|
|
6644
|
+
color?: boolean;
|
|
6480
6645
|
|
|
6481
6646
|
/**
|
|
6482
|
-
*
|
|
6483
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
6484
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
6485
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
6486
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
6647
|
+
* Whether this input affects the model's cost calculation
|
|
6487
6648
|
*/
|
|
6488
|
-
|
|
6649
|
+
costImpact?: boolean;
|
|
6489
6650
|
|
|
6490
6651
|
/**
|
|
6491
|
-
* The
|
|
6652
|
+
* The default value for the input
|
|
6492
6653
|
*/
|
|
6493
|
-
|
|
6654
|
+
default?: unknown;
|
|
6494
6655
|
|
|
6495
6656
|
/**
|
|
6496
|
-
*
|
|
6497
|
-
* when executed. Only available for List nodes. The values can be strings,
|
|
6498
|
-
* numbers, or asset IDs.
|
|
6657
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
6499
6658
|
*/
|
|
6500
|
-
|
|
6659
|
+
description?: string;
|
|
6501
6660
|
|
|
6502
6661
|
/**
|
|
6503
|
-
*
|
|
6504
|
-
*
|
|
6662
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
6663
|
+
* value appear consecutively in the UI.
|
|
6505
6664
|
*/
|
|
6506
|
-
|
|
6665
|
+
group?: string;
|
|
6507
6666
|
|
|
6508
6667
|
/**
|
|
6509
|
-
*
|
|
6510
|
-
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
6511
|
-
* not started.
|
|
6668
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
6512
6669
|
*/
|
|
6513
|
-
|
|
6670
|
+
hint?: string;
|
|
6514
6671
|
|
|
6515
6672
|
/**
|
|
6516
|
-
* The
|
|
6673
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
6674
|
+
* the same as the current object. This is only available for type inputs_array
|
|
6675
|
+
* inputs.
|
|
6517
6676
|
*/
|
|
6518
|
-
|
|
6677
|
+
inputs?: Array<{ [key: string]: unknown }>;
|
|
6519
6678
|
|
|
6520
6679
|
/**
|
|
6521
|
-
* The
|
|
6680
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
6681
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
6682
|
+
* type.
|
|
6522
6683
|
*/
|
|
6523
|
-
|
|
6684
|
+
items?: Array<Array<Input.Item>>;
|
|
6524
6685
|
|
|
6525
6686
|
/**
|
|
6526
|
-
*
|
|
6527
|
-
*
|
|
6528
|
-
*
|
|
6687
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
6688
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6689
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
6690
|
+
* data:kind, prefix
|
|
6529
6691
|
*/
|
|
6530
|
-
|
|
6692
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
6531
6693
|
|
|
6532
6694
|
/**
|
|
6533
|
-
*
|
|
6534
|
-
* dynamically-created copies of loop body nodes.
|
|
6695
|
+
* The label displayed in the UI for this input
|
|
6535
6696
|
*/
|
|
6536
|
-
|
|
6697
|
+
label?: string;
|
|
6537
6698
|
|
|
6538
6699
|
/**
|
|
6539
|
-
* The
|
|
6700
|
+
* The name of the file input field to use as the mask source
|
|
6540
6701
|
*/
|
|
6541
|
-
|
|
6702
|
+
maskFrom?: string;
|
|
6542
6703
|
|
|
6543
6704
|
/**
|
|
6544
|
-
* The
|
|
6705
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
6706
|
+
* types.
|
|
6545
6707
|
*/
|
|
6546
|
-
|
|
6708
|
+
max?: number;
|
|
6547
6709
|
|
|
6548
6710
|
/**
|
|
6549
|
-
* The
|
|
6711
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
6712
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
6713
|
+
* \`asset.properties.duration\` at job creation time.
|
|
6550
6714
|
*/
|
|
6551
|
-
|
|
6552
|
-
}
|
|
6553
|
-
|
|
6554
|
-
export namespace Flow {
|
|
6555
|
-
export interface Asset {
|
|
6556
|
-
assetId: string;
|
|
6557
|
-
|
|
6558
|
-
url: string;
|
|
6559
|
-
}
|
|
6715
|
+
maxDuration?: number;
|
|
6560
6716
|
|
|
6561
6717
|
/**
|
|
6562
|
-
*
|
|
6718
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
6719
|
+
* \`string_array\`.
|
|
6563
6720
|
*/
|
|
6564
|
-
|
|
6565
|
-
|
|
6566
|
-
|
|
6567
|
-
|
|
6568
|
-
|
|
6721
|
+
maxLength?: number;
|
|
6722
|
+
|
|
6723
|
+
/**
|
|
6724
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
6725
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
6726
|
+
* creation time.
|
|
6727
|
+
*/
|
|
6728
|
+
maxSize?: number;
|
|
6729
|
+
|
|
6730
|
+
/**
|
|
6731
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
6732
|
+
*/
|
|
6733
|
+
min?: number;
|
|
6734
|
+
|
|
6735
|
+
/**
|
|
6736
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
6737
|
+
* \`string_array\`.
|
|
6738
|
+
*/
|
|
6739
|
+
minLength?: number;
|
|
6740
|
+
|
|
6741
|
+
/**
|
|
6742
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
6743
|
+
* available for \`model_array\` input type.
|
|
6744
|
+
*/
|
|
6745
|
+
modelTypes?: Array<
|
|
6746
|
+
| 'custom'
|
|
6747
|
+
| 'elevenlabs-voice'
|
|
6748
|
+
| 'flux.1'
|
|
6749
|
+
| 'flux.1-composition'
|
|
6750
|
+
| 'flux.1-kontext-dev'
|
|
6751
|
+
| 'flux.1-kontext-lora'
|
|
6752
|
+
| 'flux.1-krea-dev'
|
|
6753
|
+
| 'flux.1-krea-lora'
|
|
6754
|
+
| 'flux.1-lora'
|
|
6755
|
+
| 'flux.1-pro'
|
|
6756
|
+
| 'flux.1.1-pro-ultra'
|
|
6757
|
+
| 'flux.2-dev-edit-lora'
|
|
6758
|
+
| 'flux.2-dev-lora'
|
|
6759
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
6760
|
+
| 'flux.2-klein-4b-lora'
|
|
6761
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
6762
|
+
| 'flux.2-klein-9b-lora'
|
|
6763
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
6764
|
+
| 'flux.2-klein-base-4b-lora'
|
|
6765
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
6766
|
+
| 'flux.2-klein-base-9b-lora'
|
|
6767
|
+
| 'flux1.1-pro'
|
|
6768
|
+
| 'gpt-image-1'
|
|
6769
|
+
| 'qwen-image-2512-lora'
|
|
6770
|
+
| 'qwen-image-edit-2509-lora'
|
|
6771
|
+
| 'qwen-image-edit-2511-lora'
|
|
6772
|
+
| 'qwen-image-edit-lora'
|
|
6773
|
+
| 'qwen-image-lora'
|
|
6774
|
+
| 'sd-1_5'
|
|
6775
|
+
| 'sd-1_5-composition'
|
|
6776
|
+
| 'sd-1_5-lora'
|
|
6777
|
+
| 'sd-xl'
|
|
6778
|
+
| 'sd-xl-composition'
|
|
6779
|
+
| 'sd-xl-lora'
|
|
6780
|
+
| 'zimage-de-turbo-lora'
|
|
6781
|
+
| 'zimage-lora'
|
|
6782
|
+
| 'zimage-turbo-lora'
|
|
6783
|
+
>;
|
|
6784
|
+
|
|
6785
|
+
/**
|
|
6786
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
6787
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
6788
|
+
*
|
|
6789
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
6790
|
+
*/
|
|
6791
|
+
parent?: boolean;
|
|
6792
|
+
|
|
6793
|
+
/**
|
|
6794
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
6795
|
+
*/
|
|
6796
|
+
placeholder?: string;
|
|
6797
|
+
|
|
6798
|
+
/**
|
|
6799
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
6800
|
+
* spark feature. Only available for \`string\` input type.
|
|
6801
|
+
*/
|
|
6802
|
+
prompt?: boolean;
|
|
6803
|
+
|
|
6804
|
+
/**
|
|
6805
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
6806
|
+
* type.
|
|
6807
|
+
*/
|
|
6808
|
+
promptSpark?: boolean;
|
|
6809
|
+
|
|
6810
|
+
/**
|
|
6811
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
6812
|
+
* least one of node or conditional.
|
|
6813
|
+
*/
|
|
6814
|
+
ref?: Input.Ref;
|
|
6815
|
+
|
|
6816
|
+
/**
|
|
6817
|
+
* Set of rules that describes when this input is required:
|
|
6818
|
+
*
|
|
6819
|
+
* - \`always\`: Input is always required
|
|
6820
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6821
|
+
* defined
|
|
6822
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6823
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6824
|
+
* value
|
|
6825
|
+
*
|
|
6826
|
+
* By default, the input is not required.
|
|
6827
|
+
*/
|
|
6828
|
+
required?: Input.Required;
|
|
6829
|
+
|
|
6830
|
+
/**
|
|
6831
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
6832
|
+
*/
|
|
6833
|
+
step?: number;
|
|
6834
|
+
|
|
6835
|
+
/**
|
|
6836
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
6837
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
6838
|
+
*/
|
|
6839
|
+
value?: unknown;
|
|
6840
|
+
}
|
|
6841
|
+
|
|
6842
|
+
export namespace Input {
|
|
6843
|
+
/**
|
|
6844
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
6845
|
+
* recursive items field.
|
|
6846
|
+
*/
|
|
6847
|
+
export interface Item {
|
|
6848
|
+
/**
|
|
6849
|
+
* The name that must be user to call the model through the API
|
|
6850
|
+
*/
|
|
6851
|
+
name: string;
|
|
6569
6852
|
|
|
6570
6853
|
/**
|
|
6571
6854
|
* The data type of the input
|
|
@@ -6633,13 +6916,6 @@ export namespace WorkflowRunResponse {
|
|
|
6633
6916
|
*/
|
|
6634
6917
|
inputs?: Array<{ [key: string]: unknown }>;
|
|
6635
6918
|
|
|
6636
|
-
/**
|
|
6637
|
-
* The configured items for inputs_array type inputs. Each item is an array of
|
|
6638
|
-
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
6639
|
-
* type.
|
|
6640
|
-
*/
|
|
6641
|
-
items?: Array<Array<Input.Item>>;
|
|
6642
|
-
|
|
6643
6919
|
/**
|
|
6644
6920
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
6645
6921
|
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
@@ -6664,6 +6940,13 @@ export namespace WorkflowRunResponse {
|
|
|
6664
6940
|
*/
|
|
6665
6941
|
max?: number;
|
|
6666
6942
|
|
|
6943
|
+
/**
|
|
6944
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
6945
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
6946
|
+
* \`asset.properties.duration\` at job creation time.
|
|
6947
|
+
*/
|
|
6948
|
+
maxDuration?: number;
|
|
6949
|
+
|
|
6667
6950
|
/**
|
|
6668
6951
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
6669
6952
|
* \`string_array\`.
|
|
@@ -6761,7 +7044,7 @@ export namespace WorkflowRunResponse {
|
|
|
6761
7044
|
* The reference to another input or output of the same workflow. Must have at
|
|
6762
7045
|
* least one of node or conditional.
|
|
6763
7046
|
*/
|
|
6764
|
-
ref?:
|
|
7047
|
+
ref?: Item.Ref;
|
|
6765
7048
|
|
|
6766
7049
|
/**
|
|
6767
7050
|
* Set of rules that describes when this input is required:
|
|
@@ -6775,7 +7058,7 @@ export namespace WorkflowRunResponse {
|
|
|
6775
7058
|
*
|
|
6776
7059
|
* By default, the input is not required.
|
|
6777
7060
|
*/
|
|
6778
|
-
required?:
|
|
7061
|
+
required?: Item.Required;
|
|
6779
7062
|
|
|
6780
7063
|
/**
|
|
6781
7064
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
@@ -6789,904 +7072,919 @@ export namespace WorkflowRunResponse {
|
|
|
6789
7072
|
value?: unknown;
|
|
6790
7073
|
}
|
|
6791
7074
|
|
|
6792
|
-
export namespace
|
|
7075
|
+
export namespace Item {
|
|
6793
7076
|
/**
|
|
6794
|
-
*
|
|
6795
|
-
*
|
|
7077
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
7078
|
+
* least one of node or conditional.
|
|
6796
7079
|
*/
|
|
6797
|
-
export interface
|
|
7080
|
+
export interface Ref {
|
|
6798
7081
|
/**
|
|
6799
|
-
* The
|
|
7082
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
7083
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
7084
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
6800
7085
|
*/
|
|
6801
|
-
|
|
7086
|
+
conditional?: Array<string>;
|
|
6802
7087
|
|
|
6803
7088
|
/**
|
|
6804
|
-
*
|
|
7089
|
+
* This is the desired node output value if ref is an if/else node.
|
|
6805
7090
|
*/
|
|
6806
|
-
|
|
6807
|
-
| 'boolean'
|
|
6808
|
-
| 'file'
|
|
6809
|
-
| 'file_array'
|
|
6810
|
-
| 'inputs_array'
|
|
6811
|
-
| 'model'
|
|
6812
|
-
| 'model_array'
|
|
6813
|
-
| 'number'
|
|
6814
|
-
| 'number_array'
|
|
6815
|
-
| 'string'
|
|
6816
|
-
| 'string_array';
|
|
7091
|
+
equal?: string;
|
|
6817
7092
|
|
|
6818
7093
|
/**
|
|
6819
|
-
* The
|
|
6820
|
-
*
|
|
6821
|
-
*
|
|
7094
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
7095
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
7096
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
7097
|
+
* all outputs of a node, you can use the name 'all'.
|
|
6822
7098
|
*/
|
|
6823
|
-
|
|
7099
|
+
name?: string;
|
|
6824
7100
|
|
|
6825
7101
|
/**
|
|
6826
|
-
*
|
|
6827
|
-
* \`file_array\` input types with kind \`image\`.
|
|
7102
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
6828
7103
|
*/
|
|
6829
|
-
|
|
7104
|
+
node?: string;
|
|
7105
|
+
}
|
|
6830
7106
|
|
|
7107
|
+
/**
|
|
7108
|
+
* Set of rules that describes when this input is required:
|
|
7109
|
+
*
|
|
7110
|
+
* - \`always\`: Input is always required
|
|
7111
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7112
|
+
* defined
|
|
7113
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7114
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7115
|
+
* value
|
|
7116
|
+
*
|
|
7117
|
+
* By default, the input is not required.
|
|
7118
|
+
*/
|
|
7119
|
+
export interface Required {
|
|
6831
7120
|
/**
|
|
6832
|
-
* Whether the input is
|
|
7121
|
+
* Whether the input is always required
|
|
6833
7122
|
*/
|
|
6834
|
-
|
|
7123
|
+
always?: boolean;
|
|
6835
7124
|
|
|
6836
7125
|
/**
|
|
6837
|
-
*
|
|
7126
|
+
* Makes this input required when another input has a specific value:
|
|
7127
|
+
*
|
|
7128
|
+
* - Key: name of the input to check
|
|
7129
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
6838
7130
|
*/
|
|
6839
|
-
|
|
7131
|
+
conditionalValues?: unknown;
|
|
6840
7132
|
|
|
6841
7133
|
/**
|
|
6842
|
-
*
|
|
7134
|
+
* Makes this input required when another input is defined:
|
|
7135
|
+
*
|
|
7136
|
+
* - Key: name of the input that must be defined
|
|
7137
|
+
* - Value: message to display when this input is required
|
|
6843
7138
|
*/
|
|
6844
|
-
|
|
7139
|
+
ifDefined?: unknown;
|
|
6845
7140
|
|
|
6846
7141
|
/**
|
|
6847
|
-
*
|
|
7142
|
+
* Makes this input required when another input is not defined:
|
|
7143
|
+
*
|
|
7144
|
+
* - Key: name of the input that must be undefined
|
|
7145
|
+
* - Value: message to display when this input is required
|
|
6848
7146
|
*/
|
|
6849
|
-
|
|
7147
|
+
ifNotDefined?: unknown;
|
|
7148
|
+
}
|
|
7149
|
+
}
|
|
6850
7150
|
|
|
6851
|
-
|
|
6852
|
-
|
|
6853
|
-
|
|
6854
|
-
|
|
6855
|
-
|
|
7151
|
+
/**
|
|
7152
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
7153
|
+
* least one of node or conditional.
|
|
7154
|
+
*/
|
|
7155
|
+
export interface Ref {
|
|
7156
|
+
/**
|
|
7157
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
7158
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
7159
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
7160
|
+
*/
|
|
7161
|
+
conditional?: Array<string>;
|
|
6856
7162
|
|
|
6857
|
-
|
|
6858
|
-
|
|
6859
|
-
|
|
6860
|
-
|
|
7163
|
+
/**
|
|
7164
|
+
* This is the desired node output value if ref is an if/else node.
|
|
7165
|
+
*/
|
|
7166
|
+
equal?: string;
|
|
6861
7167
|
|
|
6862
|
-
|
|
6863
|
-
|
|
6864
|
-
|
|
6865
|
-
|
|
6866
|
-
|
|
6867
|
-
|
|
6868
|
-
|
|
6869
|
-
/**
|
|
6870
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
6871
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6872
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
6873
|
-
* data:kind, prefix
|
|
6874
|
-
*/
|
|
6875
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
7168
|
+
/**
|
|
7169
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
7170
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
7171
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
7172
|
+
* all outputs of a node, you can use the name 'all'.
|
|
7173
|
+
*/
|
|
7174
|
+
name?: string;
|
|
6876
7175
|
|
|
6877
|
-
|
|
6878
|
-
|
|
6879
|
-
|
|
6880
|
-
|
|
7176
|
+
/**
|
|
7177
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
7178
|
+
*/
|
|
7179
|
+
node?: string;
|
|
7180
|
+
}
|
|
6881
7181
|
|
|
6882
|
-
|
|
6883
|
-
|
|
6884
|
-
|
|
6885
|
-
|
|
7182
|
+
/**
|
|
7183
|
+
* Set of rules that describes when this input is required:
|
|
7184
|
+
*
|
|
7185
|
+
* - \`always\`: Input is always required
|
|
7186
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7187
|
+
* defined
|
|
7188
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7189
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7190
|
+
* value
|
|
7191
|
+
*
|
|
7192
|
+
* By default, the input is not required.
|
|
7193
|
+
*/
|
|
7194
|
+
export interface Required {
|
|
7195
|
+
/**
|
|
7196
|
+
* Whether the input is always required
|
|
7197
|
+
*/
|
|
7198
|
+
always?: boolean;
|
|
6886
7199
|
|
|
6887
|
-
|
|
6888
|
-
|
|
6889
|
-
|
|
6890
|
-
|
|
6891
|
-
|
|
7200
|
+
/**
|
|
7201
|
+
* Makes this input required when another input has a specific value:
|
|
7202
|
+
*
|
|
7203
|
+
* - Key: name of the input to check
|
|
7204
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
7205
|
+
*/
|
|
7206
|
+
conditionalValues?: unknown;
|
|
6892
7207
|
|
|
6893
|
-
|
|
6894
|
-
|
|
6895
|
-
|
|
6896
|
-
|
|
6897
|
-
|
|
7208
|
+
/**
|
|
7209
|
+
* Makes this input required when another input is defined:
|
|
7210
|
+
*
|
|
7211
|
+
* - Key: name of the input that must be defined
|
|
7212
|
+
* - Value: message to display when this input is required
|
|
7213
|
+
*/
|
|
7214
|
+
ifDefined?: unknown;
|
|
6898
7215
|
|
|
6899
|
-
|
|
6900
|
-
|
|
6901
|
-
|
|
6902
|
-
|
|
6903
|
-
|
|
6904
|
-
|
|
7216
|
+
/**
|
|
7217
|
+
* Makes this input required when another input is not defined:
|
|
7218
|
+
*
|
|
7219
|
+
* - Key: name of the input that must be undefined
|
|
7220
|
+
* - Value: message to display when this input is required
|
|
7221
|
+
*/
|
|
7222
|
+
ifNotDefined?: unknown;
|
|
7223
|
+
}
|
|
7224
|
+
}
|
|
6905
7225
|
|
|
6906
|
-
|
|
6907
|
-
|
|
6908
|
-
|
|
6909
|
-
|
|
7226
|
+
/**
|
|
7227
|
+
* The logic of the node. Only available for logic nodes.
|
|
7228
|
+
*/
|
|
7229
|
+
export interface Logic {
|
|
7230
|
+
/**
|
|
7231
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
7232
|
+
*/
|
|
7233
|
+
cases?: Array<Logic.Case>;
|
|
6910
7234
|
|
|
6911
|
-
|
|
6912
|
-
|
|
6913
|
-
|
|
6914
|
-
|
|
6915
|
-
|
|
7235
|
+
/**
|
|
7236
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
7237
|
+
* no case is matched. Only available for if/else nodes.
|
|
7238
|
+
*/
|
|
7239
|
+
default?: string;
|
|
6916
7240
|
|
|
6917
|
-
|
|
6918
|
-
|
|
6919
|
-
|
|
6920
|
-
|
|
6921
|
-
|
|
6922
|
-
| 'custom'
|
|
6923
|
-
| 'elevenlabs-voice'
|
|
6924
|
-
| 'flux.1'
|
|
6925
|
-
| 'flux.1-composition'
|
|
6926
|
-
| 'flux.1-kontext-dev'
|
|
6927
|
-
| 'flux.1-kontext-lora'
|
|
6928
|
-
| 'flux.1-krea-dev'
|
|
6929
|
-
| 'flux.1-krea-lora'
|
|
6930
|
-
| 'flux.1-lora'
|
|
6931
|
-
| 'flux.1-pro'
|
|
6932
|
-
| 'flux.1.1-pro-ultra'
|
|
6933
|
-
| 'flux.2-dev-edit-lora'
|
|
6934
|
-
| 'flux.2-dev-lora'
|
|
6935
|
-
| 'flux.2-klein-4b-edit-lora'
|
|
6936
|
-
| 'flux.2-klein-4b-lora'
|
|
6937
|
-
| 'flux.2-klein-9b-edit-lora'
|
|
6938
|
-
| 'flux.2-klein-9b-lora'
|
|
6939
|
-
| 'flux.2-klein-base-4b-edit-lora'
|
|
6940
|
-
| 'flux.2-klein-base-4b-lora'
|
|
6941
|
-
| 'flux.2-klein-base-9b-edit-lora'
|
|
6942
|
-
| 'flux.2-klein-base-9b-lora'
|
|
6943
|
-
| 'flux1.1-pro'
|
|
6944
|
-
| 'gpt-image-1'
|
|
6945
|
-
| 'qwen-image-2512-lora'
|
|
6946
|
-
| 'qwen-image-edit-2509-lora'
|
|
6947
|
-
| 'qwen-image-edit-2511-lora'
|
|
6948
|
-
| 'qwen-image-edit-lora'
|
|
6949
|
-
| 'qwen-image-lora'
|
|
6950
|
-
| 'sd-1_5'
|
|
6951
|
-
| 'sd-1_5-composition'
|
|
6952
|
-
| 'sd-1_5-lora'
|
|
6953
|
-
| 'sd-xl'
|
|
6954
|
-
| 'sd-xl-composition'
|
|
6955
|
-
| 'sd-xl-lora'
|
|
6956
|
-
| 'zimage-de-turbo-lora'
|
|
6957
|
-
| 'zimage-lora'
|
|
6958
|
-
| 'zimage-turbo-lora'
|
|
6959
|
-
>;
|
|
7241
|
+
/**
|
|
7242
|
+
* The transform of the logic. Only available for transform nodes.
|
|
7243
|
+
*/
|
|
7244
|
+
transform?: string;
|
|
7245
|
+
}
|
|
6960
7246
|
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
*
|
|
6965
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
6966
|
-
*/
|
|
6967
|
-
parent?: boolean;
|
|
7247
|
+
export namespace Logic {
|
|
7248
|
+
export interface Case {
|
|
7249
|
+
condition: string;
|
|
6968
7250
|
|
|
6969
|
-
|
|
6970
|
-
|
|
6971
|
-
|
|
6972
|
-
|
|
7251
|
+
value: string;
|
|
7252
|
+
}
|
|
7253
|
+
}
|
|
7254
|
+
}
|
|
6973
7255
|
|
|
6974
|
-
|
|
6975
|
-
|
|
6976
|
-
|
|
6977
|
-
|
|
6978
|
-
|
|
7256
|
+
/**
|
|
7257
|
+
* Defines the input parameters for a model. Use this to understand the available
|
|
7258
|
+
* input parameters for a given `modelId` when calling
|
|
7259
|
+
* `POST /generate/custom/{modelId}`. See {@link
|
|
7260
|
+
* https://docs.scenario.com/docs/video-generation} for examples.
|
|
7261
|
+
*/
|
|
7262
|
+
export interface Input {
|
|
7263
|
+
/**
|
|
7264
|
+
* The name that must be user to call the model through the API
|
|
7265
|
+
*/
|
|
7266
|
+
name: string;
|
|
6979
7267
|
|
|
6980
|
-
|
|
6981
|
-
|
|
6982
|
-
|
|
6983
|
-
|
|
6984
|
-
|
|
7268
|
+
/**
|
|
7269
|
+
* The data type of the input
|
|
7270
|
+
*/
|
|
7271
|
+
type:
|
|
7272
|
+
| 'boolean'
|
|
7273
|
+
| 'file'
|
|
7274
|
+
| 'file_array'
|
|
7275
|
+
| 'inputs_array'
|
|
7276
|
+
| 'model'
|
|
7277
|
+
| 'model_array'
|
|
7278
|
+
| 'number'
|
|
7279
|
+
| 'number_array'
|
|
7280
|
+
| 'string'
|
|
7281
|
+
| 'string_array';
|
|
6985
7282
|
|
|
6986
|
-
|
|
6987
|
-
|
|
6988
|
-
|
|
6989
|
-
|
|
6990
|
-
|
|
7283
|
+
/**
|
|
7284
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
7285
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
7286
|
+
* dropdown.
|
|
7287
|
+
*/
|
|
7288
|
+
allowedValues?: Array<unknown>;
|
|
6991
7289
|
|
|
6992
|
-
|
|
6993
|
-
|
|
6994
|
-
|
|
6995
|
-
|
|
6996
|
-
|
|
6997
|
-
* defined
|
|
6998
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6999
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7000
|
-
* value
|
|
7001
|
-
*
|
|
7002
|
-
* By default, the input is not required.
|
|
7003
|
-
*/
|
|
7004
|
-
required?: Item.Required;
|
|
7290
|
+
/**
|
|
7291
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
7292
|
+
* \`file_array\` input types with kind \`image\`.
|
|
7293
|
+
*/
|
|
7294
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
7005
7295
|
|
|
7006
|
-
|
|
7007
|
-
|
|
7008
|
-
|
|
7009
|
-
|
|
7296
|
+
/**
|
|
7297
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
7298
|
+
*/
|
|
7299
|
+
color?: boolean;
|
|
7010
7300
|
|
|
7011
|
-
|
|
7012
|
-
|
|
7013
|
-
|
|
7014
|
-
|
|
7015
|
-
value?: unknown;
|
|
7016
|
-
}
|
|
7301
|
+
/**
|
|
7302
|
+
* Whether this input affects the model's cost calculation
|
|
7303
|
+
*/
|
|
7304
|
+
costImpact?: boolean;
|
|
7017
7305
|
|
|
7018
|
-
|
|
7019
|
-
|
|
7020
|
-
|
|
7021
|
-
|
|
7022
|
-
*/
|
|
7023
|
-
export interface Ref {
|
|
7024
|
-
/**
|
|
7025
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
7026
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
7027
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
7028
|
-
*/
|
|
7029
|
-
conditional?: Array<string>;
|
|
7306
|
+
/**
|
|
7307
|
+
* The default value for the input
|
|
7308
|
+
*/
|
|
7309
|
+
default?: unknown;
|
|
7030
7310
|
|
|
7031
|
-
|
|
7032
|
-
|
|
7033
|
-
|
|
7034
|
-
|
|
7311
|
+
/**
|
|
7312
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
7313
|
+
*/
|
|
7314
|
+
description?: string;
|
|
7035
7315
|
|
|
7036
|
-
|
|
7037
|
-
|
|
7038
|
-
|
|
7039
|
-
|
|
7040
|
-
|
|
7041
|
-
*/
|
|
7042
|
-
name?: string;
|
|
7316
|
+
/**
|
|
7317
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
7318
|
+
* value appear consecutively in the UI.
|
|
7319
|
+
*/
|
|
7320
|
+
group?: string;
|
|
7043
7321
|
|
|
7044
|
-
|
|
7045
|
-
|
|
7046
|
-
|
|
7047
|
-
|
|
7048
|
-
}
|
|
7322
|
+
/**
|
|
7323
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
7324
|
+
*/
|
|
7325
|
+
hint?: string;
|
|
7049
7326
|
|
|
7050
|
-
|
|
7051
|
-
|
|
7052
|
-
|
|
7053
|
-
|
|
7054
|
-
|
|
7055
|
-
|
|
7056
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7057
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7058
|
-
* value
|
|
7059
|
-
*
|
|
7060
|
-
* By default, the input is not required.
|
|
7061
|
-
*/
|
|
7062
|
-
export interface Required {
|
|
7063
|
-
/**
|
|
7064
|
-
* Whether the input is always required
|
|
7065
|
-
*/
|
|
7066
|
-
always?: boolean;
|
|
7327
|
+
/**
|
|
7328
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
7329
|
+
* the same as the current object. This is only available for type inputs_array
|
|
7330
|
+
* inputs.
|
|
7331
|
+
*/
|
|
7332
|
+
inputs?: Array<{ [key: string]: unknown }>;
|
|
7067
7333
|
|
|
7068
|
-
|
|
7069
|
-
|
|
7070
|
-
|
|
7071
|
-
|
|
7072
|
-
|
|
7073
|
-
|
|
7074
|
-
|
|
7334
|
+
/**
|
|
7335
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
7336
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
7337
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
7338
|
+
* data:kind, prefix
|
|
7339
|
+
*/
|
|
7340
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
7075
7341
|
|
|
7076
|
-
|
|
7077
|
-
|
|
7078
|
-
|
|
7079
|
-
|
|
7080
|
-
* - Value: message to display when this input is required
|
|
7081
|
-
*/
|
|
7082
|
-
ifDefined?: unknown;
|
|
7342
|
+
/**
|
|
7343
|
+
* The label displayed in the UI for this input
|
|
7344
|
+
*/
|
|
7345
|
+
label?: string;
|
|
7083
7346
|
|
|
7084
|
-
|
|
7085
|
-
|
|
7086
|
-
|
|
7087
|
-
|
|
7088
|
-
* - Value: message to display when this input is required
|
|
7089
|
-
*/
|
|
7090
|
-
ifNotDefined?: unknown;
|
|
7091
|
-
}
|
|
7092
|
-
}
|
|
7347
|
+
/**
|
|
7348
|
+
* The name of the file input field to use as the mask source
|
|
7349
|
+
*/
|
|
7350
|
+
maskFrom?: string;
|
|
7093
7351
|
|
|
7094
|
-
|
|
7095
|
-
|
|
7096
|
-
|
|
7097
|
-
|
|
7098
|
-
|
|
7099
|
-
/**
|
|
7100
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
7101
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
7102
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
7103
|
-
*/
|
|
7104
|
-
conditional?: Array<string>;
|
|
7352
|
+
/**
|
|
7353
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
7354
|
+
* types.
|
|
7355
|
+
*/
|
|
7356
|
+
max?: number;
|
|
7105
7357
|
|
|
7106
|
-
|
|
7107
|
-
|
|
7108
|
-
|
|
7109
|
-
|
|
7358
|
+
/**
|
|
7359
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
7360
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
7361
|
+
* \`asset.properties.duration\` at job creation time.
|
|
7362
|
+
*/
|
|
7363
|
+
maxDuration?: number;
|
|
7110
7364
|
|
|
7111
|
-
|
|
7112
|
-
|
|
7113
|
-
|
|
7114
|
-
|
|
7115
|
-
|
|
7116
|
-
*/
|
|
7117
|
-
name?: string;
|
|
7365
|
+
/**
|
|
7366
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
7367
|
+
* \`string_array\`.
|
|
7368
|
+
*/
|
|
7369
|
+
maxLength?: number;
|
|
7118
7370
|
|
|
7119
|
-
|
|
7120
|
-
|
|
7121
|
-
|
|
7122
|
-
|
|
7123
|
-
|
|
7371
|
+
/**
|
|
7372
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
7373
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
7374
|
+
* creation time.
|
|
7375
|
+
*/
|
|
7376
|
+
maxSize?: number;
|
|
7124
7377
|
|
|
7125
|
-
|
|
7126
|
-
|
|
7127
|
-
|
|
7128
|
-
|
|
7129
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7130
|
-
* defined
|
|
7131
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7132
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7133
|
-
* value
|
|
7134
|
-
*
|
|
7135
|
-
* By default, the input is not required.
|
|
7136
|
-
*/
|
|
7137
|
-
export interface Required {
|
|
7138
|
-
/**
|
|
7139
|
-
* Whether the input is always required
|
|
7140
|
-
*/
|
|
7141
|
-
always?: boolean;
|
|
7378
|
+
/**
|
|
7379
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
7380
|
+
*/
|
|
7381
|
+
min?: number;
|
|
7142
7382
|
|
|
7143
|
-
|
|
7144
|
-
|
|
7145
|
-
|
|
7146
|
-
|
|
7147
|
-
|
|
7148
|
-
*/
|
|
7149
|
-
conditionalValues?: unknown;
|
|
7383
|
+
/**
|
|
7384
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
7385
|
+
* \`string_array\`.
|
|
7386
|
+
*/
|
|
7387
|
+
minLength?: number;
|
|
7150
7388
|
|
|
7151
|
-
|
|
7152
|
-
|
|
7153
|
-
|
|
7154
|
-
|
|
7155
|
-
|
|
7156
|
-
|
|
7157
|
-
|
|
7389
|
+
/**
|
|
7390
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
7391
|
+
* available for \`model_array\` input type.
|
|
7392
|
+
*/
|
|
7393
|
+
modelTypes?: Array<
|
|
7394
|
+
| 'custom'
|
|
7395
|
+
| 'elevenlabs-voice'
|
|
7396
|
+
| 'flux.1'
|
|
7397
|
+
| 'flux.1-composition'
|
|
7398
|
+
| 'flux.1-kontext-dev'
|
|
7399
|
+
| 'flux.1-kontext-lora'
|
|
7400
|
+
| 'flux.1-krea-dev'
|
|
7401
|
+
| 'flux.1-krea-lora'
|
|
7402
|
+
| 'flux.1-lora'
|
|
7403
|
+
| 'flux.1-pro'
|
|
7404
|
+
| 'flux.1.1-pro-ultra'
|
|
7405
|
+
| 'flux.2-dev-edit-lora'
|
|
7406
|
+
| 'flux.2-dev-lora'
|
|
7407
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
7408
|
+
| 'flux.2-klein-4b-lora'
|
|
7409
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
7410
|
+
| 'flux.2-klein-9b-lora'
|
|
7411
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
7412
|
+
| 'flux.2-klein-base-4b-lora'
|
|
7413
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
7414
|
+
| 'flux.2-klein-base-9b-lora'
|
|
7415
|
+
| 'flux1.1-pro'
|
|
7416
|
+
| 'gpt-image-1'
|
|
7417
|
+
| 'qwen-image-2512-lora'
|
|
7418
|
+
| 'qwen-image-edit-2509-lora'
|
|
7419
|
+
| 'qwen-image-edit-2511-lora'
|
|
7420
|
+
| 'qwen-image-edit-lora'
|
|
7421
|
+
| 'qwen-image-lora'
|
|
7422
|
+
| 'sd-1_5'
|
|
7423
|
+
| 'sd-1_5-composition'
|
|
7424
|
+
| 'sd-1_5-lora'
|
|
7425
|
+
| 'sd-xl'
|
|
7426
|
+
| 'sd-xl-composition'
|
|
7427
|
+
| 'sd-xl-lora'
|
|
7428
|
+
| 'zimage-de-turbo-lora'
|
|
7429
|
+
| 'zimage-lora'
|
|
7430
|
+
| 'zimage-turbo-lora'
|
|
7431
|
+
>;
|
|
7158
7432
|
|
|
7159
|
-
|
|
7160
|
-
|
|
7161
|
-
|
|
7162
|
-
|
|
7163
|
-
|
|
7164
|
-
|
|
7165
|
-
|
|
7166
|
-
|
|
7167
|
-
|
|
7433
|
+
/**
|
|
7434
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
7435
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
7436
|
+
*
|
|
7437
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
7438
|
+
*/
|
|
7439
|
+
parent?: boolean;
|
|
7440
|
+
|
|
7441
|
+
/**
|
|
7442
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
7443
|
+
*/
|
|
7444
|
+
placeholder?: string;
|
|
7445
|
+
|
|
7446
|
+
/**
|
|
7447
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
7448
|
+
* spark feature. Only available for \`string\` input type.
|
|
7449
|
+
*/
|
|
7450
|
+
prompt?: boolean;
|
|
7451
|
+
|
|
7452
|
+
/**
|
|
7453
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
7454
|
+
* type.
|
|
7455
|
+
*/
|
|
7456
|
+
promptSpark?: boolean;
|
|
7457
|
+
|
|
7458
|
+
/**
|
|
7459
|
+
* Set of rules that describes when this input is required:
|
|
7460
|
+
*
|
|
7461
|
+
* - \`always\`: Input is always required
|
|
7462
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7463
|
+
* defined
|
|
7464
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7465
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7466
|
+
* value
|
|
7467
|
+
*
|
|
7468
|
+
* By default, the input is not required.
|
|
7469
|
+
*/
|
|
7470
|
+
required?: Input.Required;
|
|
7168
7471
|
|
|
7472
|
+
/**
|
|
7473
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
7474
|
+
*/
|
|
7475
|
+
step?: number;
|
|
7476
|
+
}
|
|
7477
|
+
|
|
7478
|
+
export namespace Input {
|
|
7479
|
+
/**
|
|
7480
|
+
* Set of rules that describes when this input is required:
|
|
7481
|
+
*
|
|
7482
|
+
* - \`always\`: Input is always required
|
|
7483
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7484
|
+
* defined
|
|
7485
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7486
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7487
|
+
* value
|
|
7488
|
+
*
|
|
7489
|
+
* By default, the input is not required.
|
|
7490
|
+
*/
|
|
7491
|
+
export interface Required {
|
|
7169
7492
|
/**
|
|
7170
|
-
*
|
|
7493
|
+
* Whether the input is always required
|
|
7171
7494
|
*/
|
|
7172
|
-
|
|
7173
|
-
/**
|
|
7174
|
-
* The cases of the logic. Only available for if/else nodes.
|
|
7175
|
-
*/
|
|
7176
|
-
cases?: Array<Logic.Case>;
|
|
7177
|
-
|
|
7178
|
-
/**
|
|
7179
|
-
* The default case of the logic. Contains the id/output of the node to execute if
|
|
7180
|
-
* no case is matched. Only available for if/else nodes.
|
|
7181
|
-
*/
|
|
7182
|
-
default?: string;
|
|
7495
|
+
always?: boolean;
|
|
7183
7496
|
|
|
7184
|
-
|
|
7185
|
-
|
|
7186
|
-
|
|
7187
|
-
|
|
7188
|
-
|
|
7497
|
+
/**
|
|
7498
|
+
* Makes this input required when another input has a specific value:
|
|
7499
|
+
*
|
|
7500
|
+
* - Key: name of the input to check
|
|
7501
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
7502
|
+
*/
|
|
7503
|
+
conditionalValues?: unknown;
|
|
7189
7504
|
|
|
7190
|
-
|
|
7191
|
-
|
|
7192
|
-
|
|
7505
|
+
/**
|
|
7506
|
+
* Makes this input required when another input is defined:
|
|
7507
|
+
*
|
|
7508
|
+
* - Key: name of the input that must be defined
|
|
7509
|
+
* - Value: message to display when this input is required
|
|
7510
|
+
*/
|
|
7511
|
+
ifDefined?: unknown;
|
|
7193
7512
|
|
|
7194
|
-
|
|
7195
|
-
|
|
7196
|
-
|
|
7513
|
+
/**
|
|
7514
|
+
* Makes this input required when another input is not defined:
|
|
7515
|
+
*
|
|
7516
|
+
* - Key: name of the input that must be undefined
|
|
7517
|
+
* - Value: message to display when this input is required
|
|
7518
|
+
*/
|
|
7519
|
+
ifNotDefined?: unknown;
|
|
7197
7520
|
}
|
|
7198
7521
|
}
|
|
7199
7522
|
|
|
7200
|
-
|
|
7201
|
-
|
|
7523
|
+
/**
|
|
7524
|
+
* A representation of an asset after being processed by the workflow
|
|
7525
|
+
*/
|
|
7526
|
+
export interface After {
|
|
7527
|
+
/**
|
|
7528
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
7529
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
7530
|
+
*/
|
|
7531
|
+
assetId: string;
|
|
7202
7532
|
|
|
7203
|
-
|
|
7204
|
-
|
|
7205
|
-
|
|
7206
|
-
|
|
7207
|
-
| 'in-progress'
|
|
7208
|
-
| 'pending'
|
|
7209
|
-
| 'queued'
|
|
7210
|
-
| 'success'
|
|
7211
|
-
| 'warming-up';
|
|
7533
|
+
/**
|
|
7534
|
+
* The url of the image used as a thumbnail for your model
|
|
7535
|
+
*/
|
|
7536
|
+
url: string;
|
|
7212
7537
|
}
|
|
7213
7538
|
|
|
7214
7539
|
/**
|
|
7215
|
-
*
|
|
7540
|
+
* A representation of an asset before being processed by the workflow
|
|
7216
7541
|
*/
|
|
7217
|
-
export interface
|
|
7218
|
-
|
|
7542
|
+
export interface Before {
|
|
7543
|
+
/**
|
|
7544
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
7545
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
7546
|
+
*/
|
|
7547
|
+
assetId: string;
|
|
7219
7548
|
|
|
7220
|
-
|
|
7549
|
+
/**
|
|
7550
|
+
* The url of the image used as a thumbnail for your model
|
|
7551
|
+
*/
|
|
7552
|
+
url: string;
|
|
7221
7553
|
}
|
|
7222
|
-
}
|
|
7223
7554
|
|
|
7224
|
-
export interface Workflow {
|
|
7225
7555
|
/**
|
|
7226
|
-
*
|
|
7556
|
+
* Currently the thumbnail is identical to the after asset.
|
|
7227
7557
|
*/
|
|
7228
|
-
|
|
7558
|
+
export interface Thumbnail {
|
|
7559
|
+
assetId: string;
|
|
7229
7560
|
|
|
7230
|
-
|
|
7231
|
-
|
|
7232
|
-
*/
|
|
7233
|
-
authorId: string;
|
|
7561
|
+
url: string;
|
|
7562
|
+
}
|
|
7234
7563
|
|
|
7235
7564
|
/**
|
|
7236
|
-
*
|
|
7565
|
+
* The UI configuration for the workflow. This is managed by scenario webapp.
|
|
7237
7566
|
*/
|
|
7238
|
-
|
|
7567
|
+
export interface UiConfig {
|
|
7568
|
+
/**
|
|
7569
|
+
* Configuration for the input properties
|
|
7570
|
+
*/
|
|
7571
|
+
inputProperties?: { [key: string]: UiConfig.InputProperties };
|
|
7239
7572
|
|
|
7240
|
-
|
|
7241
|
-
|
|
7242
|
-
|
|
7243
|
-
|
|
7573
|
+
/**
|
|
7574
|
+
* Configuration for the loras component
|
|
7575
|
+
*/
|
|
7576
|
+
lorasComponent?: UiConfig.LorasComponent;
|
|
7244
7577
|
|
|
7245
|
-
|
|
7246
|
-
|
|
7247
|
-
|
|
7248
|
-
|
|
7578
|
+
/**
|
|
7579
|
+
* Configuration for the presets
|
|
7580
|
+
*/
|
|
7581
|
+
presets?: Array<UiConfig.Preset>;
|
|
7249
7582
|
|
|
7250
|
-
|
|
7251
|
-
|
|
7252
|
-
|
|
7253
|
-
|
|
7583
|
+
/**
|
|
7584
|
+
* Configuration for the resolution component
|
|
7585
|
+
*/
|
|
7586
|
+
resolutionComponent?: UiConfig.ResolutionComponent;
|
|
7254
7587
|
|
|
7255
|
-
|
|
7256
|
-
|
|
7257
|
-
|
|
7258
|
-
|
|
7588
|
+
/**
|
|
7589
|
+
* Configuration for the selects
|
|
7590
|
+
*/
|
|
7591
|
+
selects?: { [key: string]: unknown };
|
|
7259
7592
|
|
|
7260
|
-
|
|
7261
|
-
|
|
7262
|
-
|
|
7263
|
-
|
|
7593
|
+
/**
|
|
7594
|
+
* Configuration for the trigger generate button
|
|
7595
|
+
*/
|
|
7596
|
+
triggerGenerate?: UiConfig.TriggerGenerate;
|
|
7597
|
+
}
|
|
7264
7598
|
|
|
7265
|
-
|
|
7266
|
-
|
|
7267
|
-
|
|
7268
|
-
|
|
7599
|
+
export namespace UiConfig {
|
|
7600
|
+
export interface InputProperties {
|
|
7601
|
+
collapsed?: boolean;
|
|
7602
|
+
}
|
|
7269
7603
|
|
|
7270
|
-
|
|
7271
|
-
|
|
7272
|
-
|
|
7273
|
-
|
|
7604
|
+
/**
|
|
7605
|
+
* Configuration for the loras component
|
|
7606
|
+
*/
|
|
7607
|
+
export interface LorasComponent {
|
|
7608
|
+
/**
|
|
7609
|
+
* The label of the component
|
|
7610
|
+
*/
|
|
7611
|
+
label: string;
|
|
7274
7612
|
|
|
7275
|
-
|
|
7276
|
-
|
|
7277
|
-
|
|
7278
|
-
|
|
7613
|
+
/**
|
|
7614
|
+
* The input name of the model (model_array)
|
|
7615
|
+
*/
|
|
7616
|
+
modelInput: string;
|
|
7279
7617
|
|
|
7280
|
-
|
|
7281
|
-
|
|
7282
|
-
|
|
7283
|
-
|
|
7618
|
+
/**
|
|
7619
|
+
* The input name of the scale (number_array)
|
|
7620
|
+
*/
|
|
7621
|
+
scaleInput: string;
|
|
7622
|
+
|
|
7623
|
+
/**
|
|
7624
|
+
* The input model id (example: a composition or a single LoRA modelId) If
|
|
7625
|
+
* specified, the model id will be attached to the output asset as a metadata If
|
|
7626
|
+
* the model-decomposer parser is specified on it, modelInput and scaleInput will
|
|
7627
|
+
* be automatically populated
|
|
7628
|
+
*/
|
|
7629
|
+
modelIdInput?: string;
|
|
7630
|
+
}
|
|
7631
|
+
|
|
7632
|
+
export interface Preset {
|
|
7633
|
+
fields: Array<string>;
|
|
7634
|
+
|
|
7635
|
+
presets: unknown;
|
|
7636
|
+
}
|
|
7637
|
+
|
|
7638
|
+
/**
|
|
7639
|
+
* Configuration for the resolution component
|
|
7640
|
+
*/
|
|
7641
|
+
export interface ResolutionComponent {
|
|
7642
|
+
/**
|
|
7643
|
+
* The input name of the height
|
|
7644
|
+
*/
|
|
7645
|
+
heightInput: string;
|
|
7646
|
+
|
|
7647
|
+
/**
|
|
7648
|
+
* The label of the component
|
|
7649
|
+
*/
|
|
7650
|
+
label: string;
|
|
7651
|
+
|
|
7652
|
+
/**
|
|
7653
|
+
* The resolution presets
|
|
7654
|
+
*/
|
|
7655
|
+
presets: Array<ResolutionComponent.Preset>;
|
|
7656
|
+
|
|
7657
|
+
/**
|
|
7658
|
+
* The input name of the width
|
|
7659
|
+
*/
|
|
7660
|
+
widthInput: string;
|
|
7661
|
+
}
|
|
7662
|
+
|
|
7663
|
+
export namespace ResolutionComponent {
|
|
7664
|
+
export interface Preset {
|
|
7665
|
+
height: number;
|
|
7666
|
+
|
|
7667
|
+
label: string;
|
|
7668
|
+
|
|
7669
|
+
width: number;
|
|
7670
|
+
}
|
|
7671
|
+
}
|
|
7672
|
+
|
|
7673
|
+
/**
|
|
7674
|
+
* Configuration for the trigger generate button
|
|
7675
|
+
*/
|
|
7676
|
+
export interface TriggerGenerate {
|
|
7677
|
+
label: string;
|
|
7678
|
+
|
|
7679
|
+
/**
|
|
7680
|
+
* The 'name' of the input where the trigger generate button will be displayed
|
|
7681
|
+
* (after the input). Do not specify both position and after.
|
|
7682
|
+
*/
|
|
7683
|
+
after?: string;
|
|
7284
7684
|
|
|
7285
|
-
|
|
7286
|
-
|
|
7287
|
-
|
|
7288
|
-
|
|
7685
|
+
/**
|
|
7686
|
+
* The position of the trigger generate button. If position specified, the button
|
|
7687
|
+
* will be displayed at the specified position. Do not specify both position and
|
|
7688
|
+
* after.
|
|
7689
|
+
*/
|
|
7690
|
+
position?: 'bottom' | 'top';
|
|
7691
|
+
}
|
|
7692
|
+
}
|
|
7693
|
+
}
|
|
7694
|
+
}
|
|
7289
7695
|
|
|
7290
|
-
|
|
7291
|
-
|
|
7292
|
-
|
|
7293
|
-
updatedAt: string;
|
|
7696
|
+
export interface WorkflowUserApprovalResponse {
|
|
7697
|
+
job: WorkflowUserApprovalResponse.Job;
|
|
7698
|
+
}
|
|
7294
7699
|
|
|
7700
|
+
export namespace WorkflowUserApprovalResponse {
|
|
7701
|
+
export interface Job {
|
|
7295
7702
|
/**
|
|
7296
|
-
*
|
|
7703
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
7297
7704
|
*/
|
|
7298
|
-
|
|
7705
|
+
createdAt: string;
|
|
7299
7706
|
|
|
7300
7707
|
/**
|
|
7301
|
-
*
|
|
7708
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
7302
7709
|
*/
|
|
7303
|
-
|
|
7710
|
+
jobId: string;
|
|
7304
7711
|
|
|
7305
7712
|
/**
|
|
7306
|
-
*
|
|
7713
|
+
* The type of job
|
|
7307
7714
|
*/
|
|
7308
|
-
|
|
7715
|
+
jobType:
|
|
7716
|
+
| 'assets-download'
|
|
7717
|
+
| 'canvas-export'
|
|
7718
|
+
| 'caption'
|
|
7719
|
+
| 'caption-llava'
|
|
7720
|
+
| 'custom'
|
|
7721
|
+
| 'describe-style'
|
|
7722
|
+
| 'detection'
|
|
7723
|
+
| 'embed'
|
|
7724
|
+
| 'flux'
|
|
7725
|
+
| 'flux-model-training'
|
|
7726
|
+
| 'generate-prompt'
|
|
7727
|
+
| 'image-generation'
|
|
7728
|
+
| 'image-prompt-editing'
|
|
7729
|
+
| 'inference'
|
|
7730
|
+
| 'mesh-preview-rendering'
|
|
7731
|
+
| 'model-download'
|
|
7732
|
+
| 'model-import'
|
|
7733
|
+
| 'model-training'
|
|
7734
|
+
| 'musubi-model-training'
|
|
7735
|
+
| 'openai-image-generation'
|
|
7736
|
+
| 'patch-image'
|
|
7737
|
+
| 'pixelate'
|
|
7738
|
+
| 'reframe'
|
|
7739
|
+
| 'remove-background'
|
|
7740
|
+
| 'repaint'
|
|
7741
|
+
| 'restyle'
|
|
7742
|
+
| 'segment'
|
|
7743
|
+
| 'skybox-3d'
|
|
7744
|
+
| 'skybox-base-360'
|
|
7745
|
+
| 'skybox-hdri'
|
|
7746
|
+
| 'skybox-upscale-360'
|
|
7747
|
+
| 'texture'
|
|
7748
|
+
| 'translate'
|
|
7749
|
+
| 'upload'
|
|
7750
|
+
| 'upscale'
|
|
7751
|
+
| 'upscale-skybox'
|
|
7752
|
+
| 'upscale-texture'
|
|
7753
|
+
| 'vectorize'
|
|
7754
|
+
| 'workflow';
|
|
7309
7755
|
|
|
7310
7756
|
/**
|
|
7311
|
-
*
|
|
7312
|
-
* except by the author or a project admin.
|
|
7757
|
+
* Metadata of the job with some additional information
|
|
7313
7758
|
*/
|
|
7314
|
-
|
|
7315
|
-
|
|
7316
|
-
lastIndexedAt?: string;
|
|
7759
|
+
metadata: Job.Metadata;
|
|
7317
7760
|
|
|
7318
7761
|
/**
|
|
7319
|
-
*
|
|
7762
|
+
* Progress of the job (between 0 and 1)
|
|
7320
7763
|
*/
|
|
7321
|
-
|
|
7764
|
+
progress: number;
|
|
7322
7765
|
|
|
7323
7766
|
/**
|
|
7324
|
-
*
|
|
7325
|
-
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
7326
|
-
* in the Ready state.
|
|
7767
|
+
* The current status of the job
|
|
7327
7768
|
*/
|
|
7328
|
-
|
|
7769
|
+
status:
|
|
7770
|
+
| 'canceled'
|
|
7771
|
+
| 'failure'
|
|
7772
|
+
| 'finalizing'
|
|
7773
|
+
| 'in-progress'
|
|
7774
|
+
| 'pending'
|
|
7775
|
+
| 'queued'
|
|
7776
|
+
| 'success'
|
|
7777
|
+
| 'warming-up';
|
|
7329
7778
|
|
|
7330
7779
|
/**
|
|
7331
|
-
*
|
|
7780
|
+
* The history of the different statuses the job went through with the ISO string
|
|
7781
|
+
* date of when the job reached each statuses.
|
|
7332
7782
|
*/
|
|
7333
|
-
|
|
7783
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
7334
7784
|
|
|
7335
7785
|
/**
|
|
7336
|
-
*
|
|
7786
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
7337
7787
|
*/
|
|
7338
|
-
|
|
7788
|
+
updatedAt: string;
|
|
7339
7789
|
|
|
7340
7790
|
/**
|
|
7341
|
-
*
|
|
7791
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
7342
7792
|
*/
|
|
7343
|
-
|
|
7793
|
+
authorId?: string;
|
|
7344
7794
|
|
|
7345
7795
|
/**
|
|
7346
|
-
*
|
|
7796
|
+
* The billing of the job
|
|
7347
7797
|
*/
|
|
7348
|
-
|
|
7798
|
+
billing?: Job.Billing;
|
|
7349
7799
|
|
|
7350
7800
|
/**
|
|
7351
|
-
* The
|
|
7801
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
7352
7802
|
*/
|
|
7353
|
-
|
|
7803
|
+
ownerId?: string;
|
|
7354
7804
|
}
|
|
7355
7805
|
|
|
7356
|
-
export namespace
|
|
7357
|
-
|
|
7358
|
-
|
|
7359
|
-
|
|
7360
|
-
|
|
7361
|
-
id: string;
|
|
7362
|
-
|
|
7363
|
-
/**
|
|
7364
|
-
* The type of the job for the node.
|
|
7365
|
-
*/
|
|
7366
|
-
type:
|
|
7367
|
-
| 'custom-model'
|
|
7368
|
-
| 'for-each'
|
|
7369
|
-
| 'generate-prompt'
|
|
7370
|
-
| 'list'
|
|
7371
|
-
| 'logic'
|
|
7372
|
-
| 'model'
|
|
7373
|
-
| 'remove-background'
|
|
7374
|
-
| 'transform'
|
|
7375
|
-
| 'user-approval'
|
|
7376
|
-
| 'workflow';
|
|
7377
|
-
|
|
7378
|
-
/**
|
|
7379
|
-
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
7380
|
-
* `count` times regardless of array input. When not set, the loop iterates over
|
|
7381
|
-
* the resolved array input. Only available for ForEach nodes.
|
|
7382
|
-
*/
|
|
7383
|
-
count?: number;
|
|
7384
|
-
|
|
7385
|
-
/**
|
|
7386
|
-
* The nodes that this node depends on. Only available for nodes that have
|
|
7387
|
-
* dependencies. Mainly used for user approval nodes.
|
|
7388
|
-
*/
|
|
7389
|
-
dependsOn?: Array<string>;
|
|
7390
|
-
|
|
7391
|
-
/**
|
|
7392
|
-
* If true, the outputs of this node will be included in the workflow job's final
|
|
7393
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
7394
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
7395
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
7396
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
7397
|
-
*/
|
|
7398
|
-
includeOutputsInWorkflowJob?: true;
|
|
7399
|
-
|
|
7400
|
-
/**
|
|
7401
|
-
* The inputs of the node.
|
|
7402
|
-
*/
|
|
7403
|
-
inputs?: Array<Flow.Input>;
|
|
7404
|
-
|
|
7405
|
-
/**
|
|
7406
|
-
* Statically-configured items for a List node. The node outputs this array as-is
|
|
7407
|
-
* when executed. Only available for List nodes. The values can be strings,
|
|
7408
|
-
* numbers, or asset IDs.
|
|
7409
|
-
*/
|
|
7410
|
-
items?: Array<string>;
|
|
7411
|
-
|
|
7412
|
-
/**
|
|
7413
|
-
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
7414
|
-
* dynamically-created copies of loop body nodes.
|
|
7415
|
-
*/
|
|
7416
|
-
iterationIndex?: number;
|
|
7417
|
-
|
|
7418
|
-
/**
|
|
7419
|
-
* The logic of the node. Only available for logic nodes.
|
|
7420
|
-
*/
|
|
7421
|
-
logic?: Flow.Logic;
|
|
7422
|
-
|
|
7423
|
-
/**
|
|
7424
|
-
* The type of the logic for the node. Only available for logic nodes.
|
|
7425
|
-
*/
|
|
7426
|
-
logicType?: 'if-else';
|
|
7427
|
-
|
|
7428
|
-
/**
|
|
7429
|
-
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
7430
|
-
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
7431
|
-
* for ForEach nodes.
|
|
7432
|
-
*/
|
|
7433
|
-
loopBodyNodeIds?: Array<string>;
|
|
7434
|
-
|
|
7435
|
-
/**
|
|
7436
|
-
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
7437
|
-
* dynamically-created copies of loop body nodes.
|
|
7438
|
-
*/
|
|
7439
|
-
loopNodeId?: string;
|
|
7440
|
-
|
|
7441
|
-
/**
|
|
7442
|
-
* The model id for the node. Mainly used for custom model tasks.
|
|
7443
|
-
*/
|
|
7444
|
-
modelId?: string;
|
|
7445
|
-
|
|
7446
|
-
/**
|
|
7447
|
-
* The workflow id for the node. Mainly used for workflow tasks.
|
|
7448
|
-
*/
|
|
7449
|
-
workflowId?: string;
|
|
7450
|
-
}
|
|
7451
|
-
|
|
7452
|
-
export namespace Flow {
|
|
7806
|
+
export namespace Job {
|
|
7807
|
+
/**
|
|
7808
|
+
* Metadata of the job with some additional information
|
|
7809
|
+
*/
|
|
7810
|
+
export interface Metadata {
|
|
7453
7811
|
/**
|
|
7454
|
-
*
|
|
7455
|
-
*/
|
|
7456
|
-
|
|
7457
|
-
/**
|
|
7458
|
-
* The name that must be user to call the model through the API
|
|
7459
|
-
*/
|
|
7460
|
-
name: string;
|
|
7461
|
-
|
|
7462
|
-
/**
|
|
7463
|
-
* The data type of the input
|
|
7464
|
-
*/
|
|
7465
|
-
type:
|
|
7466
|
-
| 'boolean'
|
|
7467
|
-
| 'file'
|
|
7468
|
-
| 'file_array'
|
|
7469
|
-
| 'inputs_array'
|
|
7470
|
-
| 'model'
|
|
7471
|
-
| 'model_array'
|
|
7472
|
-
| 'number'
|
|
7473
|
-
| 'number_array'
|
|
7474
|
-
| 'string'
|
|
7475
|
-
| 'string_array';
|
|
7476
|
-
|
|
7477
|
-
/**
|
|
7478
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
7479
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
7480
|
-
* dropdown.
|
|
7481
|
-
*/
|
|
7482
|
-
allowedValues?: Array<unknown>;
|
|
7483
|
-
|
|
7484
|
-
/**
|
|
7485
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
7486
|
-
* \`file_array\` input types with kind \`image\`.
|
|
7487
|
-
*/
|
|
7488
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
7812
|
+
* List of produced assets for this job
|
|
7813
|
+
*/
|
|
7814
|
+
assetIds?: Array<string>;
|
|
7489
7815
|
|
|
7490
|
-
|
|
7491
|
-
|
|
7492
|
-
|
|
7493
|
-
|
|
7816
|
+
/**
|
|
7817
|
+
* Eventual error for the job
|
|
7818
|
+
*/
|
|
7819
|
+
error?: string | null;
|
|
7494
7820
|
|
|
7495
|
-
|
|
7496
|
-
|
|
7497
|
-
|
|
7498
|
-
|
|
7821
|
+
/**
|
|
7822
|
+
* The flow of the job. Only available for workflow jobs.
|
|
7823
|
+
*/
|
|
7824
|
+
flow?: Array<Metadata.Flow>;
|
|
7499
7825
|
|
|
7500
|
-
|
|
7501
|
-
|
|
7502
|
-
|
|
7503
|
-
|
|
7826
|
+
/**
|
|
7827
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
7828
|
+
*/
|
|
7829
|
+
hint?: string;
|
|
7504
7830
|
|
|
7505
|
-
|
|
7506
|
-
|
|
7507
|
-
|
|
7508
|
-
|
|
7831
|
+
/**
|
|
7832
|
+
* The inputs for the job
|
|
7833
|
+
*/
|
|
7834
|
+
input?: { [key: string]: unknown };
|
|
7509
7835
|
|
|
7510
|
-
|
|
7511
|
-
|
|
7512
|
-
|
|
7513
|
-
|
|
7514
|
-
|
|
7836
|
+
/**
|
|
7837
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
7838
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
7839
|
+
* results.
|
|
7840
|
+
*/
|
|
7841
|
+
output?: { [key: string]: unknown };
|
|
7515
7842
|
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7843
|
+
/**
|
|
7844
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
7845
|
+
*/
|
|
7846
|
+
outputModelId?: string;
|
|
7520
7847
|
|
|
7521
|
-
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7526
|
-
|
|
7848
|
+
/**
|
|
7849
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
7850
|
+
*/
|
|
7851
|
+
workflowId?: string;
|
|
7852
|
+
|
|
7853
|
+
/**
|
|
7854
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
7855
|
+
*/
|
|
7856
|
+
workflowJobId?: string;
|
|
7857
|
+
}
|
|
7527
7858
|
|
|
7859
|
+
export namespace Metadata {
|
|
7860
|
+
export interface Flow {
|
|
7528
7861
|
/**
|
|
7529
|
-
* The
|
|
7530
|
-
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
7531
|
-
* type.
|
|
7862
|
+
* The id of the node.
|
|
7532
7863
|
*/
|
|
7533
|
-
|
|
7864
|
+
id: string;
|
|
7534
7865
|
|
|
7535
7866
|
/**
|
|
7536
|
-
* The
|
|
7537
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
7538
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
7539
|
-
* data:kind, prefix
|
|
7867
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
7540
7868
|
*/
|
|
7541
|
-
|
|
7869
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
7542
7870
|
|
|
7543
7871
|
/**
|
|
7544
|
-
* The
|
|
7872
|
+
* The type of the job for the node.
|
|
7545
7873
|
*/
|
|
7546
|
-
|
|
7874
|
+
type:
|
|
7875
|
+
| 'custom-model'
|
|
7876
|
+
| 'for-each'
|
|
7877
|
+
| 'generate-prompt'
|
|
7878
|
+
| 'list'
|
|
7879
|
+
| 'logic'
|
|
7880
|
+
| 'model'
|
|
7881
|
+
| 'remove-background'
|
|
7882
|
+
| 'transform'
|
|
7883
|
+
| 'user-approval'
|
|
7884
|
+
| 'workflow';
|
|
7547
7885
|
|
|
7548
7886
|
/**
|
|
7549
|
-
*
|
|
7887
|
+
* List of produced assets for this node.
|
|
7550
7888
|
*/
|
|
7551
|
-
|
|
7889
|
+
assets?: Array<Flow.Asset>;
|
|
7552
7890
|
|
|
7553
7891
|
/**
|
|
7554
|
-
*
|
|
7555
|
-
*
|
|
7892
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
7893
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
7894
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
7556
7895
|
*/
|
|
7557
|
-
|
|
7896
|
+
count?: number;
|
|
7558
7897
|
|
|
7559
7898
|
/**
|
|
7560
|
-
* The
|
|
7561
|
-
*
|
|
7899
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
7900
|
+
* dependencies. Mainly used for user approval nodes.
|
|
7562
7901
|
*/
|
|
7563
|
-
|
|
7902
|
+
dependsOn?: Array<string>;
|
|
7564
7903
|
|
|
7565
7904
|
/**
|
|
7566
|
-
*
|
|
7567
|
-
*
|
|
7568
|
-
*
|
|
7905
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
7906
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
7907
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
7908
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
7909
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
7569
7910
|
*/
|
|
7570
|
-
|
|
7911
|
+
includeOutputsInWorkflowJob?: true;
|
|
7571
7912
|
|
|
7572
7913
|
/**
|
|
7573
|
-
* The
|
|
7914
|
+
* The inputs of the node.
|
|
7574
7915
|
*/
|
|
7575
|
-
|
|
7916
|
+
inputs?: Array<Flow.Input>;
|
|
7576
7917
|
|
|
7577
7918
|
/**
|
|
7578
|
-
*
|
|
7579
|
-
*
|
|
7919
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
7920
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
7921
|
+
* numbers, or asset IDs.
|
|
7580
7922
|
*/
|
|
7581
|
-
|
|
7923
|
+
items?: Array<string>;
|
|
7582
7924
|
|
|
7583
7925
|
/**
|
|
7584
|
-
*
|
|
7585
|
-
*
|
|
7926
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
7927
|
+
* dynamically-created copies of loop body nodes.
|
|
7586
7928
|
*/
|
|
7587
|
-
|
|
7588
|
-
| 'custom'
|
|
7589
|
-
| 'elevenlabs-voice'
|
|
7590
|
-
| 'flux.1'
|
|
7591
|
-
| 'flux.1-composition'
|
|
7592
|
-
| 'flux.1-kontext-dev'
|
|
7593
|
-
| 'flux.1-kontext-lora'
|
|
7594
|
-
| 'flux.1-krea-dev'
|
|
7595
|
-
| 'flux.1-krea-lora'
|
|
7596
|
-
| 'flux.1-lora'
|
|
7597
|
-
| 'flux.1-pro'
|
|
7598
|
-
| 'flux.1.1-pro-ultra'
|
|
7599
|
-
| 'flux.2-dev-edit-lora'
|
|
7600
|
-
| 'flux.2-dev-lora'
|
|
7601
|
-
| 'flux.2-klein-4b-edit-lora'
|
|
7602
|
-
| 'flux.2-klein-4b-lora'
|
|
7603
|
-
| 'flux.2-klein-9b-edit-lora'
|
|
7604
|
-
| 'flux.2-klein-9b-lora'
|
|
7605
|
-
| 'flux.2-klein-base-4b-edit-lora'
|
|
7606
|
-
| 'flux.2-klein-base-4b-lora'
|
|
7607
|
-
| 'flux.2-klein-base-9b-edit-lora'
|
|
7608
|
-
| 'flux.2-klein-base-9b-lora'
|
|
7609
|
-
| 'flux1.1-pro'
|
|
7610
|
-
| 'gpt-image-1'
|
|
7611
|
-
| 'qwen-image-2512-lora'
|
|
7612
|
-
| 'qwen-image-edit-2509-lora'
|
|
7613
|
-
| 'qwen-image-edit-2511-lora'
|
|
7614
|
-
| 'qwen-image-edit-lora'
|
|
7615
|
-
| 'qwen-image-lora'
|
|
7616
|
-
| 'sd-1_5'
|
|
7617
|
-
| 'sd-1_5-composition'
|
|
7618
|
-
| 'sd-1_5-lora'
|
|
7619
|
-
| 'sd-xl'
|
|
7620
|
-
| 'sd-xl-composition'
|
|
7621
|
-
| 'sd-xl-lora'
|
|
7622
|
-
| 'zimage-de-turbo-lora'
|
|
7623
|
-
| 'zimage-lora'
|
|
7624
|
-
| 'zimage-turbo-lora'
|
|
7625
|
-
>;
|
|
7929
|
+
iterationIndex?: number;
|
|
7626
7930
|
|
|
7627
7931
|
/**
|
|
7628
|
-
*
|
|
7629
|
-
*
|
|
7630
|
-
*
|
|
7631
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
7932
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
7933
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
7934
|
+
* not started.
|
|
7632
7935
|
*/
|
|
7633
|
-
|
|
7936
|
+
jobId?: string;
|
|
7634
7937
|
|
|
7635
7938
|
/**
|
|
7636
|
-
*
|
|
7939
|
+
* The logic of the node. Only available for logic nodes.
|
|
7637
7940
|
*/
|
|
7638
|
-
|
|
7941
|
+
logic?: Flow.Logic;
|
|
7639
7942
|
|
|
7640
7943
|
/**
|
|
7641
|
-
*
|
|
7642
|
-
* spark feature. Only available for \`string\` input type.
|
|
7944
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
7643
7945
|
*/
|
|
7644
|
-
|
|
7946
|
+
logicType?: 'if-else';
|
|
7645
7947
|
|
|
7646
7948
|
/**
|
|
7647
|
-
*
|
|
7648
|
-
*
|
|
7949
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
7950
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
7951
|
+
* for ForEach nodes.
|
|
7649
7952
|
*/
|
|
7650
|
-
|
|
7953
|
+
loopBodyNodeIds?: Array<string>;
|
|
7651
7954
|
|
|
7652
7955
|
/**
|
|
7653
|
-
*
|
|
7654
|
-
*
|
|
7956
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
7957
|
+
* dynamically-created copies of loop body nodes.
|
|
7655
7958
|
*/
|
|
7656
|
-
|
|
7959
|
+
loopNodeId?: string;
|
|
7657
7960
|
|
|
7658
7961
|
/**
|
|
7659
|
-
*
|
|
7660
|
-
*
|
|
7661
|
-
* - \`always\`: Input is always required
|
|
7662
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7663
|
-
* defined
|
|
7664
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7665
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7666
|
-
* value
|
|
7667
|
-
*
|
|
7668
|
-
* By default, the input is not required.
|
|
7962
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
7669
7963
|
*/
|
|
7670
|
-
|
|
7964
|
+
modelId?: string;
|
|
7671
7965
|
|
|
7672
7966
|
/**
|
|
7673
|
-
* The
|
|
7967
|
+
* The output of the node. Only available for logic nodes.
|
|
7674
7968
|
*/
|
|
7675
|
-
|
|
7969
|
+
output?: unknown;
|
|
7676
7970
|
|
|
7677
7971
|
/**
|
|
7678
|
-
* The
|
|
7679
|
-
* the node. Only available for flows managed by a WorkflowJob.
|
|
7972
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
7680
7973
|
*/
|
|
7681
|
-
|
|
7974
|
+
workflowId?: string;
|
|
7682
7975
|
}
|
|
7683
7976
|
|
|
7684
|
-
export namespace
|
|
7977
|
+
export namespace Flow {
|
|
7978
|
+
export interface Asset {
|
|
7979
|
+
assetId: string;
|
|
7980
|
+
|
|
7981
|
+
url: string;
|
|
7982
|
+
}
|
|
7983
|
+
|
|
7685
7984
|
/**
|
|
7686
|
-
*
|
|
7687
|
-
* recursive items field.
|
|
7985
|
+
* This is used to run the flow.
|
|
7688
7986
|
*/
|
|
7689
|
-
export interface
|
|
7987
|
+
export interface Input {
|
|
7690
7988
|
/**
|
|
7691
7989
|
* The name that must be user to call the model through the API
|
|
7692
7990
|
*/
|
|
@@ -7758,6 +8056,13 @@ export namespace WorkflowRunResponse {
|
|
|
7758
8056
|
*/
|
|
7759
8057
|
inputs?: Array<{ [key: string]: unknown }>;
|
|
7760
8058
|
|
|
8059
|
+
/**
|
|
8060
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
8061
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
8062
|
+
* type.
|
|
8063
|
+
*/
|
|
8064
|
+
items?: Array<Array<Input.Item>>;
|
|
8065
|
+
|
|
7761
8066
|
/**
|
|
7762
8067
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
7763
8068
|
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
@@ -7780,7 +8085,14 @@ export namespace WorkflowRunResponse {
|
|
|
7780
8085
|
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
7781
8086
|
* types.
|
|
7782
8087
|
*/
|
|
7783
|
-
max?: number;
|
|
8088
|
+
max?: number;
|
|
8089
|
+
|
|
8090
|
+
/**
|
|
8091
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
8092
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
8093
|
+
* \`asset.properties.duration\` at job creation time.
|
|
8094
|
+
*/
|
|
8095
|
+
maxDuration?: number;
|
|
7784
8096
|
|
|
7785
8097
|
/**
|
|
7786
8098
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
@@ -7867,656 +8179,482 @@ export namespace WorkflowRunResponse {
|
|
|
7867
8179
|
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
7868
8180
|
* spark feature. Only available for \`string\` input type.
|
|
7869
8181
|
*/
|
|
7870
|
-
prompt?: boolean;
|
|
7871
|
-
|
|
7872
|
-
/**
|
|
7873
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
7874
|
-
* type.
|
|
7875
|
-
*/
|
|
7876
|
-
promptSpark?: boolean;
|
|
7877
|
-
|
|
7878
|
-
/**
|
|
7879
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
7880
|
-
* least one of node or conditional.
|
|
7881
|
-
*/
|
|
7882
|
-
ref?: Item.Ref;
|
|
7883
|
-
|
|
7884
|
-
/**
|
|
7885
|
-
* Set of rules that describes when this input is required:
|
|
7886
|
-
*
|
|
7887
|
-
* - \`always\`: Input is always required
|
|
7888
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7889
|
-
* defined
|
|
7890
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7891
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7892
|
-
* value
|
|
7893
|
-
*
|
|
7894
|
-
* By default, the input is not required.
|
|
7895
|
-
*/
|
|
7896
|
-
required?: Item.Required;
|
|
7897
|
-
|
|
7898
|
-
/**
|
|
7899
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
7900
|
-
*/
|
|
7901
|
-
step?: number;
|
|
7902
|
-
|
|
7903
|
-
/**
|
|
7904
|
-
* The value of the input. This is the value of the input that will be used to run
|
|
7905
|
-
* the node. Only available for flows managed by a WorkflowJob.
|
|
7906
|
-
*/
|
|
7907
|
-
value?: unknown;
|
|
7908
|
-
}
|
|
7909
|
-
|
|
7910
|
-
export namespace Item {
|
|
7911
|
-
/**
|
|
7912
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
7913
|
-
* least one of node or conditional.
|
|
7914
|
-
*/
|
|
7915
|
-
export interface Ref {
|
|
7916
|
-
/**
|
|
7917
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
7918
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
7919
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
7920
|
-
*/
|
|
7921
|
-
conditional?: Array<string>;
|
|
7922
|
-
|
|
7923
|
-
/**
|
|
7924
|
-
* This is the desired node output value if ref is an if/else node.
|
|
7925
|
-
*/
|
|
7926
|
-
equal?: string;
|
|
7927
|
-
|
|
7928
|
-
/**
|
|
7929
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
7930
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
7931
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
7932
|
-
* all outputs of a node, you can use the name 'all'.
|
|
7933
|
-
*/
|
|
7934
|
-
name?: string;
|
|
7935
|
-
|
|
7936
|
-
/**
|
|
7937
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
7938
|
-
*/
|
|
7939
|
-
node?: string;
|
|
7940
|
-
}
|
|
7941
|
-
|
|
7942
|
-
/**
|
|
7943
|
-
* Set of rules that describes when this input is required:
|
|
7944
|
-
*
|
|
7945
|
-
* - \`always\`: Input is always required
|
|
7946
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
7947
|
-
* defined
|
|
7948
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
7949
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
7950
|
-
* value
|
|
7951
|
-
*
|
|
7952
|
-
* By default, the input is not required.
|
|
7953
|
-
*/
|
|
7954
|
-
export interface Required {
|
|
7955
|
-
/**
|
|
7956
|
-
* Whether the input is always required
|
|
7957
|
-
*/
|
|
7958
|
-
always?: boolean;
|
|
7959
|
-
|
|
7960
|
-
/**
|
|
7961
|
-
* Makes this input required when another input has a specific value:
|
|
7962
|
-
*
|
|
7963
|
-
* - Key: name of the input to check
|
|
7964
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
7965
|
-
*/
|
|
7966
|
-
conditionalValues?: unknown;
|
|
7967
|
-
|
|
7968
|
-
/**
|
|
7969
|
-
* Makes this input required when another input is defined:
|
|
7970
|
-
*
|
|
7971
|
-
* - Key: name of the input that must be defined
|
|
7972
|
-
* - Value: message to display when this input is required
|
|
7973
|
-
*/
|
|
7974
|
-
ifDefined?: unknown;
|
|
7975
|
-
|
|
7976
|
-
/**
|
|
7977
|
-
* Makes this input required when another input is not defined:
|
|
7978
|
-
*
|
|
7979
|
-
* - Key: name of the input that must be undefined
|
|
7980
|
-
* - Value: message to display when this input is required
|
|
7981
|
-
*/
|
|
7982
|
-
ifNotDefined?: unknown;
|
|
7983
|
-
}
|
|
7984
|
-
}
|
|
7985
|
-
|
|
7986
|
-
/**
|
|
7987
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
7988
|
-
* least one of node or conditional.
|
|
7989
|
-
*/
|
|
7990
|
-
export interface Ref {
|
|
7991
|
-
/**
|
|
7992
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
7993
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
7994
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
7995
|
-
*/
|
|
7996
|
-
conditional?: Array<string>;
|
|
7997
|
-
|
|
7998
|
-
/**
|
|
7999
|
-
* This is the desired node output value if ref is an if/else node.
|
|
8000
|
-
*/
|
|
8001
|
-
equal?: string;
|
|
8002
|
-
|
|
8003
|
-
/**
|
|
8004
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
8005
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
8006
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
8007
|
-
* all outputs of a node, you can use the name 'all'.
|
|
8008
|
-
*/
|
|
8009
|
-
name?: string;
|
|
8010
|
-
|
|
8011
|
-
/**
|
|
8012
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
8013
|
-
*/
|
|
8014
|
-
node?: string;
|
|
8015
|
-
}
|
|
8016
|
-
|
|
8017
|
-
/**
|
|
8018
|
-
* Set of rules that describes when this input is required:
|
|
8019
|
-
*
|
|
8020
|
-
* - \`always\`: Input is always required
|
|
8021
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
8022
|
-
* defined
|
|
8023
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8024
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8025
|
-
* value
|
|
8026
|
-
*
|
|
8027
|
-
* By default, the input is not required.
|
|
8028
|
-
*/
|
|
8029
|
-
export interface Required {
|
|
8030
|
-
/**
|
|
8031
|
-
* Whether the input is always required
|
|
8032
|
-
*/
|
|
8033
|
-
always?: boolean;
|
|
8034
|
-
|
|
8035
|
-
/**
|
|
8036
|
-
* Makes this input required when another input has a specific value:
|
|
8037
|
-
*
|
|
8038
|
-
* - Key: name of the input to check
|
|
8039
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
8040
|
-
*/
|
|
8041
|
-
conditionalValues?: unknown;
|
|
8042
|
-
|
|
8043
|
-
/**
|
|
8044
|
-
* Makes this input required when another input is defined:
|
|
8045
|
-
*
|
|
8046
|
-
* - Key: name of the input that must be defined
|
|
8047
|
-
* - Value: message to display when this input is required
|
|
8048
|
-
*/
|
|
8049
|
-
ifDefined?: unknown;
|
|
8050
|
-
|
|
8051
|
-
/**
|
|
8052
|
-
* Makes this input required when another input is not defined:
|
|
8053
|
-
*
|
|
8054
|
-
* - Key: name of the input that must be undefined
|
|
8055
|
-
* - Value: message to display when this input is required
|
|
8056
|
-
*/
|
|
8057
|
-
ifNotDefined?: unknown;
|
|
8058
|
-
}
|
|
8059
|
-
}
|
|
8060
|
-
|
|
8061
|
-
/**
|
|
8062
|
-
* The logic of the node. Only available for logic nodes.
|
|
8063
|
-
*/
|
|
8064
|
-
export interface Logic {
|
|
8065
|
-
/**
|
|
8066
|
-
* The cases of the logic. Only available for if/else nodes.
|
|
8067
|
-
*/
|
|
8068
|
-
cases?: Array<Logic.Case>;
|
|
8069
|
-
|
|
8070
|
-
/**
|
|
8071
|
-
* The default case of the logic. Contains the id/output of the node to execute if
|
|
8072
|
-
* no case is matched. Only available for if/else nodes.
|
|
8073
|
-
*/
|
|
8074
|
-
default?: string;
|
|
8075
|
-
|
|
8076
|
-
/**
|
|
8077
|
-
* The transform of the logic. Only available for transform nodes.
|
|
8078
|
-
*/
|
|
8079
|
-
transform?: string;
|
|
8080
|
-
}
|
|
8081
|
-
|
|
8082
|
-
export namespace Logic {
|
|
8083
|
-
export interface Case {
|
|
8084
|
-
condition: string;
|
|
8085
|
-
|
|
8086
|
-
value: string;
|
|
8087
|
-
}
|
|
8088
|
-
}
|
|
8089
|
-
}
|
|
8090
|
-
|
|
8091
|
-
/**
|
|
8092
|
-
* Defines the input parameters for a model. Use this to understand the available
|
|
8093
|
-
* input parameters for a given `modelId` when calling
|
|
8094
|
-
* `POST /generate/custom/{modelId}`. See {@link
|
|
8095
|
-
* https://docs.scenario.com/docs/video-generation} for examples.
|
|
8096
|
-
*/
|
|
8097
|
-
export interface Input {
|
|
8098
|
-
/**
|
|
8099
|
-
* The name that must be user to call the model through the API
|
|
8100
|
-
*/
|
|
8101
|
-
name: string;
|
|
8102
|
-
|
|
8103
|
-
/**
|
|
8104
|
-
* The data type of the input
|
|
8105
|
-
*/
|
|
8106
|
-
type:
|
|
8107
|
-
| 'boolean'
|
|
8108
|
-
| 'file'
|
|
8109
|
-
| 'file_array'
|
|
8110
|
-
| 'inputs_array'
|
|
8111
|
-
| 'model'
|
|
8112
|
-
| 'model_array'
|
|
8113
|
-
| 'number'
|
|
8114
|
-
| 'number_array'
|
|
8115
|
-
| 'string'
|
|
8116
|
-
| 'string_array';
|
|
8117
|
-
|
|
8118
|
-
/**
|
|
8119
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
8120
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
8121
|
-
* dropdown.
|
|
8122
|
-
*/
|
|
8123
|
-
allowedValues?: Array<unknown>;
|
|
8182
|
+
prompt?: boolean;
|
|
8124
8183
|
|
|
8125
|
-
|
|
8126
|
-
|
|
8127
|
-
|
|
8128
|
-
|
|
8129
|
-
|
|
8184
|
+
/**
|
|
8185
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
8186
|
+
* type.
|
|
8187
|
+
*/
|
|
8188
|
+
promptSpark?: boolean;
|
|
8130
8189
|
|
|
8131
|
-
|
|
8132
|
-
|
|
8133
|
-
|
|
8134
|
-
|
|
8190
|
+
/**
|
|
8191
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
8192
|
+
* least one of node or conditional.
|
|
8193
|
+
*/
|
|
8194
|
+
ref?: Input.Ref;
|
|
8135
8195
|
|
|
8136
|
-
|
|
8137
|
-
|
|
8138
|
-
|
|
8139
|
-
|
|
8196
|
+
/**
|
|
8197
|
+
* Set of rules that describes when this input is required:
|
|
8198
|
+
*
|
|
8199
|
+
* - \`always\`: Input is always required
|
|
8200
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
8201
|
+
* defined
|
|
8202
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8203
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8204
|
+
* value
|
|
8205
|
+
*
|
|
8206
|
+
* By default, the input is not required.
|
|
8207
|
+
*/
|
|
8208
|
+
required?: Input.Required;
|
|
8140
8209
|
|
|
8141
|
-
|
|
8142
|
-
|
|
8143
|
-
|
|
8144
|
-
|
|
8210
|
+
/**
|
|
8211
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
8212
|
+
*/
|
|
8213
|
+
step?: number;
|
|
8145
8214
|
|
|
8146
|
-
|
|
8147
|
-
|
|
8148
|
-
|
|
8149
|
-
|
|
8215
|
+
/**
|
|
8216
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
8217
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
8218
|
+
*/
|
|
8219
|
+
value?: unknown;
|
|
8220
|
+
}
|
|
8150
8221
|
|
|
8151
|
-
|
|
8152
|
-
|
|
8153
|
-
|
|
8154
|
-
|
|
8155
|
-
|
|
8222
|
+
export namespace Input {
|
|
8223
|
+
/**
|
|
8224
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
8225
|
+
* recursive items field.
|
|
8226
|
+
*/
|
|
8227
|
+
export interface Item {
|
|
8228
|
+
/**
|
|
8229
|
+
* The name that must be user to call the model through the API
|
|
8230
|
+
*/
|
|
8231
|
+
name: string;
|
|
8156
8232
|
|
|
8157
|
-
|
|
8158
|
-
|
|
8159
|
-
|
|
8160
|
-
|
|
8233
|
+
/**
|
|
8234
|
+
* The data type of the input
|
|
8235
|
+
*/
|
|
8236
|
+
type:
|
|
8237
|
+
| 'boolean'
|
|
8238
|
+
| 'file'
|
|
8239
|
+
| 'file_array'
|
|
8240
|
+
| 'inputs_array'
|
|
8241
|
+
| 'model'
|
|
8242
|
+
| 'model_array'
|
|
8243
|
+
| 'number'
|
|
8244
|
+
| 'number_array'
|
|
8245
|
+
| 'string'
|
|
8246
|
+
| 'string_array';
|
|
8161
8247
|
|
|
8162
|
-
|
|
8163
|
-
|
|
8164
|
-
|
|
8165
|
-
|
|
8166
|
-
|
|
8167
|
-
|
|
8248
|
+
/**
|
|
8249
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
8250
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
8251
|
+
* dropdown.
|
|
8252
|
+
*/
|
|
8253
|
+
allowedValues?: Array<unknown>;
|
|
8168
8254
|
|
|
8169
|
-
|
|
8170
|
-
|
|
8171
|
-
|
|
8172
|
-
|
|
8173
|
-
|
|
8174
|
-
*/
|
|
8175
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
8255
|
+
/**
|
|
8256
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
8257
|
+
* \`file_array\` input types with kind \`image\`.
|
|
8258
|
+
*/
|
|
8259
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
8176
8260
|
|
|
8177
|
-
|
|
8178
|
-
|
|
8179
|
-
|
|
8180
|
-
|
|
8261
|
+
/**
|
|
8262
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
8263
|
+
*/
|
|
8264
|
+
color?: boolean;
|
|
8181
8265
|
|
|
8182
|
-
|
|
8183
|
-
|
|
8184
|
-
|
|
8185
|
-
|
|
8266
|
+
/**
|
|
8267
|
+
* Whether this input affects the model's cost calculation
|
|
8268
|
+
*/
|
|
8269
|
+
costImpact?: boolean;
|
|
8186
8270
|
|
|
8187
|
-
|
|
8188
|
-
|
|
8189
|
-
|
|
8190
|
-
|
|
8191
|
-
max?: number;
|
|
8271
|
+
/**
|
|
8272
|
+
* The default value for the input
|
|
8273
|
+
*/
|
|
8274
|
+
default?: unknown;
|
|
8192
8275
|
|
|
8193
|
-
|
|
8194
|
-
|
|
8195
|
-
|
|
8196
|
-
|
|
8197
|
-
maxLength?: number;
|
|
8276
|
+
/**
|
|
8277
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
8278
|
+
*/
|
|
8279
|
+
description?: string;
|
|
8198
8280
|
|
|
8199
|
-
|
|
8200
|
-
|
|
8201
|
-
|
|
8202
|
-
|
|
8203
|
-
|
|
8204
|
-
maxSize?: number;
|
|
8281
|
+
/**
|
|
8282
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
8283
|
+
* value appear consecutively in the UI.
|
|
8284
|
+
*/
|
|
8285
|
+
group?: string;
|
|
8205
8286
|
|
|
8206
|
-
|
|
8207
|
-
|
|
8208
|
-
|
|
8209
|
-
|
|
8287
|
+
/**
|
|
8288
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
8289
|
+
*/
|
|
8290
|
+
hint?: string;
|
|
8210
8291
|
|
|
8211
|
-
|
|
8212
|
-
|
|
8213
|
-
|
|
8214
|
-
|
|
8215
|
-
|
|
8292
|
+
/**
|
|
8293
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
8294
|
+
* the same as the current object. This is only available for type inputs_array
|
|
8295
|
+
* inputs.
|
|
8296
|
+
*/
|
|
8297
|
+
inputs?: Array<{ [key: string]: unknown }>;
|
|
8216
8298
|
|
|
8217
|
-
|
|
8218
|
-
|
|
8219
|
-
|
|
8220
|
-
|
|
8221
|
-
|
|
8222
|
-
|
|
8223
|
-
|
|
8224
|
-
| 'flux.1'
|
|
8225
|
-
| 'flux.1-composition'
|
|
8226
|
-
| 'flux.1-kontext-dev'
|
|
8227
|
-
| 'flux.1-kontext-lora'
|
|
8228
|
-
| 'flux.1-krea-dev'
|
|
8229
|
-
| 'flux.1-krea-lora'
|
|
8230
|
-
| 'flux.1-lora'
|
|
8231
|
-
| 'flux.1-pro'
|
|
8232
|
-
| 'flux.1.1-pro-ultra'
|
|
8233
|
-
| 'flux.2-dev-edit-lora'
|
|
8234
|
-
| 'flux.2-dev-lora'
|
|
8235
|
-
| 'flux.2-klein-4b-edit-lora'
|
|
8236
|
-
| 'flux.2-klein-4b-lora'
|
|
8237
|
-
| 'flux.2-klein-9b-edit-lora'
|
|
8238
|
-
| 'flux.2-klein-9b-lora'
|
|
8239
|
-
| 'flux.2-klein-base-4b-edit-lora'
|
|
8240
|
-
| 'flux.2-klein-base-4b-lora'
|
|
8241
|
-
| 'flux.2-klein-base-9b-edit-lora'
|
|
8242
|
-
| 'flux.2-klein-base-9b-lora'
|
|
8243
|
-
| 'flux1.1-pro'
|
|
8244
|
-
| 'gpt-image-1'
|
|
8245
|
-
| 'qwen-image-2512-lora'
|
|
8246
|
-
| 'qwen-image-edit-2509-lora'
|
|
8247
|
-
| 'qwen-image-edit-2511-lora'
|
|
8248
|
-
| 'qwen-image-edit-lora'
|
|
8249
|
-
| 'qwen-image-lora'
|
|
8250
|
-
| 'sd-1_5'
|
|
8251
|
-
| 'sd-1_5-composition'
|
|
8252
|
-
| 'sd-1_5-lora'
|
|
8253
|
-
| 'sd-xl'
|
|
8254
|
-
| 'sd-xl-composition'
|
|
8255
|
-
| 'sd-xl-lora'
|
|
8256
|
-
| 'zimage-de-turbo-lora'
|
|
8257
|
-
| 'zimage-lora'
|
|
8258
|
-
| 'zimage-turbo-lora'
|
|
8259
|
-
>;
|
|
8299
|
+
/**
|
|
8300
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
8301
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
8302
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
8303
|
+
* data:kind, prefix
|
|
8304
|
+
*/
|
|
8305
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
8260
8306
|
|
|
8261
|
-
|
|
8262
|
-
|
|
8263
|
-
|
|
8264
|
-
|
|
8265
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
8266
|
-
*/
|
|
8267
|
-
parent?: boolean;
|
|
8307
|
+
/**
|
|
8308
|
+
* The label displayed in the UI for this input
|
|
8309
|
+
*/
|
|
8310
|
+
label?: string;
|
|
8268
8311
|
|
|
8269
|
-
|
|
8270
|
-
|
|
8271
|
-
|
|
8272
|
-
|
|
8312
|
+
/**
|
|
8313
|
+
* The name of the file input field to use as the mask source
|
|
8314
|
+
*/
|
|
8315
|
+
maskFrom?: string;
|
|
8273
8316
|
|
|
8274
|
-
|
|
8275
|
-
|
|
8276
|
-
|
|
8277
|
-
|
|
8278
|
-
|
|
8317
|
+
/**
|
|
8318
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
8319
|
+
* types.
|
|
8320
|
+
*/
|
|
8321
|
+
max?: number;
|
|
8322
|
+
|
|
8323
|
+
/**
|
|
8324
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
8325
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
8326
|
+
* \`asset.properties.duration\` at job creation time.
|
|
8327
|
+
*/
|
|
8328
|
+
maxDuration?: number;
|
|
8279
8329
|
|
|
8280
|
-
|
|
8281
|
-
|
|
8282
|
-
|
|
8283
|
-
|
|
8284
|
-
|
|
8330
|
+
/**
|
|
8331
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
8332
|
+
* \`string_array\`.
|
|
8333
|
+
*/
|
|
8334
|
+
maxLength?: number;
|
|
8285
8335
|
|
|
8286
|
-
|
|
8287
|
-
|
|
8288
|
-
|
|
8289
|
-
|
|
8290
|
-
|
|
8291
|
-
|
|
8292
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8293
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8294
|
-
* value
|
|
8295
|
-
*
|
|
8296
|
-
* By default, the input is not required.
|
|
8297
|
-
*/
|
|
8298
|
-
required?: Input.Required;
|
|
8336
|
+
/**
|
|
8337
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
8338
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
8339
|
+
* creation time.
|
|
8340
|
+
*/
|
|
8341
|
+
maxSize?: number;
|
|
8299
8342
|
|
|
8300
|
-
|
|
8301
|
-
|
|
8302
|
-
|
|
8303
|
-
|
|
8304
|
-
}
|
|
8343
|
+
/**
|
|
8344
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
8345
|
+
*/
|
|
8346
|
+
min?: number;
|
|
8305
8347
|
|
|
8306
|
-
|
|
8307
|
-
|
|
8308
|
-
|
|
8309
|
-
|
|
8310
|
-
|
|
8311
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
8312
|
-
* defined
|
|
8313
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8314
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8315
|
-
* value
|
|
8316
|
-
*
|
|
8317
|
-
* By default, the input is not required.
|
|
8318
|
-
*/
|
|
8319
|
-
export interface Required {
|
|
8320
|
-
/**
|
|
8321
|
-
* Whether the input is always required
|
|
8322
|
-
*/
|
|
8323
|
-
always?: boolean;
|
|
8348
|
+
/**
|
|
8349
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
8350
|
+
* \`string_array\`.
|
|
8351
|
+
*/
|
|
8352
|
+
minLength?: number;
|
|
8324
8353
|
|
|
8325
|
-
|
|
8326
|
-
|
|
8327
|
-
|
|
8328
|
-
|
|
8329
|
-
|
|
8330
|
-
|
|
8331
|
-
|
|
8354
|
+
/**
|
|
8355
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
8356
|
+
* available for \`model_array\` input type.
|
|
8357
|
+
*/
|
|
8358
|
+
modelTypes?: Array<
|
|
8359
|
+
| 'custom'
|
|
8360
|
+
| 'elevenlabs-voice'
|
|
8361
|
+
| 'flux.1'
|
|
8362
|
+
| 'flux.1-composition'
|
|
8363
|
+
| 'flux.1-kontext-dev'
|
|
8364
|
+
| 'flux.1-kontext-lora'
|
|
8365
|
+
| 'flux.1-krea-dev'
|
|
8366
|
+
| 'flux.1-krea-lora'
|
|
8367
|
+
| 'flux.1-lora'
|
|
8368
|
+
| 'flux.1-pro'
|
|
8369
|
+
| 'flux.1.1-pro-ultra'
|
|
8370
|
+
| 'flux.2-dev-edit-lora'
|
|
8371
|
+
| 'flux.2-dev-lora'
|
|
8372
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
8373
|
+
| 'flux.2-klein-4b-lora'
|
|
8374
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
8375
|
+
| 'flux.2-klein-9b-lora'
|
|
8376
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
8377
|
+
| 'flux.2-klein-base-4b-lora'
|
|
8378
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
8379
|
+
| 'flux.2-klein-base-9b-lora'
|
|
8380
|
+
| 'flux1.1-pro'
|
|
8381
|
+
| 'gpt-image-1'
|
|
8382
|
+
| 'qwen-image-2512-lora'
|
|
8383
|
+
| 'qwen-image-edit-2509-lora'
|
|
8384
|
+
| 'qwen-image-edit-2511-lora'
|
|
8385
|
+
| 'qwen-image-edit-lora'
|
|
8386
|
+
| 'qwen-image-lora'
|
|
8387
|
+
| 'sd-1_5'
|
|
8388
|
+
| 'sd-1_5-composition'
|
|
8389
|
+
| 'sd-1_5-lora'
|
|
8390
|
+
| 'sd-xl'
|
|
8391
|
+
| 'sd-xl-composition'
|
|
8392
|
+
| 'sd-xl-lora'
|
|
8393
|
+
| 'zimage-de-turbo-lora'
|
|
8394
|
+
| 'zimage-lora'
|
|
8395
|
+
| 'zimage-turbo-lora'
|
|
8396
|
+
>;
|
|
8332
8397
|
|
|
8333
|
-
|
|
8334
|
-
|
|
8335
|
-
|
|
8336
|
-
|
|
8337
|
-
|
|
8338
|
-
|
|
8339
|
-
|
|
8398
|
+
/**
|
|
8399
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
8400
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
8401
|
+
*
|
|
8402
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
8403
|
+
*/
|
|
8404
|
+
parent?: boolean;
|
|
8340
8405
|
|
|
8341
|
-
|
|
8342
|
-
|
|
8343
|
-
|
|
8344
|
-
|
|
8345
|
-
* - Value: message to display when this input is required
|
|
8346
|
-
*/
|
|
8347
|
-
ifNotDefined?: unknown;
|
|
8348
|
-
}
|
|
8349
|
-
}
|
|
8406
|
+
/**
|
|
8407
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
8408
|
+
*/
|
|
8409
|
+
placeholder?: string;
|
|
8350
8410
|
|
|
8351
|
-
|
|
8352
|
-
|
|
8353
|
-
|
|
8354
|
-
|
|
8355
|
-
|
|
8356
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
8357
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
8358
|
-
*/
|
|
8359
|
-
assetId: string;
|
|
8411
|
+
/**
|
|
8412
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
8413
|
+
* spark feature. Only available for \`string\` input type.
|
|
8414
|
+
*/
|
|
8415
|
+
prompt?: boolean;
|
|
8360
8416
|
|
|
8361
|
-
|
|
8362
|
-
|
|
8363
|
-
|
|
8364
|
-
|
|
8365
|
-
|
|
8417
|
+
/**
|
|
8418
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
8419
|
+
* type.
|
|
8420
|
+
*/
|
|
8421
|
+
promptSpark?: boolean;
|
|
8366
8422
|
|
|
8367
|
-
|
|
8368
|
-
|
|
8369
|
-
|
|
8370
|
-
|
|
8371
|
-
|
|
8372
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
8373
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
8374
|
-
*/
|
|
8375
|
-
assetId: string;
|
|
8423
|
+
/**
|
|
8424
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
8425
|
+
* least one of node or conditional.
|
|
8426
|
+
*/
|
|
8427
|
+
ref?: Item.Ref;
|
|
8376
8428
|
|
|
8377
|
-
|
|
8378
|
-
|
|
8379
|
-
|
|
8380
|
-
|
|
8381
|
-
|
|
8429
|
+
/**
|
|
8430
|
+
* Set of rules that describes when this input is required:
|
|
8431
|
+
*
|
|
8432
|
+
* - \`always\`: Input is always required
|
|
8433
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
8434
|
+
* defined
|
|
8435
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8436
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8437
|
+
* value
|
|
8438
|
+
*
|
|
8439
|
+
* By default, the input is not required.
|
|
8440
|
+
*/
|
|
8441
|
+
required?: Item.Required;
|
|
8382
8442
|
|
|
8383
|
-
|
|
8384
|
-
|
|
8385
|
-
|
|
8386
|
-
|
|
8387
|
-
assetId: string;
|
|
8443
|
+
/**
|
|
8444
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
8445
|
+
*/
|
|
8446
|
+
step?: number;
|
|
8388
8447
|
|
|
8389
|
-
|
|
8390
|
-
|
|
8448
|
+
/**
|
|
8449
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
8450
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
8451
|
+
*/
|
|
8452
|
+
value?: unknown;
|
|
8453
|
+
}
|
|
8391
8454
|
|
|
8392
|
-
|
|
8393
|
-
|
|
8394
|
-
|
|
8395
|
-
|
|
8396
|
-
|
|
8397
|
-
|
|
8398
|
-
|
|
8399
|
-
|
|
8455
|
+
export namespace Item {
|
|
8456
|
+
/**
|
|
8457
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
8458
|
+
* least one of node or conditional.
|
|
8459
|
+
*/
|
|
8460
|
+
export interface Ref {
|
|
8461
|
+
/**
|
|
8462
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
8463
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
8464
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
8465
|
+
*/
|
|
8466
|
+
conditional?: Array<string>;
|
|
8400
8467
|
|
|
8401
|
-
|
|
8402
|
-
|
|
8403
|
-
|
|
8404
|
-
|
|
8468
|
+
/**
|
|
8469
|
+
* This is the desired node output value if ref is an if/else node.
|
|
8470
|
+
*/
|
|
8471
|
+
equal?: string;
|
|
8405
8472
|
|
|
8406
|
-
|
|
8407
|
-
|
|
8408
|
-
|
|
8409
|
-
|
|
8473
|
+
/**
|
|
8474
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
8475
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
8476
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
8477
|
+
* all outputs of a node, you can use the name 'all'.
|
|
8478
|
+
*/
|
|
8479
|
+
name?: string;
|
|
8480
|
+
|
|
8481
|
+
/**
|
|
8482
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
8483
|
+
*/
|
|
8484
|
+
node?: string;
|
|
8485
|
+
}
|
|
8410
8486
|
|
|
8411
|
-
|
|
8412
|
-
|
|
8413
|
-
|
|
8414
|
-
|
|
8487
|
+
/**
|
|
8488
|
+
* Set of rules that describes when this input is required:
|
|
8489
|
+
*
|
|
8490
|
+
* - \`always\`: Input is always required
|
|
8491
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
8492
|
+
* defined
|
|
8493
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8494
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8495
|
+
* value
|
|
8496
|
+
*
|
|
8497
|
+
* By default, the input is not required.
|
|
8498
|
+
*/
|
|
8499
|
+
export interface Required {
|
|
8500
|
+
/**
|
|
8501
|
+
* Whether the input is always required
|
|
8502
|
+
*/
|
|
8503
|
+
always?: boolean;
|
|
8415
8504
|
|
|
8416
|
-
|
|
8417
|
-
|
|
8418
|
-
|
|
8419
|
-
|
|
8505
|
+
/**
|
|
8506
|
+
* Makes this input required when another input has a specific value:
|
|
8507
|
+
*
|
|
8508
|
+
* - Key: name of the input to check
|
|
8509
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
8510
|
+
*/
|
|
8511
|
+
conditionalValues?: unknown;
|
|
8420
8512
|
|
|
8421
|
-
|
|
8422
|
-
|
|
8423
|
-
|
|
8424
|
-
|
|
8425
|
-
|
|
8513
|
+
/**
|
|
8514
|
+
* Makes this input required when another input is defined:
|
|
8515
|
+
*
|
|
8516
|
+
* - Key: name of the input that must be defined
|
|
8517
|
+
* - Value: message to display when this input is required
|
|
8518
|
+
*/
|
|
8519
|
+
ifDefined?: unknown;
|
|
8426
8520
|
|
|
8427
|
-
|
|
8428
|
-
|
|
8429
|
-
|
|
8430
|
-
|
|
8521
|
+
/**
|
|
8522
|
+
* Makes this input required when another input is not defined:
|
|
8523
|
+
*
|
|
8524
|
+
* - Key: name of the input that must be undefined
|
|
8525
|
+
* - Value: message to display when this input is required
|
|
8526
|
+
*/
|
|
8527
|
+
ifNotDefined?: unknown;
|
|
8528
|
+
}
|
|
8529
|
+
}
|
|
8431
8530
|
|
|
8432
|
-
|
|
8433
|
-
|
|
8434
|
-
|
|
8435
|
-
|
|
8436
|
-
|
|
8437
|
-
|
|
8438
|
-
|
|
8439
|
-
|
|
8531
|
+
/**
|
|
8532
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
8533
|
+
* least one of node or conditional.
|
|
8534
|
+
*/
|
|
8535
|
+
export interface Ref {
|
|
8536
|
+
/**
|
|
8537
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
8538
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
8539
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
8540
|
+
*/
|
|
8541
|
+
conditional?: Array<string>;
|
|
8440
8542
|
|
|
8441
|
-
|
|
8442
|
-
|
|
8443
|
-
|
|
8444
|
-
|
|
8543
|
+
/**
|
|
8544
|
+
* This is the desired node output value if ref is an if/else node.
|
|
8545
|
+
*/
|
|
8546
|
+
equal?: string;
|
|
8445
8547
|
|
|
8446
|
-
|
|
8447
|
-
|
|
8448
|
-
|
|
8449
|
-
|
|
8548
|
+
/**
|
|
8549
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
8550
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
8551
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
8552
|
+
* all outputs of a node, you can use the name 'all'.
|
|
8553
|
+
*/
|
|
8554
|
+
name?: string;
|
|
8450
8555
|
|
|
8451
|
-
|
|
8452
|
-
|
|
8453
|
-
|
|
8454
|
-
|
|
8455
|
-
|
|
8456
|
-
*/
|
|
8457
|
-
modelIdInput?: string;
|
|
8458
|
-
}
|
|
8556
|
+
/**
|
|
8557
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
8558
|
+
*/
|
|
8559
|
+
node?: string;
|
|
8560
|
+
}
|
|
8459
8561
|
|
|
8460
|
-
|
|
8461
|
-
|
|
8562
|
+
/**
|
|
8563
|
+
* Set of rules that describes when this input is required:
|
|
8564
|
+
*
|
|
8565
|
+
* - \`always\`: Input is always required
|
|
8566
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
8567
|
+
* defined
|
|
8568
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
8569
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
8570
|
+
* value
|
|
8571
|
+
*
|
|
8572
|
+
* By default, the input is not required.
|
|
8573
|
+
*/
|
|
8574
|
+
export interface Required {
|
|
8575
|
+
/**
|
|
8576
|
+
* Whether the input is always required
|
|
8577
|
+
*/
|
|
8578
|
+
always?: boolean;
|
|
8462
8579
|
|
|
8463
|
-
|
|
8464
|
-
|
|
8580
|
+
/**
|
|
8581
|
+
* Makes this input required when another input has a specific value:
|
|
8582
|
+
*
|
|
8583
|
+
* - Key: name of the input to check
|
|
8584
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
8585
|
+
*/
|
|
8586
|
+
conditionalValues?: unknown;
|
|
8465
8587
|
|
|
8466
|
-
|
|
8467
|
-
|
|
8468
|
-
|
|
8469
|
-
|
|
8470
|
-
|
|
8471
|
-
|
|
8472
|
-
|
|
8473
|
-
heightInput: string;
|
|
8588
|
+
/**
|
|
8589
|
+
* Makes this input required when another input is defined:
|
|
8590
|
+
*
|
|
8591
|
+
* - Key: name of the input that must be defined
|
|
8592
|
+
* - Value: message to display when this input is required
|
|
8593
|
+
*/
|
|
8594
|
+
ifDefined?: unknown;
|
|
8474
8595
|
|
|
8475
|
-
|
|
8476
|
-
|
|
8477
|
-
|
|
8478
|
-
|
|
8596
|
+
/**
|
|
8597
|
+
* Makes this input required when another input is not defined:
|
|
8598
|
+
*
|
|
8599
|
+
* - Key: name of the input that must be undefined
|
|
8600
|
+
* - Value: message to display when this input is required
|
|
8601
|
+
*/
|
|
8602
|
+
ifNotDefined?: unknown;
|
|
8603
|
+
}
|
|
8604
|
+
}
|
|
8479
8605
|
|
|
8480
8606
|
/**
|
|
8481
|
-
* The
|
|
8607
|
+
* The logic of the node. Only available for logic nodes.
|
|
8482
8608
|
*/
|
|
8483
|
-
|
|
8609
|
+
export interface Logic {
|
|
8610
|
+
/**
|
|
8611
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
8612
|
+
*/
|
|
8613
|
+
cases?: Array<Logic.Case>;
|
|
8484
8614
|
|
|
8485
|
-
|
|
8486
|
-
|
|
8487
|
-
|
|
8488
|
-
|
|
8489
|
-
|
|
8615
|
+
/**
|
|
8616
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
8617
|
+
* no case is matched. Only available for if/else nodes.
|
|
8618
|
+
*/
|
|
8619
|
+
default?: string;
|
|
8490
8620
|
|
|
8491
|
-
|
|
8492
|
-
|
|
8493
|
-
|
|
8621
|
+
/**
|
|
8622
|
+
* The transform of the logic. Only available for transform nodes.
|
|
8623
|
+
*/
|
|
8624
|
+
transform?: string;
|
|
8625
|
+
}
|
|
8494
8626
|
|
|
8495
|
-
|
|
8627
|
+
export namespace Logic {
|
|
8628
|
+
export interface Case {
|
|
8629
|
+
condition: string;
|
|
8496
8630
|
|
|
8497
|
-
|
|
8631
|
+
value: string;
|
|
8632
|
+
}
|
|
8498
8633
|
}
|
|
8499
8634
|
}
|
|
8635
|
+
}
|
|
8500
8636
|
|
|
8501
|
-
|
|
8502
|
-
|
|
8503
|
-
*/
|
|
8504
|
-
export interface TriggerGenerate {
|
|
8505
|
-
label: string;
|
|
8637
|
+
export interface StatusHistory {
|
|
8638
|
+
date: string;
|
|
8506
8639
|
|
|
8507
|
-
|
|
8508
|
-
|
|
8509
|
-
|
|
8510
|
-
|
|
8511
|
-
|
|
8640
|
+
status:
|
|
8641
|
+
| 'canceled'
|
|
8642
|
+
| 'failure'
|
|
8643
|
+
| 'finalizing'
|
|
8644
|
+
| 'in-progress'
|
|
8645
|
+
| 'pending'
|
|
8646
|
+
| 'queued'
|
|
8647
|
+
| 'success'
|
|
8648
|
+
| 'warming-up';
|
|
8649
|
+
}
|
|
8512
8650
|
|
|
8513
|
-
|
|
8514
|
-
|
|
8515
|
-
|
|
8516
|
-
|
|
8517
|
-
|
|
8518
|
-
|
|
8519
|
-
|
|
8651
|
+
/**
|
|
8652
|
+
* The billing of the job
|
|
8653
|
+
*/
|
|
8654
|
+
export interface Billing {
|
|
8655
|
+
cuCost: number;
|
|
8656
|
+
|
|
8657
|
+
cuDiscount: number;
|
|
8520
8658
|
}
|
|
8521
8659
|
}
|
|
8522
8660
|
}
|
|
@@ -8811,6 +8949,13 @@ export namespace WorkflowUpdateParams {
|
|
|
8811
8949
|
*/
|
|
8812
8950
|
max?: number;
|
|
8813
8951
|
|
|
8952
|
+
/**
|
|
8953
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
8954
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
8955
|
+
* \`asset.properties.duration\` at job creation time.
|
|
8956
|
+
*/
|
|
8957
|
+
maxDuration?: number;
|
|
8958
|
+
|
|
8814
8959
|
/**
|
|
8815
8960
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
8816
8961
|
* \`string_array\`.
|
|
@@ -9037,6 +9182,13 @@ export namespace WorkflowUpdateParams {
|
|
|
9037
9182
|
*/
|
|
9038
9183
|
max?: number;
|
|
9039
9184
|
|
|
9185
|
+
/**
|
|
9186
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
9187
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
9188
|
+
* \`asset.properties.duration\` at job creation time.
|
|
9189
|
+
*/
|
|
9190
|
+
maxDuration?: number;
|
|
9191
|
+
|
|
9040
9192
|
/**
|
|
9041
9193
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
9042
9194
|
* \`string_array\`.
|
|
@@ -9445,6 +9597,13 @@ export namespace WorkflowUpdateParams {
|
|
|
9445
9597
|
*/
|
|
9446
9598
|
max?: number;
|
|
9447
9599
|
|
|
9600
|
+
/**
|
|
9601
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
9602
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
9603
|
+
* \`asset.properties.duration\` at job creation time.
|
|
9604
|
+
*/
|
|
9605
|
+
maxDuration?: number;
|
|
9606
|
+
|
|
9448
9607
|
/**
|
|
9449
9608
|
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
9450
9609
|
* \`string_array\`.
|
|
@@ -9656,6 +9815,18 @@ export interface WorkflowRunParams {
|
|
|
9656
9815
|
dryRun?: unknown;
|
|
9657
9816
|
}
|
|
9658
9817
|
|
|
9818
|
+
export interface WorkflowUserApprovalParams {
|
|
9819
|
+
/**
|
|
9820
|
+
* The ID of the user approval node to approve in the workflow
|
|
9821
|
+
*/
|
|
9822
|
+
nodeId: string;
|
|
9823
|
+
|
|
9824
|
+
/**
|
|
9825
|
+
* The ID of the workflow job that contains the user approval node
|
|
9826
|
+
*/
|
|
9827
|
+
workflowJobId: string;
|
|
9828
|
+
}
|
|
9829
|
+
|
|
9659
9830
|
export declare namespace Workflows {
|
|
9660
9831
|
export {
|
|
9661
9832
|
type WorkflowCreateResponse as WorkflowCreateResponse,
|
|
@@ -9663,9 +9834,9 @@ export declare namespace Workflows {
|
|
|
9663
9834
|
type WorkflowUpdateResponse as WorkflowUpdateResponse,
|
|
9664
9835
|
type WorkflowListResponse as WorkflowListResponse,
|
|
9665
9836
|
type WorkflowDeleteResponse as WorkflowDeleteResponse,
|
|
9666
|
-
type WorkflowApproveUserResponse as WorkflowApproveUserResponse,
|
|
9667
9837
|
type WorkflowGetTagsResponse as WorkflowGetTagsResponse,
|
|
9668
9838
|
type WorkflowRunResponse as WorkflowRunResponse,
|
|
9839
|
+
type WorkflowUserApprovalResponse as WorkflowUserApprovalResponse,
|
|
9669
9840
|
type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor,
|
|
9670
9841
|
type WorkflowCreateParams as WorkflowCreateParams,
|
|
9671
9842
|
type WorkflowUpdateParams as WorkflowUpdateParams,
|
|
@@ -9673,5 +9844,6 @@ export declare namespace Workflows {
|
|
|
9673
9844
|
type WorkflowApproveUserParams as WorkflowApproveUserParams,
|
|
9674
9845
|
type WorkflowGetTagsParams as WorkflowGetTagsParams,
|
|
9675
9846
|
type WorkflowRunParams as WorkflowRunParams,
|
|
9847
|
+
type WorkflowUserApprovalParams as WorkflowUserApprovalParams,
|
|
9676
9848
|
};
|
|
9677
9849
|
}
|