@civitai/client 0.2.0-beta.12 → 0.2.0-beta.15

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.
@@ -23,21 +23,42 @@ import type {
23
23
  InvokeImageResourceTrainingStepTemplateData,
24
24
  InvokeImageResourceTrainingStepTemplateResponses,
25
25
  InvokeImageResourceTrainingStepTemplateErrors,
26
- InvokeTrainingStepTemplateData,
27
- InvokeTrainingStepTemplateResponses,
28
- InvokeTrainingStepTemplateErrors,
29
26
  InvokeImageUploadStepTemplateData,
30
27
  InvokeImageUploadStepTemplateResponses,
31
28
  InvokeImageUploadStepTemplateErrors,
29
+ InvokeImageUpscalerStepTemplateData,
30
+ InvokeImageUpscalerStepTemplateResponses,
31
+ InvokeImageUpscalerStepTemplateErrors,
32
+ InvokeMediaHashStepTemplateData,
33
+ InvokeMediaHashStepTemplateResponses,
34
+ InvokeMediaHashStepTemplateErrors,
35
+ InvokeMediaRatingStepTemplateData,
36
+ InvokeMediaRatingStepTemplateResponses,
37
+ InvokeMediaRatingStepTemplateErrors,
32
38
  InvokeTextToImageStepTemplateData,
33
39
  InvokeTextToImageStepTemplateResponses,
34
40
  InvokeTextToImageStepTemplateErrors,
41
+ InvokeTrainingStepTemplateData,
42
+ InvokeTrainingStepTemplateResponses,
43
+ InvokeTrainingStepTemplateErrors,
35
44
  InvokeVideoEnhancementStepTemplateData,
36
45
  InvokeVideoEnhancementStepTemplateResponses,
37
46
  InvokeVideoEnhancementStepTemplateErrors,
47
+ InvokeVideoFrameExtractionStepTemplateData,
48
+ InvokeVideoFrameExtractionStepTemplateResponses,
49
+ InvokeVideoFrameExtractionStepTemplateErrors,
38
50
  InvokeVideoGenStepTemplateData,
39
51
  InvokeVideoGenStepTemplateResponses,
40
52
  InvokeVideoGenStepTemplateErrors,
53
+ InvokeVideoInterpolationStepTemplateData,
54
+ InvokeVideoInterpolationStepTemplateResponses,
55
+ InvokeVideoInterpolationStepTemplateErrors,
56
+ InvokeVideoUpscalerStepTemplateData,
57
+ InvokeVideoUpscalerStepTemplateResponses,
58
+ InvokeVideoUpscalerStepTemplateErrors,
59
+ InvokeWdTaggingStepTemplateData,
60
+ InvokeWdTaggingStepTemplateResponses,
61
+ InvokeWdTaggingStepTemplateErrors,
41
62
  InvalidateResourceData,
42
63
  InvalidateResourceResponses,
43
64
  InvalidateResourceErrors,
@@ -183,18 +204,6 @@ export declare const invokeImageResourceTrainingStepTemplate: <
183
204
  ThrowOnError,
184
205
  'fields'
185
206
  >;
186
- /**
187
- * AI Toolkit Training
188
- * Train models using AI Toolkit engine
189
- */
190
- export declare const invokeTrainingStepTemplate: <ThrowOnError extends boolean = false>(
191
- options?: Options<InvokeTrainingStepTemplateData, ThrowOnError>
192
- ) => import('./client').RequestResult<
193
- InvokeTrainingStepTemplateResponses,
194
- InvokeTrainingStepTemplateErrors,
195
- ThrowOnError,
196
- 'fields'
197
- >;
198
207
  /**
199
208
  * Image upload
200
209
  * Uploads an image to be used in a workflow
@@ -207,6 +216,38 @@ export declare const invokeImageUploadStepTemplate: <ThrowOnError extends boolea
207
216
  ThrowOnError,
208
217
  'fields'
209
218
  >;
219
+ export declare const invokeImageUpscalerStepTemplate: <ThrowOnError extends boolean = false>(
220
+ options?: Options<InvokeImageUpscalerStepTemplateData, ThrowOnError>
221
+ ) => import('./client').RequestResult<
222
+ InvokeImageUpscalerStepTemplateResponses,
223
+ InvokeImageUpscalerStepTemplateErrors,
224
+ ThrowOnError,
225
+ 'fields'
226
+ >;
227
+ /**
228
+ * MediaHash
229
+ * Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
230
+ */
231
+ export declare const invokeMediaHashStepTemplate: <ThrowOnError extends boolean = false>(
232
+ options?: Options<InvokeMediaHashStepTemplateData, ThrowOnError>
233
+ ) => import('./client').RequestResult<
234
+ InvokeMediaHashStepTemplateResponses,
235
+ InvokeMediaHashStepTemplateErrors,
236
+ ThrowOnError,
237
+ 'fields'
238
+ >;
239
+ /**
240
+ * MediaRating
241
+ * Performs NSFW level detection and content safety classification on media content.
242
+ */
243
+ export declare const invokeMediaRatingStepTemplate: <ThrowOnError extends boolean = false>(
244
+ options?: Options<InvokeMediaRatingStepTemplateData, ThrowOnError>
245
+ ) => import('./client').RequestResult<
246
+ InvokeMediaRatingStepTemplateResponses,
247
+ InvokeMediaRatingStepTemplateErrors,
248
+ ThrowOnError,
249
+ 'fields'
250
+ >;
210
251
  /**
211
252
  * TextToImage
212
253
  * Generate images using text as input
@@ -219,6 +260,20 @@ export declare const invokeTextToImageStepTemplate: <ThrowOnError extends boolea
219
260
  ThrowOnError,
220
261
  'fields'
221
262
  >;
263
+ /**
264
+ * Training
265
+ * A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
266
+ * /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
267
+ * /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
268
+ */
269
+ export declare const invokeTrainingStepTemplate: <ThrowOnError extends boolean = false>(
270
+ options?: Options<InvokeTrainingStepTemplateData, ThrowOnError>
271
+ ) => import('./client').RequestResult<
272
+ InvokeTrainingStepTemplateResponses,
273
+ InvokeTrainingStepTemplateErrors,
274
+ ThrowOnError,
275
+ 'fields'
276
+ >;
222
277
  /**
223
278
  * Upscale videos and/or interpolate frames
224
279
  */
@@ -230,6 +285,19 @@ export declare const invokeVideoEnhancementStepTemplate: <ThrowOnError extends b
230
285
  ThrowOnError,
231
286
  'fields'
232
287
  >;
288
+ /**
289
+ * Video Frame Extraction
290
+ * Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
291
+ * /// Useful for generating video previews, storyboards, or analyzing video content.
292
+ */
293
+ export declare const invokeVideoFrameExtractionStepTemplate: <ThrowOnError extends boolean = false>(
294
+ options?: Options<InvokeVideoFrameExtractionStepTemplateData, ThrowOnError>
295
+ ) => import('./client').RequestResult<
296
+ InvokeVideoFrameExtractionStepTemplateResponses,
297
+ InvokeVideoFrameExtractionStepTemplateErrors,
298
+ ThrowOnError,
299
+ 'fields'
300
+ >;
233
301
  /**
234
302
  * Video generation
235
303
  * Generate videos through text/image inputs using any of our supported engines
@@ -242,6 +310,40 @@ export declare const invokeVideoGenStepTemplate: <ThrowOnError extends boolean =
242
310
  ThrowOnError,
243
311
  'fields'
244
312
  >;
313
+ /**
314
+ * Interpolate videos using VFI Mamba
315
+ */
316
+ export declare const invokeVideoInterpolationStepTemplate: <ThrowOnError extends boolean = false>(
317
+ options?: Options<InvokeVideoInterpolationStepTemplateData, ThrowOnError>
318
+ ) => import('./client').RequestResult<
319
+ InvokeVideoInterpolationStepTemplateResponses,
320
+ InvokeVideoInterpolationStepTemplateErrors,
321
+ ThrowOnError,
322
+ 'fields'
323
+ >;
324
+ /**
325
+ * Upscale videos using FlashVSR
326
+ */
327
+ export declare const invokeVideoUpscalerStepTemplate: <ThrowOnError extends boolean = false>(
328
+ options?: Options<InvokeVideoUpscalerStepTemplateData, ThrowOnError>
329
+ ) => import('./client').RequestResult<
330
+ InvokeVideoUpscalerStepTemplateResponses,
331
+ InvokeVideoUpscalerStepTemplateErrors,
332
+ ThrowOnError,
333
+ 'fields'
334
+ >;
335
+ /**
336
+ * WDTagging
337
+ * Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
338
+ */
339
+ export declare const invokeWdTaggingStepTemplate: <ThrowOnError extends boolean = false>(
340
+ options?: Options<InvokeWdTaggingStepTemplateData, ThrowOnError>
341
+ ) => import('./client').RequestResult<
342
+ InvokeWdTaggingStepTemplateResponses,
343
+ InvokeWdTaggingStepTemplateErrors,
344
+ ThrowOnError,
345
+ 'fields'
346
+ >;
245
347
  /**
246
348
  * Invalidates the cache of a specific resource.
247
349
  */
@@ -155,10 +155,10 @@ export const invokeImageResourceTrainingStepTemplate = (options) => {
155
155
  });
