@scenario-labs/sdk 2.7.0 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +16 -0
- package/client.d.mts +10 -10
- package/client.d.mts.map +1 -1
- package/client.d.ts +10 -10
- package/client.d.ts.map +1 -1
- package/client.js.map +1 -1
- package/client.mjs.map +1 -1
- package/lib/job.d.mts +2 -2
- package/lib/job.d.mts.map +1 -1
- package/lib/job.d.ts +2 -2
- package/lib/job.d.ts.map +1 -1
- package/lib/job.js +3 -3
- package/lib/job.js.map +1 -1
- package/lib/job.mjs +3 -3
- package/lib/job.mjs.map +1 -1
- package/lib/upload.d.mts +2 -2
- package/lib/upload.d.mts.map +1 -1
- package/lib/upload.d.ts +2 -2
- package/lib/upload.d.ts.map +1 -1
- package/lib/upload.js +4 -4
- package/lib/upload.js.map +1 -1
- package/lib/upload.mjs +4 -4
- 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 +1091 -8
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +1091 -8
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js +34 -16
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs +34 -16
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/download.d.mts +28 -5
- package/resources/assets/download.d.mts.map +1 -1
- package/resources/assets/download.d.ts +28 -5
- package/resources/assets/download.d.ts.map +1 -1
- package/resources/assets/download.js +8 -6
- package/resources/assets/download.js.map +1 -1
- package/resources/assets/download.mjs +8 -6
- package/resources/assets/download.mjs.map +1 -1
- package/resources/assets/index.d.mts +1 -1
- package/resources/assets/index.d.mts.map +1 -1
- package/resources/assets/index.d.ts +1 -1
- package/resources/assets/index.d.ts.map +1 -1
- package/resources/assets/index.js.map +1 -1
- package/resources/assets/index.mjs.map +1 -1
- package/resources/collections/assets.d.mts +15 -4
- package/resources/collections/assets.d.mts.map +1 -1
- package/resources/collections/assets.d.ts +15 -4
- package/resources/collections/assets.d.ts.map +1 -1
- package/resources/collections/assets.js +14 -4
- package/resources/collections/assets.js.map +1 -1
- package/resources/collections/assets.mjs +14 -4
- package/resources/collections/assets.mjs.map +1 -1
- package/resources/collections/collections.d.mts +38 -9
- package/resources/collections/collections.d.mts.map +1 -1
- package/resources/collections/collections.d.ts +38 -9
- package/resources/collections/collections.d.ts.map +1 -1
- package/resources/collections/collections.js +11 -8
- package/resources/collections/collections.js.map +1 -1
- package/resources/collections/collections.mjs +11 -8
- package/resources/collections/collections.mjs.map +1 -1
- package/resources/collections/index.d.mts +1 -1
- package/resources/collections/index.d.mts.map +1 -1
- package/resources/collections/index.d.ts +1 -1
- package/resources/collections/index.d.ts.map +1 -1
- package/resources/collections/index.js.map +1 -1
- package/resources/collections/index.mjs.map +1 -1
- package/resources/collections/models.d.mts +15 -4
- package/resources/collections/models.d.mts.map +1 -1
- package/resources/collections/models.d.ts +15 -4
- package/resources/collections/models.d.ts.map +1 -1
- package/resources/collections/models.js +14 -4
- package/resources/collections/models.js.map +1 -1
- package/resources/collections/models.mjs +14 -4
- package/resources/collections/models.mjs.map +1 -1
- package/resources/generate.d.mts +941 -0
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +941 -0
- package/resources/generate.d.ts.map +1 -1
- package/resources/generate.js +28 -16
- package/resources/generate.js.map +1 -1
- package/resources/generate.mjs +28 -16
- package/resources/generate.mjs.map +1 -1
- package/resources/index.d.mts +5 -5
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +5 -5
- package/resources/index.d.ts.map +1 -1
- package/resources/index.js.map +1 -1
- package/resources/index.mjs.map +1 -1
- package/resources/jobs.d.mts +146 -2
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +146 -2
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +8 -4
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +8 -4
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +10 -0
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +10 -0
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/description.js +2 -2
- package/resources/models/description.js.map +1 -1
- package/resources/models/description.mjs +2 -2
- package/resources/models/description.mjs.map +1 -1
- package/resources/models/examples.d.mts +344 -0
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +344 -0
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/examples.js +2 -2
- package/resources/models/examples.js.map +1 -1
- package/resources/models/examples.mjs +2 -2
- package/resources/models/examples.mjs.map +1 -1
- package/resources/models/index.d.mts +1 -1
- package/resources/models/index.d.mts.map +1 -1
- package/resources/models/index.d.ts +1 -1
- package/resources/models/index.d.ts.map +1 -1
- package/resources/models/index.js.map +1 -1
- package/resources/models/index.mjs.map +1 -1
- package/resources/models/models.d.mts +71 -13
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +71 -13
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js +30 -18
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs +30 -18
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +93 -0
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +93 -0
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +4 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +4 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +22 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +22 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/models/training-images.js +15 -8
- package/resources/models/training-images.js.map +1 -1
- package/resources/models/training-images.mjs +15 -8
- package/resources/models/training-images.mjs.map +1 -1
- package/resources/search.d.mts +10 -0
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +10 -0
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +4 -4
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +4 -4
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +5 -0
- package/resources/tags.d.mts.map +1 -1
- package/resources/tags.d.ts +5 -0
- package/resources/tags.d.ts.map +1 -1
- package/resources/uploads.d.mts +35 -20
- package/resources/uploads.d.mts.map +1 -1
- package/resources/uploads.d.ts +35 -20
- package/resources/uploads.d.ts.map +1 -1
- package/resources/uploads.js +8 -6
- package/resources/uploads.js.map +1 -1
- package/resources/uploads.mjs +8 -6
- package/resources/uploads.mjs.map +1 -1
- package/resources/usages.d.mts +53 -10
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +53 -10
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +446 -266
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +446 -266
- package/resources/workflows.d.ts.map +1 -1
- package/resources/workflows.js +20 -12
- package/resources/workflows.js.map +1 -1
- package/resources/workflows.mjs +20 -12
- package/resources/workflows.mjs.map +1 -1
- package/src/client.ts +14 -0
- package/src/lib/job.ts +8 -3
- package/src/lib/upload.ts +5 -3
- package/src/lib/workflow.ts +3 -1
- package/src/resources/assets/assets.ts +1310 -32
- package/src/resources/assets/download.ts +40 -7
- package/src/resources/assets/index.ts +1 -0
- package/src/resources/collections/assets.ts +29 -6
- package/src/resources/collections/collections.ts +59 -12
- package/src/resources/collections/index.ts +2 -0
- package/src/resources/collections/models.ts +29 -6
- package/src/resources/generate.ts +1247 -30
- package/src/resources/index.ts +7 -0
- package/src/resources/jobs.ts +169 -4
- package/src/resources/models/description.ts +14 -2
- package/src/resources/models/examples.ts +394 -2
- package/src/resources/models/index.ts +1 -0
- package/src/resources/models/models.ts +112 -26
- package/src/resources/models/train.ts +126 -4
- package/src/resources/models/training-images.ts +41 -10
- package/src/resources/search.ts +16 -4
- package/src/resources/tags.ts +6 -0
- package/src/resources/uploads.ts +47 -22
- package/src/resources/usages.ts +63 -10
- package/src/resources/workflows.ts +783 -563
- 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
|
@@ -10,15 +10,20 @@ export class Workflows extends APIResource {
|
|
|
10
10
|
/**
|
|
11
11
|
* Create workflow
|
|
12
12
|
*/
|
|
13
|
-
create(
|
|
14
|
-
|
|
13
|
+
create(params: WorkflowCreateParams, options?: RequestOptions): APIPromise<WorkflowCreateResponse> {
|
|
14
|
+
const { projectId, ...body } = params;
|
|
15
|
+
return this._client.post('/workflows', { query: { projectId }, body, ...options });
|
|
15
16
|
}
|
|
16
17
|
|
|
17
18
|
/**
|
|
18
19
|
* Get workflow by ID
|
|
19
20
|
*/
|
|
20
|
-
retrieve(
|
|
21
|
-
|
|
21
|
+
retrieve(
|
|
22
|
+
workflowID: string,
|
|
23
|
+
query: WorkflowRetrieveParams | null | undefined = {},
|
|
24
|
+
options?: RequestOptions,
|
|
25
|
+
): APIPromise<WorkflowRetrieveResponse> {
|
|
26
|
+
return this._client.get(path`/workflows/${workflowID}`, { query, ...options });
|
|
22
27
|
}
|
|
23
28
|
|
|
24
29
|
/**
|
|
@@ -26,10 +31,11 @@ export class Workflows extends APIResource {
|
|
|
26
31
|
*/
|
|
27
32
|
update(
|
|
28
33
|
workflowID: string,
|
|
29
|
-
|
|
34
|
+
params: WorkflowUpdateParams,
|
|
30
35
|
options?: RequestOptions,
|
|
31
36
|
): APIPromise<WorkflowUpdateResponse> {
|
|
32
|
-
|
|
37
|
+
const { projectId, ...body } = params;
|
|
38
|
+
return this._client.put(path`/workflows/${workflowID}`, { query: { projectId }, body, ...options });
|
|
33
39
|
}
|
|
34
40
|
|
|
35
41
|
/**
|
|
@@ -48,8 +54,13 @@ export class Workflows extends APIResource {
|
|
|
48
54
|
/**
|
|
49
55
|
* Delete workflow
|
|
50
56
|
*/
|
|
51
|
-
delete(
|
|
52
|
-
|
|
57
|
+
delete(
|
|
58
|
+
workflowID: string,
|
|
59
|
+
params: WorkflowDeleteParams | null | undefined = {},
|
|
60
|
+
options?: RequestOptions,
|
|
61
|
+
): APIPromise<unknown> {
|
|
62
|
+
const { projectId } = params ?? {};
|
|
63
|
+
return this._client.delete(path`/workflows/${workflowID}`, { query: { projectId }, ...options });
|
|
53
64
|
}
|
|
54
65
|
|
|
55
66
|
/**
|
|
@@ -71,9 +82,9 @@ export class Workflows extends APIResource {
|
|
|
71
82
|
params: WorkflowRunParams,
|
|
72
83
|
options?: RequestOptions,
|
|
73
84
|
): APIPromise<WorkflowRunResponse> {
|
|
74
|
-
const { body, dryRun } = params;
|
|
85
|
+
const { body, dryRun, projectId } = params;
|
|
75
86
|
return this._client.put(path`/workflows/${workflowID}/run`, {
|
|
76
|
-
query: { dryRun },
|
|
87
|
+
query: { dryRun, projectId },
|
|
77
88
|
body: body,
|
|
78
89
|
...options,
|
|
79
90
|
});
|
|
@@ -87,10 +98,15 @@ export class Workflows extends APIResource {
|
|
|
87
98
|
*/
|
|
88
99
|
userApproval(
|
|
89
100
|
workflowID: string,
|
|
90
|
-
|
|
101
|
+
params: WorkflowUserApprovalParams,
|
|
91
102
|
options?: RequestOptions,
|
|
92
103
|
): APIPromise<WorkflowUserApprovalResponse> {
|
|
93
|
-
|
|
104
|
+
const { projectId, ...body } = params;
|
|
105
|
+
return this._client.put(path`/workflows/${workflowID}/user-approval`, {
|
|
106
|
+
query: { projectId },
|
|
107
|
+
body,
|
|
108
|
+
...options,
|
|
109
|
+
});
|
|
94
110
|
}
|
|
95
111
|
|
|
96
112
|
/**
|
|
@@ -137,6 +153,12 @@ export namespace WorkflowCreateResponse {
|
|
|
137
153
|
*/
|
|
138
154
|
flow: Array<Workflow.Flow>;
|
|
139
155
|
|
|
156
|
+
/**
|
|
157
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
158
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
159
|
+
*/
|
|
160
|
+
hasFlow: boolean;
|
|
161
|
+
|
|
140
162
|
/**
|
|
141
163
|
* The inputs of the workflow.
|
|
142
164
|
*/
|
|
@@ -1445,6 +1467,12 @@ export namespace WorkflowRetrieveResponse {
|
|
|
1445
1467
|
*/
|
|
1446
1468
|
flow: Array<Workflow.Flow>;
|
|
1447
1469
|
|
|
1470
|
+
/**
|
|
1471
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
1472
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
1473
|
+
*/
|
|
1474
|
+
hasFlow: boolean;
|
|
1475
|
+
|
|
1448
1476
|
/**
|
|
1449
1477
|
* The inputs of the workflow.
|
|
1450
1478
|
*/
|
|
@@ -2753,6 +2781,12 @@ export namespace WorkflowUpdateResponse {
|
|
|
2753
2781
|
*/
|
|
2754
2782
|
flow: Array<Workflow.Flow>;
|
|
2755
2783
|
|
|
2784
|
+
/**
|
|
2785
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
2786
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
2787
|
+
*/
|
|
2788
|
+
hasFlow: boolean;
|
|
2789
|
+
|
|
2756
2790
|
/**
|
|
2757
2791
|
* The inputs of the workflow.
|
|
2758
2792
|
*/
|
|
@@ -4025,6 +4059,10 @@ export namespace WorkflowUpdateResponse {
|
|
|
4025
4059
|
}
|
|
4026
4060
|
}
|
|
4027
4061
|
|
|
4062
|
+
/**
|
|
4063
|
+
* A workflow as returned by `GET /v1/workflows`, where the caller can trade the
|
|
4064
|
+
* two heaviest fields away to keep a large page under the response size limit.
|
|
4065
|
+
*/
|
|
4028
4066
|
export interface WorkflowListResponse {
|
|
4029
4067
|
/**
|
|
4030
4068
|
* Unique identifier of the workflow.
|
|
@@ -4047,14 +4085,10 @@ export interface WorkflowListResponse {
|
|
|
4047
4085
|
description: string;
|
|
4048
4086
|
|
|
4049
4087
|
/**
|
|
4050
|
-
*
|
|
4051
|
-
|
|
4052
|
-
editorInfo: { [key: string]: unknown };
|
|
4053
|
-
|
|
4054
|
-
/**
|
|
4055
|
-
* The flow of the workflow.
|
|
4088
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
4089
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
4056
4090
|
*/
|
|
4057
|
-
|
|
4091
|
+
hasFlow: boolean;
|
|
4058
4092
|
|
|
4059
4093
|
/**
|
|
4060
4094
|
* The inputs of the workflow.
|
|
@@ -4106,11 +4140,23 @@ export interface WorkflowListResponse {
|
|
|
4106
4140
|
*/
|
|
4107
4141
|
before?: WorkflowListResponse.Before;
|
|
4108
4142
|
|
|
4143
|
+
/**
|
|
4144
|
+
* The UI data about the workflow. This is managed by scenario webapp. Omitted when
|
|
4145
|
+
* the listing is requested with `full=false`.
|
|
4146
|
+
*/
|
|
4147
|
+
editorInfo?: { [key: string]: unknown };
|
|
4148
|
+
|
|
4109
4149
|
/**
|
|
4110
4150
|
* Embedding is a map of embedding version into embedding date
|
|
4111
4151
|
*/
|
|
4112
4152
|
embedding?: unknown;
|
|
4113
4153
|
|
|
4154
|
+
/**
|
|
4155
|
+
* The flow of the workflow. Omitted when the listing is requested with
|
|
4156
|
+
* `full=false`; read `hasFlow` to know whether there is a flow to fetch.
|
|
4157
|
+
*/
|
|
4158
|
+
flow?: Array<WorkflowListResponse.Flow>;
|
|
4159
|
+
|
|
4114
4160
|
/**
|
|
4115
4161
|
* Whether the workflow is locked. Locked workflows cannot be modified or deleted
|
|
4116
4162
|
* except by the author or a project admin.
|
|
@@ -4147,236 +4193,531 @@ export interface WorkflowListResponse {
|
|
|
4147
4193
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'>;
|
|
4148
4194
|
|
|
4149
4195
|
/**
|
|
4150
|
-
*
|
|
4196
|
+
* Optional thumbnail asset for listing/display. Currently the thumbnail is
|
|
4197
|
+
* identical to the after asset.
|
|
4151
4198
|
*/
|
|
4152
4199
|
thumbnail?: WorkflowListResponse.Thumbnail;
|
|
4153
4200
|
|
|
4154
4201
|
/**
|
|
4155
|
-
*
|
|
4202
|
+
* UI configuration for custom workflows input display configuration. The UI
|
|
4203
|
+
* configuration for the workflow. This is managed by scenario webapp.
|
|
4156
4204
|
*/
|
|
4157
4205
|
uiConfig?: WorkflowListResponse.UiConfig;
|
|
4158
4206
|
}
|
|
4159
4207
|
|
|
4160
4208
|
export namespace WorkflowListResponse {
|
|
4161
|
-
|
|
4209
|
+
/**
|
|
4210
|
+
* Defines the input parameters for a model. Use this to understand the available
|
|
4211
|
+
* input parameters for a given `modelId` when calling
|
|
4212
|
+
* `POST /generate/custom/{modelId}`. See {@link
|
|
4213
|
+
* https://docs.scenario.com/get-started/generation/video-generation} for examples.
|
|
4214
|
+
*/
|
|
4215
|
+
export interface Input {
|
|
4162
4216
|
/**
|
|
4163
|
-
* The
|
|
4217
|
+
* The name that must be user to call the model through the API
|
|
4164
4218
|
*/
|
|
4165
|
-
|
|
4219
|
+
name: string;
|
|
4166
4220
|
|
|
4167
4221
|
/**
|
|
4168
|
-
* The type of the
|
|
4222
|
+
* The data type of the input
|
|
4169
4223
|
*/
|
|
4170
4224
|
type:
|
|
4171
|
-
| '
|
|
4172
|
-
| '
|
|
4173
|
-
| '
|
|
4174
|
-
| '
|
|
4175
|
-
| 'logic'
|
|
4225
|
+
| 'boolean'
|
|
4226
|
+
| 'file'
|
|
4227
|
+
| 'file_array'
|
|
4228
|
+
| 'inputs_array'
|
|
4176
4229
|
| 'model'
|
|
4177
|
-
| '
|
|
4178
|
-
| '
|
|
4179
|
-
| '
|
|
4180
|
-
| '
|
|
4230
|
+
| 'model_array'
|
|
4231
|
+
| 'number'
|
|
4232
|
+
| 'number_array'
|
|
4233
|
+
| 'string'
|
|
4234
|
+
| 'string_array';
|
|
4181
4235
|
|
|
4182
4236
|
/**
|
|
4183
|
-
*
|
|
4184
|
-
*
|
|
4185
|
-
*
|
|
4237
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
4238
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
4239
|
+
* dropdown.
|
|
4186
4240
|
*/
|
|
4187
|
-
|
|
4241
|
+
allowedValues?: Array<unknown>;
|
|
4188
4242
|
|
|
4189
4243
|
/**
|
|
4190
|
-
*
|
|
4191
|
-
*
|
|
4244
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
4245
|
+
* \`file_array\` input types with kind \`image\`.
|
|
4192
4246
|
*/
|
|
4193
|
-
|
|
4247
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
4194
4248
|
|
|
4195
4249
|
/**
|
|
4196
|
-
*
|
|
4197
|
-
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
4198
|
-
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
4199
|
-
* outputs. Set this to true to also include intermediate nodes in the final
|
|
4200
|
-
* output. Note: This should only be set to `true` or left undefined.
|
|
4250
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
4201
4251
|
*/
|
|
4202
|
-
|
|
4252
|
+
color?: boolean;
|
|
4203
4253
|
|
|
4204
4254
|
/**
|
|
4205
|
-
*
|
|
4255
|
+
* Whether this input affects the model's cost calculation
|
|
4206
4256
|
*/
|
|
4207
|
-
|
|
4257
|
+
costImpact?: boolean;
|
|
4208
4258
|
|
|
4209
4259
|
/**
|
|
4210
|
-
*
|
|
4211
|
-
* when executed. Only available for List nodes. The values can be strings,
|
|
4212
|
-
* numbers, or asset IDs.
|
|
4260
|
+
* The default value for the input
|
|
4213
4261
|
*/
|
|
4214
|
-
|
|
4262
|
+
default?: unknown;
|
|
4215
4263
|
|
|
4216
4264
|
/**
|
|
4217
|
-
*
|
|
4218
|
-
* dynamically-created copies of loop body nodes.
|
|
4265
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
4219
4266
|
*/
|
|
4220
|
-
|
|
4267
|
+
description?: string;
|
|
4221
4268
|
|
|
4222
4269
|
/**
|
|
4223
|
-
*
|
|
4270
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
4271
|
+
* value appear consecutively in the UI.
|
|
4224
4272
|
*/
|
|
4225
|
-
|
|
4273
|
+
group?: string;
|
|
4226
4274
|
|
|
4227
4275
|
/**
|
|
4228
|
-
*
|
|
4276
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
4229
4277
|
*/
|
|
4230
|
-
|
|
4278
|
+
hint?: string;
|
|
4231
4279
|
|
|
4232
4280
|
/**
|
|
4233
|
-
*
|
|
4234
|
-
*
|
|
4235
|
-
*
|
|
4281
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
4282
|
+
* the same as the current object. This is only available for type inputs_array
|
|
4283
|
+
* inputs.
|
|
4236
4284
|
*/
|
|
4237
|
-
|
|
4285
|
+
inputs?: Array<{ [key: string]: unknown }>;
|
|
4238
4286
|
|
|
4239
4287
|
/**
|
|
4240
|
-
*
|
|
4241
|
-
*
|
|
4288
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4289
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4290
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
4291
|
+
* data:kind, prefix
|
|
4242
4292
|
*/
|
|
4243
|
-
|
|
4293
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
|
|
4244
4294
|
|
|
4245
4295
|
/**
|
|
4246
|
-
* The
|
|
4296
|
+
* The label displayed in the UI for this input
|
|
4247
4297
|
*/
|
|
4248
|
-
|
|
4298
|
+
label?: string;
|
|
4249
4299
|
|
|
4250
4300
|
/**
|
|
4251
|
-
* The
|
|
4301
|
+
* The name of the file input field to use as the mask source
|
|
4252
4302
|
*/
|
|
4253
|
-
|
|
4254
|
-
}
|
|
4303
|
+
maskFrom?: string;
|
|
4255
4304
|
|
|
4256
|
-
export namespace Flow {
|
|
4257
4305
|
/**
|
|
4258
|
-
*
|
|
4306
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
4307
|
+
* types.
|
|
4259
4308
|
*/
|
|
4260
|
-
|
|
4261
|
-
/**
|
|
4262
|
-
* The name that must be user to call the model through the API
|
|
4263
|
-
*/
|
|
4264
|
-
name: string;
|
|
4265
|
-
|
|
4266
|
-
/**
|
|
4267
|
-
* The data type of the input
|
|
4268
|
-
*/
|
|
4269
|
-
type:
|
|
4270
|
-
| 'boolean'
|
|
4271
|
-
| 'file'
|
|
4272
|
-
| 'file_array'
|
|
4273
|
-
| 'inputs_array'
|
|
4274
|
-
| 'model'
|
|
4275
|
-
| 'model_array'
|
|
4276
|
-
| 'number'
|
|
4277
|
-
| 'number_array'
|
|
4278
|
-
| 'string'
|
|
4279
|
-
| 'string_array';
|
|
4309
|
+
max?: number;
|
|
4280
4310
|
|
|
4281
|
-
|
|
4282
|
-
|
|
4283
|
-
|
|
4284
|
-
|
|
4285
|
-
|
|
4286
|
-
|
|
4311
|
+
/**
|
|
4312
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
4313
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
4314
|
+
* \`asset.properties.duration\` at job creation time.
|
|
4315
|
+
*/
|
|
4316
|
+
maxDuration?: number;
|
|
4287
4317
|
|
|
4288
|
-
|
|
4289
|
-
|
|
4290
|
-
|
|
4291
|
-
|
|
4292
|
-
|
|
4318
|
+
/**
|
|
4319
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4320
|
+
* \`string_array\`.
|
|
4321
|
+
*/
|
|
4322
|
+
maxLength?: number;
|
|
4293
4323
|
|
|
4294
|
-
|
|
4295
|
-
|
|
4296
|
-
|
|
4297
|
-
|
|
4324
|
+
/**
|
|
4325
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
4326
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
4327
|
+
* creation time.
|
|
4328
|
+
*/
|
|
4329
|
+
maxSize?: number;
|
|
4298
4330
|
|
|
4299
|
-
|
|
4300
|
-
|
|
4301
|
-
|
|
4302
|
-
|
|
4331
|
+
/**
|
|
4332
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
4333
|
+
*/
|
|
4334
|
+
min?: number;
|
|
4303
4335
|
|
|
4304
|
-
|
|
4305
|
-
|
|
4306
|
-
|
|
4307
|
-
|
|
4336
|
+
/**
|
|
4337
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
4338
|
+
* \`string_array\`.
|
|
4339
|
+
*/
|
|
4340
|
+
minLength?: number;
|
|
4308
4341
|
|
|
4309
|
-
|
|
4310
|
-
|
|
4311
|
-
|
|
4312
|
-
|
|
4342
|
+
/**
|
|
4343
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
4344
|
+
* available for \`model_array\` input type.
|
|
4345
|
+
*/
|
|
4346
|
+
modelTypes?: Array<
|
|
4347
|
+
| 'custom'
|
|
4348
|
+
| 'elevenlabs-voice'
|
|
4349
|
+
| 'flux.1'
|
|
4350
|
+
| 'flux.1-composition'
|
|
4351
|
+
| 'flux.1-kontext-dev'
|
|
4352
|
+
| 'flux.1-kontext-lora'
|
|
4353
|
+
| 'flux.1-krea-dev'
|
|
4354
|
+
| 'flux.1-krea-lora'
|
|
4355
|
+
| 'flux.1-lora'
|
|
4356
|
+
| 'flux.1-pro'
|
|
4357
|
+
| 'flux.1.1-pro-ultra'
|
|
4358
|
+
| 'flux.2-dev-edit-lora'
|
|
4359
|
+
| 'flux.2-dev-lora'
|
|
4360
|
+
| 'flux.2-klein-4b-edit-lora'
|
|
4361
|
+
| 'flux.2-klein-4b-lora'
|
|
4362
|
+
| 'flux.2-klein-9b-edit-lora'
|
|
4363
|
+
| 'flux.2-klein-9b-lora'
|
|
4364
|
+
| 'flux.2-klein-base-4b-edit-lora'
|
|
4365
|
+
| 'flux.2-klein-base-4b-lora'
|
|
4366
|
+
| 'flux.2-klein-base-9b-edit-lora'
|
|
4367
|
+
| 'flux.2-klein-base-9b-lora'
|
|
4368
|
+
| 'flux1.1-pro'
|
|
4369
|
+
| 'gpt-image-1'
|
|
4370
|
+
| 'qwen-image-2512-lora'
|
|
4371
|
+
| 'qwen-image-edit-2509-lora'
|
|
4372
|
+
| 'qwen-image-edit-2511-lora'
|
|
4373
|
+
| 'qwen-image-edit-lora'
|
|
4374
|
+
| 'qwen-image-lora'
|
|
4375
|
+
| 'zimage-de-turbo-lora'
|
|
4376
|
+
| 'zimage-lora'
|
|
4377
|
+
| 'zimage-turbo-lora'
|
|
4378
|
+
>;
|
|
4313
4379
|
|
|
4314
|
-
|
|
4315
|
-
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4380
|
+
/**
|
|
4381
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
4382
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
4383
|
+
*
|
|
4384
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
4385
|
+
*/
|
|
4386
|
+
parent?: boolean;
|
|
4319
4387
|
|
|
4320
|
-
|
|
4321
|
-
|
|
4322
|
-
|
|
4323
|
-
|
|
4388
|
+
/**
|
|
4389
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
4390
|
+
*/
|
|
4391
|
+
placeholder?: string;
|
|
4392
|
+
|
|
4393
|
+
/**
|
|
4394
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
4395
|
+
* spark feature. Only available for \`string\` input type.
|
|
4396
|
+
*/
|
|
4397
|
+
prompt?: boolean;
|
|
4398
|
+
|
|
4399
|
+
/**
|
|
4400
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
4401
|
+
* type.
|
|
4402
|
+
*/
|
|
4403
|
+
promptSpark?: boolean;
|
|
4404
|
+
|
|
4405
|
+
/**
|
|
4406
|
+
* Set of rules that describes when this input is required:
|
|
4407
|
+
*
|
|
4408
|
+
* - \`always\`: Input is always required
|
|
4409
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4410
|
+
* defined
|
|
4411
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4412
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4413
|
+
* value
|
|
4414
|
+
*
|
|
4415
|
+
* By default, the input is not required.
|
|
4416
|
+
*/
|
|
4417
|
+
required?: Input.Required;
|
|
4418
|
+
|
|
4419
|
+
/**
|
|
4420
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
4421
|
+
*/
|
|
4422
|
+
step?: number;
|
|
4423
|
+
}
|
|
4324
4424
|
|
|
4425
|
+
export namespace Input {
|
|
4426
|
+
/**
|
|
4427
|
+
* Set of rules that describes when this input is required:
|
|
4428
|
+
*
|
|
4429
|
+
* - \`always\`: Input is always required
|
|
4430
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4431
|
+
* defined
|
|
4432
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4433
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4434
|
+
* value
|
|
4435
|
+
*
|
|
4436
|
+
* By default, the input is not required.
|
|
4437
|
+
*/
|
|
4438
|
+
export interface Required {
|
|
4325
4439
|
/**
|
|
4326
|
-
*
|
|
4327
|
-
* the same as the current object. This is only available for type inputs_array
|
|
4328
|
-
* inputs.
|
|
4440
|
+
* Whether the input is always required
|
|
4329
4441
|
*/
|
|
4330
|
-
|
|
4442
|
+
always?: boolean;
|
|
4331
4443
|
|
|
4332
4444
|
/**
|
|
4333
|
-
*
|
|
4334
|
-
*
|
|
4335
|
-
*
|
|
4445
|
+
* Makes this input required when another input has a specific value:
|
|
4446
|
+
*
|
|
4447
|
+
* - Key: name of the input to check
|
|
4448
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
4336
4449
|
*/
|
|
4337
|
-
|
|
4450
|
+
conditionalValues?: unknown;
|
|
4338
4451
|
|
|
4339
4452
|
/**
|
|
4340
|
-
*
|
|
4341
|
-
*
|
|
4342
|
-
*
|
|
4343
|
-
*
|
|
4453
|
+
* Makes this input required when another input is defined:
|
|
4454
|
+
*
|
|
4455
|
+
* - Key: name of the input that must be defined
|
|
4456
|
+
* - Value: message to display when this input is required
|
|
4344
4457
|
*/
|
|
4345
|
-
|
|
4458
|
+
ifDefined?: unknown;
|
|
4346
4459
|
|
|
4347
4460
|
/**
|
|
4348
|
-
*
|
|
4461
|
+
* Makes this input required when another input is not defined:
|
|
4462
|
+
*
|
|
4463
|
+
* - Key: name of the input that must be undefined
|
|
4464
|
+
* - Value: message to display when this input is required
|
|
4349
4465
|
*/
|
|
4350
|
-
|
|
4466
|
+
ifNotDefined?: unknown;
|
|
4467
|
+
}
|
|
4468
|
+
}
|
|
4469
|
+
|
|
4470
|
+
/**
|
|
4471
|
+
* A representation of an asset after being processed by the workflow
|
|
4472
|
+
*/
|
|
4473
|
+
export interface After {
|
|
4474
|
+
/**
|
|
4475
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
4476
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
4477
|
+
*/
|
|
4478
|
+
assetId: string;
|
|
4479
|
+
|
|
4480
|
+
/**
|
|
4481
|
+
* The url of the image used as a thumbnail for your model
|
|
4482
|
+
*/
|
|
4483
|
+
url: string;
|
|
4484
|
+
}
|
|
4485
|
+
|
|
4486
|
+
/**
|
|
4487
|
+
* A representation of an asset before being processed by the workflow
|
|
4488
|
+
*/
|
|
4489
|
+
export interface Before {
|
|
4490
|
+
/**
|
|
4491
|
+
* The AssetId of the image used as a thumbnail for your model (example:
|
|
4492
|
+
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
4493
|
+
*/
|
|
4494
|
+
assetId: string;
|
|
4495
|
+
|
|
4496
|
+
/**
|
|
4497
|
+
* The url of the image used as a thumbnail for your model
|
|
4498
|
+
*/
|
|
4499
|
+
url: string;
|
|
4500
|
+
}
|
|
4501
|
+
|
|
4502
|
+
export interface Flow {
|
|
4503
|
+
/**
|
|
4504
|
+
* The id of the node.
|
|
4505
|
+
*/
|
|
4506
|
+
id: string;
|
|
4507
|
+
|
|
4508
|
+
/**
|
|
4509
|
+
* The type of the job for the node.
|
|
4510
|
+
*/
|
|
4511
|
+
type:
|
|
4512
|
+
| 'custom-model'
|
|
4513
|
+
| 'for-each'
|
|
4514
|
+
| 'generate-prompt'
|
|
4515
|
+
| 'list'
|
|
4516
|
+
| 'logic'
|
|
4517
|
+
| 'model'
|
|
4518
|
+
| 'remove-background'
|
|
4519
|
+
| 'transform'
|
|
4520
|
+
| 'user-approval'
|
|
4521
|
+
| 'workflow';
|
|
4522
|
+
|
|
4523
|
+
/**
|
|
4524
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
4525
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
4526
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
4527
|
+
*/
|
|
4528
|
+
count?: number;
|
|
4529
|
+
|
|
4530
|
+
/**
|
|
4531
|
+
* The nodes that this node depends on. Only available for nodes that have
|
|
4532
|
+
* dependencies. Mainly used for user approval nodes.
|
|
4533
|
+
*/
|
|
4534
|
+
dependsOn?: Array<string>;
|
|
4535
|
+
|
|
4536
|
+
/**
|
|
4537
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
4538
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
4539
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
4540
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
4541
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
4542
|
+
*/
|
|
4543
|
+
includeOutputsInWorkflowJob?: true;
|
|
4544
|
+
|
|
4545
|
+
/**
|
|
4546
|
+
* The inputs of the node.
|
|
4547
|
+
*/
|
|
4548
|
+
inputs?: Array<Flow.Input>;
|
|
4549
|
+
|
|
4550
|
+
/**
|
|
4551
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
4552
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
4553
|
+
* numbers, or asset IDs.
|
|
4554
|
+
*/
|
|
4555
|
+
items?: Array<string>;
|
|
4556
|
+
|
|
4557
|
+
/**
|
|
4558
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
4559
|
+
* dynamically-created copies of loop body nodes.
|
|
4560
|
+
*/
|
|
4561
|
+
iterationIndex?: number;
|
|
4562
|
+
|
|
4563
|
+
/**
|
|
4564
|
+
* The logic of the node. Only available for logic nodes.
|
|
4565
|
+
*/
|
|
4566
|
+
logic?: Flow.Logic;
|
|
4567
|
+
|
|
4568
|
+
/**
|
|
4569
|
+
* The type of the logic for the node. Only available for logic nodes.
|
|
4570
|
+
*/
|
|
4571
|
+
logicType?: 'if-else';
|
|
4572
|
+
|
|
4573
|
+
/**
|
|
4574
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
4575
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
4576
|
+
* for ForEach nodes.
|
|
4577
|
+
*/
|
|
4578
|
+
loopBodyNodeIds?: Array<string>;
|
|
4579
|
+
|
|
4580
|
+
/**
|
|
4581
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
4582
|
+
* dynamically-created copies of loop body nodes.
|
|
4583
|
+
*/
|
|
4584
|
+
loopNodeId?: string;
|
|
4585
|
+
|
|
4586
|
+
/**
|
|
4587
|
+
* The model id for the node. Mainly used for custom model tasks.
|
|
4588
|
+
*/
|
|
4589
|
+
modelId?: string;
|
|
4351
4590
|
|
|
4591
|
+
/**
|
|
4592
|
+
* The workflow id for the node. Mainly used for workflow tasks.
|
|
4593
|
+
*/
|
|
4594
|
+
workflowId?: string;
|
|
4595
|
+
}
|
|
4596
|
+
|
|
4597
|
+
export namespace Flow {
|
|
4598
|
+
/**
|
|
4599
|
+
* This is used to run the flow.
|
|
4600
|
+
*/
|
|
4601
|
+
export interface Input {
|
|
4352
4602
|
/**
|
|
4353
|
-
* The name
|
|
4603
|
+
* The name that must be user to call the model through the API
|
|
4354
4604
|
*/
|
|
4355
|
-
|
|
4605
|
+
name: string;
|
|
4356
4606
|
|
|
4357
4607
|
/**
|
|
4358
|
-
* The
|
|
4359
|
-
* types.
|
|
4608
|
+
* The data type of the input
|
|
4360
4609
|
*/
|
|
4361
|
-
|
|
4610
|
+
type:
|
|
4611
|
+
| 'boolean'
|
|
4612
|
+
| 'file'
|
|
4613
|
+
| 'file_array'
|
|
4614
|
+
| 'inputs_array'
|
|
4615
|
+
| 'model'
|
|
4616
|
+
| 'model_array'
|
|
4617
|
+
| 'number'
|
|
4618
|
+
| 'number_array'
|
|
4619
|
+
| 'string'
|
|
4620
|
+
| 'string_array';
|
|
4362
4621
|
|
|
4363
4622
|
/**
|
|
4364
|
-
* The
|
|
4365
|
-
*
|
|
4366
|
-
*
|
|
4623
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
4624
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
4625
|
+
* dropdown.
|
|
4367
4626
|
*/
|
|
4368
|
-
|
|
4627
|
+
allowedValues?: Array<unknown>;
|
|
4369
4628
|
|
|
4370
4629
|
/**
|
|
4371
|
-
*
|
|
4372
|
-
* \`
|
|
4630
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
4631
|
+
* \`file_array\` input types with kind \`image\`.
|
|
4373
4632
|
*/
|
|
4374
|
-
|
|
4633
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
4375
4634
|
|
|
4376
4635
|
/**
|
|
4377
|
-
*
|
|
4378
|
-
|
|
4379
|
-
|
|
4636
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
4637
|
+
*/
|
|
4638
|
+
color?: boolean;
|
|
4639
|
+
|
|
4640
|
+
/**
|
|
4641
|
+
* Whether this input affects the model's cost calculation
|
|
4642
|
+
*/
|
|
4643
|
+
costImpact?: boolean;
|
|
4644
|
+
|
|
4645
|
+
/**
|
|
4646
|
+
* The default value for the input
|
|
4647
|
+
*/
|
|
4648
|
+
default?: unknown;
|
|
4649
|
+
|
|
4650
|
+
/**
|
|
4651
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
4652
|
+
*/
|
|
4653
|
+
description?: string;
|
|
4654
|
+
|
|
4655
|
+
/**
|
|
4656
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
4657
|
+
* value appear consecutively in the UI.
|
|
4658
|
+
*/
|
|
4659
|
+
group?: string;
|
|
4660
|
+
|
|
4661
|
+
/**
|
|
4662
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
4663
|
+
*/
|
|
4664
|
+
hint?: string;
|
|
4665
|
+
|
|
4666
|
+
/**
|
|
4667
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
4668
|
+
* the same as the current object. This is only available for type inputs_array
|
|
4669
|
+
* inputs.
|
|
4670
|
+
*/
|
|
4671
|
+
inputs?: Array<{ [key: string]: unknown }>;
|
|
4672
|
+
|
|
4673
|
+
/**
|
|
4674
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
4675
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
4676
|
+
* type.
|
|
4677
|
+
*/
|
|
4678
|
+
items?: Array<Array<Input.Item>>;
|
|
4679
|
+
|
|
4680
|
+
/**
|
|
4681
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4682
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4683
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
4684
|
+
* data:kind, prefix
|
|
4685
|
+
*/
|
|
4686
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
|
|
4687
|
+
|
|
4688
|
+
/**
|
|
4689
|
+
* The label displayed in the UI for this input
|
|
4690
|
+
*/
|
|
4691
|
+
label?: string;
|
|
4692
|
+
|
|
4693
|
+
/**
|
|
4694
|
+
* The name of the file input field to use as the mask source
|
|
4695
|
+
*/
|
|
4696
|
+
maskFrom?: string;
|
|
4697
|
+
|
|
4698
|
+
/**
|
|
4699
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
4700
|
+
* types.
|
|
4701
|
+
*/
|
|
4702
|
+
max?: number;
|
|
4703
|
+
|
|
4704
|
+
/**
|
|
4705
|
+
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
4706
|
+
* \`file_array\` input types for video and audio assets. Validated against
|
|
4707
|
+
* \`asset.properties.duration\` at job creation time.
|
|
4708
|
+
*/
|
|
4709
|
+
maxDuration?: number;
|
|
4710
|
+
|
|
4711
|
+
/**
|
|
4712
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
4713
|
+
* \`string_array\`.
|
|
4714
|
+
*/
|
|
4715
|
+
maxLength?: number;
|
|
4716
|
+
|
|
4717
|
+
/**
|
|
4718
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
4719
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
4720
|
+
* creation time.
|
|
4380
4721
|
*/
|
|
4381
4722
|
maxSize?: number;
|
|
4382
4723
|
|
|
@@ -4793,411 +5134,122 @@ export namespace WorkflowListResponse {
|
|
|
4793
5134
|
* The reference to another input or output of the same workflow. Must have at
|
|
4794
5135
|
* least one of node or conditional.
|
|
4795
5136
|
*/
|
|
4796
|
-
export interface Ref {
|
|
4797
|
-
/**
|
|
4798
|
-
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
4799
|
-
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
4800
|
-
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
4801
|
-
*/
|
|
4802
|
-
conditional?: Array<string>;
|
|
4803
|
-
|
|
4804
|
-
/**
|
|
4805
|
-
* This is the desired node output value if ref is an if/else node.
|
|
4806
|
-
*/
|
|
4807
|
-
equal?: string;
|
|
4808
|
-
|
|
4809
|
-
/**
|
|
4810
|
-
* The name of the input or output to reference. If the type is 'workflow', the
|
|
4811
|
-
* name is the name of the input of the workflow is required If the type is 'node',
|
|
4812
|
-
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
4813
|
-
* all outputs of a node, you can use the name 'all'.
|
|
4814
|
-
*/
|
|
4815
|
-
name?: string;
|
|
4816
|
-
|
|
4817
|
-
/**
|
|
4818
|
-
* The node id or 'workflow' if the source is a workflow input.
|
|
4819
|
-
*/
|
|
4820
|
-
node?: string;
|
|
4821
|
-
}
|
|
4822
|
-
|
|
4823
|
-
/**
|
|
4824
|
-
* Set of rules that describes when this input is required:
|
|
4825
|
-
*
|
|
4826
|
-
* - \`always\`: Input is always required
|
|
4827
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
4828
|
-
* defined
|
|
4829
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
4830
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
4831
|
-
* value
|
|
4832
|
-
*
|
|
4833
|
-
* By default, the input is not required.
|
|
4834
|
-
*/
|
|
4835
|
-
export interface Required {
|
|
4836
|
-
/**
|
|
4837
|
-
* Whether the input is always required
|
|
4838
|
-
*/
|
|
4839
|
-
always?: boolean;
|
|
4840
|
-
|
|
4841
|
-
/**
|
|
4842
|
-
* Makes this input required when another input has a specific value:
|
|
4843
|
-
*
|
|
4844
|
-
* - Key: name of the input to check
|
|
4845
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
4846
|
-
*/
|
|
4847
|
-
conditionalValues?: unknown;
|
|
4848
|
-
|
|
4849
|
-
/**
|
|
4850
|
-
* Makes this input required when another input is defined:
|
|
4851
|
-
*
|
|
4852
|
-
* - Key: name of the input that must be defined
|
|
4853
|
-
* - Value: message to display when this input is required
|
|
4854
|
-
*/
|
|
4855
|
-
ifDefined?: unknown;
|
|
4856
|
-
|
|
4857
|
-
/**
|
|
4858
|
-
* Makes this input required when another input is not defined:
|
|
4859
|
-
*
|
|
4860
|
-
* - Key: name of the input that must be undefined
|
|
4861
|
-
* - Value: message to display when this input is required
|
|
4862
|
-
*/
|
|
4863
|
-
ifNotDefined?: unknown;
|
|
4864
|
-
}
|
|
4865
|
-
}
|
|
4866
|
-
|
|
4867
|
-
/**
|
|
4868
|
-
* The logic of the node. Only available for logic nodes.
|
|
4869
|
-
*/
|
|
4870
|
-
export interface Logic {
|
|
4871
|
-
/**
|
|
4872
|
-
* The cases of the logic. Only available for if/else nodes.
|
|
4873
|
-
*/
|
|
4874
|
-
cases?: Array<Logic.Case>;
|
|
4875
|
-
|
|
4876
|
-
/**
|
|
4877
|
-
* The default case of the logic. Contains the id/output of the node to execute if
|
|
4878
|
-
* no case is matched. Only available for if/else nodes.
|
|
4879
|
-
*/
|
|
4880
|
-
default?: string;
|
|
4881
|
-
|
|
4882
|
-
/**
|
|
4883
|
-
* The transform of the logic. Only available for transform nodes.
|
|
4884
|
-
*/
|
|
4885
|
-
transform?: string;
|
|
4886
|
-
}
|
|
4887
|
-
|
|
4888
|
-
export namespace Logic {
|
|
4889
|
-
export interface Case {
|
|
4890
|
-
condition: string;
|
|
4891
|
-
|
|
4892
|
-
value: string;
|
|
4893
|
-
}
|
|
4894
|
-
}
|
|
4895
|
-
}
|
|
4896
|
-
|
|
4897
|
-
/**
|
|
4898
|
-
* Defines the input parameters for a model. Use this to understand the available
|
|
4899
|
-
* input parameters for a given `modelId` when calling
|
|
4900
|
-
* `POST /generate/custom/{modelId}`. See {@link
|
|
4901
|
-
* https://docs.scenario.com/get-started/generation/video-generation} for examples.
|
|
4902
|
-
*/
|
|
4903
|
-
export interface Input {
|
|
4904
|
-
/**
|
|
4905
|
-
* The name that must be user to call the model through the API
|
|
4906
|
-
*/
|
|
4907
|
-
name: string;
|
|
4908
|
-
|
|
4909
|
-
/**
|
|
4910
|
-
* The data type of the input
|
|
4911
|
-
*/
|
|
4912
|
-
type:
|
|
4913
|
-
| 'boolean'
|
|
4914
|
-
| 'file'
|
|
4915
|
-
| 'file_array'
|
|
4916
|
-
| 'inputs_array'
|
|
4917
|
-
| 'model'
|
|
4918
|
-
| 'model_array'
|
|
4919
|
-
| 'number'
|
|
4920
|
-
| 'number_array'
|
|
4921
|
-
| 'string'
|
|
4922
|
-
| 'string_array';
|
|
4923
|
-
|
|
4924
|
-
/**
|
|
4925
|
-
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
4926
|
-
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
4927
|
-
* dropdown.
|
|
4928
|
-
*/
|
|
4929
|
-
allowedValues?: Array<unknown>;
|
|
4930
|
-
|
|
4931
|
-
/**
|
|
4932
|
-
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
4933
|
-
* \`file_array\` input types with kind \`image\`.
|
|
4934
|
-
*/
|
|
4935
|
-
backgroundBehavior?: 'opaque' | 'transparent';
|
|
4936
|
-
|
|
4937
|
-
/**
|
|
4938
|
-
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
4939
|
-
*/
|
|
4940
|
-
color?: boolean;
|
|
4941
|
-
|
|
4942
|
-
/**
|
|
4943
|
-
* Whether this input affects the model's cost calculation
|
|
4944
|
-
*/
|
|
4945
|
-
costImpact?: boolean;
|
|
4946
|
-
|
|
4947
|
-
/**
|
|
4948
|
-
* The default value for the input
|
|
4949
|
-
*/
|
|
4950
|
-
default?: unknown;
|
|
4951
|
-
|
|
4952
|
-
/**
|
|
4953
|
-
* Help text displayed in the UI to provide additional information about the input
|
|
4954
|
-
*/
|
|
4955
|
-
description?: string;
|
|
4956
|
-
|
|
4957
|
-
/**
|
|
4958
|
-
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
4959
|
-
* value appear consecutively in the UI.
|
|
4960
|
-
*/
|
|
4961
|
-
group?: string;
|
|
4962
|
-
|
|
4963
|
-
/**
|
|
4964
|
-
* Hint text displayed in the UI as a tooltip to guide the user
|
|
4965
|
-
*/
|
|
4966
|
-
hint?: string;
|
|
4967
|
-
|
|
4968
|
-
/**
|
|
4969
|
-
* The list of inputs which form an object within a container array. All inputs are
|
|
4970
|
-
* the same as the current object. This is only available for type inputs_array
|
|
4971
|
-
* inputs.
|
|
4972
|
-
*/
|
|
4973
|
-
inputs?: Array<{ [key: string]: unknown }>;
|
|
4974
|
-
|
|
4975
|
-
/**
|
|
4976
|
-
* The asset kind of the input. Only taken into account for \`file\` and
|
|
4977
|
-
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
4978
|
-
* not able to create the asset on the flight on API side with dataurl without
|
|
4979
|
-
* data:kind, prefix
|
|
4980
|
-
*/
|
|
4981
|
-
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video';
|
|
4982
|
-
|
|
4983
|
-
/**
|
|
4984
|
-
* The label displayed in the UI for this input
|
|
4985
|
-
*/
|
|
4986
|
-
label?: string;
|
|
4987
|
-
|
|
4988
|
-
/**
|
|
4989
|
-
* The name of the file input field to use as the mask source
|
|
4990
|
-
*/
|
|
4991
|
-
maskFrom?: string;
|
|
4992
|
-
|
|
4993
|
-
/**
|
|
4994
|
-
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
4995
|
-
* types.
|
|
4996
|
-
*/
|
|
4997
|
-
max?: number;
|
|
4998
|
-
|
|
4999
|
-
/**
|
|
5000
|
-
* The maximum allowed media duration in seconds. Only applies to \`file\` and
|
|
5001
|
-
* \`file_array\` input types for video and audio assets. Validated against
|
|
5002
|
-
* \`asset.properties.duration\` at job creation time.
|
|
5003
|
-
*/
|
|
5004
|
-
maxDuration?: number;
|
|
5005
|
-
|
|
5006
|
-
/**
|
|
5007
|
-
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
5008
|
-
* \`string_array\`.
|
|
5009
|
-
*/
|
|
5010
|
-
maxLength?: number;
|
|
5011
|
-
|
|
5012
|
-
/**
|
|
5013
|
-
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
5014
|
-
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
5015
|
-
* creation time.
|
|
5016
|
-
*/
|
|
5017
|
-
maxSize?: number;
|
|
5018
|
-
|
|
5019
|
-
/**
|
|
5020
|
-
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
5021
|
-
*/
|
|
5022
|
-
min?: number;
|
|
5023
|
-
|
|
5024
|
-
/**
|
|
5025
|
-
* The minimum allowed length for string inputs. Also applies to each item in
|
|
5026
|
-
* \`string_array\`.
|
|
5027
|
-
*/
|
|
5028
|
-
minLength?: number;
|
|
5029
|
-
|
|
5030
|
-
/**
|
|
5031
|
-
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
5032
|
-
* available for \`model_array\` input type.
|
|
5033
|
-
*/
|
|
5034
|
-
modelTypes?: Array<
|
|
5035
|
-
| 'custom'
|
|
5036
|
-
| 'elevenlabs-voice'
|
|
5037
|
-
| 'flux.1'
|
|
5038
|
-
| 'flux.1-composition'
|
|
5039
|
-
| 'flux.1-kontext-dev'
|
|
5040
|
-
| 'flux.1-kontext-lora'
|
|
5041
|
-
| 'flux.1-krea-dev'
|
|
5042
|
-
| 'flux.1-krea-lora'
|
|
5043
|
-
| 'flux.1-lora'
|
|
5044
|
-
| 'flux.1-pro'
|
|
5045
|
-
| 'flux.1.1-pro-ultra'
|
|
5046
|
-
| 'flux.2-dev-edit-lora'
|
|
5047
|
-
| 'flux.2-dev-lora'
|
|
5048
|
-
| 'flux.2-klein-4b-edit-lora'
|
|
5049
|
-
| 'flux.2-klein-4b-lora'
|
|
5050
|
-
| 'flux.2-klein-9b-edit-lora'
|
|
5051
|
-
| 'flux.2-klein-9b-lora'
|
|
5052
|
-
| 'flux.2-klein-base-4b-edit-lora'
|
|
5053
|
-
| 'flux.2-klein-base-4b-lora'
|
|
5054
|
-
| 'flux.2-klein-base-9b-edit-lora'
|
|
5055
|
-
| 'flux.2-klein-base-9b-lora'
|
|
5056
|
-
| 'flux1.1-pro'
|
|
5057
|
-
| 'gpt-image-1'
|
|
5058
|
-
| 'qwen-image-2512-lora'
|
|
5059
|
-
| 'qwen-image-edit-2509-lora'
|
|
5060
|
-
| 'qwen-image-edit-2511-lora'
|
|
5061
|
-
| 'qwen-image-edit-lora'
|
|
5062
|
-
| 'qwen-image-lora'
|
|
5063
|
-
| 'zimage-de-turbo-lora'
|
|
5064
|
-
| 'zimage-lora'
|
|
5065
|
-
| 'zimage-turbo-lora'
|
|
5066
|
-
>;
|
|
5137
|
+
export interface Ref {
|
|
5138
|
+
/**
|
|
5139
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
5140
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
5141
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
5142
|
+
*/
|
|
5143
|
+
conditional?: Array<string>;
|
|
5067
5144
|
|
|
5068
|
-
|
|
5069
|
-
|
|
5070
|
-
|
|
5071
|
-
|
|
5072
|
-
* For \`file_array\`, the parent asset is the first item in the array.
|
|
5073
|
-
*/
|
|
5074
|
-
parent?: boolean;
|
|
5145
|
+
/**
|
|
5146
|
+
* This is the desired node output value if ref is an if/else node.
|
|
5147
|
+
*/
|
|
5148
|
+
equal?: string;
|
|
5075
5149
|
|
|
5076
|
-
|
|
5077
|
-
|
|
5078
|
-
|
|
5079
|
-
|
|
5150
|
+
/**
|
|
5151
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
5152
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
5153
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
5154
|
+
* all outputs of a node, you can use the name 'all'.
|
|
5155
|
+
*/
|
|
5156
|
+
name?: string;
|
|
5080
5157
|
|
|
5081
|
-
|
|
5082
|
-
|
|
5083
|
-
|
|
5084
|
-
|
|
5085
|
-
|
|
5158
|
+
/**
|
|
5159
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
5160
|
+
*/
|
|
5161
|
+
node?: string;
|
|
5162
|
+
}
|
|
5086
5163
|
|
|
5087
|
-
|
|
5088
|
-
|
|
5089
|
-
|
|
5090
|
-
|
|
5091
|
-
|
|
5164
|
+
/**
|
|
5165
|
+
* Set of rules that describes when this input is required:
|
|
5166
|
+
*
|
|
5167
|
+
* - \`always\`: Input is always required
|
|
5168
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5169
|
+
* defined
|
|
5170
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5171
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5172
|
+
* value
|
|
5173
|
+
*
|
|
5174
|
+
* By default, the input is not required.
|
|
5175
|
+
*/
|
|
5176
|
+
export interface Required {
|
|
5177
|
+
/**
|
|
5178
|
+
* Whether the input is always required
|
|
5179
|
+
*/
|
|
5180
|
+
always?: boolean;
|
|
5092
5181
|
|
|
5093
|
-
|
|
5094
|
-
|
|
5095
|
-
|
|
5096
|
-
|
|
5097
|
-
|
|
5098
|
-
|
|
5099
|
-
|
|
5100
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5101
|
-
* value
|
|
5102
|
-
*
|
|
5103
|
-
* By default, the input is not required.
|
|
5104
|
-
*/
|
|
5105
|
-
required?: Input.Required;
|
|
5182
|
+
/**
|
|
5183
|
+
* Makes this input required when another input has a specific value:
|
|
5184
|
+
*
|
|
5185
|
+
* - Key: name of the input to check
|
|
5186
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
5187
|
+
*/
|
|
5188
|
+
conditionalValues?: unknown;
|
|
5106
5189
|
|
|
5107
|
-
|
|
5108
|
-
|
|
5109
|
-
|
|
5110
|
-
|
|
5111
|
-
|
|
5190
|
+
/**
|
|
5191
|
+
* Makes this input required when another input is defined:
|
|
5192
|
+
*
|
|
5193
|
+
* - Key: name of the input that must be defined
|
|
5194
|
+
* - Value: message to display when this input is required
|
|
5195
|
+
*/
|
|
5196
|
+
ifDefined?: unknown;
|
|
5197
|
+
|
|
5198
|
+
/**
|
|
5199
|
+
* Makes this input required when another input is not defined:
|
|
5200
|
+
*
|
|
5201
|
+
* - Key: name of the input that must be undefined
|
|
5202
|
+
* - Value: message to display when this input is required
|
|
5203
|
+
*/
|
|
5204
|
+
ifNotDefined?: unknown;
|
|
5205
|
+
}
|
|
5206
|
+
}
|
|
5112
5207
|
|
|
5113
|
-
export namespace Input {
|
|
5114
5208
|
/**
|
|
5115
|
-
*
|
|
5116
|
-
*
|
|
5117
|
-
* - \`always\`: Input is always required
|
|
5118
|
-
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
5119
|
-
* defined
|
|
5120
|
-
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
5121
|
-
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
5122
|
-
* value
|
|
5123
|
-
*
|
|
5124
|
-
* By default, the input is not required.
|
|
5209
|
+
* The logic of the node. Only available for logic nodes.
|
|
5125
5210
|
*/
|
|
5126
|
-
export interface
|
|
5127
|
-
/**
|
|
5128
|
-
* Whether the input is always required
|
|
5129
|
-
*/
|
|
5130
|
-
always?: boolean;
|
|
5131
|
-
|
|
5211
|
+
export interface Logic {
|
|
5132
5212
|
/**
|
|
5133
|
-
*
|
|
5134
|
-
*
|
|
5135
|
-
* - Key: name of the input to check
|
|
5136
|
-
* - Value: operation and allowed values that trigger the requirement
|
|
5213
|
+
* The cases of the logic. Only available for if/else nodes.
|
|
5137
5214
|
*/
|
|
5138
|
-
|
|
5215
|
+
cases?: Array<Logic.Case>;
|
|
5139
5216
|
|
|
5140
5217
|
/**
|
|
5141
|
-
*
|
|
5142
|
-
*
|
|
5143
|
-
* - Key: name of the input that must be defined
|
|
5144
|
-
* - Value: message to display when this input is required
|
|
5218
|
+
* The default case of the logic. Contains the id/output of the node to execute if
|
|
5219
|
+
* no case is matched. Only available for if/else nodes.
|
|
5145
5220
|
*/
|
|
5146
|
-
|
|
5221
|
+
default?: string;
|
|
5147
5222
|
|
|
5148
5223
|
/**
|
|
5149
|
-
*
|
|
5150
|
-
*
|
|
5151
|
-
* - Key: name of the input that must be undefined
|
|
5152
|
-
* - Value: message to display when this input is required
|
|
5224
|
+
* The transform of the logic. Only available for transform nodes.
|
|
5153
5225
|
*/
|
|
5154
|
-
|
|
5226
|
+
transform?: string;
|
|
5155
5227
|
}
|
|
5156
|
-
}
|
|
5157
|
-
|
|
5158
|
-
/**
|
|
5159
|
-
* A representation of an asset after being processed by the workflow
|
|
5160
|
-
*/
|
|
5161
|
-
export interface After {
|
|
5162
|
-
/**
|
|
5163
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
5164
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
5165
|
-
*/
|
|
5166
|
-
assetId: string;
|
|
5167
|
-
|
|
5168
|
-
/**
|
|
5169
|
-
* The url of the image used as a thumbnail for your model
|
|
5170
|
-
*/
|
|
5171
|
-
url: string;
|
|
5172
|
-
}
|
|
5173
5228
|
|
|
5174
|
-
|
|
5175
|
-
|
|
5176
|
-
|
|
5177
|
-
export interface Before {
|
|
5178
|
-
/**
|
|
5179
|
-
* The AssetId of the image used as a thumbnail for your model (example:
|
|
5180
|
-
* "asset_GTrL3mq4SXWyMxkOHRxlpw")
|
|
5181
|
-
*/
|
|
5182
|
-
assetId: string;
|
|
5229
|
+
export namespace Logic {
|
|
5230
|
+
export interface Case {
|
|
5231
|
+
condition: string;
|
|
5183
5232
|
|
|
5184
|
-
|
|
5185
|
-
|
|
5186
|
-
|
|
5187
|
-
url: string;
|
|
5233
|
+
value: string;
|
|
5234
|
+
}
|
|
5235
|
+
}
|
|
5188
5236
|
}
|
|
5189
5237
|
|
|
5190
5238
|
/**
|
|
5191
|
-
*
|
|
5239
|
+
* Optional thumbnail asset for listing/display. Currently the thumbnail is
|
|
5240
|
+
* identical to the after asset.
|
|
5192
5241
|
*/
|
|
5193
5242
|
export interface Thumbnail {
|
|
5243
|
+
__brand: 'AssetId';
|
|
5244
|
+
|
|
5194
5245
|
assetId: string;
|
|
5195
5246
|
|
|
5196
5247
|
url: string;
|
|
5197
5248
|
}
|
|
5198
5249
|
|
|
5199
5250
|
/**
|
|
5200
|
-
*
|
|
5251
|
+
* UI configuration for custom workflows input display configuration. The UI
|
|
5252
|
+
* configuration for the workflow. This is managed by scenario webapp.
|
|
5201
5253
|
*/
|
|
5202
5254
|
export interface UiConfig {
|
|
5203
5255
|
/**
|
|
@@ -6290,6 +6342,27 @@ export namespace WorkflowRunResponse {
|
|
|
6290
6342
|
|
|
6291
6343
|
cuDiscount: number;
|
|
6292
6344
|
|
|
6345
|
+
/**
|
|
6346
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
6347
|
+
* top of the generation itself, such as `slop-detection`.
|
|
6348
|
+
*
|
|
6349
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
6350
|
+
* values here.
|
|
6351
|
+
*
|
|
6352
|
+
* Two caveats when displaying it:
|
|
6353
|
+
*
|
|
6354
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
6355
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
6356
|
+
* still shows the main action's original charge.
|
|
6357
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
6358
|
+
* charged outside the job and reported once, as
|
|
6359
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
6360
|
+
* it.
|
|
6361
|
+
*
|
|
6362
|
+
* Absent when the job paid for no add-on.
|
|
6363
|
+
*/
|
|
6364
|
+
cuCostDetails?: Billing.CuCostDetails;
|
|
6365
|
+
|
|
6293
6366
|
/**
|
|
6294
6367
|
* When true, the credits charged for this job are not automatically refunded if
|
|
6295
6368
|
* the generation fails, because the model used does not support refund-on-failure.
|
|
@@ -6297,6 +6370,33 @@ export namespace WorkflowRunResponse {
|
|
|
6297
6370
|
*/
|
|
6298
6371
|
disableRefund?: boolean;
|
|
6299
6372
|
}
|
|
6373
|
+
|
|
6374
|
+
export namespace Billing {
|
|
6375
|
+
/**
|
|
6376
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
6377
|
+
* top of the generation itself, such as `slop-detection`.
|
|
6378
|
+
*
|
|
6379
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
6380
|
+
* values here.
|
|
6381
|
+
*
|
|
6382
|
+
* Two caveats when displaying it:
|
|
6383
|
+
*
|
|
6384
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
6385
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
6386
|
+
* still shows the main action's original charge.
|
|
6387
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
6388
|
+
* charged outside the job and reported once, as
|
|
6389
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
6390
|
+
* it.
|
|
6391
|
+
*
|
|
6392
|
+
* Absent when the job paid for no add-on.
|
|
6393
|
+
*/
|
|
6394
|
+
export interface CuCostDetails {
|
|
6395
|
+
'ip-detection'?: number;
|
|
6396
|
+
|
|
6397
|
+
'slop-detection'?: number;
|
|
6398
|
+
}
|
|
6399
|
+
}
|
|
6300
6400
|
}
|
|
6301
6401
|
|
|
6302
6402
|
export interface Workflow {
|
|
@@ -6330,6 +6430,12 @@ export namespace WorkflowRunResponse {
|
|
|
6330
6430
|
*/
|
|
6331
6431
|
flow: Array<Workflow.Flow>;
|
|
6332
6432
|
|
|
6433
|
+
/**
|
|
6434
|
+
* Whether the workflow has a non-empty flow. Present even when `flow` itself is
|
|
6435
|
+
* not, so an empty workflow can be told apart from a populated one.
|
|
6436
|
+
*/
|
|
6437
|
+
hasFlow: boolean;
|
|
6438
|
+
|
|
6333
6439
|
/**
|
|
6334
6440
|
* The inputs of the workflow.
|
|
6335
6441
|
*/
|
|
@@ -8554,6 +8660,27 @@ export namespace WorkflowUserApprovalResponse {
|
|
|
8554
8660
|
|
|
8555
8661
|
cuDiscount: number;
|
|
8556
8662
|
|
|
8663
|
+
/**
|
|
8664
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
8665
|
+
* top of the generation itself, such as `slop-detection`.
|
|
8666
|
+
*
|
|
8667
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
8668
|
+
* values here.
|
|
8669
|
+
*
|
|
8670
|
+
* Two caveats when displaying it:
|
|
8671
|
+
*
|
|
8672
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
8673
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
8674
|
+
* still shows the main action's original charge.
|
|
8675
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
8676
|
+
* charged outside the job and reported once, as
|
|
8677
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
8678
|
+
* it.
|
|
8679
|
+
*
|
|
8680
|
+
* Absent when the job paid for no add-on.
|
|
8681
|
+
*/
|
|
8682
|
+
cuCostDetails?: Billing.CuCostDetails;
|
|
8683
|
+
|
|
8557
8684
|
/**
|
|
8558
8685
|
* When true, the credits charged for this job are not automatically refunded if
|
|
8559
8686
|
* the generation fails, because the model used does not support refund-on-failure.
|
|
@@ -8561,92 +8688,143 @@ export namespace WorkflowUserApprovalResponse {
|
|
|
8561
8688
|
*/
|
|
8562
8689
|
disableRefund?: boolean;
|
|
8563
8690
|
}
|
|
8691
|
+
|
|
8692
|
+
export namespace Billing {
|
|
8693
|
+
/**
|
|
8694
|
+
* Compute Units charged for the ADD-ONS of this job, per action — the fees paid on
|
|
8695
|
+
* top of the generation itself, such as `slop-detection`.
|
|
8696
|
+
*
|
|
8697
|
+
* `cuCost` above is the main action alone, so the job's total is `cuCost` plus the
|
|
8698
|
+
* values here.
|
|
8699
|
+
*
|
|
8700
|
+
* Two caveats when displaying it:
|
|
8701
|
+
*
|
|
8702
|
+
* - These are a remaining refundable balance, not a receipt: a job that failed or
|
|
8703
|
+
* was cancelled has had its add-ons refunded, so they read 0 while `cuCost`
|
|
8704
|
+
* still shows the main action's original charge.
|
|
8705
|
+
* - `ip-detection` is part of the shape but is never populated today: that fee is
|
|
8706
|
+
* charged outside the job and reported once, as
|
|
8707
|
+
* `ipDetection.creativeUnitsCharged`, in the response of the request that ran
|
|
8708
|
+
* it.
|
|
8709
|
+
*
|
|
8710
|
+
* Absent when the job paid for no add-on.
|
|
8711
|
+
*/
|
|
8712
|
+
export interface CuCostDetails {
|
|
8713
|
+
'ip-detection'?: number;
|
|
8714
|
+
|
|
8715
|
+
'slop-detection'?: number;
|
|
8716
|
+
}
|
|
8717
|
+
}
|
|
8564
8718
|
}
|
|
8565
8719
|
}
|
|
8566
8720
|
|
|
8567
8721
|
export interface WorkflowCreateParams {
|
|
8722
|
+
/**
|
|
8723
|
+
* Body param
|
|
8724
|
+
*/
|
|
8568
8725
|
description: string;
|
|
8569
8726
|
|
|
8727
|
+
/**
|
|
8728
|
+
* Body param
|
|
8729
|
+
*/
|
|
8570
8730
|
name: string;
|
|
8731
|
+
|
|
8732
|
+
/**
|
|
8733
|
+
* Query param: The projectId used for ownership resource management. Either to
|
|
8734
|
+
* assert ownership or to set the owner of the resource(s)
|
|
8735
|
+
*/
|
|
8736
|
+
projectId?: string;
|
|
8737
|
+
}
|
|
8738
|
+
|
|
8739
|
+
export interface WorkflowRetrieveParams {
|
|
8740
|
+
projectId?: unknown;
|
|
8571
8741
|
}
|
|
8572
8742
|
|
|
8573
8743
|
export interface WorkflowUpdateParams {
|
|
8574
8744
|
/**
|
|
8575
|
-
*
|
|
8745
|
+
* Query param
|
|
8746
|
+
*/
|
|
8747
|
+
projectId?: unknown;
|
|
8748
|
+
|
|
8749
|
+
/**
|
|
8750
|
+
* Body param: The after asset of the workflow. Set to null to unset the after
|
|
8751
|
+
* asset.
|
|
8576
8752
|
*/
|
|
8577
8753
|
after?: string;
|
|
8578
8754
|
|
|
8579
8755
|
/**
|
|
8580
|
-
* The before asset of the workflow. Set to null to unset the before
|
|
8756
|
+
* Body param: The before asset of the workflow. Set to null to unset the before
|
|
8757
|
+
* asset.
|
|
8581
8758
|
*/
|
|
8582
8759
|
before?: string;
|
|
8583
8760
|
|
|
8584
8761
|
/**
|
|
8585
|
-
* Set to true to bypass the lock and save a locked workflow without
|
|
8586
|
-
* first. Only the author or a project admin can use this.
|
|
8762
|
+
* Body param: Set to true to bypass the lock and save a locked workflow without
|
|
8763
|
+
* unlocking it first. Only the author or a project admin can use this.
|
|
8587
8764
|
*/
|
|
8588
8765
|
bypassLock?: boolean;
|
|
8589
8766
|
|
|
8590
8767
|
/**
|
|
8591
|
-
* The description of the workflow.
|
|
8768
|
+
* Body param: The description of the workflow.
|
|
8592
8769
|
*/
|
|
8593
8770
|
description?: string;
|
|
8594
8771
|
|
|
8595
8772
|
/**
|
|
8596
|
-
* The UI data about the workflow. This is managed by scenario webapp.
|
|
8773
|
+
* Body param: The UI data about the workflow. This is managed by scenario webapp.
|
|
8597
8774
|
*/
|
|
8598
8775
|
editorInfo?: { [key: string]: unknown };
|
|
8599
8776
|
|
|
8600
8777
|
/**
|
|
8601
|
-
* The flow of the workflow.
|
|
8778
|
+
* Body param: The flow of the workflow.
|
|
8602
8779
|
*/
|
|
8603
8780
|
flow?: Array<WorkflowUpdateParams.Flow>;
|
|
8604
8781
|
|
|
8605
8782
|
/**
|
|
8606
|
-
* The inputs of the workflow.
|
|
8783
|
+
* Body param: The inputs of the workflow.
|
|
8607
8784
|
*/
|
|
8608
8785
|
inputs?: Array<WorkflowUpdateParams.Input>;
|
|
8609
8786
|
|
|
8610
8787
|
/**
|
|
8611
|
-
* Set to true to lock the workflow, false to unlock. Only the author
|
|
8612
|
-
* admin can change this.
|
|
8788
|
+
* Body param: Set to true to lock the workflow, false to unlock. Only the author
|
|
8789
|
+
* or a project admin can change this.
|
|
8613
8790
|
*/
|
|
8614
8791
|
isLocked?: boolean;
|
|
8615
8792
|
|
|
8616
8793
|
/**
|
|
8617
|
-
* The name of the workflow.
|
|
8794
|
+
* Body param: The name of the workflow.
|
|
8618
8795
|
*/
|
|
8619
8796
|
name?: string;
|
|
8620
8797
|
|
|
8621
8798
|
/**
|
|
8622
|
-
* The output asset kinds of the workflow.
|
|
8799
|
+
* Body param: The output asset kinds of the workflow.
|
|
8623
8800
|
*/
|
|
8624
8801
|
outputAssetKinds?: Array<'3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'text' | 'video'>;
|
|
8625
8802
|
|
|
8626
8803
|
/**
|
|
8627
|
-
* The privacy of the workflow.
|
|
8804
|
+
* Body param: The privacy of the workflow.
|
|
8628
8805
|
*/
|
|
8629
8806
|
privacy?: 'private' | 'public' | 'unlisted';
|
|
8630
8807
|
|
|
8631
8808
|
/**
|
|
8632
|
-
* A short description of the workflow.
|
|
8809
|
+
* Body param: A short description of the workflow.
|
|
8633
8810
|
*
|
|
8634
8811
|
* Used for display in the App UI.
|
|
8635
8812
|
*/
|
|
8636
8813
|
shortDescription?: string;
|
|
8637
8814
|
|
|
8638
8815
|
/**
|
|
8639
|
-
* The status of the workflow.
|
|
8816
|
+
* Body param: The status of the workflow.
|
|
8640
8817
|
*/
|
|
8641
8818
|
status?: 'draft' | 'ready';
|
|
8642
8819
|
|
|
8643
8820
|
/**
|
|
8644
|
-
* The tag set of the workflow.
|
|
8821
|
+
* Body param: The tag set of the workflow.
|
|
8645
8822
|
*/
|
|
8646
8823
|
tagSet?: Array<string>;
|
|
8647
8824
|
|
|
8648
8825
|
/**
|
|
8649
|
-
* The thumbnail asset of the workflow. Set to null to unset the
|
|
8826
|
+
* Body param: The thumbnail asset of the workflow. Set to null to unset the
|
|
8827
|
+
* thumbnail.
|
|
8650
8828
|
*/
|
|
8651
8829
|
thumbnail?: string;
|
|
8652
8830
|
}
|
|
@@ -9651,6 +9829,15 @@ export namespace WorkflowUpdateParams {
|
|
|
9651
9829
|
}
|
|
9652
9830
|
|
|
9653
9831
|
export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
9832
|
+
/**
|
|
9833
|
+
* Whether to return the complete workflow (default `true`). Set it to `false` to
|
|
9834
|
+
* omit `flow` and `editorInfo`, the two heaviest fields, and keep a large page
|
|
9835
|
+
* under the response size limit; `hasFlow` then tells you which workflows have a
|
|
9836
|
+
* flow to fetch from `GET /v1/workflows/{workflowId}`. Ignored for public
|
|
9837
|
+
* listings, which never return either field.
|
|
9838
|
+
*/
|
|
9839
|
+
full?: boolean;
|
|
9840
|
+
|
|
9654
9841
|
/**
|
|
9655
9842
|
* The number of items to return in the response. The default value is 50, maximum
|
|
9656
9843
|
* value is 100, minimum value is 1
|
|
@@ -9663,6 +9850,12 @@ export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
|
9663
9850
|
*/
|
|
9664
9851
|
privacy?: 'public' | 'private' | 'unlisted';
|
|
9665
9852
|
|
|
9853
|
+
/**
|
|
9854
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
9855
|
+
* or to set the owner of the resource(s)
|
|
9856
|
+
*/
|
|
9857
|
+
projectId?: string;
|
|
9858
|
+
|
|
9666
9859
|
/**
|
|
9667
9860
|
* Sort direction applied to `updatedAt`: `asc` or `desc` (default `desc`). Public
|
|
9668
9861
|
* listings are always ordered by `updatedAt`. Private listings honor it only when
|
|
@@ -9680,7 +9873,17 @@ export interface WorkflowListParams extends WorkflowsCursorParams {
|
|
|
9680
9873
|
tags?: unknown;
|
|
9681
9874
|
}
|
|
9682
9875
|
|
|
9876
|
+
export interface WorkflowDeleteParams {
|
|
9877
|
+
projectId?: unknown;
|
|
9878
|
+
}
|
|
9879
|
+
|
|
9683
9880
|
export interface WorkflowGetTagsParams {
|
|
9881
|
+
/**
|
|
9882
|
+
* The projectId used for ownership resource management. Either to assert ownership
|
|
9883
|
+
* or to set the owner of the resource(s)
|
|
9884
|
+
*/
|
|
9885
|
+
projectId?: string;
|
|
9886
|
+
|
|
9684
9887
|
status?: unknown;
|
|
9685
9888
|
}
|
|
9686
9889
|
|
|
@@ -9695,44 +9898,59 @@ export interface WorkflowRunParams {
|
|
|
9695
9898
|
* Query param
|
|
9696
9899
|
*/
|
|
9697
9900
|
dryRun?: unknown;
|
|
9901
|
+
|
|
9902
|
+
/**
|
|
9903
|
+
* Query param
|
|
9904
|
+
*/
|
|
9905
|
+
projectId?: unknown;
|
|
9698
9906
|
}
|
|
9699
9907
|
|
|
9700
9908
|
export interface WorkflowUserApprovalParams {
|
|
9701
9909
|
/**
|
|
9702
|
-
*
|
|
9910
|
+
* Query param
|
|
9911
|
+
*/
|
|
9912
|
+
projectId: unknown;
|
|
9913
|
+
|
|
9914
|
+
/**
|
|
9915
|
+
* Body param: The ID of the user approval node to act on in the workflow
|
|
9703
9916
|
*/
|
|
9704
9917
|
nodeId: string;
|
|
9705
9918
|
|
|
9706
9919
|
/**
|
|
9707
|
-
* The ID of the workflow job that contains the user approval node
|
|
9920
|
+
* Body param: The ID of the workflow job that contains the user approval node
|
|
9708
9921
|
*/
|
|
9709
9922
|
workflowJobId: string;
|
|
9710
9923
|
|
|
9711
9924
|
/**
|
|
9712
|
-
* Decision taken on the approval node. "approve" marks it Success and
|
|
9713
|
-
* workflow; "reject" marks it Rejected and either cancels the
|
|
9714
|
-
* node is inside a ForEach iteration — cascades to the loop.
|
|
9715
|
-
* for backward compatibility.
|
|
9925
|
+
* Body param: Decision taken on the approval node. "approve" marks it Success and
|
|
9926
|
+
* advances the workflow; "reject" marks it Rejected and either cancels the
|
|
9927
|
+
* workflow or — if the node is inside a ForEach iteration — cascades to the loop.
|
|
9928
|
+
* Defaults to "approve" for backward compatibility.
|
|
9716
9929
|
*/
|
|
9717
9930
|
action?: 'approve' | 'reject';
|
|
9718
9931
|
}
|
|
9719
9932
|
|
|
9720
9933
|
export interface WorkflowApproveUserParams {
|
|
9721
9934
|
/**
|
|
9722
|
-
*
|
|
9935
|
+
* Query param
|
|
9936
|
+
*/
|
|
9937
|
+
projectId: unknown;
|
|
9938
|
+
|
|
9939
|
+
/**
|
|
9940
|
+
* Body param: The ID of the user approval node to act on in the workflow
|
|
9723
9941
|
*/
|
|
9724
9942
|
nodeId: string;
|
|
9725
9943
|
|
|
9726
9944
|
/**
|
|
9727
|
-
* The ID of the workflow job that contains the user approval node
|
|
9945
|
+
* Body param: The ID of the workflow job that contains the user approval node
|
|
9728
9946
|
*/
|
|
9729
9947
|
workflowJobId: string;
|
|
9730
9948
|
|
|
9731
9949
|
/**
|
|
9732
|
-
* Decision taken on the approval node. "approve" marks it Success and
|
|
9733
|
-
* workflow; "reject" marks it Rejected and either cancels the
|
|
9734
|
-
* node is inside a ForEach iteration — cascades to the loop.
|
|
9735
|
-
* for backward compatibility.
|
|
9950
|
+
* Body param: Decision taken on the approval node. "approve" marks it Success and
|
|
9951
|
+
* advances the workflow; "reject" marks it Rejected and either cancels the
|
|
9952
|
+
* workflow or — if the node is inside a ForEach iteration — cascades to the loop.
|
|
9953
|
+
* Defaults to "approve" for backward compatibility.
|
|
9736
9954
|
*/
|
|
9737
9955
|
action?: 'approve' | 'reject';
|
|
9738
9956
|
}
|
|
@@ -9749,8 +9967,10 @@ export declare namespace Workflows {
|
|
|
9749
9967
|
type WorkflowUserApprovalResponse as WorkflowUserApprovalResponse,
|
|
9750
9968
|
type WorkflowListResponsesWorkflowsCursor as WorkflowListResponsesWorkflowsCursor,
|
|
9751
9969
|
type WorkflowCreateParams as WorkflowCreateParams,
|
|
9970
|
+
type WorkflowRetrieveParams as WorkflowRetrieveParams,
|
|
9752
9971
|
type WorkflowUpdateParams as WorkflowUpdateParams,
|
|
9753
9972
|
type WorkflowListParams as WorkflowListParams,
|
|
9973
|
+
type WorkflowDeleteParams as WorkflowDeleteParams,
|
|
9754
9974
|
type WorkflowGetTagsParams as WorkflowGetTagsParams,
|
|
9755
9975
|
type WorkflowRunParams as WorkflowRunParams,
|
|
9756
9976
|
type WorkflowUserApprovalParams as WorkflowUserApprovalParams,
|