@scenario-labs/sdk 1.0.0 → 1.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 +25 -0
- package/README.md +0 -2
- package/client.d.mts +8 -8
- package/client.d.mts.map +1 -1
- package/client.d.ts +8 -8
- package/client.d.ts.map +1 -1
- package/client.js +17 -6
- package/client.js.map +1 -1
- package/client.mjs +17 -6
- package/client.mjs.map +1 -1
- package/index.d.mts +3 -1
- package/index.d.mts.map +1 -1
- package/index.d.ts +3 -1
- package/index.d.ts.map +1 -1
- package/index.js +8 -1
- package/index.js.map +1 -1
- package/index.mjs +3 -1
- package/index.mjs.map +1 -1
- package/internal/request-options.d.mts +0 -4
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +0 -4
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/lib/asset.d.mts +55 -0
- package/lib/asset.d.mts.map +1 -0
- package/lib/asset.d.ts +55 -0
- package/lib/asset.d.ts.map +1 -0
- package/lib/asset.js +60 -0
- package/lib/asset.js.map +1 -0
- package/lib/asset.mjs +54 -0
- package/lib/asset.mjs.map +1 -0
- package/lib/job.d.mts +13 -1
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +13 -1
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +18 -1
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +16 -0
- package/lib/job.mjs.map +1 -1
- package/lib/scenario.d.mts +12 -0
- package/lib/scenario.d.mts.map +1 -1
- package/lib/scenario.d.ts +12 -0
- package/lib/scenario.d.ts.map +1 -1
- package/lib/scenario.js +12 -0
- package/lib/scenario.js.map +1 -1
- package/lib/scenario.mjs +12 -0
- package/lib/scenario.mjs.map +1 -1
- package/lib/upload.d.mts +56 -2
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +56 -2
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +51 -2
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +48 -1
- package/lib/upload.mjs.map +1 -1
- package/lib/workflow.d.mts +2 -2
- package/lib/workflow.d.mts.map +1 -1
- package/lib/workflow.d.ts +2 -2
- package/lib/workflow.d.ts.map +1 -1
- package/lib/workflow.js +2 -2
- package/lib/workflow.js.map +1 -1
- package/lib/workflow.mjs +2 -2
- package/lib/workflow.mjs.map +1 -1
- package/package.json +1 -1
- package/resources/assets/assets.d.mts +25 -29
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +25 -29
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +0 -4
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +0 -4
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/index.d.mts +0 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +0 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js +1 -3
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs +0 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/generate.d.mts +1027 -242
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +1027 -242
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +7 -0
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +7 -0
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +3 -2
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +3 -2
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js +3 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs +1 -0
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +10 -3
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +10 -3
- package/resources/jobs.d.ts.map +1 -1
- package/resources/models/description.d.mts +2 -2
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +2 -2
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +4 -4
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +4 -4
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +20 -18
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +20 -18
- 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 +2 -2
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +2 -2
- package/resources/models/train.d.ts.map +1 -1
- package/resources/oscu.d.mts +5 -0
- package/resources/oscu.d.mts.map +1 -1
- package/resources/oscu.d.ts +5 -0
- package/resources/oscu.d.ts.map +1 -1
- package/resources/oscu.js +5 -0
- package/resources/oscu.js.map +1 -1
- package/resources/oscu.mjs +5 -0
- package/resources/oscu.mjs.map +1 -1
- package/resources/pricing/index.d.mts +3 -0
- package/resources/pricing/index.d.mts.map +1 -0
- package/resources/pricing/index.d.ts +3 -0
- package/resources/pricing/index.d.ts.map +1 -0
- package/resources/pricing/index.js +9 -0
- package/resources/pricing/index.js.map +1 -0
- package/resources/pricing/index.mjs +4 -0
- package/resources/pricing/index.mjs.map +1 -0
- package/resources/pricing/oscu.d.mts +25 -0
- package/resources/pricing/oscu.d.mts.map +1 -0
- package/resources/pricing/oscu.d.ts +25 -0
- package/resources/pricing/oscu.d.ts.map +1 -0
- package/resources/pricing/oscu.js +16 -0
- package/resources/pricing/oscu.js.map +1 -0
- package/resources/pricing/oscu.mjs +12 -0
- package/resources/pricing/oscu.mjs.map +1 -0
- package/resources/pricing/pricing.d.mts +10 -0
- package/resources/pricing/pricing.d.mts.map +1 -0
- package/resources/pricing/pricing.d.ts +10 -0
- package/resources/pricing/pricing.d.ts.map +1 -0
- package/resources/pricing/pricing.js +17 -0
- package/resources/pricing/pricing.js.map +1 -0
- package/resources/pricing/pricing.mjs +12 -0
- package/resources/pricing/pricing.mjs.map +1 -0
- package/resources/pricing.d.mts +2 -0
- package/resources/pricing.d.mts.map +1 -0
- package/resources/pricing.d.ts +2 -0
- package/resources/pricing.d.ts.map +1 -0
- package/resources/pricing.js +6 -0
- package/resources/pricing.js.map +1 -0
- package/resources/pricing.mjs +3 -0
- package/resources/pricing.mjs.map +1 -0
- package/resources/usages.d.mts +8 -6
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +8 -6
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +1156 -1142
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +1156 -1142
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +13 -6
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +13 -6
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +28 -11
- package/src/index.ts +3 -1
- package/src/internal/request-options.ts +0 -2
- package/src/lib/asset.ts +85 -0
- package/src/lib/job.ts +28 -1
- package/src/lib/scenario.ts +12 -0
- package/src/lib/upload.ts +96 -2
- package/src/lib/workflow.ts +4 -4
- package/src/resources/assets/assets.ts +46 -20
- package/src/resources/assets/index.ts +0 -6
- package/src/resources/generate.ts +1227 -136
- package/src/resources/index.ts +5 -1
- package/src/resources/jobs.ts +12 -4
- package/src/resources/models/description.ts +4 -0
- package/src/resources/models/examples.ts +8 -0
- package/src/resources/models/models.ts +65 -11
- package/src/resources/models/train.ts +4 -0
- package/src/resources/oscu.ts +5 -0
- package/src/resources/pricing/index.ts +4 -0
- package/src/resources/pricing/oscu.ts +35 -0
- package/src/resources/pricing/pricing.ts +15 -0
- package/src/resources/pricing.ts +3 -0
- package/src/resources/usages.ts +12 -3
- package/src/resources/workflows.ts +1540 -1522
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
- package/resources/assets/public.d.mts +0 -1538
- package/resources/assets/public.d.mts.map +0 -1
- package/resources/assets/public.d.ts +0 -1538
- package/resources/assets/public.d.ts.map +0 -1
- package/resources/assets/public.js +0 -28
- package/resources/assets/public.js.map +0 -1
- package/resources/assets/public.mjs +0 -24
- package/resources/assets/public.mjs.map +0 -1
- package/src/resources/assets/public.ts +0 -2451
|
@@ -24,9 +24,9 @@ export declare class Workflows extends APIResource {
|
|
|
24
24
|
*/
|
|
25
25
|
delete(workflowID: string, options?: RequestOptions): APIPromise<unknown>;
|
|
26
26
|
/**
|
|
27
|
-
*
|
|
27
|
+
* @deprecated Use `userApproval()` instead
|
|
28
28
|
*/
|
|
29
|
-
approveUser(workflowID: string, body:
|
|
29
|
+
approveUser: (workflowID: string, body: WorkflowUserApprovalParams, options?: RequestOptions) => APIPromise<WorkflowUserApprovalResponse>;
|
|
30
30
|
/**
|
|
31
31
|
* Get all unique tags from workflows in a project (all privacy levels). Optionally
|
|
32
32
|
* filter by status.
|
|
@@ -36,6 +36,10 @@ export declare class Workflows extends APIResource {
|
|
|
36
36
|
* Run a workflow
|
|
37
37
|
*/
|
|
38
38
|
run(workflowID: string, params: WorkflowRunParams, options?: RequestOptions): APIPromise<WorkflowRunResponse>;
|
|
39
|
+
/**
|
|
40
|
+
* Approve a user approval node in a workflow
|
|
41
|
+
*/
|
|
42
|
+
userApproval(workflowID: string, body: WorkflowUserApprovalParams, options?: RequestOptions): APIPromise<WorkflowUserApprovalResponse>;
|
|
39
43
|
}
|
|
40
44
|
export type WorkflowListResponsesWorkflowsCursor = WorkflowsCursor<WorkflowListResponse>;
|
|
41
45
|
export interface WorkflowCreateResponse {
|
|
@@ -3974,10 +3978,17 @@ export declare namespace WorkflowListResponse {
|
|
|
3974
3978
|
}
|
|
3975
3979
|
}
|
|
3976
3980
|
export type WorkflowDeleteResponse = unknown;
|
|
3977
|
-
export interface
|
|
3978
|
-
|
|
3981
|
+
export interface WorkflowGetTagsResponse {
|
|
3982
|
+
/**
|
|
3983
|
+
* Array of unique tags from workflows in the project
|
|
3984
|
+
*/
|
|
3985
|
+
tags: Array<string>;
|
|
3986
|
+
}
|
|
3987
|
+
export interface WorkflowRunResponse {
|
|
3988
|
+
job: WorkflowRunResponse.Job;
|
|
3989
|
+
workflow: WorkflowRunResponse.Workflow;
|
|
3979
3990
|
}
|
|
3980
|
-
export declare namespace
|
|
3991
|
+
export declare namespace WorkflowRunResponse {
|
|
3981
3992
|
interface Job {
|
|
3982
3993
|
/**
|
|
3983
3994
|
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
@@ -4649,212 +4660,349 @@ export declare namespace WorkflowApproveUserResponse {
|
|
|
4649
4660
|
cuDiscount: number;
|
|
4650
4661
|
}
|
|
4651
4662
|
}
|
|
4652
|
-
|
|
4653
|
-
export interface WorkflowGetTagsResponse {
|
|
4654
|
-
/**
|
|
4655
|
-
* Array of unique tags from workflows in the project
|
|
4656
|
-
*/
|
|
4657
|
-
tags: Array<string>;
|
|
4658
|
-
}
|
|
4659
|
-
export interface WorkflowRunResponse {
|
|
4660
|
-
job: WorkflowRunResponse.Job;
|
|
4661
|
-
workflow: WorkflowRunResponse.Workflow;
|
|
4662
|
-
}
|
|
4663
|
-
export declare namespace WorkflowRunResponse {
|
|
4664
|
-
interface Job {
|
|
4663
|
+
interface Workflow {
|
|
4665
4664
|
/**
|
|
4666
|
-
*
|
|
4665
|
+
* Unique identifier of the workflow.
|
|
4666
|
+
*/
|
|
4667
|
+
id: string;
|
|
4668
|
+
/**
|
|
4669
|
+
* User that created the workflow.
|
|
4670
|
+
*/
|
|
4671
|
+
authorId: string;
|
|
4672
|
+
/**
|
|
4673
|
+
* ISO string
|
|
4667
4674
|
*/
|
|
4668
4675
|
createdAt: string;
|
|
4669
4676
|
/**
|
|
4670
|
-
*
|
|
4677
|
+
* Full description of what the workflow does.
|
|
4671
4678
|
*/
|
|
4672
|
-
|
|
4679
|
+
description: string;
|
|
4673
4680
|
/**
|
|
4674
|
-
* The
|
|
4681
|
+
* The UI data about the workflow. This is managed by scenario webapp.
|
|
4675
4682
|
*/
|
|
4676
|
-
|
|
4683
|
+
editorInfo: {
|
|
4684
|
+
[key: string]: unknown;
|
|
4685
|
+
};
|
|
4677
4686
|
/**
|
|
4678
|
-
*
|
|
4687
|
+
* The flow of the workflow.
|
|
4679
4688
|
*/
|
|
4680
|
-
|
|
4689
|
+
flow: Array<Workflow.Flow>;
|
|
4681
4690
|
/**
|
|
4682
|
-
*
|
|
4691
|
+
* The inputs of the workflow.
|
|
4683
4692
|
*/
|
|
4684
|
-
|
|
4693
|
+
inputs: Array<Workflow.Input>;
|
|
4685
4694
|
/**
|
|
4686
|
-
*
|
|
4695
|
+
* Human-readable name of the workflow.
|
|
4687
4696
|
*/
|
|
4688
|
-
|
|
4697
|
+
name: string;
|
|
4689
4698
|
/**
|
|
4690
|
-
*
|
|
4691
|
-
* date of when the job reached each statuses.
|
|
4699
|
+
* Project that owns the workflow.
|
|
4692
4700
|
*/
|
|
4693
|
-
|
|
4701
|
+
ownerId: string;
|
|
4694
4702
|
/**
|
|
4695
|
-
*
|
|
4703
|
+
* Visibility setting for the workflow.
|
|
4704
|
+
*/
|
|
4705
|
+
privacy: 'private' | 'public' | 'unlisted';
|
|
4706
|
+
/**
|
|
4707
|
+
* Short summary of the workflow.
|
|
4708
|
+
*/
|
|
4709
|
+
shortDescription: string;
|
|
4710
|
+
/**
|
|
4711
|
+
* Current lifecycle status (draft, ready, deleted).
|
|
4712
|
+
*/
|
|
4713
|
+
status: 'deleted' | 'draft' | 'ready';
|
|
4714
|
+
/**
|
|
4715
|
+
* The tag set of the workflow.
|
|
4716
|
+
*/
|
|
4717
|
+
tagSet: Array<string>;
|
|
4718
|
+
/**
|
|
4719
|
+
* ISO string
|
|
4696
4720
|
*/
|
|
4697
4721
|
updatedAt: string;
|
|
4698
4722
|
/**
|
|
4699
|
-
*
|
|
4723
|
+
* A representation of an asset after being processed by the workflow
|
|
4700
4724
|
*/
|
|
4701
|
-
|
|
4725
|
+
after?: Workflow.After;
|
|
4702
4726
|
/**
|
|
4703
|
-
*
|
|
4727
|
+
* A representation of an asset before being processed by the workflow
|
|
4704
4728
|
*/
|
|
4705
|
-
|
|
4729
|
+
before?: Workflow.Before;
|
|
4706
4730
|
/**
|
|
4707
|
-
*
|
|
4731
|
+
* Embedding is a map of embedding version into embedding date
|
|
4708
4732
|
*/
|
|
4709
|
-
|
|
4710
|
-
}
|
|
4711
|
-
namespace Job {
|
|
4733
|
+
embedding?: unknown;
|
|
4712
4734
|
/**
|
|
4713
|
-
*
|
|
4735
|
+
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
4736
|
+
* except by the author or a project admin.
|
|
4714
4737
|
*/
|
|
4715
|
-
|
|
4738
|
+
isLocked?: boolean;
|
|
4739
|
+
lastIndexedAt?: string;
|
|
4740
|
+
/**
|
|
4741
|
+
* The type of indexing operation to perform in MeiliSearch
|
|
4742
|
+
*/
|
|
4743
|
+
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
4744
|
+
/**
|
|
4745
|
+
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
4746
|
+
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
4747
|
+
* in the Ready state.
|
|
4748
|
+
*/
|
|
4749
|
+
lastReadyFlowUpdatedAt?: string;
|
|
4750
|
+
/**
|
|
4751
|
+
* ISO string timestamp when lock state was last changed.
|
|
4752
|
+
*/
|
|
4753
|
+
lockedStateChangedAt?: string;
|
|
4754
|
+
/**
|
|
4755
|
+
* UserId of the user who last changed the lock state.
|
|
4756
|
+
*/
|
|
4757
|
+
lockedStateChangedBy?: string;
|
|
4758
|
+
/**
|
|
4759
|
+
* Asset kinds produced by this workflow (if specified).
|
|
4760
|
+
*/
|
|
4761
|
+
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
4762
|
+
/**
|
|
4763
|
+
* Currently the thumbnail is identical to the after asset.
|
|
4764
|
+
*/
|
|
4765
|
+
thumbnail?: Workflow.Thumbnail;
|
|
4766
|
+
/**
|
|
4767
|
+
* The UI configuration for the workflow. This is managed by scenario webapp.
|
|
4768
|
+
*/
|
|
4769
|
+
uiConfig?: Workflow.UiConfig;
|
|
4770
|
+
}
|
|
4771
|
+
namespace Workflow {
|
|
4772
|
+
interface Flow {
|
|
4716
4773
|
/**
|
|
4717
|
-
*
|
|
4774
|
+
* The id of the node.
|
|
4718
4775
|
*/
|
|
4719
|
-
|
|
4776
|
+
id: string;
|
|
4720
4777
|
/**
|
|
4721
|
-
*
|
|
4778
|
+
* The type of the job for the node.
|
|
4722
4779
|
*/
|
|
4723
|
-
|
|
4780
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
4724
4781
|
/**
|
|
4725
|
-
*
|
|
4782
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
4783
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
4784
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
4726
4785
|
*/
|
|
4727
|
-
|
|
4786
|
+
count?: number;
|
|
4728
4787
|
/**
|
|
4729
|
-
*
|
|
4788
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
4789
|
+
* dependencies. Mainly used for user approval nodes.
|
|
4730
4790
|
*/
|
|
4731
|
-
|
|
4791
|
+
dependsOn?: Array<string>;
|
|
4732
4792
|
/**
|
|
4733
|
-
*
|
|
4793
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
4794
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
4795
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
4796
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
4797
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
4734
4798
|
*/
|
|
4735
|
-
|
|
4736
|
-
[key: string]: unknown;
|
|
4737
|
-
};
|
|
4799
|
+
includeOutputsInWorkflowJob?: true;
|
|
4738
4800
|
/**
|
|
4739
|
-
*
|
|
4740
|
-
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
4741
|
-
* results.
|
|
4801
|
+
* The inputs of the node.
|
|
4742
4802
|
*/
|
|
4743
|
-
|
|
4744
|
-
[key: string]: unknown;
|
|
4745
|
-
};
|
|
4803
|
+
inputs?: Array<Flow.Input>;
|
|
4746
4804
|
/**
|
|
4747
|
-
*
|
|
4805
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
4806
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
4807
|
+
* numbers, or asset IDs.
|
|
4748
4808
|
*/
|
|
4749
|
-
|
|
4809
|
+
items?: Array<string>;
|
|
4750
4810
|
/**
|
|
4751
|
-
*
|
|
4811
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
4812
|
+
* dynamically-created copies of loop body nodes.
|
|
4752
4813
|
*/
|
|
4753
|
-
|
|
4814
|
+
iterationIndex?: number;
|
|
4754
4815
|
/**
|
|
4755
|
-
* The
|
|
4816
|
+
* The logic of the node. Only available for logic nodes.
|
|
4756
4817
|
*/
|
|
4757
|
-
|
|
4818
|
+
logic?: Flow.Logic;
|
|
4819
|
+
/**
|
|
4820
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
4821
|
+
*/
|
|
4822
|
+
logicType?: 'if-else';
|
|
4823
|
+
/**
|
|
4824
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
4825
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
4826
|
+
* for ForEach nodes.
|
|
4827
|
+
*/
|
|
4828
|
+
loopBodyNodeIds?: Array<string>;
|
|
4829
|
+
/**
|
|
4830
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
4831
|
+
* dynamically-created copies of loop body nodes.
|
|
4832
|
+
*/
|
|
4833
|
+
loopNodeId?: string;
|
|
4834
|
+
/**
|
|
4835
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
4836
|
+
*/
|
|
4837
|
+
modelId?: string;
|
|
4838
|
+
/**
|
|
4839
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
4840
|
+
*/
|
|
4841
|
+
workflowId?: string;
|
|
4758
4842
|
}
|
|
4759
|
-
namespace
|
|
4760
|
-
|
|
4843
|
+
namespace Flow {
|
|
4844
|
+
/**
|
|
4845
|
+
* This is used to run the flow.
|
|
4846
|
+
*/
|
|
4847
|
+
interface Input {
|
|
4761
4848
|
/**
|
|
4762
|
-
* The
|
|
4849
|
+
* The name that must be user to call the model through the API
|
|
4763
4850
|
*/
|
|
4764
|
-
|
|
4851
|
+
name: string;
|
|
4765
4852
|
/**
|
|
4766
|
-
* The
|
|
4853
|
+
* The data type of the input
|
|
4767
4854
|
*/
|
|
4768
|
-
|
|
4855
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
4769
4856
|
/**
|
|
4770
|
-
* The
|
|
4857
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
4858
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
4859
|
+
* dropdown.
|
|
4771
4860
|
*/
|
|
4772
|
-
|
|
4861
|
+
allowedValues?: Array<unknown>;
|
|
4773
4862
|
/**
|
|
4774
|
-
*
|
|
4863
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
4864
|
+
* \`file_array\` input types with kind \`image\`.
|
|
4775
4865
|
*/
|
|
4776
|
-
|
|
4866
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
4777
4867
|
/**
|
|
4778
|
-
*
|
|
4779
|
-
* `count` times regardless of array input. When not set, the loop iterates over
|
|
4780
|
-
* the resolved array input. Only available for ForEach nodes.
|
|
4868
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
4781
4869
|
*/
|
|
4782
|
-
|
|
4870
|
+
color?: boolean;
|
|
4783
4871
|
/**
|
|
4784
|
-
*
|
|
4785
|
-
* dependencies. Mainly used for user approval nodes.
|
|
4872
|
+
* Whether this input affects the model's cost calculation
|
|
4786
4873
|
*/
|
|
4787
|
-
|
|
4874
|
+
costImpact?: boolean;
|
|
4788
4875
|
/**
|
|
4789
|
-
*
|
|
4790
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
4791
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
4792
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
4793
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
4876
|
+
* The default value for the input
|
|
4794
4877
|
*/
|
|
4795
|
-
|
|
4878
|
+
default?: unknown;
|
|
4796
4879
|
/**
|
|
4797
|
-
*
|
|
4880
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
4798
4881
|
*/
|
|
4799
|
-
|
|
4882
|
+
description?: string;
|
|
4800
4883
|
/**
|
|
4801
|
-
*
|
|
4802
|
-
*
|
|
4803
|
-
* numbers, or asset IDs.
|
|
4884
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
4885
|
+
* value appear consecutively in the UI.
|
|
4804
4886
|
*/
|
|
4805
|
-
|
|
4887
|
+
group?: string;
|
|
4806
4888
|
/**
|
|
4807
|
-
*
|
|
4808
|
-
* dynamically-created copies of loop body nodes.
|
|
4889
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
4809
4890
|
*/
|
|
4810
|
-
|
|
4891
|
+
hint?: string;
|
|
4811
4892
|
/**
|
|
4812
|
-
*
|
|
4813
|
-
*
|
|
4814
|
-
*
|
|
4893
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
4894
|
+
* the same as the current object. This is only available for type inputs_array
|
|
4895
|
+
* inputs.
|
|
4815
4896
|
*/
|
|
4816
|
-
|
|
4897
|
+
inputs?: Array<{
|
|
4898
|
+
[key: string]: unknown;
|
|
4899
|
+
}>;
|
|
4817
4900
|
/**
|
|
4818
|
-
* The
|
|
4901
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
4902
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
4903
|
+
* type.
|
|
4819
4904
|
*/
|
|
4820
|
-
|
|
4905
|
+
items?: Array<Array<Input.Item>>;
|
|
4821
4906
|
/**
|
|
4822
|
-
* The
|
|
4907
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4908
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4909
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
4910
|
+
* data:kind, prefix
|
|
4823
4911
|
*/
|
|
4824
|
-
|
|
4912
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
4825
4913
|
/**
|
|
4826
|
-
*
|
|
4827
|
-
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
4828
|
-
* for ForEach nodes.
|
|
4914
|
+
* The label displayed in the UI for this input
|
|
4829
4915
|
*/
|
|
4830
|
-
|
|
4916
|
+
label?: string;
|
|
4831
4917
|
/**
|
|
4832
|
-
*
|
|
4833
|
-
* dynamically-created copies of loop body nodes.
|
|
4918
|
+
* The name of the file input field to use as the mask source
|
|
4834
4919
|
*/
|
|
4835
|
-
|
|
4920
|
+
maskFrom?: string;
|
|
4836
4921
|
/**
|
|
4837
|
-
* The
|
|
4922
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
4923
|
+
* types.
|
|
4838
4924
|
*/
|
|
4839
|
-
|
|
4925
|
+
max?: number;
|
|
4840
4926
|
/**
|
|
4841
|
-
* The
|
|
4927
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4928
|
+
* \`string_array\`.
|
|
4842
4929
|
*/
|
|
4843
|
-
|
|
4930
|
+
maxLength?: number;
|
|
4844
4931
|
/**
|
|
4845
|
-
* The
|
|
4932
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
4933
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
4934
|
+
* creation time.
|
|
4846
4935
|
*/
|
|
4847
|
-
|
|
4936
|
+
maxSize?: number;
|
|
4937
|
+
/**
|
|
4938
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
4939
|
+
*/
|
|
4940
|
+
min?: number;
|
|
4941
|
+
/**
|
|
4942
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
4943
|
+
* \`string_array\`.
|
|
4944
|
+
*/
|
|
4945
|
+
minLength?: number;
|
|
4946
|
+
/**
|
|
4947
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
4948
|
+
* available for \`model_array\` input type.
|
|
4949
|
+
*/
|
|
4950
|
+
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'>;
|
|
4951
|
+
/**
|
|
4952
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
4953
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
4954
|
+
*
|
|
4955
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
4956
|
+
*/
|
|
4957
|
+
parent?: boolean;
|
|
4958
|
+
/**
|
|
4959
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
4960
|
+
*/
|
|
4961
|
+
placeholder?: string;
|
|
4962
|
+
/**
|
|
4963
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
4964
|
+
* spark feature. Only available for \`string\` input type.
|
|
4965
|
+
*/
|
|
4966
|
+
prompt?: boolean;
|
|
4967
|
+
/**
|
|
4968
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
4969
|
+
* type.
|
|
4970
|
+
*/
|
|
4971
|
+
promptSpark?: boolean;
|
|
4972
|
+
/**
|
|
4973
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
4974
|
+
* least one of node or conditional.
|
|
4975
|
+
*/
|
|
4976
|
+
ref?: Input.Ref;
|
|
4977
|
+
/**
|
|
4978
|
+
* Set of rules that describes when this input is required:
|
|
4979
|
+
*
|
|
4980
|
+
* - \`always\`: Input is always required
|
|
4981
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4982
|
+
* defined
|
|
4983
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4984
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4985
|
+
* value
|
|
4986
|
+
*
|
|
4987
|
+
* By default, the input is not required.
|
|
4988
|
+
*/
|
|
4989
|
+
required?: Input.Required;
|
|
4990
|
+
/**
|
|
4991
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
4992
|
+
*/
|
|
4993
|
+
step?: number;
|
|
4994
|
+
/**
|
|
4995
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
4996
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
4997
|
+
*/
|
|
4998
|
+
value?: unknown;
|
|
4848
4999
|
}
|
|
4849
|
-
namespace
|
|
4850
|
-
interface Asset {
|
|
4851
|
-
assetId: string;
|
|
4852
|
-
url: string;
|
|
4853
|
-
}
|
|
5000
|
+
namespace Input {
|
|
4854
5001
|
/**
|
|
4855
|
-
*
|
|
5002
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
5003
|
+
* recursive items field.
|
|
4856
5004
|
*/
|
|
4857
|
-
interface
|
|
5005
|
+
interface Item {
|
|
4858
5006
|
/**
|
|
4859
5007
|
* The name that must be user to call the model through the API
|
|
4860
5008
|
*/
|
|
@@ -4907,12 +5055,6 @@ export declare namespace WorkflowRunResponse {
|
|
|
4907
5055
|
inputs?: Array<{
|
|
4908
5056
|
[key: string]: unknown;
|
|
4909
5057
|
}>;
|
|
4910
|
-
/**
|
|
4911
|
-
* The configured items for inputs_array type inputs. Each item is an array of
|
|
4912
|
-
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
4913
|
-
* type.
|
|
4914
|
-
*/
|
|
4915
|
-
items?: Array<Array<Input.Item>>;
|
|
4916
5058
|
/**
|
|
4917
5059
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4918
5060
|
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
@@ -4983,7 +5125,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
4983
5125
|
* The reference to another input or output of the same workflow. Must have at
|
|
4984
5126
|
* least one of node or conditional.
|
|
4985
5127
|
*/
|
|
4986
|
-
ref?:
|
|
5128
|
+
ref?: Item.Ref;
|
|
4987
5129
|
/**
|
|
4988
5130
|
* Set of rules that describes when this input is required:
|
|
4989
5131
|
*
|
|
@@ -4996,7 +5138,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
4996
5138
|
*
|
|
4997
5139
|
* By default, the input is not required.
|
|
4998
5140
|
*/
|
|
4999
|
-
required?:
|
|
5141
|
+
required?: Item.Required;
|
|
5000
5142
|
/**
|
|
5001
5143
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
5002
5144
|
*/
|
|
@@ -5007,674 +5149,696 @@ export declare namespace WorkflowRunResponse {
|
|
|
5007
5149
|
*/
|
|
5008
5150
|
value?: unknown;
|
|
5009
5151
|
}
|
|
5010
|
-
namespace
|
|
5152
|
+
namespace Item {
|
|
5011
5153
|
/**
|
|
5012
|
-
*
|
|
5013
|
-
*
|
|
5154
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
5155
|
+
* least one of node or conditional.
|
|
5014
5156
|
*/
|
|
5015
|
-
interface
|
|
5016
|
-
/**
|
|
5017
|
-
* The name that must be user to call the model through the API
|
|
5018
|
-
*/
|
|
5019
|
-
name: string;
|
|
5020
|
-
/**
|
|
5021
|
-
* The data type of the input
|
|
5022
|
-
*/
|
|
5023
|
-
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
5024
|
-
/**
|
|
5025
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
5026
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
5027
|
-
* dropdown.
|
|
5028
|
-
*/
|
|
5029
|
-
allowedValues?: Array<unknown>;
|
|
5030
|
-
/**
|
|
5031
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
5032
|
-
* \`file_array\` input types with kind \`image\`.
|
|
5033
|
-
*/
|
|
5034
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
5035
|
-
/**
|
|
5036
|
-
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
5037
|
-
*/
|
|
5038
|
-
color?: boolean;
|
|
5039
|
-
/**
|
|
5040
|
-
* Whether this input affects the model's cost calculation
|
|
5041
|
-
*/
|
|
5042
|
-
costImpact?: boolean;
|
|
5043
|
-
/**
|
|
5044
|
-
* The default value for the input
|
|
5045
|
-
*/
|
|
5046
|
-
default?: unknown;
|
|
5157
|
+
interface Ref {
|
|
5047
5158
|
/**
|
|
5048
|
-
*
|
|
5159
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5160
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5161
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5049
5162
|
*/
|
|
5050
|
-
|
|
5163
|
+
conditional?: Array<string>;
|
|
5051
5164
|
/**
|
|
5052
|
-
*
|
|
5053
|
-
* value appear consecutively in the UI.
|
|
5165
|
+
* This is the desired node output value if ref is an if/else node.
|
|
5054
5166
|
*/
|
|
5055
|
-
|
|
5167
|
+
equal?: string;
|
|
5056
5168
|
/**
|
|
5057
|
-
*
|
|
5169
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5170
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5171
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5172
|
+
* all outputs of a node, you can use the name 'all'.
|
|
5058
5173
|
*/
|
|
5059
|
-
|
|
5174
|
+
name?: string;
|
|
5060
5175
|
/**
|
|
5061
|
-
* The
|
|
5062
|
-
* the same as the current object. This is only available for type inputs_array
|
|
5063
|
-
* inputs.
|
|
5176
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
5064
5177
|
*/
|
|
5065
|
-
|
|
5066
|
-
|
|
5067
|
-
|
|
5178
|
+
node?: string;
|
|
5179
|
+
}
|
|
5180
|
+
/**
|
|
5181
|
+
* Set of rules that describes when this input is required:
|
|
5182
|
+
*
|
|
5183
|
+
* - \`always\`: Input is always required
|
|
5184
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5185
|
+
* defined
|
|
5186
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5187
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5188
|
+
* value
|
|
5189
|
+
*
|
|
5190
|
+
* By default, the input is not required.
|
|
5191
|
+
*/
|
|
5192
|
+
interface Required {
|
|
5068
5193
|
/**
|
|
5069
|
-
*
|
|
5070
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
5071
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
5072
|
-
* data:kind, prefix
|
|
5194
|
+
* Whether the input is always required
|
|
5073
5195
|
*/
|
|
5074
|
-
|
|
5196
|
+
always?: boolean;
|
|
5075
5197
|
/**
|
|
5076
|
-
*
|
|
5198
|
+
* Makes this input required when another input has a specific value:
|
|
5199
|
+
*
|
|
5200
|
+
* - Key: name of the input to check
|
|
5201
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
5077
5202
|
*/
|
|
5078
|
-
|
|
5203
|
+
conditionalValues?: unknown;
|
|
5079
5204
|
/**
|
|
5080
|
-
*
|
|
5205
|
+
* Makes this input required when another input is defined:
|
|
5206
|
+
*
|
|
5207
|
+
* - Key: name of the input that must be defined
|
|
5208
|
+
* - Value: message to display when this input is required
|
|
5081
5209
|
*/
|
|
5082
|
-
|
|
5210
|
+
ifDefined?: unknown;
|
|
5083
5211
|
/**
|
|
5084
|
-
*
|
|
5085
|
-
*
|
|
5212
|
+
* Makes this input required when another input is not defined:
|
|
5213
|
+
*
|
|
5214
|
+
* - Key: name of the input that must be undefined
|
|
5215
|
+
* - Value: message to display when this input is required
|
|
5086
5216
|
*/
|
|
5087
|
-
|
|
5088
|
-
/**
|
|
5089
|
-
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5090
|
-
* \`string_array\`.
|
|
5091
|
-
*/
|
|
5092
|
-
maxLength?: number;
|
|
5093
|
-
/**
|
|
5094
|
-
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
5095
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5096
|
-
* creation time.
|
|
5097
|
-
*/
|
|
5098
|
-
maxSize?: number;
|
|
5099
|
-
/**
|
|
5100
|
-
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
5101
|
-
*/
|
|
5102
|
-
min?: number;
|
|
5103
|
-
/**
|
|
5104
|
-
* The minimum allowed length for string inputs. Also applies to each item in
|
|
5105
|
-
* \`string_array\`.
|
|
5106
|
-
*/
|
|
5107
|
-
minLength?: number;
|
|
5108
|
-
/**
|
|
5109
|
-
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
5110
|
-
* available for \`model_array\` input type.
|
|
5111
|
-
*/
|
|
5112
|
-
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'>;
|
|
5113
|
-
/**
|
|
5114
|
-
* Whether this input represents a parent asset to assign to the produced assets.
|
|
5115
|
-
* Only available for \`file\` and \`file_array\` input types.
|
|
5116
|
-
*
|
|
5117
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
5118
|
-
*/
|
|
5119
|
-
parent?: boolean;
|
|
5120
|
-
/**
|
|
5121
|
-
* Placeholder text for the input. Only available for 'string' input type.
|
|
5122
|
-
*/
|
|
5123
|
-
placeholder?: string;
|
|
5124
|
-
/**
|
|
5125
|
-
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
5126
|
-
* spark feature. Only available for \`string\` input type.
|
|
5127
|
-
*/
|
|
5128
|
-
prompt?: boolean;
|
|
5129
|
-
/**
|
|
5130
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
5131
|
-
* type.
|
|
5132
|
-
*/
|
|
5133
|
-
promptSpark?: boolean;
|
|
5134
|
-
/**
|
|
5135
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
5136
|
-
* least one of node or conditional.
|
|
5137
|
-
*/
|
|
5138
|
-
ref?: Item.Ref;
|
|
5139
|
-
/**
|
|
5140
|
-
* Set of rules that describes when this input is required:
|
|
5141
|
-
*
|
|
5142
|
-
* - \`always\`: Input is always required
|
|
5143
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5144
|
-
* defined
|
|
5145
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5146
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5147
|
-
* value
|
|
5148
|
-
*
|
|
5149
|
-
* By default, the input is not required.
|
|
5150
|
-
*/
|
|
5151
|
-
required?: Item.Required;
|
|
5152
|
-
/**
|
|
5153
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
5154
|
-
*/
|
|
5155
|
-
step?: number;
|
|
5156
|
-
/**
|
|
5157
|
-
* The value of the input. This is the value of the input that will be used to run
|
|
5158
|
-
* the node. Only available for flows managed by a WorkflowJob.
|
|
5159
|
-
*/
|
|
5160
|
-
value?: unknown;
|
|
5161
|
-
}
|
|
5162
|
-
namespace Item {
|
|
5163
|
-
/**
|
|
5164
|
-
* The reference to another input or output of the same workflow. Must have at
|
|
5165
|
-
* least one of node or conditional.
|
|
5166
|
-
*/
|
|
5167
|
-
interface Ref {
|
|
5168
|
-
/**
|
|
5169
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5170
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5171
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5172
|
-
*/
|
|
5173
|
-
conditional?: Array<string>;
|
|
5174
|
-
/**
|
|
5175
|
-
* This is the desired node output value if ref is an if/else node.
|
|
5176
|
-
*/
|
|
5177
|
-
equal?: string;
|
|
5178
|
-
/**
|
|
5179
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5180
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5181
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5182
|
-
* all outputs of a node, you can use the name 'all'.
|
|
5183
|
-
*/
|
|
5184
|
-
name?: string;
|
|
5185
|
-
/**
|
|
5186
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
5187
|
-
*/
|
|
5188
|
-
node?: string;
|
|
5189
|
-
}
|
|
5190
|
-
/**
|
|
5191
|
-
* Set of rules that describes when this input is required:
|
|
5192
|
-
*
|
|
5193
|
-
* - \`always\`: Input is always required
|
|
5194
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5195
|
-
* defined
|
|
5196
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5197
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5198
|
-
* value
|
|
5199
|
-
*
|
|
5200
|
-
* By default, the input is not required.
|
|
5201
|
-
*/
|
|
5202
|
-
interface Required {
|
|
5203
|
-
/**
|
|
5204
|
-
* Whether the input is always required
|
|
5205
|
-
*/
|
|
5206
|
-
always?: boolean;
|
|
5207
|
-
/**
|
|
5208
|
-
* Makes this input required when another input has a specific value:
|
|
5209
|
-
*
|
|
5210
|
-
* - Key: name of the input to check
|
|
5211
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
5212
|
-
*/
|
|
5213
|
-
conditionalValues?: unknown;
|
|
5214
|
-
/**
|
|
5215
|
-
* Makes this input required when another input is defined:
|
|
5216
|
-
*
|
|
5217
|
-
* - Key: name of the input that must be defined
|
|
5218
|
-
* - Value: message to display when this input is required
|
|
5219
|
-
*/
|
|
5220
|
-
ifDefined?: unknown;
|
|
5221
|
-
/**
|
|
5222
|
-
* Makes this input required when another input is not defined:
|
|
5223
|
-
*
|
|
5224
|
-
* - Key: name of the input that must be undefined
|
|
5225
|
-
* - Value: message to display when this input is required
|
|
5226
|
-
*/
|
|
5227
|
-
ifNotDefined?: unknown;
|
|
5228
|
-
}
|
|
5217
|
+
ifNotDefined?: unknown;
|
|
5229
5218
|
}
|
|
5219
|
+
}
|
|
5220
|
+
/**
|
|
5221
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
5222
|
+
* least one of node or conditional.
|
|
5223
|
+
*/
|
|
5224
|
+
interface Ref {
|
|
5230
5225
|
/**
|
|
5231
|
-
* The
|
|
5232
|
-
*
|
|
5226
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5227
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5228
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5233
5229
|
*/
|
|
5234
|
-
|
|
5235
|
-
/**
|
|
5236
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5237
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5238
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5239
|
-
*/
|
|
5240
|
-
conditional?: Array<string>;
|
|
5241
|
-
/**
|
|
5242
|
-
* This is the desired node output value if ref is an if/else node.
|
|
5243
|
-
*/
|
|
5244
|
-
equal?: string;
|
|
5245
|
-
/**
|
|
5246
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5247
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5248
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5249
|
-
* all outputs of a node, you can use the name 'all'.
|
|
5250
|
-
*/
|
|
5251
|
-
name?: string;
|
|
5252
|
-
/**
|
|
5253
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
5254
|
-
*/
|
|
5255
|
-
node?: string;
|
|
5256
|
-
}
|
|
5230
|
+
conditional?: Array<string>;
|
|
5257
5231
|
/**
|
|
5258
|
-
*
|
|
5259
|
-
*
|
|
5260
|
-
* - \`always\`: Input is always required
|
|
5261
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5262
|
-
* defined
|
|
5263
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5264
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5265
|
-
* value
|
|
5266
|
-
*
|
|
5267
|
-
* By default, the input is not required.
|
|
5232
|
+
* This is the desired node output value if ref is an if/else node.
|
|
5268
5233
|
*/
|
|
5269
|
-
|
|
5270
|
-
|
|
5271
|
-
|
|
5272
|
-
|
|
5273
|
-
|
|
5274
|
-
|
|
5275
|
-
|
|
5276
|
-
|
|
5277
|
-
|
|
5278
|
-
|
|
5279
|
-
|
|
5280
|
-
|
|
5281
|
-
/**
|
|
5282
|
-
* Makes this input required when another input is defined:
|
|
5283
|
-
*
|
|
5284
|
-
* - Key: name of the input that must be defined
|
|
5285
|
-
* - Value: message to display when this input is required
|
|
5286
|
-
*/
|
|
5287
|
-
ifDefined?: unknown;
|
|
5288
|
-
/**
|
|
5289
|
-
* Makes this input required when another input is not defined:
|
|
5290
|
-
*
|
|
5291
|
-
* - Key: name of the input that must be undefined
|
|
5292
|
-
* - Value: message to display when this input is required
|
|
5293
|
-
*/
|
|
5294
|
-
ifNotDefined?: unknown;
|
|
5295
|
-
}
|
|
5234
|
+
equal?: string;
|
|
5235
|
+
/**
|
|
5236
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5237
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5238
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5239
|
+
* all outputs of a node, you can use the name 'all'.
|
|
5240
|
+
*/
|
|
5241
|
+
name?: string;
|
|
5242
|
+
/**
|
|
5243
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
5244
|
+
*/
|
|
5245
|
+
node?: string;
|
|
5296
5246
|
}
|
|
5297
5247
|
/**
|
|
5298
|
-
*
|
|
5248
|
+
* Set of rules that describes when this input is required:
|
|
5249
|
+
*
|
|
5250
|
+
* - \`always\`: Input is always required
|
|
5251
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5252
|
+
* defined
|
|
5253
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5254
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5255
|
+
* value
|
|
5256
|
+
*
|
|
5257
|
+
* By default, the input is not required.
|
|
5299
5258
|
*/
|
|
5300
|
-
interface
|
|
5259
|
+
interface Required {
|
|
5301
5260
|
/**
|
|
5302
|
-
*
|
|
5261
|
+
* Whether the input is always required
|
|
5303
5262
|
*/
|
|
5304
|
-
|
|
5263
|
+
always?: boolean;
|
|
5305
5264
|
/**
|
|
5306
|
-
*
|
|
5307
|
-
*
|
|
5265
|
+
* Makes this input required when another input has a specific value:
|
|
5266
|
+
*
|
|
5267
|
+
* - Key: name of the input to check
|
|
5268
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
5308
5269
|
*/
|
|
5309
|
-
|
|
5270
|
+
conditionalValues?: unknown;
|
|
5310
5271
|
/**
|
|
5311
|
-
*
|
|
5312
|
-
|
|
5313
|
-
|
|
5314
|
-
|
|
5315
|
-
|
|
5316
|
-
|
|
5317
|
-
|
|
5318
|
-
|
|
5319
|
-
|
|
5272
|
+
* Makes this input required when another input is defined:
|
|
5273
|
+
*
|
|
5274
|
+
* - Key: name of the input that must be defined
|
|
5275
|
+
* - Value: message to display when this input is required
|
|
5276
|
+
*/
|
|
5277
|
+
ifDefined?: unknown;
|
|
5278
|
+
/**
|
|
5279
|
+
* Makes this input required when another input is not defined:
|
|
5280
|
+
*
|
|
5281
|
+
* - Key: name of the input that must be undefined
|
|
5282
|
+
* - Value: message to display when this input is required
|
|
5283
|
+
*/
|
|
5284
|
+
ifNotDefined?: unknown;
|
|
5285
|
+
}
|
|
5286
|
+
}
|
|
5287
|
+
/**
|
|
5288
|
+
* The logic of the node. Only available for logic nodes.
|
|
5289
|
+
*/
|
|
5290
|
+
interface Logic {
|
|
5291
|
+
/**
|
|
5292
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
5293
|
+
*/
|
|
5294
|
+
cases?: Array<Logic.Case>;
|
|
5295
|
+
/**
|
|
5296
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
5297
|
+
* no case is matched. Only available for if/else nodes.
|
|
5298
|
+
*/
|
|
5299
|
+
default?: string;
|
|
5300
|
+
/**
|
|
5301
|
+
* The transform of the logic. Only available for transform nodes.
|
|
5302
|
+
*/
|
|
5303
|
+
transform?: string;
|
|
5304
|
+
}
|
|
5305
|
+
namespace Logic {
|
|
5306
|
+
interface Case {
|
|
5307
|
+
condition: string;
|
|
5308
|
+
value: string;
|
|
5320
5309
|
}
|
|
5321
5310
|
}
|
|
5322
5311
|
}
|
|
5323
|
-
interface StatusHistory {
|
|
5324
|
-
date: string;
|
|
5325
|
-
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
5326
|
-
}
|
|
5327
|
-
/**
|
|
5328
|
-
* The billing of the job
|
|
5329
|
-
*/
|
|
5330
|
-
interface Billing {
|
|
5331
|
-
cuCost: number;
|
|
5332
|
-
cuDiscount: number;
|
|
5333
|
-
}
|
|
5334
|
-
}
|
|
5335
|
-
interface Workflow {
|
|
5336
|
-
/**
|
|
5337
|
-
* Unique identifier of the workflow.
|
|
5338
|
-
*/
|
|
5339
|
-
id: string;
|
|
5340
|
-
/**
|
|
5341
|
-
* User that created the workflow.
|
|
5342
|
-
*/
|
|
5343
|
-
authorId: string;
|
|
5344
|
-
/**
|
|
5345
|
-
* ISO string
|
|
5346
|
-
*/
|
|
5347
|
-
createdAt: string;
|
|
5348
|
-
/**
|
|
5349
|
-
* Full description of what the workflow does.
|
|
5350
|
-
*/
|
|
5351
|
-
description: string;
|
|
5352
|
-
/**
|
|
5353
|
-
* The UI data about the workflow. This is managed by scenario webapp.
|
|
5354
|
-
*/
|
|
5355
|
-
editorInfo: {
|
|
5356
|
-
[key: string]: unknown;
|
|
5357
|
-
};
|
|
5358
|
-
/**
|
|
5359
|
-
* The flow of the workflow.
|
|
5360
|
-
*/
|
|
5361
|
-
flow: Array<Workflow.Flow>;
|
|
5362
|
-
/**
|
|
5363
|
-
* The inputs of the workflow.
|
|
5364
|
-
*/
|
|
5365
|
-
inputs: Array<Workflow.Input>;
|
|
5366
|
-
/**
|
|
5367
|
-
* Human-readable name of the workflow.
|
|
5368
|
-
*/
|
|
5369
|
-
name: string;
|
|
5370
|
-
/**
|
|
5371
|
-
* Project that owns the workflow.
|
|
5372
|
-
*/
|
|
5373
|
-
ownerId: string;
|
|
5374
|
-
/**
|
|
5375
|
-
* Visibility setting for the workflow.
|
|
5376
|
-
*/
|
|
5377
|
-
privacy: 'private' | 'public' | 'unlisted';
|
|
5378
|
-
/**
|
|
5379
|
-
* Short summary of the workflow.
|
|
5380
|
-
*/
|
|
5381
|
-
shortDescription: string;
|
|
5382
|
-
/**
|
|
5383
|
-
* Current lifecycle status (draft, ready, deleted).
|
|
5384
|
-
*/
|
|
5385
|
-
status: 'deleted' | 'draft' | 'ready';
|
|
5386
|
-
/**
|
|
5387
|
-
* The tag set of the workflow.
|
|
5388
|
-
*/
|
|
5389
|
-
tagSet: Array<string>;
|
|
5390
|
-
/**
|
|
5391
|
-
* ISO string
|
|
5392
|
-
*/
|
|
5393
|
-
updatedAt: string;
|
|
5394
|
-
/**
|
|
5395
|
-
* A representation of an asset after being processed by the workflow
|
|
5396
|
-
*/
|
|
5397
|
-
after?: Workflow.After;
|
|
5398
|
-
/**
|
|
5399
|
-
* A representation of an asset before being processed by the workflow
|
|
5400
|
-
*/
|
|
5401
|
-
before?: Workflow.Before;
|
|
5402
|
-
/**
|
|
5403
|
-
* Embedding is a map of embedding version into embedding date
|
|
5404
|
-
*/
|
|
5405
|
-
embedding?: unknown;
|
|
5406
|
-
/**
|
|
5407
|
-
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
5408
|
-
* except by the author or a project admin.
|
|
5409
|
-
*/
|
|
5410
|
-
isLocked?: boolean;
|
|
5411
|
-
lastIndexedAt?: string;
|
|
5412
|
-
/**
|
|
5413
|
-
* The type of indexing operation to perform in MeiliSearch
|
|
5414
|
-
*/
|
|
5415
|
-
lastIndexingType?: 'CREATE' | 'DELETE' | 'UPDATE';
|
|
5416
|
-
/**
|
|
5417
|
-
* Timestamp when the workflow flow was last saved as a Ready (App) snapshot. Used
|
|
5418
|
-
* to compute the WorkflowNodes snapshot key. Only set for workflows that have been
|
|
5419
|
-
* in the Ready state.
|
|
5420
|
-
*/
|
|
5421
|
-
lastReadyFlowUpdatedAt?: string;
|
|
5422
|
-
/**
|
|
5423
|
-
* ISO string timestamp when lock state was last changed.
|
|
5424
|
-
*/
|
|
5425
|
-
lockedStateChangedAt?: string;
|
|
5426
|
-
/**
|
|
5427
|
-
* UserId of the user who last changed the lock state.
|
|
5428
|
-
*/
|
|
5429
|
-
lockedStateChangedBy?: string;
|
|
5430
|
-
/**
|
|
5431
|
-
* Asset kinds produced by this workflow (if specified).
|
|
5432
|
-
*/
|
|
5433
|
-
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video'>;
|
|
5434
|
-
/**
|
|
5435
|
-
* Currently the thumbnail is identical to the after asset.
|
|
5436
|
-
*/
|
|
5437
|
-
thumbnail?: Workflow.Thumbnail;
|
|
5438
5312
|
/**
|
|
5439
|
-
*
|
|
5313
|
+
* Defines the input parameters for a model. Use this to understand the available
|
|
5314
|
+
* input parameters for a given `modelId` when calling
|
|
5315
|
+
* `POST /generate/custom/{modelId}`. See {@link
|
|
5316
|
+
* https://docs.scenario.com/docs/video-generation} for examples.
|
|
5440
5317
|
*/
|
|
5441
|
-
|
|
5442
|
-
}
|
|
5443
|
-
namespace Workflow {
|
|
5444
|
-
interface Flow {
|
|
5318
|
+
interface Input {
|
|
5445
5319
|
/**
|
|
5446
|
-
* The
|
|
5320
|
+
* The name that must be user to call the model through the API
|
|
5447
5321
|
*/
|
|
5448
|
-
|
|
5322
|
+
name: string;
|
|
5449
5323
|
/**
|
|
5450
|
-
* The type of the
|
|
5324
|
+
* The data type of the input
|
|
5451
5325
|
*/
|
|
5452
|
-
type: '
|
|
5326
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
5453
5327
|
/**
|
|
5454
|
-
*
|
|
5455
|
-
*
|
|
5456
|
-
*
|
|
5328
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
5329
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
5330
|
+
* dropdown.
|
|
5457
5331
|
*/
|
|
5458
|
-
|
|
5332
|
+
allowedValues?: Array<unknown>;
|
|
5459
5333
|
/**
|
|
5460
|
-
*
|
|
5461
|
-
*
|
|
5334
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
5335
|
+
* \`file_array\` input types with kind \`image\`.
|
|
5462
5336
|
*/
|
|
5463
|
-
|
|
5337
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
5464
5338
|
/**
|
|
5465
|
-
*
|
|
5466
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
5467
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
5468
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
5469
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
5339
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
5470
5340
|
*/
|
|
5471
|
-
|
|
5341
|
+
color?: boolean;
|
|
5472
5342
|
/**
|
|
5473
|
-
*
|
|
5343
|
+
* Whether this input affects the model's cost calculation
|
|
5474
5344
|
*/
|
|
5475
|
-
|
|
5345
|
+
costImpact?: boolean;
|
|
5476
5346
|
/**
|
|
5477
|
-
*
|
|
5478
|
-
* when executed. Only available for List nodes. The values can be strings,
|
|
5479
|
-
* numbers, or asset IDs.
|
|
5347
|
+
* The default value for the input
|
|
5480
5348
|
*/
|
|
5481
|
-
|
|
5349
|
+
default?: unknown;
|
|
5482
5350
|
/**
|
|
5483
|
-
*
|
|
5484
|
-
* dynamically-created copies of loop body nodes.
|
|
5351
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
5485
5352
|
*/
|
|
5486
|
-
|
|
5353
|
+
description?: string;
|
|
5487
5354
|
/**
|
|
5488
|
-
*
|
|
5355
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
5356
|
+
* value appear consecutively in the UI.
|
|
5489
5357
|
*/
|
|
5490
|
-
|
|
5358
|
+
group?: string;
|
|
5491
5359
|
/**
|
|
5492
|
-
*
|
|
5360
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
5493
5361
|
*/
|
|
5494
|
-
|
|
5362
|
+
hint?: string;
|
|
5495
5363
|
/**
|
|
5496
|
-
*
|
|
5497
|
-
*
|
|
5498
|
-
*
|
|
5364
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
5365
|
+
* the same as the current object. This is only available for type inputs_array
|
|
5366
|
+
* inputs.
|
|
5499
5367
|
*/
|
|
5500
|
-
|
|
5368
|
+
inputs?: Array<{
|
|
5369
|
+
[key: string]: unknown;
|
|
5370
|
+
}>;
|
|
5501
5371
|
/**
|
|
5502
|
-
*
|
|
5503
|
-
*
|
|
5372
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
5373
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
5374
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
5375
|
+
* data:kind, prefix
|
|
5504
5376
|
*/
|
|
5505
|
-
|
|
5377
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
5506
5378
|
/**
|
|
5507
|
-
* The
|
|
5379
|
+
* The label displayed in the UI for this input
|
|
5508
5380
|
*/
|
|
5509
|
-
|
|
5381
|
+
label?: string;
|
|
5510
5382
|
/**
|
|
5511
|
-
* The
|
|
5383
|
+
* The name of the file input field to use as the mask source
|
|
5512
5384
|
*/
|
|
5513
|
-
|
|
5514
|
-
}
|
|
5515
|
-
namespace Flow {
|
|
5385
|
+
maskFrom?: string;
|
|
5516
5386
|
/**
|
|
5517
|
-
*
|
|
5387
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
5388
|
+
* types.
|
|
5518
5389
|
*/
|
|
5519
|
-
|
|
5520
|
-
|
|
5521
|
-
|
|
5522
|
-
|
|
5523
|
-
|
|
5390
|
+
max?: number;
|
|
5391
|
+
/**
|
|
5392
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5393
|
+
* \`string_array\`.
|
|
5394
|
+
*/
|
|
5395
|
+
maxLength?: number;
|
|
5396
|
+
/**
|
|
5397
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
5398
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5399
|
+
* creation time.
|
|
5400
|
+
*/
|
|
5401
|
+
maxSize?: number;
|
|
5402
|
+
/**
|
|
5403
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
5404
|
+
*/
|
|
5405
|
+
min?: number;
|
|
5406
|
+
/**
|
|
5407
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
5408
|
+
* \`string_array\`.
|
|
5409
|
+
*/
|
|
5410
|
+
minLength?: number;
|
|
5411
|
+
/**
|
|
5412
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
5413
|
+
* available for \`model_array\` input type.
|
|
5414
|
+
*/
|
|
5415
|
+
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'>;
|
|
5416
|
+
/**
|
|
5417
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
5418
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
5419
|
+
*
|
|
5420
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
5421
|
+
*/
|
|
5422
|
+
parent?: boolean;
|
|
5423
|
+
/**
|
|
5424
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
5425
|
+
*/
|
|
5426
|
+
placeholder?: string;
|
|
5427
|
+
/**
|
|
5428
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
5429
|
+
* spark feature. Only available for \`string\` input type.
|
|
5430
|
+
*/
|
|
5431
|
+
prompt?: boolean;
|
|
5432
|
+
/**
|
|
5433
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
5434
|
+
* type.
|
|
5435
|
+
*/
|
|
5436
|
+
promptSpark?: boolean;
|
|
5437
|
+
/**
|
|
5438
|
+
* Set of rules that describes when this input is required:
|
|
5439
|
+
*
|
|
5440
|
+
* - \`always\`: Input is always required
|
|
5441
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5442
|
+
* defined
|
|
5443
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5444
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5445
|
+
* value
|
|
5446
|
+
*
|
|
5447
|
+
* By default, the input is not required.
|
|
5448
|
+
*/
|
|
5449
|
+
required?: Input.Required;
|
|
5450
|
+
/**
|
|
5451
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
5452
|
+
*/
|
|
5453
|
+
step?: number;
|
|
5454
|
+
}
|
|
5455
|
+
namespace Input {
|
|
5456
|
+
/**
|
|
5457
|
+
* Set of rules that describes when this input is required:
|
|
5458
|
+
*
|
|
5459
|
+
* - \`always\`: Input is always required
|
|
5460
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5461
|
+
* defined
|
|
5462
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5463
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5464
|
+
* value
|
|
5465
|
+
*
|
|
5466
|
+
* By default, the input is not required.
|
|
5467
|
+
*/
|
|
5468
|
+
interface Required {
|
|
5524
5469
|
/**
|
|
5525
|
-
*
|
|
5470
|
+
* Whether the input is always required
|
|
5526
5471
|
*/
|
|
5527
|
-
|
|
5472
|
+
always?: boolean;
|
|
5528
5473
|
/**
|
|
5529
|
-
*
|
|
5530
|
-
*
|
|
5531
|
-
*
|
|
5474
|
+
* Makes this input required when another input has a specific value:
|
|
5475
|
+
*
|
|
5476
|
+
* - Key: name of the input to check
|
|
5477
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
5532
5478
|
*/
|
|
5533
|
-
|
|
5479
|
+
conditionalValues?: unknown;
|
|
5534
5480
|
/**
|
|
5535
|
-
*
|
|
5536
|
-
*
|
|
5481
|
+
* Makes this input required when another input is defined:
|
|
5482
|
+
*
|
|
5483
|
+
* - Key: name of the input that must be defined
|
|
5484
|
+
* - Value: message to display when this input is required
|
|
5537
5485
|
*/
|
|
5538
|
-
|
|
5486
|
+
ifDefined?: unknown;
|
|
5539
5487
|
/**
|
|
5540
|
-
*
|
|
5488
|
+
* Makes this input required when another input is not defined:
|
|
5489
|
+
*
|
|
5490
|
+
* - Key: name of the input that must be undefined
|
|
5491
|
+
* - Value: message to display when this input is required
|
|
5541
5492
|
*/
|
|
5542
|
-
|
|
5493
|
+
ifNotDefined?: unknown;
|
|
5494
|
+
}
|
|
5495
|
+
}
|
|
5496
|
+
/**
|
|
5497
|
+
* A representation of an asset after being processed by the workflow
|
|
5498
|
+
*/
|
|
5499
|
+
interface After {
|
|
5500
|
+
/**
|
|
5501
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
5502
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
5503
|
+
*/
|
|
5504
|
+
assetId: string;
|
|
5505
|
+
/**
|
|
5506
|
+
* The url of the image used as a thumbnail for your model
|
|
5507
|
+
*/
|
|
5508
|
+
url: string;
|
|
5509
|
+
}
|
|
5510
|
+
/**
|
|
5511
|
+
* A representation of an asset before being processed by the workflow
|
|
5512
|
+
*/
|
|
5513
|
+
interface Before {
|
|
5514
|
+
/**
|
|
5515
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
5516
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
5517
|
+
*/
|
|
5518
|
+
assetId: string;
|
|
5519
|
+
/**
|
|
5520
|
+
* The url of the image used as a thumbnail for your model
|
|
5521
|
+
*/
|
|
5522
|
+
url: string;
|
|
5523
|
+
}
|
|
5524
|
+
/**
|
|
5525
|
+
* Currently the thumbnail is identical to the after asset.
|
|
5526
|
+
*/
|
|
5527
|
+
interface Thumbnail {
|
|
5528
|
+
assetId: string;
|
|
5529
|
+
url: string;
|
|
5530
|
+
}
|
|
5531
|
+
/**
|
|
5532
|
+
* The UI configuration for the workflow. This is managed by scenario webapp.
|
|
5533
|
+
*/
|
|
5534
|
+
interface UiConfig {
|
|
5535
|
+
/**
|
|
5536
|
+
* Configuration for the input properties
|
|
5537
|
+
*/
|
|
5538
|
+
inputProperties?: {
|
|
5539
|
+
[key: string]: UiConfig.InputProperties;
|
|
5540
|
+
};
|
|
5541
|
+
/**
|
|
5542
|
+
* Configuration for the loras component
|
|
5543
|
+
*/
|
|
5544
|
+
lorasComponent?: UiConfig.LorasComponent;
|
|
5545
|
+
/**
|
|
5546
|
+
* Configuration for the presets
|
|
5547
|
+
*/
|
|
5548
|
+
presets?: Array<UiConfig.Preset>;
|
|
5549
|
+
/**
|
|
5550
|
+
* Configuration for the resolution component
|
|
5551
|
+
*/
|
|
5552
|
+
resolutionComponent?: UiConfig.ResolutionComponent;
|
|
5553
|
+
/**
|
|
5554
|
+
* Configuration for the selects
|
|
5555
|
+
*/
|
|
5556
|
+
selects?: {
|
|
5557
|
+
[key: string]: unknown;
|
|
5558
|
+
};
|
|
5559
|
+
/**
|
|
5560
|
+
* Configuration for the trigger generate button
|
|
5561
|
+
*/
|
|
5562
|
+
triggerGenerate?: UiConfig.TriggerGenerate;
|
|
5563
|
+
}
|
|
5564
|
+
namespace UiConfig {
|
|
5565
|
+
interface InputProperties {
|
|
5566
|
+
collapsed?: boolean;
|
|
5567
|
+
}
|
|
5568
|
+
/**
|
|
5569
|
+
* Configuration for the loras component
|
|
5570
|
+
*/
|
|
5571
|
+
interface LorasComponent {
|
|
5543
5572
|
/**
|
|
5544
|
-
*
|
|
5573
|
+
* The label of the component
|
|
5545
5574
|
*/
|
|
5546
|
-
|
|
5575
|
+
label: string;
|
|
5547
5576
|
/**
|
|
5548
|
-
* The
|
|
5577
|
+
* The input name of the model (model_array)
|
|
5549
5578
|
*/
|
|
5550
|
-
|
|
5579
|
+
modelInput: string;
|
|
5551
5580
|
/**
|
|
5552
|
-
*
|
|
5581
|
+
* The input name of the scale (number_array)
|
|
5553
5582
|
*/
|
|
5554
|
-
|
|
5583
|
+
scaleInput: string;
|
|
5555
5584
|
/**
|
|
5556
|
-
*
|
|
5557
|
-
*
|
|
5585
|
+
* The input model id (example: a composition or a single LoRA modelId) If
|
|
5586
|
+
* specified, the model id will be attached to the output asset as a metadata If
|
|
5587
|
+
* the model-decomposer parser is specified on it, modelInput and scaleInput will
|
|
5588
|
+
* be automatically populated
|
|
5558
5589
|
*/
|
|
5559
|
-
|
|
5590
|
+
modelIdInput?: string;
|
|
5591
|
+
}
|
|
5592
|
+
interface Preset {
|
|
5593
|
+
fields: Array<string>;
|
|
5594
|
+
presets: unknown;
|
|
5595
|
+
}
|
|
5596
|
+
/**
|
|
5597
|
+
* Configuration for the resolution component
|
|
5598
|
+
*/
|
|
5599
|
+
interface ResolutionComponent {
|
|
5560
5600
|
/**
|
|
5561
|
-
*
|
|
5601
|
+
* The input name of the height
|
|
5562
5602
|
*/
|
|
5563
|
-
|
|
5603
|
+
heightInput: string;
|
|
5564
5604
|
/**
|
|
5565
|
-
* The
|
|
5566
|
-
* the same as the current object. This is only available for type inputs_array
|
|
5567
|
-
* inputs.
|
|
5605
|
+
* The label of the component
|
|
5568
5606
|
*/
|
|
5569
|
-
|
|
5570
|
-
[key: string]: unknown;
|
|
5571
|
-
}>;
|
|
5607
|
+
label: string;
|
|
5572
5608
|
/**
|
|
5573
|
-
* The
|
|
5574
|
-
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
5575
|
-
* type.
|
|
5609
|
+
* The resolution presets
|
|
5576
5610
|
*/
|
|
5577
|
-
|
|
5611
|
+
presets: Array<ResolutionComponent.Preset>;
|
|
5578
5612
|
/**
|
|
5579
|
-
* The
|
|
5580
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
5581
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
5582
|
-
* data:kind, prefix
|
|
5613
|
+
* The input name of the width
|
|
5583
5614
|
*/
|
|
5584
|
-
|
|
5615
|
+
widthInput: string;
|
|
5616
|
+
}
|
|
5617
|
+
namespace ResolutionComponent {
|
|
5618
|
+
interface Preset {
|
|
5619
|
+
height: number;
|
|
5620
|
+
label: string;
|
|
5621
|
+
width: number;
|
|
5622
|
+
}
|
|
5623
|
+
}
|
|
5624
|
+
/**
|
|
5625
|
+
* Configuration for the trigger generate button
|
|
5626
|
+
*/
|
|
5627
|
+
interface TriggerGenerate {
|
|
5628
|
+
label: string;
|
|
5585
5629
|
/**
|
|
5586
|
-
* The
|
|
5630
|
+
* The 'name' of the input where the trigger generate button will be displayed
|
|
5631
|
+
* (after the input). Do not specify both position and after.
|
|
5587
5632
|
*/
|
|
5588
|
-
|
|
5633
|
+
after?: string;
|
|
5589
5634
|
/**
|
|
5590
|
-
* The
|
|
5635
|
+
* The position of the trigger generate button. If position specified, the button
|
|
5636
|
+
* will be displayed at the specified position. Do not specify both position and
|
|
5637
|
+
* after.
|
|
5591
5638
|
*/
|
|
5592
|
-
|
|
5639
|
+
position?: 'bottom' | 'top';
|
|
5640
|
+
}
|
|
5641
|
+
}
|
|
5642
|
+
}
|
|
5643
|
+
}
|
|
5644
|
+
export interface WorkflowUserApprovalResponse {
|
|
5645
|
+
job: WorkflowUserApprovalResponse.Job;
|
|
5646
|
+
}
|
|
5647
|
+
export declare namespace WorkflowUserApprovalResponse {
|
|
5648
|
+
interface Job {
|
|
5649
|
+
/**
|
|
5650
|
+
* The job creation date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
5651
|
+
*/
|
|
5652
|
+
createdAt: string;
|
|
5653
|
+
/**
|
|
5654
|
+
* The job ID (example: "job_ocZCnG1Df35XRL1QyCZSRxAG8")
|
|
5655
|
+
*/
|
|
5656
|
+
jobId: string;
|
|
5657
|
+
/**
|
|
5658
|
+
* The type of job
|
|
5659
|
+
*/
|
|
5660
|
+
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';
|
|
5661
|
+
/**
|
|
5662
|
+
* Metadata of the job with some additional information
|
|
5663
|
+
*/
|
|
5664
|
+
metadata: Job.Metadata;
|
|
5665
|
+
/**
|
|
5666
|
+
* Progress of the job (between 0 and 1)
|
|
5667
|
+
*/
|
|
5668
|
+
progress: number;
|
|
5669
|
+
/**
|
|
5670
|
+
* The current status of the job
|
|
5671
|
+
*/
|
|
5672
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
5673
|
+
/**
|
|
5674
|
+
* The history of the different statuses the job went through with the ISO string
|
|
5675
|
+
* date of when the job reached each statuses.
|
|
5676
|
+
*/
|
|
5677
|
+
statusHistory: Array<Job.StatusHistory>;
|
|
5678
|
+
/**
|
|
5679
|
+
* The job last update date as an ISO string (example: "2023-02-03T11:19:41.579Z")
|
|
5680
|
+
*/
|
|
5681
|
+
updatedAt: string;
|
|
5682
|
+
/**
|
|
5683
|
+
* The author user ID (example: "dcf121faaa1a0a0bbbd9ca1b73d62aea")
|
|
5684
|
+
*/
|
|
5685
|
+
authorId?: string;
|
|
5686
|
+
/**
|
|
5687
|
+
* The billing of the job
|
|
5688
|
+
*/
|
|
5689
|
+
billing?: Job.Billing;
|
|
5690
|
+
/**
|
|
5691
|
+
* The owner ID (example: "team_U3Qmc8PCdWXwAQJ4Dvw4tV6D")
|
|
5692
|
+
*/
|
|
5693
|
+
ownerId?: string;
|
|
5694
|
+
}
|
|
5695
|
+
namespace Job {
|
|
5696
|
+
/**
|
|
5697
|
+
* Metadata of the job with some additional information
|
|
5698
|
+
*/
|
|
5699
|
+
interface Metadata {
|
|
5700
|
+
/**
|
|
5701
|
+
* List of produced assets for this job
|
|
5702
|
+
*/
|
|
5703
|
+
assetIds?: Array<string>;
|
|
5704
|
+
/**
|
|
5705
|
+
* Eventual error for the job
|
|
5706
|
+
*/
|
|
5707
|
+
error?: string | null;
|
|
5708
|
+
/**
|
|
5709
|
+
* The flow of the job. Only available for workflow jobs.
|
|
5710
|
+
*/
|
|
5711
|
+
flow?: Array<Metadata.Flow>;
|
|
5712
|
+
/**
|
|
5713
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
5714
|
+
*/
|
|
5715
|
+
hint?: string;
|
|
5716
|
+
/**
|
|
5717
|
+
* The inputs for the job
|
|
5718
|
+
*/
|
|
5719
|
+
input?: {
|
|
5720
|
+
[key: string]: unknown;
|
|
5721
|
+
};
|
|
5722
|
+
/**
|
|
5723
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
5724
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
5725
|
+
* results.
|
|
5726
|
+
*/
|
|
5727
|
+
output?: {
|
|
5728
|
+
[key: string]: unknown;
|
|
5729
|
+
};
|
|
5730
|
+
/**
|
|
5731
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
5732
|
+
*/
|
|
5733
|
+
outputModelId?: string;
|
|
5734
|
+
/**
|
|
5735
|
+
* The workflow ID of the job if job is part of a workflow.
|
|
5736
|
+
*/
|
|
5737
|
+
workflowId?: string;
|
|
5738
|
+
/**
|
|
5739
|
+
* The workflow job ID of the job if job is part of a workflow job.
|
|
5740
|
+
*/
|
|
5741
|
+
workflowJobId?: string;
|
|
5742
|
+
}
|
|
5743
|
+
namespace Metadata {
|
|
5744
|
+
interface Flow {
|
|
5593
5745
|
/**
|
|
5594
|
-
* The
|
|
5595
|
-
* types.
|
|
5746
|
+
* The id of the node.
|
|
5596
5747
|
*/
|
|
5597
|
-
|
|
5748
|
+
id: string;
|
|
5598
5749
|
/**
|
|
5599
|
-
* The
|
|
5600
|
-
* \`string_array\`.
|
|
5750
|
+
* The status of the node. Only available for WorkflowJob nodes.
|
|
5601
5751
|
*/
|
|
5602
|
-
|
|
5752
|
+
status: 'failure' | 'pending' | 'processing' | 'skipped' | 'success';
|
|
5603
5753
|
/**
|
|
5604
|
-
* The
|
|
5605
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5606
|
-
* creation time.
|
|
5754
|
+
* The type of the job for the node.
|
|
5607
5755
|
*/
|
|
5608
|
-
|
|
5756
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
5609
5757
|
/**
|
|
5610
|
-
*
|
|
5758
|
+
* List of produced assets for this node.
|
|
5611
5759
|
*/
|
|
5612
|
-
|
|
5760
|
+
assets?: Array<Flow.Asset>;
|
|
5613
5761
|
/**
|
|
5614
|
-
*
|
|
5615
|
-
*
|
|
5762
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
5763
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
5764
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
5616
5765
|
*/
|
|
5617
|
-
|
|
5766
|
+
count?: number;
|
|
5618
5767
|
/**
|
|
5619
|
-
* The
|
|
5620
|
-
*
|
|
5768
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
5769
|
+
* dependencies. Mainly used for user approval nodes.
|
|
5621
5770
|
*/
|
|
5622
|
-
|
|
5771
|
+
dependsOn?: Array<string>;
|
|
5623
5772
|
/**
|
|
5624
|
-
*
|
|
5625
|
-
* Only
|
|
5626
|
-
*
|
|
5627
|
-
*
|
|
5773
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
5774
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
5775
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
5776
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
5777
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
5628
5778
|
*/
|
|
5629
|
-
|
|
5779
|
+
includeOutputsInWorkflowJob?: true;
|
|
5630
5780
|
/**
|
|
5631
|
-
*
|
|
5781
|
+
* The inputs of the node.
|
|
5632
5782
|
*/
|
|
5633
|
-
|
|
5783
|
+
inputs?: Array<Flow.Input>;
|
|
5634
5784
|
/**
|
|
5635
|
-
*
|
|
5636
|
-
*
|
|
5785
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
5786
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
5787
|
+
* numbers, or asset IDs.
|
|
5637
5788
|
*/
|
|
5638
|
-
|
|
5789
|
+
items?: Array<string>;
|
|
5639
5790
|
/**
|
|
5640
|
-
*
|
|
5641
|
-
*
|
|
5791
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
5792
|
+
* dynamically-created copies of loop body nodes.
|
|
5642
5793
|
*/
|
|
5643
|
-
|
|
5794
|
+
iterationIndex?: number;
|
|
5644
5795
|
/**
|
|
5645
|
-
*
|
|
5646
|
-
*
|
|
5796
|
+
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
5797
|
+
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
5798
|
+
* not started.
|
|
5647
5799
|
*/
|
|
5648
|
-
|
|
5800
|
+
jobId?: string;
|
|
5649
5801
|
/**
|
|
5650
|
-
*
|
|
5651
|
-
*
|
|
5652
|
-
* - \`always\`: Input is always required
|
|
5653
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5654
|
-
* defined
|
|
5655
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5656
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5657
|
-
* value
|
|
5658
|
-
*
|
|
5659
|
-
* By default, the input is not required.
|
|
5802
|
+
* The logic of the node. Only available for logic nodes.
|
|
5660
5803
|
*/
|
|
5661
|
-
|
|
5804
|
+
logic?: Flow.Logic;
|
|
5662
5805
|
/**
|
|
5663
|
-
* The
|
|
5806
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
5664
5807
|
*/
|
|
5665
|
-
|
|
5808
|
+
logicType?: 'if-else';
|
|
5666
5809
|
/**
|
|
5667
|
-
*
|
|
5668
|
-
*
|
|
5810
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
5811
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
5812
|
+
* for ForEach nodes.
|
|
5669
5813
|
*/
|
|
5670
|
-
|
|
5814
|
+
loopBodyNodeIds?: Array<string>;
|
|
5815
|
+
/**
|
|
5816
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
5817
|
+
* dynamically-created copies of loop body nodes.
|
|
5818
|
+
*/
|
|
5819
|
+
loopNodeId?: string;
|
|
5820
|
+
/**
|
|
5821
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
5822
|
+
*/
|
|
5823
|
+
modelId?: string;
|
|
5824
|
+
/**
|
|
5825
|
+
* The output of the node. Only available for logic nodes.
|
|
5826
|
+
*/
|
|
5827
|
+
output?: unknown;
|
|
5828
|
+
/**
|
|
5829
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
5830
|
+
*/
|
|
5831
|
+
workflowId?: string;
|
|
5671
5832
|
}
|
|
5672
|
-
namespace
|
|
5833
|
+
namespace Flow {
|
|
5834
|
+
interface Asset {
|
|
5835
|
+
assetId: string;
|
|
5836
|
+
url: string;
|
|
5837
|
+
}
|
|
5673
5838
|
/**
|
|
5674
|
-
*
|
|
5675
|
-
* recursive items field.
|
|
5839
|
+
* This is used to run the flow.
|
|
5676
5840
|
*/
|
|
5677
|
-
interface
|
|
5841
|
+
interface Input {
|
|
5678
5842
|
/**
|
|
5679
5843
|
* The name that must be user to call the model through the API
|
|
5680
5844
|
*/
|
|
@@ -5727,6 +5891,12 @@ export declare namespace WorkflowRunResponse {
|
|
|
5727
5891
|
inputs?: Array<{
|
|
5728
5892
|
[key: string]: unknown;
|
|
5729
5893
|
}>;
|
|
5894
|
+
/**
|
|
5895
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
5896
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
5897
|
+
* type.
|
|
5898
|
+
*/
|
|
5899
|
+
items?: Array<Array<Input.Item>>;
|
|
5730
5900
|
/**
|
|
5731
5901
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
5732
5902
|
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
@@ -5797,7 +5967,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
5797
5967
|
* The reference to another input or output of the same workflow. Must have at
|
|
5798
5968
|
* least one of node or conditional.
|
|
5799
5969
|
*/
|
|
5800
|
-
ref?:
|
|
5970
|
+
ref?: Input.Ref;
|
|
5801
5971
|
/**
|
|
5802
5972
|
* Set of rules that describes when this input is required:
|
|
5803
5973
|
*
|
|
@@ -5810,7 +5980,7 @@ export declare namespace WorkflowRunResponse {
|
|
|
5810
5980
|
*
|
|
5811
5981
|
* By default, the input is not required.
|
|
5812
5982
|
*/
|
|
5813
|
-
required?:
|
|
5983
|
+
required?: Input.Required;
|
|
5814
5984
|
/**
|
|
5815
5985
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
5816
5986
|
*/
|
|
@@ -5821,495 +5991,329 @@ export declare namespace WorkflowRunResponse {
|
|
|
5821
5991
|
*/
|
|
5822
5992
|
value?: unknown;
|
|
5823
5993
|
}
|
|
5824
|
-
namespace
|
|
5994
|
+
namespace Input {
|
|
5825
5995
|
/**
|
|
5826
|
-
*
|
|
5827
|
-
*
|
|
5996
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
5997
|
+
* recursive items field.
|
|
5828
5998
|
*/
|
|
5829
|
-
interface
|
|
5999
|
+
interface Item {
|
|
5830
6000
|
/**
|
|
5831
|
-
* The
|
|
5832
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5833
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
6001
|
+
* The name that must be user to call the model through the API
|
|
5834
6002
|
*/
|
|
5835
|
-
|
|
6003
|
+
name: string;
|
|
5836
6004
|
/**
|
|
5837
|
-
*
|
|
6005
|
+
* The data type of the input
|
|
5838
6006
|
*/
|
|
5839
|
-
|
|
6007
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
5840
6008
|
/**
|
|
5841
|
-
* The
|
|
5842
|
-
*
|
|
5843
|
-
*
|
|
5844
|
-
* all outputs of a node, you can use the name 'all'.
|
|
6009
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
6010
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
6011
|
+
* dropdown.
|
|
5845
6012
|
*/
|
|
5846
|
-
|
|
6013
|
+
allowedValues?: Array<unknown>;
|
|
5847
6014
|
/**
|
|
5848
|
-
*
|
|
6015
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
6016
|
+
* \`file_array\` input types with kind \`image\`.
|
|
5849
6017
|
*/
|
|
5850
|
-
|
|
5851
|
-
}
|
|
5852
|
-
/**
|
|
5853
|
-
* Set of rules that describes when this input is required:
|
|
5854
|
-
*
|
|
5855
|
-
* - \`always\`: Input is always required
|
|
5856
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5857
|
-
* defined
|
|
5858
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5859
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5860
|
-
* value
|
|
5861
|
-
*
|
|
5862
|
-
* By default, the input is not required.
|
|
5863
|
-
*/
|
|
5864
|
-
interface Required {
|
|
6018
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
5865
6019
|
/**
|
|
5866
|
-
* Whether the input is
|
|
6020
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
5867
6021
|
*/
|
|
5868
|
-
|
|
6022
|
+
color?: boolean;
|
|
5869
6023
|
/**
|
|
5870
|
-
*
|
|
5871
|
-
*
|
|
5872
|
-
* - Key: name of the input to check
|
|
5873
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
6024
|
+
* Whether this input affects the model's cost calculation
|
|
5874
6025
|
*/
|
|
5875
|
-
|
|
6026
|
+
costImpact?: boolean;
|
|
5876
6027
|
/**
|
|
5877
|
-
*
|
|
6028
|
+
* The default value for the input
|
|
6029
|
+
*/
|
|
6030
|
+
default?: unknown;
|
|
6031
|
+
/**
|
|
6032
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
6033
|
+
*/
|
|
6034
|
+
description?: string;
|
|
6035
|
+
/**
|
|
6036
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
6037
|
+
* value appear consecutively in the UI.
|
|
6038
|
+
*/
|
|
6039
|
+
group?: string;
|
|
6040
|
+
/**
|
|
6041
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
6042
|
+
*/
|
|
6043
|
+
hint?: string;
|
|
6044
|
+
/**
|
|
6045
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
6046
|
+
* the same as the current object. This is only available for type inputs_array
|
|
6047
|
+
* inputs.
|
|
6048
|
+
*/
|
|
6049
|
+
inputs?: Array<{
|
|
6050
|
+
[key: string]: unknown;
|
|
6051
|
+
}>;
|
|
6052
|
+
/**
|
|
6053
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
6054
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6055
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
6056
|
+
* data:kind, prefix
|
|
6057
|
+
*/
|
|
6058
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
6059
|
+
/**
|
|
6060
|
+
* The label displayed in the UI for this input
|
|
6061
|
+
*/
|
|
6062
|
+
label?: string;
|
|
6063
|
+
/**
|
|
6064
|
+
* The name of the file input field to use as the mask source
|
|
6065
|
+
*/
|
|
6066
|
+
maskFrom?: string;
|
|
6067
|
+
/**
|
|
6068
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
6069
|
+
* types.
|
|
6070
|
+
*/
|
|
6071
|
+
max?: number;
|
|
6072
|
+
/**
|
|
6073
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
6074
|
+
* \`string_array\`.
|
|
6075
|
+
*/
|
|
6076
|
+
maxLength?: number;
|
|
6077
|
+
/**
|
|
6078
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
6079
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
6080
|
+
* creation time.
|
|
6081
|
+
*/
|
|
6082
|
+
maxSize?: number;
|
|
6083
|
+
/**
|
|
6084
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
6085
|
+
*/
|
|
6086
|
+
min?: number;
|
|
6087
|
+
/**
|
|
6088
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
6089
|
+
* \`string_array\`.
|
|
6090
|
+
*/
|
|
6091
|
+
minLength?: number;
|
|
6092
|
+
/**
|
|
6093
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
6094
|
+
* available for \`model_array\` input type.
|
|
6095
|
+
*/
|
|
6096
|
+
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'>;
|
|
6097
|
+
/**
|
|
6098
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
6099
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
5878
6100
|
*
|
|
5879
|
-
*
|
|
5880
|
-
* - Value: message to display when this input is required
|
|
6101
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
5881
6102
|
*/
|
|
5882
|
-
|
|
6103
|
+
parent?: boolean;
|
|
5883
6104
|
/**
|
|
5884
|
-
*
|
|
6105
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
6106
|
+
*/
|
|
6107
|
+
placeholder?: string;
|
|
6108
|
+
/**
|
|
6109
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
6110
|
+
* spark feature. Only available for \`string\` input type.
|
|
6111
|
+
*/
|
|
6112
|
+
prompt?: boolean;
|
|
6113
|
+
/**
|
|
6114
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
6115
|
+
* type.
|
|
6116
|
+
*/
|
|
6117
|
+
promptSpark?: boolean;
|
|
6118
|
+
/**
|
|
6119
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
6120
|
+
* least one of node or conditional.
|
|
6121
|
+
*/
|
|
6122
|
+
ref?: Item.Ref;
|
|
6123
|
+
/**
|
|
6124
|
+
* Set of rules that describes when this input is required:
|
|
5885
6125
|
*
|
|
5886
|
-
* -
|
|
5887
|
-
* -
|
|
6126
|
+
* - \`always\`: Input is always required
|
|
6127
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6128
|
+
* defined
|
|
6129
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6130
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6131
|
+
* value
|
|
6132
|
+
*
|
|
6133
|
+
* By default, the input is not required.
|
|
5888
6134
|
*/
|
|
5889
|
-
|
|
6135
|
+
required?: Item.Required;
|
|
6136
|
+
/**
|
|
6137
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
6138
|
+
*/
|
|
6139
|
+
step?: number;
|
|
6140
|
+
/**
|
|
6141
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
6142
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
6143
|
+
*/
|
|
6144
|
+
value?: unknown;
|
|
5890
6145
|
}
|
|
5891
|
-
|
|
5892
|
-
|
|
5893
|
-
|
|
5894
|
-
|
|
5895
|
-
|
|
5896
|
-
|
|
5897
|
-
|
|
5898
|
-
|
|
5899
|
-
|
|
5900
|
-
|
|
5901
|
-
|
|
5902
|
-
|
|
5903
|
-
|
|
5904
|
-
|
|
5905
|
-
|
|
5906
|
-
|
|
5907
|
-
|
|
5908
|
-
|
|
5909
|
-
|
|
5910
|
-
|
|
5911
|
-
|
|
5912
|
-
|
|
5913
|
-
|
|
5914
|
-
|
|
5915
|
-
|
|
5916
|
-
|
|
5917
|
-
|
|
5918
|
-
|
|
5919
|
-
|
|
5920
|
-
|
|
5921
|
-
|
|
5922
|
-
|
|
5923
|
-
|
|
5924
|
-
|
|
5925
|
-
|
|
5926
|
-
|
|
5927
|
-
|
|
5928
|
-
|
|
5929
|
-
|
|
5930
|
-
|
|
5931
|
-
|
|
5932
|
-
|
|
5933
|
-
|
|
5934
|
-
|
|
5935
|
-
|
|
5936
|
-
|
|
5937
|
-
|
|
5938
|
-
|
|
5939
|
-
|
|
5940
|
-
|
|
5941
|
-
|
|
5942
|
-
|
|
5943
|
-
|
|
5944
|
-
|
|
5945
|
-
|
|
5946
|
-
|
|
5947
|
-
|
|
5948
|
-
|
|
5949
|
-
|
|
5950
|
-
|
|
5951
|
-
|
|
5952
|
-
|
|
5953
|
-
|
|
5954
|
-
|
|
5955
|
-
|
|
5956
|
-
|
|
5957
|
-
|
|
5958
|
-
|
|
5959
|
-
|
|
5960
|
-
|
|
5961
|
-
|
|
5962
|
-
|
|
5963
|
-
|
|
5964
|
-
|
|
5965
|
-
|
|
5966
|
-
|
|
5967
|
-
|
|
5968
|
-
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
|
|
5995
|
-
|
|
5996
|
-
|
|
5997
|
-
|
|
5998
|
-
|
|
5999
|
-
|
|
6000
|
-
|
|
6001
|
-
|
|
6002
|
-
|
|
6003
|
-
|
|
6004
|
-
|
|
6005
|
-
|
|
6006
|
-
|
|
6007
|
-
|
|
6008
|
-
|
|
6009
|
-
|
|
6010
|
-
|
|
6011
|
-
|
|
6012
|
-
|
|
6013
|
-
|
|
6014
|
-
|
|
6015
|
-
|
|
6016
|
-
|
|
6017
|
-
|
|
6018
|
-
|
|
6019
|
-
|
|
6020
|
-
|
|
6021
|
-
|
|
6022
|
-
|
|
6023
|
-
|
|
6024
|
-
|
|
6025
|
-
|
|
6026
|
-
/**
|
|
6027
|
-
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
6028
|
-
* value appear consecutively in the UI.
|
|
6029
|
-
*/
|
|
6030
|
-
group?: string;
|
|
6031
|
-
/**
|
|
6032
|
-
* Hint text displayed in the UI as a tooltip to guide the user
|
|
6033
|
-
*/
|
|
6034
|
-
hint?: string;
|
|
6035
|
-
/**
|
|
6036
|
-
* The list of inputs which form an object within a container array. All inputs are
|
|
6037
|
-
* the same as the current object. This is only available for type inputs_array
|
|
6038
|
-
* inputs.
|
|
6039
|
-
*/
|
|
6040
|
-
inputs?: Array<{
|
|
6041
|
-
[key: string]: unknown;
|
|
6042
|
-
}>;
|
|
6043
|
-
/**
|
|
6044
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
6045
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
6046
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
6047
|
-
* data:kind, prefix
|
|
6048
|
-
*/
|
|
6049
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
6050
|
-
/**
|
|
6051
|
-
* The label displayed in the UI for this input
|
|
6052
|
-
*/
|
|
6053
|
-
label?: string;
|
|
6054
|
-
/**
|
|
6055
|
-
* The name of the file input field to use as the mask source
|
|
6056
|
-
*/
|
|
6057
|
-
maskFrom?: string;
|
|
6058
|
-
/**
|
|
6059
|
-
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
6060
|
-
* types.
|
|
6061
|
-
*/
|
|
6062
|
-
max?: number;
|
|
6063
|
-
/**
|
|
6064
|
-
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
6065
|
-
* \`string_array\`.
|
|
6066
|
-
*/
|
|
6067
|
-
maxLength?: number;
|
|
6068
|
-
/**
|
|
6069
|
-
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
6070
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
6071
|
-
* creation time.
|
|
6072
|
-
*/
|
|
6073
|
-
maxSize?: number;
|
|
6074
|
-
/**
|
|
6075
|
-
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
6076
|
-
*/
|
|
6077
|
-
min?: number;
|
|
6078
|
-
/**
|
|
6079
|
-
* The minimum allowed length for string inputs. Also applies to each item in
|
|
6080
|
-
* \`string_array\`.
|
|
6081
|
-
*/
|
|
6082
|
-
minLength?: number;
|
|
6083
|
-
/**
|
|
6084
|
-
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
6085
|
-
* available for \`model_array\` input type.
|
|
6086
|
-
*/
|
|
6087
|
-
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'>;
|
|
6088
|
-
/**
|
|
6089
|
-
* Whether this input represents a parent asset to assign to the produced assets.
|
|
6090
|
-
* Only available for \`file\` and \`file_array\` input types.
|
|
6091
|
-
*
|
|
6092
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
6093
|
-
*/
|
|
6094
|
-
parent?: boolean;
|
|
6095
|
-
/**
|
|
6096
|
-
* Placeholder text for the input. Only available for 'string' input type.
|
|
6097
|
-
*/
|
|
6098
|
-
placeholder?: string;
|
|
6099
|
-
/**
|
|
6100
|
-
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
6101
|
-
* spark feature. Only available for \`string\` input type.
|
|
6102
|
-
*/
|
|
6103
|
-
prompt?: boolean;
|
|
6104
|
-
/**
|
|
6105
|
-
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
6106
|
-
* type.
|
|
6107
|
-
*/
|
|
6108
|
-
promptSpark?: boolean;
|
|
6109
|
-
/**
|
|
6110
|
-
* Set of rules that describes when this input is required:
|
|
6111
|
-
*
|
|
6112
|
-
* - \`always\`: Input is always required
|
|
6113
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6114
|
-
* defined
|
|
6115
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6116
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6117
|
-
* value
|
|
6118
|
-
*
|
|
6119
|
-
* By default, the input is not required.
|
|
6120
|
-
*/
|
|
6121
|
-
required?: Input.Required;
|
|
6122
|
-
/**
|
|
6123
|
-
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
6124
|
-
*/
|
|
6125
|
-
step?: number;
|
|
6126
|
-
}
|
|
6127
|
-
namespace Input {
|
|
6128
|
-
/**
|
|
6129
|
-
* Set of rules that describes when this input is required:
|
|
6130
|
-
*
|
|
6131
|
-
* - \`always\`: Input is always required
|
|
6132
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6133
|
-
* defined
|
|
6134
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6135
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6136
|
-
* value
|
|
6137
|
-
*
|
|
6138
|
-
* By default, the input is not required.
|
|
6139
|
-
*/
|
|
6140
|
-
interface Required {
|
|
6141
|
-
/**
|
|
6142
|
-
* Whether the input is always required
|
|
6143
|
-
*/
|
|
6144
|
-
always?: boolean;
|
|
6145
|
-
/**
|
|
6146
|
-
* Makes this input required when another input has a specific value:
|
|
6147
|
-
*
|
|
6148
|
-
* - Key: name of the input to check
|
|
6149
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
6150
|
-
*/
|
|
6151
|
-
conditionalValues?: unknown;
|
|
6152
|
-
/**
|
|
6153
|
-
* Makes this input required when another input is defined:
|
|
6154
|
-
*
|
|
6155
|
-
* - Key: name of the input that must be defined
|
|
6156
|
-
* - Value: message to display when this input is required
|
|
6157
|
-
*/
|
|
6158
|
-
ifDefined?: unknown;
|
|
6146
|
+
namespace Item {
|
|
6147
|
+
/**
|
|
6148
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
6149
|
+
* least one of node or conditional.
|
|
6150
|
+
*/
|
|
6151
|
+
interface Ref {
|
|
6152
|
+
/**
|
|
6153
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
6154
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
6155
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
6156
|
+
*/
|
|
6157
|
+
conditional?: Array<string>;
|
|
6158
|
+
/**
|
|
6159
|
+
* This is the desired node output value if ref is an if/else node.
|
|
6160
|
+
*/
|
|
6161
|
+
equal?: string;
|
|
6162
|
+
/**
|
|
6163
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
6164
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
6165
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
6166
|
+
* all outputs of a node, you can use the name 'all'.
|
|
6167
|
+
*/
|
|
6168
|
+
name?: string;
|
|
6169
|
+
/**
|
|
6170
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
6171
|
+
*/
|
|
6172
|
+
node?: string;
|
|
6173
|
+
}
|
|
6174
|
+
/**
|
|
6175
|
+
* Set of rules that describes when this input is required:
|
|
6176
|
+
*
|
|
6177
|
+
* - \`always\`: Input is always required
|
|
6178
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6179
|
+
* defined
|
|
6180
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6181
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6182
|
+
* value
|
|
6183
|
+
*
|
|
6184
|
+
* By default, the input is not required.
|
|
6185
|
+
*/
|
|
6186
|
+
interface Required {
|
|
6187
|
+
/**
|
|
6188
|
+
* Whether the input is always required
|
|
6189
|
+
*/
|
|
6190
|
+
always?: boolean;
|
|
6191
|
+
/**
|
|
6192
|
+
* Makes this input required when another input has a specific value:
|
|
6193
|
+
*
|
|
6194
|
+
* - Key: name of the input to check
|
|
6195
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
6196
|
+
*/
|
|
6197
|
+
conditionalValues?: unknown;
|
|
6198
|
+
/**
|
|
6199
|
+
* Makes this input required when another input is defined:
|
|
6200
|
+
*
|
|
6201
|
+
* - Key: name of the input that must be defined
|
|
6202
|
+
* - Value: message to display when this input is required
|
|
6203
|
+
*/
|
|
6204
|
+
ifDefined?: unknown;
|
|
6205
|
+
/**
|
|
6206
|
+
* Makes this input required when another input is not defined:
|
|
6207
|
+
*
|
|
6208
|
+
* - Key: name of the input that must be undefined
|
|
6209
|
+
* - Value: message to display when this input is required
|
|
6210
|
+
*/
|
|
6211
|
+
ifNotDefined?: unknown;
|
|
6212
|
+
}
|
|
6213
|
+
}
|
|
6214
|
+
/**
|
|
6215
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
6216
|
+
* least one of node or conditional.
|
|
6217
|
+
*/
|
|
6218
|
+
interface Ref {
|
|
6219
|
+
/**
|
|
6220
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
6221
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
6222
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
6223
|
+
*/
|
|
6224
|
+
conditional?: Array<string>;
|
|
6225
|
+
/**
|
|
6226
|
+
* This is the desired node output value if ref is an if/else node.
|
|
6227
|
+
*/
|
|
6228
|
+
equal?: string;
|
|
6229
|
+
/**
|
|
6230
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
6231
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
6232
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
6233
|
+
* all outputs of a node, you can use the name 'all'.
|
|
6234
|
+
*/
|
|
6235
|
+
name?: string;
|
|
6236
|
+
/**
|
|
6237
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
6238
|
+
*/
|
|
6239
|
+
node?: string;
|
|
6240
|
+
}
|
|
6241
|
+
/**
|
|
6242
|
+
* Set of rules that describes when this input is required:
|
|
6243
|
+
*
|
|
6244
|
+
* - \`always\`: Input is always required
|
|
6245
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
6246
|
+
* defined
|
|
6247
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
6248
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
6249
|
+
* value
|
|
6250
|
+
*
|
|
6251
|
+
* By default, the input is not required.
|
|
6252
|
+
*/
|
|
6253
|
+
interface Required {
|
|
6254
|
+
/**
|
|
6255
|
+
* Whether the input is always required
|
|
6256
|
+
*/
|
|
6257
|
+
always?: boolean;
|
|
6258
|
+
/**
|
|
6259
|
+
* Makes this input required when another input has a specific value:
|
|
6260
|
+
*
|
|
6261
|
+
* - Key: name of the input to check
|
|
6262
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
6263
|
+
*/
|
|
6264
|
+
conditionalValues?: unknown;
|
|
6265
|
+
/**
|
|
6266
|
+
* Makes this input required when another input is defined:
|
|
6267
|
+
*
|
|
6268
|
+
* - Key: name of the input that must be defined
|
|
6269
|
+
* - Value: message to display when this input is required
|
|
6270
|
+
*/
|
|
6271
|
+
ifDefined?: unknown;
|
|
6272
|
+
/**
|
|
6273
|
+
* Makes this input required when another input is not defined:
|
|
6274
|
+
*
|
|
6275
|
+
* - Key: name of the input that must be undefined
|
|
6276
|
+
* - Value: message to display when this input is required
|
|
6277
|
+
*/
|
|
6278
|
+
ifNotDefined?: unknown;
|
|
6279
|
+
}
|
|
6280
|
+
}
|
|
6159
6281
|
/**
|
|
6160
|
-
*
|
|
6161
|
-
*
|
|
6162
|
-
* - Key: name of the input that must be undefined
|
|
6163
|
-
* - Value: message to display when this input is required
|
|
6282
|
+
* The logic of the node. Only available for logic nodes.
|
|
6164
6283
|
*/
|
|
6165
|
-
|
|
6284
|
+
interface Logic {
|
|
6285
|
+
/**
|
|
6286
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
6287
|
+
*/
|
|
6288
|
+
cases?: Array<Logic.Case>;
|
|
6289
|
+
/**
|
|
6290
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
6291
|
+
* no case is matched. Only available for if/else nodes.
|
|
6292
|
+
*/
|
|
6293
|
+
default?: string;
|
|
6294
|
+
/**
|
|
6295
|
+
* The transform of the logic. Only available for transform nodes.
|
|
6296
|
+
*/
|
|
6297
|
+
transform?: string;
|
|
6298
|
+
}
|
|
6299
|
+
namespace Logic {
|
|
6300
|
+
interface Case {
|
|
6301
|
+
condition: string;
|
|
6302
|
+
value: string;
|
|
6303
|
+
}
|
|
6304
|
+
}
|
|
6166
6305
|
}
|
|
6167
6306
|
}
|
|
6168
|
-
|
|
6169
|
-
|
|
6170
|
-
|
|
6171
|
-
interface After {
|
|
6172
|
-
/**
|
|
6173
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
6174
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
6175
|
-
*/
|
|
6176
|
-
assetId: string;
|
|
6177
|
-
/**
|
|
6178
|
-
* The url of the image used as a thumbnail for your model
|
|
6179
|
-
*/
|
|
6180
|
-
url: string;
|
|
6181
|
-
}
|
|
6182
|
-
/**
|
|
6183
|
-
* A representation of an asset before being processed by the workflow
|
|
6184
|
-
*/
|
|
6185
|
-
interface Before {
|
|
6186
|
-
/**
|
|
6187
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
6188
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
6189
|
-
*/
|
|
6190
|
-
assetId: string;
|
|
6191
|
-
/**
|
|
6192
|
-
* The url of the image used as a thumbnail for your model
|
|
6193
|
-
*/
|
|
6194
|
-
url: string;
|
|
6195
|
-
}
|
|
6196
|
-
/**
|
|
6197
|
-
* Currently the thumbnail is identical to the after asset.
|
|
6198
|
-
*/
|
|
6199
|
-
interface Thumbnail {
|
|
6200
|
-
assetId: string;
|
|
6201
|
-
url: string;
|
|
6307
|
+
interface StatusHistory {
|
|
6308
|
+
date: string;
|
|
6309
|
+
status: 'canceled' | 'failure' | 'finalizing' | 'in-progress' | 'pending' | 'queued' | 'success' | 'warming-up';
|
|
6202
6310
|
}
|
|
6203
6311
|
/**
|
|
6204
|
-
* The
|
|
6312
|
+
* The billing of the job
|
|
6205
6313
|
*/
|
|
6206
|
-
interface
|
|
6207
|
-
|
|
6208
|
-
|
|
6209
|
-
*/
|
|
6210
|
-
inputProperties?: {
|
|
6211
|
-
[key: string]: UiConfig.InputProperties;
|
|
6212
|
-
};
|
|
6213
|
-
/**
|
|
6214
|
-
* Configuration for the loras component
|
|
6215
|
-
*/
|
|
6216
|
-
lorasComponent?: UiConfig.LorasComponent;
|
|
6217
|
-
/**
|
|
6218
|
-
* Configuration for the presets
|
|
6219
|
-
*/
|
|
6220
|
-
presets?: Array<UiConfig.Preset>;
|
|
6221
|
-
/**
|
|
6222
|
-
* Configuration for the resolution component
|
|
6223
|
-
*/
|
|
6224
|
-
resolutionComponent?: UiConfig.ResolutionComponent;
|
|
6225
|
-
/**
|
|
6226
|
-
* Configuration for the selects
|
|
6227
|
-
*/
|
|
6228
|
-
selects?: {
|
|
6229
|
-
[key: string]: unknown;
|
|
6230
|
-
};
|
|
6231
|
-
/**
|
|
6232
|
-
* Configuration for the trigger generate button
|
|
6233
|
-
*/
|
|
6234
|
-
triggerGenerate?: UiConfig.TriggerGenerate;
|
|
6235
|
-
}
|
|
6236
|
-
namespace UiConfig {
|
|
6237
|
-
interface InputProperties {
|
|
6238
|
-
collapsed?: boolean;
|
|
6239
|
-
}
|
|
6240
|
-
/**
|
|
6241
|
-
* Configuration for the loras component
|
|
6242
|
-
*/
|
|
6243
|
-
interface LorasComponent {
|
|
6244
|
-
/**
|
|
6245
|
-
* The label of the component
|
|
6246
|
-
*/
|
|
6247
|
-
label: string;
|
|
6248
|
-
/**
|
|
6249
|
-
* The input name of the model (model_array)
|
|
6250
|
-
*/
|
|
6251
|
-
modelInput: string;
|
|
6252
|
-
/**
|
|
6253
|
-
* The input name of the scale (number_array)
|
|
6254
|
-
*/
|
|
6255
|
-
scaleInput: string;
|
|
6256
|
-
/**
|
|
6257
|
-
* The input model id (example: a composition or a single LoRA modelId) If
|
|
6258
|
-
* specified, the model id will be attached to the output asset as a metadata If
|
|
6259
|
-
* the model-decomposer parser is specified on it, modelInput and scaleInput will
|
|
6260
|
-
* be automatically populated
|
|
6261
|
-
*/
|
|
6262
|
-
modelIdInput?: string;
|
|
6263
|
-
}
|
|
6264
|
-
interface Preset {
|
|
6265
|
-
fields: Array<string>;
|
|
6266
|
-
presets: unknown;
|
|
6267
|
-
}
|
|
6268
|
-
/**
|
|
6269
|
-
* Configuration for the resolution component
|
|
6270
|
-
*/
|
|
6271
|
-
interface ResolutionComponent {
|
|
6272
|
-
/**
|
|
6273
|
-
* The input name of the height
|
|
6274
|
-
*/
|
|
6275
|
-
heightInput: string;
|
|
6276
|
-
/**
|
|
6277
|
-
* The label of the component
|
|
6278
|
-
*/
|
|
6279
|
-
label: string;
|
|
6280
|
-
/**
|
|
6281
|
-
* The resolution presets
|
|
6282
|
-
*/
|
|
6283
|
-
presets: Array<ResolutionComponent.Preset>;
|
|
6284
|
-
/**
|
|
6285
|
-
* The input name of the width
|
|
6286
|
-
*/
|
|
6287
|
-
widthInput: string;
|
|
6288
|
-
}
|
|
6289
|
-
namespace ResolutionComponent {
|
|
6290
|
-
interface Preset {
|
|
6291
|
-
height: number;
|
|
6292
|
-
label: string;
|
|
6293
|
-
width: number;
|
|
6294
|
-
}
|
|
6295
|
-
}
|
|
6296
|
-
/**
|
|
6297
|
-
* Configuration for the trigger generate button
|
|
6298
|
-
*/
|
|
6299
|
-
interface TriggerGenerate {
|
|
6300
|
-
label: string;
|
|
6301
|
-
/**
|
|
6302
|
-
* The 'name' of the input where the trigger generate button will be displayed
|
|
6303
|
-
* (after the input). Do not specify both position and after.
|
|
6304
|
-
*/
|
|
6305
|
-
after?: string;
|
|
6306
|
-
/**
|
|
6307
|
-
* The position of the trigger generate button. If position specified, the button
|
|
6308
|
-
* will be displayed at the specified position. Do not specify both position and
|
|
6309
|
-
* after.
|
|
6310
|
-
*/
|
|
6311
|
-
position?: 'bottom' | 'top';
|
|
6312
|
-
}
|
|
6314
|
+
interface Billing {
|
|
6315
|
+
cuCost: number;
|
|
6316
|
+
cuDiscount: number;
|
|
6313
6317
|
}
|
|
6314
6318
|
}
|
|
6315
6319
|
}
|
|
@@ -7154,7 +7158,17 @@ export interface WorkflowRunParams {
|
|
|
7154
7158
|
*/
|
|
7155
7159
|
dryRun?: unknown;
|
|
7156
7160
|
}
|
|
7161
|
+
export interface WorkflowUserApprovalParams {
|
|
7162
|
+
/**
|
|
7163
|
+
* The ID of the user approval node to approve in the workflow
|
|
7164
|
+
*/
|
|
7165
|
+
nodeId: string;
|
|
7166
|
+
/**
|
|
7167
|
+
* The ID of the workflow job that contains the user approval node
|
|
7168
|
+
*/
|
|
7169
|
+
workflowJobId: string;
|
|
7170
|
+
}
|
|
7157
7171
|
export declare namespace Workflows {
|
|
7158
|
-
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type
|
|
7172
|
+
export { type WorkflowCreateResponse as WorkflowCreateResponse, type WorkflowRetrieveResponse as WorkflowRetrieveResponse, type WorkflowUpdateResponse as WorkflowUpdateResponse, type WorkflowListResponse as WorkflowListResponse, type WorkflowDeleteResponse as WorkflowDeleteResponse, type WorkflowGetTagsResponse as WorkflowGetTagsResponse, type WorkflowRunResponse as WorkflowRunResponse, type WorkflowUserApprovalResponse as WorkflowUserApprovalResponse, type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor, type WorkflowCreateParams as WorkflowCreateParams, type WorkflowUpdateParams as WorkflowUpdateParams, type WorkflowListParams as WorkflowListParams, type WorkflowApproveUserParams as WorkflowApproveUserParams, type WorkflowGetTagsParams as WorkflowGetTagsParams, type WorkflowRunParams as WorkflowRunParams, type WorkflowUserApprovalParams as WorkflowUserApprovalParams, };
|
|
7159
7173
|
}
|
|
7160
7174
|
//# sourceMappingURL=workflows.d.mts.map
|