156
156
  };
157
157
  /**
158
- * AI Toolkit Training
159
- * Train models using AI Toolkit engine
158
+ * Image upload
159
+ * Uploads an image to be used in a workflow
160
160
  */
161
- export const invokeTrainingStepTemplate = (options) => {
161
+ export const invokeImageUploadStepTemplate = (options) => {
162
162
  var _a;
163
163
  return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
164
164
  security: [
@@ -167,7 +167,24 @@ export const invokeTrainingStepTemplate = (options) => {
167
167
  type: 'http',
168
168
  },
169
169
  ],
170
- url: '/v2/consumer/recipes/training',
170
+ url: '/v2/consumer/recipes/imageUpload',
171
+ ...options,
172
+ headers: {
173
+ 'Content-Type': 'application/json',
174
+ ...options === null || options === void 0 ? void 0 : options.headers,
175
+ },
176
+ });
177
+ };
178
+ export const invokeImageUpscalerStepTemplate = (options) => {
179
+ var _a;
180
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
181
+ security: [
182
+ {
183
+ scheme: 'bearer',
184
+ type: 'http',
185
+ },
186
+ ],
187
+ url: '/v2/consumer/recipes/imageUpscaler',
171
188
  ...options,
172
189
  headers: {
173
190
  'Content-Type': 'application/json',
@@ -176,10 +193,10 @@ export const invokeTrainingStepTemplate = (options) => {
176
193
  });
177
194
  };
