@civitai/client 0.2.0-beta.5 → 0.2.0-beta.50
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/dist/client/CivitaiClient.js +3 -1
- package/dist/generated/client/client.gen.d.ts +2 -0
- package/dist/generated/client/client.gen.js +237 -0
- package/dist/generated/client/index.d.ts +9 -8
- package/dist/generated/client/index.js +6 -4
- package/dist/generated/client/types.d.ts +4 -5
- package/dist/generated/client/types.gen.d.ts +195 -0
- package/dist/generated/client/types.gen.js +2 -0
- package/dist/generated/client/utils.gen.d.ts +58 -0
- package/dist/generated/client/utils.gen.js +234 -0
- package/dist/generated/client.gen.d.ts +5 -5
- package/dist/generated/client.gen.js +1 -1
- package/dist/generated/core/auth.gen.d.ts +21 -0
- package/dist/generated/core/auth.gen.js +14 -0
- package/dist/generated/core/bodySerializer.gen.d.ts +25 -0
- package/dist/generated/core/bodySerializer.gen.js +57 -0
- package/dist/generated/core/params.gen.d.ts +49 -0
- package/dist/generated/core/params.gen.js +100 -0
- package/dist/generated/core/pathSerializer.gen.d.ts +49 -0
- package/dist/generated/core/pathSerializer.gen.js +106 -0
- package/dist/generated/core/queryKeySerializer.gen.d.ts +24 -0
- package/dist/generated/core/queryKeySerializer.gen.js +92 -0
- package/dist/generated/core/serverSentEvents.gen.d.ts +88 -0
- package/dist/generated/core/serverSentEvents.gen.js +134 -0
- package/dist/generated/core/types.gen.d.ts +106 -0
- package/dist/generated/core/types.gen.js +2 -0
- package/dist/generated/core/utils.gen.d.ts +25 -0
- package/dist/generated/core/utils.gen.js +87 -0
- package/dist/generated/index.d.ts +913 -2
- package/dist/generated/index.js +2 -2
- package/dist/generated/sdk.gen.d.ts +486 -47
- package/dist/generated/sdk.gen.js +433 -186
- package/dist/generated/types.gen.d.ts +7283 -1575
- package/dist/generated/types.gen.js +201 -53
- package/dist/utils/TimeSpan.d.ts +1 -1
- package/dist/utils/TimeSpan.js +6 -6
- package/package.json +3 -3
|
@@ -1,17 +1,11 @@
|
|
|
1
1
|
// This file is auto-generated by @hey-api/openapi-ts
|
|
2
|
-
import { client
|
|
2
|
+
import { client } from './client.gen';
|
|
3
3
|
/**
|
|
4
|
-
* Get blob by ID. This will
|
|
4
|
+
* Get blob by ID. This will redirect to a cacheable content URL.
|
|
5
5
|
*/
|
|
6
6
|
export const getBlob = (options) => {
|
|
7
7
|
var _a;
|
|
8
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
9
|
-
security: [
|
|
10
|
-
{
|
|
11
|
-
scheme: 'bearer',
|
|
12
|
-
type: 'http',
|
|
13
|
-
},
|
|
14
|
-
],
|
|
8
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
15
9
|
url: '/v2/consumer/blobs/{blobId}',
|
|
16
10
|
...options,
|
|
17
11
|
});
|
|
@@ -21,30 +15,85 @@ export const getBlob = (options) => {
|
|
|
21
15
|
*/
|
|
22
16
|
export const headBlob = (options) => {
|
|
23
17
|
var _a;
|
|
24
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
25
|
-
security: [
|
|
26
|
-
{
|
|
27
|
-
scheme: 'bearer',
|
|
28
|
-
type: 'http',
|
|
29
|
-
},
|
|
30
|
-
],
|
|
18
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).head({
|
|
31
19
|
url: '/v2/consumer/blobs/{blobId}',
|
|
32
20
|
...options,
|
|
33
21
|
});
|
|
34
22
|
};
|
|
23
|
+
/**
|
|
24
|
+
* Get a presigned URL for browser uploads.
|
|
25
|
+
* The returned URL points to POST /v2/consumer/blobs with a signature for authentication.
|
|
26
|
+
*/
|
|
27
|
+
export const getConsumerBlobUploadUrl = (options) => {
|
|
28
|
+
var _a;
|
|
29
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({ url: '/v2/consumer/blobs/upload', ...options });
|
|
30
|
+
};
|
|
31
|
+
/**
|
|
32
|
+
* Upload a blob directly with on-the-fly moderation.
|
|
33
|
+
* Supports both authenticated requests (Bearer token) and presigned URLs (sig query param).
|
|
34
|
+
*/
|
|
35
|
+
export const uploadConsumerBlob = (options) => {
|
|
36
|
+
var _a;
|
|
37
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({ url: '/v2/consumer/blobs', ...options });
|
|
38
|
+
};
|
|
39
|
+
/**
|
|
40
|
+
* Serves cacheable blob content using a deterministic encrypted token
|
|
41
|
+
*/
|
|
42
|
+
export const getBlobContent = (options) => {
|
|
43
|
+
var _a;
|
|
44
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
45
|
+
url: '/v2/consumer/blobs/content/{encryptedToken}',
|
|
46
|
+
...options,
|
|
47
|
+
});
|
|
48
|
+
};
|
|
49
|
+
/**
|
|
50
|
+
* Serves a blocked placeholder image with the specified dimensions
|
|
51
|
+
*/
|
|
52
|
+
export const getBlockedContent = (options) => {
|
|
53
|
+
var _a;
|
|
54
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
55
|
+
url: '/v2/consumer/blobs/blocked/{encryptedToken}',
|
|
56
|
+
...options,
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
/**
|
|
60
|
+
* Refresh a blob's URL and debounce its lifetime.
|
|
61
|
+
* Returns a fresh presigned URL and resets the 30-day TTL.
|
|
62
|
+
*/
|
|
63
|
+
export const refreshBlob = (options) => {
|
|
64
|
+
var _a;
|
|
65
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
66
|
+
url: '/v2/consumer/blobs/{blobId}/refresh',
|
|
67
|
+
...options,
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
export const invalidateUserCache = (options) => {
|
|
71
|
+
var _a;
|
|
72
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/civitai/{userId}', ...options });
|
|
73
|
+
};
|
|
74
|
+
/**
|
|
75
|
+
* Workflow step for generating music using ACE Step 1.5.
|
|
76
|
+
* /// Produces full songs from text descriptions and structured lyrics.
|
|
77
|
+
*/
|
|
78
|
+
export const invokeAceStepAudioStepTemplate = (options) => {
|
|
79
|
+
var _a;
|
|
80
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
81
|
+
url: '/v2/consumer/recipes/aceStepAudio',
|
|
82
|
+
...options,
|
|
83
|
+
headers: {
|
|
84
|
+
'Content-Type': 'application/json',
|
|
85
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
86
|
+
},
|
|
87
|
+
});
|
|
88
|
+
};
|
|
35
89
|
/**
|
|
36
90
|
* Age classification
|
|
91
|
+
*
|
|
37
92
|
* Detects minors in media content. Returns a boolean value indicating whether the content contains minors as well as details on where minors are detected.
|
|
38
93
|
*/
|
|
39
94
|
export const invokeAgeClassificationStepTemplate = (options) => {
|
|
40
95
|
var _a;
|
|
41
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
42
|
-
security: [
|
|
43
|
-
{
|
|
44
|
-
scheme: 'bearer',
|
|
45
|
-
type: 'http',
|
|
46
|
-
},
|
|
47
|
-
],
|
|
96
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
48
97
|
url: '/v2/consumer/recipes/ageClassification',
|
|
49
98
|
...options,
|
|
50
99
|
headers: {
|
|
@@ -53,19 +102,42 @@ export const invokeAgeClassificationStepTemplate = (options) => {
|
|
|
53
102
|
},
|
|
54
103
|
});
|
|
55
104
|
};
|
|
105
|
+
export const invokeBatchOcrSafetyClassificationStepTemplate = (options) => {
|
|
106
|
+
var _a;
|
|
107
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
108
|
+
url: '/v2/consumer/recipes/batchOCRSafetyClassification',
|
|
109
|
+
...options,
|
|
110
|
+
headers: {
|
|
111
|
+
'Content-Type': 'application/json',
|
|
112
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
113
|
+
},
|
|
114
|
+
});
|
|
115
|
+
};
|
|
116
|
+
/**
|
|
117
|
+
* ChatCompletion
|
|
118
|
+
*
|
|
119
|
+
* Generate chat completions using language models with support for text and image inputs.
|
|
120
|
+
* /// Compatible with OpenAI Chat Completions API format.
|
|
121
|
+
*/
|
|
122
|
+
export const invokeChatCompletionStepTemplate = (options) => {
|
|
123
|
+
var _a;
|
|
124
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
125
|
+
url: '/v2/consumer/recipes/chatCompletion',
|
|
126
|
+
...options,
|
|
127
|
+
headers: {
|
|
128
|
+
'Content-Type': 'application/json',
|
|
129
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
};
|
|
56
133
|
/**
|
|
57
134
|
* Comfy workflows
|
|
135
|
+
*
|
|
58
136
|
* Runs a comfy workflow. Currently there are limited nodes available. Contact support for more information.
|
|
59
137
|
*/
|
|
60
138
|
export const invokeComfyStepTemplate = (options) => {
|
|
61
139
|
var _a;
|
|
62
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
63
|
-
security: [
|
|
64
|
-
{
|
|
65
|
-
scheme: 'bearer',
|
|
66
|
-
type: 'http',
|
|
67
|
-
},
|
|
68
|
-
],
|
|
140
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
69
141
|
url: '/v2/consumer/recipes/comfy',
|
|
70
142
|
...options,
|
|
71
143
|
headers: {
|
|
@@ -74,20 +146,29 @@ export const invokeComfyStepTemplate = (options) => {
|
|
|
74
146
|
},
|
|
75
147
|
});
|
|
76
148
|
};
|
|
149
|
+
/**
|
|
150
|
+
* A workflow step that converts images to different formats and applies optional transforms.
|
|
151
|
+
*/
|
|
152
|
+
export const invokeConvertImageStepTemplate = (options) => {
|
|
153
|
+
var _a;
|
|
154
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
155
|
+
url: '/v2/consumer/recipes/convertImage',
|
|
156
|
+
...options,
|
|
157
|
+
headers: {
|
|
158
|
+
'Content-Type': 'application/json',
|
|
159
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
160
|
+
},
|
|
161
|
+
});
|
|
162
|
+
};
|
|
77
163
|
/**
|
|
78
164
|
* Echo
|
|
165
|
+
*
|
|
79
166
|
* A workflow step that takes a message string and retuns it.
|
|
80
167
|
* /// This step is intended for testing purposes.
|
|
81
168
|
*/
|
|
82
169
|
export const invokeEchoStepTemplate = (options) => {
|
|
83
170
|
var _a;
|
|
84
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
85
|
-
security: [
|
|
86
|
-
{
|
|
87
|
-
scheme: 'bearer',
|
|
88
|
-
type: 'http',
|
|
89
|
-
},
|
|
90
|
-
],
|
|
171
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
91
172
|
url: '/v2/consumer/recipes/echo',
|
|
92
173
|
...options,
|
|
93
174
|
headers: {
|
|
@@ -96,19 +177,25 @@ export const invokeEchoStepTemplate = (options) => {
|
|
|
96
177
|
},
|
|
97
178
|
});
|
|
98
179
|
};
|
|
180
|
+
export const invokeHumanoidImageMaskStepTemplate = (options) => {
|
|
181
|
+
var _a;
|
|
182
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
183
|
+
url: '/v2/consumer/recipes/humanoidImageMask',
|
|
184
|
+
...options,
|
|
185
|
+
headers: {
|
|
186
|
+
'Content-Type': 'application/json',
|
|
187
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
188
|
+
},
|
|
189
|
+
});
|
|
190
|
+
};
|
|
99
191
|
/**
|
|
100
192
|
* Image Generation
|
|
193
|
+
*
|
|
101
194
|
* Generate images through text/image inputs using any of our supported engines
|
|
102
195
|
*/
|
|
103
196
|
export const invokeImageGenStepTemplate = (options) => {
|
|
104
197
|
var _a;
|
|
105
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
106
|
-
security: [
|
|
107
|
-
{
|
|
108
|
-
scheme: 'bearer',
|
|
109
|
-
type: 'http',
|
|
110
|
-
},
|
|
111
|
-
],
|
|
198
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
112
199
|
url: '/v2/consumer/recipes/imageGen',
|
|
113
200
|
...options,
|
|
114
201
|
headers: {
|
|
@@ -119,17 +206,12 @@ export const invokeImageGenStepTemplate = (options) => {
|
|
|
119
206
|
};
|
|
120
207
|
/**
|
|
121
208
|
* LORA Training
|
|
209
|
+
*
|
|
122
210
|
* Train LORA's
|
|
123
211
|
*/
|
|
124
212
|
export const invokeImageResourceTrainingStepTemplate = (options) => {
|
|
125
213
|
var _a;
|
|
126
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
127
|
-
security: [
|
|
128
|
-
{
|
|
129
|
-
scheme: 'bearer',
|
|
130
|
-
type: 'http',
|
|
131
|
-
},
|
|
132
|
-
],
|
|
214
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
133
215
|
url: '/v2/consumer/recipes/imageResourceTraining',
|
|
134
216
|
...options,
|
|
135
217
|
headers: {
|
|
@@ -140,17 +222,12 @@ export const invokeImageResourceTrainingStepTemplate = (options) => {
|
|
|
140
222
|
};
|
|
141
223
|
/**
|
|
142
224
|
* Image upload
|
|
225
|
+
*
|
|
143
226
|
* Uploads an image to be used in a workflow
|
|
144
227
|
*/
|
|
145
228
|
export const invokeImageUploadStepTemplate = (options) => {
|
|
146
229
|
var _a;
|
|
147
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
148
|
-
security: [
|
|
149
|
-
{
|
|
150
|
-
scheme: 'bearer',
|
|
151
|
-
type: 'http',
|
|
152
|
-
},
|
|
153
|
-
],
|
|
230
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
154
231
|
url: '/v2/consumer/recipes/imageUpload',
|
|
155
232
|
...options,
|
|
156
233
|
headers: {
|
|
@@ -159,19 +236,115 @@ export const invokeImageUploadStepTemplate = (options) => {
|
|
|
159
236
|
},
|
|
160
237
|
});
|
|
161
238
|
};
|
|
239
|
+
export const invokeImageUpscalerStepTemplate = (options) => {
|
|
240
|
+
var _a;
|
|
241
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
242
|
+
url: '/v2/consumer/recipes/imageUpscaler',
|
|
243
|
+
...options,
|
|
244
|
+
headers: {
|
|
245
|
+
'Content-Type': 'application/json',
|
|
246
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
247
|
+
},
|
|
248
|
+
});
|
|
249
|
+
};
|
|
250
|
+
/**
|
|
251
|
+
* Media Captioning
|
|
252
|
+
*
|
|
253
|
+
* Generates a descriptive caption for a single media item using the JoyCaption model.
|
|
254
|
+
*/
|
|
255
|
+
export const invokeMediaCaptioningStepTemplate = (options) => {
|
|
256
|
+
var _a;
|
|
257
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
258
|
+
url: '/v2/consumer/recipes/mediaCaptioning',
|
|
259
|
+
...options,
|
|
260
|
+
headers: {
|
|
261
|
+
'Content-Type': 'application/json',
|
|
262
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
263
|
+
},
|
|
264
|
+
});
|
|
265
|
+
};
|
|
266
|
+
/**
|
|
267
|
+
* MediaHash
|
|
268
|
+
*
|
|
269
|
+
* Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
|
|
270
|
+
*/
|
|
271
|
+
export const invokeMediaHashStepTemplate = (options) => {
|
|
272
|
+
var _a;
|
|
273
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
274
|
+
url: '/v2/consumer/recipes/mediaHash',
|
|
275
|
+
...options,
|
|
276
|
+
headers: {
|
|
277
|
+
'Content-Type': 'application/json',
|
|
278
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
279
|
+
},
|
|
280
|
+
});
|
|
281
|
+
};
|
|
282
|
+
/**
|
|
283
|
+
* MediaRating
|
|
284
|
+
*
|
|
285
|
+
* Performs NSFW level detection and content safety classification on media content.
|
|
286
|
+
*/
|
|
287
|
+
export const invokeMediaRatingStepTemplate = (options) => {
|
|
288
|
+
var _a;
|
|
289
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
290
|
+
url: '/v2/consumer/recipes/mediaRating',
|
|
291
|
+
...options,
|
|
292
|
+
headers: {
|
|
293
|
+
'Content-Type': 'application/json',
|
|
294
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
295
|
+
},
|
|
296
|
+
});
|
|
297
|
+
};
|
|
298
|
+
export const invokePreprocessImageStepTemplate = (options) => {
|
|
299
|
+
var _a;
|
|
300
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
301
|
+
url: '/v2/consumer/recipes/preprocessImage',
|
|
302
|
+
...options,
|
|
303
|
+
headers: {
|
|
304
|
+
'Content-Type': 'application/json',
|
|
305
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
306
|
+
},
|
|
307
|
+
});
|
|
308
|
+
};
|
|
309
|
+
/**
|
|
310
|
+
* PromptEnhancement
|
|
311
|
+
*
|
|
312
|
+
* Analyzes and enhances user prompts for a specific AI ecosystem.
|
|
313
|
+
* /// Returns detected issues, recommendations, and improved prompt variants.
|
|
314
|
+
*/
|
|
315
|
+
export const invokePromptEnhancementStepTemplate = (options) => {
|
|
316
|
+
var _a;
|
|
317
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
318
|
+
url: '/v2/consumer/recipes/promptEnhancement',
|
|
319
|
+
...options,
|
|
320
|
+
headers: {
|
|
321
|
+
'Content-Type': 'application/json',
|
|
322
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
323
|
+
},
|
|
324
|
+
});
|
|
325
|
+
};
|
|
326
|
+
/**
|
|
327
|
+
* Repeat workflow step.
|
|
328
|
+
*/
|
|
329
|
+
export const invokeRepeatStepTemplate = (options) => {
|
|
330
|
+
var _a;
|
|
331
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
332
|
+
url: '/v2/consumer/recipes/repeat',
|
|
333
|
+
...options,
|
|
334
|
+
headers: {
|
|
335
|
+
'Content-Type': 'application/json',
|
|
336
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
337
|
+
},
|
|
338
|
+
});
|
|
339
|
+
};
|
|
162
340
|
/**
|
|
163
341
|
* TextToImage
|
|
342
|
+
*
|
|
164
343
|
* Generate images using text as input
|
|
165
344
|
*/
|
|
166
345
|
export const invokeTextToImageStepTemplate = (options) => {
|
|
167
346
|
var _a;
|
|
168
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
169
|
-
security: [
|
|
170
|
-
{
|
|
171
|
-
scheme: 'bearer',
|
|
172
|
-
type: 'http',
|
|
173
|
-
},
|
|
174
|
-
],
|
|
347
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
175
348
|
url: '/v2/consumer/recipes/textToImage',
|
|
176
349
|
...options,
|
|
177
350
|
headers: {
|
|
@@ -180,18 +353,87 @@ export const invokeTextToImageStepTemplate = (options) => {
|
|
|
180
353
|
},
|
|
181
354
|
});
|
|
182
355
|
};
|
|
356
|
+
/**
|
|
357
|
+
* Text-to-Speech
|
|
358
|
+
*
|
|
359
|
+
* Synthesizes speech from text, supporting both voice cloning (Base mode with reference audio) and built-in speakers (CustomVoice mode).
|
|
360
|
+
*/
|
|
361
|
+
export const invokeTextToSpeechStepTemplate = (options) => {
|
|
362
|
+
var _a;
|
|
363
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
364
|
+
url: '/v2/consumer/recipes/textToSpeech',
|
|
365
|
+
...options,
|
|
366
|
+
headers: {
|
|
367
|
+
'Content-Type': 'application/json',
|
|
368
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
369
|
+
},
|
|
370
|
+
});
|
|
371
|
+
};
|
|
372
|
+
/**
|
|
373
|
+
* Training
|
|
374
|
+
*
|
|
375
|
+
* A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
|
|
376
|
+
* /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
|
|
377
|
+
* /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
|
|
378
|
+
*/
|
|
379
|
+
export const invokeTrainingStepTemplate = (options) => {
|
|
380
|
+
var _a;
|
|
381
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
382
|
+
url: '/v2/consumer/recipes/training',
|
|
383
|
+
...options,
|
|
384
|
+
headers: {
|
|
385
|
+
'Content-Type': 'application/json',
|
|
386
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
387
|
+
},
|
|
388
|
+
});
|
|
389
|
+
};
|
|
390
|
+
/**
|
|
391
|
+
* Transcoding
|
|
392
|
+
*/
|
|
393
|
+
export const invokeTranscodeStepTemplate = (options) => {
|
|
394
|
+
var _a;
|
|
395
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
396
|
+
url: '/v2/consumer/recipes/transcode',
|
|
397
|
+
...options,
|
|
398
|
+
headers: {
|
|
399
|
+
'Content-Type': 'application/json',
|
|
400
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
401
|
+
},
|
|
402
|
+
});
|
|
403
|
+
};
|
|
404
|
+
/**
|
|
405
|
+
* Transcription
|
|
406
|
+
*
|
|
407
|
+
* Performs automatic speech recognition (ASR) on audio media, returning transcribed text with optional timestamps.
|
|
408
|
+
*/
|
|
409
|
+
export const invokeTranscriptionStepTemplate = (options) => {
|
|
410
|
+
var _a;
|
|
411
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
412
|
+
url: '/v2/consumer/recipes/transcription',
|
|
413
|
+
...options,
|
|
414
|
+
headers: {
|
|
415
|
+
'Content-Type': 'application/json',
|
|
416
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
417
|
+
},
|
|
418
|
+
});
|
|
419
|
+
};
|
|
420
|
+
export const invokeTryOnUStepTemplate = (options) => {
|
|
421
|
+
var _a;
|
|
422
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
423
|
+
url: '/v2/consumer/recipes/tryOnU',
|
|
424
|
+
...options,
|
|
425
|
+
headers: {
|
|
426
|
+
'Content-Type': 'application/json',
|
|
427
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
428
|
+
},
|
|
429
|
+
});
|
|
430
|
+
};
|
|
183
431
|
/**
|
|
184
432
|
* Upscale videos and/or interpolate frames
|
|
185
433
|
*/
|
|
186
434
|
export const invokeVideoEnhancementStepTemplate = (options) => {
|
|
187
435
|
var _a;
|
|
188
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
189
|
-
security: [
|
|
190
|
-
{
|
|
191
|
-
scheme: 'bearer',
|
|
192
|
-
type: 'http',
|
|
193
|
-
},
|
|
194
|
-
],
|
|
436
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
195
437
|
url: '/v2/consumer/recipes/videoEnhancement',
|
|
196
438
|
...options,
|
|
197
439
|
headers: {
|
|
@@ -200,19 +442,31 @@ export const invokeVideoEnhancementStepTemplate = (options) => {
|
|
|
200
442
|
},
|
|
201
443
|
});
|
|
202
444
|
};
|
|
445
|
+
/**
|
|
446
|
+
* Video Frame Extraction
|
|
447
|
+
*
|
|
448
|
+
* Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
|
|
449
|
+
* /// Useful for generating video previews, storyboards, or analyzing video content.
|
|
450
|
+
*/
|
|
451
|
+
export const invokeVideoFrameExtractionStepTemplate = (options) => {
|
|
452
|
+
var _a;
|
|
453
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
454
|
+
url: '/v2/consumer/recipes/videoFrameExtraction',
|
|
455
|
+
...options,
|
|
456
|
+
headers: {
|
|
457
|
+
'Content-Type': 'application/json',
|
|
458
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
459
|
+
},
|
|
460
|
+
});
|
|
461
|
+
};
|
|
203
462
|
/**
|
|
204
463
|
* Video generation
|
|
464
|
+
*
|
|
205
465
|
* Generate videos through text/image inputs using any of our supported engines
|
|
206
466
|
*/
|
|
207
467
|
export const invokeVideoGenStepTemplate = (options) => {
|
|
208
468
|
var _a;
|
|
209
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
210
|
-
security: [
|
|
211
|
-
{
|
|
212
|
-
scheme: 'bearer',
|
|
213
|
-
type: 'http',
|
|
214
|
-
},
|
|
215
|
-
],
|
|
469
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
216
470
|
url: '/v2/consumer/recipes/videoGen',
|
|
217
471
|
...options,
|
|
218
472
|
headers: {
|
|
@@ -222,49 +476,110 @@ export const invokeVideoGenStepTemplate = (options) => {
|
|
|
222
476
|
});
|
|
223
477
|
};
|
|
224
478
|
/**
|
|
225
|
-
*
|
|
479
|
+
* Interpolate videos using VFI Mamba
|
|
226
480
|
*/
|
|
227
|
-
export const
|
|
481
|
+
export const invokeVideoInterpolationStepTemplate = (options) => {
|
|
228
482
|
var _a;
|
|
229
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
230
|
-
|
|
231
|
-
{
|
|
232
|
-
scheme: 'bearer',
|
|
233
|
-
type: 'http',
|
|
234
|
-
},
|
|
235
|
-
],
|
|
236
|
-
url: '/v2/resources/{air}',
|
|
483
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
484
|
+
url: '/v2/consumer/recipes/videoInterpolation',
|
|
237
485
|
...options,
|
|
486
|
+
headers: {
|
|
487
|
+
'Content-Type': 'application/json',
|
|
488
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
489
|
+
},
|
|
238
490
|
});
|
|
239
491
|
};
|
|
492
|
+
/**
|
|
493
|
+
* Extract metadata from videos including width, height, FPS, and duration
|
|
494
|
+
*/
|
|
495
|
+
export const invokeVideoMetadataStepTemplate = (options) => {
|
|
496
|
+
var _a;
|
|
497
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
498
|
+
url: '/v2/consumer/recipes/videoMetadata',
|
|
499
|
+
...options,
|
|
500
|
+
headers: {
|
|
501
|
+
'Content-Type': 'application/json',
|
|
502
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
503
|
+
},
|
|
504
|
+
});
|
|
505
|
+
};
|
|
506
|
+
/**
|
|
507
|
+
* Upscale videos using FlashVSR
|
|
508
|
+
*/
|
|
509
|
+
export const invokeVideoUpscalerStepTemplate = (options) => {
|
|
510
|
+
var _a;
|
|
511
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
512
|
+
url: '/v2/consumer/recipes/videoUpscaler',
|
|
513
|
+
...options,
|
|
514
|
+
headers: {
|
|
515
|
+
'Content-Type': 'application/json',
|
|
516
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
517
|
+
},
|
|
518
|
+
});
|
|
519
|
+
};
|
|
520
|
+
/**
|
|
521
|
+
* WDTagging
|
|
522
|
+
*
|
|
523
|
+
* Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
|
|
524
|
+
*/
|
|
525
|
+
export const invokeWdTaggingStepTemplate = (options) => {
|
|
526
|
+
var _a;
|
|
527
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
528
|
+
url: '/v2/consumer/recipes/wdTagging',
|
|
529
|
+
...options,
|
|
530
|
+
headers: {
|
|
531
|
+
'Content-Type': 'application/json',
|
|
532
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
533
|
+
},
|
|
534
|
+
});
|
|
535
|
+
};
|
|
536
|
+
/**
|
|
537
|
+
* XGuardModeration
|
|
538
|
+
*
|
|
539
|
+
* Evaluate text or generation prompts against XGuard content moderation policies.
|
|
540
|
+
* /// Generates one ChatCompletion job per label and aggregates results with logprob-based scoring.
|
|
541
|
+
*/
|
|
542
|
+
export const invokeXGuardModerationStepTemplate = (options) => {
|
|
543
|
+
var _a;
|
|
544
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
545
|
+
url: '/v2/consumer/recipes/xGuardModeration',
|
|
546
|
+
...options,
|
|
547
|
+
headers: {
|
|
548
|
+
'Content-Type': 'application/json',
|
|
549
|
+
...options === null || options === void 0 ? void 0 : options.headers,
|
|
550
|
+
},
|
|
551
|
+
});
|
|
552
|
+
};
|
|
553
|
+
/**
|
|
554
|
+
* Invalidates the cache of a specific resource.
|
|
555
|
+
*/
|
|
556
|
+
export const invalidateResource = (options) => {
|
|
557
|
+
var _a;
|
|
558
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/resources/{air}', ...options });
|
|
559
|
+
};
|
|
240
560
|
/**
|
|
241
561
|
* Get an existing resource.
|
|
242
562
|
*/
|
|
243
563
|
export const getResource = (options) => {
|
|
244
564
|
var _a;
|
|
245
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
246
|
-
security: [
|
|
247
|
-
{
|
|
248
|
-
scheme: 'bearer',
|
|
249
|
-
type: 'http',
|
|
250
|
-
},
|
|
251
|
-
],
|
|
565
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
252
566
|
url: '/v2/resources/{air}',
|
|
253
567
|
...options,
|
|
254
568
|
});
|
|
255
569
|
};
|
|
570
|
+
export const getStreamingBlob = (options) => {
|
|
571
|
+
var _a;
|
|
572
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
573
|
+
url: '/v2/consumer/streaming-blobs/{blobKey}',
|
|
574
|
+
...options,
|
|
575
|
+
});
|
|
576
|
+
};
|
|
256
577
|
/**
|
|
257
578
|
* Query workflows
|
|
258
579
|
*/
|
|
259
580
|
export const queryWorkflows = (options) => {
|
|
260
581
|
var _a;
|
|
261
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
262
|
-
security: [
|
|
263
|
-
{
|
|
264
|
-
scheme: 'bearer',
|
|
265
|
-
type: 'http',
|
|
266
|
-
},
|
|
267
|
-
],
|
|
582
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
268
583
|
url: '/v2/consumer/workflows',
|
|
269
584
|
...options,
|
|
270
585
|
});
|
|
@@ -274,13 +589,7 @@ export const queryWorkflows = (options) => {
|
|
|
274
589
|
*/
|
|
275
590
|
export const submitWorkflow = (options) => {
|
|
276
591
|
var _a;
|
|
277
|
-
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a :
|
|
278
|
-
security: [
|
|
279
|
-
{
|
|
280
|
-
scheme: 'bearer',
|
|
281
|
-
type: 'http',
|
|
282
|
-
},
|
|
283
|
-
],
|
|
592
|
+
return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
284
593
|
url: '/v2/consumer/workflows',
|
|
285
594
|
...options,
|
|
286
595
|
headers: {
|
|
@@ -291,17 +600,12 @@ export const submitWorkflow = (options) => {
|
|
|
291
600
|
};
|
|
292
601
|
/**
|
|
293
602
|
* Delete workflow
|
|
603
|
+
*
|
|
294
604
|
* This will delete a workflow. This may trigger a refund if the work requested with this workflow has not yet started
|
|
295
605
|
*/
|
|
296
606
|
export const deleteWorkflow = (options) => {
|
|
297
607
|
var _a;
|
|
298
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
299
|
-
security: [
|
|
300
|
-
{
|
|
301
|
-
scheme: 'bearer',
|
|
302
|
-
type: 'http',
|
|
303
|
-
},
|
|
304
|
-
],
|
|
608
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({
|
|
305
609
|
url: '/v2/consumer/workflows/{workflowId}',
|
|
306
610
|
...options,
|
|
307
611
|
});
|
|
@@ -311,30 +615,19 @@ export const deleteWorkflow = (options) => {
|
|
|
311
615
|
*/
|
|
312
616
|
export const getWorkflow = (options) => {
|
|
313
617
|
var _a;
|
|
314
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
315
|
-
security: [
|
|
316
|
-
{
|
|
317
|
-
scheme: 'bearer',
|
|
318
|
-
type: 'http',
|
|
319
|
-
},
|
|
320
|
-
],
|
|
618
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
321
619
|
url: '/v2/consumer/workflows/{workflowId}',
|
|
322
620
|
...options,
|
|
323
621
|
});
|
|
324
622
|
};
|
|
325
623
|
/**
|
|
326
624
|
* Patch workflow
|
|
625
|
+
*
|
|
327
626
|
* Patches a worfklow using JSON Patch. This can currently be used to cancel a worfklow, update metadata and add additional tags
|
|
328
627
|
*/
|
|
329
628
|
export const patchWorkflow = (options) => {
|
|
330
629
|
var _a;
|
|
331
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
332
|
-
security: [
|
|
333
|
-
{
|
|
334
|
-
scheme: 'bearer',
|
|
335
|
-
type: 'http',
|
|
336
|
-
},
|
|
337
|
-
],
|
|
630
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
|
|
338
631
|
url: '/v2/consumer/workflows/{workflowId}',
|
|
339
632
|
...options,
|
|
340
633
|
headers: {
|
|
@@ -345,17 +638,12 @@ export const patchWorkflow = (options) => {
|
|
|
345
638
|
};
|
|
346
639
|
/**
|
|
347
640
|
* Update workflow
|
|
641
|
+
*
|
|
348
642
|
* Updates a worfklow. This can currently be used to cancel a worfklow or override metadata and/or tags
|
|
349
643
|
*/
|
|
350
644
|
export const updateWorkflow = (options) => {
|
|
351
645
|
var _a;
|
|
352
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
353
|
-
security: [
|
|
354
|
-
{
|
|
355
|
-
scheme: 'bearer',
|
|
356
|
-
type: 'http',
|
|
357
|
-
},
|
|
358
|
-
],
|
|
646
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
|
|
359
647
|
url: '/v2/consumer/workflows/{workflowId}',
|
|
360
648
|
...options,
|
|
361
649
|
headers: {
|
|
@@ -369,30 +657,16 @@ export const updateWorkflow = (options) => {
|
|
|
369
657
|
*/
|
|
370
658
|
export const removeAllWorkflowTags = (options) => {
|
|
371
659
|
var _a;
|
|
372
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
373
|
-
security: [
|
|
374
|
-
{
|
|
375
|
-
scheme: 'bearer',
|
|
376
|
-
type: 'http',
|
|
377
|
-
},
|
|
378
|
-
],
|
|
379
|
-
url: '/v2/consumer/workflows/{workflowId}/tags',
|
|
380
|
-
...options,
|
|
381
|
-
});
|
|
660
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/workflows/{workflowId}/tags', ...options });
|
|
382
661
|
};
|
|
383
662
|
/**
|
|
384
663
|
* Add workflow tag
|
|
664
|
+
*
|
|
385
665
|
* Adds a tag to a workflow
|
|
386
666
|
*/
|
|
387
667
|
export const addWorkflowTag = (options) => {
|
|
388
668
|
var _a;
|
|
389
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
390
|
-
security: [
|
|
391
|
-
{
|
|
392
|
-
scheme: 'bearer',
|
|
393
|
-
type: 'http',
|
|
394
|
-
},
|
|
395
|
-
],
|
|
669
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).post({
|
|
396
670
|
url: '/v2/consumer/workflows/{workflowId}/tags',
|
|
397
671
|
...options,
|
|
398
672
|
headers: {
|
|
@@ -406,42 +680,21 @@ export const addWorkflowTag = (options) => {
|
|
|
406
680
|
*/
|
|
407
681
|
export const removeWorkflowTag = (options) => {
|
|
408
682
|
var _a;
|
|
409
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
410
|
-
security: [
|
|
411
|
-
{
|
|
412
|
-
scheme: 'bearer',
|
|
413
|
-
type: 'http',
|
|
414
|
-
},
|
|
415
|
-
],
|
|
416
|
-
url: '/v2/consumer/workflows/{workflowId}/tags/{tag}',
|
|
417
|
-
...options,
|
|
418
|
-
});
|
|
683
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).delete({ url: '/v2/consumer/workflows/{workflowId}/tags/{tag}', ...options });
|
|
419
684
|
};
|
|
420
685
|
/**
|
|
421
686
|
* Get the status of a workflow step
|
|
422
687
|
*/
|
|
423
688
|
export const getWorkflowStep = (options) => {
|
|
424
689
|
var _a;
|
|
425
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
426
|
-
security: [
|
|
427
|
-
{
|
|
428
|
-
scheme: 'bearer',
|
|
429
|
-
type: 'http',
|
|
430
|
-
},
|
|
431
|
-
],
|
|
690
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).get({
|
|
432
691
|
url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
|
|
433
692
|
...options,
|
|
434
693
|
});
|
|
435
694
|
};
|
|
436
695
|
export const patchWorkflowStep = (options) => {
|
|
437
696
|
var _a;
|
|
438
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
439
|
-
security: [
|
|
440
|
-
{
|
|
441
|
-
scheme: 'bearer',
|
|
442
|
-
type: 'http',
|
|
443
|
-
},
|
|
444
|
-
],
|
|
697
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).patch({
|
|
445
698
|
url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
|
|
446
699
|
...options,
|
|
447
700
|
headers: {
|
|
@@ -455,13 +708,7 @@ export const patchWorkflowStep = (options) => {
|
|
|
455
708
|
*/
|
|
456
709
|
export const updateWorkflowStep = (options) => {
|
|
457
710
|
var _a;
|
|
458
|
-
return ((_a = options.client) !== null && _a !== void 0 ? _a :
|
|
459
|
-
security: [
|
|
460
|
-
{
|
|
461
|
-
scheme: 'bearer',
|
|
462
|
-
type: 'http',
|
|
463
|
-
},
|
|
464
|
-
],
|
|
711
|
+
return ((_a = options.client) !== null && _a !== void 0 ? _a : client).put({
|
|
465
712
|
url: '/v2/consumer/workflows/{workflowId}/steps/{stepName}',
|
|
466
713
|
...options,
|
|
467
714
|
headers: {
|