@scenario-labs/sdk 0.1.3 → 0.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +49 -0
- package/LICENSE +1 -1
- package/README.md +29 -27
- package/client.d.mts +33 -16
- package/client.d.mts.map +1 -1
- package/client.d.ts +33 -16
- package/client.d.ts.map +1 -1
- package/client.js +88 -50
- package/client.js.map +1 -1
- package/client.mjs +86 -48
- package/client.mjs.map +1 -1
- package/core/api-promise.d.mts +2 -2
- package/core/api-promise.d.mts.map +1 -1
- package/core/api-promise.d.ts +2 -2
- package/core/api-promise.d.ts.map +1 -1
- package/core/api-promise.js.map +1 -1
- package/core/api-promise.mjs.map +1 -1
- package/core/error.d.mts +2 -2
- package/core/error.d.mts.map +1 -1
- package/core/error.d.ts +2 -2
- package/core/error.d.ts.map +1 -1
- package/core/error.js +4 -4
- package/core/error.js.map +1 -1
- package/core/error.mjs +2 -2
- package/core/error.mjs.map +1 -1
- package/core/resource.d.mts +3 -3
- package/core/resource.d.mts.map +1 -1
- package/core/resource.d.ts +3 -3
- package/core/resource.d.ts.map +1 -1
- package/core/resource.js.map +1 -1
- package/core/resource.mjs.map +1 -1
- package/index.d.mts +9 -3
- package/index.d.mts.map +1 -1
- package/index.d.ts +9 -3
- package/index.d.ts.map +1 -1
- package/index.js +18 -6
- package/index.js.map +1 -1
- package/index.mjs +8 -3
- package/index.mjs.map +1 -1
- package/internal/parse.d.mts +2 -2
- package/internal/parse.d.mts.map +1 -1
- package/internal/parse.d.ts +2 -2
- package/internal/parse.d.ts.map +1 -1
- package/internal/parse.js.map +1 -1
- package/internal/parse.mjs.map +1 -1
- package/internal/request-options.d.mts +4 -0
- package/internal/request-options.d.mts.map +1 -1
- package/internal/request-options.d.ts +4 -0
- package/internal/request-options.d.ts.map +1 -1
- package/internal/request-options.js.map +1 -1
- package/internal/request-options.mjs.map +1 -1
- package/internal/shims.js +1 -1
- package/internal/shims.js.map +1 -1
- package/internal/shims.mjs +1 -1
- package/internal/shims.mjs.map +1 -1
- package/internal/uploads.d.mts +4 -4
- package/internal/uploads.d.mts.map +1 -1
- package/internal/uploads.d.ts +4 -4
- package/internal/uploads.d.ts.map +1 -1
- package/internal/uploads.js.map +1 -1
- package/internal/uploads.mjs.map +1 -1
- package/internal/utils/base64.js +2 -2
- package/internal/utils/base64.js.map +1 -1
- package/internal/utils/base64.mjs +3 -3
- package/internal/utils/base64.mjs.map +1 -1
- package/internal/utils/log.d.mts +3 -3
- package/internal/utils/log.d.mts.map +1 -1
- package/internal/utils/log.d.ts +3 -3
- package/internal/utils/log.d.ts.map +1 -1
- package/internal/utils/log.js.map +1 -1
- package/internal/utils/log.mjs.map +1 -1
- package/internal/utils/path.js +1 -1
- package/internal/utils/path.js.map +1 -1
- package/internal/utils/path.mjs +2 -2
- package/internal/utils/path.mjs.map +1 -1
- package/internal/utils/values.js +5 -5
- package/internal/utils/values.js.map +1 -1
- package/internal/utils/values.mjs +6 -6
- package/internal/utils/values.mjs.map +1 -1
- package/lib/generate.d.mts +19 -0
- package/lib/generate.d.mts.map +1 -0
- package/lib/generate.d.ts +19 -0
- package/lib/generate.d.ts.map +1 -0
- package/lib/generate.js +35 -0
- package/lib/generate.js.map +1 -0
- package/lib/generate.mjs +31 -0
- package/lib/generate.mjs.map +1 -0
- package/lib/job.d.mts +48 -0
- package/lib/job.d.mts.map +1 -0
- package/lib/job.d.ts +48 -0
- package/lib/job.d.ts.map +1 -0
- package/lib/job.js +50 -0
- package/lib/job.js.map +1 -0
- package/lib/job.mjs +45 -0
- package/lib/job.mjs.map +1 -0
- package/lib/models.d.mts +20 -0
- package/lib/models.d.mts.map +1 -0
- package/lib/models.d.ts +20 -0
- package/lib/models.d.ts.map +1 -0
- package/lib/models.js +28 -0
- package/lib/models.js.map +1 -0
- package/lib/models.mjs +23 -0
- package/lib/models.mjs.map +1 -0
- package/lib/scenario.d.mts +39 -0
- package/lib/scenario.d.mts.map +1 -0
- package/lib/scenario.d.ts +39 -0
- package/lib/scenario.d.ts.map +1 -0
- package/lib/scenario.js +46 -0
- package/lib/scenario.js.map +1 -0
- package/lib/scenario.mjs +42 -0
- package/lib/scenario.mjs.map +1 -0
- package/lib/workflow.d.mts +53 -0
- package/lib/workflow.d.mts.map +1 -0
- package/lib/workflow.d.ts +53 -0
- package/lib/workflow.d.ts.map +1 -0
- package/lib/workflow.js +67 -0
- package/lib/workflow.js.map +1 -0
- package/lib/workflow.mjs +62 -0
- package/lib/workflow.mjs.map +1 -0
- package/lib/workflow_validator.d.mts +22 -0
- package/lib/workflow_validator.d.mts.map +1 -0
- package/lib/workflow_validator.d.ts +22 -0
- package/lib/workflow_validator.d.ts.map +1 -0
- package/lib/workflow_validator.js +124 -0
- package/lib/workflow_validator.js.map +1 -0
- package/lib/workflow_validator.mjs +121 -0
- package/lib/workflow_validator.mjs.map +1 -0
- package/package.json +13 -3
- package/resources/assets/assets.d.mts +399 -88
- package/resources/assets/assets.d.mts.map +1 -1
- package/resources/assets/assets.d.ts +399 -88
- package/resources/assets/assets.d.ts.map +1 -1
- package/resources/assets/assets.js.map +1 -1
- package/resources/assets/assets.mjs.map +1 -1
- package/resources/assets/public.d.mts +30 -27
- package/resources/assets/public.d.mts.map +1 -1
- package/resources/assets/public.d.ts +30 -27
- package/resources/assets/public.d.ts.map +1 -1
- package/resources/assets/public.js +2 -2
- package/resources/assets/public.js.map +1 -1
- package/resources/assets/public.mjs +2 -2
- package/resources/assets/public.mjs.map +1 -1
- package/resources/collections/collections.d.mts +1 -1
- package/resources/collections/collections.d.ts +1 -1
- package/resources/generate.d.mts +4188 -1370
- package/resources/generate.d.mts.map +1 -1
- package/resources/generate.d.ts +4188 -1370
- package/resources/generate.d.ts.map +1 -1
- package/resources/index.d.mts +1 -1
- package/resources/index.d.mts.map +1 -1
- package/resources/index.d.ts +1 -1
- package/resources/index.d.ts.map +1 -1
- package/resources/jobs.d.mts +943 -33
- package/resources/jobs.d.mts.map +1 -1
- package/resources/jobs.d.ts +943 -33
- package/resources/jobs.d.ts.map +1 -1
- package/resources/jobs.js +3 -2
- package/resources/jobs.js.map +1 -1
- package/resources/jobs.mjs +3 -2
- package/resources/jobs.mjs.map +1 -1
- package/resources/models/description.d.mts +8 -8
- package/resources/models/description.d.mts.map +1 -1
- package/resources/models/description.d.ts +8 -8
- package/resources/models/description.d.ts.map +1 -1
- package/resources/models/examples.d.mts +640 -34
- package/resources/models/examples.d.mts.map +1 -1
- package/resources/models/examples.d.ts +640 -34
- package/resources/models/examples.d.ts.map +1 -1
- package/resources/models/models.d.mts +1323 -301
- package/resources/models/models.d.mts.map +1 -1
- package/resources/models/models.d.ts +1323 -301
- package/resources/models/models.d.ts.map +1 -1
- package/resources/models/models.js.map +1 -1
- package/resources/models/models.mjs.map +1 -1
- package/resources/models/train.d.mts +718 -90
- package/resources/models/train.d.mts.map +1 -1
- package/resources/models/train.d.ts +718 -90
- package/resources/models/train.d.ts.map +1 -1
- package/resources/models/train.js +9 -4
- package/resources/models/train.js.map +1 -1
- package/resources/models/train.mjs +9 -4
- package/resources/models/train.mjs.map +1 -1
- package/resources/models/training-images.d.mts +2 -2
- package/resources/models/training-images.d.mts.map +1 -1
- package/resources/models/training-images.d.ts +2 -2
- package/resources/models/training-images.d.ts.map +1 -1
- package/resources/search.d.mts +6 -31
- package/resources/search.d.mts.map +1 -1
- package/resources/search.d.ts +6 -31
- package/resources/search.d.ts.map +1 -1
- package/resources/search.js +6 -2
- package/resources/search.js.map +1 -1
- package/resources/search.mjs +6 -2
- package/resources/search.mjs.map +1 -1
- package/resources/tags.d.mts +1 -1
- package/resources/tags.d.ts +1 -1
- package/resources/usages.d.mts +401 -16
- package/resources/usages.d.mts.map +1 -1
- package/resources/usages.d.ts +401 -16
- package/resources/usages.d.ts.map +1 -1
- package/resources/workflows.d.mts +2738 -101
- package/resources/workflows.d.mts.map +1 -1
- package/resources/workflows.d.ts +2738 -101
- package/resources/workflows.d.ts.map +1 -1
- package/src/client.ts +102 -42
- package/src/core/api-promise.ts +4 -4
- package/src/core/error.ts +2 -2
- package/src/core/resource.ts +3 -3
- package/src/index.ts +9 -3
- package/src/internal/parse.ts +2 -2
- package/src/internal/request-options.ts +2 -0
- package/src/internal/shims.ts +1 -1
- package/src/internal/uploads.ts +5 -5
- package/src/internal/utils/base64.ts +3 -3
- package/src/internal/utils/log.ts +3 -3
- package/src/internal/utils/path.ts +2 -2
- package/src/internal/utils/values.ts +6 -6
- package/src/lib/generate.ts +77 -0
- package/src/lib/job.ts +78 -0
- package/src/lib/models.ts +27 -0
- package/src/lib/scenario.ts +39 -0
- package/src/lib/workflow.ts +99 -0
- package/src/lib/workflow_validator.ts +167 -0
- package/src/resources/assets/assets.ts +788 -177
- package/src/resources/assets/public.ts +151 -29
- package/src/resources/collections/collections.ts +1 -1
- package/src/resources/generate.ts +6254 -2217
- package/src/resources/index.ts +2 -2
- package/src/resources/jobs.ts +1355 -26
- package/src/resources/models/description.ts +50 -8
- package/src/resources/models/examples.ts +906 -56
- package/src/resources/models/models.ts +1867 -330
- package/src/resources/models/train.ts +976 -98
- package/src/resources/models/training-images.ts +2 -2
- package/src/resources/search.ts +13 -39
- package/src/resources/tags.ts +1 -1
- package/src/resources/usages.ts +544 -11
- package/src/resources/workflows.ts +4586 -914
- package/src/version.ts +1 -1
- package/version.d.mts +1 -1
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/version.mjs +1 -1
package/resources/usages.d.mts
CHANGED
|
@@ -11,9 +11,11 @@ export declare class Usages extends APIResource {
|
|
|
11
11
|
}
|
|
12
12
|
export interface UsageListResponse {
|
|
13
13
|
activity?: Array<UsageListResponse.Activity>;
|
|
14
|
+
assetUsages?: Array<UsageListResponse.AssetUsage>;
|
|
14
15
|
consumption?: Array<UsageListResponse.Consumption>;
|
|
15
16
|
entities?: UsageListResponse.Entities;
|
|
16
17
|
modelUsages?: Array<UsageListResponse.ModelUsage>;
|
|
18
|
+
nsfwUsages?: Array<UsageListResponse.NsfwUsage>;
|
|
17
19
|
usages?: Array<UsageListResponse.Usage>;
|
|
18
20
|
}
|
|
19
21
|
export declare namespace UsageListResponse {
|
|
@@ -29,7 +31,7 @@ export declare namespace UsageListResponse {
|
|
|
29
31
|
/**
|
|
30
32
|
* The action name
|
|
31
33
|
*/
|
|
32
|
-
action: 'asset' | 'asset-privacy' | 'background-removal' | 'captioning' | 'collection' | 'collection-assets' | 'collection-models' | 'controlnet' | 'controlnet-img2img' | 'controlnet-inpaint' | 'controlnet-ip-adapter' | 'controlnet-texture' | 'copy-asset' | 'copy-model' | 'creative-unit-cost' | 'creative-unit-discount' | 'custom' | 'delete-asset' | 'delete-collection' | 'delete-collection-assets' | 'delete-collection-models' | 'delete-inference-image' | 'delete-model' | 'delete-model-preset' | 'delete-oscu-auto-refill' | 'delete-project-member' | 'delete-subscription' | 'delete-team-api-key' | 'delete-team-invitations' | 'delete-team-member' | 'delete-training-images' | 'describe-style' | 'detection' | 'download-assets' | 'download-model' | 'embed' | 'generative-fill' | 'image-prompt-editing' | 'images-generation' | 'img2img' | 'img2img-ip-adapter' | 'img2img-texture' | 'inference' | 'inpaint' | 'inpaint-ip-adapter' | 'model' | 'model-preset' | 'models-training' | 'oscu' | 'patch' | 'pixelate' | 'project' | 'project-member' | 'reframe' | 'repaint' | 'restyle' | 'segmentation' | 'skybox-base-360' | 'skybox-upscale-360' | 'start-train' | 'subscription' | 'subscription-seats' | 'tag-asset' | 'tag-model' | 'team-api-key' | 'team-member' | 'texture' | 'train-succeeded' | 'training-images-to-model' | 'transfer-model' | 'txt2img' | 'txt2img-ip-adapter' | 'update-asset' | 'update-collection' | 'update-model' | 'update-model-description' | 'update-model-examples' | 'update-oscu-auto-refill' | 'update-project' | 'update-subscription' | 'update-team' | 'update-team-member' | 'upscale' | 'vectorization';
|
|
34
|
+
action: 'asset' | 'asset-privacy' | 'assistant-message' | 'background-removal' | 'byok-remove-project-provider' | 'byok-remove-provider' | 'byok-set-project-provider' | 'byok-set-provider' | 'captioning' | 'collection' | 'collection-assets' | 'collection-models' | 'controlnet' | 'controlnet-img2img' | 'controlnet-inpaint' | 'controlnet-ip-adapter' | 'controlnet-texture' | 'copy-asset' | 'copy-model' | 'creative-unit-cost' | 'creative-unit-discount' | 'custom' | 'custom-asset-created' | 'delete-asset' | 'delete-collection' | 'delete-collection-assets' | 'delete-collection-models' | 'delete-inference-image' | 'delete-model' | 'delete-model-preset' | 'delete-oscu-auto-refill' | 'delete-project-member' | 'delete-subscription' | 'delete-team-api-key' | 'delete-team-invitations' | 'delete-team-member' | 'delete-training-images' | 'describe-style' | 'detection' | 'disable-project-model' | 'disable-team-model' | 'download-assets' | 'download-model' | 'embed' | 'enable-project-model' | 'enable-team-model' | 'generative-fill' | 'image-prompt-editing' | 'images-generation' | 'img2img' | 'img2img-ip-adapter' | 'img2img-texture' | 'inference' | 'inpaint' | 'inpaint-ip-adapter' | 'model' | 'model-preset' | 'models-training' | 'oscu' | 'patch' | 'pixelate' | 'project' | 'project-member' | 'reframe' | 'repaint' | 'restyle' | 'segmentation' | 'skybox-base-360' | 'skybox-upscale-360' | 'start-train' | 'subscription' | 'subscription-seats' | 'tag-asset' | 'tag-model' | 'team-api-key' | 'team-member' | 'texture' | 'train-succeeded' | 'training-images-to-model' | 'transfer-model' | 'txt2img' | 'txt2img-ip-adapter' | 'update-asset' | 'update-collection' | 'update-model' | 'update-model-description' | 'update-model-examples' | 'update-oscu-auto-refill' | 'update-project' | 'update-subscription' | 'update-team' | 'update-team-member' | 'upscale' | 'vectorization';
|
|
33
35
|
/**
|
|
34
36
|
* The additional data of the action
|
|
35
37
|
*/
|
|
@@ -60,6 +62,11 @@ export declare namespace UsageListResponse {
|
|
|
60
62
|
* The asset for this action
|
|
61
63
|
*/
|
|
62
64
|
assetId?: string;
|
|
65
|
+
/**
|
|
66
|
+
* The BYOK provider information for this action Only set if the action is a BYOK
|
|
67
|
+
* action (byok-set-provider or byok-remove-provider)
|
|
68
|
+
*/
|
|
69
|
+
byokProvider?: Data.ByokProvider;
|
|
63
70
|
/**
|
|
64
71
|
* The collection for this action
|
|
65
72
|
*/
|
|
@@ -77,6 +84,39 @@ export declare namespace UsageListResponse {
|
|
|
77
84
|
*/
|
|
78
85
|
modelId?: string;
|
|
79
86
|
}
|
|
87
|
+
namespace Data {
|
|
88
|
+
/**
|
|
89
|
+
* The BYOK provider information for this action Only set if the action is a BYOK
|
|
90
|
+
* action (byok-set-provider or byok-remove-provider)
|
|
91
|
+
*/
|
|
92
|
+
interface ByokProvider {
|
|
93
|
+
id: string;
|
|
94
|
+
displayName: string;
|
|
95
|
+
}
|
|
96
|
+
}
|
|
97
|
+
}
|
|
98
|
+
interface AssetUsage {
|
|
99
|
+
kind: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
100
|
+
/**
|
|
101
|
+
* The data points
|
|
102
|
+
*/
|
|
103
|
+
points: Array<AssetUsage.Point>;
|
|
104
|
+
}
|
|
105
|
+
namespace AssetUsage {
|
|
106
|
+
interface Point {
|
|
107
|
+
/**
|
|
108
|
+
* Number of assets created
|
|
109
|
+
*/
|
|
110
|
+
count: number;
|
|
111
|
+
/**
|
|
112
|
+
* Number of assets created via an API key
|
|
113
|
+
*/
|
|
114
|
+
countApiKey: number;
|
|
115
|
+
/**
|
|
116
|
+
* The UTC ISO date of the point
|
|
117
|
+
*/
|
|
118
|
+
time: string;
|
|
119
|
+
}
|
|
80
120
|
}
|
|
81
121
|
/**
|
|
82
122
|
* Consumption entries sorted in descending order by consumption value.
|
|
@@ -84,6 +124,14 @@ export declare namespace UsageListResponse {
|
|
|
84
124
|
* There is no limit on the number of entries
|
|
85
125
|
*/
|
|
86
126
|
interface Consumption {
|
|
127
|
+
/**
|
|
128
|
+
* The Creative Units discount for the user
|
|
129
|
+
*/
|
|
130
|
+
discount: number;
|
|
131
|
+
/**
|
|
132
|
+
* The total consumption for the user (value + discount)
|
|
133
|
+
*/
|
|
134
|
+
total: number;
|
|
87
135
|
/**
|
|
88
136
|
* The unique identifier of the user
|
|
89
137
|
*/
|
|
@@ -121,7 +169,7 @@ export declare namespace UsageListResponse {
|
|
|
121
169
|
/**
|
|
122
170
|
* The source of the asset
|
|
123
171
|
*/
|
|
124
|
-
source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video2img' | 'video2video';
|
|
172
|
+
source: '3d23d' | '3d23d:texture' | '3d:texture' | '3d:texture:albedo' | '3d:texture:metallic' | '3d:texture:mtl' | '3d:texture:normal' | '3d:texture:roughness' | 'audio2audio' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-control-net' | 'inference-control-net-img' | 'inference-control-net-inpainting' | 'inference-control-net-inpainting-ip-adapter' | 'inference-control-net-ip-adapter' | 'inference-control-net-reference' | 'inference-control-net-texture' | 'inference-img' | 'inference-img-ip-adapter' | 'inference-img-texture' | 'inference-in-paint' | 'inference-in-paint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt' | 'inference-txt-ip-adapter' | 'inference-txt-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture:albedo' | 'texture:ao' | 'texture:edge' | 'texture:height' | 'texture:metallic' | 'texture:normal' | 'texture:smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2img' | 'video2video' | 'voice-clone';
|
|
125
173
|
}
|
|
126
174
|
namespace Asset {
|
|
127
175
|
/**
|
|
@@ -131,7 +179,7 @@ export declare namespace UsageListResponse {
|
|
|
131
179
|
/**
|
|
132
180
|
* The type of the asset
|
|
133
181
|
*/
|
|
134
|
-
type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video2img' | 'video2video';
|
|
182
|
+
type: '3d-texture' | '3d-texture-albedo' | '3d-texture-metallic' | '3d-texture-mtl' | '3d-texture-normal' | '3d-texture-roughness' | '3d23d' | '3d23d-texture' | 'audio2audio' | 'background-removal' | 'canvas' | 'canvas-drawing' | 'canvas-export' | 'detection' | 'generative-fill' | 'image-prompt-editing' | 'img23d' | 'img2img' | 'img2video' | 'inference-controlnet' | 'inference-controlnet-img2img' | 'inference-controlnet-inpaint' | 'inference-controlnet-inpaint-ip-adapter' | 'inference-controlnet-ip-adapter' | 'inference-controlnet-reference' | 'inference-controlnet-texture' | 'inference-img2img' | 'inference-img2img-ip-adapter' | 'inference-img2img-texture' | 'inference-inpaint' | 'inference-inpaint-ip-adapter' | 'inference-reference' | 'inference-reference-texture' | 'inference-txt2img' | 'inference-txt2img-ip-adapter' | 'inference-txt2img-texture' | 'patch' | 'pixelization' | 'reframe' | 'restyle' | 'segment' | 'segmentation-image' | 'segmentation-mask' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'texture' | 'texture-albedo' | 'texture-ao' | 'texture-edge' | 'texture-height' | 'texture-metallic' | 'texture-normal' | 'texture-smoothness' | 'txt23d' | 'txt2audio' | 'txt2img' | 'txt2video' | 'unknown' | 'uploaded' | 'uploaded-3d' | 'uploaded-audio' | 'uploaded-avatar' | 'uploaded-video' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'upscale-video' | 'vectorization' | 'video23d' | 'video2img' | 'video2video' | 'voice-clone';
|
|
135
183
|
}
|
|
136
184
|
/**
|
|
137
185
|
* The properties of the asset
|
|
@@ -169,7 +217,7 @@ export declare namespace UsageListResponse {
|
|
|
169
217
|
/**
|
|
170
218
|
* Bounding box dimensions [width, height, depth]
|
|
171
219
|
*/
|
|
172
|
-
dimensions?: Array<
|
|
220
|
+
dimensions?: Array<number>;
|
|
173
221
|
/**
|
|
174
222
|
* Duration of the media in seconds
|
|
175
223
|
*/
|
|
@@ -248,7 +296,7 @@ export declare namespace UsageListResponse {
|
|
|
248
296
|
/**
|
|
249
297
|
* The job type
|
|
250
298
|
*/
|
|
251
|
-
jobType: 'assets-download' | 'canvas-export' | 'caption' | 'caption-llava' | 'custom' | 'describe-style' | 'detection' | 'embed' | 'flux' | 'flux-model-training' | 'generate-prompt' | 'image-generation' | 'image-prompt-editing' | 'inference' | 'mesh-preview-rendering' | 'model-download' | 'model-import' | 'model-training' | 'openai-image-generation' | 'patch-image' | 'pixelate' | 'reframe' | 'remove-background' | 'repaint' | 'restyle' | 'segment' | 'skybox-3d' | 'skybox-base-360' | 'skybox-hdri' | 'skybox-upscale-360' | 'texture' | 'translate' | 'upload' | 'upscale' | 'upscale-skybox' | 'upscale-texture' | 'vectorize' | 'workflow';
|
|
299
|
+
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';
|
|
252
300
|
/**
|
|
253
301
|
* The metadata of the job
|
|
254
302
|
*/
|
|
@@ -267,18 +315,36 @@ export declare namespace UsageListResponse {
|
|
|
267
315
|
* List of produced assets for this job
|
|
268
316
|
*/
|
|
269
317
|
assetIds?: Array<string>;
|
|
318
|
+
/**
|
|
319
|
+
* Eventual error for the job
|
|
320
|
+
*/
|
|
321
|
+
error?: string | null;
|
|
270
322
|
/**
|
|
271
323
|
* The flow of the job. Only available for workflow jobs.
|
|
272
324
|
*/
|
|
273
325
|
flow?: Array<Metadata.Flow>;
|
|
326
|
+
/**
|
|
327
|
+
* Actionable hint for the user explaining what went wrong and how to resolve it.
|
|
328
|
+
*/
|
|
329
|
+
hint?: string;
|
|
274
330
|
/**
|
|
275
331
|
* The inputs for the job
|
|
276
332
|
*/
|
|
277
|
-
input?:
|
|
333
|
+
input?: {
|
|
334
|
+
[key: string]: unknown;
|
|
335
|
+
};
|
|
278
336
|
/**
|
|
279
|
-
*
|
|
337
|
+
* May contain the output of the job for specific custom models jobs. Only
|
|
338
|
+
* available for custom models which generate non-assets outputs. Example: LLM text
|
|
339
|
+
* results.
|
|
280
340
|
*/
|
|
281
|
-
output?:
|
|
341
|
+
output?: {
|
|
342
|
+
[key: string]: unknown;
|
|
343
|
+
};
|
|
344
|
+
/**
|
|
345
|
+
* For voice-clone jobs: the ID of the model being trained.
|
|
346
|
+
*/
|
|
347
|
+
outputModelId?: string;
|
|
282
348
|
/**
|
|
283
349
|
* The workflow ID of the job if job is part of a workflow.
|
|
284
350
|
*/
|
|
@@ -301,20 +367,45 @@ export declare namespace UsageListResponse {
|
|
|
301
367
|
/**
|
|
302
368
|
* The type of the job for the node.
|
|
303
369
|
*/
|
|
304
|
-
type: 'custom-model' | 'generate-prompt' | 'logic' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
370
|
+
type: 'custom-model' | 'for-each' | 'generate-prompt' | 'list' | 'logic' | 'model' | 'remove-background' | 'transform' | 'user-approval' | 'workflow';
|
|
305
371
|
/**
|
|
306
372
|
* List of produced assets for this node.
|
|
307
373
|
*/
|
|
308
374
|
assets?: Array<Flow.Asset>;
|
|
375
|
+
/**
|
|
376
|
+
* Fixed number of iterations for a ForEach node. When set, the loop runs exactly
|
|
377
|
+
* `count` times regardless of array input. When not set, the loop iterates over
|
|
378
|
+
* the resolved array input. Only available for ForEach nodes.
|
|
379
|
+
*/
|
|
380
|
+
count?: number;
|
|
309
381
|
/**
|
|
310
382
|
* The nodes that this node depends on. Only available for nodes that have
|
|
311
383
|
* dependencies. Mainly used for user approval nodes.
|
|
312
384
|
*/
|
|
313
385
|
dependsOn?: Array<string>;
|
|
386
|
+
/**
|
|
387
|
+
* If true, the outputs of this node will be included in the workflow job's final
|
|
388
|
+
* output. Only applicable to producing nodes (custom-model, inference, etc.). By
|
|
389
|
+
* default, only last nodes (nodes not referenced by other nodes) contribute to
|
|
390
|
+
* outputs. Set this to true to also include intermediate nodes in the final
|
|
391
|
+
* output. Note: This should only be set to `true` or left undefined.
|
|
392
|
+
*/
|
|
393
|
+
includeOutputsInWorkflowJob?: true;
|
|
314
394
|
/**
|
|
315
395
|
* The inputs of the node.
|
|
316
396
|
*/
|
|
317
397
|
inputs?: Array<Flow.Input>;
|
|
398
|
+
/**
|
|
399
|
+
* Statically-configured items for a List node. The node outputs this array as-is
|
|
400
|
+
* when executed. Only available for List nodes. The values can be strings,
|
|
401
|
+
* numbers, or asset IDs.
|
|
402
|
+
*/
|
|
403
|
+
items?: Array<string>;
|
|
404
|
+
/**
|
|
405
|
+
* Zero-based index of the iteration this node copy belongs to. Set on
|
|
406
|
+
* dynamically-created copies of loop body nodes.
|
|
407
|
+
*/
|
|
408
|
+
iterationIndex?: number;
|
|
318
409
|
/**
|
|
319
410
|
* If the flow is part of a WorkflowJob, this is the jobId for the node. jobId is
|
|
320
411
|
* only available for nodes started. A node "Pending" for a running workflow job is
|
|
@@ -329,10 +420,25 @@ export declare namespace UsageListResponse {
|
|
|
329
420
|
* The type of the logic for the node. Only available for logic nodes.
|
|
330
421
|
*/
|
|
331
422
|
logicType?: 'if-else';
|
|
423
|
+
/**
|
|
424
|
+
* IDs of the body template nodes that belong to this ForEach loop. At runtime
|
|
425
|
+
* these templates are cloned once per iteration and marked Skipped. Only available
|
|
426
|
+
* for ForEach nodes.
|
|
427
|
+
*/
|
|
428
|
+
loopBodyNodeIds?: Array<string>;
|
|
429
|
+
/**
|
|
430
|
+
* ID of the ForEach node that spawned this iteration copy. Set on
|
|
431
|
+
* dynamically-created copies of loop body nodes.
|
|
432
|
+
*/
|
|
433
|
+
loopNodeId?: string;
|
|
332
434
|
/**
|
|
333
435
|
* The model id for the node. Mainly used for custom model tasks.
|
|
334
436
|
*/
|
|
335
437
|
modelId?: string;
|
|
438
|
+
/**
|
|
439
|
+
* The output of the node. Only available for logic nodes.
|
|
440
|
+
*/
|
|
441
|
+
output?: unknown;
|
|
336
442
|
/**
|
|
337
443
|
* The workflow id for the node. Mainly used for workflow tasks.
|
|
338
444
|
*/
|
|
@@ -374,6 +480,10 @@ export declare namespace UsageListResponse {
|
|
|
374
480
|
* Whether this input affects the model's cost calculation
|
|
375
481
|
*/
|
|
376
482
|
costImpact?: boolean;
|
|
483
|
+
/**
|
|
484
|
+
* The default value for the input
|
|
485
|
+
*/
|
|
486
|
+
default?: unknown;
|
|
377
487
|
/**
|
|
378
488
|
* Help text displayed in the UI to provide additional information about the input
|
|
379
489
|
*/
|
|
@@ -392,10 +502,20 @@ export declare namespace UsageListResponse {
|
|
|
392
502
|
* the same as the current object. This is only available for type inputs_array
|
|
393
503
|
* inputs.
|
|
394
504
|
*/
|
|
395
|
-
inputs?: Array<
|
|
505
|
+
inputs?: Array<{
|
|
506
|
+
[key: string]: unknown;
|
|
507
|
+
}>;
|
|
508
|
+
/**
|
|
509
|
+
* The configured items for inputs_array type inputs. Each item is an array of
|
|
510
|
+
* SubNodeInput that need ref/value resolution. Only available for inputs_array
|
|
511
|
+
* type.
|
|
512
|
+
*/
|
|
513
|
+
items?: Array<Array<Input.Item>>;
|
|
396
514
|
/**
|
|
397
515
|
* The asset kind of the input. Only taken into account for \`file\` and
|
|
398
|
-
* \`file_array\` input types.
|
|
516
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
517
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
518
|
+
* data:kind, prefix
|
|
399
519
|
*/
|
|
400
520
|
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
401
521
|
/**
|
|
@@ -416,6 +536,12 @@ export declare namespace UsageListResponse {
|
|
|
416
536
|
* \`string_array\`.
|
|
417
537
|
*/
|
|
418
538
|
maxLength?: number;
|
|
539
|
+
/**
|
|
540
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
541
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
542
|
+
* creation time.
|
|
543
|
+
*/
|
|
544
|
+
maxSize?: number;
|
|
419
545
|
/**
|
|
420
546
|
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
421
547
|
*/
|
|
@@ -429,7 +555,7 @@ export declare namespace UsageListResponse {
|
|
|
429
555
|
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
430
556
|
* available for \`model_array\` input type.
|
|
431
557
|
*/
|
|
432
|
-
modelTypes?: Array<'custom' | 'flux.1' | 'flux.1-composition' | 'flux.1-kontext-dev' | 'flux.1-kontext-lora' | 'flux.1-krea-dev' | 'flux.1-krea-lora' | 'flux.1-lora' | 'flux.1-pro' | 'flux.1.1-pro-ultra' | 'flux1.1-pro' | 'gpt-image-1' | 'sd-1_5' | 'sd-1_5-composition' | 'sd-1_5-lora' | 'sd-xl' | 'sd-xl-composition' | 'sd-xl-lora'>;
|
|
558
|
+
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'>;
|
|
433
559
|
/**
|
|
434
560
|
* Whether this input represents a parent asset to assign to the produced assets.
|
|
435
561
|
* Only available for \`file\` and \`file_array\` input types.
|
|
@@ -473,8 +599,232 @@ export declare namespace UsageListResponse {
|
|
|
473
599
|
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
474
600
|
*/
|
|
475
601
|
step?: number;
|
|
602
|
+
/**
|
|
603
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
604
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
605
|
+
*/
|
|
606
|
+
value?: unknown;
|
|
476
607
|
}
|
|
477
608
|
namespace Input {
|
|
609
|
+
/**
|
|
610
|
+
* A sub-input within an inputs_array item. Same as NodeInput but without the
|
|
611
|
+
* recursive items field.
|
|
612
|
+
*/
|
|
613
|
+
interface Item {
|
|
614
|
+
/**
|
|
615
|
+
* The name that must be user to call the model through the API
|
|
616
|
+
*/
|
|
617
|
+
name: string;
|
|
618
|
+
/**
|
|
619
|
+
* The data type of the input
|
|
620
|
+
*/
|
|
621
|
+
type: 'boolean' | 'file' | 'file_array' | 'inputs_array' | 'model' | 'model_array' | 'number' | 'number_array' | 'string' | 'string_array';
|
|
622
|
+
/**
|
|
623
|
+
* The allowed values for the input. For \`string\` or \`number\` types, creates a
|
|
624
|
+
* single-select dropdown. For \`string_array\` type, creates a multi-select
|
|
625
|
+
* dropdown.
|
|
626
|
+
*/
|
|
627
|
+
allowedValues?: Array<unknown>;
|
|
628
|
+
/**
|
|
629
|
+
* Specifies the background behavior for the input. Only available for \`file\` and
|
|
630
|
+
* \`file_array\` input types with kind \`image\`.
|
|
631
|
+
*/
|
|
632
|
+
backgroundBehavior?: 'opaque' | 'transparent';
|
|
633
|
+
/**
|
|
634
|
+
* Whether the input is a color or not. Only available for \`string\` input type.
|
|
635
|
+
*/
|
|
636
|
+
color?: boolean;
|
|
637
|
+
/**
|
|
638
|
+
* Whether this input affects the model's cost calculation
|
|
639
|
+
*/
|
|
640
|
+
costImpact?: boolean;
|
|
641
|
+
/**
|
|
642
|
+
* The default value for the input
|
|
643
|
+
*/
|
|
644
|
+
default?: unknown;
|
|
645
|
+
/**
|
|
646
|
+
* Help text displayed in the UI to provide additional information about the input
|
|
647
|
+
*/
|
|
648
|
+
description?: string;
|
|
649
|
+
/**
|
|
650
|
+
* Used to visually group inputs together in the UI. Inputs with the same group
|
|
651
|
+
* value appear consecutively in the UI.
|
|
652
|
+
*/
|
|
653
|
+
group?: string;
|
|
654
|
+
/**
|
|
655
|
+
* Hint text displayed in the UI as a tooltip to guide the user
|
|
656
|
+
*/
|
|
657
|
+
hint?: string;
|
|
658
|
+
/**
|
|
659
|
+
* The list of inputs which form an object within a container array. All inputs are
|
|
660
|
+
* the same as the current object. This is only available for type inputs_array
|
|
661
|
+
* inputs.
|
|
662
|
+
*/
|
|
663
|
+
inputs?: Array<{
|
|
664
|
+
[key: string]: unknown;
|
|
665
|
+
}>;
|
|
666
|
+
/**
|
|
667
|
+
* The asset kind of the input. Only taken into account for \`file\` and
|
|
668
|
+
* \`file_array\` input types. If model provides multiple kinds, the input will be
|
|
669
|
+
* not able to create the asset on the flight on API side with dataurl without
|
|
670
|
+
* data:kind, prefix
|
|
671
|
+
*/
|
|
672
|
+
kind?: '3d' | 'audio' | 'document' | 'image' | 'image-hdr' | 'json' | 'video';
|
|
673
|
+
/**
|
|
674
|
+
* The label displayed in the UI for this input
|
|
675
|
+
*/
|
|
676
|
+
label?: string;
|
|
677
|
+
/**
|
|
678
|
+
* The name of the file input field to use as the mask source
|
|
679
|
+
*/
|
|
680
|
+
maskFrom?: string;
|
|
681
|
+
/**
|
|
682
|
+
* The maximum allowed value. Only available for \`number\` and \`array\` input
|
|
683
|
+
* types.
|
|
684
|
+
*/
|
|
685
|
+
max?: number;
|
|
686
|
+
/**
|
|
687
|
+
* The maximum allowed length for \`string\` inputs. Also applies to each item in
|
|
688
|
+
* \`string_array\`.
|
|
689
|
+
*/
|
|
690
|
+
maxLength?: number;
|
|
691
|
+
/**
|
|
692
|
+
* The maximum allowed file size in bytes. Only applies to \`file\` and
|
|
693
|
+
* \`file_array\` input types. Validated against \`asset.properties.size\` at job
|
|
694
|
+
* creation time.
|
|
695
|
+
*/
|
|
696
|
+
maxSize?: number;
|
|
697
|
+
/**
|
|
698
|
+
* The minimum allowed value. Only available for \`number\` and array input types.
|
|
699
|
+
*/
|
|
700
|
+
min?: number;
|
|
701
|
+
/**
|
|
702
|
+
* The minimum allowed length for string inputs. Also applies to each item in
|
|
703
|
+
* \`string_array\`.
|
|
704
|
+
*/
|
|
705
|
+
minLength?: number;
|
|
706
|
+
/**
|
|
707
|
+
* The allowed model types for this input. Example: \`["flux.1-lora"]\`. Only
|
|
708
|
+
* available for \`model_array\` input type.
|
|
709
|
+
*/
|
|
710
|
+
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'>;
|
|
711
|
+
/**
|
|
712
|
+
* Whether this input represents a parent asset to assign to the produced assets.
|
|
713
|
+
* Only available for \`file\` and \`file_array\` input types.
|
|
714
|
+
*
|
|
715
|
+
* For \`file_array\`, the parent asset is the first item in the array.
|
|
716
|
+
*/
|
|
717
|
+
parent?: boolean;
|
|
718
|
+
/**
|
|
719
|
+
* Placeholder text for the input. Only available for 'string' input type.
|
|
720
|
+
*/
|
|
721
|
+
placeholder?: string;
|
|
722
|
+
/**
|
|
723
|
+
* Whether the input is a prompt. When true, displays as a text area with prompt
|
|
724
|
+
* spark feature. Only available for \`string\` input type.
|
|
725
|
+
*/
|
|
726
|
+
prompt?: boolean;
|
|
727
|
+
/**
|
|
728
|
+
* Whether the input is used with prompt spark. Only available for \`string\` input
|
|
729
|
+
* type.
|
|
730
|
+
*/
|
|
731
|
+
promptSpark?: boolean;
|
|
732
|
+
/**
|
|
733
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
734
|
+
* least one of node or conditional.
|
|
735
|
+
*/
|
|
736
|
+
ref?: Item.Ref;
|
|
737
|
+
/**
|
|
738
|
+
* Set of rules that describes when this input is required:
|
|
739
|
+
*
|
|
740
|
+
* - \`always\`: Input is always required
|
|
741
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
742
|
+
* defined
|
|
743
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
744
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
745
|
+
* value
|
|
746
|
+
*
|
|
747
|
+
* By default, the input is not required.
|
|
748
|
+
*/
|
|
749
|
+
required?: Item.Required;
|
|
750
|
+
/**
|
|
751
|
+
* The step increment for numeric inputs. Only available for \`number\` input type.
|
|
752
|
+
*/
|
|
753
|
+
step?: number;
|
|
754
|
+
/**
|
|
755
|
+
* The value of the input. This is the value of the input that will be used to run
|
|
756
|
+
* the node. Only available for flows managed by a WorkflowJob.
|
|
757
|
+
*/
|
|
758
|
+
value?: unknown;
|
|
759
|
+
}
|
|
760
|
+
namespace Item {
|
|
761
|
+
/**
|
|
762
|
+
* The reference to another input or output of the same workflow. Must have at
|
|
763
|
+
* least one of node or conditional.
|
|
764
|
+
*/
|
|
765
|
+
interface Ref {
|
|
766
|
+
/**
|
|
767
|
+
* The conditional nodes to reference. If the conditional nodes are successful, the
|
|
768
|
+
* node will be successful. If the conditional nodes are skipped, the node will be
|
|
769
|
+
* skipped. Contains an array of node ids used to check the status of the nodes.
|
|
770
|
+
*/
|
|
771
|
+
conditional?: Array<string>;
|
|
772
|
+
/**
|
|
773
|
+
* This is the desired node output value if ref is an if/else node.
|
|
774
|
+
*/
|
|
775
|
+
equal?: string;
|
|
776
|
+
/**
|
|
777
|
+
* The name of the input or output to reference. If the type is 'workflow', the
|
|
778
|
+
* name is the name of the input of the workflow is required If the type is 'node',
|
|
779
|
+
* the name is not mandatory, except if you want all outputs of the node. To get
|
|
780
|
+
* all outputs of a node, you can use the name 'all'.
|
|
781
|
+
*/
|
|
782
|
+
name?: string;
|
|
783
|
+
/**
|
|
784
|
+
* The node id or 'workflow' if the source is a workflow input.
|
|
785
|
+
*/
|
|
786
|
+
node?: string;
|
|
787
|
+
}
|
|
788
|
+
/**
|
|
789
|
+
* Set of rules that describes when this input is required:
|
|
790
|
+
*
|
|
791
|
+
* - \`always\`: Input is always required
|
|
792
|
+
* - \`ifNotDefined\`: Input is required when another specified input is not
|
|
793
|
+
* defined
|
|
794
|
+
* - \`ifDefined\`: Input is required when another specified input is defined
|
|
795
|
+
* - \`conditionalValues\`: Input is required when another input has a specific
|
|
796
|
+
* value
|
|
797
|
+
*
|
|
798
|
+
* By default, the input is not required.
|
|
799
|
+
*/
|
|
800
|
+
interface Required {
|
|
801
|
+
/**
|
|
802
|
+
* Whether the input is always required
|
|
803
|
+
*/
|
|
804
|
+
always?: boolean;
|
|
805
|
+
/**
|
|
806
|
+
* Makes this input required when another input has a specific value:
|
|
807
|
+
*
|
|
808
|
+
* - Key: name of the input to check
|
|
809
|
+
* - Value: operation and allowed values that trigger the requirement
|
|
810
|
+
*/
|
|
811
|
+
conditionalValues?: unknown;
|
|
812
|
+
/**
|
|
813
|
+
* Makes this input required when another input is defined:
|
|
814
|
+
*
|
|
815
|
+
* - Key: name of the input that must be defined
|
|
816
|
+
* - Value: message to display when this input is required
|
|
817
|
+
*/
|
|
818
|
+
ifDefined?: unknown;
|
|
819
|
+
/**
|
|
820
|
+
* Makes this input required when another input is not defined:
|
|
821
|
+
*
|
|
822
|
+
* - Key: name of the input that must be undefined
|
|
823
|
+
* - Value: message to display when this input is required
|
|
824
|
+
*/
|
|
825
|
+
ifNotDefined?: unknown;
|
|
826
|
+
}
|
|
827
|
+
}
|
|
478
828
|
/**
|
|
479
829
|
* The reference to another input or output of the same workflow. Must have at
|
|
480
830
|
* least one of node or conditional.
|
|
@@ -666,6 +1016,14 @@ export declare namespace UsageListResponse {
|
|
|
666
1016
|
}
|
|
667
1017
|
namespace ModelUsage {
|
|
668
1018
|
interface Point {
|
|
1019
|
+
/**
|
|
1020
|
+
* Cost for model usage for API key only
|
|
1021
|
+
*/
|
|
1022
|
+
apiKeyCost: number;
|
|
1023
|
+
/**
|
|
1024
|
+
* The discount for model usage for API key only
|
|
1025
|
+
*/
|
|
1026
|
+
apiKeyDiscount: number;
|
|
669
1027
|
/**
|
|
670
1028
|
* Cost for model usage
|
|
671
1029
|
*/
|
|
@@ -684,6 +1042,29 @@ export declare namespace UsageListResponse {
|
|
|
684
1042
|
time: string;
|
|
685
1043
|
}
|
|
686
1044
|
}
|
|
1045
|
+
interface NsfwUsage {
|
|
1046
|
+
label: string;
|
|
1047
|
+
/**
|
|
1048
|
+
* The data points
|
|
1049
|
+
*/
|
|
1050
|
+
points: Array<NsfwUsage.Point>;
|
|
1051
|
+
}
|
|
1052
|
+
namespace NsfwUsage {
|
|
1053
|
+
interface Point {
|
|
1054
|
+
/**
|
|
1055
|
+
* Number of NSFW assets created
|
|
1056
|
+
*/
|
|
1057
|
+
count: number;
|
|
1058
|
+
/**
|
|
1059
|
+
* Number of NSFW assets created via an API key
|
|
1060
|
+
*/
|
|
1061
|
+
countApiKey: number;
|
|
1062
|
+
/**
|
|
1063
|
+
* The UTC ISO date of the point
|
|
1064
|
+
*/
|
|
1065
|
+
time: string;
|
|
1066
|
+
}
|
|
1067
|
+
}
|
|
687
1068
|
interface Usage {
|
|
688
1069
|
/**
|
|
689
1070
|
* Granularity for points (example: "1d", "1h", "1m", "15m")
|
|
@@ -697,10 +1078,14 @@ export declare namespace UsageListResponse {
|
|
|
697
1078
|
* Name of the usage points (example: "images-generation", "generators-training",
|
|
698
1079
|
* "background-removal", "upscale", ...)
|
|
699
1080
|
*/
|
|
700
|
-
usageName: 'background-removal' | 'captioning' | 'creative-unit-cost' | 'creative-unit-discount' | 'custom' | 'detection' | 'image-prompt-editing' | 'images-generation' | 'models-training' | 'patch' | 'pixelate' | 'repaint' | 'restyle' | 'segmentation' | 'skybox-base-360' | 'skybox-upscale-360' | 'texture' | 'upscale' | 'vectorization';
|
|
1081
|
+
usageName: 'background-removal' | 'captioning' | 'creative-unit-cost' | 'creative-unit-discount' | 'custom' | 'custom-asset-created' | 'detection' | 'image-prompt-editing' | 'images-generation' | 'models-training' | 'patch' | 'pixelate' | 'repaint' | 'restyle' | 'segmentation' | 'skybox-base-360' | 'skybox-upscale-360' | 'texture' | 'upscale' | 'vectorization';
|
|
701
1082
|
}
|
|
702
1083
|
namespace Usage {
|
|
703
1084
|
interface Point {
|
|
1085
|
+
/**
|
|
1086
|
+
* Value of the point for API key only
|
|
1087
|
+
*/
|
|
1088
|
+
apiKey: string;
|
|
704
1089
|
/**
|
|
705
1090
|
* The UTC ISO date of the point
|
|
706
1091
|
*/
|
|
@@ -717,7 +1102,7 @@ export interface UsageListParams {
|
|
|
717
1102
|
* The offset for the activity data. Default is 0. If bad offset or empty, 0 will
|
|
718
1103
|
* be returned. Must be a positive integer.
|
|
719
1104
|
*/
|
|
720
|
-
activityOffset?:
|
|
1105
|
+
activityOffset?: number;
|
|
721
1106
|
/**
|
|
722
1107
|
* The end date of the usage in ISO 8601 format. If not provided, use default
|
|
723
1108
|
* timeRange. If provided, startDate is required.
|
|
@@ -737,12 +1122,12 @@ export interface UsageListParams {
|
|
|
737
1122
|
* The time range of the usage. If not provided, use default timeRange. If
|
|
738
1123
|
* startDate and endDate provided, timeRange is ignored.
|
|
739
1124
|
*/
|
|
740
|
-
timeRange?:
|
|
1125
|
+
timeRange?: 'last-hour' | 'last-day' | 'last-three-days' | 'last-seven-days' | 'last-thirty-one-days';
|
|
741
1126
|
/**
|
|
742
1127
|
* The type of the usage data. Can be one or more comma separated values. Default
|
|
743
1128
|
* is all types. If bad type or empty, all types will be returned.
|
|
744
1129
|
*/
|
|
745
|
-
type?:
|
|
1130
|
+
type?: 'usages' | 'activity' | 'consumption' | 'model-usages' | 'asset-usages' | 'nsfw-usages';
|
|
746
1131
|
/**
|
|
747
1132
|
* The unique identifier of the user for the usage. If not provided, returns all
|
|
748
1133
|
* usages for the team.
|