178
195
  /**
179
- * Image upload
180
- * Uploads an image to be used in a workflow
196
+ * MediaHash
197
+ * Generates perceptual hashes for media content to enable similarity detection and duplicate identification.
181
198
  */
182
- export const invokeImageUploadStepTemplate = (options) => {
199
+ export const invokeMediaHashStepTemplate = (options) => {
183
200
  var _a;
184
201
  return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
185
202
  security: [
@@ -188,7 +205,28 @@ export const invokeImageUploadStepTemplate = (options) => {
188
205
  type: 'http',
189
206
  },
190
207
  ],
191
- url: '/v2/consumer/recipes/imageUpload',
208
+ url: '/v2/consumer/recipes/mediaHash',
209
+ ...options,
210
+ headers: {
211
+ 'Content-Type': 'application/json',
212
+ ...options === null || options === void 0 ? void 0 : options.headers,
213
+ },
214
+ });
215
+ };
216
+ /**
217
+ * MediaRating
218
+ * Performs NSFW level detection and content safety classification on media content.
219
+ */
220
+ export const invokeMediaRatingStepTemplate = (options) => {
221
+ var _a;
222
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
223
+ security: [
224
+ {
225
+ scheme: 'bearer',
226
+ type: 'http',
227
+ },
228
+ ],
229
+ url: '/v2/consumer/recipes/mediaRating',
192
230
  ...options,
193
231
  headers: {
194
232
  'Content-Type': 'application/json',
@@ -217,6 +255,29 @@ export const invokeTextToImageStepTemplate = (options) => {
217
255
  },
218
256
  });
219
257
  };
