@scenario-labs/sdk 0.1.2 → 0.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +31 -0
- package/LICENSE +4 -198
- package/README.md +29 -29
- package/client.d.mts +35 -18
- package/client.d.mts.map +1 -1
- package/client.d.ts +35 -18
- package/client.d.ts.map +1 -1
- package/client.js +88 -50
- package/client.js.map +1 -1
- package/client.mjs +86 -48
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +8 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +8 -3
- package/index.d.ts.map +1 -1
- package/index.js +16 -6
- package/index.js.map +1 -1
- package/index.mjs +7 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +4 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +4 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/lib/generate.d.mts +19 -0
- package/lib/generate.d.mts.map +1 -0
- package/lib/generate.d.ts +19 -0
- package/lib/generate.d.ts.map +1 -0
- package/lib/generate.js +35 -0
- package/lib/generate.js.map +1 -0
- package/lib/generate.mjs +31 -0
- package/lib/generate.mjs.map +1 -0
- package/lib/job.d.mts +48 -0
- package/lib/job.d.mts.map +1 -0
- package/lib/job.d.ts +48 -0
- package/lib/job.d.ts.map +1 -0
- package/lib/job.js +50 -0
- package/lib/job.js.map +1 -0
- package/lib/job.mjs +45 -0
- package/lib/job.mjs.map +1 -0
- package/lib/models.d.mts +20 -0
- package/lib/models.d.mts.map +1 -0
- package/lib/models.d.ts +20 -0
- package/lib/models.d.ts.map +1 -0
- package/lib/models.js +28 -0
- package/lib/models.js.map +1 -0
- package/lib/models.mjs +23 -0
- package/lib/models.mjs.map +1 -0
- package/lib/scenario.d.mts +39 -0
- package/lib/scenario.d.mts.map +1 -0
- package/lib/scenario.d.ts +39 -0
- package/lib/scenario.d.ts.map +1 -0
- package/lib/scenario.js +46 -0
- package/lib/scenario.js.map +1 -0
- package/lib/scenario.mjs +42 -0
- package/lib/scenario.mjs.map +1 -0
- package/lib/workflow.d.mts +48 -0
- package/lib/workflow.d.mts.map +1 -0
- package/lib/workflow.d.ts +48 -0
- package/lib/workflow.d.ts.map +1 -0
- package/lib/workflow.js +59 -0
- package/lib/workflow.js.map +1 -0
- package/lib/workflow.mjs +54 -0
- package/lib/workflow.mjs.map +1 -0
- package/package.json +14 -4
- package/resources/assets/assets.d.mts +401 -96
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +401 -96
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +2 -2
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +2 -2
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/assets/public.d.mts +30 -27
- package/resources/assets/public.d.mts.map +1 -1
- package/resources/assets/public.d.ts +30 -27
- package/resources/assets/public.d.ts.map +1 -1
- package/resources/assets/public.js +2 -2
- package/resources/assets/public.js.map +1 -1
- package/resources/assets/public.mjs +2 -2
- package/resources/assets/public.mjs.map +1 -1
- package/resources/collections/assets.d.mts +2 -8
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +2 -8
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +2 -2
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +2 -2
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +5 -5
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +5 -5
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +2 -2
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +2 -2
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs +2 -2
- package/resources/collections/index.mjs.map +1 -1
- package/resources/collections/models.d.mts +2 -8
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +2 -8
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +2 -2
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +2 -2
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +4188 -1370
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +4188 -1370
- package/resources/generate.d.ts.map +1 -1
- package/resources/index.d.mts +2 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +2 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +943 -33
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +943 -33
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +3 -2
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +3 -2
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +8 -8
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +8 -8
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +640 -34
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +640 -34
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +1323 -301
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +1323 -301
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +718 -90
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +718 -90
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +9 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +9 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +2 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +2 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/search.d.mts +6 -31
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +6 -31
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +6 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +6 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +1 -1
- package/resources/tags.d.ts +1 -1
- package/resources/usages.d.mts +401 -16
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +401 -16
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +2738 -101
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +2738 -101
- package/resources/workflows.d.ts.map +1 -1
- package/src/client.ts +102 -44
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +8 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/request-options.ts +2 -0
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/lib/generate.ts +77 -0
- package/src/lib/job.ts +78 -0
- package/src/lib/models.ts +27 -0
- package/src/lib/scenario.ts +39 -0
- package/src/lib/workflow.ts +90 -0
- package/src/resources/assets/assets.ts +742 -212
- package/src/resources/assets/index.ts +0 -1
- package/src/resources/assets/public.ts +151 -29
- package/src/resources/collections/assets.ts +2 -14
- package/src/resources/collections/collections.ts +3 -5
- package/src/resources/collections/index.ts +2 -14
- package/src/resources/collections/models.ts +2 -14
- package/src/resources/generate.ts +6254 -2217
- package/src/resources/index.ts +2 -3
- package/src/resources/jobs.ts +1355 -26
- package/src/resources/models/description.ts +50 -8
- package/src/resources/models/examples.ts +906 -56
- package/src/resources/models/models.ts +1867 -330
- package/src/resources/models/train.ts +976 -98
- package/src/resources/models/training-images.ts +2 -2
- package/src/resources/search.ts +13 -39
- package/src/resources/tags.ts +1 -1
- package/src/resources/usages.ts +544 -11
- package/src/resources/workflows.ts +4586 -914
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
|
@@ -41,20 +41,28 @@ export interface WorkflowCreateResponse {
|
|
|
41
41
|
}
|
|
42
42
|
export declare namespace WorkflowCreateResponse {
|
|
43
43
|
interface Workflow {
|
|
44
|
+
/**
|
|
45
|
+
* Unique identifier of the workflow.
|
|
46
|
+
*/
|
|
44
47
|
id: string;
|
|
48
|
+
/**
|
|
49
|
+
* User that created the workflow.
|
|
50
|
+
*/
|
|
45
51
|
authorId: string;
|
|
46
52
|
/**
|
|
47
53
|
* ISO string
|
|
48
54
|
*/
|
|
49
55
|
createdAt: string;
|
|
50
56
|
/**
|
|
51
|
-
*
|
|
57
|
+
* Full description of what the workflow does.
|
|
52
58
|
*/
|
|
53
59
|
description: string;
|
|
54
60
|
/**
|
|
55
61
|
* The UI data about the workflow. This is managed by scenario webapp.
|
|
56
62
|
*/
|
|
57
|
-
editorInfo:
|
|
63
|
+
editorInfo: {
|
|
64
|
+
[key: string]: unknown;
|
|
65
|
+
};
|
|
58
66
|
/**
|
|
59
67
|
* The flow of the workflow.
|
|
60
68
|
*/
|
|
@@ -63,9 +71,25 @@ export declare namespace WorkflowCreateResponse {
|
|
|
63
71
|
* The inputs of the workflow.
|
|
64
72
|
*/
|
|
65
73
|
inputs: Array<Workflow.Input>;
|
|
74
|
+
/**
|
|
75
|
+
* Human-readable name of the workflow.
|
|
76
|
+
*/
|
|
66
77
|
name: string;
|
|
78
|
+
/**
|
|
79
|
+
* Project that owns the workflow.
|
|
80
|
+
*/
|
|
67
81
|
ownerId: string;
|
|
82
|
+
/**
|
|
83
|
+
* Visibility setting for the workflow.
|
|
84
|
+
*/
|
|
68
85
|
privacy: 'private' | 'public' | 'unlisted';
|
|
86
|
+
/**
|
|
87
|
+
* Short summary of the workflow.
|
|
88
|
+
*/
|
|
89
|
+
shortDescription: string;
|
|
90
|
+
/**
|
|
91
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
92
|
+
*/
|
|
69
93
|
status: 'deleted' | 'draft' | 'ready';
|
|
70
94
|
/**
|
|
71
95
|
* The tag set of the workflow.
|
|
@@ -83,8 +107,38 @@ export declare namespace WorkflowCreateResponse {
|
|
|
83
107
|
* A representation of an asset before being processed by the workflow
|
|
84
108
|
*/
|
|
85
109
|
before?: Workflow.Before;
|
|
110
|
+
/**
|
|
111
|
+
* Embedding is a map of embedding version into embedding date
|
|
112
|
+
*/
|
|
113
|
+
embedding?: unknown;
|
|
114
|
+
/**
|
|
115
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
116
|
+
* except by the author or a project admin.
|
|
117
|
+
*/
|
|
118
|
+
isLocked?: boolean;
|
|
119
|
+
lastIndexedAt?: string;
|
|
120
|
+
/**
|
|
121
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
122
|
+
*/
|
|
123
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
124
|
+
/**
|
|
125
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
126
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
127
|
+
* in the Ready state.
|
|
128
|
+
*/
|
|
129
|
+
lastReadyFlowUpdatedAt?: string;
|
|
130
|
+
/**
|
|
131
|
+
* ISO string timestamp when lock state was last changed.
|
|
132
|
+
*/
|
|
133
|
+
lockedStateChangedAt?: string;
|
|
134
|
+
/**
|
|
135
|
+
* UserId of the user who last changed the lock state.
|
|
136
|
+
*/
|
|
137
|
+
lockedStateChangedBy?: string;
|
|
138
|
+
/**
|
|
139
|
+
* Asset kinds produced by this workflow (if specified).
|
|
140
|
+
*/
|
|
86
141
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
87
|
-
shortDescription?: string;
|
|
88
142
|
/**
|
|
89
143
|
* Currently the thumbnail is identical to the after asset.
|
|
90
144
|
*/
|
|
@@ -103,16 +157,41 @@ export declare namespace WorkflowCreateResponse {
|
|
|
103
157
|
/**
|
|
104
158
|
* The type of the job for the node.
|
|
105
159
|
*/
|
|
106
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
160
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
161
|
+
/**
|
|
162
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
163
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
164
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
165
|
+
*/
|
|
166
|
+
count?: number;
|
|
107
167
|
/**
|
|
108
168
|
* The nodes that this node depends on. Only available for nodes that have
|
|
109
169
|
* dependencies. Mainly used for user approval nodes.
|
|
110
170
|
*/
|
|
111
171
|
dependsOn?: Array<string>;
|
|
172
|
+
/**
|
|
173
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
174
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
175
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
176
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
177
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
178
|
+
*/
|
|
179
|
+
includeOutputsInWorkflowJob?: true;
|
|
112
180
|
/**
|
|
113
181
|
* The inputs of the node.
|
|
114
182
|
*/
|
|
115
183
|
inputs?: Array<Flow.Input>;
|
|
184
|
+
/**
|
|
185
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
186
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
187
|
+
* numbers, or asset IDs.
|
|
188
|
+
*/
|
|
189
|
+
items?: Array<string>;
|
|
190
|
+
/**
|
|
191
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
192
|
+
* dynamically-created copies of loop body nodes.
|
|
193
|
+
*/
|
|
194
|
+
iterationIndex?: number;
|
|
116
195
|
/**
|
|
117
196
|
* The logic of the node. Only available for logic nodes.
|
|
118
197
|
*/
|
|
@@ -121,6 +200,17 @@ export declare namespace WorkflowCreateResponse {
|
|
|
121
200
|
* The type of the logic for the node. Only available for logic nodes.
|
|
122
201
|
*/
|
|
123
202
|
logicType?: 'if-else';
|
|
203
|
+
/**
|
|
204
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
205
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
206
|
+
* for ForEach nodes.
|
|
207
|
+
*/
|
|
208
|
+
loopBodyNodeIds?: Array<string>;
|
|
209
|
+
/**
|
|
210
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
211
|
+
* dynamically-created copies of loop body nodes.
|
|
212
|
+
*/
|
|
213
|
+
loopNodeId?: string;
|
|
124
214
|
/**
|
|
125
215
|
* The model id for the node. Mainly used for custom model tasks.
|
|
126
216
|
*/
|
|
@@ -162,6 +252,10 @@ export declare namespace WorkflowCreateResponse {
|
|
|
162
252
|
* Whether this input affects the model's cost calculation
|
|
163
253
|
*/
|
|
164
254
|
costImpact?: boolean;
|
|
255
|
+
/**
|
|
256
|
+
* The default value for the input
|
|
257
|
+
*/
|
|
258
|
+
default?: unknown;
|
|
165
259
|
/**
|
|
166
260
|
* Help text displayed in the UI to provide additional information about the input
|
|
167
261
|
*/
|
|
@@ -180,10 +274,20 @@ export declare namespace WorkflowCreateResponse {
|
|
|
180
274
|
* the same as the current object. This is only available for type inputs_array
|
|
181
275
|
* inputs.
|
|
182
276
|
*/
|
|
183
|
-
inputs?: Array<
|
|
277
|
+
inputs?: Array<{
|
|
278
|
+
[key: string]: unknown;
|
|
279
|
+
}>;
|
|
280
|
+
/**
|
|
281
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
282
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
283
|
+
* type.
|
|
284
|
+
*/
|
|
285
|
+
items?: Array<Array<Input.Item>>;
|
|
184
286
|
/**
|
|
185
287
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
186
|
-
* \`file_array\` input types.
|
|
288
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
289
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
290
|
+
* data:kind, prefix
|
|
187
291
|
*/
|
|
188
292
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
189
293
|
/**
|
|
@@ -204,6 +308,12 @@ export declare namespace WorkflowCreateResponse {
|
|
|
204
308
|
* \`string_array\`.
|
|
205
309
|
*/
|
|
206
310
|
maxLength?: number;
|
|
311
|
+
/**
|
|
312
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
313
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
314
|
+
* creation time.
|
|
315
|
+
*/
|
|
316
|
+
maxSize?: number;
|
|
207
317
|
/**
|
|
208
318
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
209
319
|
*/
|
|
@@ -217,7 +327,7 @@ export declare namespace WorkflowCreateResponse {
|
|
|
217
327
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
218
328
|
* available for \`model_array\` input type.
|
|
219
329
|
*/
|
|
220
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
330
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
221
331
|
/**
|
|
222
332
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
223
333
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -261,8 +371,232 @@ export declare namespace WorkflowCreateResponse {
|
|
|
261
371
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
262
372
|
*/
|
|
263
373
|
step?: number;
|
|
374
|
+
/**
|
|
375
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
376
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
377
|
+
*/
|
|
378
|
+
value?: unknown;
|
|
264
379
|
}
|
|
265
380
|
namespace Input {
|
|
381
|
+
/**
|
|
382
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
383
|
+
* recursive items field.
|
|
384
|
+
*/
|
|
385
|
+
interface Item {
|
|
386
|
+
/**
|
|
387
|
+
* The name that must be user to call the model through the API
|
|
388
|
+
*/
|
|
389
|
+
name: string;
|
|
390
|
+
/**
|
|
391
|
+
* The data type of the input
|
|
392
|
+
*/
|
|
393
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
394
|
+
/**
|
|
395
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
396
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
397
|
+
* dropdown.
|
|
398
|
+
*/
|
|
399
|
+
allowedValues?: Array<unknown>;
|
|
400
|
+
/**
|
|
401
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
402
|
+
* \`file_array\` input types with kind \`image\`.
|
|
403
|
+
*/
|
|
404
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
405
|
+
/**
|
|
406
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
407
|
+
*/
|
|
408
|
+
color?: boolean;
|
|
409
|
+
/**
|
|
410
|
+
* Whether this input affects the model's cost calculation
|
|
411
|
+
*/
|
|
412
|
+
costImpact?: boolean;
|
|
413
|
+
/**
|
|
414
|
+
* The default value for the input
|
|
415
|
+
*/
|
|
416
|
+
default?: unknown;
|
|
417
|
+
/**
|
|
418
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
419
|
+
*/
|
|
420
|
+
description?: string;
|
|
421
|
+
/**
|
|
422
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
423
|
+
* value appear consecutively in the UI.
|
|
424
|
+
*/
|
|
425
|
+
group?: string;
|
|
426
|
+
/**
|
|
427
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
428
|
+
*/
|
|
429
|
+
hint?: string;
|
|
430
|
+
/**
|
|
431
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
432
|
+
* the same as the current object. This is only available for type inputs_array
|
|
433
|
+
* inputs.
|
|
434
|
+
*/
|
|
435
|
+
inputs?: Array<{
|
|
436
|
+
[key: string]: unknown;
|
|
437
|
+
}>;
|
|
438
|
+
/**
|
|
439
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
440
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
441
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
442
|
+
* data:kind, prefix
|
|
443
|
+
*/
|
|
444
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
445
|
+
/**
|
|
446
|
+
* The label displayed in the UI for this input
|
|
447
|
+
*/
|
|
448
|
+
label?: string;
|
|
449
|
+
/**
|
|
450
|
+
* The name of the file input field to use as the mask source
|
|
451
|
+
*/
|
|
452
|
+
maskFrom?: string;
|
|
453
|
+
/**
|
|
454
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
455
|
+
* types.
|
|
456
|
+
*/
|
|
457
|
+
max?: number;
|
|
458
|
+
/**
|
|
459
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
460
|
+
* \`string_array\`.
|
|
461
|
+
*/
|
|
462
|
+
maxLength?: number;
|
|
463
|
+
/**
|
|
464
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
465
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
466
|
+
* creation time.
|
|
467
|
+
*/
|
|
468
|
+
maxSize?: number;
|
|
469
|
+
/**
|
|
470
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
471
|
+
*/
|
|
472
|
+
min?: number;
|
|
473
|
+
/**
|
|
474
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
475
|
+
* \`string_array\`.
|
|
476
|
+
*/
|
|
477
|
+
minLength?: number;
|
|
478
|
+
/**
|
|
479
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
480
|
+
* available for \`model_array\` input type.
|
|
481
|
+
*/
|
|
482
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
483
|
+
/**
|
|
484
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
485
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
486
|
+
*
|
|
487
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
488
|
+
*/
|
|
489
|
+
parent?: boolean;
|
|
490
|
+
/**
|
|
491
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
492
|
+
*/
|
|
493
|
+
placeholder?: string;
|
|
494
|
+
/**
|
|
495
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
496
|
+
* spark feature. Only available for \`string\` input type.
|
|
497
|
+
*/
|
|
498
|
+
prompt?: boolean;
|
|
499
|
+
/**
|
|
500
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
501
|
+
* type.
|
|
502
|
+
*/
|
|
503
|
+
promptSpark?: boolean;
|
|
504
|
+
/**
|
|
505
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
506
|
+
* least one of node or conditional.
|
|
507
|
+
*/
|
|
508
|
+
ref?: Item.Ref;
|
|
509
|
+
/**
|
|
510
|
+
* Set of rules that describes when this input is required:
|
|
511
|
+
*
|
|
512
|
+
* - \`always\`: Input is always required
|
|
513
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
514
|
+
* defined
|
|
515
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
516
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
517
|
+
* value
|
|
518
|
+
*
|
|
519
|
+
* By default, the input is not required.
|
|
520
|
+
*/
|
|
521
|
+
required?: Item.Required;
|
|
522
|
+
/**
|
|
523
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
524
|
+
*/
|
|
525
|
+
step?: number;
|
|
526
|
+
/**
|
|
527
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
528
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
529
|
+
*/
|
|
530
|
+
value?: unknown;
|
|
531
|
+
}
|
|
532
|
+
namespace Item {
|
|
533
|
+
/**
|
|
534
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
535
|
+
* least one of node or conditional.
|
|
536
|
+
*/
|
|
537
|
+
interface Ref {
|
|
538
|
+
/**
|
|
539
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
540
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
541
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
542
|
+
*/
|
|
543
|
+
conditional?: Array<string>;
|
|
544
|
+
/**
|
|
545
|
+
* This is the desired node output value if ref is an if/else node.
|
|
546
|
+
*/
|
|
547
|
+
equal?: string;
|
|
548
|
+
/**
|
|
549
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
550
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
551
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
552
|
+
* all outputs of a node, you can use the name 'all'.
|
|
553
|
+
*/
|
|
554
|
+
name?: string;
|
|
555
|
+
/**
|
|
556
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
557
|
+
*/
|
|
558
|
+
node?: string;
|
|
559
|
+
}
|
|
560
|
+
/**
|
|
561
|
+
* Set of rules that describes when this input is required:
|
|
562
|
+
*
|
|
563
|
+
* - \`always\`: Input is always required
|
|
564
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
565
|
+
* defined
|
|
566
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
567
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
568
|
+
* value
|
|
569
|
+
*
|
|
570
|
+
* By default, the input is not required.
|
|
571
|
+
*/
|
|
572
|
+
interface Required {
|
|
573
|
+
/**
|
|
574
|
+
* Whether the input is always required
|
|
575
|
+
*/
|
|
576
|
+
always?: boolean;
|
|
577
|
+
/**
|
|
578
|
+
* Makes this input required when another input has a specific value:
|
|
579
|
+
*
|
|
580
|
+
* - Key: name of the input to check
|
|
581
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
582
|
+
*/
|
|
583
|
+
conditionalValues?: unknown;
|
|
584
|
+
/**
|
|
585
|
+
* Makes this input required when another input is defined:
|
|
586
|
+
*
|
|
587
|
+
* - Key: name of the input that must be defined
|
|
588
|
+
* - Value: message to display when this input is required
|
|
589
|
+
*/
|
|
590
|
+
ifDefined?: unknown;
|
|
591
|
+
/**
|
|
592
|
+
* Makes this input required when another input is not defined:
|
|
593
|
+
*
|
|
594
|
+
* - Key: name of the input that must be undefined
|
|
595
|
+
* - Value: message to display when this input is required
|
|
596
|
+
*/
|
|
597
|
+
ifNotDefined?: unknown;
|
|
598
|
+
}
|
|
599
|
+
}
|
|
266
600
|
/**
|
|
267
601
|
* The reference to another input or output of the same workflow. Must have at
|
|
268
602
|
* least one of node or conditional.
|
|
@@ -389,6 +723,10 @@ export declare namespace WorkflowCreateResponse {
|
|
|
389
723
|
* Whether this input affects the model's cost calculation
|
|
390
724
|
*/
|
|
391
725
|
costImpact?: boolean;
|
|
726
|
+
/**
|
|
727
|
+
* The default value for the input
|
|
728
|
+
*/
|
|
729
|
+
default?: unknown;
|
|
392
730
|
/**
|
|
393
731
|
* Help text displayed in the UI to provide additional information about the input
|
|
394
732
|
*/
|
|
@@ -407,10 +745,14 @@ export declare namespace WorkflowCreateResponse {
|
|
|
407
745
|
* the same as the current object. This is only available for type inputs_array
|
|
408
746
|
* inputs.
|
|
409
747
|
*/
|
|
410
|
-
inputs?: Array<
|
|
748
|
+
inputs?: Array<{
|
|
749
|
+
[key: string]: unknown;
|
|
750
|
+
}>;
|
|
411
751
|
/**
|
|
412
752
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
413
|
-
* \`file_array\` input types.
|
|
753
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
754
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
755
|
+
* data:kind, prefix
|
|
414
756
|
*/
|
|
415
757
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
416
758
|
/**
|
|
@@ -431,6 +773,12 @@ export declare namespace WorkflowCreateResponse {
|
|
|
431
773
|
* \`string_array\`.
|
|
432
774
|
*/
|
|
433
775
|
maxLength?: number;
|
|
776
|
+
/**
|
|
777
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
778
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
779
|
+
* creation time.
|
|
780
|
+
*/
|
|
781
|
+
maxSize?: number;
|
|
434
782
|
/**
|
|
435
783
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
436
784
|
*/
|
|
@@ -444,7 +792,7 @@ export declare namespace WorkflowCreateResponse {
|
|
|
444
792
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
445
793
|
* available for \`model_array\` input type.
|
|
446
794
|
*/
|
|
447
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
795
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
448
796
|
/**
|
|
449
797
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
450
798
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -678,20 +1026,28 @@ export interface WorkflowRetrieveResponse {
|
|
|
678
1026
|
}
|
|
679
1027
|
export declare namespace WorkflowRetrieveResponse {
|
|
680
1028
|
interface Workflow {
|
|
1029
|
+
/**
|
|
1030
|
+
* Unique identifier of the workflow.
|
|
1031
|
+
*/
|
|
681
1032
|
id: string;
|
|
1033
|
+
/**
|
|
1034
|
+
* User that created the workflow.
|
|
1035
|
+
*/
|
|
682
1036
|
authorId: string;
|
|
683
1037
|
/**
|
|
684
1038
|
* ISO string
|
|
685
1039
|
*/
|
|
686
1040
|
createdAt: string;
|
|
687
1041
|
/**
|
|
688
|
-
*
|
|
1042
|
+
* Full description of what the workflow does.
|
|
689
1043
|
*/
|
|
690
1044
|
description: string;
|
|
691
1045
|
/**
|
|
692
1046
|
* The UI data about the workflow. This is managed by scenario webapp.
|
|
693
1047
|
*/
|
|
694
|
-
editorInfo:
|
|
1048
|
+
editorInfo: {
|
|
1049
|
+
[key: string]: unknown;
|
|
1050
|
+
};
|
|
695
1051
|
/**
|
|
696
1052
|
* The flow of the workflow.
|
|
697
1053
|
*/
|
|
@@ -700,9 +1056,25 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
700
1056
|
* The inputs of the workflow.
|
|
701
1057
|
*/
|
|
702
1058
|
inputs: Array<Workflow.Input>;
|
|
703
|
-
|
|
1059
|
+
/**
|
|
1060
|
+
* Human-readable name of the workflow.
|
|
1061
|
+
*/
|
|
1062
|
+
name: string;
|
|
1063
|
+
/**
|
|
1064
|
+
* Project that owns the workflow.
|
|
1065
|
+
*/
|
|
704
1066
|
ownerId: string;
|
|
1067
|
+
/**
|
|
1068
|
+
* Visibility setting for the workflow.
|
|
1069
|
+
*/
|
|
705
1070
|
privacy: 'private' | 'public' | 'unlisted';
|
|
1071
|
+
/**
|
|
1072
|
+
* Short summary of the workflow.
|
|
1073
|
+
*/
|
|
1074
|
+
shortDescription: string;
|
|
1075
|
+
/**
|
|
1076
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
1077
|
+
*/
|
|
706
1078
|
status: 'deleted' | 'draft' | 'ready';
|
|
707
1079
|
/**
|
|
708
1080
|
* The tag set of the workflow.
|
|
@@ -720,8 +1092,38 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
720
1092
|
* A representation of an asset before being processed by the workflow
|
|
721
1093
|
*/
|
|
722
1094
|
before?: Workflow.Before;
|
|
1095
|
+
/**
|
|
1096
|
+
* Embedding is a map of embedding version into embedding date
|
|
1097
|
+
*/
|
|
1098
|
+
embedding?: unknown;
|
|
1099
|
+
/**
|
|
1100
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
1101
|
+
* except by the author or a project admin.
|
|
1102
|
+
*/
|
|
1103
|
+
isLocked?: boolean;
|
|
1104
|
+
lastIndexedAt?: string;
|
|
1105
|
+
/**
|
|
1106
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
1107
|
+
*/
|
|
1108
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
1109
|
+
/**
|
|
1110
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
1111
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
1112
|
+
* in the Ready state.
|
|
1113
|
+
*/
|
|
1114
|
+
lastReadyFlowUpdatedAt?: string;
|
|
1115
|
+
/**
|
|
1116
|
+
* ISO string timestamp when lock state was last changed.
|
|
1117
|
+
*/
|
|
1118
|
+
lockedStateChangedAt?: string;
|
|
1119
|
+
/**
|
|
1120
|
+
* UserId of the user who last changed the lock state.
|
|
1121
|
+
*/
|
|
1122
|
+
lockedStateChangedBy?: string;
|
|
1123
|
+
/**
|
|
1124
|
+
* Asset kinds produced by this workflow (if specified).
|
|
1125
|
+
*/
|
|
723
1126
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
724
|
-
shortDescription?: string;
|
|
725
1127
|
/**
|
|
726
1128
|
* Currently the thumbnail is identical to the after asset.
|
|
727
1129
|
*/
|
|
@@ -740,16 +1142,41 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
740
1142
|
/**
|
|
741
1143
|
* The type of the job for the node.
|
|
742
1144
|
*/
|
|
743
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
1145
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
1146
|
+
/**
|
|
1147
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
1148
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
1149
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
1150
|
+
*/
|
|
1151
|
+
count?: number;
|
|
744
1152
|
/**
|
|
745
1153
|
* The nodes that this node depends on. Only available for nodes that have
|
|
746
1154
|
* dependencies. Mainly used for user approval nodes.
|
|
747
1155
|
*/
|
|
748
1156
|
dependsOn?: Array<string>;
|
|
1157
|
+
/**
|
|
1158
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
1159
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
1160
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
1161
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
1162
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
1163
|
+
*/
|
|
1164
|
+
includeOutputsInWorkflowJob?: true;
|
|
749
1165
|
/**
|
|
750
1166
|
* The inputs of the node.
|
|
751
1167
|
*/
|
|
752
1168
|
inputs?: Array<Flow.Input>;
|
|
1169
|
+
/**
|
|
1170
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
1171
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
1172
|
+
* numbers, or asset IDs.
|
|
1173
|
+
*/
|
|
1174
|
+
items?: Array<string>;
|
|
1175
|
+
/**
|
|
1176
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
1177
|
+
* dynamically-created copies of loop body nodes.
|
|
1178
|
+
*/
|
|
1179
|
+
iterationIndex?: number;
|
|
753
1180
|
/**
|
|
754
1181
|
* The logic of the node. Only available for logic nodes.
|
|
755
1182
|
*/
|
|
@@ -758,6 +1185,17 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
758
1185
|
* The type of the logic for the node. Only available for logic nodes.
|
|
759
1186
|
*/
|
|
760
1187
|
logicType?: 'if-else';
|
|
1188
|
+
/**
|
|
1189
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
1190
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
1191
|
+
* for ForEach nodes.
|
|
1192
|
+
*/
|
|
1193
|
+
loopBodyNodeIds?: Array<string>;
|
|
1194
|
+
/**
|
|
1195
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
1196
|
+
* dynamically-created copies of loop body nodes.
|
|
1197
|
+
*/
|
|
1198
|
+
loopNodeId?: string;
|
|
761
1199
|
/**
|
|
762
1200
|
* The model id for the node. Mainly used for custom model tasks.
|
|
763
1201
|
*/
|
|
@@ -799,6 +1237,10 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
799
1237
|
* Whether this input affects the model's cost calculation
|
|
800
1238
|
*/
|
|
801
1239
|
costImpact?: boolean;
|
|
1240
|
+
/**
|
|
1241
|
+
* The default value for the input
|
|
1242
|
+
*/
|
|
1243
|
+
default?: unknown;
|
|
802
1244
|
/**
|
|
803
1245
|
* Help text displayed in the UI to provide additional information about the input
|
|
804
1246
|
*/
|
|
@@ -817,10 +1259,20 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
817
1259
|
* the same as the current object. This is only available for type inputs_array
|
|
818
1260
|
* inputs.
|
|
819
1261
|
*/
|
|
820
|
-
inputs?: Array<
|
|
1262
|
+
inputs?: Array<{
|
|
1263
|
+
[key: string]: unknown;
|
|
1264
|
+
}>;
|
|
1265
|
+
/**
|
|
1266
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
1267
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
1268
|
+
* type.
|
|
1269
|
+
*/
|
|
1270
|
+
items?: Array<Array<Input.Item>>;
|
|
821
1271
|
/**
|
|
822
1272
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
823
|
-
* \`file_array\` input types.
|
|
1273
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1274
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1275
|
+
* data:kind, prefix
|
|
824
1276
|
*/
|
|
825
1277
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
826
1278
|
/**
|
|
@@ -841,6 +1293,12 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
841
1293
|
* \`string_array\`.
|
|
842
1294
|
*/
|
|
843
1295
|
maxLength?: number;
|
|
1296
|
+
/**
|
|
1297
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1298
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1299
|
+
* creation time.
|
|
1300
|
+
*/
|
|
1301
|
+
maxSize?: number;
|
|
844
1302
|
/**
|
|
845
1303
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
846
1304
|
*/
|
|
@@ -854,7 +1312,7 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
854
1312
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
855
1313
|
* available for \`model_array\` input type.
|
|
856
1314
|
*/
|
|
857
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
1315
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
858
1316
|
/**
|
|
859
1317
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
860
1318
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -898,8 +1356,232 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
898
1356
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
899
1357
|
*/
|
|
900
1358
|
step?: number;
|
|
1359
|
+
/**
|
|
1360
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1361
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1362
|
+
*/
|
|
1363
|
+
value?: unknown;
|
|
901
1364
|
}
|
|
902
1365
|
namespace Input {
|
|
1366
|
+
/**
|
|
1367
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
1368
|
+
* recursive items field.
|
|
1369
|
+
*/
|
|
1370
|
+
interface Item {
|
|
1371
|
+
/**
|
|
1372
|
+
* The name that must be user to call the model through the API
|
|
1373
|
+
*/
|
|
1374
|
+
name: string;
|
|
1375
|
+
/**
|
|
1376
|
+
* The data type of the input
|
|
1377
|
+
*/
|
|
1378
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
1379
|
+
/**
|
|
1380
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
1381
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
1382
|
+
* dropdown.
|
|
1383
|
+
*/
|
|
1384
|
+
allowedValues?: Array<unknown>;
|
|
1385
|
+
/**
|
|
1386
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
1387
|
+
* \`file_array\` input types with kind \`image\`.
|
|
1388
|
+
*/
|
|
1389
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
1390
|
+
/**
|
|
1391
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
1392
|
+
*/
|
|
1393
|
+
color?: boolean;
|
|
1394
|
+
/**
|
|
1395
|
+
* Whether this input affects the model's cost calculation
|
|
1396
|
+
*/
|
|
1397
|
+
costImpact?: boolean;
|
|
1398
|
+
/**
|
|
1399
|
+
* The default value for the input
|
|
1400
|
+
*/
|
|
1401
|
+
default?: unknown;
|
|
1402
|
+
/**
|
|
1403
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
1404
|
+
*/
|
|
1405
|
+
description?: string;
|
|
1406
|
+
/**
|
|
1407
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
1408
|
+
* value appear consecutively in the UI.
|
|
1409
|
+
*/
|
|
1410
|
+
group?: string;
|
|
1411
|
+
/**
|
|
1412
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
1413
|
+
*/
|
|
1414
|
+
hint?: string;
|
|
1415
|
+
/**
|
|
1416
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
1417
|
+
* the same as the current object. This is only available for type inputs_array
|
|
1418
|
+
* inputs.
|
|
1419
|
+
*/
|
|
1420
|
+
inputs?: Array<{
|
|
1421
|
+
[key: string]: unknown;
|
|
1422
|
+
}>;
|
|
1423
|
+
/**
|
|
1424
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1425
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1426
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1427
|
+
* data:kind, prefix
|
|
1428
|
+
*/
|
|
1429
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1430
|
+
/**
|
|
1431
|
+
* The label displayed in the UI for this input
|
|
1432
|
+
*/
|
|
1433
|
+
label?: string;
|
|
1434
|
+
/**
|
|
1435
|
+
* The name of the file input field to use as the mask source
|
|
1436
|
+
*/
|
|
1437
|
+
maskFrom?: string;
|
|
1438
|
+
/**
|
|
1439
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
1440
|
+
* types.
|
|
1441
|
+
*/
|
|
1442
|
+
max?: number;
|
|
1443
|
+
/**
|
|
1444
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1445
|
+
* \`string_array\`.
|
|
1446
|
+
*/
|
|
1447
|
+
maxLength?: number;
|
|
1448
|
+
/**
|
|
1449
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1450
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1451
|
+
* creation time.
|
|
1452
|
+
*/
|
|
1453
|
+
maxSize?: number;
|
|
1454
|
+
/**
|
|
1455
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1456
|
+
*/
|
|
1457
|
+
min?: number;
|
|
1458
|
+
/**
|
|
1459
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
1460
|
+
* \`string_array\`.
|
|
1461
|
+
*/
|
|
1462
|
+
minLength?: number;
|
|
1463
|
+
/**
|
|
1464
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1465
|
+
* available for \`model_array\` input type.
|
|
1466
|
+
*/
|
|
1467
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
1468
|
+
/**
|
|
1469
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1470
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
1471
|
+
*
|
|
1472
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1473
|
+
*/
|
|
1474
|
+
parent?: boolean;
|
|
1475
|
+
/**
|
|
1476
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
1477
|
+
*/
|
|
1478
|
+
placeholder?: string;
|
|
1479
|
+
/**
|
|
1480
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1481
|
+
* spark feature. Only available for \`string\` input type.
|
|
1482
|
+
*/
|
|
1483
|
+
prompt?: boolean;
|
|
1484
|
+
/**
|
|
1485
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1486
|
+
* type.
|
|
1487
|
+
*/
|
|
1488
|
+
promptSpark?: boolean;
|
|
1489
|
+
/**
|
|
1490
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1491
|
+
* least one of node or conditional.
|
|
1492
|
+
*/
|
|
1493
|
+
ref?: Item.Ref;
|
|
1494
|
+
/**
|
|
1495
|
+
* Set of rules that describes when this input is required:
|
|
1496
|
+
*
|
|
1497
|
+
* - \`always\`: Input is always required
|
|
1498
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1499
|
+
* defined
|
|
1500
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1501
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1502
|
+
* value
|
|
1503
|
+
*
|
|
1504
|
+
* By default, the input is not required.
|
|
1505
|
+
*/
|
|
1506
|
+
required?: Item.Required;
|
|
1507
|
+
/**
|
|
1508
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1509
|
+
*/
|
|
1510
|
+
step?: number;
|
|
1511
|
+
/**
|
|
1512
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1513
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1514
|
+
*/
|
|
1515
|
+
value?: unknown;
|
|
1516
|
+
}
|
|
1517
|
+
namespace Item {
|
|
1518
|
+
/**
|
|
1519
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1520
|
+
* least one of node or conditional.
|
|
1521
|
+
*/
|
|
1522
|
+
interface Ref {
|
|
1523
|
+
/**
|
|
1524
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1525
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1526
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1527
|
+
*/
|
|
1528
|
+
conditional?: Array<string>;
|
|
1529
|
+
/**
|
|
1530
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1531
|
+
*/
|
|
1532
|
+
equal?: string;
|
|
1533
|
+
/**
|
|
1534
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1535
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1536
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1537
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1538
|
+
*/
|
|
1539
|
+
name?: string;
|
|
1540
|
+
/**
|
|
1541
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1542
|
+
*/
|
|
1543
|
+
node?: string;
|
|
1544
|
+
}
|
|
1545
|
+
/**
|
|
1546
|
+
* Set of rules that describes when this input is required:
|
|
1547
|
+
*
|
|
1548
|
+
* - \`always\`: Input is always required
|
|
1549
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1550
|
+
* defined
|
|
1551
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1552
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1553
|
+
* value
|
|
1554
|
+
*
|
|
1555
|
+
* By default, the input is not required.
|
|
1556
|
+
*/
|
|
1557
|
+
interface Required {
|
|
1558
|
+
/**
|
|
1559
|
+
* Whether the input is always required
|
|
1560
|
+
*/
|
|
1561
|
+
always?: boolean;
|
|
1562
|
+
/**
|
|
1563
|
+
* Makes this input required when another input has a specific value:
|
|
1564
|
+
*
|
|
1565
|
+
* - Key: name of the input to check
|
|
1566
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1567
|
+
*/
|
|
1568
|
+
conditionalValues?: unknown;
|
|
1569
|
+
/**
|
|
1570
|
+
* Makes this input required when another input is defined:
|
|
1571
|
+
*
|
|
1572
|
+
* - Key: name of the input that must be defined
|
|
1573
|
+
* - Value: message to display when this input is required
|
|
1574
|
+
*/
|
|
1575
|
+
ifDefined?: unknown;
|
|
1576
|
+
/**
|
|
1577
|
+
* Makes this input required when another input is not defined:
|
|
1578
|
+
*
|
|
1579
|
+
* - Key: name of the input that must be undefined
|
|
1580
|
+
* - Value: message to display when this input is required
|
|
1581
|
+
*/
|
|
1582
|
+
ifNotDefined?: unknown;
|
|
1583
|
+
}
|
|
1584
|
+
}
|
|
903
1585
|
/**
|
|
904
1586
|
* The reference to another input or output of the same workflow. Must have at
|
|
905
1587
|
* least one of node or conditional.
|
|
@@ -1026,6 +1708,10 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
1026
1708
|
* Whether this input affects the model's cost calculation
|
|
1027
1709
|
*/
|
|
1028
1710
|
costImpact?: boolean;
|
|
1711
|
+
/**
|
|
1712
|
+
* The default value for the input
|
|
1713
|
+
*/
|
|
1714
|
+
default?: unknown;
|
|
1029
1715
|
/**
|
|
1030
1716
|
* Help text displayed in the UI to provide additional information about the input
|
|
1031
1717
|
*/
|
|
@@ -1044,10 +1730,14 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
1044
1730
|
* the same as the current object. This is only available for type inputs_array
|
|
1045
1731
|
* inputs.
|
|
1046
1732
|
*/
|
|
1047
|
-
inputs?: Array<
|
|
1733
|
+
inputs?: Array<{
|
|
1734
|
+
[key: string]: unknown;
|
|
1735
|
+
}>;
|
|
1048
1736
|
/**
|
|
1049
1737
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1050
|
-
* \`file_array\` input types.
|
|
1738
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1739
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1740
|
+
* data:kind, prefix
|
|
1051
1741
|
*/
|
|
1052
1742
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1053
1743
|
/**
|
|
@@ -1068,6 +1758,12 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
1068
1758
|
* \`string_array\`.
|
|
1069
1759
|
*/
|
|
1070
1760
|
maxLength?: number;
|
|
1761
|
+
/**
|
|
1762
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1763
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1764
|
+
* creation time.
|
|
1765
|
+
*/
|
|
1766
|
+
maxSize?: number;
|
|
1071
1767
|
/**
|
|
1072
1768
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1073
1769
|
*/
|
|
@@ -1081,7 +1777,7 @@ export declare namespace WorkflowRetrieveResponse {
|
|
|
1081
1777
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1082
1778
|
* available for \`model_array\` input type.
|
|
1083
1779
|
*/
|
|
1084
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
1780
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
1085
1781
|
/**
|
|
1086
1782
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1087
1783
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -1315,20 +2011,28 @@ export interface WorkflowUpdateResponse {
|
|
|
1315
2011
|
}
|
|
1316
2012
|
export declare namespace WorkflowUpdateResponse {
|
|
1317
2013
|
interface Workflow {
|
|
2014
|
+
/**
|
|
2015
|
+
* Unique identifier of the workflow.
|
|
2016
|
+
*/
|
|
1318
2017
|
id: string;
|
|
2018
|
+
/**
|
|
2019
|
+
* User that created the workflow.
|
|
2020
|
+
*/
|
|
1319
2021
|
authorId: string;
|
|
1320
2022
|
/**
|
|
1321
2023
|
* ISO string
|
|
1322
2024
|
*/
|
|
1323
2025
|
createdAt: string;
|
|
1324
2026
|
/**
|
|
1325
|
-
*
|
|
2027
|
+
* Full description of what the workflow does.
|
|
1326
2028
|
*/
|
|
1327
2029
|
description: string;
|
|
1328
2030
|
/**
|
|
1329
2031
|
* The UI data about the workflow. This is managed by scenario webapp.
|
|
1330
2032
|
*/
|
|
1331
|
-
editorInfo:
|
|
2033
|
+
editorInfo: {
|
|
2034
|
+
[key: string]: unknown;
|
|
2035
|
+
};
|
|
1332
2036
|
/**
|
|
1333
2037
|
* The flow of the workflow.
|
|
1334
2038
|
*/
|
|
@@ -1337,9 +2041,25 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1337
2041
|
* The inputs of the workflow.
|
|
1338
2042
|
*/
|
|
1339
2043
|
inputs: Array<Workflow.Input>;
|
|
2044
|
+
/**
|
|
2045
|
+
* Human-readable name of the workflow.
|
|
2046
|
+
*/
|
|
1340
2047
|
name: string;
|
|
2048
|
+
/**
|
|
2049
|
+
* Project that owns the workflow.
|
|
2050
|
+
*/
|
|
1341
2051
|
ownerId: string;
|
|
2052
|
+
/**
|
|
2053
|
+
* Visibility setting for the workflow.
|
|
2054
|
+
*/
|
|
1342
2055
|
privacy: 'private' | 'public' | 'unlisted';
|
|
2056
|
+
/**
|
|
2057
|
+
* Short summary of the workflow.
|
|
2058
|
+
*/
|
|
2059
|
+
shortDescription: string;
|
|
2060
|
+
/**
|
|
2061
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
2062
|
+
*/
|
|
1343
2063
|
status: 'deleted' | 'draft' | 'ready';
|
|
1344
2064
|
/**
|
|
1345
2065
|
* The tag set of the workflow.
|
|
@@ -1357,8 +2077,38 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1357
2077
|
* A representation of an asset before being processed by the workflow
|
|
1358
2078
|
*/
|
|
1359
2079
|
before?: Workflow.Before;
|
|
2080
|
+
/**
|
|
2081
|
+
* Embedding is a map of embedding version into embedding date
|
|
2082
|
+
*/
|
|
2083
|
+
embedding?: unknown;
|
|
2084
|
+
/**
|
|
2085
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
2086
|
+
* except by the author or a project admin.
|
|
2087
|
+
*/
|
|
2088
|
+
isLocked?: boolean;
|
|
2089
|
+
lastIndexedAt?: string;
|
|
2090
|
+
/**
|
|
2091
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
2092
|
+
*/
|
|
2093
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
2094
|
+
/**
|
|
2095
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
2096
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
2097
|
+
* in the Ready state.
|
|
2098
|
+
*/
|
|
2099
|
+
lastReadyFlowUpdatedAt?: string;
|
|
2100
|
+
/**
|
|
2101
|
+
* ISO string timestamp when lock state was last changed.
|
|
2102
|
+
*/
|
|
2103
|
+
lockedStateChangedAt?: string;
|
|
2104
|
+
/**
|
|
2105
|
+
* UserId of the user who last changed the lock state.
|
|
2106
|
+
*/
|
|
2107
|
+
lockedStateChangedBy?: string;
|
|
2108
|
+
/**
|
|
2109
|
+
* Asset kinds produced by this workflow (if specified).
|
|
2110
|
+
*/
|
|
1360
2111
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
1361
|
-
shortDescription?: string;
|
|
1362
2112
|
/**
|
|
1363
2113
|
* Currently the thumbnail is identical to the after asset.
|
|
1364
2114
|
*/
|
|
@@ -1377,16 +2127,41 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1377
2127
|
/**
|
|
1378
2128
|
* The type of the job for the node.
|
|
1379
2129
|
*/
|
|
1380
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
2130
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
2131
|
+
/**
|
|
2132
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
2133
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
2134
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
2135
|
+
*/
|
|
2136
|
+
count?: number;
|
|
1381
2137
|
/**
|
|
1382
2138
|
* The nodes that this node depends on. Only available for nodes that have
|
|
1383
2139
|
* dependencies. Mainly used for user approval nodes.
|
|
1384
2140
|
*/
|
|
1385
2141
|
dependsOn?: Array<string>;
|
|
2142
|
+
/**
|
|
2143
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
2144
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
2145
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
2146
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
2147
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
2148
|
+
*/
|
|
2149
|
+
includeOutputsInWorkflowJob?: true;
|
|
1386
2150
|
/**
|
|
1387
2151
|
* The inputs of the node.
|
|
1388
2152
|
*/
|
|
1389
2153
|
inputs?: Array<Flow.Input>;
|
|
2154
|
+
/**
|
|
2155
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
2156
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
2157
|
+
* numbers, or asset IDs.
|
|
2158
|
+
*/
|
|
2159
|
+
items?: Array<string>;
|
|
2160
|
+
/**
|
|
2161
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
2162
|
+
* dynamically-created copies of loop body nodes.
|
|
2163
|
+
*/
|
|
2164
|
+
iterationIndex?: number;
|
|
1390
2165
|
/**
|
|
1391
2166
|
* The logic of the node. Only available for logic nodes.
|
|
1392
2167
|
*/
|
|
@@ -1395,6 +2170,17 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1395
2170
|
* The type of the logic for the node. Only available for logic nodes.
|
|
1396
2171
|
*/
|
|
1397
2172
|
logicType?: 'if-else';
|
|
2173
|
+
/**
|
|
2174
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
2175
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
2176
|
+
* for ForEach nodes.
|
|
2177
|
+
*/
|
|
2178
|
+
loopBodyNodeIds?: Array<string>;
|
|
2179
|
+
/**
|
|
2180
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
2181
|
+
* dynamically-created copies of loop body nodes.
|
|
2182
|
+
*/
|
|
2183
|
+
loopNodeId?: string;
|
|
1398
2184
|
/**
|
|
1399
2185
|
* The model id for the node. Mainly used for custom model tasks.
|
|
1400
2186
|
*/
|
|
@@ -1436,6 +2222,10 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1436
2222
|
* Whether this input affects the model's cost calculation
|
|
1437
2223
|
*/
|
|
1438
2224
|
costImpact?: boolean;
|
|
2225
|
+
/**
|
|
2226
|
+
* The default value for the input
|
|
2227
|
+
*/
|
|
2228
|
+
default?: unknown;
|
|
1439
2229
|
/**
|
|
1440
2230
|
* Help text displayed in the UI to provide additional information about the input
|
|
1441
2231
|
*/
|
|
@@ -1454,10 +2244,20 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1454
2244
|
* the same as the current object. This is only available for type inputs_array
|
|
1455
2245
|
* inputs.
|
|
1456
2246
|
*/
|
|
1457
|
-
inputs?: Array<
|
|
2247
|
+
inputs?: Array<{
|
|
2248
|
+
[key: string]: unknown;
|
|
2249
|
+
}>;
|
|
2250
|
+
/**
|
|
2251
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
2252
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
2253
|
+
* type.
|
|
2254
|
+
*/
|
|
2255
|
+
items?: Array<Array<Input.Item>>;
|
|
1458
2256
|
/**
|
|
1459
2257
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1460
|
-
* \`file_array\` input types.
|
|
2258
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
2259
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
2260
|
+
* data:kind, prefix
|
|
1461
2261
|
*/
|
|
1462
2262
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1463
2263
|
/**
|
|
@@ -1478,6 +2278,12 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1478
2278
|
* \`string_array\`.
|
|
1479
2279
|
*/
|
|
1480
2280
|
maxLength?: number;
|
|
2281
|
+
/**
|
|
2282
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
2283
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
2284
|
+
* creation time.
|
|
2285
|
+
*/
|
|
2286
|
+
maxSize?: number;
|
|
1481
2287
|
/**
|
|
1482
2288
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1483
2289
|
*/
|
|
@@ -1491,7 +2297,7 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1491
2297
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1492
2298
|
* available for \`model_array\` input type.
|
|
1493
2299
|
*/
|
|
1494
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
2300
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
1495
2301
|
/**
|
|
1496
2302
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1497
2303
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -1535,8 +2341,232 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1535
2341
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1536
2342
|
*/
|
|
1537
2343
|
step?: number;
|
|
2344
|
+
/**
|
|
2345
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
2346
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
2347
|
+
*/
|
|
2348
|
+
value?: unknown;
|
|
1538
2349
|
}
|
|
1539
2350
|
namespace Input {
|
|
2351
|
+
/**
|
|
2352
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
2353
|
+
* recursive items field.
|
|
2354
|
+
*/
|
|
2355
|
+
interface Item {
|
|
2356
|
+
/**
|
|
2357
|
+
* The name that must be user to call the model through the API
|
|
2358
|
+
*/
|
|
2359
|
+
name: string;
|
|
2360
|
+
/**
|
|
2361
|
+
* The data type of the input
|
|
2362
|
+
*/
|
|
2363
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
2364
|
+
/**
|
|
2365
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
2366
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
2367
|
+
* dropdown.
|
|
2368
|
+
*/
|
|
2369
|
+
allowedValues?: Array<unknown>;
|
|
2370
|
+
/**
|
|
2371
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
2372
|
+
* \`file_array\` input types with kind \`image\`.
|
|
2373
|
+
*/
|
|
2374
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
2375
|
+
/**
|
|
2376
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
2377
|
+
*/
|
|
2378
|
+
color?: boolean;
|
|
2379
|
+
/**
|
|
2380
|
+
* Whether this input affects the model's cost calculation
|
|
2381
|
+
*/
|
|
2382
|
+
costImpact?: boolean;
|
|
2383
|
+
/**
|
|
2384
|
+
* The default value for the input
|
|
2385
|
+
*/
|
|
2386
|
+
default?: unknown;
|
|
2387
|
+
/**
|
|
2388
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
2389
|
+
*/
|
|
2390
|
+
description?: string;
|
|
2391
|
+
/**
|
|
2392
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
2393
|
+
* value appear consecutively in the UI.
|
|
2394
|
+
*/
|
|
2395
|
+
group?: string;
|
|
2396
|
+
/**
|
|
2397
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
2398
|
+
*/
|
|
2399
|
+
hint?: string;
|
|
2400
|
+
/**
|
|
2401
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
2402
|
+
* the same as the current object. This is only available for type inputs_array
|
|
2403
|
+
* inputs.
|
|
2404
|
+
*/
|
|
2405
|
+
inputs?: Array<{
|
|
2406
|
+
[key: string]: unknown;
|
|
2407
|
+
}>;
|
|
2408
|
+
/**
|
|
2409
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
2410
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
2411
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
2412
|
+
* data:kind, prefix
|
|
2413
|
+
*/
|
|
2414
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
2415
|
+
/**
|
|
2416
|
+
* The label displayed in the UI for this input
|
|
2417
|
+
*/
|
|
2418
|
+
label?: string;
|
|
2419
|
+
/**
|
|
2420
|
+
* The name of the file input field to use as the mask source
|
|
2421
|
+
*/
|
|
2422
|
+
maskFrom?: string;
|
|
2423
|
+
/**
|
|
2424
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
2425
|
+
* types.
|
|
2426
|
+
*/
|
|
2427
|
+
max?: number;
|
|
2428
|
+
/**
|
|
2429
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
2430
|
+
* \`string_array\`.
|
|
2431
|
+
*/
|
|
2432
|
+
maxLength?: number;
|
|
2433
|
+
/**
|
|
2434
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
2435
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
2436
|
+
* creation time.
|
|
2437
|
+
*/
|
|
2438
|
+
maxSize?: number;
|
|
2439
|
+
/**
|
|
2440
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
2441
|
+
*/
|
|
2442
|
+
min?: number;
|
|
2443
|
+
/**
|
|
2444
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
2445
|
+
* \`string_array\`.
|
|
2446
|
+
*/
|
|
2447
|
+
minLength?: number;
|
|
2448
|
+
/**
|
|
2449
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
2450
|
+
* available for \`model_array\` input type.
|
|
2451
|
+
*/
|
|
2452
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
2453
|
+
/**
|
|
2454
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
2455
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
2456
|
+
*
|
|
2457
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
2458
|
+
*/
|
|
2459
|
+
parent?: boolean;
|
|
2460
|
+
/**
|
|
2461
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
2462
|
+
*/
|
|
2463
|
+
placeholder?: string;
|
|
2464
|
+
/**
|
|
2465
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
2466
|
+
* spark feature. Only available for \`string\` input type.
|
|
2467
|
+
*/
|
|
2468
|
+
prompt?: boolean;
|
|
2469
|
+
/**
|
|
2470
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
2471
|
+
* type.
|
|
2472
|
+
*/
|
|
2473
|
+
promptSpark?: boolean;
|
|
2474
|
+
/**
|
|
2475
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
2476
|
+
* least one of node or conditional.
|
|
2477
|
+
*/
|
|
2478
|
+
ref?: Item.Ref;
|
|
2479
|
+
/**
|
|
2480
|
+
* Set of rules that describes when this input is required:
|
|
2481
|
+
*
|
|
2482
|
+
* - \`always\`: Input is always required
|
|
2483
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
2484
|
+
* defined
|
|
2485
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
2486
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
2487
|
+
* value
|
|
2488
|
+
*
|
|
2489
|
+
* By default, the input is not required.
|
|
2490
|
+
*/
|
|
2491
|
+
required?: Item.Required;
|
|
2492
|
+
/**
|
|
2493
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
2494
|
+
*/
|
|
2495
|
+
step?: number;
|
|
2496
|
+
/**
|
|
2497
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
2498
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
2499
|
+
*/
|
|
2500
|
+
value?: unknown;
|
|
2501
|
+
}
|
|
2502
|
+
namespace Item {
|
|
2503
|
+
/**
|
|
2504
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
2505
|
+
* least one of node or conditional.
|
|
2506
|
+
*/
|
|
2507
|
+
interface Ref {
|
|
2508
|
+
/**
|
|
2509
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
2510
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
2511
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
2512
|
+
*/
|
|
2513
|
+
conditional?: Array<string>;
|
|
2514
|
+
/**
|
|
2515
|
+
* This is the desired node output value if ref is an if/else node.
|
|
2516
|
+
*/
|
|
2517
|
+
equal?: string;
|
|
2518
|
+
/**
|
|
2519
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
2520
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
2521
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
2522
|
+
* all outputs of a node, you can use the name 'all'.
|
|
2523
|
+
*/
|
|
2524
|
+
name?: string;
|
|
2525
|
+
/**
|
|
2526
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
2527
|
+
*/
|
|
2528
|
+
node?: string;
|
|
2529
|
+
}
|
|
2530
|
+
/**
|
|
2531
|
+
* Set of rules that describes when this input is required:
|
|
2532
|
+
*
|
|
2533
|
+
* - \`always\`: Input is always required
|
|
2534
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
2535
|
+
* defined
|
|
2536
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
2537
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
2538
|
+
* value
|
|
2539
|
+
*
|
|
2540
|
+
* By default, the input is not required.
|
|
2541
|
+
*/
|
|
2542
|
+
interface Required {
|
|
2543
|
+
/**
|
|
2544
|
+
* Whether the input is always required
|
|
2545
|
+
*/
|
|
2546
|
+
always?: boolean;
|
|
2547
|
+
/**
|
|
2548
|
+
* Makes this input required when another input has a specific value:
|
|
2549
|
+
*
|
|
2550
|
+
* - Key: name of the input to check
|
|
2551
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
2552
|
+
*/
|
|
2553
|
+
conditionalValues?: unknown;
|
|
2554
|
+
/**
|
|
2555
|
+
* Makes this input required when another input is defined:
|
|
2556
|
+
*
|
|
2557
|
+
* - Key: name of the input that must be defined
|
|
2558
|
+
* - Value: message to display when this input is required
|
|
2559
|
+
*/
|
|
2560
|
+
ifDefined?: unknown;
|
|
2561
|
+
/**
|
|
2562
|
+
* Makes this input required when another input is not defined:
|
|
2563
|
+
*
|
|
2564
|
+
* - Key: name of the input that must be undefined
|
|
2565
|
+
* - Value: message to display when this input is required
|
|
2566
|
+
*/
|
|
2567
|
+
ifNotDefined?: unknown;
|
|
2568
|
+
}
|
|
2569
|
+
}
|
|
1540
2570
|
/**
|
|
1541
2571
|
* The reference to another input or output of the same workflow. Must have at
|
|
1542
2572
|
* least one of node or conditional.
|
|
@@ -1663,6 +2693,10 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1663
2693
|
* Whether this input affects the model's cost calculation
|
|
1664
2694
|
*/
|
|
1665
2695
|
costImpact?: boolean;
|
|
2696
|
+
/**
|
|
2697
|
+
* The default value for the input
|
|
2698
|
+
*/
|
|
2699
|
+
default?: unknown;
|
|
1666
2700
|
/**
|
|
1667
2701
|
* Help text displayed in the UI to provide additional information about the input
|
|
1668
2702
|
*/
|
|
@@ -1681,10 +2715,14 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1681
2715
|
* the same as the current object. This is only available for type inputs_array
|
|
1682
2716
|
* inputs.
|
|
1683
2717
|
*/
|
|
1684
|
-
inputs?: Array<
|
|
2718
|
+
inputs?: Array<{
|
|
2719
|
+
[key: string]: unknown;
|
|
2720
|
+
}>;
|
|
1685
2721
|
/**
|
|
1686
2722
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1687
|
-
* \`file_array\` input types.
|
|
2723
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
2724
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
2725
|
+
* data:kind, prefix
|
|
1688
2726
|
*/
|
|
1689
2727
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1690
2728
|
/**
|
|
@@ -1705,6 +2743,12 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1705
2743
|
* \`string_array\`.
|
|
1706
2744
|
*/
|
|
1707
2745
|
maxLength?: number;
|
|
2746
|
+
/**
|
|
2747
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
2748
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
2749
|
+
* creation time.
|
|
2750
|
+
*/
|
|
2751
|
+
maxSize?: number;
|
|
1708
2752
|
/**
|
|
1709
2753
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1710
2754
|
*/
|
|
@@ -1718,7 +2762,7 @@ export declare namespace WorkflowUpdateResponse {
|
|
|
1718
2762
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1719
2763
|
* available for \`model_array\` input type.
|
|
1720
2764
|
*/
|
|
1721
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
2765
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
1722
2766
|
/**
|
|
1723
2767
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1724
2768
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -1961,20 +3005,28 @@ export interface WorkflowListResponse {
|
|
|
1961
3005
|
}
|
|
1962
3006
|
export declare namespace WorkflowListResponse {
|
|
1963
3007
|
interface Workflow {
|
|
3008
|
+
/**
|
|
3009
|
+
* Unique identifier of the workflow.
|
|
3010
|
+
*/
|
|
1964
3011
|
id: string;
|
|
3012
|
+
/**
|
|
3013
|
+
* User that created the workflow.
|
|
3014
|
+
*/
|
|
1965
3015
|
authorId: string;
|
|
1966
3016
|
/**
|
|
1967
3017
|
* ISO string
|
|
1968
3018
|
*/
|
|
1969
3019
|
createdAt: string;
|
|
1970
3020
|
/**
|
|
1971
|
-
*
|
|
3021
|
+
* Full description of what the workflow does.
|
|
1972
3022
|
*/
|
|
1973
3023
|
description: string;
|
|
1974
3024
|
/**
|
|
1975
3025
|
* The UI data about the workflow. This is managed by scenario webapp.
|
|
1976
3026
|
*/
|
|
1977
|
-
editorInfo:
|
|
3027
|
+
editorInfo: {
|
|
3028
|
+
[key: string]: unknown;
|
|
3029
|
+
};
|
|
1978
3030
|
/**
|
|
1979
3031
|
* The flow of the workflow.
|
|
1980
3032
|
*/
|
|
@@ -1983,14 +3035,30 @@ export declare namespace WorkflowListResponse {
|
|
|
1983
3035
|
* The inputs of the workflow.
|
|
1984
3036
|
*/
|
|
1985
3037
|
inputs: Array<Workflow.Input>;
|
|
3038
|
+
/**
|
|
3039
|
+
* Human-readable name of the workflow.
|
|
3040
|
+
*/
|
|
1986
3041
|
name: string;
|
|
3042
|
+
/**
|
|
3043
|
+
* Project that owns the workflow.
|
|
3044
|
+
*/
|
|
1987
3045
|
ownerId: string;
|
|
3046
|
+
/**
|
|
3047
|
+
* Visibility setting for the workflow.
|
|
3048
|
+
*/
|
|
1988
3049
|
privacy: 'private' | 'public' | 'unlisted';
|
|
1989
|
-
status: 'deleted' | 'draft' | 'ready';
|
|
1990
3050
|
/**
|
|
1991
|
-
*
|
|
3051
|
+
* Short summary of the workflow.
|
|
1992
3052
|
*/
|
|
1993
|
-
|
|
3053
|
+
shortDescription: string;
|
|
3054
|
+
/**
|
|
3055
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
3056
|
+
*/
|
|
3057
|
+
status: 'deleted' | 'draft' | 'ready';
|
|
3058
|
+
/**
|
|
3059
|
+
* The tag set of the workflow.
|
|
3060
|
+
*/
|
|
3061
|
+
tagSet: Array<string>;
|
|
1994
3062
|
/**
|
|
1995
3063
|
* ISO string
|
|
1996
3064
|
*/
|
|
@@ -2003,8 +3071,38 @@ export declare namespace WorkflowListResponse {
|
|
|
2003
3071
|
* A representation of an asset before being processed by the workflow
|
|
2004
3072
|
*/
|
|
2005
3073
|
before?: Workflow.Before;
|
|
3074
|
+
/**
|
|
3075
|
+
* Embedding is a map of embedding version into embedding date
|
|
3076
|
+
*/
|
|
3077
|
+
embedding?: unknown;
|
|
3078
|
+
/**
|
|
3079
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
3080
|
+
* except by the author or a project admin.
|
|
3081
|
+
*/
|
|
3082
|
+
isLocked?: boolean;
|
|
3083
|
+
lastIndexedAt?: string;
|
|
3084
|
+
/**
|
|
3085
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
3086
|
+
*/
|
|
3087
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
3088
|
+
/**
|
|
3089
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
3090
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
3091
|
+
* in the Ready state.
|
|
3092
|
+
*/
|
|
3093
|
+
lastReadyFlowUpdatedAt?: string;
|
|
3094
|
+
/**
|
|
3095
|
+
* ISO string timestamp when lock state was last changed.
|
|
3096
|
+
*/
|
|
3097
|
+
lockedStateChangedAt?: string;
|
|
3098
|
+
/**
|
|
3099
|
+
* UserId of the user who last changed the lock state.
|
|
3100
|
+
*/
|
|
3101
|
+
lockedStateChangedBy?: string;
|
|
3102
|
+
/**
|
|
3103
|
+
* Asset kinds produced by this workflow (if specified).
|
|
3104
|
+
*/
|
|
2006
3105
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
2007
|
-
shortDescription?: string;
|
|
2008
3106
|
/**
|
|
2009
3107
|
* Currently the thumbnail is identical to the after asset.
|
|
2010
3108
|
*/
|
|
@@ -2023,16 +3121,41 @@ export declare namespace WorkflowListResponse {
|
|
|
2023
3121
|
/**
|
|
2024
3122
|
* The type of the job for the node.
|
|
2025
3123
|
*/
|
|
2026
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
3124
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
3125
|
+
/**
|
|
3126
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
3127
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
3128
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
3129
|
+
*/
|
|
3130
|
+
count?: number;
|
|
2027
3131
|
/**
|
|
2028
3132
|
* The nodes that this node depends on. Only available for nodes that have
|
|
2029
3133
|
* dependencies. Mainly used for user approval nodes.
|
|
2030
3134
|
*/
|
|
2031
3135
|
dependsOn?: Array<string>;
|
|
3136
|
+
/**
|
|
3137
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
3138
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
3139
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
3140
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
3141
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
3142
|
+
*/
|
|
3143
|
+
includeOutputsInWorkflowJob?: true;
|
|
2032
3144
|
/**
|
|
2033
3145
|
* The inputs of the node.
|
|
2034
3146
|
*/
|
|
2035
3147
|
inputs?: Array<Flow.Input>;
|
|
3148
|
+
/**
|
|
3149
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
3150
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
3151
|
+
* numbers, or asset IDs.
|
|
3152
|
+
*/
|
|
3153
|
+
items?: Array<string>;
|
|
3154
|
+
/**
|
|
3155
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
3156
|
+
* dynamically-created copies of loop body nodes.
|
|
3157
|
+
*/
|
|
3158
|
+
iterationIndex?: number;
|
|
2036
3159
|
/**
|
|
2037
3160
|
* The logic of the node. Only available for logic nodes.
|
|
2038
3161
|
*/
|
|
@@ -2041,6 +3164,17 @@ export declare namespace WorkflowListResponse {
|
|
|
2041
3164
|
* The type of the logic for the node. Only available for logic nodes.
|
|
2042
3165
|
*/
|
|
2043
3166
|
logicType?: 'if-else';
|
|
3167
|
+
/**
|
|
3168
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
3169
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
3170
|
+
* for ForEach nodes.
|
|
3171
|
+
*/
|
|
3172
|
+
loopBodyNodeIds?: Array<string>;
|
|
3173
|
+
/**
|
|
3174
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
3175
|
+
* dynamically-created copies of loop body nodes.
|
|
3176
|
+
*/
|
|
3177
|
+
loopNodeId?: string;
|
|
2044
3178
|
/**
|
|
2045
3179
|
* The model id for the node. Mainly used for custom model tasks.
|
|
2046
3180
|
*/
|
|
@@ -2082,6 +3216,10 @@ export declare namespace WorkflowListResponse {
|
|
|
2082
3216
|
* Whether this input affects the model's cost calculation
|
|
2083
3217
|
*/
|
|
2084
3218
|
costImpact?: boolean;
|
|
3219
|
+
/**
|
|
3220
|
+
* The default value for the input
|
|
3221
|
+
*/
|
|
3222
|
+
default?: unknown;
|
|
2085
3223
|
/**
|
|
2086
3224
|
* Help text displayed in the UI to provide additional information about the input
|
|
2087
3225
|
*/
|
|
@@ -2100,10 +3238,20 @@ export declare namespace WorkflowListResponse {
|
|
|
2100
3238
|
* the same as the current object. This is only available for type inputs_array
|
|
2101
3239
|
* inputs.
|
|
2102
3240
|
*/
|
|
2103
|
-
inputs?: Array<
|
|
3241
|
+
inputs?: Array<{
|
|
3242
|
+
[key: string]: unknown;
|
|
3243
|
+
}>;
|
|
3244
|
+
/**
|
|
3245
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
3246
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
3247
|
+
* type.
|
|
3248
|
+
*/
|
|
3249
|
+
items?: Array<Array<Input.Item>>;
|
|
2104
3250
|
/**
|
|
2105
3251
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
2106
|
-
* \`file_array\` input types.
|
|
3252
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3253
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
3254
|
+
* data:kind, prefix
|
|
2107
3255
|
*/
|
|
2108
3256
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
2109
3257
|
/**
|
|
@@ -2124,6 +3272,12 @@ export declare namespace WorkflowListResponse {
|
|
|
2124
3272
|
* \`string_array\`.
|
|
2125
3273
|
*/
|
|
2126
3274
|
maxLength?: number;
|
|
3275
|
+
/**
|
|
3276
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3277
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3278
|
+
* creation time.
|
|
3279
|
+
*/
|
|
3280
|
+
maxSize?: number;
|
|
2127
3281
|
/**
|
|
2128
3282
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
2129
3283
|
*/
|
|
@@ -2137,7 +3291,7 @@ export declare namespace WorkflowListResponse {
|
|
|
2137
3291
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
2138
3292
|
* available for \`model_array\` input type.
|
|
2139
3293
|
*/
|
|
2140
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
3294
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
2141
3295
|
/**
|
|
2142
3296
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
2143
3297
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -2181,8 +3335,232 @@ export declare namespace WorkflowListResponse {
|
|
|
2181
3335
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
2182
3336
|
*/
|
|
2183
3337
|
step?: number;
|
|
3338
|
+
/**
|
|
3339
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
3340
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
3341
|
+
*/
|
|
3342
|
+
value?: unknown;
|
|
2184
3343
|
}
|
|
2185
3344
|
namespace Input {
|
|
3345
|
+
/**
|
|
3346
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
3347
|
+
* recursive items field.
|
|
3348
|
+
*/
|
|
3349
|
+
interface Item {
|
|
3350
|
+
/**
|
|
3351
|
+
* The name that must be user to call the model through the API
|
|
3352
|
+
*/
|
|
3353
|
+
name: string;
|
|
3354
|
+
/**
|
|
3355
|
+
* The data type of the input
|
|
3356
|
+
*/
|
|
3357
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
3358
|
+
/**
|
|
3359
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
3360
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
3361
|
+
* dropdown.
|
|
3362
|
+
*/
|
|
3363
|
+
allowedValues?: Array<unknown>;
|
|
3364
|
+
/**
|
|
3365
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
3366
|
+
* \`file_array\` input types with kind \`image\`.
|
|
3367
|
+
*/
|
|
3368
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
3369
|
+
/**
|
|
3370
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
3371
|
+
*/
|
|
3372
|
+
color?: boolean;
|
|
3373
|
+
/**
|
|
3374
|
+
* Whether this input affects the model's cost calculation
|
|
3375
|
+
*/
|
|
3376
|
+
costImpact?: boolean;
|
|
3377
|
+
/**
|
|
3378
|
+
* The default value for the input
|
|
3379
|
+
*/
|
|
3380
|
+
default?: unknown;
|
|
3381
|
+
/**
|
|
3382
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
3383
|
+
*/
|
|
3384
|
+
description?: string;
|
|
3385
|
+
/**
|
|
3386
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
3387
|
+
* value appear consecutively in the UI.
|
|
3388
|
+
*/
|
|
3389
|
+
group?: string;
|
|
3390
|
+
/**
|
|
3391
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
3392
|
+
*/
|
|
3393
|
+
hint?: string;
|
|
3394
|
+
/**
|
|
3395
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
3396
|
+
* the same as the current object. This is only available for type inputs_array
|
|
3397
|
+
* inputs.
|
|
3398
|
+
*/
|
|
3399
|
+
inputs?: Array<{
|
|
3400
|
+
[key: string]: unknown;
|
|
3401
|
+
}>;
|
|
3402
|
+
/**
|
|
3403
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3404
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3405
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
3406
|
+
* data:kind, prefix
|
|
3407
|
+
*/
|
|
3408
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3409
|
+
/**
|
|
3410
|
+
* The label displayed in the UI for this input
|
|
3411
|
+
*/
|
|
3412
|
+
label?: string;
|
|
3413
|
+
/**
|
|
3414
|
+
* The name of the file input field to use as the mask source
|
|
3415
|
+
*/
|
|
3416
|
+
maskFrom?: string;
|
|
3417
|
+
/**
|
|
3418
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
3419
|
+
* types.
|
|
3420
|
+
*/
|
|
3421
|
+
max?: number;
|
|
3422
|
+
/**
|
|
3423
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
3424
|
+
* \`string_array\`.
|
|
3425
|
+
*/
|
|
3426
|
+
maxLength?: number;
|
|
3427
|
+
/**
|
|
3428
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3429
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3430
|
+
* creation time.
|
|
3431
|
+
*/
|
|
3432
|
+
maxSize?: number;
|
|
3433
|
+
/**
|
|
3434
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3435
|
+
*/
|
|
3436
|
+
min?: number;
|
|
3437
|
+
/**
|
|
3438
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
3439
|
+
* \`string_array\`.
|
|
3440
|
+
*/
|
|
3441
|
+
minLength?: number;
|
|
3442
|
+
/**
|
|
3443
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3444
|
+
* available for \`model_array\` input type.
|
|
3445
|
+
*/
|
|
3446
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3447
|
+
/**
|
|
3448
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3449
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
3450
|
+
*
|
|
3451
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
3452
|
+
*/
|
|
3453
|
+
parent?: boolean;
|
|
3454
|
+
/**
|
|
3455
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
3456
|
+
*/
|
|
3457
|
+
placeholder?: string;
|
|
3458
|
+
/**
|
|
3459
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
3460
|
+
* spark feature. Only available for \`string\` input type.
|
|
3461
|
+
*/
|
|
3462
|
+
prompt?: boolean;
|
|
3463
|
+
/**
|
|
3464
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
3465
|
+
* type.
|
|
3466
|
+
*/
|
|
3467
|
+
promptSpark?: boolean;
|
|
3468
|
+
/**
|
|
3469
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3470
|
+
* least one of node or conditional.
|
|
3471
|
+
*/
|
|
3472
|
+
ref?: Item.Ref;
|
|
3473
|
+
/**
|
|
3474
|
+
* Set of rules that describes when this input is required:
|
|
3475
|
+
*
|
|
3476
|
+
* - \`always\`: Input is always required
|
|
3477
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3478
|
+
* defined
|
|
3479
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3480
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3481
|
+
* value
|
|
3482
|
+
*
|
|
3483
|
+
* By default, the input is not required.
|
|
3484
|
+
*/
|
|
3485
|
+
required?: Item.Required;
|
|
3486
|
+
/**
|
|
3487
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3488
|
+
*/
|
|
3489
|
+
step?: number;
|
|
3490
|
+
/**
|
|
3491
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
3492
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
3493
|
+
*/
|
|
3494
|
+
value?: unknown;
|
|
3495
|
+
}
|
|
3496
|
+
namespace Item {
|
|
3497
|
+
/**
|
|
3498
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
3499
|
+
* least one of node or conditional.
|
|
3500
|
+
*/
|
|
3501
|
+
interface Ref {
|
|
3502
|
+
/**
|
|
3503
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
3504
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
3505
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
3506
|
+
*/
|
|
3507
|
+
conditional?: Array<string>;
|
|
3508
|
+
/**
|
|
3509
|
+
* This is the desired node output value if ref is an if/else node.
|
|
3510
|
+
*/
|
|
3511
|
+
equal?: string;
|
|
3512
|
+
/**
|
|
3513
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
3514
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
3515
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
3516
|
+
* all outputs of a node, you can use the name 'all'.
|
|
3517
|
+
*/
|
|
3518
|
+
name?: string;
|
|
3519
|
+
/**
|
|
3520
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
3521
|
+
*/
|
|
3522
|
+
node?: string;
|
|
3523
|
+
}
|
|
3524
|
+
/**
|
|
3525
|
+
* Set of rules that describes when this input is required:
|
|
3526
|
+
*
|
|
3527
|
+
* - \`always\`: Input is always required
|
|
3528
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
3529
|
+
* defined
|
|
3530
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
3531
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
3532
|
+
* value
|
|
3533
|
+
*
|
|
3534
|
+
* By default, the input is not required.
|
|
3535
|
+
*/
|
|
3536
|
+
interface Required {
|
|
3537
|
+
/**
|
|
3538
|
+
* Whether the input is always required
|
|
3539
|
+
*/
|
|
3540
|
+
always?: boolean;
|
|
3541
|
+
/**
|
|
3542
|
+
* Makes this input required when another input has a specific value:
|
|
3543
|
+
*
|
|
3544
|
+
* - Key: name of the input to check
|
|
3545
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
3546
|
+
*/
|
|
3547
|
+
conditionalValues?: unknown;
|
|
3548
|
+
/**
|
|
3549
|
+
* Makes this input required when another input is defined:
|
|
3550
|
+
*
|
|
3551
|
+
* - Key: name of the input that must be defined
|
|
3552
|
+
* - Value: message to display when this input is required
|
|
3553
|
+
*/
|
|
3554
|
+
ifDefined?: unknown;
|
|
3555
|
+
/**
|
|
3556
|
+
* Makes this input required when another input is not defined:
|
|
3557
|
+
*
|
|
3558
|
+
* - Key: name of the input that must be undefined
|
|
3559
|
+
* - Value: message to display when this input is required
|
|
3560
|
+
*/
|
|
3561
|
+
ifNotDefined?: unknown;
|
|
3562
|
+
}
|
|
3563
|
+
}
|
|
2186
3564
|
/**
|
|
2187
3565
|
* The reference to another input or output of the same workflow. Must have at
|
|
2188
3566
|
* least one of node or conditional.
|
|
@@ -2309,6 +3687,10 @@ export declare namespace WorkflowListResponse {
|
|
|
2309
3687
|
* Whether this input affects the model's cost calculation
|
|
2310
3688
|
*/
|
|
2311
3689
|
costImpact?: boolean;
|
|
3690
|
+
/**
|
|
3691
|
+
* The default value for the input
|
|
3692
|
+
*/
|
|
3693
|
+
default?: unknown;
|
|
2312
3694
|
/**
|
|
2313
3695
|
* Help text displayed in the UI to provide additional information about the input
|
|
2314
3696
|
*/
|
|
@@ -2327,10 +3709,14 @@ export declare namespace WorkflowListResponse {
|
|
|
2327
3709
|
* the same as the current object. This is only available for type inputs_array
|
|
2328
3710
|
* inputs.
|
|
2329
3711
|
*/
|
|
2330
|
-
inputs?: Array<
|
|
3712
|
+
inputs?: Array<{
|
|
3713
|
+
[key: string]: unknown;
|
|
3714
|
+
}>;
|
|
2331
3715
|
/**
|
|
2332
3716
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
2333
|
-
* \`file_array\` input types.
|
|
3717
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
3718
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
3719
|
+
* data:kind, prefix
|
|
2334
3720
|
*/
|
|
2335
3721
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
2336
3722
|
/**
|
|
@@ -2351,6 +3737,12 @@ export declare namespace WorkflowListResponse {
|
|
|
2351
3737
|
* \`string_array\`.
|
|
2352
3738
|
*/
|
|
2353
3739
|
maxLength?: number;
|
|
3740
|
+
/**
|
|
3741
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
3742
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
3743
|
+
* creation time.
|
|
3744
|
+
*/
|
|
3745
|
+
maxSize?: number;
|
|
2354
3746
|
/**
|
|
2355
3747
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
2356
3748
|
*/
|
|
@@ -2364,7 +3756,7 @@ export declare namespace WorkflowListResponse {
|
|
|
2364
3756
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
2365
3757
|
* available for \`model_array\` input type.
|
|
2366
3758
|
*/
|
|
2367
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
3759
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
2368
3760
|
/**
|
|
2369
3761
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
2370
3762
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -2610,7 +4002,7 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2610
4002
|
/**
|
|
2611
4003
|
* The type of job
|
|
2612
4004
|
*/
|
|
2613
|
-
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
4005
|
+
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'musubi-model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
2614
4006
|
/**
|
|
2615
4007
|
* Metadata of the job with some additional information
|
|
2616
4008
|
*/
|
|
@@ -2654,18 +4046,36 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2654
4046
|
* List of produced assets for this job
|
|
2655
4047
|
*/
|
|
2656
4048
|
assetIds?: Array<string>;
|
|
4049
|
+
/**
|
|
4050
|
+
* Eventual error for the job
|
|
4051
|
+
*/
|
|
4052
|
+
error?: string | null;
|
|
2657
4053
|
/**
|
|
2658
4054
|
* The flow of the job. Only available for workflow jobs.
|
|
2659
4055
|
*/
|
|
2660
4056
|
flow?: Array<Metadata.Flow>;
|
|
4057
|
+
/**
|
|
4058
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
4059
|
+
*/
|
|
4060
|
+
hint?: string;
|
|
2661
4061
|
/**
|
|
2662
4062
|
* The inputs for the job
|
|
2663
4063
|
*/
|
|
2664
|
-
input?:
|
|
4064
|
+
input?: {
|
|
4065
|
+
[key: string]: unknown;
|
|
4066
|
+
};
|
|
4067
|
+
/**
|
|
4068
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
4069
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
4070
|
+
* results.
|
|
4071
|
+
*/
|
|
4072
|
+
output?: {
|
|
4073
|
+
[key: string]: unknown;
|
|
4074
|
+
};
|
|
2665
4075
|
/**
|
|
2666
|
-
*
|
|
4076
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
2667
4077
|
*/
|
|
2668
|
-
|
|
4078
|
+
outputModelId?: string;
|
|
2669
4079
|
/**
|
|
2670
4080
|
* The workflow ID of the job if job is part of a workflow.
|
|
2671
4081
|
*/
|
|
@@ -2688,20 +4098,45 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2688
4098
|
/**
|
|
2689
4099
|
* The type of the job for the node.
|
|
2690
4100
|
*/
|
|
2691
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
4101
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
2692
4102
|
/**
|
|
2693
4103
|
* List of produced assets for this node.
|
|
2694
4104
|
*/
|
|
2695
4105
|
assets?: Array<Flow.Asset>;
|
|
2696
4106
|
/**
|
|
2697
|
-
*
|
|
4107
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
4108
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
4109
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
4110
|
+
*/
|
|
4111
|
+
count?: number;
|
|
4112
|
+
/**
|
|
4113
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
2698
4114
|
* dependencies. Mainly used for user approval nodes.
|
|
2699
4115
|
*/
|
|
2700
4116
|
dependsOn?: Array<string>;
|
|
4117
|
+
/**
|
|
4118
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
4119
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
4120
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
4121
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
4122
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
4123
|
+
*/
|
|
4124
|
+
includeOutputsInWorkflowJob?: true;
|
|
2701
4125
|
/**
|
|
2702
4126
|
* The inputs of the node.
|
|
2703
4127
|
*/
|
|
2704
4128
|
inputs?: Array<Flow.Input>;
|
|
4129
|
+
/**
|
|
4130
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
4131
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
4132
|
+
* numbers, or asset IDs.
|
|
4133
|
+
*/
|
|
4134
|
+
items?: Array<string>;
|
|
4135
|
+
/**
|
|
4136
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
4137
|
+
* dynamically-created copies of loop body nodes.
|
|
4138
|
+
*/
|
|
4139
|
+
iterationIndex?: number;
|
|
2705
4140
|
/**
|
|
2706
4141
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
2707
4142
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -2716,10 +4151,25 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2716
4151
|
* The type of the logic for the node. Only available for logic nodes.
|
|
2717
4152
|
*/
|
|
2718
4153
|
logicType?: 'if-else';
|
|
4154
|
+
/**
|
|
4155
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
4156
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
4157
|
+
* for ForEach nodes.
|
|
4158
|
+
*/
|
|
4159
|
+
loopBodyNodeIds?: Array<string>;
|
|
4160
|
+
/**
|
|
4161
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
4162
|
+
* dynamically-created copies of loop body nodes.
|
|
4163
|
+
*/
|
|
4164
|
+
loopNodeId?: string;
|
|
2719
4165
|
/**
|
|
2720
4166
|
* The model id for the node. Mainly used for custom model tasks.
|
|
2721
4167
|
*/
|
|
2722
4168
|
modelId?: string;
|
|
4169
|
+
/**
|
|
4170
|
+
* The output of the node. Only available for logic nodes.
|
|
4171
|
+
*/
|
|
4172
|
+
output?: unknown;
|
|
2723
4173
|
/**
|
|
2724
4174
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
2725
4175
|
*/
|
|
@@ -2761,6 +4211,10 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2761
4211
|
* Whether this input affects the model's cost calculation
|
|
2762
4212
|
*/
|
|
2763
4213
|
costImpact?: boolean;
|
|
4214
|
+
/**
|
|
4215
|
+
* The default value for the input
|
|
4216
|
+
*/
|
|
4217
|
+
default?: unknown;
|
|
2764
4218
|
/**
|
|
2765
4219
|
* Help text displayed in the UI to provide additional information about the input
|
|
2766
4220
|
*/
|
|
@@ -2779,10 +4233,20 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2779
4233
|
* the same as the current object. This is only available for type inputs_array
|
|
2780
4234
|
* inputs.
|
|
2781
4235
|
*/
|
|
2782
|
-
inputs?: Array<
|
|
4236
|
+
inputs?: Array<{
|
|
4237
|
+
[key: string]: unknown;
|
|
4238
|
+
}>;
|
|
4239
|
+
/**
|
|
4240
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
4241
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
4242
|
+
* type.
|
|
4243
|
+
*/
|
|
4244
|
+
items?: Array<Array<Input.Item>>;
|
|
2783
4245
|
/**
|
|
2784
4246
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
2785
|
-
* \`file_array\` input types.
|
|
4247
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4248
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
4249
|
+
* data:kind, prefix
|
|
2786
4250
|
*/
|
|
2787
4251
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
2788
4252
|
/**
|
|
@@ -2803,6 +4267,12 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2803
4267
|
* \`string_array\`.
|
|
2804
4268
|
*/
|
|
2805
4269
|
maxLength?: number;
|
|
4270
|
+
/**
|
|
4271
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
4272
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
4273
|
+
* creation time.
|
|
4274
|
+
*/
|
|
4275
|
+
maxSize?: number;
|
|
2806
4276
|
/**
|
|
2807
4277
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
2808
4278
|
*/
|
|
@@ -2816,7 +4286,7 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2816
4286
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
2817
4287
|
* available for \`model_array\` input type.
|
|
2818
4288
|
*/
|
|
2819
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
4289
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
2820
4290
|
/**
|
|
2821
4291
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
2822
4292
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -2860,8 +4330,232 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
2860
4330
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
2861
4331
|
*/
|
|
2862
4332
|
step?: number;
|
|
4333
|
+
/**
|
|
4334
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
4335
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
4336
|
+
*/
|
|
4337
|
+
value?: unknown;
|
|
2863
4338
|
}
|
|
2864
4339
|
namespace Input {
|
|
4340
|
+
/**
|
|
4341
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
4342
|
+
* recursive items field.
|
|
4343
|
+
*/
|
|
4344
|
+
interface Item {
|
|
4345
|
+
/**
|
|
4346
|
+
* The name that must be user to call the model through the API
|
|
4347
|
+
*/
|
|
4348
|
+
name: string;
|
|
4349
|
+
/**
|
|
4350
|
+
* The data type of the input
|
|
4351
|
+
*/
|
|
4352
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
4353
|
+
/**
|
|
4354
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
4355
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
4356
|
+
* dropdown.
|
|
4357
|
+
*/
|
|
4358
|
+
allowedValues?: Array<unknown>;
|
|
4359
|
+
/**
|
|
4360
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
4361
|
+
* \`file_array\` input types with kind \`image\`.
|
|
4362
|
+
*/
|
|
4363
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
4364
|
+
/**
|
|
4365
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
4366
|
+
*/
|
|
4367
|
+
color?: boolean;
|
|
4368
|
+
/**
|
|
4369
|
+
* Whether this input affects the model's cost calculation
|
|
4370
|
+
*/
|
|
4371
|
+
costImpact?: boolean;
|
|
4372
|
+
/**
|
|
4373
|
+
* The default value for the input
|
|
4374
|
+
*/
|
|
4375
|
+
default?: unknown;
|
|
4376
|
+
/**
|
|
4377
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
4378
|
+
*/
|
|
4379
|
+
description?: string;
|
|
4380
|
+
/**
|
|
4381
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
4382
|
+
* value appear consecutively in the UI.
|
|
4383
|
+
*/
|
|
4384
|
+
group?: string;
|
|
4385
|
+
/**
|
|
4386
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
4387
|
+
*/
|
|
4388
|
+
hint?: string;
|
|
4389
|
+
/**
|
|
4390
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
4391
|
+
* the same as the current object. This is only available for type inputs_array
|
|
4392
|
+
* inputs.
|
|
4393
|
+
*/
|
|
4394
|
+
inputs?: Array<{
|
|
4395
|
+
[key: string]: unknown;
|
|
4396
|
+
}>;
|
|
4397
|
+
/**
|
|
4398
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4399
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4400
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
4401
|
+
* data:kind, prefix
|
|
4402
|
+
*/
|
|
4403
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
4404
|
+
/**
|
|
4405
|
+
* The label displayed in the UI for this input
|
|
4406
|
+
*/
|
|
4407
|
+
label?: string;
|
|
4408
|
+
/**
|
|
4409
|
+
* The name of the file input field to use as the mask source
|
|
4410
|
+
*/
|
|
4411
|
+
maskFrom?: string;
|
|
4412
|
+
/**
|
|
4413
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
4414
|
+
* types.
|
|
4415
|
+
*/
|
|
4416
|
+
max?: number;
|
|
4417
|
+
/**
|
|
4418
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4419
|
+
* \`string_array\`.
|
|
4420
|
+
*/
|
|
4421
|
+
maxLength?: number;
|
|
4422
|
+
/**
|
|
4423
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
4424
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
4425
|
+
* creation time.
|
|
4426
|
+
*/
|
|
4427
|
+
maxSize?: number;
|
|
4428
|
+
/**
|
|
4429
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
4430
|
+
*/
|
|
4431
|
+
min?: number;
|
|
4432
|
+
/**
|
|
4433
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
4434
|
+
* \`string_array\`.
|
|
4435
|
+
*/
|
|
4436
|
+
minLength?: number;
|
|
4437
|
+
/**
|
|
4438
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
4439
|
+
* available for \`model_array\` input type.
|
|
4440
|
+
*/
|
|
4441
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
4442
|
+
/**
|
|
4443
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
4444
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
4445
|
+
*
|
|
4446
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
4447
|
+
*/
|
|
4448
|
+
parent?: boolean;
|
|
4449
|
+
/**
|
|
4450
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
4451
|
+
*/
|
|
4452
|
+
placeholder?: string;
|
|
4453
|
+
/**
|
|
4454
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
4455
|
+
* spark feature. Only available for \`string\` input type.
|
|
4456
|
+
*/
|
|
4457
|
+
prompt?: boolean;
|
|
4458
|
+
/**
|
|
4459
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
4460
|
+
* type.
|
|
4461
|
+
*/
|
|
4462
|
+
promptSpark?: boolean;
|
|
4463
|
+
/**
|
|
4464
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
4465
|
+
* least one of node or conditional.
|
|
4466
|
+
*/
|
|
4467
|
+
ref?: Item.Ref;
|
|
4468
|
+
/**
|
|
4469
|
+
* Set of rules that describes when this input is required:
|
|
4470
|
+
*
|
|
4471
|
+
* - \`always\`: Input is always required
|
|
4472
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4473
|
+
* defined
|
|
4474
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4475
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4476
|
+
* value
|
|
4477
|
+
*
|
|
4478
|
+
* By default, the input is not required.
|
|
4479
|
+
*/
|
|
4480
|
+
required?: Item.Required;
|
|
4481
|
+
/**
|
|
4482
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
4483
|
+
*/
|
|
4484
|
+
step?: number;
|
|
4485
|
+
/**
|
|
4486
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
4487
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
4488
|
+
*/
|
|
4489
|
+
value?: unknown;
|
|
4490
|
+
}
|
|
4491
|
+
namespace Item {
|
|
4492
|
+
/**
|
|
4493
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
4494
|
+
* least one of node or conditional.
|
|
4495
|
+
*/
|
|
4496
|
+
interface Ref {
|
|
4497
|
+
/**
|
|
4498
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
4499
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
4500
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
4501
|
+
*/
|
|
4502
|
+
conditional?: Array<string>;
|
|
4503
|
+
/**
|
|
4504
|
+
* This is the desired node output value if ref is an if/else node.
|
|
4505
|
+
*/
|
|
4506
|
+
equal?: string;
|
|
4507
|
+
/**
|
|
4508
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
4509
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
4510
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
4511
|
+
* all outputs of a node, you can use the name 'all'.
|
|
4512
|
+
*/
|
|
4513
|
+
name?: string;
|
|
4514
|
+
/**
|
|
4515
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
4516
|
+
*/
|
|
4517
|
+
node?: string;
|
|
4518
|
+
}
|
|
4519
|
+
/**
|
|
4520
|
+
* Set of rules that describes when this input is required:
|
|
4521
|
+
*
|
|
4522
|
+
* - \`always\`: Input is always required
|
|
4523
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4524
|
+
* defined
|
|
4525
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4526
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4527
|
+
* value
|
|
4528
|
+
*
|
|
4529
|
+
* By default, the input is not required.
|
|
4530
|
+
*/
|
|
4531
|
+
interface Required {
|
|
4532
|
+
/**
|
|
4533
|
+
* Whether the input is always required
|
|
4534
|
+
*/
|
|
4535
|
+
always?: boolean;
|
|
4536
|
+
/**
|
|
4537
|
+
* Makes this input required when another input has a specific value:
|
|
4538
|
+
*
|
|
4539
|
+
* - Key: name of the input to check
|
|
4540
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
4541
|
+
*/
|
|
4542
|
+
conditionalValues?: unknown;
|
|
4543
|
+
/**
|
|
4544
|
+
* Makes this input required when another input is defined:
|
|
4545
|
+
*
|
|
4546
|
+
* - Key: name of the input that must be defined
|
|
4547
|
+
* - Value: message to display when this input is required
|
|
4548
|
+
*/
|
|
4549
|
+
ifDefined?: unknown;
|
|
4550
|
+
/**
|
|
4551
|
+
* Makes this input required when another input is not defined:
|
|
4552
|
+
*
|
|
4553
|
+
* - Key: name of the input that must be undefined
|
|
4554
|
+
* - Value: message to display when this input is required
|
|
4555
|
+
*/
|
|
4556
|
+
ifNotDefined?: unknown;
|
|
4557
|
+
}
|
|
4558
|
+
}
|
|
2865
4559
|
/**
|
|
2866
4560
|
* The reference to another input or output of the same workflow. Must have at
|
|
2867
4561
|
* least one of node or conditional.
|
|
@@ -2991,7 +4685,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
2991
4685
|
/**
|
|
2992
4686
|
* The type of job
|
|
2993
4687
|
*/
|
|
2994
|
-
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
4688
|
+
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'musubi-model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
2995
4689
|
/**
|
|
2996
4690
|
* Metadata of the job with some additional information
|
|
2997
4691
|
*/
|
|
@@ -3035,18 +4729,36 @@ export declare namespace WorkflowRunResponse {
|
|
|
3035
4729
|
* List of produced assets for this job
|
|
3036
4730
|
*/
|
|
3037
4731
|
assetIds?: Array<string>;
|
|
4732
|
+
/**
|
|
4733
|
+
* Eventual error for the job
|
|
4734
|
+
*/
|
|
4735
|
+
error?: string | null;
|
|
3038
4736
|
/**
|
|
3039
4737
|
* The flow of the job. Only available for workflow jobs.
|
|
3040
4738
|
*/
|
|
3041
4739
|
flow?: Array<Metadata.Flow>;
|
|
4740
|
+
/**
|
|
4741
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
4742
|
+
*/
|
|
4743
|
+
hint?: string;
|
|
3042
4744
|
/**
|
|
3043
4745
|
* The inputs for the job
|
|
3044
4746
|
*/
|
|
3045
|
-
input?:
|
|
4747
|
+
input?: {
|
|
4748
|
+
[key: string]: unknown;
|
|
4749
|
+
};
|
|
3046
4750
|
/**
|
|
3047
|
-
*
|
|
4751
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
4752
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
4753
|
+
* results.
|
|
3048
4754
|
*/
|
|
3049
|
-
output?:
|
|
4755
|
+
output?: {
|
|
4756
|
+
[key: string]: unknown;
|
|
4757
|
+
};
|
|
4758
|
+
/**
|
|
4759
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
4760
|
+
*/
|
|
4761
|
+
outputModelId?: string;
|
|
3050
4762
|
/**
|
|
3051
4763
|
* The workflow ID of the job if job is part of a workflow.
|
|
3052
4764
|
*/
|
|
@@ -3069,20 +4781,45 @@ export declare namespace WorkflowRunResponse {
|
|
|
3069
4781
|
/**
|
|
3070
4782
|
* The type of the job for the node.
|
|
3071
4783
|
*/
|
|
3072
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
4784
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
3073
4785
|
/**
|
|
3074
4786
|
* List of produced assets for this node.
|
|
3075
4787
|
*/
|
|
3076
4788
|
assets?: Array<Flow.Asset>;
|
|
4789
|
+
/**
|
|
4790
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
4791
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
4792
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
4793
|
+
*/
|
|
4794
|
+
count?: number;
|
|
3077
4795
|
/**
|
|
3078
4796
|
* The nodes that this node depends on. Only available for nodes that have
|
|
3079
4797
|
* dependencies. Mainly used for user approval nodes.
|
|
3080
4798
|
*/
|
|
3081
4799
|
dependsOn?: Array<string>;
|
|
4800
|
+
/**
|
|
4801
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
4802
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
4803
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
4804
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
4805
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
4806
|
+
*/
|
|
4807
|
+
includeOutputsInWorkflowJob?: true;
|
|
3082
4808
|
/**
|
|
3083
4809
|
* The inputs of the node.
|
|
3084
4810
|
*/
|
|
3085
4811
|
inputs?: Array<Flow.Input>;
|
|
4812
|
+
/**
|
|
4813
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
4814
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
4815
|
+
* numbers, or asset IDs.
|
|
4816
|
+
*/
|
|
4817
|
+
items?: Array<string>;
|
|
4818
|
+
/**
|
|
4819
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
4820
|
+
* dynamically-created copies of loop body nodes.
|
|
4821
|
+
*/
|
|
4822
|
+
iterationIndex?: number;
|
|
3086
4823
|
/**
|
|
3087
4824
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
3088
4825
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -3097,10 +4834,25 @@ export declare namespace WorkflowRunResponse {
|
|
|
3097
4834
|
* The type of the logic for the node. Only available for logic nodes.
|
|
3098
4835
|
*/
|
|
3099
4836
|
logicType?: 'if-else';
|
|
4837
|
+
/**
|
|
4838
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
4839
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
4840
|
+
* for ForEach nodes.
|
|
4841
|
+
*/
|
|
4842
|
+
loopBodyNodeIds?: Array<string>;
|
|
4843
|
+
/**
|
|
4844
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
4845
|
+
* dynamically-created copies of loop body nodes.
|
|
4846
|
+
*/
|
|
4847
|
+
loopNodeId?: string;
|
|
3100
4848
|
/**
|
|
3101
4849
|
* The model id for the node. Mainly used for custom model tasks.
|
|
3102
4850
|
*/
|
|
3103
4851
|
modelId?: string;
|
|
4852
|
+
/**
|
|
4853
|
+
* The output of the node. Only available for logic nodes.
|
|
4854
|
+
*/
|
|
4855
|
+
output?: unknown;
|
|
3104
4856
|
/**
|
|
3105
4857
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
3106
4858
|
*/
|
|
@@ -3142,6 +4894,10 @@ export declare namespace WorkflowRunResponse {
|
|
|
3142
4894
|
* Whether this input affects the model's cost calculation
|
|
3143
4895
|
*/
|
|
3144
4896
|
costImpact?: boolean;
|
|
4897
|
+
/**
|
|
4898
|
+
* The default value for the input
|
|
4899
|
+
*/
|
|
4900
|
+
default?: unknown;
|
|
3145
4901
|
/**
|
|
3146
4902
|
* Help text displayed in the UI to provide additional information about the input
|
|
3147
4903
|
*/
|
|
@@ -3160,10 +4916,20 @@ export declare namespace WorkflowRunResponse {
|
|
|
3160
4916
|
* the same as the current object. This is only available for type inputs_array
|
|
3161
4917
|
* inputs.
|
|
3162
4918
|
*/
|
|
3163
|
-
inputs?: Array<
|
|
4919
|
+
inputs?: Array<{
|
|
4920
|
+
[key: string]: unknown;
|
|
4921
|
+
}>;
|
|
4922
|
+
/**
|
|
4923
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
4924
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
4925
|
+
* type.
|
|
4926
|
+
*/
|
|
4927
|
+
items?: Array<Array<Input.Item>>;
|
|
3164
4928
|
/**
|
|
3165
4929
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3166
|
-
* \`file_array\` input types.
|
|
4930
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4931
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
4932
|
+
* data:kind, prefix
|
|
3167
4933
|
*/
|
|
3168
4934
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3169
4935
|
/**
|
|
@@ -3184,6 +4950,12 @@ export declare namespace WorkflowRunResponse {
|
|
|
3184
4950
|
* \`string_array\`.
|
|
3185
4951
|
*/
|
|
3186
4952
|
maxLength?: number;
|
|
4953
|
+
/**
|
|
4954
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
4955
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
4956
|
+
* creation time.
|
|
4957
|
+
*/
|
|
4958
|
+
maxSize?: number;
|
|
3187
4959
|
/**
|
|
3188
4960
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3189
4961
|
*/
|
|
@@ -3197,7 +4969,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
3197
4969
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3198
4970
|
* available for \`model_array\` input type.
|
|
3199
4971
|
*/
|
|
3200
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
4972
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3201
4973
|
/**
|
|
3202
4974
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3203
4975
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -3241,8 +5013,232 @@ export declare namespace WorkflowRunResponse {
|
|
|
3241
5013
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3242
5014
|
*/
|
|
3243
5015
|
step?: number;
|
|
5016
|
+
/**
|
|
5017
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
5018
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
5019
|
+
*/
|
|
5020
|
+
value?: unknown;
|
|
3244
5021
|
}
|
|
3245
5022
|
namespace Input {
|
|
5023
|
+
/**
|
|
5024
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
5025
|
+
* recursive items field.
|
|
5026
|
+
*/
|
|
5027
|
+
interface Item {
|
|
5028
|
+
/**
|
|
5029
|
+
* The name that must be user to call the model through the API
|
|
5030
|
+
*/
|
|
5031
|
+
name: string;
|
|
5032
|
+
/**
|
|
5033
|
+
* The data type of the input
|
|
5034
|
+
*/
|
|
5035
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
5036
|
+
/**
|
|
5037
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
5038
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
5039
|
+
* dropdown.
|
|
5040
|
+
*/
|
|
5041
|
+
allowedValues?: Array<unknown>;
|
|
5042
|
+
/**
|
|
5043
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
5044
|
+
* \`file_array\` input types with kind \`image\`.
|
|
5045
|
+
*/
|
|
5046
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
5047
|
+
/**
|
|
5048
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
5049
|
+
*/
|
|
5050
|
+
color?: boolean;
|
|
5051
|
+
/**
|
|
5052
|
+
* Whether this input affects the model's cost calculation
|
|
5053
|
+
*/
|
|
5054
|
+
costImpact?: boolean;
|
|
5055
|
+
/**
|
|
5056
|
+
* The default value for the input
|
|
5057
|
+
*/
|
|
5058
|
+
default?: unknown;
|
|
5059
|
+
/**
|
|
5060
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
5061
|
+
*/
|
|
5062
|
+
description?: string;
|
|
5063
|
+
/**
|
|
5064
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
5065
|
+
* value appear consecutively in the UI.
|
|
5066
|
+
*/
|
|
5067
|
+
group?: string;
|
|
5068
|
+
/**
|
|
5069
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
5070
|
+
*/
|
|
5071
|
+
hint?: string;
|
|
5072
|
+
/**
|
|
5073
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
5074
|
+
* the same as the current object. This is only available for type inputs_array
|
|
5075
|
+
* inputs.
|
|
5076
|
+
*/
|
|
5077
|
+
inputs?: Array<{
|
|
5078
|
+
[key: string]: unknown;
|
|
5079
|
+
}>;
|
|
5080
|
+
/**
|
|
5081
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
5082
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
5083
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
5084
|
+
* data:kind, prefix
|
|
5085
|
+
*/
|
|
5086
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
5087
|
+
/**
|
|
5088
|
+
* The label displayed in the UI for this input
|
|
5089
|
+
*/
|
|
5090
|
+
label?: string;
|
|
5091
|
+
/**
|
|
5092
|
+
* The name of the file input field to use as the mask source
|
|
5093
|
+
*/
|
|
5094
|
+
maskFrom?: string;
|
|
5095
|
+
/**
|
|
5096
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
5097
|
+
* types.
|
|
5098
|
+
*/
|
|
5099
|
+
max?: number;
|
|
5100
|
+
/**
|
|
5101
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5102
|
+
* \`string_array\`.
|
|
5103
|
+
*/
|
|
5104
|
+
maxLength?: number;
|
|
5105
|
+
/**
|
|
5106
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
5107
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5108
|
+
* creation time.
|
|
5109
|
+
*/
|
|
5110
|
+
maxSize?: number;
|
|
5111
|
+
/**
|
|
5112
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
5113
|
+
*/
|
|
5114
|
+
min?: number;
|
|
5115
|
+
/**
|
|
5116
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
5117
|
+
* \`string_array\`.
|
|
5118
|
+
*/
|
|
5119
|
+
minLength?: number;
|
|
5120
|
+
/**
|
|
5121
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
5122
|
+
* available for \`model_array\` input type.
|
|
5123
|
+
*/
|
|
5124
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
5125
|
+
/**
|
|
5126
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
5127
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
5128
|
+
*
|
|
5129
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
5130
|
+
*/
|
|
5131
|
+
parent?: boolean;
|
|
5132
|
+
/**
|
|
5133
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
5134
|
+
*/
|
|
5135
|
+
placeholder?: string;
|
|
5136
|
+
/**
|
|
5137
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
5138
|
+
* spark feature. Only available for \`string\` input type.
|
|
5139
|
+
*/
|
|
5140
|
+
prompt?: boolean;
|
|
5141
|
+
/**
|
|
5142
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
5143
|
+
* type.
|
|
5144
|
+
*/
|
|
5145
|
+
promptSpark?: boolean;
|
|
5146
|
+
/**
|
|
5147
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
5148
|
+
* least one of node or conditional.
|
|
5149
|
+
*/
|
|
5150
|
+
ref?: Item.Ref;
|
|
5151
|
+
/**
|
|
5152
|
+
* Set of rules that describes when this input is required:
|
|
5153
|
+
*
|
|
5154
|
+
* - \`always\`: Input is always required
|
|
5155
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5156
|
+
* defined
|
|
5157
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5158
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5159
|
+
* value
|
|
5160
|
+
*
|
|
5161
|
+
* By default, the input is not required.
|
|
5162
|
+
*/
|
|
5163
|
+
required?: Item.Required;
|
|
5164
|
+
/**
|
|
5165
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
5166
|
+
*/
|
|
5167
|
+
step?: number;
|
|
5168
|
+
/**
|
|
5169
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
5170
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
5171
|
+
*/
|
|
5172
|
+
value?: unknown;
|
|
5173
|
+
}
|
|
5174
|
+
namespace Item {
|
|
5175
|
+
/**
|
|
5176
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
5177
|
+
* least one of node or conditional.
|
|
5178
|
+
*/
|
|
5179
|
+
interface Ref {
|
|
5180
|
+
/**
|
|
5181
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5182
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5183
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5184
|
+
*/
|
|
5185
|
+
conditional?: Array<string>;
|
|
5186
|
+
/**
|
|
5187
|
+
* This is the desired node output value if ref is an if/else node.
|
|
5188
|
+
*/
|
|
5189
|
+
equal?: string;
|
|
5190
|
+
/**
|
|
5191
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5192
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5193
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5194
|
+
* all outputs of a node, you can use the name 'all'.
|
|
5195
|
+
*/
|
|
5196
|
+
name?: string;
|
|
5197
|
+
/**
|
|
5198
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
5199
|
+
*/
|
|
5200
|
+
node?: string;
|
|
5201
|
+
}
|
|
5202
|
+
/**
|
|
5203
|
+
* Set of rules that describes when this input is required:
|
|
5204
|
+
*
|
|
5205
|
+
* - \`always\`: Input is always required
|
|
5206
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5207
|
+
* defined
|
|
5208
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5209
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5210
|
+
* value
|
|
5211
|
+
*
|
|
5212
|
+
* By default, the input is not required.
|
|
5213
|
+
*/
|
|
5214
|
+
interface Required {
|
|
5215
|
+
/**
|
|
5216
|
+
* Whether the input is always required
|
|
5217
|
+
*/
|
|
5218
|
+
always?: boolean;
|
|
5219
|
+
/**
|
|
5220
|
+
* Makes this input required when another input has a specific value:
|
|
5221
|
+
*
|
|
5222
|
+
* - Key: name of the input to check
|
|
5223
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
5224
|
+
*/
|
|
5225
|
+
conditionalValues?: unknown;
|
|
5226
|
+
/**
|
|
5227
|
+
* Makes this input required when another input is defined:
|
|
5228
|
+
*
|
|
5229
|
+
* - Key: name of the input that must be defined
|
|
5230
|
+
* - Value: message to display when this input is required
|
|
5231
|
+
*/
|
|
5232
|
+
ifDefined?: unknown;
|
|
5233
|
+
/**
|
|
5234
|
+
* Makes this input required when another input is not defined:
|
|
5235
|
+
*
|
|
5236
|
+
* - Key: name of the input that must be undefined
|
|
5237
|
+
* - Value: message to display when this input is required
|
|
5238
|
+
*/
|
|
5239
|
+
ifNotDefined?: unknown;
|
|
5240
|
+
}
|
|
5241
|
+
}
|
|
3246
5242
|
/**
|
|
3247
5243
|
* The reference to another input or output of the same workflow. Must have at
|
|
3248
5244
|
* least one of node or conditional.
|
|
@@ -3349,20 +5345,28 @@ export declare namespace WorkflowRunResponse {
|
|
|
3349
5345
|
}
|
|
3350
5346
|
}
|
|
3351
5347
|
interface Workflow {
|
|
5348
|
+
/**
|
|
5349
|
+
* Unique identifier of the workflow.
|
|
5350
|
+
*/
|
|
3352
5351
|
id: string;
|
|
5352
|
+
/**
|
|
5353
|
+
* User that created the workflow.
|
|
5354
|
+
*/
|
|
3353
5355
|
authorId: string;
|
|
3354
5356
|
/**
|
|
3355
5357
|
* ISO string
|
|
3356
5358
|
*/
|
|
3357
5359
|
createdAt: string;
|
|
3358
5360
|
/**
|
|
3359
|
-
*
|
|
5361
|
+
* Full description of what the workflow does.
|
|
3360
5362
|
*/
|
|
3361
5363
|
description: string;
|
|
3362
5364
|
/**
|
|
3363
5365
|
* The UI data about the workflow. This is managed by scenario webapp.
|
|
3364
5366
|
*/
|
|
3365
|
-
editorInfo:
|
|
5367
|
+
editorInfo: {
|
|
5368
|
+
[key: string]: unknown;
|
|
5369
|
+
};
|
|
3366
5370
|
/**
|
|
3367
5371
|
* The flow of the workflow.
|
|
3368
5372
|
*/
|
|
@@ -3371,9 +5375,25 @@ export declare namespace WorkflowRunResponse {
|
|
|
3371
5375
|
* The inputs of the workflow.
|
|
3372
5376
|
*/
|
|
3373
5377
|
inputs: Array<Workflow.Input>;
|
|
5378
|
+
/**
|
|
5379
|
+
* Human-readable name of the workflow.
|
|
5380
|
+
*/
|
|
3374
5381
|
name: string;
|
|
5382
|
+
/**
|
|
5383
|
+
* Project that owns the workflow.
|
|
5384
|
+
*/
|
|
3375
5385
|
ownerId: string;
|
|
5386
|
+
/**
|
|
5387
|
+
* Visibility setting for the workflow.
|
|
5388
|
+
*/
|
|
3376
5389
|
privacy: 'private' | 'public' | 'unlisted';
|
|
5390
|
+
/**
|
|
5391
|
+
* Short summary of the workflow.
|
|
5392
|
+
*/
|
|
5393
|
+
shortDescription: string;
|
|
5394
|
+
/**
|
|
5395
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
5396
|
+
*/
|
|
3377
5397
|
status: 'deleted' | 'draft' | 'ready';
|
|
3378
5398
|
/**
|
|
3379
5399
|
* The tag set of the workflow.
|
|
@@ -3391,8 +5411,38 @@ export declare namespace WorkflowRunResponse {
|
|
|
3391
5411
|
* A representation of an asset before being processed by the workflow
|
|
3392
5412
|
*/
|
|
3393
5413
|
before?: Workflow.Before;
|
|
5414
|
+
/**
|
|
5415
|
+
* Embedding is a map of embedding version into embedding date
|
|
5416
|
+
*/
|
|
5417
|
+
embedding?: unknown;
|
|
5418
|
+
/**
|
|
5419
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
5420
|
+
* except by the author or a project admin.
|
|
5421
|
+
*/
|
|
5422
|
+
isLocked?: boolean;
|
|
5423
|
+
lastIndexedAt?: string;
|
|
5424
|
+
/**
|
|
5425
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
5426
|
+
*/
|
|
5427
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
5428
|
+
/**
|
|
5429
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
5430
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
5431
|
+
* in the Ready state.
|
|
5432
|
+
*/
|
|
5433
|
+
lastReadyFlowUpdatedAt?: string;
|
|
5434
|
+
/**
|
|
5435
|
+
* ISO string timestamp when lock state was last changed.
|
|
5436
|
+
*/
|
|
5437
|
+
lockedStateChangedAt?: string;
|
|
5438
|
+
/**
|
|
5439
|
+
* UserId of the user who last changed the lock state.
|
|
5440
|
+
*/
|
|
5441
|
+
lockedStateChangedBy?: string;
|
|
5442
|
+
/**
|
|
5443
|
+
* Asset kinds produced by this workflow (if specified).
|
|
5444
|
+
*/
|
|
3394
5445
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
3395
|
-
shortDescription?: string;
|
|
3396
5446
|
/**
|
|
3397
5447
|
* Currently the thumbnail is identical to the after asset.
|
|
3398
5448
|
*/
|
|
@@ -3411,16 +5461,41 @@ export declare namespace WorkflowRunResponse {
|
|
|
3411
5461
|
/**
|
|
3412
5462
|
* The type of the job for the node.
|
|
3413
5463
|
*/
|
|
3414
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
5464
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
5465
|
+
/**
|
|
5466
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
5467
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
5468
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
5469
|
+
*/
|
|
5470
|
+
count?: number;
|
|
3415
5471
|
/**
|
|
3416
5472
|
* The nodes that this node depends on. Only available for nodes that have
|
|
3417
5473
|
* dependencies. Mainly used for user approval nodes.
|
|
3418
5474
|
*/
|
|
3419
5475
|
dependsOn?: Array<string>;
|
|
5476
|
+
/**
|
|
5477
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
5478
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
5479
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
5480
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
5481
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
5482
|
+
*/
|
|
5483
|
+
includeOutputsInWorkflowJob?: true;
|
|
3420
5484
|
/**
|
|
3421
5485
|
* The inputs of the node.
|
|
3422
5486
|
*/
|
|
3423
5487
|
inputs?: Array<Flow.Input>;
|
|
5488
|
+
/**
|
|
5489
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
5490
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
5491
|
+
* numbers, or asset IDs.
|
|
5492
|
+
*/
|
|
5493
|
+
items?: Array<string>;
|
|
5494
|
+
/**
|
|
5495
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
5496
|
+
* dynamically-created copies of loop body nodes.
|
|
5497
|
+
*/
|
|
5498
|
+
iterationIndex?: number;
|
|
3424
5499
|
/**
|
|
3425
5500
|
* The logic of the node. Only available for logic nodes.
|
|
3426
5501
|
*/
|
|
@@ -3429,6 +5504,17 @@ export declare namespace WorkflowRunResponse {
|
|
|
3429
5504
|
* The type of the logic for the node. Only available for logic nodes.
|
|
3430
5505
|
*/
|
|
3431
5506
|
logicType?: 'if-else';
|
|
5507
|
+
/**
|
|
5508
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
5509
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
5510
|
+
* for ForEach nodes.
|
|
5511
|
+
*/
|
|
5512
|
+
loopBodyNodeIds?: Array<string>;
|
|
5513
|
+
/**
|
|
5514
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
5515
|
+
* dynamically-created copies of loop body nodes.
|
|
5516
|
+
*/
|
|
5517
|
+
loopNodeId?: string;
|
|
3432
5518
|
/**
|
|
3433
5519
|
* The model id for the node. Mainly used for custom model tasks.
|
|
3434
5520
|
*/
|
|
@@ -3470,6 +5556,10 @@ export declare namespace WorkflowRunResponse {
|
|
|
3470
5556
|
* Whether this input affects the model's cost calculation
|
|
3471
5557
|
*/
|
|
3472
5558
|
costImpact?: boolean;
|
|
5559
|
+
/**
|
|
5560
|
+
* The default value for the input
|
|
5561
|
+
*/
|
|
5562
|
+
default?: unknown;
|
|
3473
5563
|
/**
|
|
3474
5564
|
* Help text displayed in the UI to provide additional information about the input
|
|
3475
5565
|
*/
|
|
@@ -3488,10 +5578,20 @@ export declare namespace WorkflowRunResponse {
|
|
|
3488
5578
|
* the same as the current object. This is only available for type inputs_array
|
|
3489
5579
|
* inputs.
|
|
3490
5580
|
*/
|
|
3491
|
-
inputs?: Array<
|
|
5581
|
+
inputs?: Array<{
|
|
5582
|
+
[key: string]: unknown;
|
|
5583
|
+
}>;
|
|
5584
|
+
/**
|
|
5585
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
5586
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
5587
|
+
* type.
|
|
5588
|
+
*/
|
|
5589
|
+
items?: Array<Array<Input.Item>>;
|
|
3492
5590
|
/**
|
|
3493
5591
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3494
|
-
* \`file_array\` input types.
|
|
5592
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
5593
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
5594
|
+
* data:kind, prefix
|
|
3495
5595
|
*/
|
|
3496
5596
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3497
5597
|
/**
|
|
@@ -3512,6 +5612,12 @@ export declare namespace WorkflowRunResponse {
|
|
|
3512
5612
|
* \`string_array\`.
|
|
3513
5613
|
*/
|
|
3514
5614
|
maxLength?: number;
|
|
5615
|
+
/**
|
|
5616
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
5617
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5618
|
+
* creation time.
|
|
5619
|
+
*/
|
|
5620
|
+
maxSize?: number;
|
|
3515
5621
|
/**
|
|
3516
5622
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3517
5623
|
*/
|
|
@@ -3525,7 +5631,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
3525
5631
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3526
5632
|
* available for \`model_array\` input type.
|
|
3527
5633
|
*/
|
|
3528
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
5634
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3529
5635
|
/**
|
|
3530
5636
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3531
5637
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -3569,8 +5675,232 @@ export declare namespace WorkflowRunResponse {
|
|
|
3569
5675
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
3570
5676
|
*/
|
|
3571
5677
|
step?: number;
|
|
5678
|
+
/**
|
|
5679
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
5680
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
5681
|
+
*/
|
|
5682
|
+
value?: unknown;
|
|
3572
5683
|
}
|
|
3573
5684
|
namespace Input {
|
|
5685
|
+
/**
|
|
5686
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
5687
|
+
* recursive items field.
|
|
5688
|
+
*/
|
|
5689
|
+
interface Item {
|
|
5690
|
+
/**
|
|
5691
|
+
* The name that must be user to call the model through the API
|
|
5692
|
+
*/
|
|
5693
|
+
name: string;
|
|
5694
|
+
/**
|
|
5695
|
+
* The data type of the input
|
|
5696
|
+
*/
|
|
5697
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
5698
|
+
/**
|
|
5699
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
5700
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
5701
|
+
* dropdown.
|
|
5702
|
+
*/
|
|
5703
|
+
allowedValues?: Array<unknown>;
|
|
5704
|
+
/**
|
|
5705
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
5706
|
+
* \`file_array\` input types with kind \`image\`.
|
|
5707
|
+
*/
|
|
5708
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
5709
|
+
/**
|
|
5710
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
5711
|
+
*/
|
|
5712
|
+
color?: boolean;
|
|
5713
|
+
/**
|
|
5714
|
+
* Whether this input affects the model's cost calculation
|
|
5715
|
+
*/
|
|
5716
|
+
costImpact?: boolean;
|
|
5717
|
+
/**
|
|
5718
|
+
* The default value for the input
|
|
5719
|
+
*/
|
|
5720
|
+
default?: unknown;
|
|
5721
|
+
/**
|
|
5722
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
5723
|
+
*/
|
|
5724
|
+
description?: string;
|
|
5725
|
+
/**
|
|
5726
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
5727
|
+
* value appear consecutively in the UI.
|
|
5728
|
+
*/
|
|
5729
|
+
group?: string;
|
|
5730
|
+
/**
|
|
5731
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
5732
|
+
*/
|
|
5733
|
+
hint?: string;
|
|
5734
|
+
/**
|
|
5735
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
5736
|
+
* the same as the current object. This is only available for type inputs_array
|
|
5737
|
+
* inputs.
|
|
5738
|
+
*/
|
|
5739
|
+
inputs?: Array<{
|
|
5740
|
+
[key: string]: unknown;
|
|
5741
|
+
}>;
|
|
5742
|
+
/**
|
|
5743
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
5744
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
5745
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
5746
|
+
* data:kind, prefix
|
|
5747
|
+
*/
|
|
5748
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
5749
|
+
/**
|
|
5750
|
+
* The label displayed in the UI for this input
|
|
5751
|
+
*/
|
|
5752
|
+
label?: string;
|
|
5753
|
+
/**
|
|
5754
|
+
* The name of the file input field to use as the mask source
|
|
5755
|
+
*/
|
|
5756
|
+
maskFrom?: string;
|
|
5757
|
+
/**
|
|
5758
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
5759
|
+
* types.
|
|
5760
|
+
*/
|
|
5761
|
+
max?: number;
|
|
5762
|
+
/**
|
|
5763
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5764
|
+
* \`string_array\`.
|
|
5765
|
+
*/
|
|
5766
|
+
maxLength?: number;
|
|
5767
|
+
/**
|
|
5768
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
5769
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5770
|
+
* creation time.
|
|
5771
|
+
*/
|
|
5772
|
+
maxSize?: number;
|
|
5773
|
+
/**
|
|
5774
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
5775
|
+
*/
|
|
5776
|
+
min?: number;
|
|
5777
|
+
/**
|
|
5778
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
5779
|
+
* \`string_array\`.
|
|
5780
|
+
*/
|
|
5781
|
+
minLength?: number;
|
|
5782
|
+
/**
|
|
5783
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
5784
|
+
* available for \`model_array\` input type.
|
|
5785
|
+
*/
|
|
5786
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
5787
|
+
/**
|
|
5788
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
5789
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
5790
|
+
*
|
|
5791
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
5792
|
+
*/
|
|
5793
|
+
parent?: boolean;
|
|
5794
|
+
/**
|
|
5795
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
5796
|
+
*/
|
|
5797
|
+
placeholder?: string;
|
|
5798
|
+
/**
|
|
5799
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
5800
|
+
* spark feature. Only available for \`string\` input type.
|
|
5801
|
+
*/
|
|
5802
|
+
prompt?: boolean;
|
|
5803
|
+
/**
|
|
5804
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
5805
|
+
* type.
|
|
5806
|
+
*/
|
|
5807
|
+
promptSpark?: boolean;
|
|
5808
|
+
/**
|
|
5809
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
5810
|
+
* least one of node or conditional.
|
|
5811
|
+
*/
|
|
5812
|
+
ref?: Item.Ref;
|
|
5813
|
+
/**
|
|
5814
|
+
* Set of rules that describes when this input is required:
|
|
5815
|
+
*
|
|
5816
|
+
* - \`always\`: Input is always required
|
|
5817
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5818
|
+
* defined
|
|
5819
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5820
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5821
|
+
* value
|
|
5822
|
+
*
|
|
5823
|
+
* By default, the input is not required.
|
|
5824
|
+
*/
|
|
5825
|
+
required?: Item.Required;
|
|
5826
|
+
/**
|
|
5827
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
5828
|
+
*/
|
|
5829
|
+
step?: number;
|
|
5830
|
+
/**
|
|
5831
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
5832
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
5833
|
+
*/
|
|
5834
|
+
value?: unknown;
|
|
5835
|
+
}
|
|
5836
|
+
namespace Item {
|
|
5837
|
+
/**
|
|
5838
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
5839
|
+
* least one of node or conditional.
|
|
5840
|
+
*/
|
|
5841
|
+
interface Ref {
|
|
5842
|
+
/**
|
|
5843
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5844
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5845
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5846
|
+
*/
|
|
5847
|
+
conditional?: Array<string>;
|
|
5848
|
+
/**
|
|
5849
|
+
* This is the desired node output value if ref is an if/else node.
|
|
5850
|
+
*/
|
|
5851
|
+
equal?: string;
|
|
5852
|
+
/**
|
|
5853
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5854
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5855
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5856
|
+
* all outputs of a node, you can use the name 'all'.
|
|
5857
|
+
*/
|
|
5858
|
+
name?: string;
|
|
5859
|
+
/**
|
|
5860
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
5861
|
+
*/
|
|
5862
|
+
node?: string;
|
|
5863
|
+
}
|
|
5864
|
+
/**
|
|
5865
|
+
* Set of rules that describes when this input is required:
|
|
5866
|
+
*
|
|
5867
|
+
* - \`always\`: Input is always required
|
|
5868
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5869
|
+
* defined
|
|
5870
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5871
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5872
|
+
* value
|
|
5873
|
+
*
|
|
5874
|
+
* By default, the input is not required.
|
|
5875
|
+
*/
|
|
5876
|
+
interface Required {
|
|
5877
|
+
/**
|
|
5878
|
+
* Whether the input is always required
|
|
5879
|
+
*/
|
|
5880
|
+
always?: boolean;
|
|
5881
|
+
/**
|
|
5882
|
+
* Makes this input required when another input has a specific value:
|
|
5883
|
+
*
|
|
5884
|
+
* - Key: name of the input to check
|
|
5885
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
5886
|
+
*/
|
|
5887
|
+
conditionalValues?: unknown;
|
|
5888
|
+
/**
|
|
5889
|
+
* Makes this input required when another input is defined:
|
|
5890
|
+
*
|
|
5891
|
+
* - Key: name of the input that must be defined
|
|
5892
|
+
* - Value: message to display when this input is required
|
|
5893
|
+
*/
|
|
5894
|
+
ifDefined?: unknown;
|
|
5895
|
+
/**
|
|
5896
|
+
* Makes this input required when another input is not defined:
|
|
5897
|
+
*
|
|
5898
|
+
* - Key: name of the input that must be undefined
|
|
5899
|
+
* - Value: message to display when this input is required
|
|
5900
|
+
*/
|
|
5901
|
+
ifNotDefined?: unknown;
|
|
5902
|
+
}
|
|
5903
|
+
}
|
|
3574
5904
|
/**
|
|
3575
5905
|
* The reference to another input or output of the same workflow. Must have at
|
|
3576
5906
|
* least one of node or conditional.
|
|
@@ -3697,6 +6027,10 @@ export declare namespace WorkflowRunResponse {
|
|
|
3697
6027
|
* Whether this input affects the model's cost calculation
|
|
3698
6028
|
*/
|
|
3699
6029
|
costImpact?: boolean;
|
|
6030
|
+
/**
|
|
6031
|
+
* The default value for the input
|
|
6032
|
+
*/
|
|
6033
|
+
default?: unknown;
|
|
3700
6034
|
/**
|
|
3701
6035
|
* Help text displayed in the UI to provide additional information about the input
|
|
3702
6036
|
*/
|
|
@@ -3715,10 +6049,14 @@ export declare namespace WorkflowRunResponse {
|
|
|
3715
6049
|
* the same as the current object. This is only available for type inputs_array
|
|
3716
6050
|
* inputs.
|
|
3717
6051
|
*/
|
|
3718
|
-
inputs?: Array<
|
|
6052
|
+
inputs?: Array<{
|
|
6053
|
+
[key: string]: unknown;
|
|
6054
|
+
}>;
|
|
3719
6055
|
/**
|
|
3720
6056
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
3721
|
-
* \`file_array\` input types.
|
|
6057
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6058
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
6059
|
+
* data:kind, prefix
|
|
3722
6060
|
*/
|
|
3723
6061
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
3724
6062
|
/**
|
|
@@ -3739,6 +6077,12 @@ export declare namespace WorkflowRunResponse {
|
|
|
3739
6077
|
* \`string_array\`.
|
|
3740
6078
|
*/
|
|
3741
6079
|
maxLength?: number;
|
|
6080
|
+
/**
|
|
6081
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
6082
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
6083
|
+
* creation time.
|
|
6084
|
+
*/
|
|
6085
|
+
maxSize?: number;
|
|
3742
6086
|
/**
|
|
3743
6087
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
3744
6088
|
*/
|
|
@@ -3752,7 +6096,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
3752
6096
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
3753
6097
|
* available for \`model_array\` input type.
|
|
3754
6098
|
*/
|
|
3755
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
6099
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
3756
6100
|
/**
|
|
3757
6101
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
3758
6102
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -3994,6 +6338,11 @@ export interface WorkflowUpdateParams {
|
|
|
3994
6338
|
* The before asset of the workflow. Set to null to unset the before asset.
|
|
3995
6339
|
*/
|
|
3996
6340
|
before?: string;
|
|
6341
|
+
/**
|
|
6342
|
+
* Set to true to bypass the lock and save a locked workflow without unlocking it
|
|
6343
|
+
* first. Only the author or a project admin can use this.
|
|
6344
|
+
*/
|
|
6345
|
+
bypassLock?: boolean;
|
|
3997
6346
|
/**
|
|
3998
6347
|
* The description of the workflow.
|
|
3999
6348
|
*/
|
|
@@ -4001,7 +6350,9 @@ export interface WorkflowUpdateParams {
|
|
|
4001
6350
|
/**
|
|
4002
6351
|
* The UI data about the workflow. This is managed by scenario webapp.
|
|
4003
6352
|
*/
|
|
4004
|
-
editorInfo?:
|
|
6353
|
+
editorInfo?: {
|
|
6354
|
+
[key: string]: unknown;
|
|
6355
|
+
};
|
|
4005
6356
|
/**
|
|
4006
6357
|
* The flow of the workflow.
|
|
4007
6358
|
*/
|
|
@@ -4010,6 +6361,11 @@ export interface WorkflowUpdateParams {
|
|
|
4010
6361
|
* The inputs of the workflow.
|
|
4011
6362
|
*/
|
|
4012
6363
|
inputs?: Array<WorkflowUpdateParams.Input>;
|
|
6364
|
+
/**
|
|
6365
|
+
* Set to true to lock the workflow, false to unlock. Only the author or a project
|
|
6366
|
+
* admin can change this.
|
|
6367
|
+
*/
|
|
6368
|
+
isLocked?: boolean;
|
|
4013
6369
|
/**
|
|
4014
6370
|
* The name of the workflow.
|
|
4015
6371
|
*/
|
|
@@ -4022,6 +6378,12 @@ export interface WorkflowUpdateParams {
|
|
|
4022
6378
|
* The privacy of the workflow.
|
|
4023
6379
|
*/
|
|
4024
6380
|
privacy?: 'private' | 'public' | 'unlisted';
|
|
6381
|
+
/**
|
|
6382
|
+
* A short description of the workflow.
|
|
6383
|
+
*
|
|
6384
|
+
* Used for display in the App UI.
|
|
6385
|
+
*/
|
|
6386
|
+
shortDescription?: string;
|
|
4025
6387
|
/**
|
|
4026
6388
|
* The status of the workflow.
|
|
4027
6389
|
*/
|
|
@@ -4042,28 +6404,43 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4042
6404
|
*/
|
|
4043
6405
|
id: string;
|
|
4044
6406
|
/**
|
|
4045
|
-
* The
|
|
6407
|
+
* The type of the job for the node.
|
|
4046
6408
|
*/
|
|
4047
|
-
|
|
6409
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
4048
6410
|
/**
|
|
4049
|
-
*
|
|
6411
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
6412
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
6413
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
4050
6414
|
*/
|
|
4051
|
-
|
|
6415
|
+
count?: number;
|
|
4052
6416
|
/**
|
|
4053
6417
|
* The nodes that this node depends on. Only available for nodes that have
|
|
4054
6418
|
* dependencies. Mainly used for user approval nodes.
|
|
4055
6419
|
*/
|
|
4056
6420
|
dependsOn?: Array<string>;
|
|
6421
|
+
/**
|
|
6422
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
6423
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
6424
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
6425
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
6426
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
6427
|
+
*/
|
|
6428
|
+
includeOutputsInWorkflowJob?: true;
|
|
4057
6429
|
/**
|
|
4058
6430
|
* The inputs of the node.
|
|
4059
6431
|
*/
|
|
4060
6432
|
inputs?: Array<Flow.Input>;
|
|
4061
6433
|
/**
|
|
4062
|
-
*
|
|
4063
|
-
*
|
|
4064
|
-
*
|
|
6434
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
6435
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
6436
|
+
* numbers, or asset IDs.
|
|
6437
|
+
*/
|
|
6438
|
+
items?: Array<string>;
|
|
6439
|
+
/**
|
|
6440
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
6441
|
+
* dynamically-created copies of loop body nodes.
|
|
4065
6442
|
*/
|
|
4066
|
-
|
|
6443
|
+
iterationIndex?: number;
|
|
4067
6444
|
/**
|
|
4068
6445
|
* The logic of the node. Only available for logic nodes.
|
|
4069
6446
|
*/
|
|
@@ -4073,13 +6450,20 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4073
6450
|
*/
|
|
4074
6451
|
logicType?: 'if-else';
|
|
4075
6452
|
/**
|
|
4076
|
-
*
|
|
6453
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
6454
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
6455
|
+
* for ForEach nodes.
|
|
4077
6456
|
*/
|
|
4078
|
-
|
|
6457
|
+
loopBodyNodeIds?: Array<string>;
|
|
6458
|
+
/**
|
|
6459
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
6460
|
+
* dynamically-created copies of loop body nodes.
|
|
6461
|
+
*/
|
|
6462
|
+
loopNodeId?: string;
|
|
4079
6463
|
/**
|
|
4080
|
-
* The
|
|
6464
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
4081
6465
|
*/
|
|
4082
|
-
|
|
6466
|
+
modelId?: string;
|
|
4083
6467
|
/**
|
|
4084
6468
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
4085
6469
|
*/
|
|
@@ -4117,6 +6501,10 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4117
6501
|
* Whether this input affects the model's cost calculation
|
|
4118
6502
|
*/
|
|
4119
6503
|
costImpact?: boolean;
|
|
6504
|
+
/**
|
|
6505
|
+
* The default value for the input
|
|
6506
|
+
*/
|
|
6507
|
+
default?: unknown;
|
|
4120
6508
|
/**
|
|
4121
6509
|
* Help text displayed in the UI to provide additional information about the input
|
|
4122
6510
|
*/
|
|
@@ -4135,10 +6523,20 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4135
6523
|
* the same as the current object. This is only available for type inputs_array
|
|
4136
6524
|
* inputs.
|
|
4137
6525
|
*/
|
|
4138
|
-
inputs?: Array<
|
|
6526
|
+
inputs?: Array<{
|
|
6527
|
+
[key: string]: unknown;
|
|
6528
|
+
}>;
|
|
6529
|
+
/**
|
|
6530
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
6531
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
6532
|
+
* type.
|
|
6533
|
+
*/
|
|
6534
|
+
items?: Array<Array<Input.Item>>;
|
|
4139
6535
|
/**
|
|
4140
6536
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4141
|
-
* \`file_array\` input types.
|
|
6537
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6538
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
6539
|
+
* data:kind, prefix
|
|
4142
6540
|
*/
|
|
4143
6541
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
4144
6542
|
/**
|
|
@@ -4159,6 +6557,12 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4159
6557
|
* \`string_array\`.
|
|
4160
6558
|
*/
|
|
4161
6559
|
maxLength?: number;
|
|
6560
|
+
/**
|
|
6561
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
6562
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
6563
|
+
* creation time.
|
|
6564
|
+
*/
|
|
6565
|
+
maxSize?: number;
|
|
4162
6566
|
/**
|
|
4163
6567
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
4164
6568
|
*/
|
|
@@ -4172,7 +6576,7 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4172
6576
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
4173
6577
|
* available for \`model_array\` input type.
|
|
4174
6578
|
*/
|
|
4175
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
6579
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
4176
6580
|
/**
|
|
4177
6581
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
4178
6582
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -4216,8 +6620,232 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4216
6620
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
4217
6621
|
*/
|
|
4218
6622
|
step?: number;
|
|
6623
|
+
/**
|
|
6624
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
6625
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
6626
|
+
*/
|
|
6627
|
+
value?: unknown;
|
|
4219
6628
|
}
|
|
4220
6629
|
namespace Input {
|
|
6630
|
+
/**
|
|
6631
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
6632
|
+
* recursive items field.
|
|
6633
|
+
*/
|
|
6634
|
+
interface Item {
|
|
6635
|
+
/**
|
|
6636
|
+
* The name that must be user to call the model through the API
|
|
6637
|
+
*/
|
|
6638
|
+
name: string;
|
|
6639
|
+
/**
|
|
6640
|
+
* The data type of the input
|
|
6641
|
+
*/
|
|
6642
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
6643
|
+
/**
|
|
6644
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
6645
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
6646
|
+
* dropdown.
|
|
6647
|
+
*/
|
|
6648
|
+
allowedValues?: Array<unknown>;
|
|
6649
|
+
/**
|
|
6650
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
6651
|
+
* \`file_array\` input types with kind \`image\`.
|
|
6652
|
+
*/
|
|
6653
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
6654
|
+
/**
|
|
6655
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
6656
|
+
*/
|
|
6657
|
+
color?: boolean;
|
|
6658
|
+
/**
|
|
6659
|
+
* Whether this input affects the model's cost calculation
|
|
6660
|
+
*/
|
|
6661
|
+
costImpact?: boolean;
|
|
6662
|
+
/**
|
|
6663
|
+
* The default value for the input
|
|
6664
|
+
*/
|
|
6665
|
+
default?: unknown;
|
|
6666
|
+
/**
|
|
6667
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
6668
|
+
*/
|
|
6669
|
+
description?: string;
|
|
6670
|
+
/**
|
|
6671
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
6672
|
+
* value appear consecutively in the UI.
|
|
6673
|
+
*/
|
|
6674
|
+
group?: string;
|
|
6675
|
+
/**
|
|
6676
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
6677
|
+
*/
|
|
6678
|
+
hint?: string;
|
|
6679
|
+
/**
|
|
6680
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
6681
|
+
* the same as the current object. This is only available for type inputs_array
|
|
6682
|
+
* inputs.
|
|
6683
|
+
*/
|
|
6684
|
+
inputs?: Array<{
|
|
6685
|
+
[key: string]: unknown;
|
|
6686
|
+
}>;
|
|
6687
|
+
/**
|
|
6688
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
6689
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6690
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
6691
|
+
* data:kind, prefix
|
|
6692
|
+
*/
|
|
6693
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
6694
|
+
/**
|
|
6695
|
+
* The label displayed in the UI for this input
|
|
6696
|
+
*/
|
|
6697
|
+
label?: string;
|
|
6698
|
+
/**
|
|
6699
|
+
* The name of the file input field to use as the mask source
|
|
6700
|
+
*/
|
|
6701
|
+
maskFrom?: string;
|
|
6702
|
+
/**
|
|
6703
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
6704
|
+
* types.
|
|
6705
|
+
*/
|
|
6706
|
+
max?: number;
|
|
6707
|
+
/**
|
|
6708
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
6709
|
+
* \`string_array\`.
|
|
6710
|
+
*/
|
|
6711
|
+
maxLength?: number;
|
|
6712
|
+
/**
|
|
6713
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
6714
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
6715
|
+
* creation time.
|
|
6716
|
+
*/
|
|
6717
|
+
maxSize?: number;
|
|
6718
|
+
/**
|
|
6719
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
6720
|
+
*/
|
|
6721
|
+
min?: number;
|
|
6722
|
+
/**
|
|
6723
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
6724
|
+
* \`string_array\`.
|
|
6725
|
+
*/
|
|
6726
|
+
minLength?: number;
|
|
6727
|
+
/**
|
|
6728
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
6729
|
+
* available for \`model_array\` input type.
|
|
6730
|
+
*/
|
|
6731
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
6732
|
+
/**
|
|
6733
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
6734
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
6735
|
+
*
|
|
6736
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
6737
|
+
*/
|
|
6738
|
+
parent?: boolean;
|
|
6739
|
+
/**
|
|
6740
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
6741
|
+
*/
|
|
6742
|
+
placeholder?: string;
|
|
6743
|
+
/**
|
|
6744
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
6745
|
+
* spark feature. Only available for \`string\` input type.
|
|
6746
|
+
*/
|
|
6747
|
+
prompt?: boolean;
|
|
6748
|
+
/**
|
|
6749
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
6750
|
+
* type.
|
|
6751
|
+
*/
|
|
6752
|
+
promptSpark?: boolean;
|
|
6753
|
+
/**
|
|
6754
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
6755
|
+
* least one of node or conditional.
|
|
6756
|
+
*/
|
|
6757
|
+
ref?: Item.Ref;
|
|
6758
|
+
/**
|
|
6759
|
+
* Set of rules that describes when this input is required:
|
|
6760
|
+
*
|
|
6761
|
+
* - \`always\`: Input is always required
|
|
6762
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6763
|
+
* defined
|
|
6764
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6765
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6766
|
+
* value
|
|
6767
|
+
*
|
|
6768
|
+
* By default, the input is not required.
|
|
6769
|
+
*/
|
|
6770
|
+
required?: Item.Required;
|
|
6771
|
+
/**
|
|
6772
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
6773
|
+
*/
|
|
6774
|
+
step?: number;
|
|
6775
|
+
/**
|
|
6776
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
6777
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
6778
|
+
*/
|
|
6779
|
+
value?: unknown;
|
|
6780
|
+
}
|
|
6781
|
+
namespace Item {
|
|
6782
|
+
/**
|
|
6783
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
6784
|
+
* least one of node or conditional.
|
|
6785
|
+
*/
|
|
6786
|
+
interface Ref {
|
|
6787
|
+
/**
|
|
6788
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
6789
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
6790
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
6791
|
+
*/
|
|
6792
|
+
conditional?: Array<string>;
|
|
6793
|
+
/**
|
|
6794
|
+
* This is the desired node output value if ref is an if/else node.
|
|
6795
|
+
*/
|
|
6796
|
+
equal?: string;
|
|
6797
|
+
/**
|
|
6798
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
6799
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
6800
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
6801
|
+
* all outputs of a node, you can use the name 'all'.
|
|
6802
|
+
*/
|
|
6803
|
+
name?: string;
|
|
6804
|
+
/**
|
|
6805
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
6806
|
+
*/
|
|
6807
|
+
node?: string;
|
|
6808
|
+
}
|
|
6809
|
+
/**
|
|
6810
|
+
* Set of rules that describes when this input is required:
|
|
6811
|
+
*
|
|
6812
|
+
* - \`always\`: Input is always required
|
|
6813
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6814
|
+
* defined
|
|
6815
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6816
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6817
|
+
* value
|
|
6818
|
+
*
|
|
6819
|
+
* By default, the input is not required.
|
|
6820
|
+
*/
|
|
6821
|
+
interface Required {
|
|
6822
|
+
/**
|
|
6823
|
+
* Whether the input is always required
|
|
6824
|
+
*/
|
|
6825
|
+
always?: boolean;
|
|
6826
|
+
/**
|
|
6827
|
+
* Makes this input required when another input has a specific value:
|
|
6828
|
+
*
|
|
6829
|
+
* - Key: name of the input to check
|
|
6830
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
6831
|
+
*/
|
|
6832
|
+
conditionalValues?: unknown;
|
|
6833
|
+
/**
|
|
6834
|
+
* Makes this input required when another input is defined:
|
|
6835
|
+
*
|
|
6836
|
+
* - Key: name of the input that must be defined
|
|
6837
|
+
* - Value: message to display when this input is required
|
|
6838
|
+
*/
|
|
6839
|
+
ifDefined?: unknown;
|
|
6840
|
+
/**
|
|
6841
|
+
* Makes this input required when another input is not defined:
|
|
6842
|
+
*
|
|
6843
|
+
* - Key: name of the input that must be undefined
|
|
6844
|
+
* - Value: message to display when this input is required
|
|
6845
|
+
*/
|
|
6846
|
+
ifNotDefined?: unknown;
|
|
6847
|
+
}
|
|
6848
|
+
}
|
|
4221
6849
|
/**
|
|
4222
6850
|
* The reference to another input or output of the same workflow. Must have at
|
|
4223
6851
|
* least one of node or conditional.
|
|
@@ -4344,6 +6972,10 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4344
6972
|
* Whether this input affects the model's cost calculation
|
|
4345
6973
|
*/
|
|
4346
6974
|
costImpact?: boolean;
|
|
6975
|
+
/**
|
|
6976
|
+
* The default value for the input
|
|
6977
|
+
*/
|
|
6978
|
+
default?: unknown;
|
|
4347
6979
|
/**
|
|
4348
6980
|
* Help text displayed in the UI to provide additional information about the input
|
|
4349
6981
|
*/
|
|
@@ -4362,10 +6994,14 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4362
6994
|
* the same as the current object. This is only available for type inputs_array
|
|
4363
6995
|
* inputs.
|
|
4364
6996
|
*/
|
|
4365
|
-
inputs?: Array<
|
|
6997
|
+
inputs?: Array<{
|
|
6998
|
+
[key: string]: unknown;
|
|
6999
|
+
}>;
|
|
4366
7000
|
/**
|
|
4367
7001
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4368
|
-
* \`file_array\` input types.
|
|
7002
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
7003
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
7004
|
+
* data:kind, prefix
|
|
4369
7005
|
*/
|
|
4370
7006
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
4371
7007
|
/**
|
|
@@ -4386,6 +7022,12 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4386
7022
|
* \`string_array\`.
|
|
4387
7023
|
*/
|
|
4388
7024
|
maxLength?: number;
|
|
7025
|
+
/**
|
|
7026
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
7027
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
7028
|
+
* creation time.
|
|
7029
|
+
*/
|
|
7030
|
+
maxSize?: number;
|
|
4389
7031
|
/**
|
|
4390
7032
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
4391
7033
|
*/
|
|
@@ -4399,7 +7041,7 @@ export declare namespace WorkflowUpdateParams {
|
|
|
4399
7041
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
4400
7042
|
* available for \`model_array\` input type.
|
|
4401
7043
|
*/
|
|
4402
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
7044
|
+
modelTypes?: Array<'custom' | 'elevenlabs-voice' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux.2-dev-edit-lora' | 'flux.2-dev-lora' | 'flux.2-klein-4b-edit-lora' | 'flux.2-klein-4b-lora' | 'flux.2-klein-9b-edit-lora' | 'flux.2-klein-9b-lora' | 'flux.2-klein-base-4b-edit-lora' | 'flux.2-klein-base-4b-lora' | 'flux.2-klein-base-9b-edit-lora' | 'flux.2-klein-base-9b-lora' | 'flux1.1-pro' | 'gpt-image-1' | 'qwen-image-2512-lora' | 'qwen-image-edit-2509-lora' | 'qwen-image-edit-2511-lora' | 'qwen-image-edit-lora' | 'qwen-image-lora' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora' | 'zimage-de-turbo-lora' | 'zimage-lora' | 'zimage-turbo-lora'>;
|
|
4403
7045
|
/**
|
|
4404
7046
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
4405
7047
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -4486,7 +7128,7 @@ export interface WorkflowListParams {
|
|
|
4486
7128
|
* The number of items to return in the response. The default value is 10, maximum
|
|
4487
7129
|
* value is 200, minimum value is 1
|
|
4488
7130
|
*/
|
|
4489
|
-
pageSize?:
|
|
7131
|
+
pageSize?: number;
|
|
4490
7132
|
/**
|
|
4491
7133
|
* A token you received in a previous request to query the next page of items
|
|
4492
7134
|
*/
|
|
@@ -4495,14 +7137,14 @@ export interface WorkflowListParams {
|
|
|
4495
7137
|
* The privacy of the workflows to return. The default value is `private`, possible
|
|
4496
7138
|
* values are `private`, `public` and `unlisted`. Default value is `private`.
|
|
4497
7139
|
*/
|
|
4498
|
-
privacy?:
|
|
7140
|
+
privacy?: 'public' | 'private' | 'unlisted';
|
|
4499
7141
|
/**
|
|
4500
7142
|
* The status of the workflows to return. Only available when
|
|
4501
7143
|
* privacy=private/unlisted. Default undefined value returns all statuses for
|
|
4502
7144
|
* private, `ready` for public.
|
|
4503
7145
|
*/
|
|
4504
|
-
status?:
|
|
4505
|
-
tags?:
|
|
7146
|
+
status?: 'draft' | 'ready';
|
|
7147
|
+
tags?: unknown;
|
|
4506
7148
|
}
|
|
4507
7149
|
export interface WorkflowApproveUserParams {
|
|
4508
7150
|
/**
|
|
@@ -4515,12 +7157,7 @@ export interface WorkflowApproveUserParams {
|
|
|
4515
7157
|
workflowJobId: string;
|
|
4516
7158
|
}
|
|
4517
7159
|
export interface WorkflowGetTagsParams {
|
|
4518
|
-
|
|
4519
|
-
* The status of the workflows to return. Only available when
|
|
4520
|
-
* privacy=private/unlisted. Default undefined value returns all statuses for
|
|
4521
|
-
* private, `ready` for public.
|
|
4522
|
-
*/
|
|
4523
|
-
status?: string;
|
|
7160
|
+
status?: unknown;
|
|
4524
7161
|
}
|
|
4525
7162
|
export interface WorkflowRunParams {
|
|
4526
7163
|
/**
|
|
@@ -4531,7 +7168,7 @@ export interface WorkflowRunParams {
|
|
|
4531
7168
|
/**
|
|
4532
7169
|
* Query param
|
|
4533
7170
|
*/
|
|
4534
|
-
dryRun?:
|
|
7171
|
+
dryRun?: unknown;
|
|
4535
7172
|
}
|
|
4536
7173
|
export declare namespace Workflows {
|
|
4537
7174
|
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type WorkflowApproveUserResponse as WorkflowApproveUserResponse, type WorkflowGetTagsResponse as WorkflowGetTagsResponse, type WorkflowRunResponse as WorkflowRunResponse, type WorkflowCreateParams as WorkflowCreateParams, type WorkflowUpdateParams as WorkflowUpdateParams, type WorkflowListParams as WorkflowListParams, type WorkflowApproveUserParams as WorkflowApproveUserParams, type WorkflowGetTagsParams as WorkflowGetTagsParams, type WorkflowRunParams as WorkflowRunParams, };
|