@scenario-labs/sdk 0.1.3 → 0.3.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 +49 -0
- package/LICENSE +1 -1
- package/README.md +29 -27
- package/client.d.mts +33 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +33 -16
- 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 +9 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +9 -3
- package/index.d.ts.map +1 -1
- package/index.js +18 -6
- package/index.js.map +1 -1
- package/index.mjs +8 -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 +53 -0
- package/lib/workflow.d.mts.map +1 -0
- package/lib/workflow.d.ts +53 -0
- package/lib/workflow.d.ts.map +1 -0
- package/lib/workflow.js +67 -0
- package/lib/workflow.js.map +1 -0
- package/lib/workflow.mjs +62 -0
- package/lib/workflow.mjs.map +1 -0
- package/lib/workflow_validator.d.mts +22 -0
- package/lib/workflow_validator.d.mts.map +1 -0
- package/lib/workflow_validator.d.ts +22 -0
- package/lib/workflow_validator.d.ts.map +1 -0
- package/lib/workflow_validator.js +124 -0
- package/lib/workflow_validator.js.map +1 -0
- package/lib/workflow_validator.mjs +121 -0
- package/lib/workflow_validator.mjs.map +1 -0
- package/package.json +13 -3
- package/resources/assets/assets.d.mts +399 -88
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +399 -88
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.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/collections.d.mts +1 -1
- package/resources/collections/collections.d.ts +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 +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.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 -42
- 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 +9 -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 +99 -0
- package/src/lib/workflow_validator.ts +167 -0
- package/src/resources/assets/assets.ts +788 -177
- package/src/resources/assets/public.ts +151 -29
- package/src/resources/collections/collections.ts +1 -1
- package/src/resources/generate.ts +6254 -2217
- package/src/resources/index.ts +2 -2
- 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
package/resources/jobs.d.mts
CHANGED
|
@@ -16,7 +16,7 @@ export declare class Jobs extends APIResource {
|
|
|
16
16
|
/**
|
|
17
17
|
* Trigger an action on a job: cancel
|
|
18
18
|
*/
|
|
19
|
-
triggerAction(jobID: string,
|
|
19
|
+
triggerAction(jobID: string, params: JobTriggerActionParams, options?: RequestOptions): APIPromise<JobTriggerActionResponse>;
|
|
20
20
|
}
|
|
21
21
|
export interface JobRetrieveResponse {
|
|
22
22
|
job: JobRetrieveResponse.Job;
|
|
@@ -34,7 +34,7 @@ export declare namespace JobRetrieveResponse {
|
|
|
34
34
|
/**
|
|
35
35
|
* The type of job
|
|
36
36
|
*/
|
|
37
|
-
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';
|
|
37
|
+
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';
|
|
38
38
|
/**
|
|
39
39
|
* Metadata of the job with some additional information
|
|
40
40
|
*/
|
|
@@ -78,18 +78,36 @@ export declare namespace JobRetrieveResponse {
|
|
|
78
78
|
* List of produced assets for this job
|
|
79
79
|
*/
|
|
80
80
|
assetIds?: Array<string>;
|
|
81
|
+
/**
|
|
82
|
+
* Eventual error for the job
|
|
83
|
+
*/
|
|
84
|
+
error?: string | null;
|
|
81
85
|
/**
|
|
82
86
|
* The flow of the job. Only available for workflow jobs.
|
|
83
87
|
*/
|
|
84
88
|
flow?: Array<Metadata.Flow>;
|
|
89
|
+
/**
|
|
90
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
91
|
+
*/
|
|
92
|
+
hint?: string;
|
|
85
93
|
/**
|
|
86
94
|
* The inputs for the job
|
|
87
95
|
*/
|
|
88
|
-
input?:
|
|
96
|
+
input?: {
|
|
97
|
+
[key: string]: unknown;
|
|
98
|
+
};
|
|
99
|
+
/**
|
|
100
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
101
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
102
|
+
* results.
|
|
103
|
+
*/
|
|
104
|
+
output?: {
|
|
105
|
+
[key: string]: unknown;
|
|
106
|
+
};
|
|
89
107
|
/**
|
|
90
|
-
*
|
|
108
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
91
109
|
*/
|
|
92
|
-
|
|
110
|
+
outputModelId?: string;
|
|
93
111
|
/**
|
|
94
112
|
* The workflow ID of the job if job is part of a workflow.
|
|
95
113
|
*/
|
|
@@ -112,20 +130,45 @@ export declare namespace JobRetrieveResponse {
|
|
|
112
130
|
/**
|
|
113
131
|
* The type of the job for the node.
|
|
114
132
|
*/
|
|
115
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
133
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
116
134
|
/**
|
|
117
135
|
* List of produced assets for this node.
|
|
118
136
|
*/
|
|
119
137
|
assets?: Array<Flow.Asset>;
|
|
138
|
+
/**
|
|
139
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
140
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
141
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
142
|
+
*/
|
|
143
|
+
count?: number;
|
|
120
144
|
/**
|
|
121
145
|
* The nodes that this node depends on. Only available for nodes that have
|
|
122
146
|
* dependencies. Mainly used for user approval nodes.
|
|
123
147
|
*/
|
|
124
148
|
dependsOn?: Array<string>;
|
|
149
|
+
/**
|
|
150
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
151
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
152
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
153
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
154
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
155
|
+
*/
|
|
156
|
+
includeOutputsInWorkflowJob?: true;
|
|
125
157
|
/**
|
|
126
158
|
* The inputs of the node.
|
|
127
159
|
*/
|
|
128
160
|
inputs?: Array<Flow.Input>;
|
|
161
|
+
/**
|
|
162
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
163
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
164
|
+
* numbers, or asset IDs.
|
|
165
|
+
*/
|
|
166
|
+
items?: Array<string>;
|
|
167
|
+
/**
|
|
168
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
169
|
+
* dynamically-created copies of loop body nodes.
|
|
170
|
+
*/
|
|
171
|
+
iterationIndex?: number;
|
|
129
172
|
/**
|
|
130
173
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
131
174
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -140,10 +183,25 @@ export declare namespace JobRetrieveResponse {
|
|
|
140
183
|
* The type of the logic for the node. Only available for logic nodes.
|
|
141
184
|
*/
|
|
142
185
|
logicType?: 'if-else';
|
|
186
|
+
/**
|
|
187
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
188
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
189
|
+
* for ForEach nodes.
|
|
190
|
+
*/
|
|
191
|
+
loopBodyNodeIds?: Array<string>;
|
|
192
|
+
/**
|
|
193
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
194
|
+
* dynamically-created copies of loop body nodes.
|
|
195
|
+
*/
|
|
196
|
+
loopNodeId?: string;
|
|
143
197
|
/**
|
|
144
198
|
* The model id for the node. Mainly used for custom model tasks.
|
|
145
199
|
*/
|
|
146
200
|
modelId?: string;
|
|
201
|
+
/**
|
|
202
|
+
* The output of the node. Only available for logic nodes.
|
|
203
|
+
*/
|
|
204
|
+
output?: unknown;
|
|
147
205
|
/**
|
|
148
206
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
149
207
|
*/
|
|
@@ -185,6 +243,10 @@ export declare namespace JobRetrieveResponse {
|
|
|
185
243
|
* Whether this input affects the model's cost calculation
|
|
186
244
|
*/
|
|
187
245
|
costImpact?: boolean;
|
|
246
|
+
/**
|
|
247
|
+
* The default value for the input
|
|
248
|
+
*/
|
|
249
|
+
default?: unknown;
|
|
188
250
|
/**
|
|
189
251
|
* Help text displayed in the UI to provide additional information about the input
|
|
190
252
|
*/
|
|
@@ -203,10 +265,20 @@ export declare namespace JobRetrieveResponse {
|
|
|
203
265
|
* the same as the current object. This is only available for type inputs_array
|
|
204
266
|
* inputs.
|
|
205
267
|
*/
|
|
206
|
-
inputs?: Array<
|
|
268
|
+
inputs?: Array<{
|
|
269
|
+
[key: string]: unknown;
|
|
270
|
+
}>;
|
|
271
|
+
/**
|
|
272
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
273
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
274
|
+
* type.
|
|
275
|
+
*/
|
|
276
|
+
items?: Array<Array<Input.Item>>;
|
|
207
277
|
/**
|
|
208
278
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
209
|
-
* \`file_array\` input types.
|
|
279
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
280
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
281
|
+
* data:kind, prefix
|
|
210
282
|
*/
|
|
211
283
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
212
284
|
/**
|
|
@@ -227,6 +299,12 @@ export declare namespace JobRetrieveResponse {
|
|
|
227
299
|
* \`string_array\`.
|
|
228
300
|
*/
|
|
229
301
|
maxLength?: number;
|
|
302
|
+
/**
|
|
303
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
304
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
305
|
+
* creation time.
|
|
306
|
+
*/
|
|
307
|
+
maxSize?: number;
|
|
230
308
|
/**
|
|
231
309
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
232
310
|
*/
|
|
@@ -240,7 +318,7 @@ export declare namespace JobRetrieveResponse {
|
|
|
240
318
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
241
319
|
* available for \`model_array\` input type.
|
|
242
320
|
*/
|
|
243
|
-
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'>;
|
|
321
|
+
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'>;
|
|
244
322
|
/**
|
|
245
323
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
246
324
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -284,8 +362,232 @@ export declare namespace JobRetrieveResponse {
|
|
|
284
362
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
285
363
|
*/
|
|
286
364
|
step?: number;
|
|
365
|
+
/**
|
|
366
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
367
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
368
|
+
*/
|
|
369
|
+
value?: unknown;
|
|
287
370
|
}
|
|
288
371
|
namespace Input {
|
|
372
|
+
/**
|
|
373
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
374
|
+
* recursive items field.
|
|
375
|
+
*/
|
|
376
|
+
interface Item {
|
|
377
|
+
/**
|
|
378
|
+
* The name that must be user to call the model through the API
|
|
379
|
+
*/
|
|
380
|
+
name: string;
|
|
381
|
+
/**
|
|
382
|
+
* The data type of the input
|
|
383
|
+
*/
|
|
384
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
385
|
+
/**
|
|
386
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
387
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
388
|
+
* dropdown.
|
|
389
|
+
*/
|
|
390
|
+
allowedValues?: Array<unknown>;
|
|
391
|
+
/**
|
|
392
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
393
|
+
* \`file_array\` input types with kind \`image\`.
|
|
394
|
+
*/
|
|
395
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
396
|
+
/**
|
|
397
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
398
|
+
*/
|
|
399
|
+
color?: boolean;
|
|
400
|
+
/**
|
|
401
|
+
* Whether this input affects the model's cost calculation
|
|
402
|
+
*/
|
|
403
|
+
costImpact?: boolean;
|
|
404
|
+
/**
|
|
405
|
+
* The default value for the input
|
|
406
|
+
*/
|
|
407
|
+
default?: unknown;
|
|
408
|
+
/**
|
|
409
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
410
|
+
*/
|
|
411
|
+
description?: string;
|
|
412
|
+
/**
|
|
413
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
414
|
+
* value appear consecutively in the UI.
|
|
415
|
+
*/
|
|
416
|
+
group?: string;
|
|
417
|
+
/**
|
|
418
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
419
|
+
*/
|
|
420
|
+
hint?: string;
|
|
421
|
+
/**
|
|
422
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
423
|
+
* the same as the current object. This is only available for type inputs_array
|
|
424
|
+
* inputs.
|
|
425
|
+
*/
|
|
426
|
+
inputs?: Array<{
|
|
427
|
+
[key: string]: unknown;
|
|
428
|
+
}>;
|
|
429
|
+
/**
|
|
430
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
431
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
432
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
433
|
+
* data:kind, prefix
|
|
434
|
+
*/
|
|
435
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
436
|
+
/**
|
|
437
|
+
* The label displayed in the UI for this input
|
|
438
|
+
*/
|
|
439
|
+
label?: string;
|
|
440
|
+
/**
|
|
441
|
+
* The name of the file input field to use as the mask source
|
|
442
|
+
*/
|
|
443
|
+
maskFrom?: string;
|
|
444
|
+
/**
|
|
445
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
446
|
+
* types.
|
|
447
|
+
*/
|
|
448
|
+
max?: number;
|
|
449
|
+
/**
|
|
450
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
451
|
+
* \`string_array\`.
|
|
452
|
+
*/
|
|
453
|
+
maxLength?: number;
|
|
454
|
+
/**
|
|
455
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
456
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
457
|
+
* creation time.
|
|
458
|
+
*/
|
|
459
|
+
maxSize?: number;
|
|
460
|
+
/**
|
|
461
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
462
|
+
*/
|
|
463
|
+
min?: number;
|
|
464
|
+
/**
|
|
465
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
466
|
+
* \`string_array\`.
|
|
467
|
+
*/
|
|
468
|
+
minLength?: number;
|
|
469
|
+
/**
|
|
470
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
471
|
+
* available for \`model_array\` input type.
|
|
472
|
+
*/
|
|
473
|
+
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'>;
|
|
474
|
+
/**
|
|
475
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
476
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
477
|
+
*
|
|
478
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
479
|
+
*/
|
|
480
|
+
parent?: boolean;
|
|
481
|
+
/**
|
|
482
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
483
|
+
*/
|
|
484
|
+
placeholder?: string;
|
|
485
|
+
/**
|
|
486
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
487
|
+
* spark feature. Only available for \`string\` input type.
|
|
488
|
+
*/
|
|
489
|
+
prompt?: boolean;
|
|
490
|
+
/**
|
|
491
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
492
|
+
* type.
|
|
493
|
+
*/
|
|
494
|
+
promptSpark?: boolean;
|
|
495
|
+
/**
|
|
496
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
497
|
+
* least one of node or conditional.
|
|
498
|
+
*/
|
|
499
|
+
ref?: Item.Ref;
|
|
500
|
+
/**
|
|
501
|
+
* Set of rules that describes when this input is required:
|
|
502
|
+
*
|
|
503
|
+
* - \`always\`: Input is always required
|
|
504
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
505
|
+
* defined
|
|
506
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
507
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
508
|
+
* value
|
|
509
|
+
*
|
|
510
|
+
* By default, the input is not required.
|
|
511
|
+
*/
|
|
512
|
+
required?: Item.Required;
|
|
513
|
+
/**
|
|
514
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
515
|
+
*/
|
|
516
|
+
step?: number;
|
|
517
|
+
/**
|
|
518
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
519
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
520
|
+
*/
|
|
521
|
+
value?: unknown;
|
|
522
|
+
}
|
|
523
|
+
namespace Item {
|
|
524
|
+
/**
|
|
525
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
526
|
+
* least one of node or conditional.
|
|
527
|
+
*/
|
|
528
|
+
interface Ref {
|
|
529
|
+
/**
|
|
530
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
531
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
532
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
533
|
+
*/
|
|
534
|
+
conditional?: Array<string>;
|
|
535
|
+
/**
|
|
536
|
+
* This is the desired node output value if ref is an if/else node.
|
|
537
|
+
*/
|
|
538
|
+
equal?: string;
|
|
539
|
+
/**
|
|
540
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
541
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
542
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
543
|
+
* all outputs of a node, you can use the name 'all'.
|
|
544
|
+
*/
|
|
545
|
+
name?: string;
|
|
546
|
+
/**
|
|
547
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
548
|
+
*/
|
|
549
|
+
node?: string;
|
|
550
|
+
}
|
|
551
|
+
/**
|
|
552
|
+
* Set of rules that describes when this input is required:
|
|
553
|
+
*
|
|
554
|
+
* - \`always\`: Input is always required
|
|
555
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
556
|
+
* defined
|
|
557
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
558
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
559
|
+
* value
|
|
560
|
+
*
|
|
561
|
+
* By default, the input is not required.
|
|
562
|
+
*/
|
|
563
|
+
interface Required {
|
|
564
|
+
/**
|
|
565
|
+
* Whether the input is always required
|
|
566
|
+
*/
|
|
567
|
+
always?: boolean;
|
|
568
|
+
/**
|
|
569
|
+
* Makes this input required when another input has a specific value:
|
|
570
|
+
*
|
|
571
|
+
* - Key: name of the input to check
|
|
572
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
573
|
+
*/
|
|
574
|
+
conditionalValues?: unknown;
|
|
575
|
+
/**
|
|
576
|
+
* Makes this input required when another input is defined:
|
|
577
|
+
*
|
|
578
|
+
* - Key: name of the input that must be defined
|
|
579
|
+
* - Value: message to display when this input is required
|
|
580
|
+
*/
|
|
581
|
+
ifDefined?: unknown;
|
|
582
|
+
/**
|
|
583
|
+
* Makes this input required when another input is not defined:
|
|
584
|
+
*
|
|
585
|
+
* - Key: name of the input that must be undefined
|
|
586
|
+
* - Value: message to display when this input is required
|
|
587
|
+
*/
|
|
588
|
+
ifNotDefined?: unknown;
|
|
589
|
+
}
|
|
590
|
+
}
|
|
289
591
|
/**
|
|
290
592
|
* The reference to another input or output of the same workflow. Must have at
|
|
291
593
|
* least one of node or conditional.
|
|
@@ -412,7 +714,7 @@ export declare namespace JobListResponse {
|
|
|
412
714
|
/**
|
|
413
715
|
* The type of job
|
|
414
716
|
*/
|
|
415
|
-
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';
|
|
717
|
+
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';
|
|
416
718
|
/**
|
|
417
719
|
* Metadata of the job with some additional information
|
|
418
720
|
*/
|
|
@@ -456,18 +758,36 @@ export declare namespace JobListResponse {
|
|
|
456
758
|
* List of produced assets for this job
|
|
457
759
|
*/
|
|
458
760
|
assetIds?: Array<string>;
|
|
761
|
+
/**
|
|
762
|
+
* Eventual error for the job
|
|
763
|
+
*/
|
|
764
|
+
error?: string | null;
|
|
459
765
|
/**
|
|
460
766
|
* The flow of the job. Only available for workflow jobs.
|
|
461
767
|
*/
|
|
462
768
|
flow?: Array<Metadata.Flow>;
|
|
769
|
+
/**
|
|
770
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
771
|
+
*/
|
|
772
|
+
hint?: string;
|
|
463
773
|
/**
|
|
464
774
|
* The inputs for the job
|
|
465
775
|
*/
|
|
466
|
-
input?:
|
|
776
|
+
input?: {
|
|
777
|
+
[key: string]: unknown;
|
|
778
|
+
};
|
|
467
779
|
/**
|
|
468
|
-
*
|
|
780
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
781
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
782
|
+
* results.
|
|
469
783
|
*/
|
|
470
|
-
output?:
|
|
784
|
+
output?: {
|
|
785
|
+
[key: string]: unknown;
|
|
786
|
+
};
|
|
787
|
+
/**
|
|
788
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
789
|
+
*/
|
|
790
|
+
outputModelId?: string;
|
|
471
791
|
/**
|
|
472
792
|
* The workflow ID of the job if job is part of a workflow.
|
|
473
793
|
*/
|
|
@@ -490,20 +810,45 @@ export declare namespace JobListResponse {
|
|
|
490
810
|
/**
|
|
491
811
|
* The type of the job for the node.
|
|
492
812
|
*/
|
|
493
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
813
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
494
814
|
/**
|
|
495
815
|
* List of produced assets for this node.
|
|
496
816
|
*/
|
|
497
817
|
assets?: Array<Flow.Asset>;
|
|
818
|
+
/**
|
|
819
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
820
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
821
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
822
|
+
*/
|
|
823
|
+
count?: number;
|
|
498
824
|
/**
|
|
499
825
|
* The nodes that this node depends on. Only available for nodes that have
|
|
500
826
|
* dependencies. Mainly used for user approval nodes.
|
|
501
827
|
*/
|
|
502
828
|
dependsOn?: Array<string>;
|
|
829
|
+
/**
|
|
830
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
831
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
832
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
833
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
834
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
835
|
+
*/
|
|
836
|
+
includeOutputsInWorkflowJob?: true;
|
|
503
837
|
/**
|
|
504
838
|
* The inputs of the node.
|
|
505
839
|
*/
|
|
506
840
|
inputs?: Array<Flow.Input>;
|
|
841
|
+
/**
|
|
842
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
843
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
844
|
+
* numbers, or asset IDs.
|
|
845
|
+
*/
|
|
846
|
+
items?: Array<string>;
|
|
847
|
+
/**
|
|
848
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
849
|
+
* dynamically-created copies of loop body nodes.
|
|
850
|
+
*/
|
|
851
|
+
iterationIndex?: number;
|
|
507
852
|
/**
|
|
508
853
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
509
854
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -518,10 +863,25 @@ export declare namespace JobListResponse {
|
|
|
518
863
|
* The type of the logic for the node. Only available for logic nodes.
|
|
519
864
|
*/
|
|
520
865
|
logicType?: 'if-else';
|
|
866
|
+
/**
|
|
867
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
868
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
869
|
+
* for ForEach nodes.
|
|
870
|
+
*/
|
|
871
|
+
loopBodyNodeIds?: Array<string>;
|
|
872
|
+
/**
|
|
873
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
874
|
+
* dynamically-created copies of loop body nodes.
|
|
875
|
+
*/
|
|
876
|
+
loopNodeId?: string;
|
|
521
877
|
/**
|
|
522
878
|
* The model id for the node. Mainly used for custom model tasks.
|
|
523
879
|
*/
|
|
524
880
|
modelId?: string;
|
|
881
|
+
/**
|
|
882
|
+
* The output of the node. Only available for logic nodes.
|
|
883
|
+
*/
|
|
884
|
+
output?: unknown;
|
|
525
885
|
/**
|
|
526
886
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
527
887
|
*/
|
|
@@ -563,6 +923,10 @@ export declare namespace JobListResponse {
|
|
|
563
923
|
* Whether this input affects the model's cost calculation
|
|
564
924
|
*/
|
|
565
925
|
costImpact?: boolean;
|
|
926
|
+
/**
|
|
927
|
+
* The default value for the input
|
|
928
|
+
*/
|
|
929
|
+
default?: unknown;
|
|
566
930
|
/**
|
|
567
931
|
* Help text displayed in the UI to provide additional information about the input
|
|
568
932
|
*/
|
|
@@ -581,10 +945,20 @@ export declare namespace JobListResponse {
|
|
|
581
945
|
* the same as the current object. This is only available for type inputs_array
|
|
582
946
|
* inputs.
|
|
583
947
|
*/
|
|
584
|
-
inputs?: Array<
|
|
948
|
+
inputs?: Array<{
|
|
949
|
+
[key: string]: unknown;
|
|
950
|
+
}>;
|
|
951
|
+
/**
|
|
952
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
953
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
954
|
+
* type.
|
|
955
|
+
*/
|
|
956
|
+
items?: Array<Array<Input.Item>>;
|
|
585
957
|
/**
|
|
586
958
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
587
|
-
* \`file_array\` input types.
|
|
959
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
960
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
961
|
+
* data:kind, prefix
|
|
588
962
|
*/
|
|
589
963
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
590
964
|
/**
|
|
@@ -605,6 +979,12 @@ export declare namespace JobListResponse {
|
|
|
605
979
|
* \`string_array\`.
|
|
606
980
|
*/
|
|
607
981
|
maxLength?: number;
|
|
982
|
+
/**
|
|
983
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
984
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
985
|
+
* creation time.
|
|
986
|
+
*/
|
|
987
|
+
maxSize?: number;
|
|
608
988
|
/**
|
|
609
989
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
610
990
|
*/
|
|
@@ -618,7 +998,7 @@ export declare namespace JobListResponse {
|
|
|
618
998
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
619
999
|
* available for \`model_array\` input type.
|
|
620
1000
|
*/
|
|
621
|
-
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'>;
|
|
1001
|
+
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'>;
|
|
622
1002
|
/**
|
|
623
1003
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
624
1004
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -662,8 +1042,232 @@ export declare namespace JobListResponse {
|
|
|
662
1042
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
663
1043
|
*/
|
|
664
1044
|
step?: number;
|
|
1045
|
+
/**
|
|
1046
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1047
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1048
|
+
*/
|
|
1049
|
+
value?: unknown;
|
|
665
1050
|
}
|
|
666
1051
|
namespace Input {
|
|
1052
|
+
/**
|
|
1053
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
1054
|
+
* recursive items field.
|
|
1055
|
+
*/
|
|
1056
|
+
interface Item {
|
|
1057
|
+
/**
|
|
1058
|
+
* The name that must be user to call the model through the API
|
|
1059
|
+
*/
|
|
1060
|
+
name: string;
|
|
1061
|
+
/**
|
|
1062
|
+
* The data type of the input
|
|
1063
|
+
*/
|
|
1064
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
1065
|
+
/**
|
|
1066
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
1067
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
1068
|
+
* dropdown.
|
|
1069
|
+
*/
|
|
1070
|
+
allowedValues?: Array<unknown>;
|
|
1071
|
+
/**
|
|
1072
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
1073
|
+
* \`file_array\` input types with kind \`image\`.
|
|
1074
|
+
*/
|
|
1075
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
1076
|
+
/**
|
|
1077
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
1078
|
+
*/
|
|
1079
|
+
color?: boolean;
|
|
1080
|
+
/**
|
|
1081
|
+
* Whether this input affects the model's cost calculation
|
|
1082
|
+
*/
|
|
1083
|
+
costImpact?: boolean;
|
|
1084
|
+
/**
|
|
1085
|
+
* The default value for the input
|
|
1086
|
+
*/
|
|
1087
|
+
default?: unknown;
|
|
1088
|
+
/**
|
|
1089
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
1090
|
+
*/
|
|
1091
|
+
description?: string;
|
|
1092
|
+
/**
|
|
1093
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
1094
|
+
* value appear consecutively in the UI.
|
|
1095
|
+
*/
|
|
1096
|
+
group?: string;
|
|
1097
|
+
/**
|
|
1098
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
1099
|
+
*/
|
|
1100
|
+
hint?: string;
|
|
1101
|
+
/**
|
|
1102
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
1103
|
+
* the same as the current object. This is only available for type inputs_array
|
|
1104
|
+
* inputs.
|
|
1105
|
+
*/
|
|
1106
|
+
inputs?: Array<{
|
|
1107
|
+
[key: string]: unknown;
|
|
1108
|
+
}>;
|
|
1109
|
+
/**
|
|
1110
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1111
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1112
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1113
|
+
* data:kind, prefix
|
|
1114
|
+
*/
|
|
1115
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1116
|
+
/**
|
|
1117
|
+
* The label displayed in the UI for this input
|
|
1118
|
+
*/
|
|
1119
|
+
label?: string;
|
|
1120
|
+
/**
|
|
1121
|
+
* The name of the file input field to use as the mask source
|
|
1122
|
+
*/
|
|
1123
|
+
maskFrom?: string;
|
|
1124
|
+
/**
|
|
1125
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
1126
|
+
* types.
|
|
1127
|
+
*/
|
|
1128
|
+
max?: number;
|
|
1129
|
+
/**
|
|
1130
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1131
|
+
* \`string_array\`.
|
|
1132
|
+
*/
|
|
1133
|
+
maxLength?: number;
|
|
1134
|
+
/**
|
|
1135
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1136
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1137
|
+
* creation time.
|
|
1138
|
+
*/
|
|
1139
|
+
maxSize?: number;
|
|
1140
|
+
/**
|
|
1141
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1142
|
+
*/
|
|
1143
|
+
min?: number;
|
|
1144
|
+
/**
|
|
1145
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
1146
|
+
* \`string_array\`.
|
|
1147
|
+
*/
|
|
1148
|
+
minLength?: number;
|
|
1149
|
+
/**
|
|
1150
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1151
|
+
* available for \`model_array\` input type.
|
|
1152
|
+
*/
|
|
1153
|
+
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'>;
|
|
1154
|
+
/**
|
|
1155
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1156
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
1157
|
+
*
|
|
1158
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1159
|
+
*/
|
|
1160
|
+
parent?: boolean;
|
|
1161
|
+
/**
|
|
1162
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
1163
|
+
*/
|
|
1164
|
+
placeholder?: string;
|
|
1165
|
+
/**
|
|
1166
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1167
|
+
* spark feature. Only available for \`string\` input type.
|
|
1168
|
+
*/
|
|
1169
|
+
prompt?: boolean;
|
|
1170
|
+
/**
|
|
1171
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1172
|
+
* type.
|
|
1173
|
+
*/
|
|
1174
|
+
promptSpark?: boolean;
|
|
1175
|
+
/**
|
|
1176
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1177
|
+
* least one of node or conditional.
|
|
1178
|
+
*/
|
|
1179
|
+
ref?: Item.Ref;
|
|
1180
|
+
/**
|
|
1181
|
+
* Set of rules that describes when this input is required:
|
|
1182
|
+
*
|
|
1183
|
+
* - \`always\`: Input is always required
|
|
1184
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1185
|
+
* defined
|
|
1186
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1187
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1188
|
+
* value
|
|
1189
|
+
*
|
|
1190
|
+
* By default, the input is not required.
|
|
1191
|
+
*/
|
|
1192
|
+
required?: Item.Required;
|
|
1193
|
+
/**
|
|
1194
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1195
|
+
*/
|
|
1196
|
+
step?: number;
|
|
1197
|
+
/**
|
|
1198
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1199
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1200
|
+
*/
|
|
1201
|
+
value?: unknown;
|
|
1202
|
+
}
|
|
1203
|
+
namespace Item {
|
|
1204
|
+
/**
|
|
1205
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1206
|
+
* least one of node or conditional.
|
|
1207
|
+
*/
|
|
1208
|
+
interface Ref {
|
|
1209
|
+
/**
|
|
1210
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1211
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1212
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1213
|
+
*/
|
|
1214
|
+
conditional?: Array<string>;
|
|
1215
|
+
/**
|
|
1216
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1217
|
+
*/
|
|
1218
|
+
equal?: string;
|
|
1219
|
+
/**
|
|
1220
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1221
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1222
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1223
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1224
|
+
*/
|
|
1225
|
+
name?: string;
|
|
1226
|
+
/**
|
|
1227
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1228
|
+
*/
|
|
1229
|
+
node?: string;
|
|
1230
|
+
}
|
|
1231
|
+
/**
|
|
1232
|
+
* Set of rules that describes when this input is required:
|
|
1233
|
+
*
|
|
1234
|
+
* - \`always\`: Input is always required
|
|
1235
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1236
|
+
* defined
|
|
1237
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1238
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1239
|
+
* value
|
|
1240
|
+
*
|
|
1241
|
+
* By default, the input is not required.
|
|
1242
|
+
*/
|
|
1243
|
+
interface Required {
|
|
1244
|
+
/**
|
|
1245
|
+
* Whether the input is always required
|
|
1246
|
+
*/
|
|
1247
|
+
always?: boolean;
|
|
1248
|
+
/**
|
|
1249
|
+
* Makes this input required when another input has a specific value:
|
|
1250
|
+
*
|
|
1251
|
+
* - Key: name of the input to check
|
|
1252
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1253
|
+
*/
|
|
1254
|
+
conditionalValues?: unknown;
|
|
1255
|
+
/**
|
|
1256
|
+
* Makes this input required when another input is defined:
|
|
1257
|
+
*
|
|
1258
|
+
* - Key: name of the input that must be defined
|
|
1259
|
+
* - Value: message to display when this input is required
|
|
1260
|
+
*/
|
|
1261
|
+
ifDefined?: unknown;
|
|
1262
|
+
/**
|
|
1263
|
+
* Makes this input required when another input is not defined:
|
|
1264
|
+
*
|
|
1265
|
+
* - Key: name of the input that must be undefined
|
|
1266
|
+
* - Value: message to display when this input is required
|
|
1267
|
+
*/
|
|
1268
|
+
ifNotDefined?: unknown;
|
|
1269
|
+
}
|
|
1270
|
+
}
|
|
667
1271
|
/**
|
|
668
1272
|
* The reference to another input or output of the same workflow. Must have at
|
|
669
1273
|
* least one of node or conditional.
|
|
@@ -786,7 +1390,7 @@ export declare namespace JobTriggerActionResponse {
|
|
|
786
1390
|
/**
|
|
787
1391
|
* The type of job
|
|
788
1392
|
*/
|
|
789
|
-
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';
|
|
1393
|
+
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';
|
|
790
1394
|
/**
|
|
791
1395
|
* Metadata of the job with some additional information
|
|
792
1396
|
*/
|
|
@@ -830,18 +1434,36 @@ export declare namespace JobTriggerActionResponse {
|
|
|
830
1434
|
* List of produced assets for this job
|
|
831
1435
|
*/
|
|
832
1436
|
assetIds?: Array<string>;
|
|
1437
|
+
/**
|
|
1438
|
+
* Eventual error for the job
|
|
1439
|
+
*/
|
|
1440
|
+
error?: string | null;
|
|
833
1441
|
/**
|
|
834
1442
|
* The flow of the job. Only available for workflow jobs.
|
|
835
1443
|
*/
|
|
836
1444
|
flow?: Array<Metadata.Flow>;
|
|
1445
|
+
/**
|
|
1446
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
1447
|
+
*/
|
|
1448
|
+
hint?: string;
|
|
837
1449
|
/**
|
|
838
1450
|
* The inputs for the job
|
|
839
1451
|
*/
|
|
840
|
-
input?:
|
|
1452
|
+
input?: {
|
|
1453
|
+
[key: string]: unknown;
|
|
1454
|
+
};
|
|
841
1455
|
/**
|
|
842
|
-
*
|
|
1456
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
1457
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
1458
|
+
* results.
|
|
843
1459
|
*/
|
|
844
|
-
output?:
|
|
1460
|
+
output?: {
|
|
1461
|
+
[key: string]: unknown;
|
|
1462
|
+
};
|
|
1463
|
+
/**
|
|
1464
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
1465
|
+
*/
|
|
1466
|
+
outputModelId?: string;
|
|
845
1467
|
/**
|
|
846
1468
|
* The workflow ID of the job if job is part of a workflow.
|
|
847
1469
|
*/
|
|
@@ -864,20 +1486,45 @@ export declare namespace JobTriggerActionResponse {
|
|
|
864
1486
|
/**
|
|
865
1487
|
* The type of the job for the node.
|
|
866
1488
|
*/
|
|
867
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
1489
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
868
1490
|
/**
|
|
869
1491
|
* List of produced assets for this node.
|
|
870
1492
|
*/
|
|
871
1493
|
assets?: Array<Flow.Asset>;
|
|
1494
|
+
/**
|
|
1495
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
1496
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
1497
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
1498
|
+
*/
|
|
1499
|
+
count?: number;
|
|
872
1500
|
/**
|
|
873
1501
|
* The nodes that this node depends on. Only available for nodes that have
|
|
874
1502
|
* dependencies. Mainly used for user approval nodes.
|
|
875
1503
|
*/
|
|
876
1504
|
dependsOn?: Array<string>;
|
|
1505
|
+
/**
|
|
1506
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
1507
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
1508
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
1509
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
1510
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
1511
|
+
*/
|
|
1512
|
+
includeOutputsInWorkflowJob?: true;
|
|
877
1513
|
/**
|
|
878
1514
|
* The inputs of the node.
|
|
879
1515
|
*/
|
|
880
1516
|
inputs?: Array<Flow.Input>;
|
|
1517
|
+
/**
|
|
1518
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
1519
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
1520
|
+
* numbers, or asset IDs.
|
|
1521
|
+
*/
|
|
1522
|
+
items?: Array<string>;
|
|
1523
|
+
/**
|
|
1524
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
1525
|
+
* dynamically-created copies of loop body nodes.
|
|
1526
|
+
*/
|
|
1527
|
+
iterationIndex?: number;
|
|
881
1528
|
/**
|
|
882
1529
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
883
1530
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -892,10 +1539,25 @@ export declare namespace JobTriggerActionResponse {
|
|
|
892
1539
|
* The type of the logic for the node. Only available for logic nodes.
|
|
893
1540
|
*/
|
|
894
1541
|
logicType?: 'if-else';
|
|
1542
|
+
/**
|
|
1543
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
1544
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
1545
|
+
* for ForEach nodes.
|
|
1546
|
+
*/
|
|
1547
|
+
loopBodyNodeIds?: Array<string>;
|
|
1548
|
+
/**
|
|
1549
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
1550
|
+
* dynamically-created copies of loop body nodes.
|
|
1551
|
+
*/
|
|
1552
|
+
loopNodeId?: string;
|
|
895
1553
|
/**
|
|
896
1554
|
* The model id for the node. Mainly used for custom model tasks.
|
|
897
1555
|
*/
|
|
898
1556
|
modelId?: string;
|
|
1557
|
+
/**
|
|
1558
|
+
* The output of the node. Only available for logic nodes.
|
|
1559
|
+
*/
|
|
1560
|
+
output?: unknown;
|
|
899
1561
|
/**
|
|
900
1562
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
901
1563
|
*/
|
|
@@ -937,6 +1599,10 @@ export declare namespace JobTriggerActionResponse {
|
|
|
937
1599
|
* Whether this input affects the model's cost calculation
|
|
938
1600
|
*/
|
|
939
1601
|
costImpact?: boolean;
|
|
1602
|
+
/**
|
|
1603
|
+
* The default value for the input
|
|
1604
|
+
*/
|
|
1605
|
+
default?: unknown;
|
|
940
1606
|
/**
|
|
941
1607
|
* Help text displayed in the UI to provide additional information about the input
|
|
942
1608
|
*/
|
|
@@ -955,10 +1621,20 @@ export declare namespace JobTriggerActionResponse {
|
|
|
955
1621
|
* the same as the current object. This is only available for type inputs_array
|
|
956
1622
|
* inputs.
|
|
957
1623
|
*/
|
|
958
|
-
inputs?: Array<
|
|
1624
|
+
inputs?: Array<{
|
|
1625
|
+
[key: string]: unknown;
|
|
1626
|
+
}>;
|
|
1627
|
+
/**
|
|
1628
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
1629
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
1630
|
+
* type.
|
|
1631
|
+
*/
|
|
1632
|
+
items?: Array<Array<Input.Item>>;
|
|
959
1633
|
/**
|
|
960
1634
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
961
|
-
* \`file_array\` input types.
|
|
1635
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1636
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1637
|
+
* data:kind, prefix
|
|
962
1638
|
*/
|
|
963
1639
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
964
1640
|
/**
|
|
@@ -979,6 +1655,12 @@ export declare namespace JobTriggerActionResponse {
|
|
|
979
1655
|
* \`string_array\`.
|
|
980
1656
|
*/
|
|
981
1657
|
maxLength?: number;
|
|
1658
|
+
/**
|
|
1659
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1660
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1661
|
+
* creation time.
|
|
1662
|
+
*/
|
|
1663
|
+
maxSize?: number;
|
|
982
1664
|
/**
|
|
983
1665
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
984
1666
|
*/
|
|
@@ -992,7 +1674,7 @@ export declare namespace JobTriggerActionResponse {
|
|
|
992
1674
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
993
1675
|
* available for \`model_array\` input type.
|
|
994
1676
|
*/
|
|
995
|
-
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'>;
|
|
1677
|
+
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'>;
|
|
996
1678
|
/**
|
|
997
1679
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
998
1680
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -1036,8 +1718,232 @@ export declare namespace JobTriggerActionResponse {
|
|
|
1036
1718
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1037
1719
|
*/
|
|
1038
1720
|
step?: number;
|
|
1721
|
+
/**
|
|
1722
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1723
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1724
|
+
*/
|
|
1725
|
+
value?: unknown;
|
|
1039
1726
|
}
|
|
1040
1727
|
namespace Input {
|
|
1728
|
+
/**
|
|
1729
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
1730
|
+
* recursive items field.
|
|
1731
|
+
*/
|
|
1732
|
+
interface Item {
|
|
1733
|
+
/**
|
|
1734
|
+
* The name that must be user to call the model through the API
|
|
1735
|
+
*/
|
|
1736
|
+
name: string;
|
|
1737
|
+
/**
|
|
1738
|
+
* The data type of the input
|
|
1739
|
+
*/
|
|
1740
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
1741
|
+
/**
|
|
1742
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
1743
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
1744
|
+
* dropdown.
|
|
1745
|
+
*/
|
|
1746
|
+
allowedValues?: Array<unknown>;
|
|
1747
|
+
/**
|
|
1748
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
1749
|
+
* \`file_array\` input types with kind \`image\`.
|
|
1750
|
+
*/
|
|
1751
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
1752
|
+
/**
|
|
1753
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
1754
|
+
*/
|
|
1755
|
+
color?: boolean;
|
|
1756
|
+
/**
|
|
1757
|
+
* Whether this input affects the model's cost calculation
|
|
1758
|
+
*/
|
|
1759
|
+
costImpact?: boolean;
|
|
1760
|
+
/**
|
|
1761
|
+
* The default value for the input
|
|
1762
|
+
*/
|
|
1763
|
+
default?: unknown;
|
|
1764
|
+
/**
|
|
1765
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
1766
|
+
*/
|
|
1767
|
+
description?: string;
|
|
1768
|
+
/**
|
|
1769
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
1770
|
+
* value appear consecutively in the UI.
|
|
1771
|
+
*/
|
|
1772
|
+
group?: string;
|
|
1773
|
+
/**
|
|
1774
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
1775
|
+
*/
|
|
1776
|
+
hint?: string;
|
|
1777
|
+
/**
|
|
1778
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
1779
|
+
* the same as the current object. This is only available for type inputs_array
|
|
1780
|
+
* inputs.
|
|
1781
|
+
*/
|
|
1782
|
+
inputs?: Array<{
|
|
1783
|
+
[key: string]: unknown;
|
|
1784
|
+
}>;
|
|
1785
|
+
/**
|
|
1786
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
1787
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
1788
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
1789
|
+
* data:kind, prefix
|
|
1790
|
+
*/
|
|
1791
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
1792
|
+
/**
|
|
1793
|
+
* The label displayed in the UI for this input
|
|
1794
|
+
*/
|
|
1795
|
+
label?: string;
|
|
1796
|
+
/**
|
|
1797
|
+
* The name of the file input field to use as the mask source
|
|
1798
|
+
*/
|
|
1799
|
+
maskFrom?: string;
|
|
1800
|
+
/**
|
|
1801
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
1802
|
+
* types.
|
|
1803
|
+
*/
|
|
1804
|
+
max?: number;
|
|
1805
|
+
/**
|
|
1806
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
1807
|
+
* \`string_array\`.
|
|
1808
|
+
*/
|
|
1809
|
+
maxLength?: number;
|
|
1810
|
+
/**
|
|
1811
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
1812
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
1813
|
+
* creation time.
|
|
1814
|
+
*/
|
|
1815
|
+
maxSize?: number;
|
|
1816
|
+
/**
|
|
1817
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
1818
|
+
*/
|
|
1819
|
+
min?: number;
|
|
1820
|
+
/**
|
|
1821
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
1822
|
+
* \`string_array\`.
|
|
1823
|
+
*/
|
|
1824
|
+
minLength?: number;
|
|
1825
|
+
/**
|
|
1826
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
1827
|
+
* available for \`model_array\` input type.
|
|
1828
|
+
*/
|
|
1829
|
+
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'>;
|
|
1830
|
+
/**
|
|
1831
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
1832
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
1833
|
+
*
|
|
1834
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
1835
|
+
*/
|
|
1836
|
+
parent?: boolean;
|
|
1837
|
+
/**
|
|
1838
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
1839
|
+
*/
|
|
1840
|
+
placeholder?: string;
|
|
1841
|
+
/**
|
|
1842
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
1843
|
+
* spark feature. Only available for \`string\` input type.
|
|
1844
|
+
*/
|
|
1845
|
+
prompt?: boolean;
|
|
1846
|
+
/**
|
|
1847
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
1848
|
+
* type.
|
|
1849
|
+
*/
|
|
1850
|
+
promptSpark?: boolean;
|
|
1851
|
+
/**
|
|
1852
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1853
|
+
* least one of node or conditional.
|
|
1854
|
+
*/
|
|
1855
|
+
ref?: Item.Ref;
|
|
1856
|
+
/**
|
|
1857
|
+
* Set of rules that describes when this input is required:
|
|
1858
|
+
*
|
|
1859
|
+
* - \`always\`: Input is always required
|
|
1860
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1861
|
+
* defined
|
|
1862
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1863
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1864
|
+
* value
|
|
1865
|
+
*
|
|
1866
|
+
* By default, the input is not required.
|
|
1867
|
+
*/
|
|
1868
|
+
required?: Item.Required;
|
|
1869
|
+
/**
|
|
1870
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
1871
|
+
*/
|
|
1872
|
+
step?: number;
|
|
1873
|
+
/**
|
|
1874
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
1875
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
1876
|
+
*/
|
|
1877
|
+
value?: unknown;
|
|
1878
|
+
}
|
|
1879
|
+
namespace Item {
|
|
1880
|
+
/**
|
|
1881
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
1882
|
+
* least one of node or conditional.
|
|
1883
|
+
*/
|
|
1884
|
+
interface Ref {
|
|
1885
|
+
/**
|
|
1886
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
1887
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
1888
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
1889
|
+
*/
|
|
1890
|
+
conditional?: Array<string>;
|
|
1891
|
+
/**
|
|
1892
|
+
* This is the desired node output value if ref is an if/else node.
|
|
1893
|
+
*/
|
|
1894
|
+
equal?: string;
|
|
1895
|
+
/**
|
|
1896
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
1897
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
1898
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
1899
|
+
* all outputs of a node, you can use the name 'all'.
|
|
1900
|
+
*/
|
|
1901
|
+
name?: string;
|
|
1902
|
+
/**
|
|
1903
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
1904
|
+
*/
|
|
1905
|
+
node?: string;
|
|
1906
|
+
}
|
|
1907
|
+
/**
|
|
1908
|
+
* Set of rules that describes when this input is required:
|
|
1909
|
+
*
|
|
1910
|
+
* - \`always\`: Input is always required
|
|
1911
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
1912
|
+
* defined
|
|
1913
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
1914
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
1915
|
+
* value
|
|
1916
|
+
*
|
|
1917
|
+
* By default, the input is not required.
|
|
1918
|
+
*/
|
|
1919
|
+
interface Required {
|
|
1920
|
+
/**
|
|
1921
|
+
* Whether the input is always required
|
|
1922
|
+
*/
|
|
1923
|
+
always?: boolean;
|
|
1924
|
+
/**
|
|
1925
|
+
* Makes this input required when another input has a specific value:
|
|
1926
|
+
*
|
|
1927
|
+
* - Key: name of the input to check
|
|
1928
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
1929
|
+
*/
|
|
1930
|
+
conditionalValues?: unknown;
|
|
1931
|
+
/**
|
|
1932
|
+
* Makes this input required when another input is defined:
|
|
1933
|
+
*
|
|
1934
|
+
* - Key: name of the input that must be defined
|
|
1935
|
+
* - Value: message to display when this input is required
|
|
1936
|
+
*/
|
|
1937
|
+
ifDefined?: unknown;
|
|
1938
|
+
/**
|
|
1939
|
+
* Makes this input required when another input is not defined:
|
|
1940
|
+
*
|
|
1941
|
+
* - Key: name of the input that must be undefined
|
|
1942
|
+
* - Value: message to display when this input is required
|
|
1943
|
+
*/
|
|
1944
|
+
ifNotDefined?: unknown;
|
|
1945
|
+
}
|
|
1946
|
+
}
|
|
1041
1947
|
/**
|
|
1042
1948
|
* The reference to another input or output of the same workflow. Must have at
|
|
1043
1949
|
* least one of node or conditional.
|
|
@@ -1152,12 +2058,12 @@ export interface JobListParams {
|
|
|
1152
2058
|
/**
|
|
1153
2059
|
* If false, jobs containing the hideResults param will be not returned. Optional.
|
|
1154
2060
|
*/
|
|
1155
|
-
hideResults?:
|
|
2061
|
+
hideResults?: boolean;
|
|
1156
2062
|
/**
|
|
1157
2063
|
* The number of items to return in the response. The default value is 10, maximum
|
|
1158
2064
|
* value is 200, minimum value is 1
|
|
1159
2065
|
*/
|
|
1160
|
-
pageSize?:
|
|
2066
|
+
pageSize?: number;
|
|
1161
2067
|
/**
|
|
1162
2068
|
* A token you received in a previous request to query the next page of items
|
|
1163
2069
|
*/
|
|
@@ -1165,23 +2071,27 @@ export interface JobListParams {
|
|
|
1165
2071
|
/**
|
|
1166
2072
|
* The status of the jobs to return. Optional.
|
|
1167
2073
|
*/
|
|
1168
|
-
status?:
|
|
2074
|
+
status?: 'pending' | 'queued' | 'warming-up' | 'in-progress' | 'success' | 'failure' | 'canceled' | 'finalizing';
|
|
1169
2075
|
/**
|
|
1170
2076
|
* The type of the jobs to return. If "types" is defined, "type" will be ignored.
|
|
1171
2077
|
* Optional.
|
|
1172
2078
|
*/
|
|
1173
|
-
type?:
|
|
2079
|
+
type?: 'assets-download' | 'model-training' | 'flux-model-training' | 'musubi-model-training' | 'inference' | 'pixelate' | 'embed' | 'remove-background' | 'vectorize' | 'canvas-export' | 'image-generation' | 'image-prompt-editing' | 'caption' | 'generate-prompt' | 'describe-style' | 'translate' | 'detection' | 'restyle' | 'repaint' | 'reframe' | 'segment' | 'skybox-base-360' | 'skybox-upscale-360' | 'skybox-hdri' | 'skybox-3d' | 'texture' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'flux' | 'openai-image-generation' | 'upload' | 'custom' | 'mesh-preview-rendering' | 'workflow';
|
|
1174
2080
|
/**
|
|
1175
2081
|
* The types of the jobs to return. If "types" is defined, "type" will be ignored.
|
|
1176
2082
|
* Optional.
|
|
1177
2083
|
*/
|
|
1178
|
-
types?:
|
|
1179
|
-
workflowId?:
|
|
2084
|
+
types?: 'assets-download' | 'model-training' | 'flux-model-training' | 'musubi-model-training' | 'inference' | 'pixelate' | 'embed' | 'remove-background' | 'vectorize' | 'canvas-export' | 'image-generation' | 'image-prompt-editing' | 'caption' | 'generate-prompt' | 'describe-style' | 'translate' | 'detection' | 'restyle' | 'repaint' | 'reframe' | 'segment' | 'skybox-base-360' | 'skybox-upscale-360' | 'skybox-hdri' | 'skybox-3d' | 'texture' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'flux' | 'openai-image-generation' | 'upload' | 'custom' | 'mesh-preview-rendering' | 'workflow';
|
|
2085
|
+
workflowId?: unknown;
|
|
1180
2086
|
}
|
|
1181
2087
|
export interface JobTriggerActionParams {
|
|
1182
2088
|
/**
|
|
1183
|
-
*
|
|
1184
|
-
|
|
2089
|
+
* Query param: If set to true, returns the original asset without transformation
|
|
2090
|
+
*/
|
|
2091
|
+
originalAssets?: boolean;
|
|
2092
|
+
/**
|
|
2093
|
+
* Body param: The action to execute on the job, such as canceling it. Today only
|
|
2094
|
+
* cancel on inference jobs is supported.
|
|
1185
2095
|
*/
|
|
1186
2096
|
action?: 'cancel';
|
|
1187
2097
|
}
|