258
+ /**
259
+ * Training
260
+ * A workflow step for training machine learning models (LoRAs, checkpoints, etc.)
261
+ * /// on various types of data (images, videos, audio). This replaces ImageResourceTraining
262
+ * /// with a cleaner architecture that creates one job per epoch instead of a single monolithic job.
263
+ */
264
+ export const invokeTrainingStepTemplate = (options) => {
265
+ var _a;
266
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
267
+ security: [
268
+ {
269
+ scheme: 'bearer',
270
+ type: 'http',
271
+ },
272
+ ],
273
+ url: '/v2/consumer/recipes/training',
274
+ ...options,
275
+ headers: {
276
+ 'Content-Type': 'application/json',
277
+ ...options === null || options === void 0 ? void 0 : options.headers,
278
+ },
279
+ });
280
+ };
220
281
  /**
221
282
  * Upscale videos and/or interpolate frames
222
283
  */
@@ -237,6 +298,28 @@ export const invokeVideoEnhancementStepTemplate = (options) => {
237
298
  },
238
299
  });
239
300
  };
301
+ /**
302
+ * Video Frame Extraction
303
+ * Extracts unique frames from a video at a specified rate using perceptual hashing to filter out duplicate/similar frames.
304
+ * /// Useful for generating video previews, storyboards, or analyzing video content.
305
+ */
306
+ export const invokeVideoFrameExtractionStepTemplate = (options) => {
307
+ var _a;
308
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
309
+ security: [
310
+ {
311
+ scheme: 'bearer',
312
+ type: 'http',
313
+ },
314
+ ],
315
+ url: '/v2/consumer/recipes/videoFrameExtraction',
316
+ ...options,
317
+ headers: {
318
+ 'Content-Type': 'application/json',
319
+ ...options === null || options === void 0 ? void 0 : options.headers,
320
+ },
321
+ });
322
+ };
240
323
  /**
241
324
  * Video generation
242
325
  * Generate videos through text/image inputs using any of our supported engines
@@ -258,6 +341,67 @@ export const invokeVideoGenStepTemplate = (options) => {
258
341
  },
259
342
  });
260
343
  };
344
+ /**
345
+ * Interpolate videos using VFI Mamba
346
+ */
347
+ export const invokeVideoInterpolationStepTemplate = (options) => {
348
+ var _a;
349
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
350
+ security: [
351
+ {
352
+ scheme: 'bearer',
353
+ type: 'http',
354
+ },
355
+ ],
356
+ url: '/v2/consumer/recipes/videoInterpolation',
357
+ ...options,
358
+ headers: {
359
+ 'Content-Type': 'application/json',
360
+ ...options === null || options === void 0 ? void 0 : options.headers,
361
+ },
362
+ });
363
+ };
364
+ /**
365
+ * Upscale videos using FlashVSR
366
+ */
367
+ export const invokeVideoUpscalerStepTemplate = (options) => {
368
+ var _a;
369
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
370
+ security: [
371
+ {
372
+ scheme: 'bearer',
373
+ type: 'http',
374
+ },
375
+ ],
376
+ url: '/v2/consumer/recipes/videoUpscaler',
377
+ ...options,
378
+ headers: {
379
+ 'Content-Type': 'application/json',
380
+ ...options === null || options === void 0 ? void 0 : options.headers,
381
+ },
382
+ });
383
+ };
384
+ /**
385
+ * WDTagging
386
+ * Performs Waifu Diffusion tagging on media content to identify characteristics, objects, and themes.
387
+ */
388
+ export const invokeWdTaggingStepTemplate = (options) => {
389
+ var _a;
390
+ return ((_a = options === null || options === void 0 ? void 0 : options.client) !== null && _a !== void 0 ? _a : _heyApiClient).post({
391
+ security: [
392
+ {
393
+ scheme: 'bearer',
394
+ type: 'http',
395
+ },
396
+ ],
397
+ url: '/v2/consumer/recipes/wdTagging',
398
+ ...options,
399
+ headers: {
400
+ 'Content-Type': 'application/json',
401
+ ...options === null || options === void 0 ? void 0 : options.headers,
402
+ },
403
+ });
404
+ };
261
405
  /**
262
406
  * Invalidates the cache of a specific resource.
263
407
  */